iCLIP.utils.TranscriptCoordInterconverter.transcript2genome

TranscriptCoordInterconverter.transcript2genome(pos)

Convert transcript coordinates into genome coordinates.

Can be a single coordinate or a array-like of coordinates

Parameters:pos (int or array-like or int) – positions, in the transcript domain, to be converted
Returns:The position, or positions converted into the genome domain.
Return type:int or numpy.array
Raises:ValueError – If the supplied genome position is not in the transcript. This would generatlly be because the supplied genome is either negative or greater than the length of the transcript.

See also

genome2transcript()
The inverse of this operation
transcript_interval2genome_intervals()
Convert intervals rather than

single()

Notes

A key point to be aware of is that this function converts positions not intervals. Because of the zero-based half-open nature of python coordinates, you can’t just convert the start and end positions into the transcript space. Use :method:`transcript_interval2genome_intervals` for this.

Passing an array ensures that the transcript is only searched once, ensuring O(n) performance rather than O(nlogn)