scviva.data.NeighborhoodGraphField#
- class scviva.data.NeighborhoodGraphField(obsm_key)[source]#
AnnData obsm field for neighbor index/distance arrays.
Stores dense numpy arrays. Squidpy outputs sparse CSR matrices — this field converts them to dense on registration (documented behavior). Keys:
index_neighboranddistance_neighbor(matching upstream ResolVI).- Parameters:
- obsm_key
str Key to access the neighbor graph in
adata.obsm.
- obsm_key
Attributes table
The key of the data field within the relevant AnnData attribute. |
|
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. |
|
|
Get the neighbor graph array from |
|
Get summary stats. |
|
Register the field. |
|
Transfer the field. |
|
Validate the field. |
|
View the state registry. |
Attributes
- NeighborhoodGraphField.COLUMN_NAMES_KEY = 'column_names'#
- NeighborhoodGraphField.attr_key#
- NeighborhoodGraphField.attr_name#
- NeighborhoodGraphField.is_empty#
- NeighborhoodGraphField.mod_key#
The modality key of the data field within the MuData (if applicable).
- NeighborhoodGraphField.registry_key#
Methods
- NeighborhoodGraphField.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:
- NeighborhoodGraphField.get_field_data(adata)[source]#
Get the neighbor graph array from
adata.obsmas a dense numpy array.- Parameters:
- adata
AnnData object containing the neighbor array in
adata.obsm[obsm_key].
- Returns:
Dense
ndarray; sparse inputs are converted withtoarray().