scvi.data.fields.MuDataNumericalJointObsField#

class scvi.data.fields.MuDataNumericalJointObsField(*args, mod_key=None, mod_required=False, **kwargs)#

Attributes table#

adata_field

class"~scvi.data.fields.AnnDataField instance that this class instance wraps.

attr_key

The key of the data field within the relevant AnnData/MuData attribute.

attr_name

The name of the AnnData/MuData attribute where the data is stored.

is_empty

Returns True if the field is empty as a function of its kwargs.

mod_key

The modality key of the data field within the MuData (if applicable).

registry_key

The key that is referenced by models via a data loader.

Methods table#

get_data_registry()

Returns a nested dictionary which describes the mapping to the data field.

get_field_data(adata)

Returns the requested data as determined by the field for a given AnnData/MuData object.

get_modality(mdata)

Fetches the appropriate modality from the MuData object using self.mod_key.

get_summary_stats(state_registry)

Get summary stats.

preregister(mdata)

Function that is called prior to registering fields.

register_field(mdata)

Register the field.

transfer_field(state_registry, mdata_target, ...)

Transfer the field.

validate_field(mdata)

Validate the field.

view_state_registry(state_registry)

View the state registry.

Attributes#

adata_field

MuDataNumericalJointObsField.adata_field[source]#

class”~scvi.data.fields.AnnDataField instance that this class instance wraps.

attr_key

MuDataNumericalJointObsField.attr_key[source]#

The key of the data field within the relevant AnnData/MuData attribute.

attr_name

MuDataNumericalJointObsField.attr_name[source]#

The name of the AnnData/MuData attribute where the data is stored.

is_empty

MuDataNumericalJointObsField.is_empty[source]#

mod_key

MuDataNumericalJointObsField.mod_key[source]#

The modality key of the data field within the MuData (if applicable).

registry_key

MuDataNumericalJointObsField.registry_key[source]#

The key that is referenced by models via a data loader.

Methods#

get_data_registry

MuDataNumericalJointObsField.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:

dict

get_field_data

MuDataNumericalJointObsField.get_field_data(adata)[source]#

Returns the requested data as determined by the field for a given AnnData/MuData object.

Return type:

Union[ndarray, DataFrame]

get_modality

MuDataNumericalJointObsField.get_modality(mdata)[source]#

Fetches the appropriate modality from the MuData object using self.mod_key.

Return type:

Union[AnnData, MuData]

get_summary_stats

MuDataNumericalJointObsField.get_summary_stats(state_registry)[source]#

Get summary stats.

Return type:

dict

preregister

MuDataNumericalJointObsField.preregister(mdata)[source]#

Function that is called prior to registering fields.

Function that is be called at the beginning of register_field() and transfer_field(). Used when data manipulation is necessary across modalities.

Return type:

None

register_field

MuDataNumericalJointObsField.register_field(mdata)[source]#

Register the field.

Return type:

dict

transfer_field

MuDataNumericalJointObsField.transfer_field(state_registry, mdata_target, **kwargs)[source]#

Transfer the field.

Return type:

dict

validate_field

MuDataNumericalJointObsField.validate_field(mdata)[source]#

Validate the field.

Return type:

None

view_state_registry

MuDataNumericalJointObsField.view_state_registry(state_registry)[source]#

View the state registry.

Return type:

Optional[Table]