Skip to content

Commit

Permalink
undocumented beta release tested with beta tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cnotred committed Nov 19, 2020
1 parent 4d93b67 commit e57994d
Show file tree
Hide file tree
Showing 16 changed files with 169 additions and 55 deletions.
Binary file modified binaries/macosx/t_coffee
Binary file not shown.
2 changes: 1 addition & 1 deletion build/web-readme.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
T-Coffee distribution
=====================
Version_13.45.15.8d1d86e #_#UPDATE_VERSION -- Populated by edit_version.pl
Version_13.45.17.4d93b67 #_#UPDATE_VERSION -- Populated by edit_version.pl
The version ID is organized as follows: <Major Release>.<Latest Stable>.<Latest Beta>.<Github version tag>
Content of this directory:
Linux Installation:
Expand Down
2 changes: 1 addition & 1 deletion docs/.html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: d98a586a128ba1c5e51040b0f0f3da4d
config: 95a093d02ab14c2a2eadb0e970d0fd0a
tags: 33eac41acc08762151beb8f3b7b86c8f
Binary file modified docs/.html/.doctrees/environment.pickle
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/.html/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: 'Version_13.45.15.8d1d86e',
VERSION: 'Version_13.45.17.4d93b67',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
Expand Down
6 changes: 3 additions & 3 deletions docs/.html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>T-Coffee Version_13.45.15.8d1d86e documentation</title>
<title>T-Coffee Version_13.45.17.4d93b67 documentation</title>



Expand Down Expand Up @@ -58,7 +58,7 @@


<div class="version">
Version_13.45.15.8d1d86e
Version_13.45.17.4d93b67
</div>


Expand Down Expand Up @@ -716,7 +716,7 @@

<li><a href="index.html#document-index">Docs</a> &raquo;</li>

<li>T-Coffee Version_13.45.15.8d1d86e documentation</li>
<li>T-Coffee Version_13.45.17.4d93b67 documentation</li>


<li class="wy-breadcrumbs-aside">
Expand Down
Binary file modified docs/.html/objects.inv
Binary file not shown.
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
# built documents.
#
# The short X.Y version.
version = u'Version_13.45.15.8d1d86e' #_#UPDATE_VERSION_TAG1 -- Populated by edit_version.pl
version = u'Version_13.45.17.4d93b67' #_#UPDATE_VERSION_TAG1 -- Populated by edit_version.pl
# The full version, including alpha/beta/rc tags.
release = u'Version_13.45.15.8d1d86e' #_#UPDATE_VERSION_TAG2 -- Populated by edit_version.pl
release = u'Version_13.45.17.4d93b67' #_#UPDATE_VERSION_TAG2 -- Populated by edit_version.pl

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
163 changes: 123 additions & 40 deletions lib/dp_lib/phylo3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,21 @@ double scan_maxd (p3D *D)
if (!getenv ("REFERENCE_TREE"))
{
RT= compute_cw_tree(D->A);
fprintf ( stderr, "\n!#ref_tree= [cw] -- %s",tree2string (RT));
if (verbose())fprintf ( stderr, "\n!#ref_tree= [cw] -- %s",tree2string (RT));
}
else if ( getenv ("REFERENCE_TREE") && isfile(getenv ("REFERENCE_TREE")))
{
RT=main_read_tree (getenv ("REFERENCE_TREE"));
fprintf ( stderr, "\n!#ref_tree=%s", getenv ("REFERENCE_TREE"));
if (verbose())fprintf ( stderr, "\n!#ref_tree=%s", getenv ("REFERENCE_TREE"));
}
else
{
RT= compute_cw_tree(D->A);
vfclose (tree2file (RT, S, "newick",vfopen(getenv ("REFERENCE_TREE"), "w")));
fprintf ( stderr, "\n!# ref_tree=%s [cw]", getenv ("REFERENCE_TREE"));
if (verbose())fprintf ( stderr, "\n!# ref_tree=%s [cw]", getenv ("REFERENCE_TREE"));
}

fprintf ( stderr, "\n!# scan3D_max=%d", scan3D_max);
if (verbose())fprintf ( stderr, "\n!# scan3D_max=%d", scan3D_max);

brf=0;
bmaxd=D->extremed;
Expand All @@ -90,26 +90,26 @@ double scan_maxd (p3D *D)
dist2nj_tree (D->dm, A->name, A->nseq, treeF);
T=main_read_tree(treeF);
rf=simple_tree_cmp(RT,T, S, 1);
fprintf ( stderr, "\n!# Threshold = %3d Angstrom ==> %6.2f %% Similiarity with ref_tree -- Nsites: %d", a, rf, D->nsites) ;
if (verbose())fprintf ( stderr, "\n!# Threshold = %3d Angstrom ==> %6.2f %% Similiarity with ref_tree -- Nsites: %d", a, rf, D->nsites) ;

if ( rf>brf)
if ( rf>=brf)
{
brf=rf;
bmaxd=(double)a;
}
}
else
{
fprintf ( stderr, "\n!# Threshold = %3d Angstrom ==> Missing Values in the distance matrix", a) ;
if (verbose())fprintf ( stderr, "\n!# Threshold = %3d Angstrom ==> Missing Values in the distance matrix", a) ;
}
}
if (brf>0)
{
fprintf ( stderr, "\n!# Optimal Threshold: %d Angstrom ==> %.2f %% RF similarity with ref_tree\n", (int)bmaxd, brf);
if (verbose())fprintf ( stderr, "\n!# Optimal Threshold: %d Angstrom ==> %.2f %% RF similarity with ref_tree\n", (int)bmaxd, brf);
}
else
{
fprintf ( stderr, "\n!# WARNING -- Missing Values -- Could not find any suitable threshold - Use max value %d Angstrom -use a higher value for scan3D_max ", (int)bmaxd);
if (verbose())fprintf ( stderr, "\n!# WARNING -- Missing Values -- Could not find any suitable threshold - Use max value %d Angstrom -use a higher value for scan3D_max ", (int)bmaxd);
}
free_sequence (S, -1);

Expand All @@ -131,8 +131,10 @@ Alignment *phylo3d_gt (Alignment *inA, Constraint_list *CL)
//set the parameters

l=2*A->len_aln;
D->colrep=declare_int ((l*l-l)/2+1,2);

D->colrep=declare_int ((l*l-l)/2+1,3);
vfree(D->used_site);D->used_site=NULL;
free_int(D->used_site_pair, -1);D->used_site_pair=NULL;

S=aln2seq(A);

if (D->maxd<MY_EPSILON)D->maxd=D->extremed*100+1;
Expand Down Expand Up @@ -174,7 +176,7 @@ Alignment *phylo3d_gt (Alignment *inA, Constraint_list *CL)


D->dm[s1][s2]=D->dm[s2][s1]=pair2dist(D,s1,s2);
output_completion (stderr,n,tot,1, "Guide Tree Computation");
if (verbose())output_completion (stderr,n,tot,1, "Guide Tree Computation");

//restaure data
A->seq_al[s1]=buf_s1;
Expand All @@ -198,6 +200,8 @@ int free_3dD (p3D*D)
free_arrayN((void***)D->dm3d,3);
free_arrayN((void**)D->dm,2);
free_arrayN ((void**)D->col,2);
vfree (D->used_site);
free_int(D->used_site_pair, -1);
vfree (D);
return 1;
}
Expand Down Expand Up @@ -249,7 +253,10 @@ p3D* fill_p3D (Alignment *A, Constraint_list *CL)
if (D->maxd>=0 && D->maxd<MY_EPSILON)D->maxd=D->extremed*100;

D->dm =declare_double(A->nseq, A->nseq);
D->nsites=-1;
D->used_site=(int*)vcalloc (A->len_aln, sizeof (int));
D->nsitepairs=-1;
D->used_site_pair=declare_int (A->len_aln, A->len_aln);

if (A->Tree) free_aln (A->Tree); A->Tree=NULL;
A->Tree=declare_aln2(D->replicates+1, 0);
Expand All @@ -258,37 +265,72 @@ p3D* fill_p3D (Alignment *A, Constraint_list *CL)
(A->Tree)->nseq=0;
return D;
}
int col2n (int **col)
{
int i=0;
if (!col) return 0;
else if (!col[0])return 0;

while (col[i++][0]!=-1);
return i-1;
}


p3D * makerep (p3D *D, int mode)
{
D->colrep=col2colrep(D->col, D->colrep, D->N, mode);
if (mode==0) D->colrep=col2rep(D->col, D->colrep, D->N);
else if ( mode==1)D->colrep=col2bsrep(D->col, D->colrep, D->N);
return D;
}
int **col2colrep (int **colin,int **colout, int ni, int mode)


int **col2rep (int **colin,int **colout, int ni)
{
int i;

if (!colout)colout=declare_int (ni+1,2);
if (!colout)colout=declare_int (ni+1,3);
for (i=0; i<ni; i++)
{
int ri=(mode)?rand ()%ni:i;
colout[i][0]=colin[i][0];
colout[i][1]=colin[i][1];
}
colout[i][0]=-1;
return colout;
}
int **col2bsrep (int **colin,int **colout, int ni)
{
int i;
if (!colout)colout=declare_int (ni+1,3);
for (i=0; i<ni; i++)
{
int ri=rand()%ni;
colout[i][0]=colin[ri][0];
colout[i][1]=colin[ri][1];
}
colout[i][0]=-1;
return colout;
}


int **col2scramble_col (int **col, int ni)
{
int i;
for (i=0; i<ni; i++)col[i][2]=rand()%(ni*2);
sort_int (col, 3, 2, 0, ni-1);
return col;
}
int col2n (int **col)
{
int i=0;
if (!col) return 0;
else if (!col[0])return 0;

while (col[i++][0]!=-1);
return i-1;
}
int col2max(int **col)
{
int i;
int max=0;
while (col[i][0]!=-1)
{
int c1=col[i][0];
int c2=col[i][1];
if ( c1>max)max=c1;
if ( c2>max)max=c2;
i++;
}
return max;
}
Alignment * addtree (p3D *D,Alignment *A)
{
static char *treeF=vtmpnam (NULL);
Expand All @@ -305,6 +347,17 @@ Alignment * addtree (p3D *D,Alignment *A)
fp=vfopen (TREEA->dmF_list[TREEA->nseq], "w");

fprintf ( fp, "%d \n", A->nseq);
if (getenv ("PRINT_NSITES"))
{
float p1=(float)(D->nsites*100)/(float)A->len_aln;
float p2=(float)(D->nsitepairs*100)/(float)(A->len_aln*A->len_aln-A->len_aln);


fprintf (fp, "!# MAXD: %.2f Angstrom",(float)D->maxd/100);
if (D->nsites >-1) fprintf (fp, "-- NSITES: %d %.2f%%",D->nsites, p1);
if (D->nsitepairs>-1)fprintf (fp, "-- NSITEPAIRS: %d %.2f%%", D->nsitepairs,p2);
fprintf (fp, "\n");
}
for ( s1=0; s1<A->nseq;s1++)
{
fprintf (fp, "%-*.*s ", ml,ml,A->name[s1]);
Expand All @@ -313,7 +366,7 @@ Alignment * addtree (p3D *D,Alignment *A)
fprintf (fp, "\n");
}
fprintf (fp, "\n");
if (getenv ("PRINT_NSITES"))fprintf (fp, "!# NSITES: %d\n", D->nsites);

vfclose (fp);
TREEA->nseq++;
return TREEA;
Expand Down Expand Up @@ -420,7 +473,7 @@ int filter_columns_with_gap (int **col, Alignment *B, float max_gap)
int** msa2column_list (Alignment *B, int **col)
{
int i, j, n;
if (!col)col=declare_int(((B->len_aln*B->len_aln)-B->len_aln)/2+1,2);
if (!col)col=declare_int(((B->len_aln*B->len_aln)-B->len_aln)/2+1,3);
for (n=0,i=1; i<B->len_aln-1; i++)
for (j=i+1; j<B->len_aln; j++, n++)
{
Expand Down Expand Up @@ -522,18 +575,36 @@ int aln2dm (p3D *D, Alignment *A)
{
int rv=1;
int s1, s2;
int c, t;
int c1,c2, t;

for (c=0; c<A->len_aln; c++)D->used_site[c]=0;
if (D->used_site)
{
for (c1=0; c1<A->len_aln; c1++)
{
D->used_site[c1]=0;
for ( c2=0; c2<A->len_aln; c2++)
D->used_site_pair[c1][c2]=0;
}
}


for (s1=0; s1<A->nseq-1; s1++)
for (s2=s1+1; s2<A->nseq; s2++)
{
D->dm[s1][s2]=D->dm[s2][s1]=pair2dist (D,s1, s2);
if (D->dm[s1][s2]<-99)rv=0;
}
for (D->nsites=0,c=0; c<A->len_aln; c++)
D->nsites+=D->used_site[c];
if ( D->used_site)
{
for (D->nsites=0,D->nsitepairs=0,c1=0; c1<A->len_aln; c1++)
{
D->nsites+=D->used_site[c1];
for (c2=0; c2<A->len_aln; c2++)
{
D->nsitepairs+=D->used_site_pair[c1][c2];
}
}
}

return rv;
}
Expand Down Expand Up @@ -582,7 +653,8 @@ double pair2dist(p3D *D, int s1, int s2)

score+=rscore;
max+=rmax;
D->used_site[c1]=D->used_site[c2]=1;
if (D->used_site)D->used_site[c1]=D->used_site[c2]=1;
if (D->used_site_pair)D->used_site_pair[c1][c2]=D->used_site_pair[c2][c1]=1;

}

Expand All @@ -594,13 +666,24 @@ double phylo3d2score (double w1, double w2, double *rscore, double *rmax)
{
double we=0;
double sc=0;
static int distance_mode=atoigetenv ("THREED_TREE_MODE");
static double distance_modeE=atofgetenv ("THREED_TREE_MODE_EXP");
static int no_weights=atoigetenv ("THREED_TREE_NO_WEIGHTS");
static int setparam;
static int distance_mode;
static double distance_modeE;
static int no_weights;

if ( distance_modeE<MY_EPSILON)distance_modeE=3;


if (!setparam)
{
setparam=1;
if (getenv ("THREED_TREE_MODE"))distance_mode=atoigetenv ("THREED_TREE_MODE");
else distance_mode=4;

if (getenv ("THREED_TREE_MODE_EXP"))distance_modeE=atofgetenv ("THREED_TREE_MODE_EXP");
else distance_modeE=2;

if (getenv ("THREED_TREE_NO_WEIGHTS"))no_weights=atoigetenv ("THREED_TREE_NO_WEIGHTS");
else no_weights=1;
}

//first attempt-- Major issue because non symetrical and therefore not a distance
if (!distance_mode)
Expand Down
6 changes: 6 additions & 0 deletions lib/dp_lib/phylo3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ struct p3D
int **colrep;
int *used_site;
int nsites;
int **used_site_pair;
int nsitepairs;



Expand All @@ -35,6 +37,10 @@ p3D* fill_p3D (Alignment *A, Constraint_list *CL);
int col2n (int **col);
p3D * makerep (p3D *D, int mode);
int **col2colrep (int **colin,int **colout, int ni, int mode);

int **col2rep (int **colin,int **colout, int ni);
int **col2bsrep (int **colin, int **colout, int ni);

Alignment * addtree (p3D *D,Alignment *A);
int filter_columns_with_dist(Alignment *B, int **pos,int **col,int ***dm, double maxd);
int filter_columns_with_dist_strict(Alignment *B, int **pos,int **col,int ***dm, double maxd);
Expand Down

0 comments on commit e57994d

Please sign in to comment.