Skip to content

Commit

Permalink
Allow changing optional parameters with reasonable upstream defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
jch-13 committed Sep 21, 2024
1 parent 182c36c commit 6f7440a
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
10 changes: 9 additions & 1 deletion conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,15 @@ process {

withName: MAPAD_MAP {
tag = { "${meta.reference}|${meta.sample_id}_${meta.library_id}_L${meta.lane}" }
ext.args = { "-x ${params.mapping_mapad_x}" }
ext.args = {
[
"-x ${params.mapping_mapad_x}",
"--gap_dist_ends ${params.mapping_mapad_gap_read_end_distance}",
"--max_num_gaps_open ${params.mapping_mapad_max_num_open_gaps}",
"-D ${params.mapping_mapad_D}",
params.mapping_mapad_ignore_base_qual ? "--ignore_base_quality" : "",
params.mapping_mapad_stack_limit_abort ? "--stack_limit_abort" : "",
].join(' ').trim()}
ext.prefix = { "${meta.sample_id}_${meta.library_id}_L${meta.lane}_${meta.reference}_unsorted" }
publishDir = [
enabled: false
Expand Down
5 changes: 5 additions & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ params {
mapping_mapad_s = 1.0
mapping_mapad_i = 0.001
mapping_mapad_x = 0.5
mapping_mapad_gap_read_end_distance = 5
mapping_mapad_max_num_open_gaps = 2
mapping_mapad_D = 0.02
mapping_mapad_ignore_base_qual = false
mapping_mapad_stack_limit_abort = false

// BAM Filtering
run_bamfiltering = false
Expand Down
30 changes: 30 additions & 0 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,36 @@
"description": "Specify the -x parameter for mapAD, which adjusts the gap extension penalty.",
"help_text": "Configures mapAD's gap extension penalty. The `-x` parameter adjusts the gap extension penalty as a fraction of a representative mismatch penalty. Default is set to 0.5.\n\n> Modifies mapAD map parameter: `-x`",
"fa_icon": "fas fa-arrow-right-from-bracket"
},
"mapping_mapad_gap_read_end_distance": {
"type": "number",
"description": "Specify the --gap_dist_ends parameter for mapAD, which defines the distance from the read ends in which no gaps are permitted.",
"help_text": "Configures mapAD's `--gap_dist_ends` parameter which defines the distance from the read ends in which no gaps are permitted. Default is set to mapAD's default (5).\n\n> Modifies mapAD map parameter: `--gap_dist_ends`",
"fa_icon": "fas fa-arrows-left-right-to-line"
},
"mapping_mapad_max_num_open_gaps": {
"type": "number",
"description": "Specify the number of gaps allowed for alignment with mapAD.",
"help_text": "Specify the number of gaps allowed for mapping with mapAD. Default is set to mapAD's default (2).\n\n> Modifies mapAD map parameter: `--max_num_gaps_open`",
"fa_icon": "fas fa-people-arrows"
},
"mapping_mapad_D": {
"type": "number",
"description": "Specify the base error rate parameter for mapAD.",
"help_text": "Configures mapAD's base error rate parameter. The `-D` parameter adjusts the base error rate which is one of the underlying parts of mapAD's scoring model. Should not normally need to be adjusted. Default is set to mapAD's default (0.02).\n\n> Modifies mapAD map parameter: `-D`",
"fa_icon": "fas fa-percent"
},
"mapping_mapad_ignore_base_qual": {
"type": "boolean",
"description": "Set the --ignore_base_quality flag, which instructs mapAD to ignore base quality values in its scoring model.",
"help_text": "Without this flag, mapAD is more permissive in terms of mismatches if the quality of the base is low. Default is set to mapAD's default.\n\n> Modifies mapAD map parameter: `--ignore_base_quality`",
"fa_icon": "fas fa-ranking-star"
},
"mapping_mapad_stack_limit_abort": {
"type": "boolean",
"description": "Set the --stack_limit_abort flag, which instructs mapAD to not try and recover from a full backtracking stack.",
"help_text": "Without this flag, mapAD tries to recover from a full backtracking stack by removing low-scoring sub-alignments. This can help to recover from difficult to map reads, at the cost of a slower alignment. Setting this flag will speed up the alignment process. Default is set to mapAD's default.\n\n> Modifies mapAD map parameter: `--stack_limit_abort`",
"fa_icon": "fas fa-stack-overflow"
}
},
"fa_icon": "fas fa-layer-group"
Expand Down

0 comments on commit 6f7440a

Please sign in to comment.