org.strbio.mol
Class Nucleotide

java.lang.Object
  extended by org.strbio.mol.Monomer
      extended by org.strbio.mol.Nucleotide
All Implemented Interfaces:
DLinkedList.Node

public class Nucleotide
extends Monomer

Class to represent a single nucleotide

 Version 1.0, 8/17/01 - original version, based on org.strbio.mol.Residue
 

Version:
1.0, 8/17/01
Author:
JMC

Field Summary
static java.lang.String oneLetter
          unlike Residue, don't make - a valid type
 
Fields inherited from class org.strbio.mol.Monomer
atoms, n, type
 
Constructor Summary
Nucleotide()
           
Nucleotide(char t)
          Make a new nucleotide of a given type.
Nucleotide(Nucleotide q)
          copy another residue, including the atoms.
 
Method Summary
static char complement(char dna)
          complement of a dna base
static java.lang.String complement(java.lang.String dna)
          complement of a dna chain
 DLinkedList.Node copyNode()
          copy contents of a residue
 boolean isGap()
          is the character used to represent a gap?
static boolean isGap(char x)
          Is a character a gap code?
static boolean isNuc(char x)
          Is your character a valid 1-letter code?
 boolean isValidType()
          is the character in 'type' valid for this residue?
static java.lang.String reverse(java.lang.String dna)
          reverse
static java.lang.String reverseComplement(java.lang.String dna)
          reverse complement
 
Methods inherited from class org.strbio.mol.Monomer
atomSearch, centerOfMass, centerOfMass, copyAtoms, copyDataFrom, isValidNonGap, molecularWeight, nAtoms, nAtomsWithCoord, next, prev, readAtomRecord, readFasta, readSeqRecord, rotate, setNext, setPrev, stripAllAtoms, stripAllBut, stripAllButFirstAtom, stripAtomsByName, transform, translate, typeName, writePDBAtom, writePts, writeSeqRecord, writeYAPFAtom
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

oneLetter

public static final java.lang.String oneLetter
unlike Residue, don't make - a valid type

See Also:
Constant Field Values
Constructor Detail

Nucleotide

public Nucleotide()

Nucleotide

public Nucleotide(char t)
Make a new nucleotide of a given type.


Nucleotide

public Nucleotide(Nucleotide q)
copy another residue, including the atoms. This makes another copy of the data.

Method Detail

complement

public static final char complement(char dna)
complement of a dna base


complement

public static final java.lang.String complement(java.lang.String dna)
complement of a dna chain


reverseComplement

public static final java.lang.String reverseComplement(java.lang.String dna)
reverse complement


reverse

public static final java.lang.String reverse(java.lang.String dna)
reverse


isNuc

public static final boolean isNuc(char x)
Is your character a valid 1-letter code?


isGap

public static final boolean isGap(char x)
Is a character a gap code?


copyNode

public DLinkedList.Node copyNode()
copy contents of a residue

Specified by:
copyNode in interface DLinkedList.Node
Overrides:
copyNode in class Monomer

isValidType

public boolean isValidType()
is the character in 'type' valid for this residue?

Overrides:
isValidType in class Monomer

isGap

public boolean isGap()
is the character used to represent a gap?

Overrides:
isGap in class Monomer