Modifier and Type | Method and Description |
---|---|
static AtomicSymbol |
a() |
static Symbol |
b() |
static AtomicSymbol |
c() |
static Symbol |
complement(Symbol sym)
Complement the symbol.
|
static SymbolList |
complement(SymbolList list)
Retrieve a complement view of list.
|
static ReversibleTranslationTable |
complementTable()
Get a translation table for complementing DNA symbols.
|
static SymbolList |
createDNA(String dna)
Return a new DNA SymbolList for
dna.
|
static Sequence |
createDNASequence(String dna,
String name)
Return a new DNA Sequence for
dna.
|
static GappedSequence |
createGappedDNASequence(String dna,
String name)
Get a new dna as a GappedSequence
|
static Symbol |
d() |
static char |
dnaToken(Symbol sym)
Get a single-character token for a DNA symbol
|
static SymbolList |
flip(SymbolList list,
StrandedFeature.Strand strand)
Returns a SymbolList that is reverse complemented if the strand is
negative, and the origninal one if it is not.
|
static Symbol |
forIndex(int index)
Return the symbol for an index - compatible with
index . |
static Symbol |
forSymbol(char token)
Retrieve the symbol for a symbol.
|
static AtomicSymbol |
g() |
static FiniteAlphabet |
getCodonAlphabet()
Gets the (DNA x DNA x DNA) Alphabet
|
static FiniteAlphabet |
getDNA()
Return the DNA alphabet.
|
static Distribution |
getDNADistribution(double fractionGC)
return a SimpleDistribution of specified GC content.
|
static FiniteAlphabet |
getDNAxDNA()
Gets the (DNA x DNA) Alphabet
|
static Distribution |
getDNAxDNADistribution(double fractionGC0,
double fractionGC1)
return a (DNA x DNA) cross-product Distribution with specified
DNA contents in each component Alphabet.
|
static Symbol |
h() |
static int |
index(Symbol sym)
Return an integer index for a symbol - compatible with
forIndex . |
static Symbol |
k() |
static Symbol |
m() |
static Symbol |
n() |
static Symbol |
r() |
static SymbolList |
reverseComplement(SymbolList list)
Retrieve a reverse-complement view of list.
|
static Symbol |
s() |
static AtomicSymbol |
t() |
static SymbolList |
toProtein(SymbolList syms)
Convenience method that directly converts a DNA sequence to RNA then to
protein.
|
static SymbolList |
toProtein(SymbolList syms,
int start,
int end)
Convenience method to translate a region of a DNA sequence directly into
protein.
|
static SymbolList |
toRNA(SymbolList syms)
Converts a
SymbolList from the DNA Alphabet to the
RNA Alphabet . |
static SymbolList |
transcribeToRNA(SymbolList syms)
Transcribes DNA to RNA.
|
static Symbol |
v() |
static Symbol |
w() |
static Symbol |
y() |
public static AtomicSymbol a()
public static AtomicSymbol g()
public static AtomicSymbol c()
public static AtomicSymbol t()
public static FiniteAlphabet getDNA()
public static FiniteAlphabet getDNAxDNA()
public static FiniteAlphabet getCodonAlphabet()
public static SymbolList createDNA(String dna) throws IllegalSymbolException
dna
- a String to parse into DNAIllegalSymbolException
- if dna contains
any non-DNA characterspublic static Sequence createDNASequence(String dna, String name) throws IllegalSymbolException
dna
- a String to parse into DNAname
- a String to use as the nameIllegalSymbolException
- if dna contains
any non-DNA characterspublic static GappedSequence createGappedDNASequence(String dna, String name) throws IllegalSymbolException
IllegalSymbolException
public static int index(Symbol sym) throws IllegalSymbolException
forIndex
.
The index for a symbol is stable accross virtual machines & invocations.
sym
- the Symbol to indexIllegalSymbolException
- if sym is not a member of the DNA
alphabetpublic static Symbol forIndex(int index) throws IndexOutOfBoundsException
index
.
The index for a symbol is stable accross virtual machines & invocations.
index
- the index to look upIndexOutOfBoundsException
- if index is not between 0 and 3public static Symbol complement(Symbol sym) throws IllegalSymbolException
sym
- the symbol to complementIllegalSymbolException
- if sym is not a member of the DNA alphabetpublic static Symbol forSymbol(char token) throws IllegalSymbolException
token
- the char to look upIllegalSymbolException
- if the char is not a valid IUB dna codepublic static SymbolList complement(SymbolList list) throws IllegalAlphabetException
list
- the SymbolList to complementIllegalAlphabetException
- if list is not a complementable alphabetpublic static SymbolList reverseComplement(SymbolList list) throws IllegalAlphabetException
list
- the SymbolList to complementIllegalAlphabetException
- if list is not a complementable alphabetpublic static SymbolList flip(SymbolList list, StrandedFeature.Strand strand) throws IllegalAlphabetException
list
- the SymbolList to viewstrand
- the Strand to useIllegalAlphabetException
- if list is not a complementable alphabetpublic static ReversibleTranslationTable complementTable()
public static char dnaToken(Symbol sym) throws IllegalSymbolException
IllegalSymbolException
- if sym
is not a member of the DNA alphabetpublic static Distribution getDNADistribution(double fractionGC)
fractionGC
- (G+C) content as a fraction.public static Distribution getDNAxDNADistribution(double fractionGC0, double fractionGC1)
fractionGC0
- (G+C) content of first sequence as a fraction.fractionGC1
- (G+C) content of second sequence as a fraction.public static SymbolList toRNA(SymbolList syms) throws IllegalAlphabetException
SymbolList
from the DNA Alphabet
to the
RNA Alphabet
.syms
- the SymbolList
to convert to RNAsyms
where Symbols
have been converted to RNA.
Most significantly t's are now u's. The 5' to 3' order of the Symbols is conserved.IllegalAlphabetException
- if syms
is not DNA.public static SymbolList transcribeToRNA(SymbolList syms) throws IllegalAlphabetException
toRNA(SymbolList syms)
does. The presented DNA SymbolList
is assumed to be the template strand in the 5' to 3' orientation. The resulting
RNA is transcribed from this template effectively a reverse complement in the RNA alphabet.
The method is equivalent to calling reverseComplement()
and toRNA()
in sequence.
If you are dealing with cDNA sequences that you want converted to RNA you would be
better off calling toRNA(SymbolList syms)
syms
- the SymbolList
to convert to RNAsyms
where Symbols
have been converted to RNA.IllegalAlphabetException
- if syms
is not DNA.public static SymbolList toProtein(SymbolList syms) throws IllegalAlphabetException
SymbolList
. The whole SymbolList
is translated
although up to 2 DNA residues may be truncated if full codons cannot be
formed.syms
- the sequence to be translated.IllegalAlphabetException
- if syms
is not from the DNA alphabet.public static SymbolList toProtein(SymbolList syms, int start, int end) throws IllegalAlphabetException
syms
- the DNA sequence to be translated.start
- the location to begin translation.end
- the end of the translated region.IllegalAlphabetException
- if syms
is not from the DNA alphabet.Copyright © 2014 BioJava. All rights reserved.