Skip to content

Commit

Permalink
Solve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
sofstam committed Jun 30, 2023
1 parent 4f4d2ee commit 6472f93
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 22 deletions.
3 changes: 2 additions & 1 deletion conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,8 @@ process {
path: { "${params.outdir}/kmcp/${meta.db_name}/" },
mode: params.publish_dir_mode,
pattern: '*.{profile}'

]
}

withName: GANON_CLASSIFY {
ext.args = params.ganon_save_readclassifications ? { "${meta.db_params} --output-all --output-lca --output-unclassified" } : { "${meta.db_params}" }
Expand Down
12 changes: 6 additions & 6 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ params {
motus_remove_ncbi_ids = false
motus_save_mgc_read_counts = false

// kmcp
run_kmcp = false
kmcp_taxdump = null
kmcp_taxid = null
kmcp_mode = 3 // default kmcp profiling value

// ganon
run_ganon = false
ganon_report_type = 'reads'
Expand All @@ -165,12 +171,6 @@ params {
run_krona = false
krona_taxonomy_directory = null

// kmcp
run_kmcp = false
kmcp_taxdump = null
kmcp_taxid = null
kmcp_mode = 3 // default kmcp profiling value

// profile standardisation
run_profile_standardisation = false
standardisation_taxpasta_format = 'tsv'
Expand Down
5 changes: 2 additions & 3 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,8 @@
"motus_remove_ncbi_ids": {
"type": "boolean",
"description": "Turn on removing NCBI taxonomic IDs.",
"fa_icon": "fas fa-address-card"
"fa_icon": "fas fa-address-card",
"help_text": "By default mOTUs will report species names rather than NCBI Taxon IDs. In nf-core/taxprofiler we prefer taxon IDs due to interoperatbility and comparability with the output of other classifiers and profilers. If you prefer to have just species names, you can specify this to remove the IDs.\n\n> Modifies tool parameter(s):\n- mOTUs: `-p` (removed from the default nf-core/taxprofiler command)"
},
"run_kmcp": {
"type": "boolean",
Expand All @@ -519,8 +520,6 @@
"description": "Profiling mode.",
"help_text": "Available values: \n0 (for pathogen detection)\n1 (higherrecall)\n2 (high recall)\n3 (default)\n4 (high precision)\n5 (higher precision)",
"fa_icon": "fas fa-check-square"
"fa_icon": "fas fa-address-card",
"help_text": "By default mOTUs will report species names rather than NCBI Taxon IDs. In nf-core/taxprofiler we prefer taxon IDs due to interoperatbility and comparability with the output of other classifiers and profilers. If you prefer to have just species names, you can specify this to remove the IDs.\n\n> Modifies tool parameter(s):\n- mOTUs: `-p` (removed from the default nf-core/taxprofiler command)"
},
"run_ganon": {
"type": "boolean",
Expand Down
3 changes: 1 addition & 2 deletions subworkflows/local/db_check.nf
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,8 @@ def validate_db_rows(LinkedHashMap row) {
if ( !row.keySet().containsAll(expected_headers) ) error("[nf-core/taxprofiler] ERROR: Invalid database input sheet - malformed column names. Please check input TSV. Column names should be: ${expected_headers.join(", ")}")

// valid tools specified
def expected_tools = [ "bracken", "centrifuge", "diamond", "kaiju", "kmcp","kraken2", "krakenuniq", "malt", "metaphlan3", "motus" ]
def expected_tools = [ "bracken", "centrifuge", "diamond", "kaiju", "kraken2", "krakenuniq", "malt", "metaphlan3", "motus", "ganon", "metaphlan", "kmcp" ]

if ( !expected_tools.contains(row.tool) ) error("[nf-core/taxprofiler] ERROR: Invalid tool name. Please see documentation for all supported profilers. Error in: ${row}")

// detect quotes in params
Expand Down
29 changes: 19 additions & 10 deletions subworkflows/local/profiling.nf
Original file line number Diff line number Diff line change
Expand Up @@ -353,20 +353,13 @@ workflow PROFILING {
meta, reads, meta_db, db ->
if ( meta['instrument_platform'] == 'OXFORD_NANOPORE' ) log.warn "[nf-core/taxprofiler] Kmcp is only suitable for short-read metagenomic profiling, with much lower sensitivity on long-read datasets. Skipping kmcp for sample ${meta.id}."
meta_db['tool'] == 'kmcp' && meta['instrument_platform'] != 'OXFORD_NANOPORE'
if ( params.run_ganon ) {

ch_input_for_ganonclassify = ch_input_for_profiling.ganon
.filter {
meta, reads, meta_db, db ->
if ( meta['instrument_platform'] == 'OXFORD_NANOPORE' ) log.warn "[nf-core/taxprofiler] Ganon has not been evaluated for Nanopore data. Skipping Ganon for sample ${meta.id}."
meta_db['tool'] == 'ganon' && meta['instrument_platform'] != 'OXFORD_NANOPORE'
}
.multiMap {
}
.multiMap {
it ->
reads: [ it[0] + it[2], it[1] ]
db: it[3]
}

ch_input_for_kmcpcompute.db
KMCP_COMPUTE (ch_input_for_kmcpcompute.db)
KMCP_INDEX (KMCP_COMPUTE.out.outdir)
Expand All @@ -377,6 +370,22 @@ workflow PROFILING {
ch_raw_profiles = ch_raw_profiles.mix( KMCP_PROFILE.out.profile )
ch_multiqc_files = ch_multiqc_files.mix( KMCP_PROFILE.out.profile )

}

if ( params.run_ganon ) {

ch_input_for_ganonclassify = ch_input_for_profiling.ganon
.filter {
meta, reads, meta_db, db ->
if ( meta['instrument_platform'] == 'OXFORD_NANOPORE' ) log.warn "[nf-core/taxprofiler] Ganon has not been evaluated for Nanopore data. Skipping Ganon for sample ${meta.id}."
meta_db['tool'] == 'ganon' && meta['instrument_platform'] != 'OXFORD_NANOPORE'
}
.multiMap {
it ->
reads: [ it[0] + it[2], it[1] ]
db: it[3]
}

ch_input_for_ganonclassify.reads

GANON_CLASSIFY( ch_input_for_ganonclassify.reads, ch_input_for_ganonclassify.db )
Expand Down

0 comments on commit 6472f93

Please sign in to comment.