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(){
29 abort = true; calledHelp = true;
30 vector<string> tempOutNames;
31 outputTypes["fasta"] = tempOutNames;
32 outputTypes["name"] = tempOutNames;
33 outputTypes["summary"] = tempOutNames;
36 m->errorOut(e, "ConsensusSeqsCommand", "ConsensusSeqsCommand");
40 //**********************************************************************************************************************
41 vector<string> ConsensusSeqsCommand::getRequiredParameters(){
43 string Array[] = {"fasta", "list"};
44 vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
48 m->errorOut(e, "ConsensusSeqsCommand", "getRequiredParameters");
52 //**********************************************************************************************************************
53 vector<string> ConsensusSeqsCommand::getRequiredFiles(){
55 vector<string> myArray;
59 m->errorOut(e, "DegapSeqsCommand", "getRequiredFiles");
63 //***************************************************************************************************************
64 ConsensusSeqsCommand::ConsensusSeqsCommand(string option) {
66 abort = false; calledHelp = false;
69 //allow user to run help
70 if(option == "help") { help(); abort = true; calledHelp = true; }
73 //valid paramters for this command
74 string Array[] = {"fasta","list","name","label", "outputdir","inputdir"};
75 vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
77 OptionParser parser(option);
78 map<string,string> parameters = parser.getParameters();
80 ValidParameters validParameter;
81 map<string,string>::iterator it;
83 //check to make sure all parameters are valid for command
84 for (it = parameters.begin(); it != parameters.end(); it++) {
85 if (validParameter.isValidParameter(it->first, myArray, it->second) != true) { abort = true; }
88 //initialize outputTypes
89 vector<string> tempOutNames;
90 outputTypes["fasta"] = tempOutNames;
91 outputTypes["name"] = tempOutNames;
92 outputTypes["summary"] = tempOutNames;
95 //if the user changes the input directory command factory will send this info to us in the output parameter
96 string inputDir = validParameter.validFile(parameters, "inputdir", false);
97 if (inputDir == "not found"){ inputDir = ""; }
100 it = parameters.find("fasta");
101 //user has given a template file
102 if(it != parameters.end()){
103 path = m->hasPath(it->second);
104 //if the user has not given a path then, add inputdir. else leave path alone.
105 if (path == "") { parameters["fasta"] = inputDir + it->second; }
108 it = parameters.find("name");
109 //user has given a template file
110 if(it != parameters.end()){
111 path = m->hasPath(it->second);
112 //if the user has not given a path then, add inputdir. else leave path alone.
113 if (path == "") { parameters["name"] = inputDir + it->second; }
116 it = parameters.find("list");
117 //user has given a template file
118 if(it != parameters.end()){
119 path = m->hasPath(it->second);
120 //if the user has not given a path then, add inputdir. else leave path alone.
121 if (path == "") { parameters["list"] = inputDir + it->second; }
126 //check for parameters
127 fastafile = validParameter.validFile(parameters, "fasta", true);
128 if (fastafile == "not open") { abort = true; }
129 else if (fastafile == "not found") { fastafile = ""; m->mothurOut("fasta is a required parameter for the consensus.seqs command."); m->mothurOutEndLine(); abort = true; }
131 namefile = validParameter.validFile(parameters, "name", true);
132 if (namefile == "not open") { abort = true; }
133 else if (namefile == "not found") { namefile = ""; }
135 listfile = validParameter.validFile(parameters, "list", true);
136 if (listfile == "not open") { abort = true; }
137 else if (listfile == "not found") { listfile = ""; }
139 label = validParameter.validFile(parameters, "label", false);
140 if (label == "not found") { label = ""; }
142 if(label != "all") { m->splitAtDash(label, labels); allLines = 0; }
143 else { allLines = 1; }
146 //if the user changes the output directory command factory will send this info to us in the output parameter
147 outputDir = validParameter.validFile(parameters, "outputdir", false); if (outputDir == "not found"){ outputDir = m->hasPath(fastafile); }
151 catch(exception& e) {
152 m->errorOut(e, "ConsensusSeqsCommand", "ConsensusSeqsCommand");
156 //**********************************************************************************************************************
158 void ConsensusSeqsCommand::help(){
160 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");
161 m->mothurOut("The consensus.seqs command parameters are fasta, list, name and label.\n");
162 m->mothurOut("The fasta parameter allows you to enter the fasta file containing your sequences, and is required. \n");
163 m->mothurOut("The list parameter allows you to enter a your list file. \n");
164 m->mothurOut("The name parameter allows you to enter a names file associated with the fasta file. \n");
165 m->mothurOut("The label parameter allows you to select what distance levels you would like output files for, and are separated by dashes.\n");
166 m->mothurOut("The consensus.seqs command should be in the following format: \n");
167 m->mothurOut("consensus.seqs(fasta=yourFastaFile, list=yourListFile) \n");
168 m->mothurOut("Example: consensus.seqs(fasta=abrecovery.align, list=abrecovery.fn.list) \n");
169 m->mothurOut("Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n\n");
171 catch(exception& e) {
172 m->errorOut(e, "ConsensusSeqsCommand", "help");
177 //***************************************************************************************************************
179 ConsensusSeqsCommand::~ConsensusSeqsCommand(){ /* do nothing */ }
181 //***************************************************************************************************************
183 int ConsensusSeqsCommand::execute(){
186 if (abort == true) { if (calledHelp) { return 0; } return 2; }
190 if (m->control_pressed) { return 0; }
192 if (namefile != "") { readNames(); }
194 if (m->control_pressed) { return 0; }
197 if (listfile == "") {
200 string outputSummaryFile = outputDir + m->getRootName(m->getSimpleName(fastafile)) + "cons.summary";
201 m->openOutputFile(outputSummaryFile, outSummary);
202 outSummary.setf(ios::fixed, ios::floatfield); outSummary.setf(ios::showpoint);
203 outputNames.push_back(outputSummaryFile); outputTypes["summary"].push_back(outputSummaryFile);
205 outSummary << "PositioninAlignment\tA\tT\tG\tC\tGap\tNumberofSeqs\tConsensusBase" << endl;
208 string outputFastaFile = outputDir + m->getRootName(m->getSimpleName(fastafile)) + "cons.fasta";
209 m->openOutputFile(outputFastaFile, outFasta);
210 outputNames.push_back(outputFastaFile); outputTypes["fasta"].push_back(outputFastaFile);
214 for (map<string, string>::iterator it = nameMap.begin(); it != nameMap.end(); it++) {
216 if (m->control_pressed) { outSummary.close(); outFasta.close(); for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } return 0; }
218 string seq = fastaMap[it->second];
221 if (seqLength == 0) { seqLength = seq.length(); }
222 else if (seqLength != seq.length()) { m->mothurOut("[ERROR]: sequence are not the same length, please correct."); m->mothurOutEndLine(); m->control_pressed = true; }
226 vector< vector<float> > percentages; percentages.resize(5);
227 for (int j = 0; j < percentages.size(); j++) { percentages[j].resize(seqLength, 0.0); }
231 for (int j = 0; j < seqLength; j++) {
233 if (m->control_pressed) { outSummary.close(); outFasta.close(); for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } return 0; }
235 vector<int> counts; counts.resize(5, 0); //A,T,G,C,Gap
238 for (int i = 0; i < seqs.size(); i++) {
240 if (seqs[i][j] == '.') { numDots++; }
242 char base = toupper(seqs[i][j]);
243 if (base == 'A') { counts[0]++; }
244 else if (base == 'T') { counts[1]++; }
245 else if (base == 'G') { counts[2]++; }
246 else if (base == 'C') { counts[3]++; }
247 else { counts[4]++; }
251 if (numDots != seqs.size()) { conBase = getBase(counts); }
255 percentages[0][j] = counts[0] / (float) seqs.size();
256 percentages[1][j] = counts[1] / (float) seqs.size();
257 percentages[2][j] = counts[2] / (float) seqs.size();
258 percentages[3][j] = counts[3] / (float) seqs.size();
259 percentages[4][j] = counts[4] / (float) seqs.size();
263 for (int j = 0; j < seqLength; j++) {
264 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;
268 outFasta << ">conseq" << endl << consSeq << endl;
270 outSummary.close(); outFasta.close();
276 InputData* input = new InputData(listfile, "list");
277 ListVector* list = input->getListVector();
279 string lastLabel = list->getLabel();
280 set<string> processedLabels;
281 set<string> userLabels = labels;
283 //as long as you are not at the end of the file or done wih the lines you want
284 while((list != NULL) && ((allLines == 1) || (userLabels.size() != 0))) {
286 if (m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } delete list; delete input; return 0; }
288 if(allLines == 1 || labels.count(list->getLabel()) == 1){
290 m->mothurOut(list->getLabel()); m->mothurOutEndLine();
294 processedLabels.insert(list->getLabel());
295 userLabels.erase(list->getLabel());
298 if ((m->anyLabelsToProcess(list->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) {
299 string saveLabel = list->getLabel();
303 list = input->getListVector(lastLabel);
304 m->mothurOut(list->getLabel()); m->mothurOutEndLine();
308 processedLabels.insert(list->getLabel());
309 userLabels.erase(list->getLabel());
311 //restore real lastlabel to save below
312 list->setLabel(saveLabel);
315 lastLabel = list->getLabel();
317 delete list; list = NULL;
319 //get next line to process
320 list = input->getListVector();
324 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; }
326 //output error messages about any remaining user labels
327 set<string>::iterator it;
328 bool needToRun = false;
329 for (it = userLabels.begin(); it != userLabels.end(); it++) {
330 m->mothurOut("Your file does not include the label " + *it);
331 if (processedLabels.count(lastLabel) != 1) {
332 m->mothurOut(". I will use " + lastLabel + "."); m->mothurOutEndLine();
335 m->mothurOut(". Please refer to " + lastLabel + "."); m->mothurOutEndLine();
339 //run last label if you need to
340 if (needToRun == true) {
341 if (list != NULL) { delete list; }
343 list = input->getListVector(lastLabel);
345 m->mothurOut(list->getLabel()); m->mothurOutEndLine();
349 delete list; list = NULL;
352 if (list != NULL) { delete list; }
356 m->mothurOutEndLine();
357 m->mothurOut("Output File Name: "); m->mothurOutEndLine();
358 for (int i = 0; i < outputNames.size(); i++) { m->mothurOut(outputNames[i]); m->mothurOutEndLine(); }
359 m->mothurOutEndLine();
365 catch(exception& e) {
366 m->errorOut(e, "ConsensusSeqsCommand", "execute");
370 //***************************************************************************************************************
372 int ConsensusSeqsCommand::processList(ListVector*& list){
376 string outputSummaryFile = outputDir + m->getRootName(m->getSimpleName(fastafile)) + list->getLabel() + ".cons.summary";
377 m->openOutputFile(outputSummaryFile, outSummary);
378 outSummary.setf(ios::fixed, ios::floatfield); outSummary.setf(ios::showpoint);
379 outputNames.push_back(outputSummaryFile); outputTypes["summary"].push_back(outputSummaryFile);
382 string outputNameFile = outputDir + m->getRootName(m->getSimpleName(fastafile)) + list->getLabel() + ".cons.names";
383 m->openOutputFile(outputNameFile, outName);
384 outputNames.push_back(outputNameFile); outputTypes["name"].push_back(outputNameFile);
387 string outputFastaFile = outputDir + m->getRootName(m->getSimpleName(fastafile)) + list->getLabel() + ".cons.fasta";
388 m->openOutputFile(outputFastaFile, outFasta);
389 outputNames.push_back(outputFastaFile); outputTypes["fasta"].push_back(outputFastaFile);
391 outSummary << "OTU#\tPositioninAlignment\tA\tT\tG\tC\tGap\tNumberofSeqs\tConsensusBase" << endl;
393 for (int i = 0; i < list->getNumBins(); i++) {
395 if (m->control_pressed) { outSummary.close(); outName.close(); outFasta.close(); return 0; }
397 string bin = list->get(i);
400 string consSeq = getConsSeq(bin, outSummary, newName, i);
402 outFasta << ">seq" << (i+1) << endl << consSeq << endl;
403 outName << "seq" << (i+1) << '\t' << "seq" << (i+1) << "," << newName << endl;
406 outSummary.close(); outName.close(); outFasta.close();
411 catch(exception& e) {
412 m->errorOut(e, "ConsensusSeqsCommand", "processList");
417 //***************************************************************************************************************
418 //made this smart enough to owrk with unique or non unique list file
419 string ConsensusSeqsCommand::getConsSeq(string bin, ofstream& outSummary, string& name, int binNumber){
425 //the whole bin is the second column if no names file, otherwise build it
427 if (namefile != "") { name = ""; }
429 vector<string> binNames;
430 m->splitAtComma(bin, binNames);
432 //get sequence strings for each name in the bin
435 set<string> addedAlready;
437 for (int i = 0; i < binNames.size(); i++) {
439 map<string, string>::iterator it;
441 it = nameMap.find(binNames[i]);
442 if (it == nameMap.end()) {
443 if (namefile == "") { m->mothurOut("[ERROR]: " + binNames[i] + " is not in your fasta file, please correct."); m->mothurOutEndLine(); error = true; }
444 else { m->mothurOut("[ERROR]: " + binNames[i] + " is not in your fasta or name file, please correct."); m->mothurOutEndLine(); error = true; }
448 //add sequence string to seqs vector to process below
449 string seq = fastaMap[it->second];
452 if (seqLength == 0) { seqLength = seq.length(); }
453 else if (seqLength != seq.length()) { m->mothurOut("[ERROR]: sequence are not the same length, please correct."); m->mothurOutEndLine(); error = true; break; }
455 if (namefile != "") {
456 //did we add this line from name file already?
457 if (addedAlready.count(it->second) == 0) {
458 name += "," + nameFileMap[it->second];
459 addedAlready.insert(it->second);
466 if (error) { m->control_pressed = true; return consSeq; }
468 if (namefile != "") { name = name.substr(1); }
470 vector< vector<float> > percentages; percentages.resize(5);
471 for (int j = 0; j < percentages.size(); j++) { percentages[j].resize(seqLength, 0.0); }
474 for (int j = 0; j < seqLength; j++) {
476 if (m->control_pressed) { return consSeq; }
478 vector<int> counts; counts.resize(5, 0); //A,T,G,C,Gap
481 for (int i = 0; i < seqs.size(); i++) {
483 if (seqs[i][j] == '.') { numDots++; }
485 char base = toupper(seqs[i][j]);
486 if (base == 'A') { counts[0]++; }
487 else if (base == 'T') { counts[1]++; }
488 else if (base == 'G') { counts[2]++; }
489 else if (base == 'C') { counts[3]++; }
490 else { counts[4]++; }
494 if (numDots != seqs.size()) { conBase = getBase(counts); }
498 percentages[0][j] = counts[0] / (float) seqs.size();
499 percentages[1][j] = counts[1] / (float) seqs.size();
500 percentages[2][j] = counts[2] / (float) seqs.size();
501 percentages[3][j] = counts[3] / (float) seqs.size();
502 percentages[4][j] = counts[4] / (float) seqs.size();
506 for (int j = 0; j < seqLength; j++) {
507 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;
513 catch(exception& e) {
514 m->errorOut(e, "ConsensusSeqsCommand", "getConsSeq");
518 //***************************************************************************************************************
520 char ConsensusSeqsCommand::getBase(vector<int> counts){ //A,T,G,C,Gap
527 * Y = T C (pyrimidine)
530 * S = G C (strong bonds)
531 * W = A T (weak bonds)
532 * B = G T C (all but A)
533 * D = G A T (all but C)
534 * H = A C T (all but G)
535 * V = G C A (all but T)
536 * N = A G C T (any) */
541 if ((counts[0] != 0) && (counts[1] != 0) && (counts[2] != 0) && (counts[3] != 0) && (counts[4] != 0)) { conBase = 'n'; }
543 else if ((counts[0] != 0) && (counts[1] != 0) && (counts[2] != 0) && (counts[3] != 0) && (counts[4] == 0)) { conBase = 'N'; }
545 else if ((counts[0] != 0) && (counts[1] == 0) && (counts[2] != 0) && (counts[3] != 0) && (counts[4] != 0)) { conBase = 'v'; }
547 else if ((counts[0] != 0) && (counts[1] == 0) && (counts[2] != 0) && (counts[3] != 0) && (counts[4] == 0)) { conBase = 'V'; }
549 else if ((counts[0] != 0) && (counts[1] != 0) && (counts[2] == 0) && (counts[3] != 0) && (counts[4] != 0)) { conBase = 'h'; }
551 else if ((counts[0] != 0) && (counts[1] != 0) && (counts[2] == 0) && (counts[3] != 0) && (counts[4] == 0)) { conBase = 'H'; }
553 else if ((counts[0] != 0) && (counts[1] != 0) && (counts[2] != 0) && (counts[3] == 0) && (counts[4] != 0)) { conBase = 'd'; }
555 else if ((counts[0] != 0) && (counts[1] != 0) && (counts[2] != 0) && (counts[3] == 0) && (counts[4] == 0)) { conBase = 'D'; }
557 else if ((counts[0] == 0) && (counts[1] != 0) && (counts[2] != 0) && (counts[3] != 0) && (counts[4] != 0)) { conBase = 'b'; }
559 else if ((counts[0] == 0) && (counts[1] != 0) && (counts[2] != 0) && (counts[3] != 0) && (counts[4] == 0)) { conBase = 'B'; }
560 //W = A T (weak bonds)
561 else if ((counts[0] != 0) && (counts[1] != 0) && (counts[2] == 0) && (counts[3] == 0) && (counts[4] != 0)) { conBase = 'w'; }
562 //W = A T (weak bonds) no gap
563 else if ((counts[0] != 0) && (counts[1] != 0) && (counts[2] == 0) && (counts[3] == 0) && (counts[4] == 0)) { conBase = 'W'; }
564 //S = G C (strong bonds)
565 else if ((counts[0] == 0) && (counts[1] == 0) && (counts[2] != 0) && (counts[3] != 0) && (counts[4] != 0)) { conBase = 's'; }
566 //S = G C (strong bonds) no gap
567 else if ((counts[0] == 0) && (counts[1] == 0) && (counts[2] != 0) && (counts[3] != 0) && (counts[4] == 0)) { conBase = 'S'; }
569 else if ((counts[0] != 0) && (counts[1] == 0) && (counts[2] == 0) && (counts[3] != 0) && (counts[4] != 0)) { conBase = 'm'; }
570 //M = A C (amino) no gap
571 else if ((counts[0] != 0) && (counts[1] == 0) && (counts[2] == 0) && (counts[3] != 0) && (counts[4] == 0)) { conBase = 'M'; }
573 else if ((counts[0] == 0) && (counts[1] != 0) && (counts[2] != 0) && (counts[3] == 0) && (counts[4] != 0)) { conBase = 'k'; }
574 //K = G T (keto) no gap
575 else if ((counts[0] == 0) && (counts[1] != 0) && (counts[2] != 0) && (counts[3] == 0) && (counts[4] == 0)) { conBase = 'K'; }
576 //Y = T C (pyrimidine)
577 else if ((counts[0] == 0) && (counts[1] != 0) && (counts[2] == 0) && (counts[3] != 0) && (counts[4] != 0)) { conBase = 'y'; }
578 //Y = T C (pyrimidine) no gap
579 else if ((counts[0] == 0) && (counts[1] != 0) && (counts[2] == 0) && (counts[3] != 0) && (counts[4] == 0)) { conBase = 'Y'; }
581 else if ((counts[0] != 0) && (counts[1] == 0) && (counts[2] != 0) && (counts[3] == 0) && (counts[4] != 0)) { conBase = 'r'; }
582 //R = G A (purine) no gap
583 else if ((counts[0] != 0) && (counts[1] == 0) && (counts[2] != 0) && (counts[3] == 0) && (counts[4] == 0)) { conBase = 'R'; }
585 else if ((counts[0] != 0) && (counts[1] == 0) && (counts[2] == 0) && (counts[3] == 0) && (counts[4] != 0)) { conBase = 'a'; }
587 else if ((counts[0] != 0) && (counts[1] == 0) && (counts[2] == 0) && (counts[3] == 0) && (counts[4] == 0)) { conBase = 'A'; }
589 else if ((counts[0] == 0) && (counts[1] != 0) && (counts[2] == 0) && (counts[3] == 0) && (counts[4] != 0)) { conBase = 't'; }
591 else if ((counts[0] == 0) && (counts[1] != 0) && (counts[2] == 0) && (counts[3] == 0) && (counts[4] == 0)) { conBase = 'T'; }
593 else if ((counts[0] == 0) && (counts[1] == 0) && (counts[2] != 0) && (counts[3] == 0) && (counts[4] != 0)) { conBase = 'g'; }
595 else if ((counts[0] == 0) && (counts[1] == 0) && (counts[2] != 0) && (counts[3] == 0) && (counts[4] == 0)) { conBase = 'G'; }
597 else if ((counts[0] == 0) && (counts[1] == 0) && (counts[2] == 0) && (counts[3] != 0) && (counts[4] != 0)) { conBase = 'c'; }
599 else if ((counts[0] == 0) && (counts[1] == 0) && (counts[2] == 0) && (counts[3] != 0) && (counts[4] == 0)) { conBase = 'C'; }
601 else if ((counts[0] == 0) && (counts[1] == 0) && (counts[2] == 0) && (counts[3] == 0) && (counts[4] != 0)) { conBase = '-'; }
602 else{ m->mothurOut("[ERROR]: cannot find consensus base."); m->mothurOutEndLine(); }
607 catch(exception& e) {
608 m->errorOut(e, "ConsensusSeqsCommand", "getBase");
613 //***************************************************************************************************************
615 int ConsensusSeqsCommand::readFasta(){
619 m->openInputFile(fastafile, in);
623 if (m->control_pressed) { break; }
625 Sequence seq(in); m->gobble(in);
626 string name = seq.getName();
629 fastaMap[name] = seq.getAligned();
630 nameMap[name] = name; //set nameMap incase no names file
631 nameFileMap[name] = name;
640 catch(exception& e) {
641 m->errorOut(e, "ConsensusSeqsCommand", "readFasta");
645 //***************************************************************************************************************
647 int ConsensusSeqsCommand::readNames(){
651 m->openInputFile(namefile, in);
653 string thisname, repnames;
654 map<string, string>::iterator it;
660 if (m->control_pressed) { break; }
662 in >> thisname; m->gobble(in); //read from first column
663 in >> repnames; //read from second column
665 it = nameMap.find(thisname);
666 if (it != nameMap.end()) { //then this sequence was in the fastafile
668 vector<string> splitRepNames;
669 m->splitAtComma(repnames, splitRepNames);
671 nameFileMap[thisname] = repnames; //for later when outputting the new namesFile if the list file is unique
672 for (int i = 0; i < splitRepNames.size(); i++) { nameMap[splitRepNames[i]] = thisname; }
674 }else{ m->mothurOut("[ERROR]: " + thisname + " is not in the fasta file, please correct."); m->mothurOutEndLine(); error = true; }
681 if (error) { m->control_pressed = true; }
686 catch(exception& e) {
687 m->errorOut(e, "ConsensusSeqsCommand", "readNames");
692 //***************************************************************************************************************