Skip to content

Commit

Permalink
Add stubs to every process to allow stub runs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmanuele committed May 9, 2022
1 parent 46d9706 commit 2a990d4
Show file tree
Hide file tree
Showing 21 changed files with 212 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Markdownlint configuration file
default: true
line-length: false
ul-indent:
indent: 4
no-duplicate-header:
siblings_only: true
no-inline-html:
allowed_elements:
- img
- p
- kbd
- details
- summary
10 changes: 10 additions & 0 deletions .nf-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
lint:
files_exist:
- assets/nf-core-ARETE_logo.png
- docs/images/nf-core-ARETE_logo.png
files_unchanged:
- assets/email_template.html
- assets/multiqc_config.yaml
nextflow_config:
- params.input
- manifest.name
8 changes: 8 additions & 0 deletions modules/local/blast_databases.nf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ process GET_VFDB{
"""
curl http://www.mgc.ac.cn/VFs/Down/VFDB_setB_pro.fas.gz --output VFDB_setB_pro.fas.gz
"""
stub:
"""
touch VFDB_setB_pro.fas.gz
"""
}

process GET_BACMET{
Expand All @@ -26,4 +30,8 @@ process GET_BACMET{
"""
curl http://bacmet.biomedicine.gu.se/download/BacMet2_predicted_database.fasta.gz --output BacMet2_predicted_database.fasta.gz
"""
stub:
"""
touch BacMet2_predicted_database.fasta.gz
"""
}
4 changes: 4 additions & 0 deletions modules/local/get_minikraken.nf
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@ process KRAKEN2_DB {
mkdir -p k2_standard_8gb_20201202
tar xvf k2_standard_8gb_20201202.tar.gz -C k2_standard_8gb_20201202
"""
stub:
"""
mkdir -p k2_standard_8gb_20201202
"""
}
6 changes: 6 additions & 0 deletions modules/local/mobsuite.nf
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ process MOB_RECON {
mob_recon --version > ${software}.version.txt
"""
//--database_directory $mob_db \\
stub:
def software = getSoftwareName(task.process)
"""
mkdir ${meta.id}_mob_recon
mob_recon --version > ${software}.version.txt
"""
}

// MOB_INIT also exists but seems to be unneeded.
7 changes: 7 additions & 0 deletions modules/local/rgi.nf
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,11 @@ process RGI {
echo \$(rgi main --version 2>&1) > ${software}.version.txt
"""
stub:
def software = getSoftwareName(task.process)
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
"""
touch ${prefix}_rgi.txt
echo \$(rgi main --version 2>&1) > ${software}.version.txt
"""
}
9 changes: 9 additions & 0 deletions modules/nf-core/modules/blast/blastn/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,13 @@ process BLAST_BLASTN {
${getSoftwareName(task.process)}: \$(blastn -version 2>&1 | sed 's/^.*blastn: //; s/ .*\$//')
END_VERSIONS
"""
stub:
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
"""
touch ${prefix}.blastn.txt
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(blastn -version 2>&1 | sed 's/^.*blastn: //; s/ .*\$//')
END_VERSIONS
"""
}
8 changes: 8 additions & 0 deletions modules/nf-core/modules/blast/makeblastdb/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,12 @@ process BLAST_MAKEBLASTDB {
${getSoftwareName(task.process)}: \$(blastn -version 2>&1 | sed 's/^.*blastn: //; s/ .*\$//')
END_VERSIONS
"""
stub:
"""
mkdir blast_db
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(blastn -version 2>&1 | sed 's/^.*blastn: //; s/ .*\$//')
END_VERSIONS
"""
}
10 changes: 10 additions & 0 deletions modules/nf-core/modules/checkm/lineagewf/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,14 @@ process CHECKM_LINEAGEWF {
checkm: \$( checkm 2>&1 | grep '...:::' | sed 's/.*CheckM v//;s/ .*//' )
END_VERSIONS
"""
stub:
prefix = task.ext.prefix ?: "${meta.id}"
"""
mkdir ${prefix}
touch ${prefix}.tsv
cat <<-END_VERSIONS > versions.yml
"${task.process}":
checkm: \$( checkm 2>&1 | grep '...:::' | sed 's/.*CheckM v//;s/ .*//' )
END_VERSIONS
"""
}
9 changes: 9 additions & 0 deletions modules/nf-core/modules/diamond/blastx/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,13 @@ process DIAMOND_BLASTX {
${getSoftwareName(task.process)}: \$(diamond --version 2>&1 | tail -n 1 | sed 's/^diamond version //')
END_VERSIONS
"""
stub:
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
"""
touch ${prefix}_${label}.txt
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(diamond --version 2>&1 | tail -n 1 | sed 's/^diamond version //')
END_VERSIONS
"""
}
9 changes: 9 additions & 0 deletions modules/nf-core/modules/diamond/makedb/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,13 @@ process DIAMOND_MAKEDB {
${getSoftwareName(task.process)}: \$(diamond --version 2>&1 | tail -n 1 | sed 's/^diamond version //')
END_VERSIONS
"""

stub:
"""
touch ${fasta}.dmnd
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(diamond --version 2>&1 | tail -n 1 | sed 's/^diamond version //')
END_VERSIONS
"""
}
12 changes: 12 additions & 0 deletions modules/nf-core/modules/fastp/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,16 @@ process FASTP {
END_VERSIONS
"""
}
stub:
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
"""
touch ${prefix}.trim.fastq.gz
touch ${prefix}.trim.fastp.html
touch ${prefix}.trim.fastp.json
touch ${prefix}.trim.fastp.log
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(fastp --version 2>&1 | sed -e "s/fastp //g")
END_VERSIONS
"""
}
9 changes: 9 additions & 0 deletions modules/nf-core/modules/fastqc/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,13 @@ process FASTQC {
fastqc --version | sed -e "s/FastQC v//g" > ${software}.version.txt
"""
}

stub:
def software = getSoftwareName(task.process)
def prefix = "${meta.id}.${run_name}"
"""
touch ${prefix}.fastqcstub.html
touch ${prefix}.fastqcstub.zip
fastqc --version | sed -e "s/FastQC v//g" > ${software}.version.txt
"""
}
9 changes: 9 additions & 0 deletions modules/nf-core/modules/iqtree/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,13 @@ process IQTREE {
${getSoftwareName(task.process)}: \$(echo \$(iqtree -version 2>&1) | sed 's/^IQ-TREE multicore version //;s/ .*//')
END_VERSIONS
"""

stub:
"""
touch faketree.treefile
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(echo \$(iqtree -version 2>&1) | sed 's/^IQ-TREE multicore version //;s/ .*//')
END_VERSIONS
"""
}
13 changes: 13 additions & 0 deletions modules/nf-core/modules/kraken2/kraken2/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,17 @@ process KRAKEN2_KRAKEN2 {
pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' )
END_VERSIONS
"""

stub:
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
"""
touch ${prefix}.classified.fastq.gz
touch ${prefix}.unclassified.fastq.gz
touch ${prefix}.kraken2.report.txt
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
"""
}
9 changes: 9 additions & 0 deletions modules/nf-core/modules/multiqc/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,13 @@ process MULTIQC {
multiqc -f $options.args .
multiqc --version | sed -e "s/multiqc, version //g" > ${software}.version.txt
"""

stub:
def software = getSoftwareName(task.process)
"""
touch stub_multiqc_report.html
mkdir multiqc_stub_data
mkdir multiqc_stub_reports
multiqc --version | sed -e "s/multiqc, version //g" > ${software}.version.txt
"""
}
22 changes: 22 additions & 0 deletions modules/nf-core/modules/prokka/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,26 @@ process PROKKA {
${getSoftwareName(task.process)}: \$(echo \$(prokka --version 2>&1) | sed 's/^.*prokka //')
END_VERSIONS
"""

stub:
prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
"""
mkdir ${prefix}
touch ${prefix}/${prefix}_stub.err
touch ${prefix}/${prefix}_stub.ffn
touch ${prefix}/${prefix}_stub.faa
touch ${prefix}/${prefix}_stub.gbk
touch ${prefix}/${prefix}_stub.fna
touch ${prefix}/${prefix}_stub.fsa
touch ${prefix}/${prefix}_stub.gff
touch ${prefix}/${prefix}_stub.log
touch ${prefix}/${prefix}_stub.sqn
touch ${prefix}/${prefix}_stub.tbl
touch ${prefix}/${prefix}_stub.tsv
touch ${prefix}/${prefix}_stub.txt
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(echo \$(prokka --version 2>&1) | sed 's/^.*prokka //')
END_VERSIONS
"""
}
12 changes: 12 additions & 0 deletions modules/nf-core/modules/quast/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,16 @@ process QUAST {
${getSoftwareName(task.process)}: \$(quast.py --version 2>&1 | sed 's/^.*QUAST v//; s/ .*\$//')
END_VERSIONS
"""

stub:
def software = getSoftwareName(task.process)
prefix = options.suffix ?: software
"""
mkdir ${prefix}
touch ${prefix}_quast_stub.tsv
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(quast.py --version 2>&1 | sed 's/^.*QUAST v//; s/ .*\$//')
END_VERSIONS
"""
}
10 changes: 10 additions & 0 deletions modules/nf-core/modules/roary/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,14 @@ process ROARY {
${getSoftwareName(task.process)}: \$( roary --version )
END_VERSIONS
"""

stub:
"""
mkdir results
touch results/roary_stub.aln
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$( roary --version )
END_VERSIONS
"""
}
10 changes: 10 additions & 0 deletions modules/nf-core/modules/snpsites/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,14 @@ process SNPSITES {
${getSoftwareName(task.process)}: \$(snp-sites -V 2>&1 | sed 's/snp-sites //')
END_VERSIONS
"""
stub:
"""
touch snpsites_stub.fas
echo acgt > snpsites_stub.sites.txt
CONSTANT_SITES=\$(cat snpsites_stub.sites.txt)
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(snp-sites -V 2>&1 | sed 's/snp-sites //')
END_VERSIONS
"""
}
12 changes: 12 additions & 0 deletions modules/nf-core/modules/unicycler/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,16 @@ process UNICYCLER {
${getSoftwareName(task.process)}: \$(echo \$(unicycler --version 2>&1) | sed 's/^.*Unicycler v//; s/ .*\$//')
END_VERSIONS
"""
stub:

def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
"""
touch ${prefix}_stub.scaffolds.fa
touch ${prefix}_stub.assembly.gfa
touch ${prefix}_stub.unicylcer.log
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(echo \$(unicycler --version 2>&1) | sed 's/^.*Unicycler v//; s/ .*\$//')
END_VERSIONS
"""
}

0 comments on commit 2a990d4

Please sign in to comment.