Skip to content

Commit

Permalink
fixed warnings and tables in the doc
Browse files Browse the repository at this point in the history
  • Loading branch information
cnotred committed Aug 7, 2015
1 parent a06c8a9 commit 69abc16
Show file tree
Hide file tree
Showing 7 changed files with 128 additions and 94 deletions.
20 changes: 0 additions & 20 deletions docs/tcoffee_developper.rst

This file was deleted.

2 changes: 1 addition & 1 deletion docs/tcoffee_installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ If you want to have your own BLAST server to run your own databases, you should



.. warning:: Note that T-Coffee is compliant with BLAST+, the latest NCBI Blast.
.. tip:: T-Coffee is compliant with BLAST+, the latest NCBI Blast.

Using a BLAST local version on Windows/cygwin
---------------------------------------------
Expand Down
105 changes: 51 additions & 54 deletions docs/tcoffee_manual.rst

Large diffs are not rendered by default.

12 changes: 4 additions & 8 deletions docs/tcoffee_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,6 @@ In general, you can set any environment variable using the -setenv flag. You can



.. warning:: IMPORTANT:

.. warning:: export > -setenv > -proxy, -email > t_coffee_env > default environment

Note that when you use -setenv for PATH, the value you provide is concatenated TO THE BEGINNING of the current PATH value. This way you can force T-Coffee to use a specific version of an aligner.
Expand Down Expand Up @@ -616,7 +614,7 @@ Sequence Input

*This flag sets the type of the sequences. If omitted, the type is guessed automatically. This flag is compatible with ClustalW.*

.. warning:: Warning: In case of low complexity or short sequences, it is recommended to set the type manually.
.. warning:: In case of low complexity or short sequences, it is recommended to set the type manually.

-seq
^^^^
Expand Down Expand Up @@ -712,7 +710,7 @@ Structures, Sequences Methods and Library Input via the -in Flag

*Default: -in=Mlalign_id_pair,Mclustalw_pair*

.. warning:: Note: -in can be replaced with the combined usage of -aln, iprofile, .pdb, .lib, -method.
.. note:: Note: -in can be replaced with the combined usage of -aln, iprofile, .pdb, .lib, -method.

*See the box for an explanation of the -in flag. The following argument passed via -in*

Expand Down Expand Up @@ -775,7 +773,7 @@ Structures, Sequences Methods and Library Input via the -in Flag

*This command results in a progressive alignment carried out on the sequences in seqfile. The procedure does not use any more the T-Coffee concistency based algorithm, but switches to a standard progressive alignment algorithm (like ClustalW or Pileup) much less accurate. In this context, appropriate gap penalties should be provided. The matrices are in the file source/matrices.h. Add-Hoc matrices can also be provided by the user (see the matrices format section at the end of this manual).*

.. warning:: Warning: Xmatrix does not have the same effect as using the -matrix flag. The -matrix defines the matrix that will be used while compiling the library while the Xmatrix defines the matrix used when assembling the final alignment.
.. warning:: **X**matrix does not have the same effect as using the -matrix flag. The -matrix defines the matrix that will be used while compiling the library while the Xmatrix defines the matrix used when assembling the final alignment.

Profile Input
-------------
Expand Down Expand Up @@ -2178,9 +2176,7 @@ Structural Analysis
===================
APDB, iRMSD and tRMSD Parameters
--------------------------------
.. warning:: Warning: These flags will only work within the APDB package that can be invoked via the -other_pg parameter of T-Coffee:

.. warning:: t_coffee -other_pg apdb -aln <your aln>
.. warning:: These flags will only work within the APDB package that can be invoked via the -other_pg parameter of T-Coffee: t_coffee -other_pg apdb -aln <your aln>

-quiet [Same as T-Coffee]
^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
74 changes: 66 additions & 8 deletions lib/dp_lib/evaluate.c
Original file line number Diff line number Diff line change
Expand Up @@ -5052,7 +5052,7 @@ 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* 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;
Expand All @@ -5061,18 +5061,19 @@ int get_dp_cost_sankoff_tree ( Alignment *A, int**pos1, int ns1, int*list1, int
static int **matrix;

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

int *sa;

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];
Expand All @@ -5087,8 +5088,14 @@ int get_dp_cost_sankoff_tree ( Alignment *A, int**pos1, int ns1, int*list1, int
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);

sa=column2sankoff_score (key, N, nseq,matrix,gep);
score=sa[0];
for (a=1; a<=26; a++)score=MAX(sa[a],score);
vfree(sa);

for ( a=0; a< ns1; a++)
{
s=list1[a];
Expand All @@ -5103,11 +5110,62 @@ int get_dp_cost_sankoff_tree ( Alignment *A, int**pos1, int ns1, int*list1, int
r =pos2[s][col1];
key[s]=(r>0)?(CL->S)->seq[s][r-1]:'-';
}
return score;
score*=SCORE_K;
return score*SCORE_K;
}
int column2sankoff_score (int *lu, NT_node T, int nseq, int **matrix, int gep)
int* column2sankoff_score (int *lu, NT_node T, int nseq, int **c, int gep)
{
return 1;
int inf=-999999;
if (!T)return NULL;
else if (T->isseq)
{
int *S=(int*)vcalloc (27, sizeof (int));
S=(int*)memset ((void*)S,inf, 27*sizeof(int));
char r=lu[T->lseq[0]];

if (r=='-')S[26]=gep;
else
{
r=tolower(r)-'a';
S[r]=c[r][r];
}
return S;
}
else
{
int i, j, k;
int *S =(int*)vcalloc (27, sizeof (int));
int *Sl=column2sankoff_score(lu,T->left , nseq, c, gep);
int *Sr=column2sankoff_score(lu,T->right, nseq, c, gep);

for (i=0; i<=26; i++)
{
int max_j=inf;
int max_k=inf;
int mc;
for (j=0; j<=26;j++)
{

if (i==26 || j==26)mc=gep;
else mc=c[i][j];

int v=((Sl[j])==inf)?inf:(mc+Sl[j]);
if (v>max_j)max_j=v;
}
for (k=0; k<=26;k++)
{
if (i==26 || k==26)mc=gep;
else mc=c[i][k];

int v=(Sr[k]==inf)?inf:(mc+Sr[k]);
if (v>max_k)max_k=v;
}
S[i]=(max_k==inf || max_j==inf)?inf:(max_k+max_j);
}
vfree(Sl);
vfree(Sr);
return S;
}
}
/*********************************************************************************************/
/* */
Expand Down
3 changes: 2 additions & 1 deletion lib/dp_lib/util_dp_gotoh_nw.c
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,7 @@ int gotoh_pair_wise (Alignment *A,int*ns, int **l_s,Constraint_list *CL)
static int sample=0;//road==0, random tie; road=1: upper road; road=2 lower road;
static int set_sample;


/********Prepare penalties*******/
gop=CL->gop*SCORE_K;
gep=CL->gep*SCORE_K;
Expand Down Expand Up @@ -902,7 +903,7 @@ int gotoh_pair_wise (Alignment *A,int*ns, int **l_s,Constraint_list *CL)
{

sub=(CL->get_dp_cost) (A, pos0, ns[0], l_s[0], i-1, pos0, ns[1], l_s[1],j-1,CL);

/*get the best Insertion*/
l_gop=(i==lenal[0] || i==1 )?((TG_MODE==0)?gop:0):gop;
l_gep=(i==lenal[0] || i==1)?((TG_MODE==2)?0:gep):gep;
Expand Down
6 changes: 4 additions & 2 deletions lib/t_coffee_lib/t_coffee.c
Original file line number Diff line number Diff line change
Expand Up @@ -5069,9 +5069,11 @@ get_cl_param(\
if ( A->nseq==1);
else if ( strm ( msa_mode, "sankoff_aln"))
{

CL->get_dp_cost=get_dp_cost_sankoff_tree;

//CL->get_dp_cost=get_dp_cost_sankoff_tree;
CL->get_dp_cost=slow_get_dp_cost;
CL->pair_wise=gotoh_pair_wise;

pc=tree_file;
if ( strm (tree_file, "default") || !check_file_exists (tree_file))
{
Expand Down

0 comments on commit 69abc16

Please sign in to comment.