Calibration via the simple deterministic procedure described in McLaren, Willis, and Callahan (2019), simply involved dividing the observed vector of relative abundances by the estimated bias vector and (optionally) normalizing the result to sum to 1 or some other chosen value.

calibrate(observed, bias, ...)

# S3 method for matrix
calibrate(observed, bias, margin, norm = "close")

# S3 method for otu_table
calibrate(observed, bias, norm = "close")

# S3 method for phyloseq
calibrate(observed, bias, norm = "close")

Arguments

observed

An abundance matrix or phyloseq object containing one

bias

A numeric vector of relative efficiencies

margin

Matrix margin that corresponds to observations (samples); 1 for rows, 2 for columns

norm

String specifying how to normalize the calibrated observations; see Details.

Details

Normalization options specified by norm:

  • "close": Divide the calibrated abundance vector by its sum, so that it sums to 1

  • "keep": Keep the same total abundance as the original observation

  • "none": Return the calibrated abundances without any normalization

If bias is named, then the names must agree with the taxa names in observed and will be used to reorder bias to match the taxa order in observed.

See also