BAITS.VDJ.tl.calculate_qc_umis#
- BAITS.VDJ.tl.calculate_qc_umis(df, group_by, Cgene_col, clone_col, loc_x_col='X', loc_y_col='Y', plot=True, figsize=(7, 3.5))#
Compute per-group and per-spatial-location UMI counts for clones.
- Parameters:
df (pandas.DataFrame) – Input dataframe containing clone, chain, and spatial information.
group_by (str) – Column name to group by (e.g., sample or tissue region).
Cgene_col (str) – Column name for chain (Cgene).
clone_col (str) – Column containing clone identifiers.
loc_x_col (str, default='X') – Column name for x-coordinate.
loc_y_col (str, default='Y') – Column name for y-coordinate.
plot (bool, default=True) – Whether to generate QC boxplots.
figsize (tuple, default=(7,3.5)) – Figure size for plots.
- Returns:
Original dataframe with additional columns: - ‘umis_by_group’: total UMIs per group - ‘umis_by_group_spatialLoc’: total UMIs per spatial location
- Return type:
pandas.DataFrame