Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ampcombi 2.0.1 #7142

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion modules/nf-core/ampcombi2/cluster/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ channels:
- conda-forge
- bioconda
dependencies:
- "bioconda::ampcombi=0.2.2"
- "bioconda::ampcombi=2.0.1"
4 changes: 2 additions & 2 deletions modules/nf-core/ampcombi2/cluster/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ process AMPCOMBI2_CLUSTER {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/ampcombi:0.2.2--pyhdfd78af_0':
'biocontainers/ampcombi:0.2.2--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/ampcombi:2.0.1--pyhdfd78af_0':
'biocontainers/ampcombi:2.0.1--pyhdfd78af_0' }"

input:
path(summary_file)
Expand Down
18 changes: 9 additions & 9 deletions modules/nf-core/ampcombi2/cluster/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
true,
true,
[
"versions.yml:md5,4e9aa3812bfee6ec22a1b6ccb62de2ca"
"versions.yml:md5,b629089d44775078dce5e664a455422b"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
"nf-test": "0.9.2",
"nextflow": "24.10.2"
},
"timestamp": "2024-04-24T12:11:40.928513749"
"timestamp": "2024-12-03T07:57:01.869983435"
},
"ampcombi2_cluster - metagenome - stub": {
"content": [
Expand All @@ -26,7 +26,7 @@
"Ampcombi_cluster.log:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"3": [
"versions.yml:md5,4e9aa3812bfee6ec22a1b6ccb62de2ca"
"versions.yml:md5,b629089d44775078dce5e664a455422b"
],
"cluster_tsv": [
"Ampcombi_summary_cluster.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
Expand All @@ -38,14 +38,14 @@
"Ampcombi_summary_cluster_representative_seq.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"versions": [
"versions.yml:md5,4e9aa3812bfee6ec22a1b6ccb62de2ca"
"versions.yml:md5,b629089d44775078dce5e664a455422b"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
"nf-test": "0.9.2",
"nextflow": "24.10.2"
},
"timestamp": "2024-04-24T12:12:08.780718892"
"timestamp": "2024-12-03T07:57:23.939137628"
}
}
2 changes: 1 addition & 1 deletion modules/nf-core/ampcombi2/complete/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ channels:
- conda-forge
- bioconda
dependencies:
- "bioconda::ampcombi=0.2.2"
- "bioconda::ampcombi=2.0.1"
4 changes: 2 additions & 2 deletions modules/nf-core/ampcombi2/complete/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ process AMPCOMBI2_COMPLETE {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/ampcombi:0.2.2--pyhdfd78af_0':
'biocontainers/ampcombi:0.2.2--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/ampcombi:2.0.1--pyhdfd78af_0':
'biocontainers/ampcombi:2.0.1--pyhdfd78af_0' }"

input:
path(summaries)
Expand Down
24 changes: 12 additions & 12 deletions modules/nf-core/ampcombi2/complete/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,39 @@
"Ampcombi_summary.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"1": [

],
"2": [
"versions.yml:md5,0aa35e86761a6c160482b8b8dbfc5440"
"versions.yml:md5,bfba0046e0cfa7b0b6d79663823f94c0"
],
"log": [

],
"tsv": [
"Ampcombi_summary.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"versions": [
"versions.yml:md5,0aa35e86761a6c160482b8b8dbfc5440"
"versions.yml:md5,bfba0046e0cfa7b0b6d79663823f94c0"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
"nf-test": "0.9.2",
"nextflow": "24.10.2"
},
"timestamp": "2024-04-29T11:55:16.030399422"
"timestamp": "2024-12-03T07:57:53.385349848"
},
"ampcombi2_complete - contigs": {
"content": [
true,
[
"versions.yml:md5,0aa35e86761a6c160482b8b8dbfc5440"
"versions.yml:md5,bfba0046e0cfa7b0b6d79663823f94c0"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
"nf-test": "0.9.2",
"nextflow": "24.10.2"
},
"timestamp": "2024-04-29T11:54:54.334224301"
"timestamp": "2024-12-03T07:57:40.263912946"
}
}
}
2 changes: 1 addition & 1 deletion modules/nf-core/ampcombi2/parsetables/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ channels:
- conda-forge
- bioconda
dependencies:
- "bioconda::ampcombi=0.2.2"
- "bioconda::ampcombi=2.0.1"
74 changes: 45 additions & 29 deletions modules/nf-core/ampcombi2/parsetables/main.nf
Original file line number Diff line number Diff line change
@@ -1,47 +1,56 @@
process AMPCOMBI2_PARSETABLES {
tag "$meta.id"
tag "${meta.id}"
label 'process_medium'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/ampcombi:0.2.2--pyhdfd78af_0':
'biocontainers/ampcombi:0.2.2--pyhdfd78af_0' }"
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
? 'https://depot.galaxyproject.org/singularity/ampcombi:2.0.1--pyhdfd78af_0'
: 'biocontainers/ampcombi:2.0.1--pyhdfd78af_0'}"

input:
tuple val(meta), path(amp_input)
path(faa_input)
path(gbk_input)
path(opt_amp_db)
path faa_input
path gbk_input
val opt_amp_db
path opt_amp_db_dir

output:
tuple val(meta), path("${meta.id}/") , emit: sample_dir
tuple val(meta), path("${meta.id}/contig_gbks/") , emit: contig_gbks
tuple val(meta), path("${meta.id}/${meta.id}_diamond_matches.txt"), emit: txt
tuple val(meta), path("${meta.id}/${meta.id}_ampcombi.tsv") , emit: tsv
tuple val(meta), path("${meta.id}/${meta.id}_amp.faa") , emit: faa
tuple val(meta), path("${meta.id}/${meta.id}_ampcombi.log") , emit: sample_log, optional:true
tuple val(meta), path("Ampcombi_parse_tables.log") , emit: full_log, optional:true
tuple val(meta), path("amp_ref_database/") , emit: results_db, optional:true
tuple val(meta), path("amp_ref_database/*.dmnd") , emit: results_db_dmnd, optional:true
tuple val(meta), path("amp_ref_database/*.clean.fasta") , emit: results_db_fasta, optional:true
tuple val(meta), path("amp_ref_database/*.tsv") , emit: results_db_tsv, optional:true
path "versions.yml" , emit: versions
tuple val(meta), path("${meta.id}/") , emit: sample_dir
tuple val(meta), path("${meta.id}/contig_gbks/") , emit: contig_gbks
tuple val(meta), path("${meta.id}/${meta.id}_mmseqs_matches.tsv") , emit: db_tsv
tuple val(meta), path("${meta.id}/${meta.id}_ampcombi.tsv") , emit: tsv
tuple val(meta), path("${meta.id}/${meta.id}_amp.faa") , emit: faa
tuple val(meta), path("${meta.id}/${meta.id}_ampcombi.log") , emit: sample_log , optional:true
tuple val(meta), path("Ampcombi_parse_tables.log") , emit: full_log , optional:true
tuple val(meta), path("amp_${opt_amp_db}_database/") , emit: db , optional:true
tuple val(meta), path("amp_${opt_amp_db}_database/*.txt") , emit: db_txt , optional:true
tuple val(meta), path("amp_${opt_amp_db}_database/*.fasta") , emit: db_fasta , optional:true
tuple val(meta), path("amp_${opt_amp_db}_database/mmseqs2/") , emit: db_mmseqs , optional:true
tuple val(meta), path("amp_${opt_amp_db}_database/mmseqs2/ref_DB") , emit: db_mmseqs_binary , optional:true
tuple val(meta), path("amp_${opt_amp_db}_database/mmseqs2/ref_DB.dbtype") , emit: db_mmseqs_dbtype , optional:true
tuple val(meta), path("amp_${opt_amp_db}_database/mmseqs2/ref_DB_h") , emit: db_mmseqs_h , optional:true
tuple val(meta), path("amp_${opt_amp_db}_database/mmseqs2/ref_DB_h.dbtype"), emit: db_mmseqs_hdbtype , optional:true
tuple val(meta), path("amp_${opt_amp_db}_database/mmseqs2/ref_DB_h.index") , emit: db_mmseqs_hindex , optional:true
tuple val(meta), path("amp_${opt_amp_db}_database/mmseqs2/ref_DB.index") , emit: db_mmseqs_index , optional:true
tuple val(meta), path("amp_${opt_amp_db}_database/mmseqs2/ref_DB.lookup") , emit: db_mmseqs_lookup , optional:true
tuple val(meta), path("amp_${opt_amp_db}_database/mmseqs2/ref_DB.source") , emit: db_mmseqs_source , optional:true
Darcy220606 marked this conversation as resolved.
Show resolved Hide resolved
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 db = opt_amp_db? "--amp_database $opt_amp_db": ""
"""
ampcombi parse_tables \\
--path_list '${amp_input.collect{"$it"}.join("' '")}' \\
--path_list '${amp_input.collect { "${it}" }.join("' '")}' \\
--faa ${faa_input} \\
--gbk ${gbk_input} \\
--sample_list ${prefix} \\
${db} \\
$args \\
--amp_database ${opt_amp_db} \\
--amp_database_dir ${opt_amp_db_dir} \\
${args} \\
--threads ${task.cpus}

cat <<-END_VERSIONS > versions.yml
Expand All @@ -53,20 +62,27 @@ process AMPCOMBI2_PARSETABLES {
stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def db = opt_amp_db? "--amp_database $opt_amp_db": ""
"""
mkdir -p ${prefix}
mkdir -p ${prefix}/contig_gbks
touch ${prefix}/${meta.id}_diamond_matches.txt
touch ${prefix}/${meta.id}_mmseqs_matches.tsv
touch ${prefix}/${meta.id}_ampcombi.tsv
touch ${prefix}/${meta.id}_amp.faa
touch ${prefix}/${meta.id}_ampcombi.log
touch Ampcombi_parse_tables.log

mkdir -p amp_ref_database
touch amp_ref_database/*.dmnd
touch amp_ref_database/*.clean.fasta
touch amp_ref_database/*.tsv
mkdir -p amp_${opt_amp_db}_database
mkdir -p amp_${opt_amp_db}_database/mmseqs2
touch amp_${opt_amp_db}_database/*.fasta
touch amp_${opt_amp_db}_database/*.txt
touch amp_${opt_amp_db}_database/mmseqs2/ref_DB
touch amp_${opt_amp_db}_database/mmseqs2/ref_DB.dbtype
touch amp_${opt_amp_db}_database/mmseqs2/ref_DB_h
touch amp_${opt_amp_db}_database/mmseqs2/ref_DB_h.dbtype
touch amp_${opt_amp_db}_database/mmseqs2/ref_DB_h.index
touch amp_${opt_amp_db}_database/mmseqs2/ref_DB.index
touch amp_${opt_amp_db}_database/mmseqs2/ref_DB.lookup
touch amp_${opt_amp_db}_database/mmseqs2/ref_DB.source

cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
Loading
Loading