public CDSSequence addCDS ( AccessionID accession , int begin , int end , int phase ) throws Exception { if ( cdsSequenceHashMap . containsKey ( accession . getID ( ) ) ) { throw new Exception ( "Duplicate accesion id " + accession . getID ( ) ) ; } CDSSequence cdsSequence = new CDSSequence ( this , begin , end , phase ) ; //sense should be the same as parent cdsSequence . setAccession ( accession ) ; cdsSequenceList . add ( cdsSequence ) ; Collections . sort ( cdsSequenceList , new CDSComparator ( ) ) ; cdsSequenceHashMap . put ( accession . getID ( ) , cdsSequence ) ; return cdsSequence ; }
Add a Coding Sequence region with phase to the transcript sequence