ailist.IntervalArray#
- class ailist.IntervalArray[source]#
IntervalArray
stores a list of intervalsAttributes
End values
Whether object is still in memory
Whether IntervalArray is constructed or not
Whether object is immutable
Ranges(start, end) for each label
Number of intervals in IntervalArray
Start values
Methods
add
(start, end)Add an interval to IntervalArray inplace
append
(other_ail)Add intervals from arrays to IntervalArray inplace
bin_nhits
([bin_size, min_length, max_length])Find number of intervals overlapping binned positions
close
()Close object and clear memory
construct
([min_length])Construct labeled_aiarray_t *Required to call intersect
copy
()Copy IntervalArray
coverage
([min_length, max_length])Calculate coverage for each position in IntervalArray range
create_bin
(bin_range[, bin_size])downsample
(proportion[, return_intervals, ...])Randomly downsample IntervalArray
filter
([min_length, max_length])Filter out intervals outside of a length range
filter_exact_match
(other_aiarray)Determine which intervals are present
freeze
()Make
IntervalArray
immutablehas_exact_match
(other_aiarray)Determine which intervals are present
has_hit
(start, end)Find interval indices overlapping given ranges
index_with_aiarray
(other_aiarray)intersect
(start, end[, return_intervals, ...])Find intervals overlapping given range
intersect_from_IntervalArray
(ail_query[, ...])Find interval indices overlapping given ranges
iter_intersect
(query_laia[, ...])Iterate over an IntervalArray in sorted way
Calculate length distribution of intervals
merge
([gap])Merge intervals within a gap
nhits
(start, end[, min_length, max_length])Find number of intervals overlapping given positions
nhits_from_IntervalArray
(query_laia[, ...])Find number of intervals overlapping
simulate
()sort
()unfreeze
()Make
IntervalArray
mutablewps
([protection, min_length, max_length])Calculate Window Protection Score for each position in IntervalArray range