public class SequenceTranslator
extends java.lang.Object
GUIProtToSwissModel,
FileFormat,
FileFormatConverter| Constructor and Description |
|---|
SequenceTranslator(FileFormatConverter ffc,
boolean dna)
Initialize sequence translator.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAA(java.lang.String codon)
Get matching AA for given codon.
|
java.lang.String[] |
getAAList(boolean longn)
Get list of all AminoAcids names, by the standard table.
|
java.util.HashMap<java.lang.String,java.lang.String> |
getAANamesMap(boolean shlong)
Get Amino-Acid names table.
|
java.lang.String |
getSequence(int selectedindex)
Get sequence from list of sequences.
|
void |
setUseTranslationTable(int table,
boolean fordna)
Choose translation table to use.
Standard table is initialized by default. |
java.lang.String |
translateSequence(int startsite,
int selsequence,
boolean keepGaps)
Translate a DNA/RNA sequence into Protein.
|
java.lang.String |
translateSequence(int startsite,
java.lang.String sequence,
boolean keepGaps)
Translate a DNA/RNA sequence into Protein.
|
public SequenceTranslator(FileFormatConverter ffc, boolean dna)
ffc - file format converter containing MSA data.dna - tell to use table for dna (if true), or rna (if false).public java.util.HashMap<java.lang.String,java.lang.String> getAANamesMap(boolean shlong)
shlong - choose either from short or long names.public java.lang.String[] getAAList(boolean longn)
longn - if true return the longs names(3 letters); otherwise, only the symbol letter.public java.lang.String getAA(java.lang.String codon)
codon - the codon having a corresponding AA.public void setUseTranslationTable(int table,
boolean fordna)
Existing tables: 1(standard),2,3,4,5,6,9,10,11,12,13,14,15,16,21,22,23
Table choice: 0 ,1,2,3,4,5,6,7 ,8 ,9 ,10,11,12,13,14,15,16
Table information was taken from NCBI, in
http://www.ncbi.nlm.nih.gov/Taxonomy/taxonomyhome.html/index.cgi?chapter=cgencodes#SG23table - which table. See Table choice.fordna - tell to use table for dna (if true), or rna (if false).public java.lang.String getSequence(int selectedindex)
selectedindex - the index matching the sequence.public java.lang.String translateSequence(int startsite,
int selsequence,
boolean keepGaps)
startsite - select where to start translating.selsequence - select sequence to translate.keepGaps - whether or not to keeps gaps if they exist.public java.lang.String translateSequence(int startsite,
java.lang.String sequence,
boolean keepGaps)
startsite - select where to start translating.sequence - the sequence to translate in one line.keepGaps - whether or not to keeps gaps if they exist.