iCLIP.utils.TranscriptCoordInterconverter.genome_interval2transcript¶
-
TranscriptCoordInterconverter.genome_interval2transcript(interval)¶ Convert an interval in genomic coordinates into an interval in transcript-coordinates.
Parameters: - interval (tuple of int) – Tuple with zero-based half open interval of form
- end) in the genome domain. start < end ((start,) –
Returns: Half open (start, end) tuple starts and ends at the same bases as the interval described in interval, but in transcript domain coordinates.
Return type: tuple of int
Raises: ValueError– If the supplied strart or end is not in the transcript.See also
genome2transcript()- Does the actaul conversion
genome_interval2transcript()- Almost the inverse of this
Notes
This is not quite the inverse of :method:`transcript_interval2genome_intervals`, because of how intervals that split across introns are handled. See :method:`transcript_interval2genome_intervals` for details of the difference.
Warning
This method current has a known issue where if the interval includes the last base of the transcripts (one the +ve strand) or the first base (on the -ve strand), an error will occur. I aim to fix this before release.