/** * Get the stitched together CDS sequences then maps to the cDNA * @return */ public DNASequence getDNACodingSequence() { StringBuilder sb = new StringBuilder(); for (CDSSequence cdsSequence : cdsSequenceList) { sb.append(cdsSequence.getCodingSequence()); } DNASequence dnaSequence = null; try { dnaSequence = new DNASequence(sb.toString().toUpperCase()); } catch (CompoundNotFoundException e) { // if I understand this should not happen, please correct if I'm wrong - JD 2014-10-24 logger.error("Could not create DNA coding sequence, {}. This is most likely a bug.", e.getMessage()); } dnaSequence.setAccession(new AccessionID(this.getAccession().getID())); return dnaSequence; }
/** * Get the stitched together CDS sequences then maps to the cDNA * @return */ public DNASequence getDNACodingSequence() { StringBuilder sb = new StringBuilder(); for (CDSSequence cdsSequence : cdsSequenceList) { sb.append(cdsSequence.getCodingSequence()); } DNASequence dnaSequence = null; try { dnaSequence = new DNASequence(sb.toString().toUpperCase()); } catch (CompoundNotFoundException e) { // if I understand this should not happen, please correct if I'm wrong - JD 2014-10-24 logger.error("Could not create DNA coding sequence, {}. This is most likely a bug.", e.getMessage()); } dnaSequence.setAccession(new AccessionID(this.getAccession().getID())); return dnaSequence; }
/** * Get the protein sequence with user defined TranscriptEngine * @param engine * @return */ public ProteinSequence getProteinSequence(TranscriptionEngine engine) { DNASequence dnaCodingSequence = getDNACodingSequence(); RNASequence rnaCodingSequence = dnaCodingSequence.getRNASequence(engine); ProteinSequence proteinSequence = rnaCodingSequence.getProteinSequence(engine); proteinSequence.setAccession(new AccessionID(this.getAccession().getID())); return proteinSequence; }
/** * Get the protein sequence with user defined TranscriptEngine * @param engine * @return */ public ProteinSequence getProteinSequence(TranscriptionEngine engine) { DNASequence dnaCodingSequence = getDNACodingSequence(); RNASequence rnaCodingSequence = dnaCodingSequence.getRNASequence(engine); ProteinSequence proteinSequence = rnaCodingSequence.getProteinSequence(engine); proteinSequence.setAccession(new AccessionID(this.getAccession().getID())); return proteinSequence; }