2 * getlineagecommand.cpp
5 * Created by westcott on 9/24/10.
6 * Copyright 2010 Schloss Lab. All rights reserved.
10 #include "getlineagecommand.h"
11 #include "sequence.hpp"
12 #include "listvector.hpp"
14 //**********************************************************************************************************************
15 vector<string> GetLineageCommand::setParameters(){
17 CommandParameter pfasta("fasta", "InputTypes", "", "", "none", "FNGLT", "none",false,false); parameters.push_back(pfasta);
18 CommandParameter pname("name", "InputTypes", "", "", "none", "FNGLT", "none",false,false); parameters.push_back(pname);
19 CommandParameter pgroup("group", "InputTypes", "", "", "none", "FNGLT", "none",false,false); parameters.push_back(pgroup);
20 CommandParameter plist("list", "InputTypes", "", "", "none", "FNGLT", "none",false,false); parameters.push_back(plist);
21 CommandParameter ptaxonomy("taxonomy", "InputTypes", "", "", "none", "FNGLT", "none",false,true); parameters.push_back(ptaxonomy);
22 CommandParameter palignreport("alignreport", "InputTypes", "", "", "none", "FNGLT", "none",false,false); parameters.push_back(palignreport);
23 CommandParameter ptaxon("taxon", "String", "", "", "", "", "",false,true); parameters.push_back(ptaxon);
24 CommandParameter pdups("dups", "Boolean", "", "T", "", "", "",false,false); parameters.push_back(pdups);
25 CommandParameter pinputdir("inputdir", "String", "", "", "", "", "",false,false); parameters.push_back(pinputdir);
26 CommandParameter poutputdir("outputdir", "String", "", "", "", "", "",false,false); parameters.push_back(poutputdir);
28 vector<string> myArray;
29 for (int i = 0; i < parameters.size(); i++) { myArray.push_back(parameters[i].name); }
33 m->errorOut(e, "GetLineageCommand", "setParameters");
37 //**********************************************************************************************************************
38 string GetLineageCommand::getHelpString(){
40 string helpString = "";
41 helpString += "The get.lineage command reads a taxonomy file and any of the following file types: fasta, name, group, list or alignreport file.\n";
42 helpString += "It outputs a file containing only the sequences from the taxonomy file that are from the taxon requested.\n";
43 helpString += "The get.lineage command parameters are taxon, fasta, name, group, list, taxonomy, alignreport and dups. You must provide taxonomy unless you have a valid current taxonomy file.\n";
44 helpString += "The dups parameter allows you to add the entire line from a name file if you add any name from the line. default=false. \n";
45 helpString += "The taxon parameter allows you to select the taxons you would like to get and is required.\n";
46 helpString += "You may enter your taxons with confidence scores, doing so will get only those sequences that belong to the taxonomy and whose cofidence scores is above the scores you give.\n";
47 helpString += "If they belong to the taxonomy and have confidences below those you provide the sequence will not be selected.\n";
48 helpString += "The get.lineage command should be in the following format: get.lineage(taxonomy=yourTaxonomyFile, taxon=yourTaxons).\n";
49 helpString += "Example get.lineage(taxonomy=amazon.silva.taxonomy, taxon=Bacteria;Firmicutes;Bacilli;Lactobacillales;).\n";
50 helpString += "Note: If you are running mothur in script mode you must wrap the taxon in ' characters so mothur will ignore the ; in the taxon.\n";
51 helpString += "Example get.lineage(taxonomy=amazon.silva.taxonomy, taxon='Bacteria;Firmicutes;Bacilli;Lactobacillales;').\n";
52 helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n";
56 m->errorOut(e, "GetLineageCommand", "getHelpString");
61 //**********************************************************************************************************************
62 GetLineageCommand::GetLineageCommand(){
64 abort = true; calledHelp = true;
66 vector<string> tempOutNames;
67 outputTypes["fasta"] = tempOutNames;
68 outputTypes["taxonomy"] = tempOutNames;
69 outputTypes["name"] = tempOutNames;
70 outputTypes["group"] = tempOutNames;
71 outputTypes["alignreport"] = tempOutNames;
72 outputTypes["list"] = tempOutNames;
75 m->errorOut(e, "GetLineageCommand", "GetLineageCommand");
79 //**********************************************************************************************************************
80 GetLineageCommand::GetLineageCommand(string option) {
82 abort = false; calledHelp = false;
84 //allow user to run help
85 if(option == "help") { help(); abort = true; calledHelp = true; }
86 else if(option == "citation") { citation(); abort = true; calledHelp = true;}
89 vector<string> myArray = setParameters();
91 OptionParser parser(option);
92 map<string,string> parameters = parser.getParameters();
94 ValidParameters validParameter;
95 map<string,string>::iterator it;
97 //check to make sure all parameters are valid for command
98 for (it = parameters.begin(); it != parameters.end(); it++) {
99 if (validParameter.isValidParameter(it->first, myArray, it->second) != true) { abort = true; }
102 //initialize outputTypes
103 vector<string> tempOutNames;
104 outputTypes["fasta"] = tempOutNames;
105 outputTypes["taxonomy"] = tempOutNames;
106 outputTypes["name"] = tempOutNames;
107 outputTypes["group"] = tempOutNames;
108 outputTypes["alignreport"] = tempOutNames;
109 outputTypes["list"] = tempOutNames;
111 //if the user changes the output directory command factory will send this info to us in the output parameter
112 outputDir = validParameter.validFile(parameters, "outputdir", false); if (outputDir == "not found"){ outputDir = ""; }
114 //if the user changes the input directory command factory will send this info to us in the output parameter
115 string inputDir = validParameter.validFile(parameters, "inputdir", false);
116 if (inputDir == "not found"){ inputDir = ""; }
119 it = parameters.find("alignreport");
120 //user has given a template file
121 if(it != parameters.end()){
122 path = m->hasPath(it->second);
123 //if the user has not given a path then, add inputdir. else leave path alone.
124 if (path == "") { parameters["alignreport"] = inputDir + it->second; }
127 it = parameters.find("fasta");
128 //user has given a template file
129 if(it != parameters.end()){
130 path = m->hasPath(it->second);
131 //if the user has not given a path then, add inputdir. else leave path alone.
132 if (path == "") { parameters["fasta"] = inputDir + it->second; }
135 it = parameters.find("list");
136 //user has given a template file
137 if(it != parameters.end()){
138 path = m->hasPath(it->second);
139 //if the user has not given a path then, add inputdir. else leave path alone.
140 if (path == "") { parameters["list"] = inputDir + it->second; }
143 it = parameters.find("name");
144 //user has given a template file
145 if(it != parameters.end()){
146 path = m->hasPath(it->second);
147 //if the user has not given a path then, add inputdir. else leave path alone.
148 if (path == "") { parameters["name"] = inputDir + it->second; }
151 it = parameters.find("group");
152 //user has given a template file
153 if(it != parameters.end()){
154 path = m->hasPath(it->second);
155 //if the user has not given a path then, add inputdir. else leave path alone.
156 if (path == "") { parameters["group"] = inputDir + it->second; }
159 it = parameters.find("taxonomy");
160 //user has given a template file
161 if(it != parameters.end()){
162 path = m->hasPath(it->second);
163 //if the user has not given a path then, add inputdir. else leave path alone.
164 if (path == "") { parameters["taxonomy"] = inputDir + it->second; }
169 //check for required parameters
170 fastafile = validParameter.validFile(parameters, "fasta", true);
171 if (fastafile == "not open") { abort = true; }
172 else if (fastafile == "not found") { fastafile = ""; }
174 namefile = validParameter.validFile(parameters, "name", true);
175 if (namefile == "not open") { abort = true; }
176 else if (namefile == "not found") { namefile = ""; }
178 groupfile = validParameter.validFile(parameters, "group", true);
179 if (groupfile == "not open") { abort = true; }
180 else if (groupfile == "not found") { groupfile = ""; }
182 alignfile = validParameter.validFile(parameters, "alignreport", true);
183 if (alignfile == "not open") { abort = true; }
184 else if (alignfile == "not found") { alignfile = ""; }
186 listfile = validParameter.validFile(parameters, "list", true);
187 if (listfile == "not open") { abort = true; }
188 else if (listfile == "not found") { listfile = ""; }
190 taxfile = validParameter.validFile(parameters, "taxonomy", true);
191 if (taxfile == "not open") { abort = true; }
192 else if (taxfile == "not found") {
193 taxfile = m->getTaxonomyFile();
194 if (taxfile != "") { m->mothurOut("Using " + taxfile + " as input file for the taxonomy parameter."); m->mothurOutEndLine(); }
195 else { m->mothurOut("You have no current taxonomy file and the taxonomy parameter is required."); m->mothurOutEndLine(); abort = true; }
198 string usedDups = "true";
199 string temp = validParameter.validFile(parameters, "dups", false);
200 if (temp == "not found") {
201 if (namefile != "") { temp = "true"; }
202 else { temp = "false"; usedDups = ""; }
204 dups = m->isTrue(temp);
206 taxons = validParameter.validFile(parameters, "taxon", false);
207 if (taxons == "not found") { taxons = ""; m->mothurOut("No taxons given, please correct."); m->mothurOutEndLine(); abort = true; }
210 if (taxons[0] == '\'') { taxons = taxons.substr(1); }
211 if (taxons[(taxons.length()-1)] == '\'') { taxons = taxons.substr(0, (taxons.length()-1)); }
213 m->splitAtChar(taxons, listOfTaxons, '-');
215 if ((fastafile == "") && (namefile == "") && (groupfile == "") && (alignfile == "") && (listfile == "") && (taxfile == "")) { m->mothurOut("You must provide one of the following: fasta, name, group, alignreport, taxonomy or listfile."); m->mothurOutEndLine(); abort = true; }
219 catch(exception& e) {
220 m->errorOut(e, "GetLineageCommand", "GetLineageCommand");
224 //**********************************************************************************************************************
226 int GetLineageCommand::execute(){
229 if (abort == true) { if (calledHelp) { return 0; } return 2; }
231 if (m->control_pressed) { return 0; }
233 //read through the correct file and output lines you want to keep
234 if (taxfile != "") { readTax(); } //fills the set of names to get
235 if (namefile != "") { readName(); }
236 if (fastafile != "") { readFasta(); }
237 if (groupfile != "") { readGroup(); }
238 if (alignfile != "") { readAlign(); }
239 if (listfile != "") { readList(); }
242 if (m->control_pressed) { outputTypes.clear(); for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } return 0; }
244 if (outputNames.size() != 0) {
245 m->mothurOutEndLine();
246 m->mothurOut("Output File Names: "); m->mothurOutEndLine();
247 for (int i = 0; i < outputNames.size(); i++) { m->mothurOut(outputNames[i]); m->mothurOutEndLine(); }
248 m->mothurOutEndLine();
250 //set fasta file as new current fastafile
252 itTypes = outputTypes.find("fasta");
253 if (itTypes != outputTypes.end()) {
254 if ((itTypes->second).size() != 0) { current = (itTypes->second)[0]; m->setFastaFile(current); }
257 itTypes = outputTypes.find("name");
258 if (itTypes != outputTypes.end()) {
259 if ((itTypes->second).size() != 0) { current = (itTypes->second)[0]; m->setNameFile(current); }
262 itTypes = outputTypes.find("group");
263 if (itTypes != outputTypes.end()) {
264 if ((itTypes->second).size() != 0) { current = (itTypes->second)[0]; m->setGroupFile(current); }
267 itTypes = outputTypes.find("list");
268 if (itTypes != outputTypes.end()) {
269 if ((itTypes->second).size() != 0) { current = (itTypes->second)[0]; m->setListFile(current); }
272 itTypes = outputTypes.find("taxonomy");
273 if (itTypes != outputTypes.end()) {
274 if ((itTypes->second).size() != 0) { current = (itTypes->second)[0]; m->setTaxonomyFile(current); }
281 catch(exception& e) {
282 m->errorOut(e, "GetLineageCommand", "execute");
287 //**********************************************************************************************************************
288 int GetLineageCommand::readFasta(){
290 string thisOutputDir = outputDir;
291 if (outputDir == "") { thisOutputDir += m->hasPath(fastafile); }
292 string outputFileName = thisOutputDir + m->getRootName(m->getSimpleName(fastafile)) + "pick" + m->getExtension(fastafile);
294 m->openOutputFile(outputFileName, out);
298 m->openInputFile(fastafile, in);
301 bool wroteSomething = false;
305 if (m->control_pressed) { in.close(); out.close(); remove(outputFileName.c_str()); return 0; }
307 Sequence currSeq(in);
308 name = currSeq.getName();
311 //if this name is in the accnos file
312 if (names.count(name) != 0) {
313 wroteSomething = true;
315 currSeq.printSequence(out);
323 if (wroteSomething == false) { m->mothurOut("Your file does not contain any sequence from the .accnos file."); m->mothurOutEndLine(); }
324 outputNames.push_back(outputFileName); outputTypes["fasta"].push_back(outputFileName);
329 catch(exception& e) {
330 m->errorOut(e, "GetLineageCommand", "readFasta");
334 //**********************************************************************************************************************
335 int GetLineageCommand::readList(){
337 string thisOutputDir = outputDir;
338 if (outputDir == "") { thisOutputDir += m->hasPath(listfile); }
339 string outputFileName = thisOutputDir + m->getRootName(m->getSimpleName(listfile)) + "pick" + m->getExtension(listfile);
341 m->openOutputFile(outputFileName, out);
344 m->openInputFile(listfile, in);
346 bool wroteSomething = false;
350 if (m->control_pressed) { in.close(); out.close(); remove(outputFileName.c_str()); return 0; }
352 //read in list vector
355 //make a new list vector
357 newList.setLabel(list.getLabel());
360 for (int i = 0; i < list.getNumBins(); i++) {
362 //parse out names that are in accnos file
363 string binnames = list.get(i);
365 string newNames = "";
366 while (binnames.find_first_of(',') != -1) {
367 string name = binnames.substr(0,binnames.find_first_of(','));
368 binnames = binnames.substr(binnames.find_first_of(',')+1, binnames.length());
370 //if that name is in the .accnos file, add it
371 if (names.count(name) != 0) { newNames += name + ","; }
375 if (names.count(binnames) != 0) { newNames += binnames + ","; }
377 //if there are names in this bin add to new list
378 if (newNames != "") {
379 newNames = newNames.substr(0, newNames.length()-1); //rip off extra comma
380 newList.push_back(newNames);
384 //print new listvector
385 if (newList.getNumBins() != 0) {
386 wroteSomething = true;
395 if (wroteSomething == false) { m->mothurOut("Your file does not contain any sequence from the .accnos file."); m->mothurOutEndLine(); }
396 outputNames.push_back(outputFileName); outputTypes["list"].push_back(outputFileName);
401 catch(exception& e) {
402 m->errorOut(e, "GetLineageCommand", "readList");
406 //**********************************************************************************************************************
407 int GetLineageCommand::readName(){
409 string thisOutputDir = outputDir;
410 if (outputDir == "") { thisOutputDir += m->hasPath(namefile); }
411 string outputFileName = thisOutputDir + m->getRootName(m->getSimpleName(namefile)) + "pick" + m->getExtension(namefile);
413 m->openOutputFile(outputFileName, out);
417 m->openInputFile(namefile, in);
418 string name, firstCol, secondCol;
420 bool wroteSomething = false;
425 if (m->control_pressed) { in.close(); out.close(); remove(outputFileName.c_str()); return 0; }
431 if (dups) { hold = secondCol; }
433 vector<string> parsedNames;
434 m->splitAtComma(secondCol, parsedNames);
436 vector<string> validSecond;
437 for (int i = 0; i < parsedNames.size(); i++) {
438 if (names.count(parsedNames[i]) != 0) {
439 validSecond.push_back(parsedNames[i]);
443 if ((dups) && (validSecond.size() != 0)) { //dups = true and we want to add someone, then add everyone
444 for (int i = 0; i < parsedNames.size(); i++) { names.insert(parsedNames[i]); }
445 out << firstCol << '\t' << hold << endl;
446 wroteSomething = true;
448 //if the name in the first column is in the set then print it and any other names in second column also in set
449 if (names.count(firstCol) != 0) {
451 wroteSomething = true;
453 out << firstCol << '\t';
455 //you know you have at least one valid second since first column is valid
456 for (int i = 0; i < validSecond.size()-1; i++) { out << validSecond[i] << ','; }
457 out << validSecond[validSecond.size()-1] << endl;
460 //make first name in set you come to first column and then add the remaining names to second column
462 //you want part of this row
463 if (validSecond.size() != 0) {
465 wroteSomething = true;
467 out << validSecond[0] << '\t';
469 //you know you have at least one valid second since first column is valid
470 for (int i = 0; i < validSecond.size()-1; i++) { out << validSecond[i] << ','; }
471 out << validSecond[validSecond.size()-1] << endl;
480 if (wroteSomething == false) { m->mothurOut("Your file does not contain any sequence from the .accnos file."); m->mothurOutEndLine(); }
481 outputNames.push_back(outputFileName); outputTypes["name"].push_back(outputFileName);
486 catch(exception& e) {
487 m->errorOut(e, "GetLineageCommand", "readName");
492 //**********************************************************************************************************************
493 int GetLineageCommand::readGroup(){
495 string thisOutputDir = outputDir;
496 if (outputDir == "") { thisOutputDir += m->hasPath(groupfile); }
497 string outputFileName = thisOutputDir + m->getRootName(m->getSimpleName(groupfile)) + "pick" + m->getExtension(groupfile);
499 m->openOutputFile(outputFileName, out);
503 m->openInputFile(groupfile, in);
506 bool wroteSomething = false;
510 if (m->control_pressed) { in.close(); out.close(); remove(outputFileName.c_str()); return 0; }
513 in >> name; //read from first column
514 in >> group; //read from second column
516 //if this name is in the accnos file
517 if (names.count(name) != 0) {
518 wroteSomething = true;
520 out << name << '\t' << group << endl;
528 if (wroteSomething == false) { m->mothurOut("Your file does not contain any sequence from the .accnos file."); m->mothurOutEndLine(); }
529 outputNames.push_back(outputFileName); outputTypes["group"].push_back(outputFileName);
534 catch(exception& e) {
535 m->errorOut(e, "GetLineageCommand", "readGroup");
539 //**********************************************************************************************************************
540 int GetLineageCommand::readTax(){
542 string thisOutputDir = outputDir;
543 if (outputDir == "") { thisOutputDir += m->hasPath(taxfile); }
544 string outputFileName = thisOutputDir + m->getRootName(m->getSimpleName(taxfile)) + "pick" + m->getExtension(taxfile);
546 m->openOutputFile(outputFileName, out);
549 m->openInputFile(taxfile, in);
552 //bool wroteSomething = false;
553 vector<bool> taxonsHasConfidence; taxonsHasConfidence.resize(listOfTaxons.size(), false);
554 vector< vector< map<string, float> > > searchTaxons; searchTaxons.resize(listOfTaxons.size());
555 vector<string> noConfidenceTaxons; noConfidenceTaxons.resize(listOfTaxons.size(), "");
557 for (int i = 0; i < listOfTaxons.size(); i++) {
558 noConfidenceTaxons[i] = listOfTaxons[i];
559 int hasConPos = listOfTaxons[i].find_first_of('(');
560 if (hasConPos != string::npos) {
561 taxonsHasConfidence[i] = true;
562 searchTaxons[i] = getTaxons(listOfTaxons[i]);
563 noConfidenceTaxons[i] = removeConfidences(listOfTaxons[i]);
570 if (m->control_pressed) { in.close(); out.close(); remove(outputFileName.c_str()); return 0; }
572 in >> name; //read from first column
573 in >> tax; //read from second column
575 for (int j = 0; j < listOfTaxons.size(); j++) {
579 //if the users file contains confidence scores we want to ignore them when searching for the taxons, unless the taxon has them
580 if (!taxonsHasConfidence[j]) {
581 int hasConfidences = tax.find_first_of('(');
582 if (hasConfidences != string::npos) {
583 newtax = removeConfidences(tax);
586 int pos = newtax.find(noConfidenceTaxons[j]);
588 if (pos != string::npos) { //this sequence contains the taxon the user wants
590 out << name << '\t' << tax << endl;
591 //since you belong to at least one of the taxons we want you are included so no need to search for other
594 }else{//if listOfTaxons[i] has them and you don't them remove taxons
595 int hasConfidences = tax.find_first_of('(');
596 if (hasConfidences == string::npos) {
598 int pos = newtax.find(noConfidenceTaxons[j]);
600 if (pos != string::npos) { //this sequence contains the taxon the user wants
602 out << name << '\t' << tax << endl;
603 //since you belong to at least one of the taxons we want you are included so no need to search for other
606 }else { //both have confidences so we want to make sure the users confidences are greater then or equal to the taxons
607 //first remove confidences from both and see if the taxonomy exists
609 string noNewTax = tax;
610 int hasConfidences = tax.find_first_of('(');
611 if (hasConfidences != string::npos) {
612 noNewTax = removeConfidences(tax);
615 int pos = noNewTax.find(noConfidenceTaxons[j]);
617 if (pos != string::npos) { //if yes, then are the confidences okay
620 vector< map<string, float> > usersTaxon = getTaxons(newtax);
622 //the usersTaxon is most likely longer than the searchTaxons, and searchTaxon[0] may relate to userTaxon[4]
623 //we want to "line them up", so we will find the the index where the searchstring starts
625 for (int i = 0; i < usersTaxon.size(); i++) {
627 if (usersTaxon[i].begin()->first == searchTaxons[j][0].begin()->first) {
630 bool goodspot = true;
631 //is this really the start, or are we dealing with a taxon of the same name?
632 while ((spot < searchTaxons[j].size()) && ((i+spot) < usersTaxon.size())) {
633 if (usersTaxon[i+spot].begin()->first != searchTaxons[j][spot].begin()->first) { goodspot = false; break; }
637 if (goodspot) { break; }
641 for (int i = 0; i < searchTaxons[j].size(); i++) {
643 if ((i+index) < usersTaxon.size()) { //just in case, should never be false
644 if (usersTaxon[i+index].begin()->second < searchTaxons[j][i].begin()->second) { //is the users cutoff less than the search taxons
654 //passed the test so add you
657 out << name << '\t' << tax << endl;
671 if (names.size() == 0) { m->mothurOut("Your taxonomy file does not contain any sequences from " + taxons + "."); m->mothurOutEndLine(); }
672 outputNames.push_back(outputFileName); outputTypes["taxonomy"].push_back(outputFileName);
677 catch(exception& e) {
678 m->errorOut(e, "GetLineageCommand", "readTax");
682 /**************************************************************************************************/
683 vector< map<string, float> > GetLineageCommand::getTaxons(string tax) {
686 vector< map<string, float> > t;
688 int taxLength = tax.length();
689 for(int i=0;i<taxLength;i++){
692 int openParen = taxon.find_first_of('(');
693 int closeParen = taxon.find_last_of(')');
695 string newtaxon, confidence;
696 if ((openParen != string::npos) && (closeParen != string::npos)) {
697 newtaxon = taxon.substr(0, openParen); //rip off confidence
698 confidence = taxon.substr((openParen+1), (closeParen-openParen-1));
704 convert(confidence, con);
706 map<string, float> temp;
707 temp[newtaxon] = con;
719 catch(exception& e) {
720 m->errorOut(e, "GetLineageCommand", "getTaxons");
724 /**************************************************************************************************/
725 string GetLineageCommand::removeConfidences(string tax) {
729 int taxLength = tax.length();
730 for(int i=0;i<taxLength;i++){
732 taxon = taxon.substr(0, taxon.find_first_of('(')); //rip off confidence
742 catch(exception& e) {
743 m->errorOut(e, "GetLineageCommand", "removeConfidences");
747 //**********************************************************************************************************************
748 //alignreport file has a column header line then all other lines contain 16 columns. we just want the first column since that contains the name
749 int GetLineageCommand::readAlign(){
751 string thisOutputDir = outputDir;
752 if (outputDir == "") { thisOutputDir += m->hasPath(alignfile); }
753 string outputFileName = thisOutputDir + m->getRootName(m->getSimpleName(alignfile)) + "pick.align.report";
755 m->openOutputFile(outputFileName, out);
759 m->openInputFile(alignfile, in);
762 bool wroteSomething = false;
764 //read column headers
765 for (int i = 0; i < 16; i++) {
766 if (!in.eof()) { in >> junk; out << junk << '\t'; }
773 if (m->control_pressed) { in.close(); out.close(); remove(outputFileName.c_str()); return 0; }
776 in >> name; //read from first column
778 //if this name is in the accnos file
779 if (names.count(name) != 0) {
780 wroteSomething = true;
785 for (int i = 0; i < 15; i++) {
786 if (!in.eof()) { in >> junk; out << junk << '\t'; }
791 }else {//still read just don't do anything with it
793 for (int i = 0; i < 15; i++) {
794 if (!in.eof()) { in >> junk; }
804 if (wroteSomething == false) { m->mothurOut("Your file does not contain any sequence from the .accnos file."); m->mothurOutEndLine(); }
805 outputNames.push_back(outputFileName); outputTypes["alignreport"].push_back(outputFileName);
810 catch(exception& e) {
811 m->errorOut(e, "GetLineageCommand", "readAlign");
815 //**********************************************************************************************************************