iCLIP.utils.TranscriptCoordInterconverter.transcript_interval2genome_intervals¶
-
TranscriptCoordInterconverter.transcript_interval2genome_intervals(interval)¶ Convert an interval in transcript coordinates and convert to a list of intervals in genome coordinates.
Returns a list because a single interval might cross several exons, and the returned list of intervals would exclude the intronic sequence.
Parameters: interval (tuple of int) – Tuple with zero-based half open interval of form (start, end) in the transcript domain. Returns: List of zero-based, half open (start, end) tuples that encompas the same bases as described by interval but in the genome domain. Return type: list of tuples Raises: ValueError– If the supplied strart or end is not in the transcript.See also
transcript2genome()- Does the actaul conversion
genome_interval2transcript()- Almost the inverse of this
Notes
Because this method returns possibly discontinous intervals that will always only contain exonic regions (or only intronic if the converter was created with
introns=True), it is not quite guarenteed to be the inverse of genome_interval2transcript. This is because a single interval that spans both introns and exons can be passed to that method (as long as both start and end are exonic), and will be converted to a single interval that covers the exon bases, but converting the same interval back would give to intervals covering only the exonic parts.