diff --git a/conf/modules.config b/conf/modules.config index e1711b9cb..00de971fd 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -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 diff --git a/nextflow.config b/nextflow.config index 10206bcb8..8b71d4855 100644 --- a/nextflow.config +++ b/nextflow.config @@ -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 diff --git a/nextflow_schema.json b/nextflow_schema.json index 5d3ada4c6..d709533da 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -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-arrow-right-from-bracket" + }, + "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-arrow-right-from-bracket" + }, + "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-arrow-right-from-bracket" + }, + "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-arrow-right-from-bracket" } }, "fa_icon": "fas fa-layer-group"