iCLIP.counting.count_intervals¶
-
iCLIP.counting.count_intervals(getter, intervals, contig, strand='.', dtype='uint32', use_centre=False, get_all_and_mask=True)¶ Count the crosslinked bases across a set of intervals
Parameters: - getter (*_getter function or pysam.AlignmentFile) – The getter function to retrieve the cross-links from. Returned from make_getter.
- intervals (iter of tuples) – The intervals to retrieve cross-links from as an iterable of (start, end) tuples.
- contig (str) –
- strand ({"+", "-", "."}) – If “.” then the sum of counts on both strands is returned.
- dtype (str) – numpy dtype used for storing counts. Larger dtypes reduce chance of overflow, but use more memory. Defaults to ‘uint32’.
- get_all_and_mask (bool, optional) – Instead of fetching each exon indevidually from the getter, fetch entire chromsome region, and then subset to things in the interval.
Returns: Series of integer counts, where the index of the Series is the genome coordinates. Series is spares (i.e. 0 count bases are excluded)
Return type: pandas.Series
See also
make_getter()- Access to cross-link data for range of file-types
getCrosslink()- find cross-link base from pysam.AlignedSegment