JunctionData#

class alphagenome.data.junction_data.JunctionData(junctions, values, metadata, interval=None, uns=None)[source]#

Container for storing splice junction data.

junctions#

A numpy array representing the splice junctions.

values#

A numpy array of floats representing the values associated with each junction for each track.

metadata#

A pandas DataFrame containing metadata for each track.

interval#

An optional Interval object representing the genomic region containing the junctions.

uns#

An optional dictionary to store additional unstructured data.

Raises:

ValueError – If the number of tracks in values does not match the number of rows in metadata, or if metadata contains duplicate names.

Methods

filter_by_name(name)

Filters tracks by name.

filter_by_ontology(ontology_curie)

Filters tracks by ontology term.

filter_by_tissue(tissue)

Filters tracks by GTEx tissue type.

filter_to_negative_strand()

Filters junctions to the negative DNA strand.

filter_to_observed()

Filters tracks to observed tracks.

filter_to_positive_strand()

Filters junctions to the positive DNA strand.

filter_to_strand(strand)

Filters junctions to a specific DNA strand.

filter_tracks(mask)

Filters tracks by a boolean mask.

intersect_with_interval(interval)

Returns the intersection of the junctions and the interval.

normalize_values([total_k])

Normalizes the values by the k value.

with_metadata_column(name, value)

Returns a new JunctionData with an added/updated metadata column.

with_name_suffix(suffix)

Returns a new JunctionData with a suffix added to all track names.