GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
- GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_OPTIMIZATION_LEVEL = 3;
GCC_PREPROCESSOR_DEFINITIONS = (
"_GLIBCXX_DEBUG=1",
"_GLIBCXX_DEBUG_PEDANTIC=1",
buildSettings = {
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 3;
INSTALL_PATH = /usr/local/bin;
PRODUCT_NAME = mothur;
};
/***********************************************************************/
int ReadTree::readSpecialChar(istream& f, char c, string name) {
try {
- char d;
- while(isspace(d=f.get())) {;}
+ gobble(f);
+ char d = f.get();
+
if(d == EOF){
cerr << "Error: Input file ends prematurely, expecting a " << name << "\n";
exit(1);
exit(1);
}
if(d == ')' && f.peek() == '\n'){
- while(isspace(d=f.get())) {;}
- f.putback(d);
+ gobble(f);
}
-
return d;
}
catch(exception& e) {
int ReadTree::readNodeChar(istream& f) {
try {
- char d;
- while(isspace(d=f.get())) {;}
+// while(isspace(d=f.get())) {;}
+ gobble(f);
+ char d = f.get();
+
if(d == EOF){
cerr << "Error: Input file ends prematurely, expecting a left parenthesis\n";
exit(1);
cerr << "Error: Missing branch length in input tree.\n";
exit(1);
}
-
+ gobble(f);
return b;
}
catch(exception& e) {
readTreeString();
//save trees for later commands
globaldata->gTree.push_back(T);
+ gobble(filehandle);
}
//if you are a nexus file
}else if ((c = filehandle.peek()) == '#') {
if(ch == '('){
n = numLeaves; //number of leaves / sequences, we want node 1 to start where the leaves left off
+
lc = readNewickInt(filehandle, n, T);
if(filehandle.peek()==','){
filehandle.get(name, MAX_LINE,'\n');
SKIPLINE(filehandle, ch);
-
n = T->getIndex(name);
+
if(n!=0){
cerr << "Internal error: The only taxon is not taxon 0.\n";
exit(1);
}
while((ch=filehandle.get())!=';'){;}
- if(rooted != 1){
+ if(rooted != 1){
T->tree[n].setChildren(lc,rc);
T->tree[n].setBranchLength(0);
T->tree[n].setParent(-1);
if(c == '('){
int lc = readNewickInt(f, n, T);
readSpecialChar(f,',',"comma");
-
+
int rc = readNewickInt(f, n, T);
if(f.peek()==')'){
readSpecialChar(f,')',"right parenthesis");
//copy T[i]'s info.
randT->getCopy(T[i]);
- //get pscores for random trees
+ //get scores for random trees
for (int j = 0; j < iters; j++) {
//create a random tree with same topology as T[i], but different labels
randT->assembleRandomUnifracTree();
float ucumul = 0.0000;
float rcumul = 0.0000;
//this loop fills the cumulative maps and put 0.0000 in the score freq map to make it easier to print.
- for (it = validScores[b].begin(); it != validScores[b].end(); it++) {
+ for (it = validScores[b].end(); it == validScores[b].begin(); it--) {
it2 = uscoreFreq[b].find(it->first);
//user data has that score
if (it2 != uscoreFreq[b].end()) { uscoreFreq[b][it->first] /= T.size(); ucumul+= it2->second; }