/***********************************************************************/
/***********************************************************************/
/***********************************************************************/
/***********************************************************************/
//Child Classes Below
/***********************************************************************/
/***********************************************************************/
//This class reads a file in Newick form and stores it in a tree.
//Child Classes Below
/***********************************************************************/
/***********************************************************************/
//This class reads a file in Newick form and stores it in a tree.
int comment = 0;
//if you are not a nexus file
if ((c = filehandle.peek()) != '#') {
while((c = filehandle.peek()) != EOF) {
int comment = 0;
//if you are not a nexus file
if ((c = filehandle.peek()) != '#') {
while((c = filehandle.peek()) != EOF) {
n = numLeaves; //number of leaves / sequences, we want node 1 to start where the leaves left off
lc = readNewickInt(filehandle, n, T);
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()==','){
readSpecialChar(filehandle,',',"comma");
if(filehandle.peek()==','){
readSpecialChar(filehandle,',',"comma");
if(filehandle.peek() == ')'){
readSpecialChar(filehandle,')',"right parenthesis");
}
if(filehandle.peek() == ')'){
readSpecialChar(filehandle,')',"right parenthesis");
}
readSpecialChar(f,',',"comma");
readSpecialChar(f,',',"comma");
- int rc = readNewickInt(f, n, T);
+ int rc = readNewickInt(f, n, T);
+ if (rc == -1) { return -1; } //reports an error in reading
- readSpecialChar(f,':',"colon");
- if(n >= numNodes){ cerr << "Error: Too many nodes in input tree\n"; exit(1); }
+ readSpecialChar(f,':',"colon");
+
+ if(n >= numNodes){ cerr << "Error: Too many nodes in input tree\n"; readOk = -1; return -1; }
+
globaldata->gTreemap->namesOfSeqs.push_back(name);
globaldata->gTreemap->treemap[name].groupname = "xxx";
globaldata->gTreemap->namesOfSeqs.push_back(name);
globaldata->gTreemap->treemap[name].groupname = "xxx";
map<string, int>::iterator it;
it = globaldata->gTreemap->seqsPerGroup.find("xxx");
map<string, int>::iterator it;
it = globaldata->gTreemap->seqsPerGroup.find("xxx");