ailist.AIList#
- class ailist.AIList#
Wrapper for C ailist_t
AIList
stores a list of intervalsAttributes
Start of first interval in AIList
Index of components in constructed AIList
'bool'
'bool'
'bool'
End of last intervals in AIList
Length of components in constructed AIList
Number of components in constructed AIList
AIList.last - AIList.first
Number of intervals in AIList
Methods
add
(self, int start, int end[, id_value])Add an interval to AIList inplace
append
(self, AIList query_ail)Union of intervals within two AIList
bin_coverage
(self, int bin_size=100000[, ...])Find sum of coverage within binned positions
bin_nhits
(self, int bin_size=100000[, ...])Find number of intervals overlapping binned positions
close
(self)Close object and clear memory
common
(self, AIList query_ail)Common intervals within another AIList
construct
(self, int min_length=20)Construct ailist_t *Required to call intersect
copy
(self)coverage
(self)Find number of intervals overlapping every position in the AList range
display
(self)Print all intervals
downsample
(self, double proportion)Randomly downsample AIList
extract_ends
(self)Return the end values
extract_id
(self)Return the ID values
extract_starts
(self)Return the start values
filter
(self, int min_length=1, ...)Filter out intervals outside of a length range
freeze
(self)Make
AIList
immutablefrom_array
(self, const long[, const long[, ...)Add intervals from arrays to AIList inplace
intersect
(self, int start, int end)Find intervals overlapping given range
intersect_from_ailist
(self, AIList ail_query)Find interval indices overlapping given ranges
intersect_from_array
(self, const long[, ...)Find interval indices overlapping given ranges
intersect_ids
(self, int start, int end)Find interval indices overlapping given range
interval_coverage
(self, int start, int end)Find number of intervals overlapping each position in given interval
iter_sorted
(self)Iterate over an AIList in sorted way
length_dist
(self)Calculate length distribution of intervals
merge
(self, int gap=0)Merge intervals within a gap
nhits
(self, start, end[, min_length, max_length])Find number of intervals overlapping binned positions
nhits_from_array
(self, const long[, const long[)Find number of intervals overlapping given positions
subtract
(self, AIList query_ail)Subtract intervals within another AIList
unfreeze
(self)Make
AIList
mutablewps
(self, int protection=60[, min_length, ...])Calculate Window Protection Score for each position in AIList range