/** Set values for codons around change. */ public void setCodonsAround(String codonsLeft, String codonsRight) { codonsAroundOld = codonsLeft.toLowerCase() + codonsRef.toUpperCase() + codonsRight.toLowerCase(); codonsAroundNew = codonsLeft.toLowerCase() + codonsAlt.toUpperCase() + codonsRight.toLowerCase(); // Amino acids surrounding the ones changed CodonTable codonTable = marker.codonTable(); String aasLeft = codonTable.aa(codonsLeft); String aasRigt = codonTable.aa(codonsRight); aasAroundOld = aasLeft.toLowerCase() + aaRef.toUpperCase() + aasRigt.toLowerCase(); aasAroundNew = aasLeft.toLowerCase() + aaAlt.toUpperCase() + aasRigt.toLowerCase(); }
/** Return functional class of this effect (i.e. NONSENSE, MISSENSE, SILENT or NONE) */ public FunctionalClass getFunctionalClass() { if (variant.isSnp()) { if (!aaAlt.equals(aaRef)) { CodonTable codonTable = marker.codonTable(); if (codonTable.isStop(codonsAlt)) return FunctionalClass.NONSENSE; return FunctionalClass.MISSENSE; } if (!codonsAlt.equals(codonsRef)) return FunctionalClass.SILENT; } return FunctionalClass.NONE; }
/** Set codon change. Calculate effect type based on codon changes (for SNPs & MNPs) */ public void setCodons(String codonsOld, String codonsNew, int codonNum, int codonIndex) { codonsRef = codonsOld; codonsAlt = codonsNew; this.codonNum = codonNum; this.codonIndex = codonIndex; CodonTable codonTable = marker.codonTable(); // Calculate amino acids if (codonsOld.isEmpty()) aaRef = ""; else { aaRef = codonTable.aa(codonsOld); codonDegeneracy = codonTable.degenerate(codonsOld, codonIndex); // Calculate codon degeneracy } if (codonsNew.isEmpty()) aaAlt = ""; else aaAlt = codonTable.aa(codonsNew); }