Package org.biojava.bio.symbol
Class CodonPrefTools
- java.lang.Object
-
- org.biojava.bio.symbol.CodonPrefTools
-
public class CodonPrefTools extends java.lang.ObjectAn utility class for codon preferences- Since:
- 1.3
- Author:
- David Huen, Mark Schreiber
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCEREVISIAE_NUCLEARSaccharomyces cerevisiae codon preferencesstatic java.lang.StringDROSOPHILA_MELANOGASTER_NUCLEARDrosophila melanogaster codon preferencesstatic java.lang.StringECOLIEscherichia coli codon preferencesstatic java.lang.StringFUGU_NUCLEARTakifugu rubripes codon preferencesstatic java.lang.StringMAN_NUCLEARHomo sapiens codon preferencesstatic java.lang.StringMOUSE_NUCLEARMus musculus codon preferencesstatic java.lang.StringPOMBE_NUCLEARSchizosaccharomyces pombe codon preferencesstatic java.lang.StringRAT_NUCLEARRattus norvegicus codon preferencesstatic java.lang.StringWORM_NUCLEARCaenorhabditis elegans codon preferences
-
Constructor Summary
Constructors Constructor Description CodonPrefTools()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CodonPrefgetCodonPreference(java.lang.String id)get the specified codon preference.static FiniteAlphabetgetDinucleotideAlphabet()returns an RNA dinucleotide alphabet.static CodonPref[]readFromXML(java.io.InputStream prefStream)static CodonPrefreadFromXML(java.io.InputStream prefStream, java.lang.String name)reads a specified CodonPref from an file.static voidreadFromXML(java.io.InputStream prefStream, CodonPrefFilter filter)read an CodonPref XML stream and handle it with a CodonPrefFilter object.static voidtranslateCUD(java.io.InputStream input, java.io.OutputStream output)reads in a file in Codon Usage Database format and translate it into our XML format These can be obtained from the Codon Usage Database.static voidwriteToXML(CodonPref codonPref, java.io.PrintWriter writer)write out a specified CodonPref object in XML format.
-
-
-
Field Detail
-
DROSOPHILA_MELANOGASTER_NUCLEAR
public static java.lang.String DROSOPHILA_MELANOGASTER_NUCLEAR
Drosophila melanogaster codon preferences
-
MAN_NUCLEAR
public static java.lang.String MAN_NUCLEAR
Homo sapiens codon preferences
-
MOUSE_NUCLEAR
public static java.lang.String MOUSE_NUCLEAR
Mus musculus codon preferences
-
RAT_NUCLEAR
public static java.lang.String RAT_NUCLEAR
Rattus norvegicus codon preferences
-
FUGU_NUCLEAR
public static java.lang.String FUGU_NUCLEAR
Takifugu rubripes codon preferences
-
WORM_NUCLEAR
public static java.lang.String WORM_NUCLEAR
Caenorhabditis elegans codon preferences
-
CEREVISIAE_NUCLEAR
public static java.lang.String CEREVISIAE_NUCLEAR
Saccharomyces cerevisiae codon preferences
-
POMBE_NUCLEAR
public static java.lang.String POMBE_NUCLEAR
Schizosaccharomyces pombe codon preferences
-
ECOLI
public static java.lang.String ECOLI
Escherichia coli codon preferences
-
-
Method Detail
-
getCodonPreference
public static CodonPref getCodonPreference(java.lang.String id)
get the specified codon preference.
-
getDinucleotideAlphabet
public static FiniteAlphabet getDinucleotideAlphabet()
returns an RNA dinucleotide alphabet. Used to represent the non-wobble bases in WobbleDistribution
-
writeToXML
public static void writeToXML(CodonPref codonPref, java.io.PrintWriter writer) throws java.lang.NullPointerException, java.io.IOException, IllegalSymbolException, BioException
write out a specified CodonPref object in XML format.- Throws:
java.lang.NullPointerExceptionjava.io.IOExceptionIllegalSymbolExceptionBioException
-
readFromXML
public static CodonPref readFromXML(java.io.InputStream prefStream, java.lang.String name) throws BioException
reads a specified CodonPref from an file.- Parameters:
name- name of organism- Throws:
BioException
-
readFromXML
public static CodonPref[] readFromXML(java.io.InputStream prefStream) throws BioException
- Throws:
BioException
-
readFromXML
public static void readFromXML(java.io.InputStream prefStream, CodonPrefFilter filter) throws BioExceptionread an CodonPref XML stream and handle it with a CodonPrefFilter object.- Throws:
BioException
-
translateCUD
public static void translateCUD(java.io.InputStream input, java.io.OutputStream output) throws java.io.IOExceptionreads in a file in Codon Usage Database format and translate it into our XML format These can be obtained from the Codon Usage Database.Note that the output assumes that the universal genetic code is used as that is not encoded in the CUD files. Edit the output appropriately to modify the genetic code if necessary.
- Throws:
java.io.IOException
-
-