diff --git a/modules/bbmap/align/main.nf b/modules/bbmap/align/main.nf index 8235e78d..63989be0 100644 --- a/modules/bbmap/align/main.nf +++ b/modules/bbmap/align/main.nf @@ -57,6 +57,8 @@ process BBMAP_ALIGN { cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: ${getSoftwareName(task.process)}: \$(bbversion.sh) + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) END_VERSIONS """ } diff --git a/modules/bowtie/align/main.nf b/modules/bowtie/align/main.nf index 73554fa2..060c5fc4 100644 --- a/modules/bowtie/align/main.nf +++ b/modules/bowtie/align/main.nf @@ -58,6 +58,7 @@ process BOWTIE_ALIGN { cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: ${getSoftwareName(task.process)}: \$(echo \$(bowtie --version 2>&1) | sed 's/^.*bowtie-align-s version //; s/ .*\$//') + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ } diff --git a/modules/bowtie2/align/main.nf b/modules/bowtie2/align/main.nf index 7d33da03..00bcf83c 100644 --- a/modules/bowtie2/align/main.nf +++ b/modules/bowtie2/align/main.nf @@ -48,6 +48,8 @@ process BOWTIE2_ALIGN { cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: ${getSoftwareName(task.process)}: \$(echo \$(bowtie2 --version 2>&1) | sed 's/^.*bowtie2-align-s version //; s/ .*\$//') + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) END_VERSIONS """ } else { @@ -70,9 +72,12 @@ process BOWTIE2_ALIGN { if [ -f ${prefix}.unmapped.fastq.2.gz ]; then mv ${prefix}.unmapped.fastq.2.gz ${prefix}.unmapped_2.fastq.gz fi + cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: ${getSoftwareName(task.process)}: \$(echo \$(bowtie2 --version 2>&1) | sed 's/^.*bowtie2-align-s version //; s/ .*\$//') + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) END_VERSIONS """ } diff --git a/modules/bwa/mem/main.nf b/modules/bwa/mem/main.nf index 05e5260c..a081a69a 100644 --- a/modules/bwa/mem/main.nf +++ b/modules/bwa/mem/main.nf @@ -45,6 +45,7 @@ process BWA_MEM { cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: ${getSoftwareName(task.process)}: \$(echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//') + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ } diff --git a/modules/bwa/sampe/main.nf b/modules/bwa/sampe/main.nf index ae2998d8..f4519541 100644 --- a/modules/bwa/sampe/main.nf +++ b/modules/bwa/sampe/main.nf @@ -44,6 +44,7 @@ process BWA_SAMPE { cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: ${getSoftwareName(task.process)}: \$(echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//') + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ } diff --git a/modules/bwa/samse/main.nf b/modules/bwa/samse/main.nf index 89310153..5303b24f 100644 --- a/modules/bwa/samse/main.nf +++ b/modules/bwa/samse/main.nf @@ -44,6 +44,7 @@ process BWA_SAMSE { cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: ${getSoftwareName(task.process)}: \$(echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//') + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ } diff --git a/modules/bwamem2/mem/main.nf b/modules/bwamem2/mem/main.nf index f47bfea3..d21b8b99 100644 --- a/modules/bwamem2/mem/main.nf +++ b/modules/bwamem2/mem/main.nf @@ -46,6 +46,7 @@ process BWAMEM2_MEM { cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: ${getSoftwareName(task.process)}: \$(echo \$(bwa-mem2 version 2>&1) | sed 's/.* //') + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ } diff --git a/modules/chromap/index/main.nf b/modules/chromap/index/main.nf index e52ffe4b..61b7a856 100644 --- a/modules/chromap/index/main.nf +++ b/modules/chromap/index/main.nf @@ -24,14 +24,16 @@ process CHROMAP_INDEX { path fasta output: - path "*.index" , emit: index - path "versions.yml" , emit: version + path "*.index" , emit: index + path "versions.yml", emit: version script: def software = getSoftwareName(task.process) def prefix = fasta.baseName """ - chromap -i $options.args \\ + chromap \\ + -i \\ + $options.args \\ -t $task.cpus \\ -r $fasta \\ -o ${prefix}.index @@ -39,6 +41,7 @@ process CHROMAP_INDEX { cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: ${getSoftwareName(task.process)}: \$(echo "$VERSION") + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ } diff --git a/modules/hisat2/align/main.nf b/modules/hisat2/align/main.nf index 21eb3c7d..583ddc3f 100644 --- a/modules/hisat2/align/main.nf +++ b/modules/hisat2/align/main.nf @@ -62,6 +62,7 @@ process HISAT2_ALIGN { cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: ${getSoftwareName(task.process)}: \$(echo $VERSION) + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ } else { @@ -93,6 +94,7 @@ process HISAT2_ALIGN { cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: ${getSoftwareName(task.process)}: \$(echo $VERSION) + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ } diff --git a/modules/kraken2/kraken2/main.nf b/modules/kraken2/kraken2/main.nf index 4000d12a..cc269e98 100644 --- a/modules/kraken2/kraken2/main.nf +++ b/modules/kraken2/kraken2/main.nf @@ -51,6 +51,7 @@ process KRAKEN2_KRAKEN2 { cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: ${getSoftwareName(task.process)}: \$(echo \$(kraken2 --version 2>&1) | sed 's/^.*Kraken version //; s/ .*\$//') + pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) END_VERSIONS """ } diff --git a/modules/rapidnj/main.nf b/modules/rapidnj/main.nf index a46fbfe8..118ea7af 100644 --- a/modules/rapidnj/main.nf +++ b/modules/rapidnj/main.nf @@ -4,6 +4,8 @@ include { initOptions; saveFiles; getSoftwareName; getProcessName } from './func params.options = [:] options = initOptions(params.options) +def VERSION = '2.3.2' // No version information printed + process RAPIDNJ { label 'process_medium' publishDir "${params.outdir}", @@ -21,9 +23,9 @@ process RAPIDNJ { path alignment output: - path "*.sth" , emit: stockholm_alignment - path "*.tre" , emit: phylogeny - path "versions.yml" , emit: version + path "*.sth" , emit: stockholm_alignment + path "*.tre" , emit: phylogeny + path "versions.yml", emit: version script: def software = getSoftwareName(task.process) @@ -38,10 +40,10 @@ process RAPIDNJ { -c $task.cpus \\ -x rapidnj_phylogeny.tre - # Doesn't appear to be a way of getting the version number cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: - ${getSoftwareName(task.process)}: \$(echo 2.3.2) + ${getSoftwareName(task.process)}: \$(echo $VERSION) + biopython: \$(python -c "import Bio; print(Bio.__version__)") END_VERSIONS """ } diff --git a/modules/rsem/calculateexpression/main.nf b/modules/rsem/calculateexpression/main.nf index 33f34904..d3d11397 100644 --- a/modules/rsem/calculateexpression/main.nf +++ b/modules/rsem/calculateexpression/main.nf @@ -34,8 +34,8 @@ process RSEM_CALCULATEEXPRESSION { tuple val(meta), path("${prefix}.transcript.bam"), optional:true, emit: bam_transcript script: - def software = getSoftwareName(task.process) - prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" + def software = getSoftwareName(task.process) + prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" def strandedness = '' if (meta.strandedness == 'forward') { @@ -59,6 +59,7 @@ process RSEM_CALCULATEEXPRESSION { cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: ${getSoftwareName(task.process)}: \$(rsem-calculate-expression --version | sed -e "s/Current version: RSEM v//g") + star: \$(STAR --version | sed -e "s/STAR_//g") END_VERSIONS """ } diff --git a/modules/rsem/preparereference/main.nf b/modules/rsem/preparereference/main.nf index 560b5a63..b4a613bd 100644 --- a/modules/rsem/preparereference/main.nf +++ b/modules/rsem/preparereference/main.nf @@ -53,6 +53,7 @@ process RSEM_PREPAREREFERENCE { cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: ${getSoftwareName(task.process)}: \$(rsem-calculate-expression --version | sed -e "s/Current version: RSEM v//g") + star: \$(STAR --version | sed -e "s/STAR_//g") END_VERSIONS """ } else { @@ -67,6 +68,7 @@ process RSEM_PREPAREREFERENCE { cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: ${getSoftwareName(task.process)}: \$(rsem-calculate-expression --version | sed -e "s/Current version: RSEM v//g") + star: \$(STAR --version | sed -e "s/STAR_//g") END_VERSIONS """ } diff --git a/modules/samtools/faidx/main.nf b/modules/samtools/faidx/main.nf index f7d6cbef..cdbae99b 100644 --- a/modules/samtools/faidx/main.nf +++ b/modules/samtools/faidx/main.nf @@ -22,8 +22,8 @@ process SAMTOOLS_FAIDX { path fasta output: - path "*.fai" , emit: fai - path "versions.yml" , emit: version + path "*.fai" , emit: fai + path "versions.yml", emit: version script: def software = getSoftwareName(task.process) diff --git a/modules/seacr/callpeak/main.nf b/modules/seacr/callpeak/main.nf index cc567dfb..8892ab6d 100644 --- a/modules/seacr/callpeak/main.nf +++ b/modules/seacr/callpeak/main.nf @@ -40,6 +40,8 @@ process SEACR_CALLPEAK { cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: ${getSoftwareName(task.process)}: \$(echo $VERSION) + bedtools: \$(bedtools --version | sed -e "s/bedtools v//g") + r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//') END_VERSIONS """ } diff --git a/modules/seqkit/split2/main.nf b/modules/seqkit/split2/main.nf index 44e0046f..b178b1da 100644 --- a/modules/seqkit/split2/main.nf +++ b/modules/seqkit/split2/main.nf @@ -7,13 +7,11 @@ options = initOptions(params.options) process SEQKIT_SPLIT2 { tag "$meta.id" label 'process_medium' - publishDir "${params.outdir}", mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } conda (params.enable_conda ? 'bioconda::seqkit=0.16.1' : null) - if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container "https://depot.galaxyproject.org/singularity/seqkit:0.16.1--h9ee0642_0" } else { @@ -24,42 +22,40 @@ process SEQKIT_SPLIT2 { tuple val(meta), path(reads) output: - tuple val(meta), path("*.split/*.gz"), emit: reads - path("versions.yml") , emit: version - + tuple val(meta), path("*${prefix}/*.gz"), emit: reads + path "versions.yml" , emit: version script: def software = getSoftwareName(task.process) - def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" - + prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" if(meta.single_end){ - """ - seqkit \ - split2 \ - $options.args \ - --threads $task.cpus \ - -1 ${reads} \ - --out-dir ${prefix}.split + """ + seqkit \\ + split2 \\ + $options.args \\ + --threads $task.cpus \\ + -1 $reads \\ + --out-dir $prefix - cat <<-END_VERSIONS > versions.yml - ${getProcessName(task.process)}: - ${getSoftwareName(task.process)}: \$(seqkit --version 2>&1 | sed 's/^.*seqkit //; s/Using.*\$//') - END_VERSIONS - """ + cat <<-END_VERSIONS > versions.yml + ${getProcessName(task.process)}: + ${getSoftwareName(task.process)}: \$(echo \$(seqkit 2>&1) | sed 's/^.*Version: //; s/ .*\$//') + END_VERSIONS + """ } else { - """ - seqkit \ - split2 \ - $options.args \ - --threads $task.cpus \ - -1 ${reads[0]} \ - -2 ${reads[1]} \ - --out-dir ${prefix}.split + """ + seqkit \\ + split2 \\ + $options.args \\ + --threads $task.cpus \\ + -1 ${reads[0]} \\ + -2 ${reads[1]} \\ + --out-dir $prefix - cat <<-END_VERSIONS > versions.yml - ${getProcessName(task.process)}: - ${getSoftwareName(task.process)}: \$(seqkit --version 2>&1 | sed 's/^.*seqkit //; s/Using.*\$//') - END_VERSIONS - """ + cat <<-END_VERSIONS > versions.yml + ${getProcessName(task.process)}: + ${getSoftwareName(task.process)}: \$(echo \$(seqkit 2>&1) | sed 's/^.*Version: //; s/ .*\$//') + END_VERSIONS + """ } } diff --git a/modules/seqtk/sample/main.nf b/modules/seqtk/sample/main.nf index d62d8cac..277d74ca 100644 --- a/modules/seqtk/sample/main.nf +++ b/modules/seqtk/sample/main.nf @@ -40,7 +40,7 @@ process SEQTK_SAMPLE { cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: - ${getSoftwareName(task.process)}: \$(seqtk 2>&1 | sed 's/^.*Version: //; s/ .*\$//') + ${getSoftwareName(task.process)}: \$(echo \$(seqtk 2>&1) | sed 's/^.*Version: //; s/ .*\$//') END_VERSIONS """ } else { @@ -64,7 +64,7 @@ process SEQTK_SAMPLE { cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: - ${getSoftwareName(task.process)}: \$(seqtk 2>&1 | sed 's/^.*Version: //; s/ .*\$//') + ${getSoftwareName(task.process)}: \$(echo \$(seqtk 2>&1) | sed 's/^.*Version: //; s/ .*\$//') END_VERSIONS """ } diff --git a/modules/seqtk/subseq/main.nf b/modules/seqtk/subseq/main.nf index 2907d282..41326402 100644 --- a/modules/seqtk/subseq/main.nf +++ b/modules/seqtk/subseq/main.nf @@ -43,7 +43,7 @@ process SEQTK_SUBSEQ { cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: - ${getSoftwareName(task.process)}: \$(seqtk 2>&1 | sed 's/^.*Version: //; s/ .*\$//') + ${getSoftwareName(task.process)}: \$(echo \$(seqtk 2>&1) | sed 's/^.*Version: //; s/ .*\$//') END_VERSIONS """ } diff --git a/modules/sequenzautils/bam2seqz/main.nf b/modules/sequenzautils/bam2seqz/main.nf index ad4f6847..9c4fc12f 100644 --- a/modules/sequenzautils/bam2seqz/main.nf +++ b/modules/sequenzautils/bam2seqz/main.nf @@ -24,8 +24,8 @@ process SEQUENZAUTILS_BAM2SEQZ { path wigfile output: - tuple val(meta), path("*.seqz.gz"), emit: seqz - path "versions.yml" , emit: version + tuple val(meta), path("*.gz"), emit: seqz + path "versions.yml" , emit: version script: def software = getSoftwareName(task.process) @@ -38,11 +38,11 @@ process SEQUENZAUTILS_BAM2SEQZ { -t $tumourbam \\ --fasta $fasta \\ -gc $wigfile \\ - -o ${prefix}.seqz.gz + -o ${prefix}.gz cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: - ${getSoftwareName(task.process)}: \$(sequenzautils --version 2>&1 | sed 's/^.*sequenzautils //; s/Using.*\$//') + ${getSoftwareName(task.process)}: \$(echo \$(sequenza-utils 2>&1) | sed 's/^.*is version //; s/ .*\$//') END_VERSIONS """ } diff --git a/modules/sequenzautils/gcwiggle/main.nf b/modules/sequenzautils/gcwiggle/main.nf index a0575d7e..a352256a 100644 --- a/modules/sequenzautils/gcwiggle/main.nf +++ b/modules/sequenzautils/gcwiggle/main.nf @@ -23,7 +23,7 @@ process SEQUENZAUTILS_GCWIGGLE { output: tuple val(meta), path("*.wig.gz"), emit: wig - path "versions.yml" , emit: version + path "versions.yml" , emit: version script: def software = getSoftwareName(task.process) @@ -37,7 +37,7 @@ process SEQUENZAUTILS_GCWIGGLE { cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: - ${getSoftwareName(task.process)}: \$(sequenzautils --version 2>&1 | sed 's/^.*sequenzautils //; s/Using.*\$//') + ${getSoftwareName(task.process)}: \$(echo \$(sequenza-utils 2>&1) | sed 's/^.*is version //; s/ .*\$//') END_VERSIONS """ } diff --git a/modules/shovill/main.nf b/modules/shovill/main.nf index 8319e75f..92b10732 100644 --- a/modules/shovill/main.nf +++ b/modules/shovill/main.nf @@ -44,7 +44,7 @@ process SHOVILL { cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: - ${getSoftwareName(task.process)}: \$(shovill --version 2>&1 | sed 's/^.*shovill //' ) + ${getSoftwareName(task.process)}: \$(echo \$(shovill --version 2>&1) | sed 's/^.*shovill //') END_VERSIONS """ } diff --git a/modules/star/genomegenerate/main.nf b/modules/star/genomegenerate/main.nf index 5ccb38e8..520f6b21 100644 --- a/modules/star/genomegenerate/main.nf +++ b/modules/star/genomegenerate/main.nf @@ -46,6 +46,8 @@ process STAR_GENOMEGENERATE { cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: ${getSoftwareName(task.process)}: \$(STAR --version | sed -e "s/STAR_//g") + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + gawk: \$(echo \$(gawk --version 2>&1) | sed 's/^.*GNU Awk //; s/, .*\$//') END_VERSIONS """ } else { @@ -67,6 +69,8 @@ process STAR_GENOMEGENERATE { cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: ${getSoftwareName(task.process)}: \$(STAR --version | sed -e "s/STAR_//g") + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + gawk: \$(echo \$(gawk --version 2>&1) | sed 's/^.*GNU Awk //; s/, .*\$//') END_VERSIONS """ } diff --git a/modules/tiddit/sv/main.nf b/modules/tiddit/sv/main.nf index b7fe1b03..fce5c49b 100644 --- a/modules/tiddit/sv/main.nf +++ b/modules/tiddit/sv/main.nf @@ -35,14 +35,15 @@ process TIDDIT_SV { def reference = fasta == "dummy_file.txt" ? "--ref $fasta" : "" """ tiddit \\ - --sv $options.args \\ + --sv \\ + $options.args \\ --bam $bam \\ $reference \\ -o $prefix cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: - ${getSoftwareName(task.process)}: \$(tiddit -h 2>&1 | sed 's/^.*Version: //; s/(.*\$//') + ${getSoftwareName(task.process)}: \$(echo \$(tiddit 2>&1) | sed 's/^.*TIDDIT-//; s/ .*\$//') END_VERSIONS """ } diff --git a/modules/ucsc/bedgraphtobigwig/main.nf b/modules/ucsc/bedgraphtobigwig/main.nf index 60e046f9..4a779644 100644 --- a/modules/ucsc/bedgraphtobigwig/main.nf +++ b/modules/ucsc/bedgraphtobigwig/main.nf @@ -32,7 +32,11 @@ process UCSC_BEDGRAPHTOBIGWIG { def software = getSoftwareName(task.process) def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" """ - bedGraphToBigWig $bedgraph $sizes ${prefix}.bigWig + bedGraphToBigWig \\ + $bedgraph \\ + $sizes \\ + ${prefix}.bigWig + cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: ${getSoftwareName(task.process)}: \$(echo $VERSION) diff --git a/modules/ucsc/bigwigaverageoverbed/main.nf b/modules/ucsc/bigwigaverageoverbed/main.nf index adba3c76..76c00cfe 100644 --- a/modules/ucsc/bigwigaverageoverbed/main.nf +++ b/modules/ucsc/bigwigaverageoverbed/main.nf @@ -4,6 +4,8 @@ include { initOptions; saveFiles; getSoftwareName; getProcessName } from './func params.options = [:] options = initOptions(params.options) +def VERSION = '377' + process UCSC_BIGWIGAVERAGEOVERBED { tag "$meta.id" label 'process_medium' @@ -23,19 +25,23 @@ process UCSC_BIGWIGAVERAGEOVERBED { path bigwig output: - tuple val(meta), path("*.tab") , emit: tab - path "versions.yml" , emit: version + tuple val(meta), path("*.tab"), emit: tab + path "versions.yml" , emit: version script: def software = getSoftwareName(task.process) def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" """ # there is a bug that bigWigAverageOverBed can not handle ensembl seqlevels style. - bigWigAverageOverBed ${options.args} $bigwig $bed ${bed.getSimpleName()}.tab + bigWigAverageOverBed \\ + $options.args \\ + $bigwig \\ + $bed \\ + ${prefix}.tab cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: - ${getSoftwareName(task.process)}: \$(bigWigAverageOverBed 2>&1 | sed 's/bigWigAverageOverBed v//; s/ - Compute.*\$//') + ${getSoftwareName(task.process)}: \$(echo $VERSION) END_VERSIONS """ } diff --git a/modules/unicycler/main.nf b/modules/unicycler/main.nf index 2b031c42..1dd97c40 100644 --- a/modules/unicycler/main.nf +++ b/modules/unicycler/main.nf @@ -44,7 +44,7 @@ process UNICYCLER { cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: - ${getSoftwareName(task.process)}: \$(unicycler --version 2>&1 | sed 's/^.*Unicycler v//; s/ .*\$//') + ${getSoftwareName(task.process)}: \$(echo \$(unicycler --version 2>&1) | sed 's/^.*Unicycler v//; s/ .*\$//') END_VERSIONS """ } diff --git a/modules/yara/index/main.nf b/modules/yara/index/main.nf index c621e866..e99d99ba 100644 --- a/modules/yara/index/main.nf +++ b/modules/yara/index/main.nf @@ -22,21 +22,25 @@ process YARA_INDEX { path fasta output: - path "yara", emit: index - path "versions.yml" , emit: version + path "yara" , emit: index + path "versions.yml", emit: version script: def software = getSoftwareName(task.process) """ mkdir yara - yara_indexer $fasta -o "yara" + + yara_indexer \\ + $fasta \\ + -o "yara" + mv *.{lf,rid,sa,txt}.* yara cp $fasta yara/yara.fasta cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: - ${getSoftwareName(task.process)}: \$(yara_indexer --help 2>&1 | grep -e "yara_indexer version:" | sed 's/yara_indexer version: //g') + ${getSoftwareName(task.process)}: \$(echo \$(yara_indexer --version 2>&1) | sed 's/^.*yara_indexer version: //; s/ .*\$//') END_VERSIONS """ } diff --git a/modules/yara/mapper/main.nf b/modules/yara/mapper/main.nf index 3404d591..88e3d411 100644 --- a/modules/yara/mapper/main.nf +++ b/modules/yara/mapper/main.nf @@ -24,31 +24,44 @@ process YARA_MAPPER { output: tuple val(meta), path("*.mapped.bam"), emit: bam - path "versions.yml" , emit: version + path "versions.yml" , emit: version script: def software = getSoftwareName(task.process) def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" + if (meta.single_end) { + """ + yara_mapper \\ + $options.args \\ + -t $task.cpus \\ + -f bam \\ + ${index}/yara \\ + $reads | samtools view -@ $task.cpus -hb -F4 > ${prefix}.mapped.bam - if(meta.single_end) { - """ - yara_mapper $options.args -t ${task.cpus} -f bam ${index}/yara $reads | samtools view -@ ${task.cpus} -hb -F4 > ${prefix}.mapped.bam - - cat <<-END_VERSIONS > versions.yml - ${getProcessName(task.process)}: - ${getSoftwareName(task.process)}: \$(yara_mapper --help 2>&1) - END_VERSIONS - """ + cat <<-END_VERSIONS > versions.yml + ${getProcessName(task.process)}: + ${getSoftwareName(task.process)}: \$(echo \$(yara_mapper --version 2>&1) | sed 's/^.*yara_mapper version: //; s/ .*\$//') + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ } else { - """ - yara_mapper $options.args -t ${task.cpus} -f bam ${index}/yara ${reads[0]} ${reads[1]} > output.bam - samtools view -@ ${task.cpus} -hF 4 -f 0x40 -b output.bam > ${prefix}_1.mapped.bam - samtools view -@ ${task.cpus} -hF 4 -f 0x80 -b output.bam > ${prefix}_2.mapped.bam - cat <<-END_VERSIONS > versions.yml - ${getProcessName(task.process)}: - ${getSoftwareName(task.process)}: \$(yara_mapper --version 2>&1 | grep -e "yara_mapper version:" | sed 's/yara_mapper version: //g') - END_VERSIONS - """ - } + """ + yara_mapper \\ + $options.args \\ + -t ${task.cpus} \\ + -f bam \\ + ${index}/yara \\ + ${reads[0]} \\ + ${reads[1]} > output.bam + samtools view -@ $task.cpus -hF 4 -f 0x40 -b output.bam > ${prefix}_1.mapped.bam + samtools view -@ $task.cpus -hF 4 -f 0x80 -b output.bam > ${prefix}_2.mapped.bam + + cat <<-END_VERSIONS > versions.yml + ${getProcessName(task.process)}: + ${getSoftwareName(task.process)}: \$(echo \$(yara_mapper --version 2>&1) | sed 's/^.*yara_mapper version: //; s/ .*\$//') + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ + } } diff --git a/tests/modules/seacr/callpeak/main.nf b/tests/modules/seacr/callpeak/main.nf index 82fd6eb3..7e9cef8a 100644 --- a/tests/modules/seacr/callpeak/main.nf +++ b/tests/modules/seacr/callpeak/main.nf @@ -5,10 +5,11 @@ nextflow.enable.dsl = 2 include { SEACR_CALLPEAK } from '../../../../modules/seacr/callpeak/main.nf' addParams( options: [ args:'norm stringent' ] ) workflow test_seacr_callpeak { - input = [ [ id:'test_1'], - file("${launchDir}/tests/data/generic/bedgraph/K27me3_1_to_chr20.bedgraph", checkIfExists: true), - file("${launchDir}/tests/data/generic/bedgraph/IgG_1_to_chr20.bedgraph", checkIfExists: true) - ] + input = [ + [ id:'test_1'], + file("https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/bedgraph/K27me3_1_to_chr20.bedgraph", checkIfExists: true), + file("https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/bedgraph/IgG_1_to_chr20.bedgraph", checkIfExists: true) + ] SEACR_CALLPEAK ( input ) } diff --git a/tests/modules/seqkit/split2/test.yml b/tests/modules/seqkit/split2/test.yml index b3e0e020..13f3b003 100644 --- a/tests/modules/seqkit/split2/test.yml +++ b/tests/modules/seqkit/split2/test.yml @@ -4,9 +4,9 @@ - seqkit - seqkit/split2 files: - - path: output/seqkit/test.split/test_1.part_001.fastq.gz + - path: output/seqkit/test/test_1.part_001.fastq.gz md5sum: 6f7d58ba35c254c0817fe9a7c69862e4 - - path: output/seqkit/test.split/test_1.part_002.fastq.gz + - path: output/seqkit/test/test_1.part_002.fastq.gz md5sum: cf38c51506e45380fe25abdd1bd5ccc6 - name: seqkit split2 single-end size @@ -15,9 +15,9 @@ - seqkit - seqkit/split2 files: - - path: output/seqkit/test.split/test_1.part_001.fastq.gz + - path: output/seqkit/test/test_1.part_001.fastq.gz md5sum: bf835e685d597fc1ab5e5ac7dd689619 - - path: output/seqkit/test.split/test_1.part_002.fastq.gz + - path: output/seqkit/test/test_1.part_002.fastq.gz md5sum: 703d95ff4fbb5b7fb4da8a164ba9aa54 - name: seqkit split2 single-end part @@ -26,11 +26,11 @@ - seqkit - seqkit/split2 files: - - path: output/seqkit/test.split/test_1.part_001.fastq.gz + - path: output/seqkit/test/test_1.part_001.fastq.gz md5sum: fa25951435471238d5567fd2cae31f55 - - path: output/seqkit/test.split/test_1.part_002.fastq.gz + - path: output/seqkit/test/test_1.part_002.fastq.gz md5sum: 1dcf631aaaa5e7e0bd6c9668fbc6e04a - - path: output/seqkit/test.split/test_1.part_003.fastq.gz + - path: output/seqkit/test/test_1.part_003.fastq.gz md5sum: 8bc86ba83a611c54f592f4eae19b680f - name: seqkit split2 paired-end length @@ -39,13 +39,13 @@ - seqkit - seqkit/split2 files: - - path: output/seqkit/test.split/test_1.part_001.fastq.gz + - path: output/seqkit/test/test_1.part_001.fastq.gz md5sum: 6f7d58ba35c254c0817fe9a7c69862e4 - - path: output/seqkit/test.split/test_1.part_002.fastq.gz + - path: output/seqkit/test/test_1.part_002.fastq.gz md5sum: cf38c51506e45380fe25abdd1bd5ccc6 - - path: output/seqkit/test.split/test_2.part_001.fastq.gz + - path: output/seqkit/test/test_2.part_001.fastq.gz md5sum: 6b094b1ba7c439fe44c1bb5e99a02ba4 - - path: output/seqkit/test.split/test_2.part_002.fastq.gz + - path: output/seqkit/test/test_2.part_002.fastq.gz md5sum: 927097c6ac7522199a9e016333181a8e - name: seqkit split2 paired-end size @@ -54,13 +54,13 @@ - seqkit - seqkit/split2 files: - - path: output/seqkit/test.split/test_1.part_001.fastq.gz + - path: output/seqkit/test/test_1.part_001.fastq.gz md5sum: bf835e685d597fc1ab5e5ac7dd689619 - - path: output/seqkit/test.split/test_1.part_002.fastq.gz + - path: output/seqkit/test/test_1.part_002.fastq.gz md5sum: 703d95ff4fbb5b7fb4da8a164ba9aa54 - - path: output/seqkit/test.split/test_2.part_001.fastq.gz + - path: output/seqkit/test/test_2.part_001.fastq.gz md5sum: 09d0dd83b5b1b9b95d316eeed79ea5ba - - path: output/seqkit/test.split/test_2.part_002.fastq.gz + - path: output/seqkit/test/test_2.part_002.fastq.gz md5sum: 8796c3f327b1094244bfcdb36d536526 - name: seqkit split2 paired-end part @@ -69,15 +69,15 @@ - seqkit - seqkit/split2 files: - - path: output/seqkit/test.split/test_1.part_001.fastq.gz + - path: output/seqkit/test/test_1.part_001.fastq.gz md5sum: fa25951435471238d5567fd2cae31f55 - - path: output/seqkit/test.split/test_1.part_002.fastq.gz + - path: output/seqkit/test/test_1.part_002.fastq.gz md5sum: 1dcf631aaaa5e7e0bd6c9668fbc6e04a - - path: output/seqkit/test.split/test_1.part_003.fastq.gz + - path: output/seqkit/test/test_1.part_003.fastq.gz md5sum: 8bc86ba83a611c54f592f4eae19b680f - - path: output/seqkit/test.split/test_2.part_001.fastq.gz + - path: output/seqkit/test/test_2.part_001.fastq.gz md5sum: f0055c99cd193fd97466b3cde9dd1b8f - - path: output/seqkit/test.split/test_2.part_002.fastq.gz + - path: output/seqkit/test/test_2.part_002.fastq.gz md5sum: 8a90df768201785f7a7cd5dbb41e846a - - path: output/seqkit/test.split/test_2.part_003.fastq.gz + - path: output/seqkit/test/test_2.part_003.fastq.gz md5sum: 890b90083e8e1606bd13ba34149cedd7 diff --git a/tests/modules/sequenzautils/bam2seqz/test.yml b/tests/modules/sequenzautils/bam2seqz/test.yml index d8a21430..0b9cac53 100644 --- a/tests/modules/sequenzautils/bam2seqz/test.yml +++ b/tests/modules/sequenzautils/bam2seqz/test.yml @@ -4,5 +4,5 @@ - sequenzautils - sequenzautils/bam2seqz files: - - path: output/sequenzautils/test.seqz.gz + - path: output/sequenzautils/test.gz md5sum: 12b41979a498ac10c0aff162b12e6a6e diff --git a/tests/modules/ucsc/bigwigaverageoverbed/main.nf b/tests/modules/ucsc/bigwigaverageoverbed/main.nf index 88310a0b..9bd5a5e2 100644 --- a/tests/modules/ucsc/bigwigaverageoverbed/main.nf +++ b/tests/modules/ucsc/bigwigaverageoverbed/main.nf @@ -5,9 +5,10 @@ nextflow.enable.dsl = 2 include { UCSC_BIGWIGAVERAGEOVERBED } from '../../../../modules/ucsc/bigwigaverageoverbed/main.nf' addParams( options: [:] ) workflow test_ucsc_bigwigaverageoverbed { - input = [ [ id: 'test' ], // meta map - [ file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true ) ] - ] + input = [ + [ id: 'test' ], // meta map + [ file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true ) ] + ] bigwig = file(params.test_data['sarscov2']['illumina']['test_bigwig'], checkIfExists: true) UCSC_BIGWIGAVERAGEOVERBED ( input, bigwig ) diff --git a/tests/modules/yara/index/main.nf b/tests/modules/yara/index/main.nf index dcedc61b..35a86182 100644 --- a/tests/modules/yara/index/main.nf +++ b/tests/modules/yara/index/main.nf @@ -2,11 +2,11 @@ nextflow.enable.dsl = 2 -include { YARA_INDEX } from '../../../../modules/yara/index/main.nf' addParams( options: [:] ) +include { YARA_INDEX } from '../../../../modules/yara/index/main.nf' addParams( options: [publish_dir:'yara'] ) workflow test_yara_index { - def input = file("${launchDir}/tests/data/genomics/sarscov2/genome/genome.fasta", checkIfExists: true) + input = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) YARA_INDEX ( input ) } diff --git a/tests/modules/yara/index/test.yml b/tests/modules/yara/index/test.yml index 384aeee8..de6f1cf6 100644 --- a/tests/modules/yara/index/test.yml +++ b/tests/modules/yara/index/test.yml @@ -4,27 +4,27 @@ - yara/index - yara files: - - path: output/index/yara/yara.rid.limits + - path: output/yara/yara/yara.rid.limits md5sum: 8b814661f30a0c9e350bfbcb454930ce - - path: output/index/yara/yara.sa.len + - path: output/yara/yara/yara.sa.len md5sum: 45677f66c28c79c02250ceb8b58645e8 - - path: output/index/yara/yara.sa.ind + - path: output/yara/yara/yara.sa.ind md5sum: 464314583efb5f07260b0efecc29a1ce - - path: output/index/yara/yara.lf.drp + - path: output/yara/yara/yara.lf.drp md5sum: 3ef99a87a4e44513f46d42f4261f7842 - - path: output/index/yara/yara.txt.size + - path: output/yara/yara/yara.txt.size md5sum: 063987b3c3f747be7d2b8043c9d91000 - - path: output/index/yara/yara.rid.concat + - path: output/yara/yara/yara.rid.concat md5sum: 1e4e4c88ddeaf907a12f02f0d88367c5 - - path: output/index/yara/yara.txt.concat + - path: output/yara/yara/yara.txt.concat md5sum: 6074d1933c9e7e5ab05fa0def5ce28c0 - - path: output/index/yara/yara.lf.drs + - path: output/yara/yara/yara.lf.drs md5sum: 55a54008ad1ba589aa210d2629c1df41 - - path: output/index/yara/yara.txt.limits + - path: output/yara/yara/yara.txt.limits md5sum: 4480a068db603e4c9a27bc4fa9ceaf14 - - path: output/index/yara/yara.sa.val + - path: output/yara/yara/yara.sa.val md5sum: ce57cc82e2d3ae7b9824210f54168ce9 - - path: output/index/yara/yara.lf.pst + - path: output/yara/yara/yara.lf.pst md5sum: e8daba34298e99e42942435286f9b3f0 - - path: output/index/yara/yara.lf.drv + - path: output/yara/yara/yara.lf.drv md5sum: cf6408307fe9fd7f99c33f521bf95550