iss_patcher.patch_twostep
- iss_patcher.patch_twostep(iss, gex, annot_key, min_genes=3, obs_to_take=None, cont_obs_to_take=None, nanmean=False, round_counts=True, chunk_size=100000, computation='annoy', neighbours_annot=15, neighbours=15, obsm_fraction=False, obsm_pbs=False)
A two-step version of the procedure, identifying each low dimensional cell’s KNN in the shared high dimensional feature space in the first go, and then finding each low dimensional cell’s KNN only among the high dimensional cells matching in annotation. Prior to execution, high dimensional cells annotated with categories with fewer than
neighbourstotal representatives are removed.annot_key-derived entries in the output object are based on the first-pass KNN on the full space, all other transferredgex.obsare based on the second pass subset KNNs.All undescribed arguments as in
ip.patch().Input
- annot_key
str gex.obskey to use as the annotation.- neighbours_annot
int, optional (default: 15) How many neighbours in
gexto identify for eachisscell when performing the first annotation step.- neighbours
int, optional (default: 15) How many neighbours in
gexto identify for eachisscell when performing the second within-cell-type step.- obsm_fraction
bool, optional (default:False) If
True, will additionally store theannot_keycell fractions from the first pass KNN.- obsm_pbs
bool, optional (default:False) If
True, will additionally store the first pass annotation determining KNN in.obsm['pbs_annot'].
- annot_key