mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2025-01-02 20:52:07 -05:00
Update main.nf
This commit is contained in:
parent
572e71c881
commit
4ba67a97fa
1 changed files with 3 additions and 20 deletions
|
@ -1,23 +1,6 @@
|
||||||
// Import generic module functions
|
// Import generic module functions
|
||||||
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
|
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
|
||||||
|
|
||||||
// TODO nf-core: If in doubt look at other nf-core/modules to see how we are doing things! :)
|
|
||||||
// https://github.com/nf-core/modules/tree/master/software
|
|
||||||
// You can also ask for help via your pull request or on the #modules channel on the nf-core Slack workspace:
|
|
||||||
// https://nf-co.re/join
|
|
||||||
|
|
||||||
// TODO nf-core: A module file SHOULD only define input and output files as command-line parameters.
|
|
||||||
// All other parameters MUST be provided as a string i.e. "options.args"
|
|
||||||
// where "params.options" is a Groovy Map that MUST be provided via the addParams section of the including workflow.
|
|
||||||
// Any parameters that need to be evaluated in the context of a particular sample
|
|
||||||
// e.g. single-end/paired-end data MUST also be defined and evaluated appropriately.
|
|
||||||
// TODO nf-core: Software that can be piped together SHOULD be added to separate module files
|
|
||||||
// unless there is a run-time, storage advantage in implementing in this way
|
|
||||||
// e.g. it's ok to have a single module for bwa to output BAM instead of SAM:
|
|
||||||
// bwa mem | samtools view -B -T ref.fasta
|
|
||||||
// TODO nf-core: Optional inputs are not currently supported by Nextflow. However, using an empty
|
|
||||||
// list (`[]`) instead of a file can be used to work around this issue.
|
|
||||||
|
|
||||||
params.options = [:]
|
params.options = [:]
|
||||||
options = initOptions(params.options)
|
options = initOptions(params.options)
|
||||||
|
|
||||||
|
@ -39,14 +22,14 @@ process BUSTOOLS_SORT {
|
||||||
tuple val(meta), path(bus)
|
tuple val(meta), path(bus)
|
||||||
|
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path("${prefix}.sorted.bus"), emit: bus
|
tuple val(meta), path("*.bus"), emit: bus
|
||||||
path "versions.yml" , emit: versions
|
path "versions.yml" , emit: versions
|
||||||
|
|
||||||
script:
|
script:
|
||||||
prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||||
"""
|
"""
|
||||||
bustools sort \\
|
bustools sort \\
|
||||||
-o ${prefix}.sorted.bus \\
|
-o ${prefix}.bus \\
|
||||||
-t $task.cpus \\
|
-t $task.cpus \\
|
||||||
-m ${task.memory.toGiga()}G \\
|
-m ${task.memory.toGiga()}G \\
|
||||||
$options.args \\
|
$options.args \\
|
||||||
|
|
Loading…
Reference in a new issue