public class DNA extends Object implements Serializable
  java -ms1024m -mx1024m org.mathIT.genes.DNA
  
| Constructor and Description | 
|---|
DNA(String name,
   ArrayList<Character> sequence)
Constructor of this genome. 
 | 
DNA(String name,
   char[] sequence)
Constructor of this genome. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
String | 
asHTMLString()
Returns a string representing this genome, with line breaks encoded by
  " 
" instead of '\n'.  | 
static DNA | 
encode(String name,
      CharSequence string)
Factory method producing a genome from a specified DNA base sequence of 
  the letters A, C, G, T. 
 | 
double | 
entropy()
Returns the entropy of the frequency distribution of this genome. 
 | 
TreeMap<Character,Integer> | 
getFrequency()
Returns the frequency distribution of the 4 nucleobases. 
 | 
String | 
getFrequencyAsHTMLGraph()
Returns the frequency distribution of the 64 codons as HTML graph. 
 | 
String | 
getFrequencyAsHTMLTable()
Returns the frequency distribution of the 64 codons as HTML table. 
 | 
String | 
getName()
Returns the name of this genome. 
 | 
StringBuilder | 
getSequence()
Returns the nucleobase sequence of this genome. 
 | 
ArrayList<Character> | 
getSequenceAsArrayList()
Returns the nucleobase sequence of this genome. 
 | 
static DNA | 
loadDNA()
Returns a genome after opening a file in GNOM format, found by a file chooser dialog. 
 | 
static DNA | 
loadFASTA()
Returns a genome after opening a file in FASTA format, determined by a file chooser dialog. 
 | 
double | 
p(char b)
Returns the probability to obtain the specified nucleobase of this genome sequence. 
 | 
void | 
save()
Saves this genome in gnom format. 
 | 
String | 
toString()
Returns a string representing this genome. 
 | 
public DNA(String name, ArrayList<Character> sequence)
name - the name of this genomesequence - the sequence of nucleobasespublic DNA(String name, char[] sequence)
name - the name of this genomesequence - the sequence of nucleobasespublic String getName()
public StringBuilder getSequence()
public ArrayList<Character> getSequenceAsArrayList()
public TreeMap<Character,Integer> getFrequency()
public String getFrequencyAsHTMLTable()
public String getFrequencyAsHTMLGraph()
public double p(char b)
b - the specified nucleobasepublic double entropy()
public String asHTMLString()
public String toString()
public static DNA encode(String name, CharSequence string)
name - the name of the generated genomestring - DNA base sequencepublic static DNA loadFASTA()
public void save()
public static DNA loadDNA()