grassp.tl.resolve_diffusion#
- resolve_diffusion(data, gene_sets, key_added='ann_diffusion', mode='likelihood', min_term_size=0, term_threshold=0.5, eta=1.0, tau=0.4, maxk=3, cap=12, gene_key='gene_symbol', species='hsap', out_key=None, inplace=True)[source]#
(Re)resolve stored diffusion probabilities into a per-protein label, in place.
Reads
obsm[{key_added}_probabilities](written byindependent_diffusion()) and writesobs[out_key], which defaults tokey_addedfor likelihood/argmax – overwriting the primary call, since that is what re-resolving means – and tof"{key_added}_specific"for specific, so an alternative resolution sits beside the default rather than replacing it.modeandmin_term_sizeare as inindependent_diffusion(). Lets you obtain several resolutions (e.g. likelihood and specific) or sweepmin_term_sizewithout re-diffusing. Withinplace=Falsethe labels are written to a copy, which is returned.