glue_genes.glue_single_cell.data.DataAnnData#

class glue_genes.glue_single_cell.data.DataAnnData(label='', full_anndata_obj=None, backed=False, coords=None, **kwargs)#

A Data class to handle on-disk and sparse access to a large AnnData X matrix.

Attributes:
Xdata

The full AnnData object, accessible for analysis functions that need one.

listenerslist

Any GeneSummaryListener associated with this object.

backedbool

True if the matrix is not loaded into memory but is accessed from the disk.

sparsebool

True if the underlying matrix is sparse

__init__(label='', full_anndata_obj=None, backed=False, coords=None, **kwargs)#

Methods

__init__([label, full_anndata_obj, backed, ...])

add_component(component, label)

Add a new component to this data set.

add_component_link(link[, label])

Shortcut method for generating a new DerivedComponent from a ComponentLink object, and adding it to a data set.

add_subset(subset[, label])

Assign a pre-existing subset to this data object.

broadcast(attribute)

Send a DataUpdateMessage to the hub

component_ids()

Equivalent to Data.components

compute_fixed_resolution_buffer(*args, **kwargs)

Get a fixed-resolution buffer.

compute_histogram(cids[, weights, range, ...])

Compute an n-dimensional histogram with regularly spaced bins.

compute_statistic(statistic, cid[, axis, ...])

Compute a statistic for the data.

dtype(cid)

Lookup the dtype for the data associated with a ComponentID

find_component_id(label)

Retrieve component_ids associated by label name.

get_component(component_id)

Fetch the component corresponding to component_id.

get_data(cid[, view, keep_sparse])

Get the data values for a given component.

get_kind(cid)

Get the kind of data for a given component.

get_mask(subset_state[, view])

Do not allow subset_states to propagate through X matrix.

get_object([cls])

Get the dataset represented as a non-glue object, using the translation infrastructure.

get_selection_definition([subset_id, format])

Get subset state represented as a non-glue object, using the translation infrastructure.

get_subset_object([subset_id, cls])

Get a subset represented as a non-glue object, using the translation infrastructure.

join_on_key(other, cid, cid_other)

Create an element mapping to another dataset, by joining on values of ComponentIDs in both datasets.

new_subset([subset])

Create a new subset, and attach to self.

register_to_hub(hub)

Connect to a hub.

remove_component(component_id)

Remove a component from a data set

reorder_components(component_ids)

Reorder the components using a list of component IDs.

to_dataframe([index])

Convert the Data object into a pandas.DataFrame object.

update_components(mapping)

Change the numerical data associated with some of the Components in this Data object.

update_id(old, new)

Reassign a component to a different glue.core.component_id.ComponentID

update_values_from_data(data)

Replace numerical values in data to match values from another dataset.

Attributes

Xdata

The full AnnData object, accessible for analysis functions that need one.

components

All ComponentIDs in the Data.

coordinate_components

The ComponentIDs associated with a CoordinateComponent.

coordinate_links

A list of the ComponentLinks that connect pixel and world.

coords

The coordinates object for the data.

data

derived_components

The ComponentIDs for each DerivedComponent.

derived_links

A list of the links present inside all of the DerivedComponent objects in this dataset.

externally_derivable_components

label

The name of the dataset

links

A list of all the links internal to the dataset.

main_components

ndim

The number of dimensions of the data, as an integer.

pixel_aligned_data

Information about other datasets in the same data collection that have matching or a subset of pixel component IDs.

pixel_component_ids

The ComponentIDs for each pixel coordinate.

primary_components

The ComponentIDs not associated with a DerivedComponent

shape

The n-dimensional shape of the dataset, as a tuple.

size

The size of the data (the product of the shape dimensions), as an integer.

subsets

Tuple of subsets attached to this dataset.

visible_components

All ComponentIDs in the Data that aren't coordinates.

world_component_ids

The ComponentIDs for each world coordinate.