.var
- proteopy.ann.var(adata, df, var_on, df_on, *, suffix='_annotated', sort_var_by_ann=False, inplace=True)[source]
Annotate
adata.varwith rows fromdfmatched on a key.- Parameters:
adata (AnnData) – Input AnnData object.
df (pandas.DataFrame) – Annotation table that supplies additional columns.
var_on (str) – Name of the key column in
adata.var(or the var index name / literal"index") used for matching.df_on (str) – Name of the key column in
df.suffix (str, optional) – Suffix applied to colliding column names from
df.sort_var_by_ann (bool, optional) – Reorder variables by the order of matching keys in
df.inplace (bool, optional) – If
True, modifyadataand returnNone. Otherwise return a new AnnData copy.
- Returns:
Updated AnnData when
inplaceisFalse; otherwiseNone.- Return type:
AnnData or None