mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-31 11:42:12 -05:00
Unify syntax
This commit is contained in:
parent
cbf8329ffd
commit
e438d026bd
28 changed files with 965 additions and 963 deletions
|
@ -27,11 +27,11 @@ process BWA_MEM {
|
||||||
def software = getSoftwareName(task.process)
|
def software = getSoftwareName(task.process)
|
||||||
def ioptions = initOptions(options)
|
def ioptions = initOptions(options)
|
||||||
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
||||||
def rg = meta.read_group ? "-R ${meta.read_group}" : ""
|
def read_group = meta.read_group ? "-R ${meta.read_group}" : ""
|
||||||
"""
|
"""
|
||||||
bwa mem \\
|
bwa mem \\
|
||||||
$ioptions.args \\
|
$ioptions.args \\
|
||||||
$rg \\
|
$read_group \\
|
||||||
-t $task.cpus \\
|
-t $task.cpus \\
|
||||||
$fasta \\
|
$fasta \\
|
||||||
$reads \\
|
$reads \\
|
||||||
|
|
|
@ -25,7 +25,7 @@ process DEEPTOOLS_PLOTPROFILE {
|
||||||
script:
|
script:
|
||||||
def software = getSoftwareName(task.process)
|
def software = getSoftwareName(task.process)
|
||||||
def ioptions = initOptions(options)
|
def ioptions = initOptions(options)
|
||||||
prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
||||||
"""
|
"""
|
||||||
plotProfile \\
|
plotProfile \\
|
||||||
$ioptions.args \\
|
$ioptions.args \\
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Import generic module functions
|
// Import generic module functions
|
||||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
include { saveFiles; getSoftwareName } from './functions'
|
||||||
|
|
||||||
def VERSION = '2.2.0'
|
def VERSION = '2.2.0'
|
||||||
|
|
||||||
|
|
|
@ -21,11 +21,12 @@ process MACS2_CALLPEAK {
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path("*.{narrowPeak,broadPeak}"), emit: peak
|
tuple val(meta), path("*.{narrowPeak,broadPeak}"), emit: peak
|
||||||
tuple val(meta), path("*.xls") , emit: xls
|
tuple val(meta), path("*.xls") , emit: xls
|
||||||
tuple val(meta), path("*.gappedPeak"), emit: gapped optional true
|
|
||||||
tuple val(meta), path("*.bed"), emit: bed optional true
|
|
||||||
tuple val(meta), path("*.bdg"), emit: bdg optional true
|
|
||||||
path "*.version.txt" , emit: version
|
path "*.version.txt" , emit: version
|
||||||
|
|
||||||
|
tuple val(meta), path("*.gappedPeak"), optional:true, emit: gapped
|
||||||
|
tuple val(meta), path("*.bed") , optional:true, emit: bed
|
||||||
|
tuple val(meta), path("*.bdg") , optional:true, emit: bdg
|
||||||
|
|
||||||
script:
|
script:
|
||||||
def software = getSoftwareName(task.process)
|
def software = getSoftwareName(task.process)
|
||||||
def ioptions = initOptions(options)
|
def ioptions = initOptions(options)
|
||||||
|
|
|
@ -27,12 +27,12 @@ process PRESEQ_LCEXTRAP {
|
||||||
def software = getSoftwareName(task.process)
|
def software = getSoftwareName(task.process)
|
||||||
def ioptions = initOptions(options)
|
def ioptions = initOptions(options)
|
||||||
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
||||||
def pe = meta.single_end ? '' : '-pe'
|
def paired_end = meta.single_end ? '' : '-pe'
|
||||||
"""
|
"""
|
||||||
preseq \\
|
preseq \\
|
||||||
lc_extrap \\
|
lc_extrap \\
|
||||||
$ioptions.args \\
|
$ioptions.args \\
|
||||||
$pe \\
|
$paired_end \\
|
||||||
-output ${prefix}.ccurve.txt \\
|
-output ${prefix}.ccurve.txt \\
|
||||||
$bam
|
$bam
|
||||||
cp .command.err ${prefix}.command.log
|
cp .command.err ${prefix}.command.log
|
||||||
|
|
|
@ -26,6 +26,8 @@ process QUALIMAP_RNASEQ {
|
||||||
def software = getSoftwareName(task.process)
|
def software = getSoftwareName(task.process)
|
||||||
def ioptions = initOptions(options)
|
def ioptions = initOptions(options)
|
||||||
prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
||||||
|
def paired_end = meta.single_end ? '' : '-pe'
|
||||||
|
def memory = task.memory.toGiga() + "G"
|
||||||
|
|
||||||
def strandedness = 'non-strand-specific'
|
def strandedness = 'non-strand-specific'
|
||||||
if (meta.strandedness == 'forward') {
|
if (meta.strandedness == 'forward') {
|
||||||
|
@ -33,8 +35,6 @@ process QUALIMAP_RNASEQ {
|
||||||
} else if (meta.strandedness == 'reverse') {
|
} else if (meta.strandedness == 'reverse') {
|
||||||
strandedness = 'strand-specific-reverse'
|
strandedness = 'strand-specific-reverse'
|
||||||
}
|
}
|
||||||
def paired_end = meta.single_end ? '' : '-pe'
|
|
||||||
def memory = task.memory.toGiga() + "G"
|
|
||||||
"""
|
"""
|
||||||
unset DISPLAY
|
unset DISPLAY
|
||||||
mkdir tmp
|
mkdir tmp
|
||||||
|
|
|
@ -27,6 +27,7 @@ process SALMON_QUANT {
|
||||||
def software = getSoftwareName(task.process)
|
def software = getSoftwareName(task.process)
|
||||||
def ioptions = initOptions(options)
|
def ioptions = initOptions(options)
|
||||||
prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
||||||
|
def endedness = meta.single_end ? "-r $reads" : "-1 ${reads[0]} -2 ${reads[1]}"
|
||||||
|
|
||||||
def strandedness = meta.single_end ? 'U' : 'IU'
|
def strandedness = meta.single_end ? 'U' : 'IU'
|
||||||
if (meta.strandedness == 'forward') {
|
if (meta.strandedness == 'forward') {
|
||||||
|
@ -34,7 +35,6 @@ process SALMON_QUANT {
|
||||||
} else if (meta.strandedness == 'reverse') {
|
} else if (meta.strandedness == 'reverse') {
|
||||||
strandedness = meta.single_end ? 'SR' : 'ISR'
|
strandedness = meta.single_end ? 'SR' : 'ISR'
|
||||||
}
|
}
|
||||||
def endedness = meta.single_end ? "-r $reads" : "-1 ${reads[0]} -2 ${reads[1]}"
|
|
||||||
"""
|
"""
|
||||||
salmon quant \\
|
salmon quant \\
|
||||||
--geneMap $gtf \\
|
--geneMap $gtf \\
|
||||||
|
|
|
@ -26,7 +26,7 @@ process STAR_GENOMEGENERATE {
|
||||||
script:
|
script:
|
||||||
def software = getSoftwareName(task.process)
|
def software = getSoftwareName(task.process)
|
||||||
def ioptions = initOptions(options)
|
def ioptions = initOptions(options)
|
||||||
def avail_mem = task.memory ? "--limitGenomeGenerateRAM ${task.memory.toBytes() - 100000000}" : ''
|
def memory = task.memory ? "--limitGenomeGenerateRAM ${task.memory.toBytes() - 100000000}" : ''
|
||||||
"""
|
"""
|
||||||
mkdir star
|
mkdir star
|
||||||
STAR \\
|
STAR \\
|
||||||
|
@ -35,7 +35,7 @@ process STAR_GENOMEGENERATE {
|
||||||
--genomeFastaFiles $fasta \\
|
--genomeFastaFiles $fasta \\
|
||||||
--sjdbGTFfile $gtf \\
|
--sjdbGTFfile $gtf \\
|
||||||
--runThreadN $task.cpus \\
|
--runThreadN $task.cpus \\
|
||||||
$avail_mem \\
|
$memory \\
|
||||||
$ioptions.args
|
$ioptions.args
|
||||||
|
|
||||||
STAR --version | sed -e "s/STAR_//g" > ${software}.version.txt
|
STAR --version | sed -e "s/STAR_//g" > ${software}.version.txt
|
||||||
|
|
|
@ -26,6 +26,7 @@ process SUBREAD_FEATURECOUNTS {
|
||||||
def software = getSoftwareName(task.process)
|
def software = getSoftwareName(task.process)
|
||||||
def ioptions = initOptions(options)
|
def ioptions = initOptions(options)
|
||||||
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
||||||
|
def paired_end = meta.single_end ? '' : '-p'
|
||||||
|
|
||||||
def strandedness = 0
|
def strandedness = 0
|
||||||
if (meta.strandedness == 'forward') {
|
if (meta.strandedness == 'forward') {
|
||||||
|
@ -33,7 +34,6 @@ process SUBREAD_FEATURECOUNTS {
|
||||||
} else if (meta.strandedness == 'reverse') {
|
} else if (meta.strandedness == 'reverse') {
|
||||||
strandedness = 2
|
strandedness = 2
|
||||||
}
|
}
|
||||||
def paired_end = meta.single_end ? '' : '-p'
|
|
||||||
"""
|
"""
|
||||||
featureCounts \\
|
featureCounts \\
|
||||||
$ioptions.args \\
|
$ioptions.args \\
|
||||||
|
|
|
@ -19,11 +19,12 @@ process TRIMGALORE {
|
||||||
|
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path("*.fq.gz") , emit: reads
|
tuple val(meta), path("*.fq.gz") , emit: reads
|
||||||
tuple val(meta), path("*.html"), emit: html optional true
|
|
||||||
tuple val(meta), path("*.zip"), emit: zip optional true
|
|
||||||
tuple val(meta), path("*report.txt"), emit: log
|
tuple val(meta), path("*report.txt"), emit: log
|
||||||
path "*.version.txt" , emit: version
|
path "*.version.txt" , emit: version
|
||||||
|
|
||||||
|
tuple val(meta), path("*.html"), emit: html optional true
|
||||||
|
tuple val(meta), path("*.zip") , emit: zip optional true
|
||||||
|
|
||||||
script:
|
script:
|
||||||
// Calculate number of --cores for TrimGalore based on value of task.cpus
|
// Calculate number of --cores for TrimGalore based on value of task.cpus
|
||||||
// See: https://github.com/FelixKrueger/TrimGalore/blob/master/Changelog.md#version-060-release-on-1-mar-2019
|
// See: https://github.com/FelixKrueger/TrimGalore/blob/master/Changelog.md#version-060-release-on-1-mar-2019
|
||||||
|
|
Loading…
Reference in a new issue