# File lib/ensembl/core/transcript.rb, line 298 def genomic2cdna(pos) #FIXME: Still have to check for when pos is outside of scope of cDNA. # Identify the exon we're looking at. exon_with_target = self.exon_for_genomic_position(pos) accumulated_position = 0 self.exons.each do |exon| if exon == exon_with_target accumulated_position += ( pos - exon.start ) return accumulated_position else accumulated_position += exon.length end end return RuntimeError, "Position outside of cDNA scope" end