rna_majiq.SJExperiment

class rna_majiq.SJExperiment(introns, junctions)

Spliced junction and retained intron coverage for the same experiment.

Junctions and retained introns are defined over contigs, not genes (i.e. ContigIntrons, ContigJunctions, not GeneIntrons, GeneJunctions). Coverage assigned to these regions is later mapped to their gene equivalents (matching contig and strand; matching coordinates for junctions, matching annotated status and overlapping coordinates for introns).

Coverage is obtained over unique bins. Bins represent positions at which the start of the feature would intersect the aligned read. In the case of junctions, there is a single bin for each possible position, so the total number of bins/positions is determined by the maximum read length. For introns, nonzero length increases the total number of possible positions. In order to treat introns and junctions similarly, MAJIQ groups together contiguous positions into the same number of bins as junctions.

This is represented by:

Parameters:

See also

SJExperiment.from_bam

Load SJExperiment from BAM file

SJExperiment.from_zarr

Load SJExperiment saved to Zarr file

__init__(introns, junctions)

Initialize SJExperiment with intron and junction coverage

Parameters:

Notes

Enforces requirement that introns and junctions share the same original (bam) path and version of majiq used to do parsing

Methods

__init__(introns, junctions)

Initialize SJExperiment with intron and junction coverage

detect_strand(sj_junctions, sg[, minreads, ...])

Return SJJunctionsBins with appropriate strandness

from_SJJunctionsBins(junctions)

Return SJExperiment with junction coverage, no introns

from_bam(path, sg[, strandness, nthreads, ...])

Load SJExperiment from BAM file

from_zarr(store)

Load SJExperiment from specified path

prefix_from_zarr(path)

Extract prefix from SJExperiment zarr path without loading entire file

rename_prefix(new_prefix)

Create updated SJExperiment with renamed prefix

to_zarr(store[, mode, consolidated])

Save SJExperiment to specified path/store

Attributes

introns

SJIntronsBins with intron coverage for this experiment

junctions

SJJunctionsBins with junctioncoverage for this experiment

original_path

Path to BAM file that was processed for coverage

original_version

Version of MAJIQ that was used to process the coverage

prefix

Experiment name associated with this SJExperiment