bin2cell.destripe

bin2cell.destripe(adata, quantile=0.99, counts_key='n_counts', factor_key='destripe_factor', adjusted_counts_key='n_counts_adjusted', adjust_counts=True)

Correct the raw counts of the input object for known variable width of VisiumHD 2um bins. Scales the total UMIs per bin on a per-row and per-column basis, dividing by the specified quantile. The resulting value is stored in .obs[factor_key], and is multiplied by the corresponding total UMI quantile to get .obs[adjusted_counts_key].

Input

adataAnnData

2um bin VisiumHD object. Raw counts, needs to have counts_key in .obs.

quantilefloat, optional (default: 0.99)

Which row/column quantile to use for the computation.

counts_keystr, optional (default: "n_counts")

Name of .obs column with raw counts per bin.

factor_keystr, optional (default: "destripe_factor")

Name of .obs column to hold computed factor prior to reversing to count space.

adjusted_counts_keystr, optional (default: "n_counts_adjusted")

Name of .obs column for storing the destriped counts per bin.

adjust_countsbool, optional (default: True)

Whether to use the computed adjusted count total to adjust the counts in adata.X.