Skip to content

Commit

Permalink
Fix section references
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemc committed Nov 27, 2021
1 parent 6609b32 commit 8f81dd5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions abundance-measurement.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ We can rewrite the species' density measurements to account for the effect of ta
\end{align}
The variable fold error that bias creates in the measured proportions directly transfers to the density measurements.

Taxonomic bias can also create systematic error in the total-density measurements (Appendix \@ref(appendix-total-density)).
Taxonomic bias can also create systematic error in the total-density measurements (Appendix \@ref(total-density-bias)).
For now, we suppose that the total density can be measured accurately;
later, Section \@ref(solutions) describes how experiments might be designed such that taxonomic bias in the total density measurement offsets that in the MGS proportions, leading to a (more) consistent fold error in the measured densities.

Expand All @@ -147,9 +147,11 @@ It follows from Equation \@ref(eq:ratio-error) that the error caused by taxonomi
Here, it is the constant error in the measured ratio of species $i$ to $r$ that propagates into the density measurement.
There will generally be systematic error in the density of the reference species; however, if the systematic fold error is constant across samples, so will be that of the densities of other species.

<!-- NOTE: the above doesn't quite make sense for DNA spike-ins -->

**Differences between the two approaches:**
Equations \@ref(eq:density-prop-error) and \@ref(eq:density-ratio-error) show that the manner in which taxonomic bias in the sequencing measurement impacts the two approaches mirrors that of proportions and ratios.
If the fold error in the total-density or reference species measurement is negligible (or at least constant) then the fold errors in species densities by the total-density approach vary across samples with the mean efficiency, whereas the fold errors by the reference-species approach are constant.
The fundamental determinant of whether constant error is obtained is not which of these two equations is ultimately used, but rather whether densities of individual species, which (we assume) have constant efficiency, or the total community, which has varying efficiency, provide the absolute-abundance information.
Studies using spike-ins as constant reference species will often, instead of using Equation \@ref(eq:density-ratio-meas), first use the spike-in species to estimate the total density, and then estimate the density of focal species with Equation \@ref(eq:density-prop-meas).
If the calculation is done carefully, however, this method still yields constant fold errors so long as the species efficiencies (including those of the spike-in) are constant across samples (Appendix \@ref(appendix-total-density)).
If the calculation is done carefully, however, this method still yields constant fold errors so long as the species efficiencies (including those of the spike-in) are constant across samples (Appendix \@ref(total-density-ref)).
4 changes: 2 additions & 2 deletions solutions.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Consider the popular method of assessing bacterial abundance with total-16S qPCR
Even an ideal qPCR protocol that perfectly amplifies all species remains a biased measurement of cell density, since the total 16S copies in the extracted DNA contributed by each species will be proportional to its (species-specific) lysis efficiency and 16S copy-number.
16S qPCR is commonly paired with 16S amplicon sequencing, with which these sources of bias are shared, perhaps along with variation in primer binding and amplification efficiency.
Methods like using flow cytometry that directly measures cell density lacks these biases but likely have their own that are more likely to be orthogonal to the 16S sequencing measurement.
By extending the analysis of Section \@ref(differential-abundance) to include consistent taxonomic bias in the total-density measurement, we find that pairings of total-density and sequencing measurements that share large sources of taxonomic bias can lead to an offsetting of errors that reduces the error in fold-change measurement and DA inference (Appendix \@ref(appendix-total-density)).
By extending the analysis of Section \@ref(differential-abundance) to include consistent taxonomic bias in the total-density measurement, we find that pairings of total-density and sequencing measurements that share large sources of taxonomic bias can lead to an offsetting of errors that reduces the error in fold-change measurement and DA inference (Appendix \@ref(total-density-bias)).
This finding suggests that methods of total-density measurement that are more accurate as measures of total cell density may actually perform worse than less accurate methods for the purposes of absolute DA inference.

We illustrate with a hypothetical example of two vaginal communities of equal density, but which are dominated either by _Lactobacillus iners_ or _Gardnerella vaginalis_.
Expand All @@ -84,7 +84,7 @@ If the (log) efficiencies of the total and sequencing measurement are positively
These observations suggest that qPCR of a marker gene may be the ideal pairing for amplicon sequencing measurements, despite being a poor measure of changes in total cell density.
Similarly, bulk DNA quantification may be an ideal pairing for shotgun sequencing, making it possible to account for variation in lysis efficiency and genome length.
These pairings even make it possible to account for error caused by variation among samples in the fraction of unclassified reads, which can form a major fraction of amplicon and shotgun data.
Importantly, maximizing the offsetting of errors requires thoughtful choices during bioinformatic analysis, perhaps eschewing the filtering and normalization steps used in many software packages and workflows (Appendix \@ref(appendix-total-density)).
Importantly, maximizing the offsetting of errors requires thoughtful choices during bioinformatic analysis, perhaps eschewing the filtering and normalization steps used in many software packages and workflows (Appendix \@ref(total-density-bias)).

## Bias-sensitivity analysis

Expand Down

0 comments on commit 8f81dd5

Please sign in to comment.