Fix version commands: round 3 (#754)

* Fix version commands: round 3

* Fix seqkit/split2 modules
This commit is contained in:
Harshil Patel 2021-09-28 14:37:47 +01:00 committed by GitHub
parent e971f538a9
commit 9c31cf1566
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 184 additions and 129 deletions

View file

@ -57,6 +57,8 @@ process BBMAP_ALIGN {
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(bbversion.sh) ${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 END_VERSIONS
""" """
} }

View file

@ -58,6 +58,7 @@ process BOWTIE_ALIGN {
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(echo \$(bowtie --version 2>&1) | sed 's/^.*bowtie-align-s version //; s/ .*\$//') ${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 END_VERSIONS
""" """
} }

View file

@ -48,6 +48,8 @@ process BOWTIE2_ALIGN {
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(echo \$(bowtie2 --version 2>&1) | sed 's/^.*bowtie2-align-s version //; s/ .*\$//') ${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 END_VERSIONS
""" """
} else { } else {
@ -70,9 +72,12 @@ process BOWTIE2_ALIGN {
if [ -f ${prefix}.unmapped.fastq.2.gz ]; then if [ -f ${prefix}.unmapped.fastq.2.gz ]; then
mv ${prefix}.unmapped.fastq.2.gz ${prefix}.unmapped_2.fastq.gz mv ${prefix}.unmapped.fastq.2.gz ${prefix}.unmapped_2.fastq.gz
fi fi
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(echo \$(bowtie2 --version 2>&1) | sed 's/^.*bowtie2-align-s version //; s/ .*\$//') ${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 END_VERSIONS
""" """
} }

View file

@ -45,6 +45,7 @@ process BWA_MEM {
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//') ${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 END_VERSIONS
""" """
} }

View file

@ -44,6 +44,7 @@ process BWA_SAMPE {
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//') ${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 END_VERSIONS
""" """
} }

View file

@ -44,6 +44,7 @@ process BWA_SAMSE {
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//') ${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 END_VERSIONS
""" """
} }

View file

@ -46,6 +46,7 @@ process BWAMEM2_MEM {
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(echo \$(bwa-mem2 version 2>&1) | sed 's/.* //') ${getSoftwareName(task.process)}: \$(echo \$(bwa-mem2 version 2>&1) | sed 's/.* //')
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
END_VERSIONS END_VERSIONS
""" """
} }

View file

@ -24,14 +24,16 @@ process CHROMAP_INDEX {
path fasta path fasta
output: output:
path "*.index" , emit: index path "*.index" , emit: index
path "versions.yml" , emit: version path "versions.yml", emit: version
script: script:
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)
def prefix = fasta.baseName def prefix = fasta.baseName
""" """
chromap -i $options.args \\ chromap \\
-i \\
$options.args \\
-t $task.cpus \\ -t $task.cpus \\
-r $fasta \\ -r $fasta \\
-o ${prefix}.index -o ${prefix}.index
@ -39,6 +41,7 @@ process CHROMAP_INDEX {
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(echo "$VERSION") ${getSoftwareName(task.process)}: \$(echo "$VERSION")
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
END_VERSIONS END_VERSIONS
""" """
} }

View file

@ -62,6 +62,7 @@ process HISAT2_ALIGN {
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(echo $VERSION) ${getSoftwareName(task.process)}: \$(echo $VERSION)
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
END_VERSIONS END_VERSIONS
""" """
} else { } else {
@ -93,6 +94,7 @@ process HISAT2_ALIGN {
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(echo $VERSION) ${getSoftwareName(task.process)}: \$(echo $VERSION)
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
END_VERSIONS END_VERSIONS
""" """
} }

View file

@ -51,6 +51,7 @@ process KRAKEN2_KRAKEN2 {
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(echo \$(kraken2 --version 2>&1) | sed 's/^.*Kraken version //; s/ .*\$//') ${getSoftwareName(task.process)}: \$(echo \$(kraken2 --version 2>&1) | sed 's/^.*Kraken version //; s/ .*\$//')
pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' )
END_VERSIONS END_VERSIONS
""" """
} }

View file

@ -4,6 +4,8 @@ include { initOptions; saveFiles; getSoftwareName; getProcessName } from './func
params.options = [:] params.options = [:]
options = initOptions(params.options) options = initOptions(params.options)
def VERSION = '2.3.2' // No version information printed
process RAPIDNJ { process RAPIDNJ {
label 'process_medium' label 'process_medium'
publishDir "${params.outdir}", publishDir "${params.outdir}",
@ -21,9 +23,9 @@ process RAPIDNJ {
path alignment path alignment
output: output:
path "*.sth" , emit: stockholm_alignment path "*.sth" , emit: stockholm_alignment
path "*.tre" , emit: phylogeny path "*.tre" , emit: phylogeny
path "versions.yml" , emit: version path "versions.yml", emit: version
script: script:
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)
@ -38,10 +40,10 @@ process RAPIDNJ {
-c $task.cpus \\ -c $task.cpus \\
-x rapidnj_phylogeny.tre -x rapidnj_phylogeny.tre
# Doesn't appear to be a way of getting the version number
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${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 END_VERSIONS
""" """
} }

View file

@ -34,8 +34,8 @@ process RSEM_CALCULATEEXPRESSION {
tuple val(meta), path("${prefix}.transcript.bam"), optional:true, emit: bam_transcript tuple val(meta), path("${prefix}.transcript.bam"), optional:true, emit: bam_transcript
script: script:
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)
prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
def strandedness = '' def strandedness = ''
if (meta.strandedness == 'forward') { if (meta.strandedness == 'forward') {
@ -59,6 +59,7 @@ process RSEM_CALCULATEEXPRESSION {
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(rsem-calculate-expression --version | sed -e "s/Current version: RSEM v//g") ${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 END_VERSIONS
""" """
} }

View file

@ -53,6 +53,7 @@ process RSEM_PREPAREREFERENCE {
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(rsem-calculate-expression --version | sed -e "s/Current version: RSEM v//g") ${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 END_VERSIONS
""" """
} else { } else {
@ -67,6 +68,7 @@ process RSEM_PREPAREREFERENCE {
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(rsem-calculate-expression --version | sed -e "s/Current version: RSEM v//g") ${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 END_VERSIONS
""" """
} }

View file

@ -22,8 +22,8 @@ process SAMTOOLS_FAIDX {
path fasta path fasta
output: output:
path "*.fai" , emit: fai path "*.fai" , emit: fai
path "versions.yml" , emit: version path "versions.yml", emit: version
script: script:
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)

View file

@ -40,6 +40,8 @@ process SEACR_CALLPEAK {
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(echo $VERSION) ${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 END_VERSIONS
""" """
} }

View file

@ -7,13 +7,11 @@ options = initOptions(params.options)
process SEQKIT_SPLIT2 { process SEQKIT_SPLIT2 {
tag "$meta.id" tag "$meta.id"
label 'process_medium' label 'process_medium'
publishDir "${params.outdir}", publishDir "${params.outdir}",
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } 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) conda (params.enable_conda ? 'bioconda::seqkit=0.16.1' : null)
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/seqkit:0.16.1--h9ee0642_0" container "https://depot.galaxyproject.org/singularity/seqkit:0.16.1--h9ee0642_0"
} else { } else {
@ -24,42 +22,40 @@ process SEQKIT_SPLIT2 {
tuple val(meta), path(reads) tuple val(meta), path(reads)
output: output:
tuple val(meta), path("*.split/*.gz"), emit: reads tuple val(meta), path("*${prefix}/*.gz"), emit: reads
path("versions.yml") , emit: version path "versions.yml" , emit: version
script: script:
def software = getSoftwareName(task.process) 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){ if(meta.single_end){
""" """
seqkit \ seqkit \\
split2 \ split2 \\
$options.args \ $options.args \\
--threads $task.cpus \ --threads $task.cpus \\
-1 ${reads} \ -1 $reads \\
--out-dir ${prefix}.split --out-dir $prefix
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(seqkit --version 2>&1 | sed 's/^.*seqkit //; s/Using.*\$//') ${getSoftwareName(task.process)}: \$(echo \$(seqkit 2>&1) | sed 's/^.*Version: //; s/ .*\$//')
END_VERSIONS END_VERSIONS
""" """
} else { } else {
""" """
seqkit \ seqkit \\
split2 \ split2 \\
$options.args \ $options.args \\
--threads $task.cpus \ --threads $task.cpus \\
-1 ${reads[0]} \ -1 ${reads[0]} \\
-2 ${reads[1]} \ -2 ${reads[1]} \\
--out-dir ${prefix}.split --out-dir $prefix
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(seqkit --version 2>&1 | sed 's/^.*seqkit //; s/Using.*\$//') ${getSoftwareName(task.process)}: \$(echo \$(seqkit 2>&1) | sed 's/^.*Version: //; s/ .*\$//')
END_VERSIONS END_VERSIONS
""" """
} }
} }

View file

@ -40,7 +40,7 @@ process SEQTK_SAMPLE {
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${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 END_VERSIONS
""" """
} else { } else {
@ -64,7 +64,7 @@ process SEQTK_SAMPLE {
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${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 END_VERSIONS
""" """
} }

View file

@ -43,7 +43,7 @@ process SEQTK_SUBSEQ {
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${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 END_VERSIONS
""" """
} }

View file

@ -24,8 +24,8 @@ process SEQUENZAUTILS_BAM2SEQZ {
path wigfile path wigfile
output: output:
tuple val(meta), path("*.seqz.gz"), emit: seqz tuple val(meta), path("*.gz"), emit: seqz
path "versions.yml" , emit: version path "versions.yml" , emit: version
script: script:
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)
@ -38,11 +38,11 @@ process SEQUENZAUTILS_BAM2SEQZ {
-t $tumourbam \\ -t $tumourbam \\
--fasta $fasta \\ --fasta $fasta \\
-gc $wigfile \\ -gc $wigfile \\
-o ${prefix}.seqz.gz -o ${prefix}.gz
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${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 END_VERSIONS
""" """
} }

View file

@ -23,7 +23,7 @@ process SEQUENZAUTILS_GCWIGGLE {
output: output:
tuple val(meta), path("*.wig.gz"), emit: wig tuple val(meta), path("*.wig.gz"), emit: wig
path "versions.yml" , emit: version path "versions.yml" , emit: version
script: script:
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)
@ -37,7 +37,7 @@ process SEQUENZAUTILS_GCWIGGLE {
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${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 END_VERSIONS
""" """
} }

View file

@ -44,7 +44,7 @@ process SHOVILL {
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${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 END_VERSIONS
""" """
} }

View file

@ -46,6 +46,8 @@ process STAR_GENOMEGENERATE {
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(STAR --version | sed -e "s/STAR_//g") ${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 END_VERSIONS
""" """
} else { } else {
@ -67,6 +69,8 @@ process STAR_GENOMEGENERATE {
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(STAR --version | sed -e "s/STAR_//g") ${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 END_VERSIONS
""" """
} }

View file

@ -35,14 +35,15 @@ process TIDDIT_SV {
def reference = fasta == "dummy_file.txt" ? "--ref $fasta" : "" def reference = fasta == "dummy_file.txt" ? "--ref $fasta" : ""
""" """
tiddit \\ tiddit \\
--sv $options.args \\ --sv \\
$options.args \\
--bam $bam \\ --bam $bam \\
$reference \\ $reference \\
-o $prefix -o $prefix
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${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 END_VERSIONS
""" """
} }

View file

@ -32,7 +32,11 @@ process UCSC_BEDGRAPHTOBIGWIG {
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" 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 cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(echo $VERSION) ${getSoftwareName(task.process)}: \$(echo $VERSION)

View file

@ -4,6 +4,8 @@ include { initOptions; saveFiles; getSoftwareName; getProcessName } from './func
params.options = [:] params.options = [:]
options = initOptions(params.options) options = initOptions(params.options)
def VERSION = '377'
process UCSC_BIGWIGAVERAGEOVERBED { process UCSC_BIGWIGAVERAGEOVERBED {
tag "$meta.id" tag "$meta.id"
label 'process_medium' label 'process_medium'
@ -23,19 +25,23 @@ process UCSC_BIGWIGAVERAGEOVERBED {
path bigwig path bigwig
output: output:
tuple val(meta), path("*.tab") , emit: tab tuple val(meta), path("*.tab"), emit: tab
path "versions.yml" , emit: version path "versions.yml" , emit: version
script: script:
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
""" """
# there is a bug that bigWigAverageOverBed can not handle ensembl seqlevels style. # 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 cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(bigWigAverageOverBed 2>&1 | sed 's/bigWigAverageOverBed v//; s/ - Compute.*\$//') ${getSoftwareName(task.process)}: \$(echo $VERSION)
END_VERSIONS END_VERSIONS
""" """
} }

View file

@ -44,7 +44,7 @@ process UNICYCLER {
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${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 END_VERSIONS
""" """
} }

View file

@ -22,21 +22,25 @@ process YARA_INDEX {
path fasta path fasta
output: output:
path "yara", emit: index path "yara" , emit: index
path "versions.yml" , emit: version path "versions.yml", emit: version
script: script:
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)
""" """
mkdir yara mkdir yara
yara_indexer $fasta -o "yara"
yara_indexer \\
$fasta \\
-o "yara"
mv *.{lf,rid,sa,txt}.* yara mv *.{lf,rid,sa,txt}.* yara
cp $fasta yara/yara.fasta cp $fasta yara/yara.fasta
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${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 END_VERSIONS
""" """
} }

View file

@ -24,31 +24,44 @@ process YARA_MAPPER {
output: output:
tuple val(meta), path("*.mapped.bam"), emit: bam tuple val(meta), path("*.mapped.bam"), emit: bam
path "versions.yml" , emit: version path "versions.yml" , emit: version
script: script:
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" 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) { cat <<-END_VERSIONS > versions.yml
""" ${getProcessName(task.process)}:
yara_mapper $options.args -t ${task.cpus} -f bam ${index}/yara $reads | samtools view -@ ${task.cpus} -hb -F4 > ${prefix}.mapped.bam ${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.*\$//')
cat <<-END_VERSIONS > versions.yml END_VERSIONS
${getProcessName(task.process)}: """
${getSoftwareName(task.process)}: \$(yara_mapper --help 2>&1)
END_VERSIONS
"""
} else { } else {
""" """
yara_mapper $options.args -t ${task.cpus} -f bam ${index}/yara ${reads[0]} ${reads[1]} > output.bam yara_mapper \\
samtools view -@ ${task.cpus} -hF 4 -f 0x40 -b output.bam > ${prefix}_1.mapped.bam $options.args \\
samtools view -@ ${task.cpus} -hF 4 -f 0x80 -b output.bam > ${prefix}_2.mapped.bam -t ${task.cpus} \\
cat <<-END_VERSIONS > versions.yml -f bam \\
${getProcessName(task.process)}: ${index}/yara \\
${getSoftwareName(task.process)}: \$(yara_mapper --version 2>&1 | grep -e "yara_mapper version:" | sed 's/yara_mapper version: //g') ${reads[0]} \\
END_VERSIONS ${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
"""
}
} }

View file

@ -5,10 +5,11 @@ nextflow.enable.dsl = 2
include { SEACR_CALLPEAK } from '../../../../modules/seacr/callpeak/main.nf' addParams( options: [ args:'norm stringent' ] ) include { SEACR_CALLPEAK } from '../../../../modules/seacr/callpeak/main.nf' addParams( options: [ args:'norm stringent' ] )
workflow test_seacr_callpeak { workflow test_seacr_callpeak {
input = [ [ id:'test_1'], input = [
file("${launchDir}/tests/data/generic/bedgraph/K27me3_1_to_chr20.bedgraph", checkIfExists: true), [ id:'test_1'],
file("${launchDir}/tests/data/generic/bedgraph/IgG_1_to_chr20.bedgraph", checkIfExists: true) 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 ) SEACR_CALLPEAK ( input )
} }

View file

@ -4,9 +4,9 @@
- seqkit - seqkit
- seqkit/split2 - seqkit/split2
files: files:
- path: output/seqkit/test.split/test_1.part_001.fastq.gz - path: output/seqkit/test/test_1.part_001.fastq.gz
md5sum: 6f7d58ba35c254c0817fe9a7c69862e4 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 md5sum: cf38c51506e45380fe25abdd1bd5ccc6
- name: seqkit split2 single-end size - name: seqkit split2 single-end size
@ -15,9 +15,9 @@
- seqkit - seqkit
- seqkit/split2 - seqkit/split2
files: files:
- path: output/seqkit/test.split/test_1.part_001.fastq.gz - path: output/seqkit/test/test_1.part_001.fastq.gz
md5sum: bf835e685d597fc1ab5e5ac7dd689619 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 md5sum: 703d95ff4fbb5b7fb4da8a164ba9aa54
- name: seqkit split2 single-end part - name: seqkit split2 single-end part
@ -26,11 +26,11 @@
- seqkit - seqkit
- seqkit/split2 - seqkit/split2
files: files:
- path: output/seqkit/test.split/test_1.part_001.fastq.gz - path: output/seqkit/test/test_1.part_001.fastq.gz
md5sum: fa25951435471238d5567fd2cae31f55 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 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 md5sum: 8bc86ba83a611c54f592f4eae19b680f
- name: seqkit split2 paired-end length - name: seqkit split2 paired-end length
@ -39,13 +39,13 @@
- seqkit - seqkit
- seqkit/split2 - seqkit/split2
files: files:
- path: output/seqkit/test.split/test_1.part_001.fastq.gz - path: output/seqkit/test/test_1.part_001.fastq.gz
md5sum: 6f7d58ba35c254c0817fe9a7c69862e4 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 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 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 md5sum: 927097c6ac7522199a9e016333181a8e
- name: seqkit split2 paired-end size - name: seqkit split2 paired-end size
@ -54,13 +54,13 @@
- seqkit - seqkit
- seqkit/split2 - seqkit/split2
files: files:
- path: output/seqkit/test.split/test_1.part_001.fastq.gz - path: output/seqkit/test/test_1.part_001.fastq.gz
md5sum: bf835e685d597fc1ab5e5ac7dd689619 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 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 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 md5sum: 8796c3f327b1094244bfcdb36d536526
- name: seqkit split2 paired-end part - name: seqkit split2 paired-end part
@ -69,15 +69,15 @@
- seqkit - seqkit
- seqkit/split2 - seqkit/split2
files: files:
- path: output/seqkit/test.split/test_1.part_001.fastq.gz - path: output/seqkit/test/test_1.part_001.fastq.gz
md5sum: fa25951435471238d5567fd2cae31f55 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 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 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 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 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 md5sum: 890b90083e8e1606bd13ba34149cedd7

View file

@ -4,5 +4,5 @@
- sequenzautils - sequenzautils
- sequenzautils/bam2seqz - sequenzautils/bam2seqz
files: files:
- path: output/sequenzautils/test.seqz.gz - path: output/sequenzautils/test.gz
md5sum: 12b41979a498ac10c0aff162b12e6a6e md5sum: 12b41979a498ac10c0aff162b12e6a6e

View file

@ -5,9 +5,10 @@ nextflow.enable.dsl = 2
include { UCSC_BIGWIGAVERAGEOVERBED } from '../../../../modules/ucsc/bigwigaverageoverbed/main.nf' addParams( options: [:] ) include { UCSC_BIGWIGAVERAGEOVERBED } from '../../../../modules/ucsc/bigwigaverageoverbed/main.nf' addParams( options: [:] )
workflow test_ucsc_bigwigaverageoverbed { workflow test_ucsc_bigwigaverageoverbed {
input = [ [ id: 'test' ], // meta map input = [
[ file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true ) ] [ 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) bigwig = file(params.test_data['sarscov2']['illumina']['test_bigwig'], checkIfExists: true)
UCSC_BIGWIGAVERAGEOVERBED ( input, bigwig ) UCSC_BIGWIGAVERAGEOVERBED ( input, bigwig )

View file

@ -2,11 +2,11 @@
nextflow.enable.dsl = 2 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 { 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 ) YARA_INDEX ( input )
} }

View file

@ -4,27 +4,27 @@
- yara/index - yara/index
- yara - yara
files: files:
- path: output/index/yara/yara.rid.limits - path: output/yara/yara/yara.rid.limits
md5sum: 8b814661f30a0c9e350bfbcb454930ce md5sum: 8b814661f30a0c9e350bfbcb454930ce
- path: output/index/yara/yara.sa.len - path: output/yara/yara/yara.sa.len
md5sum: 45677f66c28c79c02250ceb8b58645e8 md5sum: 45677f66c28c79c02250ceb8b58645e8
- path: output/index/yara/yara.sa.ind - path: output/yara/yara/yara.sa.ind
md5sum: 464314583efb5f07260b0efecc29a1ce md5sum: 464314583efb5f07260b0efecc29a1ce
- path: output/index/yara/yara.lf.drp - path: output/yara/yara/yara.lf.drp
md5sum: 3ef99a87a4e44513f46d42f4261f7842 md5sum: 3ef99a87a4e44513f46d42f4261f7842
- path: output/index/yara/yara.txt.size - path: output/yara/yara/yara.txt.size
md5sum: 063987b3c3f747be7d2b8043c9d91000 md5sum: 063987b3c3f747be7d2b8043c9d91000
- path: output/index/yara/yara.rid.concat - path: output/yara/yara/yara.rid.concat
md5sum: 1e4e4c88ddeaf907a12f02f0d88367c5 md5sum: 1e4e4c88ddeaf907a12f02f0d88367c5
- path: output/index/yara/yara.txt.concat - path: output/yara/yara/yara.txt.concat
md5sum: 6074d1933c9e7e5ab05fa0def5ce28c0 md5sum: 6074d1933c9e7e5ab05fa0def5ce28c0
- path: output/index/yara/yara.lf.drs - path: output/yara/yara/yara.lf.drs
md5sum: 55a54008ad1ba589aa210d2629c1df41 md5sum: 55a54008ad1ba589aa210d2629c1df41
- path: output/index/yara/yara.txt.limits - path: output/yara/yara/yara.txt.limits
md5sum: 4480a068db603e4c9a27bc4fa9ceaf14 md5sum: 4480a068db603e4c9a27bc4fa9ceaf14
- path: output/index/yara/yara.sa.val - path: output/yara/yara/yara.sa.val
md5sum: ce57cc82e2d3ae7b9824210f54168ce9 md5sum: ce57cc82e2d3ae7b9824210f54168ce9
- path: output/index/yara/yara.lf.pst - path: output/yara/yara/yara.lf.pst
md5sum: e8daba34298e99e42942435286f9b3f0 md5sum: e8daba34298e99e42942435286f9b3f0
- path: output/index/yara/yara.lf.drv - path: output/yara/yara/yara.lf.drv
md5sum: cf6408307fe9fd7f99c33f521bf95550 md5sum: cf6408307fe9fd7f99c33f521bf95550