1
0
Fork 0
mirror of https://github.com/MillironX/taxprofiler.git synced 2024-11-22 11:59:55 +00:00

chore: force update all modules

This commit is contained in:
Moritz E. Beber 2022-10-05 12:24:18 +02:00
parent fdb8a7f740
commit b407fbcdce
19 changed files with 80 additions and 39 deletions

View file

@ -1,6 +1,6 @@
process CAT_FASTQ { process CAT_FASTQ {
tag "$meta.id" tag "$meta.id"
label 'process_low' label 'process_single'
conda (params.enable_conda ? "conda-forge::sed=4.7" : null) conda (params.enable_conda ? "conda-forge::sed=4.7" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
@ -20,9 +20,9 @@ process CAT_FASTQ {
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"
def readList = reads.collect{ it.toString() } def readList = reads instanceof List ? reads.collect{ it.toString() } : [reads.toString()]
if (meta.single_end) { if (meta.single_end) {
if (readList.size > 1) { if (readList.size >= 1) {
""" """
cat ${readList.join(' ')} > ${prefix}.merged.fastq.gz cat ${readList.join(' ')} > ${prefix}.merged.fastq.gz
@ -33,7 +33,7 @@ process CAT_FASTQ {
""" """
} }
} else { } else {
if (readList.size > 2) { if (readList.size >= 2) {
def read1 = [] def read1 = []
def read2 = [] def read2 = []
readList.eachWithIndex{ v, ix -> ( ix & 1 ? read2 : read1 ) << v } readList.eachWithIndex{ v, ix -> ( ix & 1 ? read2 : read1 ) << v }
@ -51,7 +51,7 @@ process CAT_FASTQ {
stub: stub:
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"
def readList = reads.collect{ it.toString() } def readList = reads instanceof List ? reads.collect{ it.toString() } : [reads.toString()]
if (meta.single_end) { if (meta.single_end) {
if (readList.size > 1) { if (readList.size > 1) {
""" """

View file

@ -1,6 +1,6 @@
process CENTRIFUGE_KREPORT { process CENTRIFUGE_KREPORT {
tag "$meta.id" tag "$meta.id"
label 'process_low' label 'process_single'
conda (params.enable_conda ? "bioconda::centrifuge=1.0.4_beta" : null) conda (params.enable_conda ? "bioconda::centrifuge=1.0.4_beta" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?

View file

@ -58,11 +58,12 @@ versions_by_module = {}
for process, process_versions in versions_by_process.items(): for process, process_versions in versions_by_process.items():
module = process.split(":")[-1] module = process.split(":")[-1]
try: try:
assert versions_by_module[module] == process_versions, ( if versions_by_module[module] != process_versions:
"We assume that software versions are the same between all modules. " raise AssertionError(
"If you see this error-message it means you discovered an edge-case " "We assume that software versions are the same between all modules. "
"and should open an issue in nf-core/tools. " "If you see this error-message it means you discovered an edge-case "
) "and should open an issue in nf-core/tools. "
)
except KeyError: except KeyError:
versions_by_module[module] = process_versions versions_by_module[module] = process_versions

View file

@ -1,5 +1,5 @@
process EIDO_CONVERT { process EIDO_CONVERT {
tag '$samplesheet' tag "$samplesheet"
label 'process_single' label 'process_single'
conda (params.enable_conda ? "conda-forge::eido=0.1.9" : null) conda (params.enable_conda ? "conda-forge::eido=0.1.9" : null)

View file

@ -1,5 +1,5 @@
process EIDO_VALIDATE { process EIDO_VALIDATE {
tag '$samplesheet' tag "$samplesheet"
label 'process_single' label 'process_single'
conda (params.enable_conda ? "conda-forge::eido=0.1.9" : null) conda (params.enable_conda ? "conda-forge::eido=0.1.9" : null)

View file

@ -1,6 +1,6 @@
process GUNZIP { process GUNZIP {
tag "$archive" tag "$archive"
label 'process_low' label 'process_single'
conda (params.enable_conda ? "conda-forge::sed=4.7" : null) conda (params.enable_conda ? "conda-forge::sed=4.7" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?

View file

@ -1,6 +1,6 @@
process KAIJU_KAIJU2KRONA { process KAIJU_KAIJU2KRONA {
tag "$meta.id" tag "$meta.id"
label 'process_low' label 'process_single'
conda (params.enable_conda ? "bioconda::kaiju=1.8.2" : null) conda (params.enable_conda ? "bioconda::kaiju=1.8.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?

View file

@ -1,6 +1,6 @@
process KAIJU_KAIJU2TABLE { process KAIJU_KAIJU2TABLE {
tag "$meta.id" tag "$meta.id"
label 'process_low' label 'process_single'
conda (params.enable_conda ? "bioconda::kaiju=1.8.2" : null) conda (params.enable_conda ? "bioconda::kaiju=1.8.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?

View file

@ -1,5 +1,5 @@
process KRAKENTOOLS_COMBINEKREPORTS { process KRAKENTOOLS_COMBINEKREPORTS {
label 'process_low' label 'process_single'
conda (params.enable_conda ? "bioconda::krakentools=1.2" : null) conda (params.enable_conda ? "bioconda::krakentools=1.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?

View file

@ -1,6 +1,6 @@
process KRAKENTOOLS_KREPORT2KRONA { process KRAKENTOOLS_KREPORT2KRONA {
tag "$meta.id" tag "$meta.id"
label 'process_low' label 'process_single'
// WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions.
conda (params.enable_conda ? "bioconda::krakentools=1.2" : null) conda (params.enable_conda ? "bioconda::krakentools=1.2" : null)

View file

@ -1,6 +1,6 @@
process KRONA_KTIMPORTTAXONOMY { process KRONA_KTIMPORTTAXONOMY {
tag "${meta.id}" tag "${meta.id}"
label 'process_high' label 'process_single'
// WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions.
conda (params.enable_conda ? "bioconda::krona=2.8" : null) conda (params.enable_conda ? "bioconda::krona=2.8" : null)

View file

@ -1,6 +1,6 @@
process KRONA_KTIMPORTTEXT { process KRONA_KTIMPORTTEXT {
tag "$meta.id" tag "$meta.id"
label 'process_low' label 'process_single'
conda (params.enable_conda ? "bioconda::krona=2.8.1" : null) conda (params.enable_conda ? "bioconda::krona=2.8.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?

View file

@ -1,6 +1,6 @@
process MEGAN_RMA2INFO { process MEGAN_RMA2INFO {
tag "$meta.id" tag "$meta.id"
label 'process_low' label 'process_single'
conda (params.enable_conda ? "bioconda::megan=6.21.7" : null) conda (params.enable_conda ? "bioconda::megan=6.21.7" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?

View file

@ -7,11 +7,11 @@ process MINIMAP2_INDEX {
'quay.io/biocontainers/minimap2:2.21--h5bf99c6_0' }" 'quay.io/biocontainers/minimap2:2.21--h5bf99c6_0' }"
input: input:
path fasta tuple val(meta), path(fasta)
output: output:
path "*.mmi" , emit: index tuple val(meta), path("*.mmi"), emit: index
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when: when:
task.ext.when == null || task.ext.when task.ext.when == null || task.ext.when

View file

@ -12,11 +12,21 @@ tools:
documentation: https://github.com/lh3/minimap2#uguide documentation: https://github.com/lh3/minimap2#uguide
licence: ["MIT"] licence: ["MIT"]
input: input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- fasta: - fasta:
type: file type: file
description: | description: |
Reference database in FASTA format. Reference database in FASTA format.
output: output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- mmi: - mmi:
type: file type: file
description: Minimap2 fasta index. description: Minimap2 fasta index.

View file

@ -2,7 +2,7 @@ VERSION = '3.0.1'
process MOTUS_MERGE { process MOTUS_MERGE {
tag "$meta.id" tag "$meta.id"
label 'process_low' label 'process_single'
conda (params.enable_conda ? "bioconda::motus=3.0.1" : null) conda (params.enable_conda ? "bioconda::motus=3.0.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?

View file

@ -10,31 +10,39 @@ process SAMTOOLS_VIEW {
input: input:
tuple val(meta), path(input), path(index) tuple val(meta), path(input), path(index)
path fasta path fasta
path qname
output: output:
tuple val(meta), path("*.bam") , emit: bam , optional: true tuple val(meta), path("*.bam"), emit: bam, optional: true
tuple val(meta), path("*.cram"), emit: cram, optional: true tuple val(meta), path("*.cram"), emit: cram, optional: true
path "versions.yml" , emit: versions tuple val(meta), path("*.sam"), emit: sam, optional: true
tuple val(meta), path("*.bai"), emit: bai, optional: true
tuple val(meta), path("*.csi"), emit: csi, optional: true
tuple val(meta), path("*.crai"), emit: crai, optional: true
path "versions.yml", emit: versions
when: when:
task.ext.when == null || task.ext.when task.ext.when == null || task.ext.when
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def args2 = task.ext.args2 ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"
def reference = fasta ? "--reference ${fasta} -C" : "" def reference = fasta ? "--reference ${fasta}" : ""
def file_type = input.getExtension() def readnames = qname ? "--qname-file ${qname}": ""
def file_type = args.contains("--output-fmt sam") ? "sam" :
args.contains("--output-fmt bam") ? "bam" :
args.contains("--output-fmt cram") ? "cram" :
input.getExtension()
if ("$input" == "${prefix}.${file_type}") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" if ("$input" == "${prefix}.${file_type}") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!"
""" """
samtools \\ samtools \\
view \\ view \\
--threads ${task.cpus-1} \\ --threads ${task.cpus-1} \\
${reference} \\ ${reference} \\
${readnames} \\
$args \\ $args \\
$input \\ -o ${prefix}.${file_type} \\
$args2 \\ $input
> ${prefix}.${file_type}
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
"${task.process}": "${task.process}":

View file

@ -33,6 +33,10 @@ input:
type: optional file type: optional file
description: Reference file the CRAM was created with description: Reference file the CRAM was created with
pattern: "*.{fasta,fa}" pattern: "*.{fasta,fa}"
- qname:
type: file
description: Optional file with read names to output only select alignments
pattern: "*.{txt,list}"
output: output:
- meta: - meta:
type: map type: map
@ -41,12 +45,29 @@ output:
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- bam: - bam:
type: file type: file
description: filtered/converted BAM/SAM file description: optional filtered/converted BAM file
pattern: "*.{bam,sam}" pattern: "*.{bam}"
- cram: - cram:
type: file type: file
description: filtered/converted CRAM file description: optional filtered/converted CRAM file
pattern: "*.cram" pattern: "*.{cram}"
- sam:
type: file
description: optional filtered/converted SAM file
pattern: "*.{sam}"
# bai, csi, and crai are created with `--write-index`
- bai:
type: file
description: optional BAM file index
pattern: "*.{bai}"
- csi:
type: file
description: optional tabix BAM file index
pattern: "*.{csi}"
- crai:
type: file
description: optional CRAM file index
pattern: "*.{crai}"
- versions: - versions:
type: file type: file
description: File containing software versions description: File containing software versions
@ -55,3 +76,4 @@ authors:
- "@drpatelh" - "@drpatelh"
- "@joseespinosa" - "@joseespinosa"
- "@FriederikeHanssen" - "@FriederikeHanssen"
- "@priyanka-surana"

View file

@ -27,7 +27,7 @@ process UNTAR {
## Ensures --strip-components only applied when top level of tar contents is a directory ## Ensures --strip-components only applied when top level of tar contents is a directory
## If just files or multiple directories, place all in output ## If just files or multiple directories, place all in output
if [[ \$(tar -tzf ${archive} | grep "/\$" | wc -l) -eq 1 ]]; then if [[ \$(tar -tzf ${archive} | grep -o -P "^.*?\\/" | uniq | wc -l) -eq 1 ]]; then
tar \\ tar \\
-C output --strip-components 1 \\ -C output --strip-components 1 \\
-xzvf \\ -xzvf \\