cellflow.preprocessing.get_molecular_fingerprints¶
- cellflow.preprocessing.get_molecular_fingerprints(adata, compound_keys, smiles_keys=None, control_value='control', uns_key_added='fingerprints', radius=4, n_bits=1024, copy=False)[source]¶
Computes Morgan fingerprints for compounds in
adataand stores them inuns.- Parameters:
adata – An
AnnDataobject.compound_keys (
str|list[str]) – Key(s) inobscontaining the compound identifiers.smiles_keys (
str|None) – Key(s) inobscontaining the SMILES strings. IfNone, usesf"{compound_key}_smiles".radius (
int) – Radius of the Morgan fingerprints.n_bits (
int) – Number of bits in the fingerprint.copy (
bool) – Return a copy ofadatainstead of updating it in place.
- Return type:
None|AnnData- Returns:
: Updates
unswith the computed fingerprints.Sets the following fields:
.uns[uns_key_added]: Dictionary containing the fingerprints for each compound.