frac_reads

besca.pp.frac_reads(adata)[source]

Cacluate the fraction of reads being attributed to a specific gene.

calculates the fraction of reads that are attributed to a specific gene over the entire dataset. This easily lets you identify genes which dominate all the reads in a dataset.

Parameters:
  • adata (AnnData) – The annotated data matrix.

  • threshold (int | default = 0) – Integer defining the value above which a gene is deemed as being expressed.

Returns:

updates the:class:~anndata.AnnData object adding frac_reads to adata.var.

Return type:

None

Example

>>> import besca as bc
>>> adata = bc.datasets.simulated_pbmc3k_raw()
>>> bc.pp.frac_reads(adata)