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

Fixed current Zenodo URL of Kmerfinderdb #157

Merged
merged 2 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### `Fixed`

- [#157](https://github.com/nf-core/bacass/pull/157) Fixed corrupted zenodo URL of Kmerfinder database.
- [#154](https://github.com/nf-core/bacass/pull/154) Fixed kmerfinder script and increase resources to prevent memory issues.
- [#153](https://github.com/nf-core/bacass/pull/153) Update `.nf-core.yml` to fix files_unchanged section for accurate linting checks.

Expand Down
2 changes: 1 addition & 1 deletion conf/test_full.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ params {
// Input data for full size test
input = params.pipelines_testdata_base_path + 'bacass/bacass_full.tsv'
kraken2db = 'https://genome-idx.s3.amazonaws.com/kraken/k2_standard_8gb_20210517.tar.gz'
kmerfinderdb = 'https://zenodo.org/records/10458361/files/20190108_kmerfinder_stable_dirs.tar.gz'
kmerfinderdb = 'https://zenodo.org/records/13447056/files/20190108_kmerfinder_stable_dirs.tar.gz'
ncbi_assembly_metadata = 'https://ftp.ncbi.nlm.nih.gov/genomes/ASSEMBLY_REPORTS/assembly_summary_refseq.txt'
}
11 changes: 7 additions & 4 deletions modules/local/kmerfinder.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ process KMERFINDER {
'biocontainers/kmerfinder:3.0.2--hdfd78af_0' }"

input:
tuple val(meta), path(reads), path(kmerfinder_db)
tuple val(meta), path(reads), path(kmerfinderdb_path)
val tax_group

output:
tuple val(meta), path("*_results.txt") , emit: report
Expand All @@ -18,14 +19,15 @@ process KMERFINDER {
script:
def prefix = task.ext.prefix ?: "${meta.id}"
def in_reads = reads[0] && reads[1] ? "${reads[0]} ${reads[1]}" : "${reads}"
// WARNING: Ensure to update software version in this line if you modify the container/environment.
// WARNING: Ensure to update software or database version in this line if you modify the container/environment.
def kmerfinder_version = "3.0.2"
def kmerfinderdb_version = "20190108"
"""
kmerfinder.py \\
--infile $in_reads \\
--output_folder . \\
--db_path ${kmerfinder_db}/bacteria.ATG \\
-tax ${kmerfinder_db}/bacteria.name \\
--db_path ${kmerfinderdb_path}/${tax_group}/bacteria.ATG \\
-tax ${kmerfinderdb_path}/${tax_group}/bacteria.name \\
-x

mv results.txt ${prefix}_results.txt
Expand All @@ -34,6 +36,7 @@ process KMERFINDER {
cat <<-END_VERSIONS > versions.yml
"${task.process}":
kmerfinder: \$(echo "${kmerfinder_version}")
kmerfinderdb: \$(echo "${kmerfinderdb_version}")
END_VERSIONS
"""
}
4 changes: 2 additions & 2 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
},
"kmerfinderdb": {
"type": "string",
"description": "Path to the Kmerfinder bacteria database. For more details, see [Kmerfinder Databases](https://bitbucket.org/genomicepidemiology/kmerfinder_db/src/master/). You can also download precomputed Kmerfinder database (dated 2019/01/08) from https://zenodo.org/records/10458361/files/20190108_kmerfinder_stable_dirs.tar.gz "
"description": "Path to the Kmerfinder bacteria database. For more details, see [Kmerfinder Databases](https://bitbucket.org/genomicepidemiology/kmerfinder_db/src/master/). You can also download precomputed Kmerfinder database (dated 2019/01/08) from https://zenodo.org/records/13447056/files/20190108_kmerfinder_stable_dirs.tar.gz"
},
"reference_fasta": {
"type": "string",
Expand All @@ -95,7 +95,7 @@
},
"ncbi_assembly_metadata": {
"type": "string",
"description": "Master file (*.txt) containing a summary of assemblies available in GeneBank or RefSeq. See: https://ftp.ncbi.nlm.nih.gov/genomes/README_assembly_summary.txt"
"description": "Master file (*.txt) containing a summary of assemblies available in GeneBank or RefSeq. See: https://ftp.ncbi.nlm.nih.gov/genomes/ASSEMBLY_REPORTS/assembly_summary_refseq.txt"
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion subworkflows/local/kmerfinder_subworkflow.nf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ workflow KMERFINDER_SUBWORKFLOW {
.set{ ch_to_kmerfinder }

KMERFINDER (
ch_to_kmerfinder
ch_to_kmerfinder, // Channel: [ meta, reads, path_to_kmerfinderdb ]
'bacteria' // Val: 'tax_group'
)
ch_kmerfinder_report = KMERFINDER.out.report
ch_kmerfinder_json = KMERFINDER.out.json
Expand Down
Loading