igaprobability: IgA Probability

Description Usage Arguments Details Value Examples

View source: R/igaprobability.R

Description

Calculate the IgA Postive/Negative Probability as described in Jackson et al. (2020, doi: 10.1101/2020.08.19.257501).

Usage

1
igaprobability(withinabund, gatesize, presortabund, nazeros = TRUE)

Arguments

withinabund

Abundance of the bacteria in the IgA gate under investigation (can be calculated for either the pos/high or neg/low gating) (abundances should sum to 1 not as a %).

gatesize

The fraction of events in the flow cytometer within the gate under investigation (as a decimal fraction not a %).

presortabund

Abundance of the bacteria in whole sample before sorting by IgA (abundances should sum to 1 not as a %).

nazeros

Return NA if the within and tot abundances are both zero. Default is TRUE.

Details

This function calculates the conditional probability that at bacteria will be sufficiently bound/not bound to immunoglobulin A (IgA) to end up in a given IgA gate based on its taxonomy. Calculated on one taxa for one sample.

This uses Bayes' theorem assuming:

Further details can be found in Jackson et al. (2020, doi: 10.1101/2020.08.19.257501).

Value

A numeric value for the IgA Positive/Negative Probability (depending on the data used for 'withinabund' and 'gatesize') as defined in Jackson et al. (2020, doi: 10.1101/2020.08.19.257501).

Examples

1
igaprobability(withinabund=0.5,gatesize=0.05,presortabund=0.5)

IgAScores documentation built on Sept. 1, 2020, 9:08 a.m.