troutpy.pp.compute_extracellular_counts#
- troutpy.pp.compute_extracellular_counts(data_extracell)#
Compute observed and expected transcript counts, log fold-ratio over baseline, and codeword category per gene for extracellular transcripts.
- Parameters:
data_extracell (pandas.DataFrame) – DataFrame of extracellular transcripts. Must contain a
feature_namecolumn with gene identifiers and acodeword_categorycolumn with probe category labels.- Returns:
-extracellular_counts (
DataFrame) DataFrame indexed by gene name with columns:observed: int — raw transcript count per gene.expected: int — uniform expected count (total / number of genes).fold_ratio: float — log(observed / expected).codeword_category: str — probe category for each gene.