GeneExpressionData#
- class alphagenome.data.gene_expression_data.GeneExpressionData(values, track_metadata, gene_metadata, interval)[source]#
Container for storing gene expression data.
Used to store gene-level predictions for denoised single-cell gene expression (
SC_GENE_EXPRESSION_DENOISED; one channel per strand, in CPM) and protocol-specific single-cell gene expression (SC_GENE_EXPRESSION, in CPM).- values#
A numpy array of floats representing the gene expression for each track.
- track_metadata#
A pandas DataFrame containing metadata for each track.
- gene_metadata#
A pandas DataFrame containing metadata for each gene.
- interval#
An
Intervalobject representing the genomic region containing the genes.
- names#
Array of track names from
track_metadata['name'].
- strands#
Array of track strands from
track_metadata['strand'].
- num_tracks#
Total number of tracks along axis 1 of
values.
- Raises:
ValueError – If the number of tracks in
valuesdoes not match the number of rows intrack_metadata, or if the number of gene invaluesdoes not match the number of rows ingene_metadataor iftrack_metadatacontains duplicate names.
Methods
|
Returns a deep copy of the |
Filters tracks to the negative DNA strand. |
|
Filters tracks to the non-negative DNA strands (positive and unstranded). |
|
Filters tracks to the non-positive DNA strands (negative and unstranded). |
|
Filters tracks to observed tracks. |
|
Filters tracks to the positive DNA strand. |
|
Filters data to protein coding genes only. |
|
Filters tracks to stranded tracks (excluding unstranded). |
|
Filters tracks to unstranded tracks. |
|
|
Filters tracks by a boolean mask. |
Returns the gene intervals as a sequence of |
|
|
Resizes the interval, removing genes falling outside the new width. |
Selects tracks by numerical index. |
|
|
Slices the |
Converts the |
|
|
Returns a new |
|
Returns a new |