|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javagene.seq.Nucleotide
public class Nucleotide
A nucleotide object, with Dna/Rna utility methods. Understands both the standard A C T G U and the "ambiguous" IUPAC nucleotides, ie, R Y B D H V N.
Nested Class Summary | |
---|---|
static class |
Nucleotide.Type
Sequence type: DNA or RNA. |
Field Summary | |
---|---|
static Nucleotide |
A
|
static Nucleotide |
B
G or C or T/U (Anything but A). |
static Nucleotide |
C
|
static Nucleotide |
D
A or G or T/U (Anything but C). |
static Nucleotide |
G
|
static Nucleotide |
H
A or C or T/U (Anything but G). |
static Nucleotide |
N
Any nucleotide. |
static Nucleotide |
R
A or G. |
static Nucleotide |
T
|
static Nucleotide |
U
|
static Nucleotide |
V
A or C or G (Anything but T/U). |
static Nucleotide |
Y
C or T/U. |
Method Summary | |
---|---|
static java.lang.String |
complement(java.lang.String s,
Nucleotide.Type type)
Complement a string of IUPAC nucleotides. |
static java.lang.String |
dnaComplement(java.lang.String s)
Complement a string of IUPAC DNA nucleotides (output A C T G only). |
static java.lang.String |
dnaReverseComplement(java.lang.String s)
Reverse and complement a string of IUPAC DNA nucleotides (A C T G only). |
static boolean |
isComplement(char a,
char b)
Check if two symbols complement one another. |
static boolean |
isWobbleComplement(char a,
char b)
Check if two symbols complement one another, accepting wobble pairs (G-U, G-T) in addition to standard (A-T, A-U, G-C) pairs. |
static Nucleotide |
lookup(java.lang.String str)
Find the Nucleotide object corresponding to an IUPAC symbol. |
boolean |
matches(Nucleotide n)
Check if a Nucleotide object matches this object, allowing ambiguous matches. |
boolean |
matches(java.lang.String s)
Check if a IUPAC nucleotide symbol matches this object, allowing ambiguous matches. |
static java.lang.String |
reverseComplement(java.lang.String s,
Nucleotide.Type type)
Reverse and complement a string of IUPAC DNA nucleotides. |
static java.lang.String |
rnaComplement(java.lang.String s)
Complement a string of IUPAC RNA nucleotides (output A C U G only). |
static java.lang.String |
rnaReverseComplement(java.lang.String s)
Reverse and complement a string of IUPAC RNA nucleotides (A C U G only). |
java.lang.String |
toString()
Get IUPAC representation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Nucleotide A
public static final Nucleotide B
public static final Nucleotide C
public static final Nucleotide D
public static final Nucleotide G
public static final Nucleotide H
public static final Nucleotide N
public static final Nucleotide R
public static final Nucleotide T
public static final Nucleotide U
public static final Nucleotide V
public static final Nucleotide Y
Method Detail |
---|
public static java.lang.String complement(java.lang.String s, Nucleotide.Type type)
s
- The string of one-letter upper or lower case IUPAC nucleotides to complement.type
- Nucleotide.Type.DNA or Nucleotide.Type.RNA.
public static java.lang.String dnaComplement(java.lang.String s)
s
- The string of one-letter upper or lower case IUPAC nucleotides to complement.
public static java.lang.String dnaReverseComplement(java.lang.String s)
s
- The string of one-letter upper or lower case IUPAC nucleotides to reverse and complement.
public static boolean isComplement(char a, char b)
a
- A nucleotide symbol, either upper or lower case.b
- A nucleotide symbol, either upper or lower case.
public static boolean isWobbleComplement(char a, char b)
a
- A nucleotide symbol, either upper or lower case.b
- A nucleotide symbol, either upper or lower case.
public static Nucleotide lookup(java.lang.String str) throws java.lang.IllegalArgumentException
str
- One-letter IUPAC nucleotide symbol, either upper or lower case.
java.lang.IllegalArgumentException
- The parameter did not match a known nucleotide.public boolean matches(Nucleotide n)
n
- The other nucleotide object.
public boolean matches(java.lang.String s)
s
- The one-letter symbol, upper or lower case.
public static java.lang.String reverseComplement(java.lang.String s, Nucleotide.Type type)
s
- The string of one-letter upper or lower case IUPAC nucleotides to reverse complement.type
- Nucleotide.Type.DNA or Nucleotide.Type.RNA.
public static java.lang.String rnaComplement(java.lang.String s)
s
- The string of one-letter upper or lower case IUPAC nucleotides to complement.
public static java.lang.String rnaReverseComplement(java.lang.String s)
s
- The string of one-letter upper or lower case IUPAC nucleotides to reverse and complement.
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |