scvi.data.fields.MuDataObsmField#
- class scvi.data.fields.MuDataObsmField(*args, mod_key=None, mod_required=False, **kwargs)#
Attributes table#
class"~scvi.data.fields.AnnDataField instance that this class instance wraps. |
|
The key of the data field within the relevant AnnData/MuData attribute. |
|
The name of the AnnData/MuData 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. |
|
Fetches the appropriate modality from the MuData object using |
|
Get summary stats. |
|
Function that is called prior to registering fields. |
|
Register the field. |
|
Transfer the field. |
|
Validate the field. |
|
View the state registry. |
Attributes#
- MuDataObsmField.adata_field[source]#
class”~scvi.data.fields.AnnDataField instance that this class instance wraps.
- MuDataObsmField.attr_key[source]#
The key of the data field within the relevant AnnData/MuData attribute.
- MuDataObsmField.attr_name[source]#
The name of the AnnData/MuData attribute where the data is stored.
Methods#
- MuDataObsmField.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:
- MuDataObsmField.get_field_data(adata)[source]#
Returns the requested data as determined by the field.
- MuDataObsmField.get_modality(mdata)[source]#
Fetches the appropriate modality from the MuData object using
self.mod_key
.
- MuDataObsmField.preregister(mdata)[source]#
Function that is called prior to registering fields.
Function that is be called at the beginning of
register_field()
andtransfer_field()
. Used when data manipulation is necessary across modalities.- Return type: