Skip to content

Commit

Permalink
fixed the doc
Browse files Browse the repository at this point in the history
  • Loading branch information
cnotred committed Aug 5, 2015
1 parent 1ec4df7 commit bb69c3e
Show file tree
Hide file tree
Showing 20 changed files with 5,422 additions and 11,094 deletions.
3 changes: 3 additions & 0 deletions docs/TCS.rst → docs/msa_evaluation.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#############################
Evaluating and Filtering MSAs
#############################
*******************************
Transitive Consistency Score
*******************************
Expand Down
913 changes: 341 additions & 572 deletions docs/t_coffee_technical.rst

Large diffs are not rendered by default.

1,460 changes: 805 additions & 655 deletions docs/t_coffee_tutorial.rst

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions docs/3DTREE.rst → docs/trees.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
**********
3DTree
**********
###################
Tree Reconstruction
###################
********************************************
Trees Based on Protein 3D Structures: T-RMSD
********************************************

*Tree estimation procedure based on the comparison of internal distances*

Expand Down
84 changes: 73 additions & 11 deletions lib/dp_lib/evaluate.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include <search.h>
#include "io_lib_header.h"
#include "util_lib_header.h"
#include "define_header.h"
Expand Down Expand Up @@ -2466,7 +2467,7 @@ int channel_profile_profile ( int *prf1, int *prf2, Constraint_list *CL)

/*********************************************************************************************/
/* */
/* FUNCTIONS FOR GETING THE COST : (Sequences) ->evaluate_residue_pair */
/* FUNCTIONS FOR GETING THE COST : (Sequences) ->evaluate_residue_pair ::START */
/* */
/*********************************************************************************************/
int initialize_scoring_scheme (Constraint_list *CL)
Expand Down Expand Up @@ -3908,11 +3909,18 @@ int extend_residue_pair ( Constraint_list *CL, int s1, int r1, int s2, int r2)
return (int)(score*SCORE_K);
}
}

/*********************************************************************************************/
/* */
/* FUNCTIONS FOR GETING THE COST : (Sequences) ->evaluate_residue_pair ::END */
/* */
/*********************************************************************************************/
/*********************************************************************************************/
/* */
/* FUNCTIONS FOR GETTING THE PW COST : CL->get_dp_cost */
/* FUNCTIONS FOR GETTING THE PW COST : CL->get_dp_cost::START */
/* */
/*********************************************************************************************/

int get_dp_cost_blosum_matrix (Alignment *A, int**pos1, int ns1, int*list1, int col1, int**pos2, int ns2, int*list2, int col2, Constraint_list *CL)
{
int s1, r1, s2, r2;
Expand All @@ -3923,7 +3931,7 @@ int get_dp_cost_blosum_matrix (Alignment *A, int**pos1, int ns1, int*list1, int
s2=A->order[list2[0]][0];
r1=pos1[list1[0]][col1];
r2=pos2[list2[0]][col2];

/*dp cost function: works only with two sequences*/

if ( seq2R_template_profile (CL->S,s1) ||seq2R_template_profile (CL->S,s2))
Expand Down Expand Up @@ -3994,14 +4002,6 @@ int get_dp_cost_pw_matrix (Alignment *A, int**pos1, int ns1, int*list1, int col1
return -CL->nomatch*SCORE_K ;
}

/*********************************************************************************************/
/* */
/* FUNCTIONS FOR GETTING THE COST : CL->get_dp_cost */
/* */
/*********************************************************************************************/



int get_cdna_best_frame_dp_cost (Alignment *A, int**pos1, int ns1, int*list1, int col1, int**pos2, int ns2, int*list2, int col2, Constraint_list *CL)
{
int a, b;
Expand Down Expand Up @@ -5052,6 +5052,68 @@ int get_domain_dp_cost ( Alignment *A, int**pos1, int ns1, int*list1, int col1,
return score;
}

int column2sankoff_score (int *lu, NT_node T, int nseq, int **matrix, int gep);
int get_dp_cost_sankoff_tree ( Alignment *A, int**pos1, int ns1, int*list1, int col1, int**pos2, int ns2, int*list2, int col2, Constraint_list *CL)
{
int a, s, rs,r;
static NT_node T;
static int *key;
static int **matrix;

NT_node N;
int gep=-1;
int nseq=(CL->S)->nseq;
int score;

if (T==NULL)
{
T=main_read_tree (A->tname);
T=recode_tree (T, (CL->S));
matrix=read_matrice ("blosum62mt");
key=(int*)vcalloc ((CL->S)->nseq, sizeof (int));
}

for ( a=0; a< ns1; a++)
{
s=list1[a];
rs=A->order[s][0];
r=pos1[s][col1];
key[s]=(r>0)?(CL->S)->seq[s][r-1]:'-';
}
for ( a=0; a< ns2; a++)
{
s=list2[a];
rs=A->order[s][0];
r =pos2[s][col1];
key[s]=(r>0)?(CL->S)->seq[s][r-1]:'-';
}
N=find_node_in_tree (key, nseq, T);
score=column2sankoff_score (key, N, nseq, matrix,gep);
for ( a=0; a< ns1; a++)
{
s=list1[a];
rs=A->order[s][0];
r=pos1[s][col1];
key[s]=(r>0)?(CL->S)->seq[s][r-1]:'-';
}
for ( a=0; a< ns2; a++)
{
s=list2[a];
rs=A->order[s][0];
r =pos2[s][col1];
key[s]=(r>0)?(CL->S)->seq[s][r-1]:'-';
}
return score;
}
int column2sankoff_score (int *lu, NT_node T, int nseq, int **matrix, int gep)
{
return 1;
}
/*********************************************************************************************/
/* */
/* FUNCTIONS FOR GETTING THE PW COST : CL->get_dp_cost::END */
/* */
/*********************************************************************************************/
/*********************************************************************************************/
/* */
/* FUNCTIONS FOR ANALYSING AL OR MATRIX */
Expand Down
1 change: 1 addition & 0 deletions lib/dp_lib/evaluate.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ int residue_pair_relative_extended_list ( Constraint_list *CL, int s1, int r1, i
/* */
/*********************************************************************************************/
int get_dp_cost_blosum_matrix (Alignment *A, int**pos1, int ns1, int*list1, int col1, int**pos2, int ns2, int*list2, int col2, Constraint_list *CL);
int get_dp_cost_sankoff_tree (Alignment *A, int**pos1, int ns1, int*list1, int col1, int**pos2, int ns2, int*list2, int col2, Constraint_list *CL);
int get_dp_cost_pam_matrix (Alignment *A, int**pos1, int ns1, int*list1, int col1, int**pos2, int ns2, int*list2, int col2, Constraint_list *CL);
int get_dp_cost_pw_matrix (Alignment *A, int**pos1, int ns1, int*list1, int col1, int**pos2, int ns2, int*list2, int col2, Constraint_list *CL);

Expand Down
1 change: 1 addition & 0 deletions lib/io_lib/io_structures.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ struct Alignment

/*Trees*/
Alignment *Tree;
char *tname;
int **RepColList;//last item set to -1
/*Score*/

Expand Down
22 changes: 21 additions & 1 deletion lib/io_lib/tree_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -3733,6 +3733,26 @@ NT_node simple_recode_tree (NT_node T, int nseq)
}
return T;
}
NT_node find_node_in_tree (int *key, int nseq, NT_node T)
{
if (!T || !key || !nseq)return NULL;
else
{
int yes,a;
NT_node C;

for (yes=1,a=0; a<nseq; a++)
{
if ( key[a]&& !T->lseq2[a])return NULL;
else if (!key[a]&& T->lseq2[a])yes=0;
}
if (yes) return T;
else if ((C=find_node_in_tree(key, nseq, T->right)))return C;
else if ((C=find_node_in_tree(key, nseq, T->left )))return C;
else return NULL;
}
return NULL;
}

NT_node recode_tree (NT_node T, Sequence *S)
{
Expand Down Expand Up @@ -4650,7 +4670,7 @@ Split** count_splits( NT_node RT,Sequence *LIST, char *param)


if (!param)param=def_param;


strget_param (param, "_NB_", "0", "%d", &nb);
strget_param (param, "_TLIST_", "0", "%d", &tlist);
Expand Down
2 changes: 1 addition & 1 deletion lib/io_lib/tree_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ NT_node index_tree_node (NT_node T);
NT_node simple_recode_tree (NT_node T, int nseq);
NT_node recode_tree ( NT_node T, Sequence *S);
int compare_branch2 ( int *b1, int *b2, int n);

NT_node find_node_in_tree (int *key, int nseq, NT_node T);
/*********************************************************************/
/* */
/* FJ_tree Computation */
Expand Down

0 comments on commit bb69c3e

Please sign in to comment.