public class Genome extends Object implements Serializable
java -ms1024m -mx1024m org.mathIT.genes.Genome
Constructor and Description |
---|
Genome(String name,
ArrayList<Character> sequence)
Constructor of a genome with the specified name and the specified sequence
of nucleobases, i.e., the letters A, C, G, T (or U for an RNA genome).
|
Genome(String name,
char[] sequence)
Constructor of a genome with the specified name and the specified sequence
of nucleobases, i.e., the letters A, C, G, T (or U for an RNA genome).
|
Genome(String name,
CharSequence sequence)
Constructor of a genome with the specified name and the specified sequence
of nucleobases, i.e., the letters A, C, G, T (or U for an RNA genome).
|
Modifier and Type | Method and Description |
---|---|
String |
asHTMLString()
Returns a string representing this genome, with line breaks encoded by
"<br>" instead of '\n'.
|
double |
entropy()
Returns the entropy of the frequency distribution of the nucleobases of this genome.
|
protected static String |
getAsCSVTable(Map<String,Integer> map)
Returns the specified map as a CSV data table string.
|
TreeMap<Character,Integer> |
getFrequencies()
Returns the absolute frequency distribution of the nucleobases.
|
protected String |
getFrequenciesAsCSVTable()
Returns the frequency distribution of this genome as a CSV data table string.
|
String |
getFrequenciesAsHTMLGraph()
Returns the frequency distribution of the nucleobases as HTML graph.
|
String |
getFrequenciesAsHTMLGraph2()
Returns the frequency distribution of the nucleobases as HTML graph in
landscape format.
|
String |
getFrequenciesAsHTMLTable()
Returns the frequency distribution of the nucleobases as HTML table.
|
String |
getName()
Returns the name of this genome.
|
TreeMap<String,Integer> |
getPairFrequencies()
Returns the absolute frequency distribution of the nucleobase pairs.
|
String |
getPairFrequenciesAsHTMLGraph()
Returns the frequency distribution of nucleobase pairs as HTML graph.
|
StringBuilder |
getSequence()
Returns the nucleobase sequence of this genome.
|
ArrayList<Character> |
getSequenceAsArrayList()
Returns the nucleobase sequence of this genome.
|
TreeMap<String,Integer> |
getTripletFrequencies()
Returns the absolute frequency distribution of the nucleobase triplets.
|
String |
getTripletFrequenciesAsHTMLGraph()
Returns the frequency distribution of nucleobase triplets as HTML graph.
|
static Genome |
loadFASTA()
Returns a genome after opening a file in
FASTA format,
determined by a file chooser dialog.
|
static Genome |
loadGenome()
Returns a genome after opening a file in GNOM format, found 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.
|
void |
saveAsCSV()
Saves this genome as CSV file.
|
String |
toString()
Returns a string representing this genome.
|
public Genome(String name, ArrayList<Character> sequence)
name
- the name of the genomesequence
- the sequence of nucleobasespublic Genome(String name, char[] sequence)
name
- the name of the genomesequence
- the sequence of nucleobasespublic Genome(String name, CharSequence sequence)
name
- the name of the genomesequence
- sequence of nucleobasespublic String getName()
public StringBuilder getSequence()
public ArrayList<Character> getSequenceAsArrayList()
public TreeMap<Character,Integer> getFrequencies()
public TreeMap<String,Integer> getPairFrequencies()
public TreeMap<String,Integer> getTripletFrequencies()
public String getFrequenciesAsHTMLTable()
protected String getFrequenciesAsCSVTable()
protected static String getAsCSVTable(Map<String,Integer> map)
map
- a mappublic String getFrequenciesAsHTMLGraph()
public String getFrequenciesAsHTMLGraph2()
public String getPairFrequenciesAsHTMLGraph()
public String getTripletFrequenciesAsHTMLGraph()
public double p(char b)
b
- the specified nucleobasepublic double entropy()
public String asHTMLString()
public String toString()
public static Genome loadFASTA()
public void save()
public void saveAsCSV()
public static Genome loadGenome()