lamindb.core.FeatureManager¶
- class lamindb.core.FeatureManager(host)¶
Bases:
object
Feature manager (
features
).See
Data
for more information.Attributes
- accessor_by_orm property¶
Accessor by ORM.
- feature_set_by_slot property¶
Feature sets by slot.
Methods
- add(features_values, slot=None, feature_field=FieldAttr(Feature.name))¶
Add features stratified by slot.
- Parameters:
features_values (
dict
[str
,str
|int
|float
|bool
]) – A dictionary of features & values. You can also pass{feature_identifier: None}
to skip annotation by values.slot (
str
|None
, default:None
) – The access slot of the feature sets in the artifact. For instance,.columns
forDataFrame
or.var
or.obs
forAnnData
.feature_field (
DeferredAttribute
, default:FieldAttr(Feature.name)
) – The field of a reference registry to map values.
- add_feature_set(feature_set, slot)¶
Add new feature set to a slot.
- Parameters:
feature_set (
FeatureSet
) –FeatureSet
A feature set object.slot (
str
) –str
The access slot.
- add_from_anndata(var_field, obs_field=FieldAttr(Feature.name), mute=False, organism=None)¶
Add features from AnnData.
- add_from_df(field=FieldAttr(Feature.name), organism=None)¶
Add features from DataFrame.
- add_from_mudata(var_fields, obs_fields=None, mute=False, organism=None)¶
Add features from MuData.