modele
Class Base

java.lang.Object
  extended by modele.Base

public class Base
extends java.lang.Object

A class for codification and input memory sequences. At start, it was only for cible sequences (original sequences were used as test char sequences in some parts of algorithms - profil computed data).

Author:
Stéfan Engelen (2006), Gabriel Chandesris (2008)
See Also:
Sequence

Field Summary
private  char acgt
           
private  int position
           
 
Constructor Summary
Base(char base, int position)
          Standard constructor to record a sequence in Base structure without gaps for example.
 
Method Summary
 boolean equals(Base toCompare)
          To know if instance of the class and an other are the same.
 char getBase()
           
 int getPosition()
           
static boolean isBase(char base)
          To test if a char symbolize a nucleotids, all nucleotidic code is tested as UPPERCASE.
static boolean isBaseOrGap(char base)
          To test if nucleotids or gap / indel symbolized with '-'.
static boolean matchBases(Base x, Base y)
          To know if two Base's can go together.
static boolean matchBases(char x, char y)
          To know if two nucleotids (char) can go together.
static boolean matchBasesGap(Base x, Base y)
          To know if two Base's can go together (including gap's).
static boolean matchBasesGap(char x, char y)
          To know if two nucleotids (char) can go together (including gap's).
static int scoreBases(char x, char y)
          Score for two nuleotids (char): Watson-Cricks and Wooble accepted.
 void setBase(char base)
           
 void setPosition(int pos)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

acgt

private char acgt

position

private int position
Constructor Detail

Base

public Base(char base,
            int position)
Standard constructor to record a sequence in Base structure without gaps for example. (structure could be table, List, Vector...).

Parameters:
base - char
position - int
Method Detail

getBase

public char getBase()

getPosition

public int getPosition()

setBase

public void setBase(char base)

setPosition

public void setPosition(int pos)

equals

public boolean equals(Base toCompare)
To know if instance of the class and an other are the same.

Parameters:
toCompare - An other Base.
Returns:
boolean

isBase

public static boolean isBase(char base)
To test if a char symbolize a nucleotids, all nucleotidic code is tested as UPPERCASE.
Table below is given as information, only bold bases are used in computing in algorithms and should be completed.
AdenineA
ThymineT
GuanineG
CytosineC
UracileU
InosineI
Purine : Adenine or GuanineR
Pyrimidine : Thymine or CytosineY
Weak Hydrogen bonds : Adenine or ThymineW
Keto in major groove : Thymine or GuanineK
Strong hydrogen bonds : Cytosine or GuanineS
Amino in major groove : Adenine or CytosineM
Not AdenineB
Not ThymineV
Not CytosineD
Not GuanineH
AnyN
Gap / Indel-

Parameters:
base - char
Returns:
boolean

isBaseOrGap

public static boolean isBaseOrGap(char base)
To test if nucleotids or gap / indel symbolized with '-'.

Parameters:
base - char

scoreBases

public static int scoreBases(char x,
                             char y)
Score for two nuleotids (char): Watson-Cricks and Wooble accepted.
1 pour GU/UG ; 2 pour AU/UA ; 3 pour CG/GC.

Parameters:
x - char
y - char
Returns:
int

matchBases

public static boolean matchBases(char x,
                                 char y)
To know if two nucleotids (char) can go together.

Parameters:
x - char
y - char
Returns:
boolean

matchBasesGap

public static boolean matchBasesGap(char x,
                                    char y)
To know if two nucleotids (char) can go together (including gap's).

Parameters:
x - char
y - char
Returns:
boolean

matchBases

public static boolean matchBases(Base x,
                                 Base y)
To know if two Base's can go together.

Parameters:
x - Base
y - Base
Returns:
boolean

matchBasesGap

public static boolean matchBasesGap(Base x,
                                    Base y)
To know if two Base's can go together (including gap's).

Parameters:
x - Base
y - Base
Returns:
boolean