rna_majiq.SJJunctionsBins

class rna_majiq.SJJunctionsBins(sj_junctionsbins, strandness, original_path, original_version, original_time, prefix=None, **additional_metadata)

Per-bin read coverage over junctions

Parameters:
  • sj_intronsbins (_SJIntronsBins) – Underlying object binding the internal C++ API

  • strandness (ExperimentStrandness) – strandness that was used for the experiment

  • original_path (str) – Original path to BAM file from which coverage was derived

  • original_version, original_time (str) – Version of MAJIQ and time BAM file was processed

See also

SJExperiment.from_bam, SJJunctionsBins.from_bam, SJJunctionsBins.from_zarr

__init__(sj_junctionsbins, strandness, original_path, original_version, original_time, prefix=None, **additional_metadata)

Methods

__init__(sj_junctionsbins, strandness, ...)

flip_strand()

Flip +/- strand reads to -/+ strand reads

from_arrays(regions, bin_reads, bin_idx, ...)

Create SJJunctionsBins from SJJunctions, arrays, metadata

from_bam(path[, strandness, nthreads])

Load SJJunctionsBins from BAM file

from_zarr(store)

Load SJJunctionsBins from zarr format

numbins([region_idx, minreads])

Number of bins for regions with at least specified number of reads

numreads([region_idx, numstacks])

Calculate total number of reads at specified regions with stacks

numstacks([region_idx, pvalue_threshold])

Calculate number of stacks at specified regions/pvalues

prefix_from_zarr(store)

Extract prefix from zarr with SJJunctionsBins

project_reads(new_junctions, new_strandness)

Project reads from self onto matching junctions in new_junctions

rename_prefix(new_prefix)

Create updated self where self.prefix is set to new_prefix

to_unstranded()

Convert stranded junction reads to unstranded junctions

to_zarr(store[, mode, consolidated])

Serialize to zarr format

with_summaries(regions, numreads, numbins, ...)

Create SJJunctionsBins with uniform coverage over nonzero bins

Attributes

IDX_NAME

bin_idx

index of each bin on each region

bin_reads

number of reads for each region/bin

bin_reads_2d

2D array representation of reads per region/bin

df

View of read counts per bin (combined with underlying regions)

original_path

original_time

original_version

prefix

Experiment name associated with these bin reads.

regions

sjb_idx

sjb_idx_end

sjb_idx_start

strandness

total_bins

total possible number of bins (defined by positions for junctions)