public static ChromPos getChromosomePosForCDScoordinate ( int cdsNucleotidePosition , GeneChromosomePosition chromPos ) { logger . debug ( " ? Checking chromosome position for CDS position " + cdsNucleotidePosition ) ; List < Integer > exonStarts = chromPos . getExonStarts ( ) ; List < Integer > exonEnds = chromPos . getExonEnds ( ) ; logger . debug ( " Exons:" + exonStarts . size ( ) ) ; int cdsStart = chromPos . getCdsStart ( ) ; int cdsEnd = chromPos . getCdsEnd ( ) ; ChromPos chromosomePos = null ; if ( chromPos . getOrientation ( ) . equals ( ' ' ) ) chromosomePos = ChromosomeMappingTools . getChromPosForward ( cdsNucleotidePosition , exonStarts , exonEnds , cdsStart , cdsEnd ) ; else chromosomePos = ChromosomeMappingTools . getChromPosReverse ( cdsNucleotidePosition , exonStarts , exonEnds , cdsStart , cdsEnd ) ; logger . debug ( "=> CDS pos " + cdsNucleotidePosition + " for " + chromPos . getGeneName ( ) + " is on chromosome at " + chromosomePos ) ; return chromosomePos ; }
Maps the position of a CDS nucleotide back to the genome