2 * consensusseqscommand.cpp
5 * Created by westcott on 11/23/10.
6 * Copyright 2010 Schloss Lab. All rights reserved.
10 #include "consensusseqscommand.h"
11 #include "sequence.hpp"
12 #include "inputdata.h"
14 //**********************************************************************************************************************
15 vector<string> ConsensusSeqsCommand::getValidParameters(){
17 string Array[] = {"fasta", "list", "name", "label","outputdir","inputdir"};
18 vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
22 m->errorOut(e, "ConsensusSeqsCommand", "getValidParameters");
26 //**********************************************************************************************************************
27 ConsensusSeqsCommand::ConsensusSeqsCommand(){
30 //initialize outputTypes
31 vector<string> tempOutNames;
32 outputTypes["fasta"] = tempOutNames;
33 outputTypes["name"] = tempOutNames;
34 outputTypes["summary"] = tempOutNames;
37 m->errorOut(e, "ConsensusSeqsCommand", "ConsensusSeqsCommand");
41 //**********************************************************************************************************************
42 vector<string> ConsensusSeqsCommand::getRequiredParameters(){
44 string Array[] = {"fasta", "list"};
45 vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
49 m->errorOut(e, "ConsensusSeqsCommand", "getRequiredParameters");
53 //**********************************************************************************************************************
54 vector<string> ConsensusSeqsCommand::getRequiredFiles(){
56 vector<string> myArray;
60 m->errorOut(e, "DegapSeqsCommand", "getRequiredFiles");
64 //***************************************************************************************************************
65 ConsensusSeqsCommand::ConsensusSeqsCommand(string option) {
70 //allow user to run help
71 if(option == "help") { help(); abort = true; }
74 //valid paramters for this command
75 string Array[] = {"fasta","list","name","label", "outputdir","inputdir"};
76 vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
78 OptionParser parser(option);
79 map<string,string> parameters = parser.getParameters();
81 ValidParameters validParameter;
82 map<string,string>::iterator it;
84 //check to make sure all parameters are valid for command
85 for (it = parameters.begin(); it != parameters.end(); it++) {
86 if (validParameter.isValidParameter(it->first, myArray, it->second) != true) { abort = true; }
89 //initialize outputTypes
90 vector<string> tempOutNames;
91 outputTypes["fasta"] = tempOutNames;
92 outputTypes["name"] = tempOutNames;
93 outputTypes["summary"] = tempOutNames;
96 //if the user changes the input directory command factory will send this info to us in the output parameter
97 string inputDir = validParameter.validFile(parameters, "inputdir", false);
98 if (inputDir == "not found"){ inputDir = ""; }
101 it = parameters.find("fasta");
102 //user has given a template file
103 if(it != parameters.end()){
104 path = m->hasPath(it->second);
105 //if the user has not given a path then, add inputdir. else leave path alone.
106 if (path == "") { parameters["fasta"] = inputDir + it->second; }
109 it = parameters.find("name");
110 //user has given a template file
111 if(it != parameters.end()){
112 path = m->hasPath(it->second);
113 //if the user has not given a path then, add inputdir. else leave path alone.
114 if (path == "") { parameters["name"] = inputDir + it->second; }
117 it = parameters.find("list");
118 //user has given a template file
119 if(it != parameters.end()){
120 path = m->hasPath(it->second);
121 //if the user has not given a path then, add inputdir. else leave path alone.
122 if (path == "") { parameters["list"] = inputDir + it->second; }
127 //check for parameters
128 fastafile = validParameter.validFile(parameters, "fasta", true);
129 if (fastafile == "not open") { abort = true; }
130 else if (fastafile == "not found") { fastafile = ""; m->mothurOut("fasta is a required parameter for the consensus.seqs command."); m->mothurOutEndLine(); abort = true; }
132 namefile = validParameter.validFile(parameters, "name", true);
133 if (namefile == "not open") { abort = true; }
134 else if (namefile == "not found") { namefile = ""; }
136 listfile = validParameter.validFile(parameters, "list", true);
137 if (listfile == "not open") { abort = true; }
138 else if (listfile == "not found") { listfile = ""; }
140 label = validParameter.validFile(parameters, "label", false);
141 if (label == "not found") { label = ""; }
143 if(label != "all") { m->splitAtDash(label, labels); allLines = 0; }
144 else { allLines = 1; }
147 //if the user changes the output directory command factory will send this info to us in the output parameter
148 outputDir = validParameter.validFile(parameters, "outputdir", false); if (outputDir == "not found"){ outputDir = m->hasPath(fastafile); }
152 catch(exception& e) {
153 m->errorOut(e, "ConsensusSeqsCommand", "ConsensusSeqsCommand");
157 //**********************************************************************************************************************
159 void ConsensusSeqsCommand::help(){
161 m->mothurOut("The consensus.seqs command can be used in 2 ways: create a consensus sequence from a fastafile, or with a listfile create a consensus sequence for each otu. Sequences must be aligned.\n");
162 m->mothurOut("The consensus.seqs command parameters are fasta, list, name and label.\n");
163 m->mothurOut("The fasta parameter allows you to enter the fasta file containing your sequences, and is required. \n");
164 m->mothurOut("The list parameter allows you to enter a your list file. \n");
165 m->mothurOut("The name parameter allows you to enter a names file associated with the fasta file. \n");
166 m->mothurOut("The label parameter allows you to select what distance levels you would like output files for, and are separated by dashes.\n");
167 m->mothurOut("The consensus.seqs command should be in the following format: \n");
168 m->mothurOut("consensus.seqs(fasta=yourFastaFile, list=yourListFile) \n");
169 m->mothurOut("Example: consensus.seqs(fasta=abrecovery.align, list=abrecovery.fn.list) \n");
170 m->mothurOut("Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n\n");
172 catch(exception& e) {
173 m->errorOut(e, "ConsensusSeqsCommand", "help");
178 //***************************************************************************************************************
180 ConsensusSeqsCommand::~ConsensusSeqsCommand(){ /* do nothing */ }
182 //***************************************************************************************************************
184 int ConsensusSeqsCommand::execute(){
187 if (abort == true) { return 0; }
191 if (m->control_pressed) { return 0; }
193 if (namefile != "") { readNames(); }
195 if (m->control_pressed) { return 0; }
198 if (listfile == "") {
201 string outputSummaryFile = outputDir + m->getRootName(m->getSimpleName(fastafile)) + "cons.summary";
202 m->openOutputFile(outputSummaryFile, outSummary);
203 outSummary.setf(ios::fixed, ios::floatfield); outSummary.setf(ios::showpoint);
204 outputNames.push_back(outputSummaryFile); outputTypes["summary"].push_back(outputSummaryFile);
206 outSummary << "PositioninAlignment\tA\tT\tG\tC\tGap\tNumberofSeqs\tConsensusBase" << endl;
209 string outputFastaFile = outputDir + m->getRootName(m->getSimpleName(fastafile)) + "cons.fasta";
210 m->openOutputFile(outputFastaFile, outFasta);
211 outputNames.push_back(outputFastaFile); outputTypes["fasta"].push_back(outputFastaFile);
215 for (map<string, string>::iterator it = nameMap.begin(); it != nameMap.end(); it++) {
217 if (m->control_pressed) { outSummary.close(); outFasta.close(); for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } return 0; }
219 string seq = fastaMap[it->second];
222 if (seqLength == 0) { seqLength = seq.length(); }
223 else if (seqLength != seq.length()) { m->mothurOut("[ERROR]: sequence are not the same length, please correct."); m->mothurOutEndLine(); m->control_pressed = true; }
227 vector< vector<float> > percentages; percentages.resize(5);
228 for (int j = 0; j < percentages.size(); j++) { percentages[j].resize(seqLength, 0.0); }
232 for (int j = 0; j < seqLength; j++) {
234 if (m->control_pressed) { outSummary.close(); outFasta.close(); for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } return 0; }
236 vector<int> counts; counts.resize(5, 0); //A,T,G,C,Gap
239 for (int i = 0; i < seqs.size(); i++) {
241 if (seqs[i][j] == '.') { numDots++; }
243 char base = toupper(seqs[i][j]);
244 if (base == 'A') { counts[0]++; }
245 else if (base == 'T') { counts[1]++; }
246 else if (base == 'G') { counts[2]++; }
247 else if (base == 'C') { counts[3]++; }
248 else { counts[4]++; }
252 if (numDots != seqs.size()) { conBase = getBase(counts); }
256 percentages[0][j] = counts[0] / (float) seqs.size();
257 percentages[1][j] = counts[1] / (float) seqs.size();
258 percentages[2][j] = counts[2] / (float) seqs.size();
259 percentages[3][j] = counts[3] / (float) seqs.size();
260 percentages[4][j] = counts[4] / (float) seqs.size();
264 for (int j = 0; j < seqLength; j++) {
265 outSummary << (j+1) << '\t' << percentages[0][j] << '\t'<< percentages[1][j] << '\t'<< percentages[2][j] << '\t' << percentages[3][j] << '\t' << percentages[4][j] << '\t' << seqs.size() << '\t' << consSeq[j] << endl;
269 outFasta << ">conseq" << endl << consSeq << endl;
271 outSummary.close(); outFasta.close();
277 InputData* input = new InputData(listfile, "list");
278 ListVector* list = input->getListVector();
280 string lastLabel = list->getLabel();
281 set<string> processedLabels;
282 set<string> userLabels = labels;
284 //as long as you are not at the end of the file or done wih the lines you want
285 while((list != NULL) && ((allLines == 1) || (userLabels.size() != 0))) {
287 if (m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } delete list; delete input; return 0; }
289 if(allLines == 1 || labels.count(list->getLabel()) == 1){
291 m->mothurOut(list->getLabel()); m->mothurOutEndLine();
295 processedLabels.insert(list->getLabel());
296 userLabels.erase(list->getLabel());
299 if ((m->anyLabelsToProcess(list->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) {
300 string saveLabel = list->getLabel();
304 list = input->getListVector(lastLabel);
305 m->mothurOut(list->getLabel()); m->mothurOutEndLine();
309 processedLabels.insert(list->getLabel());
310 userLabels.erase(list->getLabel());
312 //restore real lastlabel to save below
313 list->setLabel(saveLabel);
316 lastLabel = list->getLabel();
318 delete list; list = NULL;
320 //get next line to process
321 list = input->getListVector();
325 if (m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } if (list != NULL) { delete list; } delete input; return 0; }
327 //output error messages about any remaining user labels
328 set<string>::iterator it;
329 bool needToRun = false;
330 for (it = userLabels.begin(); it != userLabels.end(); it++) {
331 m->mothurOut("Your file does not include the label " + *it);
332 if (processedLabels.count(lastLabel) != 1) {
333 m->mothurOut(". I will use " + lastLabel + "."); m->mothurOutEndLine();
336 m->mothurOut(". Please refer to " + lastLabel + "."); m->mothurOutEndLine();
340 //run last label if you need to
341 if (needToRun == true) {
342 if (list != NULL) { delete list; }
344 list = input->getListVector(lastLabel);
346 m->mothurOut(list->getLabel()); m->mothurOutEndLine();
350 delete list; list = NULL;
353 if (list != NULL) { delete list; }
357 m->mothurOutEndLine();
358 m->mothurOut("Output File Name: "); m->mothurOutEndLine();
359 for (int i = 0; i < outputNames.size(); i++) { m->mothurOut(outputNames[i]); m->mothurOutEndLine(); }
360 m->mothurOutEndLine();
366 catch(exception& e) {
367 m->errorOut(e, "ConsensusSeqsCommand", "execute");
371 //***************************************************************************************************************
373 int ConsensusSeqsCommand::processList(ListVector*& list){
377 string outputSummaryFile = outputDir + m->getRootName(m->getSimpleName(fastafile)) + list->getLabel() + ".cons.summary";
378 m->openOutputFile(outputSummaryFile, outSummary);
379 outSummary.setf(ios::fixed, ios::floatfield); outSummary.setf(ios::showpoint);
380 outputNames.push_back(outputSummaryFile); outputTypes["summary"].push_back(outputSummaryFile);
383 string outputNameFile = outputDir + m->getRootName(m->getSimpleName(fastafile)) + list->getLabel() + ".cons.names";
384 m->openOutputFile(outputNameFile, outName);
385 outputNames.push_back(outputNameFile); outputTypes["name"].push_back(outputNameFile);
388 string outputFastaFile = outputDir + m->getRootName(m->getSimpleName(fastafile)) + list->getLabel() + ".cons.fasta";
389 m->openOutputFile(outputFastaFile, outFasta);
390 outputNames.push_back(outputFastaFile); outputTypes["fasta"].push_back(outputFastaFile);
392 outSummary << "OTU#\tPositioninAlignment\tA\tT\tG\tC\tGap\tNumberofSeqs\tConsensusBase" << endl;
394 for (int i = 0; i < list->getNumBins(); i++) {
396 if (m->control_pressed) { outSummary.close(); outName.close(); outFasta.close(); return 0; }
398 string bin = list->get(i);
401 string consSeq = getConsSeq(bin, outSummary, newName, i);
403 outFasta << ">seq" << (i+1) << endl << consSeq << endl;
404 outName << "seq" << (i+1) << '\t' << "seq" << (i+1) << "," << newName << endl;
407 outSummary.close(); outName.close(); outFasta.close();
412 catch(exception& e) {
413 m->errorOut(e, "ConsensusSeqsCommand", "processList");
418 //***************************************************************************************************************
419 //made this smart enough to owrk with unique or non unique list file
420 string ConsensusSeqsCommand::getConsSeq(string bin, ofstream& outSummary, string& name, int binNumber){
426 //the whole bin is the second column if no names file, otherwise build it
428 if (namefile != "") { name = ""; }
430 vector<string> binNames;
431 m->splitAtComma(bin, binNames);
433 //get sequence strings for each name in the bin
436 set<string> addedAlready;
438 for (int i = 0; i < binNames.size(); i++) {
440 map<string, string>::iterator it;
442 it = nameMap.find(binNames[i]);
443 if (it == nameMap.end()) {
444 if (namefile == "") { m->mothurOut("[ERROR]: " + binNames[i] + " is not in your fasta file, please correct."); m->mothurOutEndLine(); error = true; }
445 else { m->mothurOut("[ERROR]: " + binNames[i] + " is not in your fasta or name file, please correct."); m->mothurOutEndLine(); error = true; }
449 //add sequence string to seqs vector to process below
450 string seq = fastaMap[it->second];
453 if (seqLength == 0) { seqLength = seq.length(); }
454 else if (seqLength != seq.length()) { m->mothurOut("[ERROR]: sequence are not the same length, please correct."); m->mothurOutEndLine(); error = true; break; }
456 if (namefile != "") {
457 //did we add this line from name file already?
458 if (addedAlready.count(it->second) == 0) {
459 name += "," + nameFileMap[it->second];
460 addedAlready.insert(it->second);
467 if (error) { m->control_pressed = true; return consSeq; }
469 if (namefile != "") { name = name.substr(1); }
471 vector< vector<float> > percentages; percentages.resize(5);
472 for (int j = 0; j < percentages.size(); j++) { percentages[j].resize(seqLength, 0.0); }
475 for (int j = 0; j < seqLength; j++) {
477 if (m->control_pressed) { return consSeq; }
479 vector<int> counts; counts.resize(5, 0); //A,T,G,C,Gap
482 for (int i = 0; i < seqs.size(); i++) {
484 if (seqs[i][j] == '.') { numDots++; }
486 char base = toupper(seqs[i][j]);
487 if (base == 'A') { counts[0]++; }
488 else if (base == 'T') { counts[1]++; }
489 else if (base == 'G') { counts[2]++; }
490 else if (base == 'C') { counts[3]++; }
491 else { counts[4]++; }
495 if (numDots != seqs.size()) { conBase = getBase(counts); }
499 percentages[0][j] = counts[0] / (float) seqs.size();
500 percentages[1][j] = counts[1] / (float) seqs.size();
501 percentages[2][j] = counts[2] / (float) seqs.size();
502 percentages[3][j] = counts[3] / (float) seqs.size();
503 percentages[4][j] = counts[4] / (float) seqs.size();
507 for (int j = 0; j < seqLength; j++) {
508 outSummary << (binNumber + 1) << '\t' << (j+1) << '\t' << percentages[0][j] << '\t'<< percentages[1][j] << '\t'<< percentages[2][j] << '\t' << percentages[3][j] << '\t' << percentages[4][j] << '\t' << seqs.size() << '\t' << consSeq[j] << endl;
514 catch(exception& e) {
515 m->errorOut(e, "ConsensusSeqsCommand", "getConsSeq");
519 //***************************************************************************************************************
521 char ConsensusSeqsCommand::getBase(vector<int> counts){ //A,T,G,C,Gap
528 * Y = T C (pyrimidine)
531 * S = G C (strong bonds)
532 * W = A T (weak bonds)
533 * B = G T C (all but A)
534 * D = G A T (all but C)
535 * H = A C T (all but G)
536 * V = G C A (all but T)
537 * N = A G C T (any) */
542 if ((counts[0] != 0) && (counts[1] != 0) && (counts[2] != 0) && (counts[3] != 0) && (counts[4] != 0)) { conBase = 'n'; }
544 else if ((counts[0] != 0) && (counts[1] != 0) && (counts[2] != 0) && (counts[3] != 0) && (counts[4] == 0)) { conBase = 'N'; }
546 else if ((counts[0] != 0) && (counts[1] == 0) && (counts[2] != 0) && (counts[3] != 0) && (counts[4] != 0)) { conBase = 'v'; }
548 else if ((counts[0] != 0) && (counts[1] == 0) && (counts[2] != 0) && (counts[3] != 0) && (counts[4] == 0)) { conBase = 'V'; }
550 else if ((counts[0] != 0) && (counts[1] != 0) && (counts[2] == 0) && (counts[3] != 0) && (counts[4] != 0)) { conBase = 'h'; }
552 else if ((counts[0] != 0) && (counts[1] != 0) && (counts[2] == 0) && (counts[3] != 0) && (counts[4] == 0)) { conBase = 'H'; }
554 else if ((counts[0] != 0) && (counts[1] != 0) && (counts[2] != 0) && (counts[3] == 0) && (counts[4] != 0)) { conBase = 'd'; }
556 else if ((counts[0] != 0) && (counts[1] != 0) && (counts[2] != 0) && (counts[3] == 0) && (counts[4] == 0)) { conBase = 'D'; }
558 else if ((counts[0] == 0) && (counts[1] != 0) && (counts[2] != 0) && (counts[3] != 0) && (counts[4] != 0)) { conBase = 'b'; }
560 else if ((counts[0] == 0) && (counts[1] != 0) && (counts[2] != 0) && (counts[3] != 0) && (counts[4] == 0)) { conBase = 'B'; }
561 //W = A T (weak bonds)
562 else if ((counts[0] != 0) && (counts[1] != 0) && (counts[2] == 0) && (counts[3] == 0) && (counts[4] != 0)) { conBase = 'w'; }
563 //W = A T (weak bonds) no gap
564 else if ((counts[0] != 0) && (counts[1] != 0) && (counts[2] == 0) && (counts[3] == 0) && (counts[4] == 0)) { conBase = 'W'; }
565 //S = G C (strong bonds)
566 else if ((counts[0] == 0) && (counts[1] == 0) && (counts[2] != 0) && (counts[3] != 0) && (counts[4] != 0)) { conBase = 's'; }
567 //S = G C (strong bonds) no gap
568 else if ((counts[0] == 0) && (counts[1] == 0) && (counts[2] != 0) && (counts[3] != 0) && (counts[4] == 0)) { conBase = 'S'; }
570 else if ((counts[0] != 0) && (counts[1] == 0) && (counts[2] == 0) && (counts[3] != 0) && (counts[4] != 0)) { conBase = 'm'; }
571 //M = A C (amino) no gap
572 else if ((counts[0] != 0) && (counts[1] == 0) && (counts[2] == 0) && (counts[3] != 0) && (counts[4] == 0)) { conBase = 'M'; }
574 else if ((counts[0] == 0) && (counts[1] != 0) && (counts[2] != 0) && (counts[3] == 0) && (counts[4] != 0)) { conBase = 'k'; }
575 //K = G T (keto) no gap
576 else if ((counts[0] == 0) && (counts[1] != 0) && (counts[2] != 0) && (counts[3] == 0) && (counts[4] == 0)) { conBase = 'K'; }
577 //Y = T C (pyrimidine)
578 else if ((counts[0] == 0) && (counts[1] != 0) && (counts[2] == 0) && (counts[3] != 0) && (counts[4] != 0)) { conBase = 'y'; }
579 //Y = T C (pyrimidine) no gap
580 else if ((counts[0] == 0) && (counts[1] != 0) && (counts[2] == 0) && (counts[3] != 0) && (counts[4] == 0)) { conBase = 'Y'; }
582 else if ((counts[0] != 0) && (counts[1] == 0) && (counts[2] != 0) && (counts[3] == 0) && (counts[4] != 0)) { conBase = 'r'; }
583 //R = G A (purine) no gap
584 else if ((counts[0] != 0) && (counts[1] == 0) && (counts[2] != 0) && (counts[3] == 0) && (counts[4] == 0)) { conBase = 'R'; }
586 else if ((counts[0] != 0) && (counts[1] == 0) && (counts[2] == 0) && (counts[3] == 0) && (counts[4] != 0)) { conBase = 'a'; }
588 else if ((counts[0] != 0) && (counts[1] == 0) && (counts[2] == 0) && (counts[3] == 0) && (counts[4] == 0)) { conBase = 'A'; }
590 else if ((counts[0] == 0) && (counts[1] != 0) && (counts[2] == 0) && (counts[3] == 0) && (counts[4] != 0)) { conBase = 't'; }
592 else if ((counts[0] == 0) && (counts[1] != 0) && (counts[2] == 0) && (counts[3] == 0) && (counts[4] == 0)) { conBase = 'T'; }
594 else if ((counts[0] == 0) && (counts[1] == 0) && (counts[2] != 0) && (counts[3] == 0) && (counts[4] != 0)) { conBase = 'g'; }
596 else if ((counts[0] == 0) && (counts[1] == 0) && (counts[2] != 0) && (counts[3] == 0) && (counts[4] == 0)) { conBase = 'G'; }
598 else if ((counts[0] == 0) && (counts[1] == 0) && (counts[2] == 0) && (counts[3] != 0) && (counts[4] != 0)) { conBase = 'c'; }
600 else if ((counts[0] == 0) && (counts[1] == 0) && (counts[2] == 0) && (counts[3] != 0) && (counts[4] == 0)) { conBase = 'C'; }
602 else if ((counts[0] == 0) && (counts[1] == 0) && (counts[2] == 0) && (counts[3] == 0) && (counts[4] != 0)) { conBase = '-'; }
603 else{ m->mothurOut("[ERROR]: cannot find consensus base."); m->mothurOutEndLine(); }
608 catch(exception& e) {
609 m->errorOut(e, "ConsensusSeqsCommand", "getBase");
614 //***************************************************************************************************************
616 int ConsensusSeqsCommand::readFasta(){
620 m->openInputFile(fastafile, in);
624 if (m->control_pressed) { break; }
626 Sequence seq(in); m->gobble(in);
627 string name = seq.getName();
630 fastaMap[name] = seq.getAligned();
631 nameMap[name] = name; //set nameMap incase no names file
632 nameFileMap[name] = name;
641 catch(exception& e) {
642 m->errorOut(e, "ConsensusSeqsCommand", "readFasta");
646 //***************************************************************************************************************
648 int ConsensusSeqsCommand::readNames(){
652 m->openInputFile(namefile, in);
654 string thisname, repnames;
655 map<string, string>::iterator it;
661 if (m->control_pressed) { break; }
663 in >> thisname; m->gobble(in); //read from first column
664 in >> repnames; //read from second column
666 it = nameMap.find(thisname);
667 if (it != nameMap.end()) { //then this sequence was in the fastafile
669 vector<string> splitRepNames;
670 m->splitAtComma(repnames, splitRepNames);
672 nameFileMap[thisname] = repnames; //for later when outputting the new namesFile if the list file is unique
673 for (int i = 0; i < splitRepNames.size(); i++) { nameMap[splitRepNames[i]] = thisname; }
675 }else{ m->mothurOut("[ERROR]: " + thisname + " is not in the fasta file, please correct."); m->mothurOutEndLine(); error = true; }
682 if (error) { m->control_pressed = true; }
687 catch(exception& e) {
688 m->errorOut(e, "ConsensusSeqsCommand", "readNames");
693 //***************************************************************************************************************