new_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++ APIstrandness (
ExperimentStrandness
) – strandness that was used for the experimentoriginal_path (
str
) – Original path to BAM file from which coverage was derivedoriginal_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
fromSJJunctions
, arrays, metadatafrom_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
project_reads
(new_junctions, new_strandness)Project reads from self onto matching junctions in new_junctions
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 binsAttributes
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
regions
sjb_idx
sjb_idx_end
sjb_idx_start
strandness
total_bins
total possible number of bins (defined by positions for junctions)