Permalink
Browse files

Adds tax space to list/get/remove.seqs

  • Loading branch information...
1 parent 3caf426 commit 0755b8563f1b15df1bc5064fc961fc932550a776 @mothur-westcott mothur-westcott committed Aug 24, 2016
@@ -1031,8 +1031,8 @@ int GetSeqsCommand::readTax(){
if (m->control_pressed) { in.close(); out.close(); m->mothurRemove(outputFileName); return 0; }
- in >> name; //read from first column
- in >> tax; //read from second column
+ in >> name; m->gobble(in);
+ tax = m->getline(in); m->gobble(in);
if (!dups) {//adjust name if needed
map<string, string>::iterator it = uniqueMap.find(name);
@@ -1053,8 +1053,6 @@ int GetSeqsCommand::readTax(){
m->mothurOut("[WARNING]: " + name + " is in your taxonomy file more than once. Mothur requires sequence names to be unique. I will only add it once.\n");
}
}
-
- m->gobble(in);
}
in.close();
out.close();
@@ -540,13 +540,10 @@ int ListSeqsCommand::readTax(){
if (m->control_pressed) { in.close(); return 0; }
- in >> firstCol;
- in >> secondCol;
+ in >> firstCol; m->gobble(in);
+ secondCol = m->getline(in); m->gobble(in);
names.push_back(firstCol);
-
- m->gobble(in);
-
}
in.close();
@@ -959,9 +959,9 @@ int RemoveSeqsCommand::readTax(){
while(!in.eof()){
if (m->control_pressed) { in.close(); out.close(); m->mothurRemove(outputFileName); return 0; }
- in >> name; m->gobble(in); //read from first column
- in >> tax; //read from second column
-
+ in >> name; m->gobble(in);
+ tax = m->getline(in); m->gobble(in);
+
if (!dups) {//adjust name if needed
map<string, string>::iterator it = uniqueMap.find(name);
if (it != uniqueMap.end()) { name = it->second; }
@@ -978,8 +978,6 @@ int RemoveSeqsCommand::readTax(){
m->mothurOut("[WARNING]: " + name + " is in your taxonomy file more than once. Mothur requires sequence names to be unique. I will only add it once.\n");
}
}else { removedCount++; }
-
- m->gobble(in);
}
in.close();
out.close();

0 comments on commit 0755b85

Please sign in to comment.