Skip to content

Commit

Permalink
Merge remote-tracking branch 'nfcore/master' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
muffato committed Sep 26, 2022
2 parents b3667a8 + f0a86ea commit e74070b
Show file tree
Hide file tree
Showing 43 changed files with 558 additions and 60 deletions.
4 changes: 2 additions & 2 deletions modules/blast/tblastn/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ process BLAST_TBLASTN {
path db

output:
tuple val(meta), path('*.tblastn.txt'), emit: txt
path "versions.yml" , emit: versions
tuple val(meta), path('*.tblastn.txt') , emit: txt
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when
Expand Down
1 change: 1 addition & 0 deletions modules/blast/tblastn/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ output:
pattern: "versions.yml"
authors:
- "@yumisims"
- "@gq2"
6 changes: 3 additions & 3 deletions modules/dshbio/exportsegments/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ process DSHBIO_EXPORTSEGMENTS {
tag "${meta.id}"
label 'process_medium'

conda (params.enable_conda ? "bioconda::dsh-bio=2.0.8" : null)
conda (params.enable_conda ? "bioconda::dsh-bio=2.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.8--hdfd78af_0' :
'quay.io/biocontainers/dsh-bio:2.0.8--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/dsh-bio:2.1--hdfd78af_0' :
'quay.io/biocontainers/dsh-bio:2.1--hdfd78af_0' }"

input:
tuple val(meta), path(gfa)
Expand Down
6 changes: 3 additions & 3 deletions modules/dshbio/filterbed/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ process DSHBIO_FILTERBED {
tag "${meta.id}"
label 'process_medium'

conda (params.enable_conda ? "bioconda::dsh-bio=2.0.8" : null)
conda (params.enable_conda ? "bioconda::dsh-bio=2.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.8--hdfd78af_0' :
'quay.io/biocontainers/dsh-bio:2.0.8--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/dsh-bio:2.1--hdfd78af_0' :
'quay.io/biocontainers/dsh-bio:2.1--hdfd78af_0' }"

input:
tuple val(meta), path(bed)
Expand Down
6 changes: 3 additions & 3 deletions modules/dshbio/filtergff3/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ process DSHBIO_FILTERGFF3 {
tag "${meta.id}"
label 'process_medium'

conda (params.enable_conda ? "bioconda::dsh-bio=2.0.8" : null)
conda (params.enable_conda ? "bioconda::dsh-bio=2.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.8--hdfd78af_0' :
'quay.io/biocontainers/dsh-bio:2.0.8--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/dsh-bio:2.1--hdfd78af_0' :
'quay.io/biocontainers/dsh-bio:2.1--hdfd78af_0' }"

input:
tuple val(meta), path(gff3)
Expand Down
6 changes: 3 additions & 3 deletions modules/dshbio/splitbed/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ process DSHBIO_SPLITBED {
tag "${meta.id}"
label 'process_medium'

conda (params.enable_conda ? "bioconda::dsh-bio=2.0.8" : null)
conda (params.enable_conda ? "bioconda::dsh-bio=2.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.8--hdfd78af_0' :
'quay.io/biocontainers/dsh-bio:2.0.8--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/dsh-bio:2.1--hdfd78af_0' :
'quay.io/biocontainers/dsh-bio:2.1--hdfd78af_0' }"

input:
tuple val(meta), path(bed)
Expand Down
6 changes: 3 additions & 3 deletions modules/dshbio/splitgff3/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ process DSHBIO_SPLITGFF3 {
tag "${meta.id}"
label 'process_medium'

conda (params.enable_conda ? "bioconda::dsh-bio=2.0.8" : null)
conda (params.enable_conda ? "bioconda::dsh-bio=2.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.8--hdfd78af_0' :
'quay.io/biocontainers/dsh-bio:2.0.8--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/dsh-bio:2.1--hdfd78af_0' :
'quay.io/biocontainers/dsh-bio:2.1--hdfd78af_0' }"

input:
tuple val(meta), path(gff3)
Expand Down
2 changes: 1 addition & 1 deletion modules/genmap/mappability/main.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
process GENMAP_MAPPABILITY {
tag '$fasta'
tag '$index'
label 'process_high'

conda (params.enable_conda ? "bioconda::genmap=1.3.0" : null)
Expand Down
33 changes: 33 additions & 0 deletions modules/genotyphi/parse/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
process GENOTYPHI_PARSE {
tag "$meta.id"
label 'process_low'

conda (params.enable_conda ? "bioconda::genotyphi=1.9.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/genotyphi:1.9.1--hdfd78af_1':
'quay.io/biocontainers/genotyphi:1.9.1--hdfd78af_1' }"

input:
tuple val(meta), path(json)

output:
tuple val(meta), path("*.tsv"), emit: tsv
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
parse_typhi_mykrobe.py \\
--jsons $json \\
--prefix ${prefix}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
genotyphi: \$(echo \$(genotyphi --version 2>&1) | sed 's/^.*GenoTyphi v//;' )
END_VERSIONS
"""
}
42 changes: 42 additions & 0 deletions modules/genotyphi/parse/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "genotyphi_parse"
description: Genotype Salmonella Typhi from Mykrobe results
keywords:
- genotype
- Salmonella Typhi
tools:
- "genotyphi":
description: "Assign genotypes to Salmonella Typhi genomes based on VCF files (mapped to Typhi CT18 reference genome)"
homepage: "https://github.com/katholt/genotyphi"
documentation: "https://github.com/katholt/genotyphi"
tool_dev_url: "https://github.com/katholt/genotyphi"
doi: "https://github.com/katholt/genotyphi"
licence: "['GPL v3']"

input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- json:
type: file
description: JSON formatted file of Mykrobe results
pattern: "*.json"

output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
- tsv:
type: file
description: A tab-delimited file of predicted genotypes
pattern: "*.tsv"

authors:
- "@rpetit3"
1 change: 1 addition & 0 deletions modules/mlst/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ process MLST {
def prefix = task.ext.prefix ?: "${meta.id}"
"""
mlst \\
$args \\
--threads $task.cpus \\
$fasta \\
> ${prefix}.tsv
Expand Down
41 changes: 41 additions & 0 deletions modules/mykrobe/predict/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
process MYKROBE_PREDICT {
tag "$meta.id"
label 'process_low'

conda (params.enable_conda ? "bioconda::mykrobe=0.11.0" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mykrobe:0.11.0--py39h2add14b_1':
'quay.io/biocontainers/mykrobe:0.11.0--py39h2add14b_1' }"

input:
tuple val(meta), path(seqs)
val species

output:
tuple val(meta), path("${prefix}.csv") , emit: csv
tuple val(meta), path("${prefix}.json"), emit: json
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
"""
mykrobe \\
predict \\
$args \\
--species $species \\
--threads $task.cpus \\
--sample $prefix \\
--format json_and_csv \\
--output ${prefix} \\
--seq $seqs
cat <<-END_VERSIONS > versions.yml
"${task.process}":
mykrobe: \$(echo \$(mykrobe --version 2>&1) | sed 's/^.*mykrobe v//' )
END_VERSIONS
"""
}
51 changes: 51 additions & 0 deletions modules/mykrobe/predict/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: "mykrobe_predict"
description: AMR predictions for supported species
keywords:
- fastq
- bam
- antimicrobial resistance
tools:
- "mykrobe":
description: "Antibiotic resistance prediction in minutes"
homepage: "http://www.mykrobe.com/"
documentation: "https://github.com/Mykrobe-tools/mykrobe/wiki"
tool_dev_url: "https://github.com/Mykrobe-tools/mykrobe"
doi: "10.1038/ncomms10063"
licence: "['MIT']"

input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- seqs:
type: file
description: BAM or FASTQ file
pattern: "*.{bam,fastq.gz,fq.gz}"
- species:
type: string
description: Species to make AMR prediction against
pattern: "*"

output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
- csv:
type: file
description: AMR predictions in CSV format
pattern: "*.csv"
- json:
type: file
description: AMR predictions in JSON format
pattern: "*.json"

authors:
- "@rpetit3"
1 change: 1 addition & 0 deletions modules/samtools/ampliconclip/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ process SAMTOOLS_AMPLICONCLIP {
"""
samtools \\
ampliconclip \\
--threads ${task.cpus-1} \\
$args \\
$rejects \\
$stats \\
Expand Down
1 change: 1 addition & 0 deletions modules/samtools/depth/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ process SAMTOOLS_DEPTH {
"""
samtools \\
depth \\
--threads ${task.cpus-1} \\
$args \\
-o ${prefix}.tsv \\
$bam
Expand Down
1 change: 1 addition & 0 deletions modules/samtools/idxstats/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ process SAMTOOLS_IDXSTATS {
"""
samtools \\
idxstats \\
--threads ${task.cpus-1} \\
$bam \\
> ${prefix}.idxstats
Expand Down
19 changes: 12 additions & 7 deletions modules/seqwish/induce/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ process SEQWISH_INDUCE {
tag "$meta.id"
label 'process_medium'

// WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions.
conda (params.enable_conda ? 'bioconda::seqwish=0.7.2' : null)
conda (params.enable_conda ? 'bioconda::seqwish=0.7.6' : null)

container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/seqwish:0.7.2--h2e03b76_0' :
'quay.io/biocontainers/seqwish:0.7.2--h2e03b76_0' }"
'https://depot.galaxyproject.org/singularity/seqwish:0.7.6--h5b5514e_1' :
'quay.io/biocontainers/seqwish:0.7.6--h5b5514e_1' }"

input:
tuple val(meta), path(paf), path(fasta)
Expand All @@ -21,18 +21,23 @@ process SEQWISH_INDUCE {
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = '0.7.2' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
def input = paf.join(',') // this ensures that we can actually input a
// comma-separated list of PAF files as required by
// https://github.com/nf-core/pangenome. If one wants to use this,
// ensure that you put a ".collect()" behind your channel.
// See https://github.com/nf-core/pangenome/blob/34149c6cdc19bce3a7b99f97c769d8986a8d429b/main.nf#L543
// for an example.
"""
seqwish \\
--threads $task.cpus \\
--paf-alns=$paf \\
--paf-alns=$input \\
--seqs=$fasta \\
--gfa=${prefix}.gfa \\
$args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
seqwish: $VERSION
seqwish: \$(echo \$(seqwish --version 2>&1) | cut -f 1 -d '-' | cut -f 2 -d 'v')
END_VERSIONS
"""
}
6 changes: 3 additions & 3 deletions modules/seqwish/induce/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ input:
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- paf:
type: file
description: PAF file of alignments
pattern: "*.{paf,paf.gz}"
type: list
description: comma-separated PAF file(s) of alignments, single entry allowed
pattern: "[*.{paf,paf.gz},*.{paf,paf.gz},...]"
- fasta:
type: file
description: FASTA file used to generate alignments
Expand Down
39 changes: 39 additions & 0 deletions modules/seroba/run/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
process SEROBA_RUN {
tag "$meta.id"
label 'process_low'

conda (params.enable_conda ? "bioconda::seroba=1.0.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/seroba:1.0.2--pyhdfd78af_1':
'quay.io/biocontainers/seroba:1.0.2--pyhdfd78af_1' }"

input:
tuple val(meta), path(reads)

output:
tuple val(meta), path("${prefix}/${prefix}.tsv") , emit: tsv
tuple val(meta), path("${prefix}/detailed_serogroup_info.txt"), optional: true, emit: txt
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
"""
seroba \\
runSerotyping \\
$reads \\
$prefix \\
$args
# Avoid name collisions
mv ${prefix}/pred.tsv ${prefix}/${prefix}.tsv
cat <<-END_VERSIONS > versions.yml
"${task.process}":
seroba: \$(seroba version)
END_VERSIONS
"""
}
Loading

0 comments on commit e74070b

Please sign in to comment.