glue_genes.glue_genomics_data.multires_data.ReducedResolutionData#

class glue_genes.glue_genomics_data.multires_data.ReducedResolutionData(label='', coords=None, parent=None, scale_factor=1, reduced_dims=[], **kwargs)#

A simple data class that represents reduced resolution versions of data in a MultiResolutionData object

Parameters:
parent~.MultiResolutionData

The parent MulitResolutionData that this object is a reducted-resolution version of.

scale_factorint

The scale factor between this data and parent. Currently only a single value, since it must be the same in all dimensions

TODO: Check that any of this works for world coordinate components
__init__(label='', coords=None, parent=None, scale_factor=1, reduced_dims=[], **kwargs)#

Methods

__init__([label, coords, parent, ...])

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[, ...])

Compute a statistic for the data.

convert_full_to_reduced_cid(cid[, downsample])

This translates the full resolution cid to the reduced resolution cid

convert_reduced_to_full_cid(cid[, upsample])

This translates the reduced resolution cid to the full resolution cid

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])

In the case were we are trying to get a pixel cid from the original dataset we want to return the reduced pixel, otherwise we do the normal thing and we could simplify this logic to call the parent method

get_kind(cid)

Get the kind of data for a given component.

get_mask(subset_state[, view])

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

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.