org.concord.biologica.engine
Class Base

java.lang.Object
  |
  +--org.concord.biologica.engine.Base

public final class Base
extends java.lang.Object

This class represents a Base object, as in the base purines and pyrimidines which form DNA and RNA.

This class contains mainly static methods.

Version:
$Revision: 1.1.1.1 $ $Date: 2001/04/28 00:39:11 $
Author:
$Author: ed $

Field Summary
static byte ADENINE
          A purine which links with thymine in DNA and with uracil in RNA.
static byte CYTOSINE
          A purine which links with guanine in DNA and RNA.
static byte GUANINE
          A pyrimidine which links with cytosine in DNA and RNA.
static int IN_DNA
          Used in various methods to indicate a base or some nucleic acid is in DNA.
static int IN_DNA_OR_RNA
          Used in various methods to indicate a base or some nucleic acid is in DNA or RNA.
static java.lang.String IN_DNA_STRING
           
static int IN_RNA
          Used in various methods to indicate a base or some nucleic acid is in RNA.
static java.lang.String IN_RNA_STRING
           
static byte THYMINE
          A pyrimidine which links with adenine only in DNA, not RNA.
static byte URACIL
          A pyrimidine which links with adenine only in RNA, not DNA.
 
Constructor Summary
Base()
           
 
Method Summary
static int getInDNAorRNAasInt(java.lang.String inDNAorRNA)
          Convert an int inDNAorRNA value to a String.
static java.lang.String getInDNAorRNAasString(int inDNAorRNA)
          Convert an int inDNAorRNA value to a String.
static byte getPairBase(byte aBase, int inDNAorRNA)
          Get pair base value in either DNA or RNA.
static boolean isValidBase(byte aBase, int inDNAorRNA)
          Determines if a base value is valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

URACIL

public static final byte URACIL
A pyrimidine which links with adenine only in RNA, not DNA. Don't change the value of this argument without being sure the array mapping codons to amino acids in Codon.java is okay.

CYTOSINE

public static final byte CYTOSINE
A purine which links with guanine in DNA and RNA. Don't change the value of this argument without being sure the array mapping codons to amino acids in Codon.java is okay.

ADENINE

public static final byte ADENINE
A purine which links with thymine in DNA and with uracil in RNA. Don't change the value of this argument without being sure the array mapping codons to amino acids in Codon.java is okay.

GUANINE

public static final byte GUANINE
A pyrimidine which links with cytosine in DNA and RNA. Don't change the value of this argument without being sure the array mapping codons to amino acids in Codon.java is okay.

THYMINE

public static final byte THYMINE
A pyrimidine which links with adenine only in DNA, not RNA.

IN_DNA

public static final int IN_DNA
Used in various methods to indicate a base or some nucleic acid is in DNA.


IN_DNA_STRING

public static final java.lang.String IN_DNA_STRING

IN_RNA

public static final int IN_RNA
Used in various methods to indicate a base or some nucleic acid is in RNA.


IN_RNA_STRING

public static final java.lang.String IN_RNA_STRING

IN_DNA_OR_RNA

public static final int IN_DNA_OR_RNA
Used in various methods to indicate a base or some nucleic acid is in DNA or RNA.

Constructor Detail

Base

public Base()
Method Detail

isValidBase

public static boolean isValidBase(byte aBase,
                                  int inDNAorRNA)
Determines if a base value is valid.

Parameters:
aBase - byte - a base value
inDNAorRNA - int - indicates if base in DNA or RNA is sought
Returns:
boolean - true if aBase is valid or false if not valid

getPairBase

public static byte getPairBase(byte aBase,
                               int inDNAorRNA)
Get pair base value in either DNA or RNA.

Parameters:
aBase - byte - base value for which pair base is sought, must be a valid base value
inDNAorRNA - int - indicates if pair base in DNA or RNA is sought
Returns:
byte - pair base value
Throws:
java.lang.IllegalArgumentException - - input arguments not valid

getInDNAorRNAasString

public static final java.lang.String getInDNAorRNAasString(int inDNAorRNA)
Convert an int inDNAorRNA value to a String.
Returns:
String - in DNA or RNA as a string

getInDNAorRNAasInt

public static final int getInDNAorRNAasInt(java.lang.String inDNAorRNA)
Convert an int inDNAorRNA value to a String.
Returns:
String - in DNA or RNA as a string