tacco.tools.annotate_novosparc¶
- annotate_novosparc(adata, reference, annotation_key=None, counts_location=None, position_key=('x', 'y'), alpha=1.0, reads=False)[source]¶
Annotates an
AnnData
using reference data by NovoSpaRc [Nitzan19].This is the direct interface to this annotation method. In practice using the general wrapper
annotate()
is recommended due to its higher flexibility.- Parameters:
adata – An
AnnData
including expression data in .X.reference – Reference data to get the annotation definition from.
annotation_key – The .obs key where the annotation is stored in the reference. If None, it is inferred from reference, if possible.
counts_location – A string or tuple specifying where the count matrix is stored, e.g. ‘X’, (‘raw’,’X’), (‘raw’,’obsm’,’my_counts_key’), (‘layer’,’my_counts_key’), … For details see
counts()
.position_key – The .obsm key or array-like of .obs keys with the position space coordinates. If alpha==1, this is not referenced.
alpha – The alpha parameter of NovoSpaRc.
reads – Whether to reduce the mapping to types using the counts per reference observation as weights or just flat weights per cell.
- Returns:
Returns the annotation in a
DataFrame
.