origincomment
Class ADN1test

java.lang.Object
  extended by origincomment.ADN1
      extended by origincomment.ADN1test

public class ADN1test
extends ADN1

Class for tests sequence (homologuous), but already used for target (cible) sequence.
This class for aligned sequences : methods works like that...

Author:
Stéfan Engelen (2006) for coding..., Gabriel Chandesris (2008) for comments and makeing the code readable.

Field Summary
private static int compteur
          "For the count of time of optimal result."
private static java.util.Calendar debut
          "For the count of time of optimal result."
private static java.util.Calendar fin
          "For the count of time of optimal result."
private  int longueur
          Length of the current sequence.
private static ADN1test[] meilleuresSeqTest
          The best test sequences.
private  double[] score
          Tab of scores of current sequence.
private static double scoreMax
          Maximal score (default is -300).
private  char[] sequence
          Current sequence in char tab.
private static int total
          "For the count of time of optimal result."
 
Fields inherited from class origincomment.ADN1
nom
 
Constructor Summary
ADN1test(java.lang.String nomFichier, java.lang.String sequence)
          Constructor with given name and aligned sequence...
 
Method Summary
static void aff(int[][] matrice, java.lang.String seq5, java.lang.String seq3)
          Methode pour afficher la matrice d'alignement
static java.lang.String afficherNom_web(ADN1test[] tabAdn)
          Some changes to this procedure to make results appears for web / HTML.
static java.lang.String afficherNom(ADN1test[] tabAdn)
          To bet the name of a tab of instances of ADN1test.
 int alignement(int debut5, int fin5, int debut3, int fin3)
          Deprecated. (unused...)
 void change_base(int pos, char nv_base)
           
static void change_meilleures_sequences_test(ADN1test[] nvtabSeq)
           
 void change_score(double[] sc)
           
static java.util.Vector choisirSequencesTests(ADN1cible adn, ADN1test[] adntest, java.util.Vector seqTestVec, java.util.Vector boolTestVec)
          "Procedure to choose tests sequences by default or not"
Work on the selection made by user on original graphical interface.
static ADN1test[] distance(ADN1cible adn, ADN1test adncible, ADN1test[] adntest)
          "procedure which give a score to the test sequence and sort them. "
First part of SSCA algorithm : scores !
 boolean est_Une_Base(char base)
          "Method which test if read character is a base in aligned sequences"
 ADN1test[] evoluer(int nb_pas_tot, Profil profil)
          Deprecated. (unused...)
 boolean match(char x, char y)
          "Method which test if two bases can pair
private static void meilleur_combinaison_sequence(ADN1cible adn, ADN1cible adnoptimal, ADN1test adntest, ADN1test[] tabSeq, int[] quelleSeq, int etape, int debut, int seuil, int typeRecherche, int scoreMax, Resultat resultat, boolean rechercher_pk)
           
 void mutation(int pos_mut, java.util.Random r, Profil profil)
           
 double[] quel_score()
           
 char quelle_base(int pos)
           
 int quelle_longueur()
           
 char[] quelle_sequence()
           
static ADN1test[] quelles_meilleures_sequences_test()
           
static ADN1test[] resultat_Optimal(ADN1cible adn, ADN1test adntest, ADN1test[] tabAdn, java.io.BufferedReader entree, int nbSeqTest, int seuil, int typeRecherche, boolean rechercher_pk)
          "Method which test all possibilities of permutations of test sequences
 int score(char troisprime, char cinqprime)
          "Methodes pour calculer le cout d'alignement de deux bases"
static ADN1test[] sequenceTests(java.lang.String seqTests)
          Deprecated. [not used]
 java.lang.String toString(int debut, int fin)
          To get a String of current instance sequence, between debut and fin.
private static void toutes_combinaisons(ADN1test[] tabSeq, ADN1test[] quelleSeq, java.util.Vector vecTabAdnFinal, int etape, int debut)
          All combinations.
static ADN1test[] trier(ADN1test adncible, ADN1test[] adntest, int quelscore)
          To sort the tab...
 
Methods inherited from class origincomment.ADN1
afficher_Caracteristique_Web, afficher_Caracteristique, change_nom, load_File, quel_nom, to_File
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

longueur

private int longueur
Length of the current sequence.


sequence

private char[] sequence
Current sequence in char tab.


score

private double[] score
Tab of scores of current sequence.


meilleuresSeqTest

private static ADN1test[] meilleuresSeqTest
The best test sequences.


scoreMax

private static double scoreMax
Maximal score (default is -300).


total

private static int total
"For the count of time of optimal result."


compteur

private static int compteur
"For the count of time of optimal result."


debut

private static java.util.Calendar debut
"For the count of time of optimal result."


fin

private static java.util.Calendar fin
"For the count of time of optimal result."

Constructor Detail

ADN1test

public ADN1test(java.lang.String nomFichier,
                java.lang.String sequence)
Constructor with given name and aligned sequence...

Parameters:
nomFichier - (String) name of the file
sequence - (String) aligned sequence
See Also:
est_Une_Base(char)
Method Detail

quelle_longueur

public int quelle_longueur()

quel_score

public double[] quel_score()

quelle_sequence

public char[] quelle_sequence()

quelle_base

public char quelle_base(int pos)

quelles_meilleures_sequences_test

public static ADN1test[] quelles_meilleures_sequences_test()

change_score

public void change_score(double[] sc)

change_meilleures_sequences_test

public static void change_meilleures_sequences_test(ADN1test[] nvtabSeq)

change_base

public void change_base(int pos,
                        char nv_base)

match

public boolean match(char x,
                     char y)
"Method which test if two bases can pair. "

Overrides:
match in class ADN1
Parameters:
x - (char)
y - (char)
Returns:
(boolean) true if match or both are '-'
See Also:
match(char, char), ADN1cible.recherche_Point_Ancrage(ADN1cible, int, int, int, double, ADN1test[], int), score(char, char), ADN1cible.verifier_Conservation_Commune(Palindrome1cible, Palindrome1test, double, double, int, ADN1test[]), ADN1cible.verifier_Conservation(Palindrome1cible, Palindrome1test, double, double, int, ADN1test[])

est_Une_Base

public boolean est_Une_Base(char base)
"Method which test if read character is a base in aligned sequences"

Overrides:
est_Une_Base in class ADN1
Parameters:
base - (char)
Returns:
(boolean) true if base or '-'
See Also:
ADN1.est_Une_Base(char), ADN1cible.est_Une_Base_Test(char)

choisirSequencesTests

public static java.util.Vector choisirSequencesTests(ADN1cible adn,
                                                     ADN1test[] adntest,
                                                     java.util.Vector seqTestVec,
                                                     java.util.Vector boolTestVec)
"Procedure to choose tests sequences by default or not"
Work on the selection made by user on original graphical interface.

Parameters:
adn - (ADN1cible)
adntest - (ADN1test[])
seqTestVec - (Vector)
boolTestVec - (Vector)
See Also:
Interface1.selectionInt, Interface1.selectionBool, toutes_combinaisons(ADN1test[], ADN1test[], Vector, int, int), ProcessusOrigin.computing(Vector, ADN1cible, boolean, boolean), OriginAlgorithmsStefan.computing(Vector, ADN1cible, boolean, boolean)

toutes_combinaisons

private static void toutes_combinaisons(ADN1test[] tabSeq,
                                        ADN1test[] quelleSeq,
                                        java.util.Vector vecTabAdnFinal,
                                        int etape,
                                        int debut)
All combinations.

Parameters:
tabSeq - (ADN1test[])
quelleSeq - (ADN1test[])
vecTabAdnFinal - (Vector) output of procedure ?
etape - (int)
debut - (int)
See Also:
choisirSequencesTests(ADN1cible, ADN1test[], Vector, Vector)

distance

public static ADN1test[] distance(ADN1cible adn,
                                  ADN1test adncible,
                                  ADN1test[] adntest)
"procedure which give a score to the test sequence and sort them. "
First part of SSCA algorithm : scores !

Parameters:
adn - (ADN1cible)
adncible - (ADN1test)
adntest - (ADN1test[]) same as return ?
Returns:
(ADN1test[]) same as argument (modulo the scores) ?
See Also:
Profil, trier(ADN1test, ADN1test[], int)

trier

public static ADN1test[] trier(ADN1test adncible,
                               ADN1test[] adntest,
                               int quelscore)
To sort the tab...

Parameters:
adncible - (ADN1test)
adntest - (ADN1test[])
quelscore - (int)
Returns:
(ADN1test[])
See Also:
distance(ADN1cible, ADN1test, ADN1test[])

resultat_Optimal

public static ADN1test[] resultat_Optimal(ADN1cible adn,
                                          ADN1test adntest,
                                          ADN1test[] tabAdn,
                                          java.io.BufferedReader entree,
                                          int nbSeqTest,
                                          int seuil,
                                          int typeRecherche,
                                          boolean rechercher_pk)
                                   throws java.lang.Exception
"Method which test all possibilities of permutations of test sequences. "

Parameters:
adn - (ADN1cible)
adntest - (ADN1test)
tabAdn - (ADN1test[])
entree - (BufferedReader) Input data for optimal sequence content
nbSeqTest - (int) number of test sequences
seuil - (int) treshold
typeRecherche - (int) search type (default is 3)
rechercher_pk - (boolean) search of pseudoknot (default is true)
Returns:
(ADN1test[])
Throws:
java.lang.Exception - e
See Also:
meilleur_combinaison_sequence(ADN1cible, ADN1cible, ADN1test, ADN1test[], int[], int, int, int, int, int, Resultat, boolean)

meilleur_combinaison_sequence

private static void meilleur_combinaison_sequence(ADN1cible adn,
                                                  ADN1cible adnoptimal,
                                                  ADN1test adntest,
                                                  ADN1test[] tabSeq,
                                                  int[] quelleSeq,
                                                  int etape,
                                                  int debut,
                                                  int seuil,
                                                  int typeRecherche,
                                                  int scoreMax,
                                                  Resultat resultat,
                                                  boolean rechercher_pk)
                                           throws java.lang.Exception
Parameters:
adn - (ADN1cible)
adnoptimal - (ADN1cible) After use of the bufferedReader...
adntest - (ADN1test)
tabSeq - (ADN1test[])
quelleSeq - (int[])
etape - (int)
debut - (int)
seuil - (int)
typeRecherche - (int) search type (default is 3)
scoreMax - (int)
resultat - (Resultat)
rechercher_pk - (boolean) search of pseudoknot (default is true)
Throws:
java.lang.Exception - e
See Also:
Resultat, ADN1cible.calcul_Resultat(ADN1test[], int, boolean, boolean), ADN1cible.initialiser(), resultat_Optimal(ADN1cible, ADN1test, ADN1test[], BufferedReader, int, int, int, boolean)

alignement

public int alignement(int debut5,
                      int fin5,
                      int debut3,
                      int fin3)
Deprecated. (unused...)

"Methode pour calculer un score d'alignement. Si on veut ameliorer l'alignement il faut completer la fonction pour qu'elle retrouve et retourne l'alignement local optimal (je l'ai deja ecrit)."

Parameters:
debut5 - (int)
fin5 - (int)
debut3 - (int)
fin3 - (int)
Returns:
(int)
See Also:
aff(int[][], String, String), score(char, char)

score

public int score(char troisprime,
                 char cinqprime)
"Methodes pour calculer le cout d'alignement de deux bases"

Parameters:
troisprime - (char)
cinqprime - (char)
Returns:
(int)
See Also:
alignement(int, int, int, int)

aff

public static void aff(int[][] matrice,
                       java.lang.String seq5,
                       java.lang.String seq3)
Methode pour afficher la matrice d'alignement

Parameters:
matrice - (int [][])
seq5 - (String)
seq3 - (String)
See Also:
alignement(int, int, int, int)

sequenceTests

public static ADN1test[] sequenceTests(java.lang.String seqTests)
Deprecated. [not used]

"Methode pour recuperer les sequences tests par l'interface graphique en les stockant dans un tableau qui est retourne"

Parameters:
seqTests - (String)
Returns:
(ADN1test[])

evoluer

public ADN1test[] evoluer(int nb_pas_tot,
                          Profil profil)
Deprecated. (unused...)

"Methode pour faire evoluer une sequence et generer de nouvelles sequences resultant de n pas d'evolution. A chaque pas d'evolution 2 sequences nouvelles ou non sont generees."

Parameters:
nb_pas_tot - (int)
profil - (Profil)
Returns:
(ADN1test[])
See Also:
mutation(int, Random, Profil), Profil, Random

mutation

public void mutation(int pos_mut,
                     java.util.Random r,
                     Profil profil)
Parameters:
pos_mut - (int)
r - (Random)
profil - (Profil)
See Also:
evoluer(int, Profil), Profil, Random

afficherNom

public static java.lang.String afficherNom(ADN1test[] tabAdn)
To bet the name of a tab of instances of ADN1test.
Indication about black blaox : first sequence excluded from show : target sequence ?

Parameters:
tabAdn - (ADN1test[])
Returns:
(String)

afficherNom_web

public static java.lang.String afficherNom_web(ADN1test[] tabAdn)
Some changes to this procedure to make results appears for web / HTML.

Parameters:
tabAdn - (ADN1test[])
Returns:
(String)

toString

public java.lang.String toString(int debut,
                                 int fin)
To get a String of current instance sequence, between debut and fin.

Parameters:
debut - (int)
fin - (int)
Returns:
(String)