bc_summary_barcode: Summary and evaluate barcode diversity

bc_summary_barcodeR Documentation

Summary and evaluate barcode diversity


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.


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

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



A BarcodeObj object.


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


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


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


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.



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

# Output the summary of the barcodes

wenjie1991/CellBarocde documentation built on Nov. 1, 2023, 9:36 p.m.