scvi.data.fields.CategoricalJointObsField#
- class scvi.data.fields.CategoricalJointObsField(*args, **kwargs)[source]#
An AnnDataField for a collection of categorical .obs fields in the AnnData data structure.
Attributes table#
The key of the data field within the relevant AnnData attribute. |
|
List of .obs or .var keys that make up this joint field. |
|
The name of the AnnData attribute where the data is stored. |
|
Returns True if the field is empty as a function of its kwargs. |
|
The modality key of the data field within the MuData (if applicable). |
|
The key that is referenced by models via a data loader. |
|
Methods table#
Returns a nested dictionary which describes the mapping to the data field. |
|
|
Returns the requested data as determined by the field for a given AnnData/MuData object. |
|
Get summary stats. |
|
Register the field. |
|
Transfer the field. |
|
Validate the field. |
|
View the state registry. |
Attributes#
FIELD_KEYS_KEY
- CategoricalJointObsField.FIELD_KEYS_KEY = 'field_keys'#
MAPPINGS_KEY
- CategoricalJointObsField.MAPPINGS_KEY = 'mappings'#
N_CATS_PER_KEY
- CategoricalJointObsField.N_CATS_PER_KEY = 'n_cats_per_key'#
attr_key
attr_keys
- CategoricalJointObsField.attr_keys[source]#
List of .obs or .var keys that make up this joint field.
attr_name
is_empty
mod_key
- CategoricalJointObsField.mod_key[source]#
The modality key of the data field within the MuData (if applicable).
registry_key
source_attr_name
Methods#
get_data_registry
- CategoricalJointObsField.get_data_registry()[source]#
Returns a nested dictionary which describes the mapping to the data field.
The dictionary is of the form {“mod_key”: mod_key, “attr_name”: attr_name, “attr_key”: attr_key}. This mapping is then combined with the mappings of other fields to make up the data registry.
- Return type:
get_field_data
- CategoricalJointObsField.get_field_data(adata)[source]#
Returns the requested data as determined by the field for a given AnnData/MuData object.
get_summary_stats
register_field
transfer_field
- CategoricalJointObsField.transfer_field(state_registry, adata_target, extend_categories=False, **kwargs)[source]#
Transfer the field.
validate_field
- CategoricalJointObsField.validate_field(adata)[source]#
Validate the field.
- Parameters:
adata (AnnData) –
- Return type:
None
view_state_registry