mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 19:18:17 +00: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 ioptions = initOptions(options)
|
||||
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 \\
|
||||
$ioptions.args \\
|
||||
$rg \\
|
||||
$read_group \\
|
||||
-t $task.cpus \\
|
||||
$fasta \\
|
||||
$reads \\
|
||||
|
|
|
@ -25,7 +25,7 @@ process DEEPTOOLS_PLOTPROFILE {
|
|||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
||||
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
||||
"""
|
||||
plotProfile \\
|
||||
$ioptions.args \\
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
include { saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
def VERSION = '2.2.0'
|
||||
|
||||
|
|
|
@ -21,11 +21,12 @@ process MACS2_CALLPEAK {
|
|||
output:
|
||||
tuple val(meta), path("*.{narrowPeak,broadPeak}"), emit: peak
|
||||
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
|
||||
|
||||
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:
|
||||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
|
|
|
@ -27,12 +27,12 @@ process PRESEQ_LCEXTRAP {
|
|||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
||||
def pe = meta.single_end ? '' : '-pe'
|
||||
def paired_end = meta.single_end ? '' : '-pe'
|
||||
"""
|
||||
preseq \\
|
||||
lc_extrap \\
|
||||
$ioptions.args \\
|
||||
$pe \\
|
||||
$paired_end \\
|
||||
-output ${prefix}.ccurve.txt \\
|
||||
$bam
|
||||
cp .command.err ${prefix}.command.log
|
||||
|
|
|
@ -26,6 +26,8 @@ process QUALIMAP_RNASEQ {
|
|||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
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'
|
||||
if (meta.strandedness == 'forward') {
|
||||
|
@ -33,8 +35,6 @@ process QUALIMAP_RNASEQ {
|
|||
} else if (meta.strandedness == 'reverse') {
|
||||
strandedness = 'strand-specific-reverse'
|
||||
}
|
||||
def paired_end = meta.single_end ? '' : '-pe'
|
||||
def memory = task.memory.toGiga() + "G"
|
||||
"""
|
||||
unset DISPLAY
|
||||
mkdir tmp
|
||||
|
|
|
@ -27,6 +27,7 @@ process SALMON_QUANT {
|
|||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
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'
|
||||
if (meta.strandedness == 'forward') {
|
||||
|
@ -34,7 +35,6 @@ process SALMON_QUANT {
|
|||
} else if (meta.strandedness == 'reverse') {
|
||||
strandedness = meta.single_end ? 'SR' : 'ISR'
|
||||
}
|
||||
def endedness = meta.single_end ? "-r $reads" : "-1 ${reads[0]} -2 ${reads[1]}"
|
||||
"""
|
||||
salmon quant \\
|
||||
--geneMap $gtf \\
|
||||
|
|
|
@ -26,7 +26,7 @@ process STAR_GENOMEGENERATE {
|
|||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
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
|
||||
STAR \\
|
||||
|
@ -35,7 +35,7 @@ process STAR_GENOMEGENERATE {
|
|||
--genomeFastaFiles $fasta \\
|
||||
--sjdbGTFfile $gtf \\
|
||||
--runThreadN $task.cpus \\
|
||||
$avail_mem \\
|
||||
$memory \\
|
||||
$ioptions.args
|
||||
|
||||
STAR --version | sed -e "s/STAR_//g" > ${software}.version.txt
|
||||
|
|
|
@ -26,6 +26,7 @@ process SUBREAD_FEATURECOUNTS {
|
|||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
||||
def paired_end = meta.single_end ? '' : '-p'
|
||||
|
||||
def strandedness = 0
|
||||
if (meta.strandedness == 'forward') {
|
||||
|
@ -33,7 +34,6 @@ process SUBREAD_FEATURECOUNTS {
|
|||
} else if (meta.strandedness == 'reverse') {
|
||||
strandedness = 2
|
||||
}
|
||||
def paired_end = meta.single_end ? '' : '-p'
|
||||
"""
|
||||
featureCounts \\
|
||||
$ioptions.args \\
|
||||
|
|
|
@ -19,11 +19,12 @@ process TRIMGALORE {
|
|||
|
||||
output:
|
||||
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
|
||||
path "*.version.txt" , emit: version
|
||||
|
||||
tuple val(meta), path("*.html"), emit: html optional true
|
||||
tuple val(meta), path("*.zip") , emit: zip optional true
|
||||
|
||||
script:
|
||||
// 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
|
||||
|
|
Loading…
Reference in a new issue