diff --git a/conf/test.config b/conf/test.config index 04dfb4d..375f463 100644 --- a/conf/test.config +++ b/conf/test.config @@ -38,6 +38,7 @@ params { run_centrifuge = true run_diamond = true run_krona = true + krona_taxonomy_directory = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/sarscov2/metagenome/krona_taxonomy.tab' malt_save_reads = true kraken2_save_reads = true centrifuge_save_reads = true diff --git a/modules.json b/modules.json index 13c6592..b4c13f0 100644 --- a/modules.json +++ b/modules.json @@ -58,7 +58,7 @@ "git_sha": "8b2a473f586bed003e72d2b183acc43fc0ddc422" }, "krona/ktimporttaxonomy": { - "git_sha": "233fa70811a03a4cecb2ece483b5c8396e2cee1d" + "git_sha": "0e9fd9370ad1845870b8a9c63fcc47d999a1739e" }, "krona/ktimporttext": { "git_sha": "cdefbec66999c0b49d8bfeea9d6f9d19056635a2" diff --git a/modules/nf-core/modules/krona/ktimporttaxonomy/main.nf b/modules/nf-core/modules/krona/ktimporttaxonomy/main.nf index 5ea9e9e..9b03462 100644 --- a/modules/nf-core/modules/krona/ktimporttaxonomy/main.nf +++ b/modules/nf-core/modules/krona/ktimporttaxonomy/main.nf @@ -10,7 +10,7 @@ process KRONA_KTIMPORTTAXONOMY { input: tuple val(meta), path(report) - path taxonomy + path taxonomy, stageAs: 'taxonomy.tab' output: tuple val(meta), path ('*.html'), emit: html @@ -24,10 +24,13 @@ process KRONA_KTIMPORTTAXONOMY { def prefix = task.ext.prefix ?: "${meta.id}" def VERSION = '2.8' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. """ + TAXONOMY=\$(find -L . -name '*.tab' -exec dirname {} \\;) + echo \$TAXONOMY + ktImportTaxonomy \\ $args \\ -o ${prefix}.html \\ - -tax $taxonomy \\ + -tax \$TAXONOMY/ \\ $report cat <<-END_VERSIONS > versions.yml @@ -35,4 +38,4 @@ process KRONA_KTIMPORTTAXONOMY { krona: $VERSION END_VERSIONS """ -} \ No newline at end of file +} diff --git a/modules/nf-core/modules/krona/ktimporttaxonomy/meta.yml b/modules/nf-core/modules/krona/ktimporttaxonomy/meta.yml index df0ad1c..0fd7d5f 100644 --- a/modules/nf-core/modules/krona/ktimporttaxonomy/meta.yml +++ b/modules/nf-core/modules/krona/ktimporttaxonomy/meta.yml @@ -25,9 +25,10 @@ input: - database: type: file description: | - Path to the taxonomy database .tab file downloaded by krona/ktUpdateTaxonomy - The file will be saved under a folder named "taxonomy" as "taxonomy/taxonomy.tab". - The parent folder will be passed as argument to ktImportTaxonomy. + Path to a Krona taxonomy .tab file normally downloaded and generated by + krona/ktUpdateTaxonomy. Custom taxonomy files can have any name, but + must end in `.tab`. + pattern: "*tab" - report: type: file description: "A tab-delimited file with taxonomy IDs and (optionally) query IDs, magnitudes, and scores. Query IDs are taken from column 1, taxonomy IDs from column 2, and scores from column 3. Lines beginning with # will be ignored."