[med-svn] [raxml] 02/06: Imported Upstream version 8.2.7+dfsg
Andreas Tille
tille at debian.org
Mon Mar 14 10:37:08 UTC 2016
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository raxml.
commit b5ace89968896512a9ae0458cb746c1dd3dcfc9d
Author: Andreas Tille <tille at debian.org>
Date: Mon Mar 14 11:16:20 2016 +0100
Imported Upstream version 8.2.7+dfsg
---
README | 13 ++-
Release-Notes | 13 ---
axml.c | 242 +++++++++++++++++++++++++++++++++++++++++++++++++--
axml.h | 12 +--
bipartitionList.c | 30 +++----
manual/NewManual.odt | Bin 136386 -> 136750 bytes
manual/NewManual.pdf | Bin 633051 -> 633998 bytes
multiple.c | 32 +++----
optimizeModel.c | 2 +-
treeIO.c | 56 ++++++++++--
10 files changed, 337 insertions(+), 63 deletions(-)
diff --git a/README b/README
index 6c63aed..1132b20 100644
--- a/README
+++ b/README
@@ -1,6 +1,15 @@
-Standard RAxML version 8.2.3
+Standard RAxML version 8.2.7
-Compiling under Linux:
+============================================================================================================
+
+When using RAxML please cite the following paper:
+
+A. Stamatakis: "RAxML Version 8: A tool for Phylogenetic Analysis and Post-Analysis of Large Phylogenies".
+Bioinformatics (2014) 30 (9): 1312-1313.
+
+============================================================================================================
+
+Quick start under Linux:
standard, SSE3 or AVX version?
diff --git a/Release-Notes b/Release-Notes
deleted file mode 100644
index 842f227..0000000
--- a/Release-Notes
+++ /dev/null
@@ -1,13 +0,0 @@
-RAxML v8.2.3
-
-We view RAxML code development as permanent work in progress.
-
-As such, there are no fixed version available via github but only perpetual code modifications.
-
-For reproducible science, we suggest that you actually include a copy of the actual RAxML source code you used
-in any data you make available or you intend to archive with the respective publication.
-
-If you want to see what has been changed, have a look at the commit history under:
-
-https://github.com/stamatak/standard-RAxML/commits/master/
-
diff --git a/axml.c b/axml.c
index ea01887..e10fc12 100644
--- a/axml.c
+++ b/axml.c
@@ -3050,7 +3050,181 @@ static void checkSequences(tree *tr, rawdata *rdta, analdef *adef)
+static void printPartitionFile(tree *tr, analdef *adef, char* newPartitionFile)
+{
+ if(adef->useMultipleModel && !filexists(newPartitionFile))
+ {
+ FILE
+ *newFile = myfopen(newPartitionFile, "wb");
+
+ int
+ i,
+ l = 1,
+ partitions = 0;
+
+ printBothOpen("\n\nA partitioned model file with model assignments for bootstrap alignments \n");
+ printBothOpen("is printed to file %s\n",newPartitionFile);
+ printBothOpen("IMPORTANT: You MUST use this new model file and NOT the original one when running RAxML and ExaML on these bootstrapped alignments!\n\n");
+
+
+ for(i = 1; i < tr->cdta->endsite; i++)
+ assert(tr->model[i] >= tr->model[i-1]);
+
+ for(i = 0; i < tr->NumberOfModels; i++)
+ {
+ int
+ lower,
+ upper;
+
+ switch(tr->partitionData[i].dataType)
+ {
+ case AA_DATA:
+ {
+ char
+ AAmodel[1024];
+
+ if(tr->partitionData[i].protModels != PROT_FILE)
+ {
+ if(tr->partitionData[i].ascBias)
+ {
+ strcpy(AAmodel, "ASC_");
+ strcat(AAmodel, protModels[tr->partitionData[i].protModels]);
+ }
+ else
+ strcpy(AAmodel, protModels[tr->partitionData[i].protModels]);
+ if(tr->partitionData[i].usePredefinedProtFreqs == FALSE)
+ strcat(AAmodel, "F");
+
+ if(tr->partitionData[i].optimizeBaseFrequencies == TRUE)
+ strcat(AAmodel, "X");
+
+ assert(!(tr->partitionData[i].optimizeBaseFrequencies && tr->partitionData[i].usePredefinedProtFreqs));
+
+ fprintf(newFile, "%s, ", AAmodel);
+ }
+ else
+ fprintf(newFile, "[%s], ", tr->partitionData[i].proteinSubstitutionFileName);
+ }
+ break;
+ case DNA_DATA:
+ if(tr->partitionData[i].ascBias)
+ {
+ if(tr->partitionData[i].optimizeBaseFrequencies == TRUE)
+ fprintf(newFile, "ASC_DNAX, ");
+ else
+ fprintf(newFile, "ASC_DNA, ");
+ }
+ else
+ {
+ if(tr->partitionData[i].optimizeBaseFrequencies == TRUE)
+ fprintf(newFile, "DNAX, ");
+ else
+ fprintf(newFile, "DNA, ");
+ }
+ break;
+ case BINARY_DATA:
+ if(tr->partitionData[i].ascBias)
+ {
+ if(tr->partitionData[i].optimizeBaseFrequencies == TRUE)
+ fprintf(newFile, "ASC_BINX, ");
+ else
+ fprintf(newFile, "ASC_BIN, ");
+ }
+ else
+ {
+ if(tr->partitionData[i].optimizeBaseFrequencies == TRUE)
+ fprintf(newFile, "BINX, ");
+ else
+ fprintf(newFile, "BIN, ");
+ }
+ break;
+ case GENERIC_32:
+ if(tr->partitionData[i].ascBias)
+ {
+ if(tr->partitionData[i].optimizeBaseFrequencies == TRUE)
+ fprintf(newFile, "ASC_MULTIX, ");
+ else
+ fprintf(newFile, "ASC_MULTI, ");
+ }
+ else
+ {
+ if(tr->partitionData[i].optimizeBaseFrequencies == TRUE)
+ fprintf(newFile, "MULTIX, ");
+ else
+ fprintf(newFile, "MULTI, ");
+ }
+ break;
+ case GENERIC_64:
+ if(tr->partitionData[i].ascBias)
+ {
+ if(tr->partitionData[i].optimizeBaseFrequencies == TRUE)
+ fprintf(newFile, "ASC_CODONX, ");
+ else
+ fprintf(newFile, "ASC_CODON, ");
+ }
+ else
+ {
+ if(tr->partitionData[i].optimizeBaseFrequencies == TRUE)
+ fprintf(newFile, "CODONX, ");
+ else
+ fprintf(newFile, "CODON, ");
+ }
+ break;
+ default:
+ assert(0);
+ }
+ fprintf(newFile, "%s = ", tr->partitionData[i].partitionName);
+
+ int
+ k = 0;
+
+ while(k < tr->cdta->endsite)
+ {
+ if(tr->model[k] == i)
+ {
+ lower = l;
+
+ do
+ {
+ l += tr->cdta->aliaswgt[k];
+ }
+ while((++k < tr->cdta->endsite) && (tr->model[k] == i) );
+
+ upper = l-1;
+
+ if(lower == upper)
+ fprintf(newFile, "%d", lower);
+ else
+ {
+ assert(lower < upper);
+ fprintf(newFile, "%d-%d", lower, upper);
+ }
+ partitions++;
+ }
+ else
+ k++;
+ }
+ //printf("k: %d, cdta: %d\n", k, tr->cdta->endsite);
+ assert(k == tr->cdta->endsite);
+ fprintf(newFile, "\n");
+ }
+
+ assert(partitions == tr->NumberOfModels);
+ //printf("l:%d, rdta: %d\n", l, tr->rdta->sites);
+ assert(l == tr->rdta->sites + 1);
+ //assert(parts == tr->NumberOfModels);
+ fclose(newFile);
+ }
+ else
+ {
+ if(adef->useMultipleModel)
+ {
+ printBothOpen("\nA partitioned model file with model assignments for bootstrap alignments\n");
+ printBothOpen("has already been printed to file %s\n",newPartitionFile);
+ }
+ }
+}
static void generateBS(tree *tr, analdef *adef)
{
@@ -3060,11 +3234,28 @@ static void generateBS(tree *tr, analdef *adef)
k,
w;
- char outName[1024], buf[16];
+ char outName[1024], partName[1024], buf[16];
FILE *of;
assert(adef->boot != 0);
+ {
+ int
+ i,
+ w = 0;
+
+ for(i = 0; i < tr->cdta->endsite; i++)
+ w += tr->cdta->aliaswgt[i];
+
+ if(w < tr->rdta->sites)
+ {
+ printBothOpen("Error in BS replicate generation. Apparently your input alignment contains %d completely undetermined sites.\n", tr->rdta->sites - w);
+ printBothOpen("RAxML cowardly refuses to generate BS replicate MSAs on original MSAs containing entirely undetermined sites.\n\n");
+ errorExit(-1);
+ }
+ }
+
+
for(i = 0; i < adef->multipleRuns; i++)
{
int
@@ -3078,6 +3269,17 @@ static void generateBS(tree *tr, analdef *adef)
assert(count == tr->fullSites);
+ /* generate model file name */
+ strcpy(partName, workdir);
+ strcat(partName, modelFileName);
+ strcat(partName, ".BS");
+ sprintf(buf, "%d", i);
+ strcat(partName, buf);
+
+ printPartitionFile(tr, adef, partName);
+ /*******/
+
+
strcpy(outName, workdir);
strcat(outName, seq_file);
strcat(outName, ".BS");
@@ -3085,6 +3287,7 @@ static void generateBS(tree *tr, analdef *adef)
strcat(outName, buf);
printf("Printing replicate %d to %s\n", i, outName);
+
of = myfopen(outName, "wb");
fprintf(of, "%d %d\n", tr->mxtips, count);
@@ -3499,6 +3702,8 @@ static void initAdef(analdef *adef)
adef->noSequenceCheck = FALSE;
adef->useBFGS = TRUE;
adef->setThreadAffinity = FALSE;
+ adef->bootstopPermutations = 100;
+ adef->fcThreshold = 99;
}
static int modelExists(char *model, analdef *adef)
@@ -4776,6 +4981,7 @@ static void printREADME(void)
#if (defined(_WAYNE_MPI) && defined(_USE_PTHREADS))
printf(" [--set-thread-affinity]\n");
#endif
+ printf(" [--bootstop-perms=number]\n");
printf("\n");
printf(" -a Specify a column weight file name to assign individual weights to each column of \n");
printf(" the alignment. Those weights must be integers separated by any type and number \n");
@@ -5219,6 +5425,11 @@ static void printREADME(void)
printf(" DEFAULT: Off\n");
printf("\n");
#endif
+ printf("\n");
+ printf(" --bootstop-perms=number specify the number of permutations to be conducted for the bootstopping/bootstrap convergence test.\n");
+ printf(" The allowed minimum number is 100!\n");
+ printf("\n");
+ printf(" DEFAULT: 100\n");
printf("\n\n\n\n");
}
@@ -5368,7 +5579,7 @@ static void get_args(int argc, char *argv[], analdef *adef, tree *tr)
while(1)
{
static struct
- option long_options[15] =
+ option long_options[16] =
{
{"mesquite", no_argument, &flag, 1},
{"silent", no_argument, &flag, 1},
@@ -5384,6 +5595,7 @@ static void get_args(int argc, char *argv[], analdef *adef, tree *tr)
{"K80", no_argument, &flag, 1},
{"HKY85", no_argument, &flag, 1},
{"set-thread-affinity", no_argument, &flag, 1},
+ {"bootstop-perms", required_argument, &flag, 1},
{0, 0, 0, 0}
};
@@ -5573,6 +5785,21 @@ static void get_args(int argc, char *argv[], analdef *adef, tree *tr)
printf("Warning: flag --set-thread-affinity has no effect if you don't use the hybrid MPI-PThreads version\n");
#endif
break;
+ case 14:
+ {
+ int
+ perms = -1;
+
+ if(sscanf(optarg,"%d", &perms) != 1 || (perms < 100))
+ {
+ printf("\nError parsing number of bootstop permutations to execute, RAxML expects a positive integer value larger or equal to 100\n\n");
+ errorExit(-1);
+ }
+
+ adef->bootstopPermutations = perms;
+ adef->fcThreshold = perms - round((double)perms / 100.0);
+ }
+ break;
default:
if(flagCheck)
{
@@ -9779,10 +10006,13 @@ static void execFunction(tree *tr, tree *localTree, int tid, int n)
{
for(model = 0; model < localTree->NumberOfModels; model++)
{
- memcpy(localTree->partitionData[model].EIGN_LG4[0], tr->partitionData[model].EIGN_LG4[0], sizeof(double) * 19);
- memcpy(localTree->partitionData[model].EIGN_LG4[1], tr->partitionData[model].EIGN_LG4[1], sizeof(double) * 19);
- memcpy(localTree->partitionData[model].EIGN_LG4[2], tr->partitionData[model].EIGN_LG4[2], sizeof(double) * 19);
- memcpy(localTree->partitionData[model].EIGN_LG4[3], tr->partitionData[model].EIGN_LG4[3], sizeof(double) * 19);
+ if(tr->partitionData[model].protModels == LG4 || tr->partitionData[model].protModels == LG4X)
+ {
+ memcpy(localTree->partitionData[model].EIGN_LG4[0], tr->partitionData[model].EIGN_LG4[0], sizeof(double) * 19);
+ memcpy(localTree->partitionData[model].EIGN_LG4[1], tr->partitionData[model].EIGN_LG4[1], sizeof(double) * 19);
+ memcpy(localTree->partitionData[model].EIGN_LG4[2], tr->partitionData[model].EIGN_LG4[2], sizeof(double) * 19);
+ memcpy(localTree->partitionData[model].EIGN_LG4[3], tr->partitionData[model].EIGN_LG4[3], sizeof(double) * 19);
+ }
}
}
break;
diff --git a/axml.h b/axml.h
index c3eca24..ee7933a 100644
--- a/axml.h
+++ b/axml.h
@@ -168,9 +168,9 @@
#define PointGamma(prob,alpha,beta) PointChi2(prob,2.0*(alpha))/(2.0*(beta))
#define programName "RAxML"
-#define programVersion "8.2.4"
-#define programVersionInt 8240
-#define programDate "October 02 2015"
+#define programVersion "8.2.7"
+#define programVersionInt 8270
+#define programDate "March 10 2016"
#define TREE_EVALUATION 0
@@ -268,10 +268,10 @@
/* bootstopping stuff */
-#define BOOTSTOP_PERMUTATIONS 100
+//#define BOOTSTOP_PERMUTATIONS 100
#define START_BSTOP_TEST 10
-#define FC_THRESHOLD 99
+//#define FC_THRESHOLD 99
#define FC_SPACING 50
#define FC_LOWER 0.99
#define FC_INIT 20
@@ -1173,6 +1173,8 @@ typedef struct {
boolean noSequenceCheck;
boolean useBFGS;
boolean setThreadAffinity;
+ int bootstopPermutations;
+ int fcThreshold;
} analdef;
diff --git a/bipartitionList.c b/bipartitionList.c
index 05dc1c0..f17930f 100644
--- a/bipartitionList.c
+++ b/bipartitionList.c
@@ -3685,7 +3685,7 @@ void computeBootStopOnly(tree *tr, char *bootStrapFileName, analdef *adef)
checkTreeNumber(tr->numberOfTrees, bootStrapFileName);
- assert((FC_SPACING % 2 == 0) && (FC_THRESHOLD < BOOTSTOP_PERMUTATIONS));
+ assert((FC_SPACING % 2 == 0) && (adef->fcThreshold < adef->bootstopPermutations));
numberOfTrees = tr->numberOfTrees;
@@ -3738,10 +3738,10 @@ void computeBootStopOnly(tree *tr, char *bootStrapFileName, analdef *adef)
switch(tr->bootStopCriterion)
{
case FREQUENCY_STOP:
- avg = frequencyCriterion(i, h, &countBetter, BOOTSTOP_PERMUTATIONS, adef);
+ avg = frequencyCriterion(i, h, &countBetter, adef->bootstopPermutations, adef);
printBothOpen("%d \t\t\t %f \t\t\t\t %d\n", i, avg, countBetter);
- stop = (countBetter >= FC_THRESHOLD && avg >= FC_LOWER);
+ stop = (countBetter >= adef->fcThreshold && avg >= FC_LOWER);
break;
case MR_STOP:
case MRE_STOP:
@@ -3750,10 +3750,10 @@ void computeBootStopOnly(tree *tr, char *bootStrapFileName, analdef *adef)
double
wrf_thresh_avg = 0.0,
wrf_avg = 0.0;
- avg = wcCriterion(i, h, &countBetter, &wrf_thresh_avg, &wrf_avg, tr, vectorLength, BOOTSTOP_PERMUTATIONS, adef);
+ avg = wcCriterion(i, h, &countBetter, &wrf_thresh_avg, &wrf_avg, tr, vectorLength, adef->bootstopPermutations, adef);
printBothOpen("%d \t\t %1.2f \t\t\t %d\n", i, avg, countBetter);
- stop = (countBetter >= FC_THRESHOLD && wrf_avg <= wrf_thresh_avg);
+ stop = (countBetter >= adef->fcThreshold && wrf_avg <= wrf_thresh_avg);
}
break;
default:
@@ -3825,10 +3825,10 @@ boolean computeBootStopMPI(tree *tr, char *bootStrapFileName, analdef *adef, dou
assert(sizeof(unsigned char) == 1);
- if(BOOTSTOP_PERMUTATIONS % processes == 0)
- bootStopPermutations = BOOTSTOP_PERMUTATIONS / processes;
+ if(adef->bootstopPermutations % processes == 0)
+ bootStopPermutations = adef->bootstopPermutations / processes;
else
- bootStopPermutations = 1 + (BOOTSTOP_PERMUTATIONS / processes);
+ bootStopPermutations = 1 + (adef->bootstopPermutations / processes);
/*printf("Perms %d\n", bootStopPermutations);*/
@@ -3869,7 +3869,7 @@ boolean computeBootStopMPI(tree *tr, char *bootStrapFileName, analdef *adef, dou
/*printf("%d %f %f\n", processID, allIn[0], allIn[1]);*/
- stop = (((int)allIn[0]) >= FC_THRESHOLD && (allIn[1] / ((double)processes)) >= FC_LOWER);
+ stop = (((int)allIn[0]) >= adef->fcThreshold && (allIn[1] / ((double)processes)) >= FC_LOWER);
*pearsonAverage = (allIn[1] / ((double)processes));
}
@@ -3899,7 +3899,7 @@ boolean computeBootStopMPI(tree *tr, char *bootStrapFileName, analdef *adef, dou
/*printf("%d %f %f %f\n", processID, allIn[0], allIn[1], allIn[2]);*/
- stop = (((int)allIn[0]) >= FC_THRESHOLD && (allIn[2] / ((double)processes)) <= (allIn[1] / ((double)processes)));
+ stop = (((int)allIn[0]) >= adef->fcThreshold && (allIn[2] / ((double)processes)) <= (allIn[1] / ((double)processes)));
*pearsonAverage = (allIn[3] / ((double)processes));
}
@@ -3926,7 +3926,7 @@ boolean bootStop(tree *tr, hashtable *h, int numberOfTrees, double *pearsonAvera
n = numberOfTrees + 1,
bCount = 0;
- assert((FC_SPACING % 2 == 0) && (FC_THRESHOLD < BOOTSTOP_PERMUTATIONS));
+ assert((FC_SPACING % 2 == 0) && (adef->fcThreshold < adef->bootstopPermutations));
assert(tr->mxtips == tr->rdta->numsp);
bitVectorInitravSpecial(bitVectors, tr->nodep[1]->back, tr->mxtips, vectorLength, h, numberOfTrees, BIPARTITIONS_BOOTSTOP, (branchInfo *)NULL,
@@ -3940,9 +3940,9 @@ boolean bootStop(tree *tr, hashtable *h, int numberOfTrees, double *pearsonAvera
switch(tr->bootStopCriterion)
{
case FREQUENCY_STOP:
- *pearsonAverage = frequencyCriterion(n, h, &countBetter, BOOTSTOP_PERMUTATIONS, adef);
+ *pearsonAverage = frequencyCriterion(n, h, &countBetter, adef->bootstopPermutations, adef);
- if(countBetter >= FC_THRESHOLD && *pearsonAverage >= FC_LOWER)
+ if(countBetter >= adef->fcThreshold && *pearsonAverage >= FC_LOWER)
return TRUE;
else
return FALSE;
@@ -3955,9 +3955,9 @@ boolean bootStop(tree *tr, hashtable *h, int numberOfTrees, double *pearsonAvera
wrf_thresh_avg = 0.0,
wrf_avg = 0.0;
- *pearsonAverage = wcCriterion(n, h, &countBetter, &wrf_thresh_avg, &wrf_avg, tr, vectorLength, BOOTSTOP_PERMUTATIONS, adef);
+ *pearsonAverage = wcCriterion(n, h, &countBetter, &wrf_thresh_avg, &wrf_avg, tr, vectorLength, adef->bootstopPermutations, adef);
- if(countBetter >= FC_THRESHOLD && wrf_avg <= wrf_thresh_avg)
+ if(countBetter >= adef->fcThreshold && wrf_avg <= wrf_thresh_avg)
return TRUE;
else
return FALSE;
diff --git a/manual/NewManual.odt b/manual/NewManual.odt
index 9147d01..ac948ca 100644
Binary files a/manual/NewManual.odt and b/manual/NewManual.odt differ
diff --git a/manual/NewManual.pdf b/manual/NewManual.pdf
index 91d74da..5212877 100644
Binary files a/manual/NewManual.pdf and b/manual/NewManual.pdf differ
diff --git a/multiple.c b/multiple.c
index 1eba14a..8c1c2d9 100644
--- a/multiple.c
+++ b/multiple.c
@@ -827,19 +827,19 @@ void doAllInOne(tree *tr, analdef *adef)
{
case FREQUENCY_STOP:
printBothOpenMPI("Stopped Rapid BS search after %d replicates with FC Bootstopping criterion\n", bootstrapsPerformed);
- printBothOpenMPI("Pearson Average of %d random splits: %f\n",BOOTSTOP_PERMUTATIONS , pearsonAverage);
+ printBothOpenMPI("Pearson Average of %d random splits: %f\n",adef->bootstopPermutations , pearsonAverage);
break;
case MR_STOP:
printBothOpenMPI("Stopped Rapid BS search after %d replicates with MR-based Bootstopping criterion\n", bootstrapsPerformed);
- printBothOpenMPI("WRF Average of %d random splits: %f\n", BOOTSTOP_PERMUTATIONS, pearsonAverage);
+ printBothOpenMPI("WRF Average of %d random splits: %f\n", adef->bootstopPermutations, pearsonAverage);
break;
case MRE_STOP:
printBothOpenMPI("Stopped Rapid BS search after %d replicates with MRE-based Bootstopping criterion\n", bootstrapsPerformed);
- printBothOpenMPI("WRF Average of %d random splits: %f\n", BOOTSTOP_PERMUTATIONS, pearsonAverage);
+ printBothOpenMPI("WRF Average of %d random splits: %f\n", adef->bootstopPermutations, pearsonAverage);
break;
case MRE_IGN_STOP:
printBothOpenMPI("Stopped Rapid BS search after %d replicates with MRE_IGN-based Bootstopping criterion\n", bootstrapsPerformed);
- printBothOpenMPI("WRF Average of %d random splits: %f\n", BOOTSTOP_PERMUTATIONS, pearsonAverage);
+ printBothOpenMPI("WRF Average of %d random splits: %f\n", adef->bootstopPermutations, pearsonAverage);
break;
default:
assert(0);
@@ -851,19 +851,19 @@ void doAllInOne(tree *tr, analdef *adef)
{
case FREQUENCY_STOP:
printBothOpenMPI("Rapid BS search did not converge after %d replicates with FC Bootstopping criterion\n", bootstrapsPerformed);
- printBothOpenMPI("Pearson Average of %d random splits: %f\n",BOOTSTOP_PERMUTATIONS , pearsonAverage);
+ printBothOpenMPI("Pearson Average of %d random splits: %f\n",adef->bootstopPermutations , pearsonAverage);
break;
case MR_STOP:
printBothOpenMPI("Rapid BS search did not converge after %d replicates with MR-based Bootstopping criterion\n", bootstrapsPerformed);
- printBothOpenMPI("WRF Average of %d random splits: %f\n", BOOTSTOP_PERMUTATIONS, pearsonAverage);
+ printBothOpenMPI("WRF Average of %d random splits: %f\n", adef->bootstopPermutations, pearsonAverage);
break;
case MRE_STOP:
printBothOpenMPI("Rapid BS search did not converge after %d replicates with MRE-based Bootstopping criterion\n", bootstrapsPerformed);
- printBothOpenMPI("WRF Average of %d random splits: %f\n", BOOTSTOP_PERMUTATIONS, pearsonAverage);
+ printBothOpenMPI("WRF Average of %d random splits: %f\n", adef->bootstopPermutations, pearsonAverage);
break;
case MRE_IGN_STOP:
printBothOpenMPI("Rapid BS search did not converge after %d replicates with MR_IGN-based Bootstopping criterion\n", bootstrapsPerformed);
- printBothOpenMPI("WRF Average of %d random splits: %f\n", BOOTSTOP_PERMUTATIONS, pearsonAverage);
+ printBothOpenMPI("WRF Average of %d random splits: %f\n", adef->bootstopPermutations, pearsonAverage);
break;
default:
assert(0);
@@ -1344,19 +1344,19 @@ void doBootstrap(tree *tr, analdef *adef, rawdata *rdta, cruncheddata *cdta)
{
case FREQUENCY_STOP:
printBothOpenMPI("Stopped Standard BS search after %d replicates with FC Bootstopping criterion\n", bootstrapsPerformed);
- printBothOpenMPI("Pearson Average of %d random splits: %f\n",BOOTSTOP_PERMUTATIONS , pearsonAverage);
+ printBothOpenMPI("Pearson Average of %d random splits: %f\n",adef->bootstopPermutations , pearsonAverage);
break;
case MR_STOP:
printBothOpenMPI("Stopped Standard BS search after %d replicates with MR-based Bootstopping criterion\n", bootstrapsPerformed);
- printBothOpenMPI("WRF Average of %d random splits: %f\n", BOOTSTOP_PERMUTATIONS, pearsonAverage);
+ printBothOpenMPI("WRF Average of %d random splits: %f\n", adef->bootstopPermutations, pearsonAverage);
break;
case MRE_STOP:
printBothOpenMPI("Stopped Standard BS search after %d replicates with MRE-based Bootstopping criterion\n", bootstrapsPerformed);
- printBothOpenMPI("WRF Average of %d random splits: %f\n", BOOTSTOP_PERMUTATIONS, pearsonAverage);
+ printBothOpenMPI("WRF Average of %d random splits: %f\n", adef->bootstopPermutations, pearsonAverage);
break;
case MRE_IGN_STOP:
printBothOpenMPI("Stopped Standard BS search after %d replicates with MRE_IGN-based Bootstopping criterion\n", bootstrapsPerformed);
- printBothOpenMPI("WRF Average of %d random splits: %f\n", BOOTSTOP_PERMUTATIONS, pearsonAverage);
+ printBothOpenMPI("WRF Average of %d random splits: %f\n", adef->bootstopPermutations, pearsonAverage);
break;
default:
assert(0);
@@ -1368,19 +1368,19 @@ void doBootstrap(tree *tr, analdef *adef, rawdata *rdta, cruncheddata *cdta)
{
case FREQUENCY_STOP:
printBothOpenMPI("Standard BS search did not converge after %d replicates with FC Bootstopping criterion\n", bootstrapsPerformed);
- printBothOpenMPI("Pearson Average of %d random splits: %f\n",BOOTSTOP_PERMUTATIONS , pearsonAverage);
+ printBothOpenMPI("Pearson Average of %d random splits: %f\n",adef->bootstopPermutations , pearsonAverage);
break;
case MR_STOP:
printBothOpenMPI("Standard BS search did not converge after %d replicates with MR-based Bootstopping criterion\n", bootstrapsPerformed);
- printBothOpenMPI("WRF Average of %d random splits: %f\n", BOOTSTOP_PERMUTATIONS, pearsonAverage);
+ printBothOpenMPI("WRF Average of %d random splits: %f\n", adef->bootstopPermutations, pearsonAverage);
break;
case MRE_STOP:
printBothOpenMPI("Standard BS search did not converge after %d replicates with MRE-based Bootstopping criterion\n", bootstrapsPerformed);
- printBothOpenMPI("WRF Average of %d random splits: %f\n", BOOTSTOP_PERMUTATIONS, pearsonAverage);
+ printBothOpenMPI("WRF Average of %d random splits: %f\n", adef->bootstopPermutations, pearsonAverage);
break;
case MRE_IGN_STOP:
printBothOpenMPI("Standard BS search did not converge after %d replicates with MR_IGN-based Bootstopping criterion\n", bootstrapsPerformed);
- printBothOpenMPI("WRF Average of %d random splits: %f\n", BOOTSTOP_PERMUTATIONS, pearsonAverage);
+ printBothOpenMPI("WRF Average of %d random splits: %f\n", adef->bootstopPermutations, pearsonAverage);
break;
default:
assert(0);
diff --git a/optimizeModel.c b/optimizeModel.c
index 9976fd4..05fcac6 100644
--- a/optimizeModel.c
+++ b/optimizeModel.c
@@ -432,7 +432,7 @@ static void optimizeWeights(tree *tr, double modelEpsilon, linkageList *ll, int
initialLH = 0.0,
finalLH = 0.0;
- evaluateGeneric(tr, tr->start);
+ evaluateGenericInitrav(tr, tr->start);
initialLH = tr->likelihood;
//printf("W: %f %f [%f] ->", tr->perPartitionLH[0], tr->perPartitionLH[1], initialLH);
diff --git a/treeIO.c b/treeIO.c
index 6c96773..f323d8b 100644
--- a/treeIO.c
+++ b/treeIO.c
@@ -755,7 +755,7 @@ static boolean treeLabelEnd (int ch)
return FALSE;
}
-static void treeEchoContext (FILE *fp1, FILE *fp2, int n);
+static int treeEchoContext (FILE *fp1, FILE *fp2, int n);
static boolean treeGetLabel (FILE *fp, char *lblPtr, int maxlen, boolean taxonLabel)
{
@@ -861,10 +861,11 @@ int treeFindTipName(FILE *fp, tree *tr, boolean check)
-static void treeEchoContext (FILE *fp1, FILE *fp2, int n)
+static int treeEchoContext (FILE *fp1, FILE *fp2, int n)
{ /* treeEchoContext */
- int
+ int
+ offset = 0,
ch;
int64_t
@@ -878,8 +879,10 @@ static void treeEchoContext (FILE *fp1, FILE *fp2, int n)
fgetpos(fp1, &pos);
- fseek(fp1, MAX(current - n / 2, 0), SEEK_SET);
+ fseek(fp1, MAX(current - (int64_t)n / 2, 0), SEEK_SET);
+ if((current - (int64_t)n / 2) < 0)
+ offset = (int)(current - (int64_t)n / 2);
while (n > 0 && ((ch = getc(fp1)) != EOF))
{
@@ -902,6 +905,8 @@ static void treeEchoContext (FILE *fp1, FILE *fp2, int n)
fsetpos(fp1, &pos);
+ return offset;
+
/*boolean
waswhite = TRUE;
@@ -1538,6 +1543,12 @@ static boolean addElementLenMULT (FILE *fp, tree *tr, nodeptr p, int partitionC
int n, ch, fres;
double randomResolution;
int old;
+
+ fpos_t start_pos;
+
+ fgetpos(fp, &start_pos);
+
+
tr->constraintVector[p->number] = partitionCounter;
@@ -1563,7 +1574,42 @@ static boolean addElementLenMULT (FILE *fp, tree *tr, nodeptr p, int partitionC
q = tr->nodep[n];
tr->constraintVector[q->number] = *partCount;
if (! addElementLenMULT(fp, tr, q->next, old, adef, partCount)) return FALSE;
- if (! treeNeedCh(fp, ',', "in")) return FALSE;
+
+ if (! treeNeedCh(fp, ',', "in"))
+ {
+ int
+ c2 = treeGetCh(fp);
+
+ if(c2 == ')')
+ {
+ int
+ offset;
+
+ printf("Could it be that you are using excess parenthesis starting here:\n\n");
+ fsetpos(fp, &start_pos);
+ offset = treeEchoContext(fp, stdout, 40);
+ printf("\n");
+ if(offset == 0)
+ printf(" ^\n\n");
+ else
+ {
+ int
+ spaces = 20 + offset,
+ k;
+
+ assert(offset < 0);
+
+ for(k = 0; k < spaces; k++)
+ printf(" ");
+ printf("^\n\n");
+ }
+ }
+
+ ungetc(c2, fp);
+
+ errorExit(-1);
+ }
+
if (! addElementLenMULT(fp, tr, q->next->next, old, adef, partCount)) return FALSE;
hookupDefault(p, q, tr->numBranches);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/raxml.git
More information about the debian-med-commit
mailing list