Skip to content

Commit db711e0

Browse files
committed
add --expected_sequences_mismatches
1 parent c9f59d2 commit db711e0

5 files changed

Lines changed: 14 additions & 4 deletions

File tree

conf/modules.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,7 @@ process {
12421242
}
12431243

12441244
withName: COMPARE_PERFORMANCE {
1245-
ext.mismatch_threshold = 0 // thereshold for comparing matches (0=exact match)
1245+
ext.mismatch_threshold = { "${params.expected_sequences_mismatches}" } // thereshold for comparing matches (0=exact match)
12461246
ext.fbeta = 2 // Fbeta weight, default 2; 1=precision and recall equally weighted (=F1 score), 2=weighs recall higher than precision, 0.5=weighs recall lower than precision.
12471247
publishDir = [
12481248
[

docs/output.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,9 +658,9 @@ On request (`--ancombc2`), ANCOM-BC2 is applied to each suitable or specified me
658658

659659
</details>
660660

661-
### Compare to expected
661+
### Compare observed to expected outcome
662662

663-
Comparison evaluates observed results against expected outcomes, typically for samples with known composition such as mock communities, to assess the data and analysis. Steps to evaluate the produced ASVs are implemented in the pipeline.
663+
The observed results can be compared to expected outcomes per sample, typically for samples with known composition such as mock communities, to assess the performance of the data generation and analysis. Steps to evaluate the produced ASVs are implemented in the pipeline.
664664

665665
When expected sequences are supplied, the following files will be produced:
666666

docs/usage.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,9 @@ The observed sequences will be aligned globally (using `VSEASRCH --usearch_globa
344344
Depending on the region to analyse (`--expected_sequences_region`) the mismatches and gaps within the alignment will be summarized with or without terminal gaps.
345345
The nucleotide differences will be evaluated for each observed sequence to its best match.
346346

347+
Observed sequences will be accepted as "match" to an expected sequence (i.e. true positive) if there are no mismatches or gaps in the region (adjustable with `--expected_sequences_mismatches`).
347348
Expected abundances per sequence (`--expected_abundances`) enable sample specific presence/absence metrics and abundance-based comparisons.
348-
For those, observed and expected sequences will be aggregated by their analysed region: when one observed sequence matches exactely to several expected sequences, the expected sequence IDs will be concatenated and vice versa.
349+
For those, observed and expected sequences will be aggregated by their analysed region: when one observed sequence matches to several expected sequences, the expected sequence IDs will be concatenated and vice versa.
349350
That means, for example, if observed sequences are shorter than expected sequences and the analysed region is "query", each expected sequence (ID) that matches the same observed sequence will be aggregated.
350351

351352
The aggregation of obsevered and expected IDs and abundances based on perfect matches

nextflow.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ params {
105105
// Comparison to expected
106106
expected_sequences = null
107107
expected_sequences_region = "query"
108+
expected_sequences_mismatches = 0
108109
expected_abundances = null
109110

110111
// Report options

nextflow_schema.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -987,6 +987,14 @@
987987
"default": "query",
988988
"enum": ["alignment", "query", "target"]
989989
},
990+
"expected_sequences_mismatches": {
991+
"type": "integer",
992+
"default": 0,
993+
"minimum": 0,
994+
"description": "Threshold of accepted mismatches and gaps to the expected sequences",
995+
"help_text": "The number of mismatches and gaps that is accepted in the region avaluated by `--expected_sequences_region` to call it a match. For example, `0` means an exact match, 1 allows one mismatch/gap.",
996+
"fa_icon": "fas fa-greater-than-equal"
997+
},
990998
"expected_abundances": {
991999
"type": "string",
9921000
"format": "file-path",

0 commit comments

Comments
 (0)