bc_summary_barcode: Summary and evaluate barcode diversity

bc_summary_barcodeR Documentation

Summary and evaluate barcode diversity

Description

bc_summary_barcode evaluates sequence diversity metrics using the barcodes data in the cleanBc slot of BarcodeObj object. It also generates Lorenz curve and barcode frequency distribution graphs.

Usage

bc_summary_barcode(barcodeObj, plot = TRUE, log_x = TRUE)

## S4 method for signature 'BarcodeObj'
bc_summary_barcode(barcodeObj, plot = TRUE, log_x = TRUE)

Arguments

barcodeObj

A BarcodeObj object.

plot

A logical value, if TRUE, draw the Lorenz curve and barcode distribution graphs.

log_x

A logical value, if TRUE, the x axis is logarized.

Details

Followings are the metrics used for evaluating the barcode diversity:

Richness: The unique barcodes number R, it evaluates the richness of the barcodes.

Shannon index: Shannon diversity index is weighted geometric average of the proportion p of barcodes.

H' = - \sum_{i=1}^{R}p_ilnp_i

Equitability index: Shannon equitability E_H characterize the evenness of the barcodes, it is a value between 0 and 1, with 1 being complete evenness.

E_H = H' / H'_{max} = H / ln(R)

Bit: Shannon entropy H, with a units of bit,

H = - \sum_{i=1}^{R}p_ilog_2p_i

Value

A data.frame with the following columns:

  • total_reads: total read number.

  • uniq_barcode: how many barcodes in the dataset.

  • shannon_index: Shannon's diversity index or Shannon–Wiener index.

  • equitability_index: Shannon's equitability.

  • bit_index: Shannon bit information.

Examples

data(bc_obj)

# filter barcode by the depth
bc_obj <- bc_cure_depth(bc_obj)

# Output the summary of the barcodes
bc_summary_barcode(bc_obj)

wenjie1991/CellBarcode documentation built on Aug. 10, 2024, 11:02 a.m.