Skip to content

Commit

Permalink
check incompatible params with sidle
Browse files Browse the repository at this point in the history
  • Loading branch information
d4straub committed Mar 13, 2024
1 parent 221a554 commit dd3698e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
13 changes: 13 additions & 0 deletions lib/WorkflowAmpliseq.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,19 @@ class WorkflowAmpliseq {
if ( params.orf_end && ( ( ( params.orf_end + 1 ) - params.orf_start ) % 3 != 0 ) ) {
Nextflow.error("Incompatible parameters: The difference of `--orf_end` and `--orf_start` must be a multiple of 3.")
}

// When multi-region analysis is used, some parameter combinations are required or not allowed:
if ( params.input_multiregion ) {
if ( (params.dada_ref_tax_custom || params.dada_ref_taxonomy) && !params.skip_dada_taxonomy ) {
Nextflow.error("Incompatible parameters: Multiple region analysis with `--input_multiregion` does not work with `--dada_ref_tax_custom`, `--dada_ref_taxonomy`")
}
if ( params.cut_its ) {
Nextflow.error("Incompatible parameters: Multiple region analysis with `--input_multiregion` does not work with `--cut_its`")
}
if ( params.vsearch_cluster || params.filter_ssu || params.min_len_asv || params.max_len_asv || params.filter_codons ) {
log.warn "Incompatible parameters: Multiple region analysis with `--input_multiregion` ignores any of `--vsearch_cluster`, `--filter_ssu`, `--min_len_asv`, `--max_len_asv`, `--filter_codons`, `--cut_its`"
}
}
}

//
Expand Down
10 changes: 5 additions & 5 deletions workflows/ampliseq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -472,12 +472,12 @@ workflow AMPLISEQ {
// forward results to downstream analysis if multi region
ch_dada2_asv = SIDLE_WF.out.table_tsv
ch_dada2_fasta = Channel.empty()
// TODO Any ASV post-clustering param is not allowed:
// Any ASV post-clustering param is not allowed:
// - solved by '!params.input_multiregion' for vsearch_cluster, filter_ssu, min_len_asv, max_len_asv, filter_codons
// - not solved: cut_its
// TODO Must have params:
// solved by '!params.input_multiregion' for skip_report
// not solved: skip_dada_taxonomy
// - solved in 'lib/WorkflowAmpliseq.groovy': cut_its
// Must have params:
// - solved by '!params.input_multiregion' for skip_report
// - solved in 'lib/WorkflowAmpliseq.groovy': skip_dada_taxonomy
} else {
// forward results to downstream analysis if single region
ch_dada2_fasta = DADA2_MERGE.out.fasta
Expand Down

0 comments on commit dd3698e

Please sign in to comment.