modele
Class Sequence

java.lang.Object
  extended by modele.Sequence
Direct Known Subclasses:
SequenceCible, SequenceTest

public class Sequence
extends java.lang.Object

This class to define a nucleic sequence / alignment in different outpout format. Some variables are useful only in SSCA Algorithm and are initialized by default at 0.0 because of Getters and Setters associated with...
Old name of this class : ADN1 and fusion of ADN1cible and Sequence

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

Field Summary
private  double combiGUGC
          SA : GU and GC combination effect [(4/4) helix alignment selection].
private  double effetGC
          SA : GC effect [(2/4) helix alignment selection].
private  double effetGU
          SA : GU effect [(1/4) helix alignment selection].
private  double effetGUGC
          SA : GU and GC effect [(3/4) helix alignment selection].
private  double homologie
          Percentage of homology / identity with cible sequence.
private  double indels
          Percentage of insertions / deletions with cible sequence.
private  double indeterminate
          Percentage of indetermination comparing with cible sequence.
private  int lengthAlign
          Alignment length.
private  int longueur
          Sequence length, without gap / indel count.
private  java.lang.String nom
          Name of the sequence
private static int nombreDecimale
          Numbers of maximum elements of a real number (double) after dot / comma.
private  double[] score
          Tab of scores of current sequence of length 7.
private  Base[] sequenceBase
          Base tabled/ formatted sequence without gap's/ indel's.
private  char[] sequenceChar
          Char tabled / formatted sequence without gap's / indel's.
private  java.lang.String sequenceString
          Original String alignment / sequence.
private  double variabilite
          SI : Identity score against cible [variability selection].
 
Constructor Summary
Sequence()
          Default constructor (empty name and sequence).
Sequence(java.lang.String nom, java.lang.String sequence)
          Name and whole sequence constructor.
 
Method Summary
 int calcul_Taille(Palindrome pal)
          COMPATIBLE PALINDROME SEARCH
"This method to compute internal sequence length at step i.
 void change_score(double[] sc)
          To change current score of test sequence.
 java.lang.Object clone()
          To get a copy of the current Sequence (only name and sequence).
static java.lang.String convertBasesToString(Base[] subsequence)
          To get a String from a Base[] (maybe useful after getting a subsequence).
static java.lang.String convertDecimale(double number)
          To convert a double to a specific length after dot / comma (default is 3) : returning String to visualize.
 boolean equals(Sequence toCompare)
          To know if instance of the class and an other are the same.
 boolean est_Une_Base(char base)
          Deprecated. Replace by use of Base.isBaseOrGap(char)...
 Sequence externalSequence(Palindrome P)
          To get the external Sequence of a Palindrome on a Sequence.
 Base getBase(int position)
          To get the Base at position [position] in the table of Base's.
 char getBaseAt(int position)
          To get the character at position [position] in the alignment.
 char getBaseChar(int position)
          To get the char of the Base at position [position] in the Base table.
 char getBaseIn(int position)
          To get the character at position [position] in the table of character's.
 int getBasePos(int position)
          To get the original position of the Base at position [position] in the Base table.
 Sequence getCarbonCopy()
          ====================================================================
 double getCombiGUGC()
           
 double getEffetGC()
           
 double getEffetGU()
           
 double getEffetGUGC()
           
 double getHomologie()
           
 double getIndels()
           
 double getIndeterminate()
           
 java.lang.String getNom()
           
static int getNombreDecimale()
           
 double getScore(int var)
          Return a score in the following (default is homology).
 java.lang.String getSequence()
           
 Base[] getSequenceBase()
           
 java.lang.String getSequenceBaseToString()
           
 char[] getSequenceChar()
           
 java.lang.String getSequenceCharToString()
           
 java.lang.String getSequenceToString()
           
 Base[] getSubSequence(int debut, int fin)
          To get a subsequence of the sequence (not of the alignment), start from 0 (positions debut AND fin are included).
 double getVariabilite()
           
 Sequence internalSequence(Palindrome P)
          To get the internal sequence of a palindrome on a Sequence.
 int length()
           
 int lengthAlign()
           
static double limitDecimale(double number)
          To convert a double to a specific length after dot / comma (default is 3) : returning double (could be useful).
 void mettre_etoile(Palindrome[] structure)
          PSEUDOKNOTS SEARCH
"This method to put stars (*) in found palindromes in aim to find pseudoknots"
CIBLE SEQUENCE
 java.lang.String pourcentageBases()
          Sum the percentage of each nucleotide.
private  void putSequence(java.lang.String sequence)
          Factorization of input in memory of the sequence.
 double[] quel_score()
          TEST SEQUENCE
 char quelle_base(int pos)
          To get a Base at a specific position.
 int quelle_longueur_cible()
          To get the length of the sequence.
 int quelle_longueur_test()
          Length of aligned sequence (gap's included).
 void removeSubSequence(int debut, int fin)
          To remove a subSequence to the Base and Char Sequence, then including of alignment (removing bases replacing with gap's).
 void setCombiGUGC(double combiGUGC)
           
 void setEffetGC(double effetGC)
           
 void setEffetGU(double effetGU)
           
 void setEffetGUGC(double effetGUGC)
           
 void setHomologie(double homologie)
           
 void setIndels(double indels)
           
 void setIndeterminate(double indeterminate)
           
 void setNom(java.lang.String nom)
           
static void setNombreDecimale(int nombreDecimale)
           
 void setScore(int var, double val)
          Return a score in the following (default is homology).
 void setVariabilite(double variabilite)
           
 java.lang.String toString(int debut, int fin)
          SOME SHOW FOR VIEW
"To visualize considered sequence [current instance]"
CIBLE SEQUENCE
 Base une_base(int position)
          To get a Base at a specific position.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nom

private java.lang.String nom
Name of the sequence


longueur

private int longueur
Sequence length, without gap / indel count.


lengthAlign

private int lengthAlign
Alignment length.


sequenceBase

private Base[] sequenceBase
Base tabled/ formatted sequence without gap's/ indel's.


sequenceChar

private char[] sequenceChar
Char tabled / formatted sequence without gap's / indel's.


sequenceString

private java.lang.String sequenceString
Original String alignment / sequence.


variabilite

private double variabilite
SI : Identity score against cible [variability selection]. see thesis page 155 part 5.3.3.1

See Also:
Algorithms.algoSSCA(Sequence, SequenceListe)

effetGU

private double effetGU
SA : GU effect [(1/4) helix alignment selection]. see thesis page 155 and following part 5.3.3.2

See Also:
Algorithms.algoSSCA(Sequence, SequenceListe)

effetGC

private double effetGC
SA : GC effect [(2/4) helix alignment selection]. see thesis page 155 and following part 5.3.3.2

See Also:
Algorithms.algoSSCA(Sequence, SequenceListe)

effetGUGC

private double effetGUGC
SA : GU and GC effect [(3/4) helix alignment selection]. see thesis page 155 and following part 5.3.3.2

See Also:
Algorithms.algoSSCA(Sequence, SequenceListe)

combiGUGC

private double combiGUGC
SA : GU and GC combination effect [(4/4) helix alignment selection]. see thesis page 155 and following part 5.3.3.2

See Also:
Algorithms.algoSSCA(Sequence, SequenceListe)

homologie

private double homologie
Percentage of homology / identity with cible sequence.
Common Identity Model (MIC
see thesis page 134

See Also:
Algorithms.algoSSCA(Sequence, SequenceListe)

indels

private double indels
Percentage of insertions / deletions with cible sequence.

See Also:
Algorithms.algoSSCA(Sequence, SequenceListe)

indeterminate

private double indeterminate
Percentage of indetermination comparing with cible sequence.

See Also:
Algorithms.algoSSCA(Sequence, SequenceListe)

nombreDecimale

private static int nombreDecimale
Numbers of maximum elements of a real number (double) after dot / comma. Useful here for getting specificity of local instance.

See Also:
getNombreDecimale(), setNombreDecimale(int), convertDecimale(double)

score

private double[] score
Tab of scores of current sequence of length 7.
TEST SEQUENCE

Constructor Detail

Sequence

public Sequence()
Default constructor (empty name and sequence).


Sequence

public Sequence(java.lang.String nom,
                java.lang.String sequence)
Name and whole sequence constructor.
Sequence will be uppercase, number of nucleotides will be counted when sequence is put in memory.

Parameters:
nom - String
sequence - String
See Also:
putSequence(String)
Method Detail

putSequence

private void putSequence(java.lang.String sequence)
Factorization of input in memory of the sequence.

Parameters:
sequence - String
See Also:
Sequence(String, String)

setNom

public void setNom(java.lang.String nom)

getNom

public java.lang.String getNom()

length

public int length()

lengthAlign

public int lengthAlign()

getSequence

public java.lang.String getSequence()

getSequenceBase

public Base[] getSequenceBase()

getSequenceToString

public java.lang.String getSequenceToString()

getSequenceBaseToString

public java.lang.String getSequenceBaseToString()

getSequenceChar

public char[] getSequenceChar()

getSequenceCharToString

public java.lang.String getSequenceCharToString()

getSubSequence

public Base[] getSubSequence(int debut,
                             int fin)
To get a subsequence of the sequence (not of the alignment), start from 0 (positions debut AND fin are included).

Parameters:
debut - Beginning of the seusequence in the sequence.
fin - End of the subsequence in the sequence.
Returns:
Base[] (more useful for informations)
See Also:
convertBasesToString(Base[])

convertBasesToString

public static java.lang.String convertBasesToString(Base[] subsequence)
To get a String from a Base[] (maybe useful after getting a subsequence).

Parameters:
subsequence - Base[] of subsequence (for example).
Returns:
String of the subsequence.
See Also:
getSubSequence(int, int)

getBase

public Base getBase(int position)
To get the Base at position [position] in the table of Base's.

Parameters:
position - int
Returns:
Base
See Also:
Base, sequenceBase

getBaseIn

public char getBaseIn(int position)
To get the character at position [position] in the table of character's.

Parameters:
position - int
Returns:
char
See Also:
sequenceChar

getBaseAt

public char getBaseAt(int position)
To get the character at position [position] in the alignment. If position is under 0 : position is considered as 0. If position upper than alignment length : position of last char in alignment.

Parameters:
position - int
Returns:
char
See Also:
sequenceString

getBaseChar

public char getBaseChar(int position)
To get the char of the Base at position [position] in the Base table.

Parameters:
position - int
Returns:
char
See Also:
Base.getBase(), sequenceBase

getBasePos

public int getBasePos(int position)
To get the original position of the Base at position [position] in the Base table. If under 0 : 0. If more than length of sequence : position of last element in alignment.

Parameters:
position - int
Returns:
int (original position in alignment)
See Also:
Base.getPosition(), sequenceBase, lengthAlign

pourcentageBases

public java.lang.String pourcentageBases()
Sum the percentage of each nucleotide.

Returns:
String

removeSubSequence

public void removeSubSequence(int debut,
                              int fin)
To remove a subSequence to the Base and Char Sequence, then including of alignment (removing bases replacing with gap's). Useful for removing begin and end of palindrome of initial sequence. Beginning of sequence is [0], consider sequence and not alignment !.

Parameters:
debut - Beginning of removing (excluded).
fin - End of removing (excluded).
See Also:
Algorithms.newSequenceDeduction(modele.Sequence, modele.PalindromeListe)

internalSequence

public Sequence internalSequence(Palindrome P)
To get the internal sequence of a palindrome on a Sequence.
Then to get the String alignment or sequence see method's.

Parameters:
P - Palindrome.
Returns:
The internal Sequence.
See Also:
getSequence(), getSequenceBaseToString(), getSequenceCharToString()

externalSequence

public Sequence externalSequence(Palindrome P)
To get the external Sequence of a Palindrome on a Sequence. This method use the removeSubSequence one with begin and end of Palindrome submitted (begin and end of sequence to remove).
Then to get the String alignment or sequence see method's.

Parameters:
P - Palindrome.
Returns:
The external Sequence.
See Also:
removeSubSequence(int, int), getSequence(), getSequenceBaseToString(), getSequenceCharToString()

getVariabilite

public double getVariabilite()

getEffetGC

public double getEffetGC()

getEffetGU

public double getEffetGU()

getEffetGUGC

public double getEffetGUGC()

getCombiGUGC

public double getCombiGUGC()

getHomologie

public double getHomologie()

getIndels

public double getIndels()

getIndeterminate

public double getIndeterminate()

getScore

public double getScore(int var)
Return a score in the following (default is homology).

setScore

public void setScore(int var,
                     double val)
Return a score in the following (default is homology).

setVariabilite

public void setVariabilite(double variabilite)

setEffetGC

public void setEffetGC(double effetGC)

setEffetGU

public void setEffetGU(double effetGU)

setEffetGUGC

public void setEffetGUGC(double effetGUGC)

setCombiGUGC

public void setCombiGUGC(double combiGUGC)

setHomologie

public void setHomologie(double homologie)

setIndels

public void setIndels(double indels)

setIndeterminate

public void setIndeterminate(double indeterminate)

equals

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

Parameters:
toCompare - An other Sequence.
Returns:
boolean

clone

public java.lang.Object clone()
To get a copy of the current Sequence (only name and sequence).

Overrides:
clone in class java.lang.Object
Returns:
(Sequence)Object

convertDecimale

public static java.lang.String convertDecimale(double number)
To convert a double to a specific length after dot / comma (default is 3) : returning String to visualize.

Parameters:
number - (double)
Returns:
(String) with 3 number after dot by default.
See Also:
getNombreDecimale(), setNombreDecimale(int), nombreDecimale

limitDecimale

public static double limitDecimale(double number)
To convert a double to a specific length after dot / comma (default is 3) : returning double (could be useful).

Parameters:
number - (double)
Returns:
(double) with 3 number after dot by default.
See Also:
getNombreDecimale(), setNombreDecimale(int), nombreDecimale

getNombreDecimale

public static int getNombreDecimale()

setNombreDecimale

public static void setNombreDecimale(int nombreDecimale)

une_base

public Base une_base(int position)
To get a Base at a specific position.
In the Base[] table (unaligned sequence : no gap).
CIBLE SEQUENCE

Parameters:
position - (int)
Returns:
(Base)
See Also:
ADN1cible.une_base(int)

quelle_longueur_cible

public int quelle_longueur_cible()
To get the length of the sequence. CIBLE SEQUENCE

Returns:
(int) length
See Also:
ADN1cible.quelle_longueur()

calcul_Taille

public int calcul_Taille(Palindrome pal)
COMPATIBLE PALINDROME SEARCH
"This method to compute internal sequence length at step i. "
CIBLE SEQUENCE

Parameters:
pal - (Palinrome1cible)
Returns:
(int)
See Also:
AlgorithmsStefan.diviser_regner(Palindrome[], Sequence, Sequence[], int, int, int, int, boolean, int), AlgorithmsStefan.recherche_Pseudonoeud(Sequence, Base[], Sequence[], boolean, int, int), OtherAlgorithmsStefan.diviser_regner(Palindrome[], Sequence, Sequence[], int, int, int, int, boolean, int), OtherAlgorithmsStefan.recherche_Pseudonoeud(Sequence, Base[], Sequence[], boolean, int, int), XXX ??deprecated?? original from (Stefan Engelen)'s implementation

mettre_etoile

public void mettre_etoile(Palindrome[] structure)
PSEUDOKNOTS SEARCH
"This method to put stars (*) in found palindromes in aim to find pseudoknots"
CIBLE SEQUENCE

Parameters:
structure - (PalindromeCible[])
See Also:
AlgorithmsStefan.calcul_Resultat(Sequence, Sequence[], int, boolean, boolean), AlgorithmsStefan.recherche_Pseudonoeud(Sequence, Base[], Sequence[], boolean, int, int), OtherAlgorithmsStefan.calcul_Resultat(Sequence, Sequence[], int, boolean, boolean), OtherAlgorithmsStefan.recherche_Pseudonoeud(Sequence, Base[], Sequence[], boolean, int, int), Interface5.setInterface(origincomment.ADN1cible, origincomment.ADN1test[], int, int, int, int, int), ADN1cible.mettre_etoile(int), OriginAlgorithmsStefan.mettre_etoile(origincomment.ADN1cible, int)

toString

public java.lang.String toString(int debut,
                                 int fin)
SOME SHOW FOR VIEW
"To visualize considered sequence [current instance]"
CIBLE SEQUENCE

Parameters:
debut - (int) begin
fin - (int) end
Returns:
(String)
See Also:
ADN1cible.afficher_Caracteristique(), ADN1cible.toString(int, int), Interface12.setInterface(Profil, String, Palindrome1cible, int)

quel_score

public double[] quel_score()
TEST SEQUENCE

Returns:
(double[7])

change_score

public void change_score(double[] sc)
To change current score of test sequence.

Parameters:
sc - (double[7])

quelle_base

public char quelle_base(int pos)
To get a Base at a specific position.
In the char[] table (aligned sequence : can be gap).
TEST SEQUENCE

Parameters:
pos - (int)
Returns:
(Base)
See Also:
ADN1test.quelle_base(int)

quelle_longueur_test

public int quelle_longueur_test()
Length of aligned sequence (gap's included).
TEST SEQUENCE

Returns:
(int)
See Also:
ADN1cible.quelle_longueur()

est_Une_Base

public boolean est_Une_Base(char base)
Deprecated. Replace by use of Base.isBaseOrGap(char)...

"Method which test if read character is a base in aligned sequences"
TEST SEQUENCE

Parameters:
base - (char)
Returns:
(boolean) true if base or '-'
See Also:
ADN1.est_Une_Base(char)

getCarbonCopy

public Sequence getCarbonCopy()
====================================================================