tidesurf.counter.UMICounter.count#
- UMICounter.count(bam_file: str, filter_cells: bool = False, whitelist: Optional[str] = None, num_umis: int = -1) Tuple[ndarray, ndarray, Dict[str, csr_matrix]]#
Count UMIs with reads mapping to transcripts.
- Parameters:
- bam_file str
Path to BAM file.
- filter_cells bool
Whether to filter cells (default:
False).- whitelist str | None
If
filter_cellsis True: path to cell barcode whitelist file. Mutually exclusive withnum_umis(default:None).- num_umis int
If
filter_cellsis True: set to an integer to only keep cells with at least that many UMIs. Mutually exclusive withwhitelist(default:-1; corresponds to not filtering based on number of UMIs).
- Returns:
Cells (array of shape
(n_cells,)), genes (array of shape(n_genes,)), counts (dictionary with sparse matrices of shape(n_cells, n_genes)for spliced, unspliced, and ambiguous).- Return type: