Skip to content

Commit 02dae30

Browse files
committed
update CHANGELOG and docs
1 parent 497f328 commit 02dae30

3 files changed

Lines changed: 39 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
### `Added`
99

10-
- [#1021](https://github.com/nf-core/ampliseq/pull/1021),[#1023](https://github.com/nf-core/ampliseq/pull/1023) - Comparison of observed ASVs against expected sequences or their abundance is now available with `--expected_*` parameters (by @d4straub, reviewed by @erikrikarddaniel)
10+
- [#1021](https://github.com/nf-core/ampliseq/pull/1021),[#1023](https://github.com/nf-core/ampliseq/pull/1023),[#1025](https://github.com/nf-core/ampliseq/pull/1025) - Comparison of observed ASVs against expected sequences or their abundance is now available with `--expected_*` parameters (by @d4straub, reviewed by @erikrikarddaniel)
1111

1212
### `Changed`
1313

docs/output.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,8 @@ When expected sequences are supplied, the following files will be produced:
680680
</details>
681681

682682
When additionally expected abundances are available, additional performance metrics will be generated.
683-
Metrics base on presence/absence:
683+
684+
(1) Metrics base on presence/absence:
684685

685686
- `observed`: Number of observed sequences
686687
- `expected`: Number of expected sequences
@@ -697,7 +698,7 @@ Metrics base on presence/absence:
697698
- `FNs_exp`: FN IDs (max 100) corresponding to expected sequences
698699
- `FPs_obs`: FP IDs (max 100) corresponding to observed sequences
699700

700-
Metrics based on abundances:
701+
(2) Metrics based on abundances:
701702

702703
- `pearson_cor`: Pearson's Correlation (cor)
703704
- `spearman_rho`: Spearman's Rank Correlation (rho)

docs/usage.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,41 @@ The columns which are to be assessed can be specified by `--metadata_category`.
340340

341341
To investigate the quality of data generation and/or data analysis, analysis outcome is compared to expected results. Comparison steps are implemented in the pipeline and can be used with `--expected_*` parameters, details in the [parameter documentation](https://nf-co.re/ampliseq/parameters/#comparison).
342342

343+
The observed sequences will be aligned globally (using `VSEASRCH --usearch_global`) to the expected sequences (`--expected_sequences`).
344+
Depending on the region to analyse (`--expected_sequences_region`) the mismatches and gaps within the alignment will be summarized with or without terminal gaps.
345+
The nucleotide differences will be evaluated for each observed sequence to its best match.
346+
Expected abundances per sequence (`--expected_abundances`) enable sample specific presence/absence metrics and abundance-based comparisons.
347+
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 (and abundances) will be concatenated and vice versa. 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.
348+
349+
The aggregation of obsevered and expected IDs and abundances based on perfect matches:
350+
351+
| obsID | expID | exp_abund | obs_abund |
352+
| ----- | ----- | --------- | --------- |
353+
| a | 1 | 6 | 2 |
354+
| a | 2 | 4 | 2 |
355+
| c | 3 | 9 | 4 |
356+
| d | 3 | 9 | 3 |
357+
| | 4 | 1 | 0 |
358+
| e | 5 | 4 | 5 |
359+
| f | 6 | 5 | 1 |
360+
| f | 7 | 1 | 1 |
361+
| g | 6 | 5 | 2 |
362+
| g | 7 | 1 | 2 |
363+
| h | | 0 | 1 |
364+
365+
will be transformed to:
366+
367+
| obsID | expID | exp_abund | obs_abund |
368+
| ----- | ----- | --------- | --------- |
369+
| a | 1-2 | 10 | 2 |
370+
| c-d | 3 | 9 | 7 |
371+
| e | 5 | 4 | 5 |
372+
| g-f | 6-7 | 6 | 3 |
373+
| h | | 0 | 1 |
374+
| | 4 | 1 | 0 |
375+
376+
This aggregation will not work properly when many sequences are not observed, e.g. in the above axample observed ID "a" links expected IDs "1" and "2", which would not have been aggregated if "a" would not have been observed. This would inflate expected sequences. Therefore, optimal sequence and abundance input are tailored towards the actual sequenced region and de-duplicated.
377+
343378
### Differential abundance analysis
344379

345380
Differential abundance analysis for relative abundance from microbial community analysis are plagued by multiple issues that aren't fully solved yet. But some approaches seem promising, for example Analysis of Composition of Microbiomes with Bias Correction ([ANCOM-BC](https://pubmed.ncbi.nlm.nih.gov/32665548/)). [ANCOM](https://pubmed.ncbi.nlm.nih.gov/26028277/), ANCOM-BC, and [ANCOM-BC2](https://pubmed.ncbi.nlm.nih.gov/38158428/) are integrated into the pipeline, but only executed on request via `--ancom`, `--ancombc` or `--ancombc2`, more details in the [nf-core/ampliseq website parameter documentation](https://nf-co.re/ampliseq/parameters/#differential-abundance-analysis).

0 commit comments

Comments
 (0)