//allow user to run help
if(option == "help") { help(); abort = true; calledHelp = true; }
+ else if(option == "citation") { citation(); abort = true; calledHelp = true;}
else {
vector<string> myArray = setParameters();
sharedfile = validParameter.validFile(parameters, "shared", true);
if (sharedfile == "not open") { sharedfile = ""; abort = true; }
else if (sharedfile == "not found") { sharedfile = ""; }
- else { format = "sharedfile"; inputfile = sharedfile; }
+ else { format = "sharedfile"; inputfile = sharedfile; m->setSharedFile(sharedfile); }
relabundfile = validParameter.validFile(parameters, "relabund", true);
if (relabundfile == "not open") { relabundfile = ""; abort = true; }
else if (relabundfile == "not found") { relabundfile = ""; }
- else { format = "relabund"; inputfile = relabundfile; }
+ else { format = "relabund"; inputfile = relabundfile; m->setRelAbundFile(relabundfile); }
if ((sharedfile == "") && (relabundfile == "")) {
m->mothurOut("Normalizing to " + toString(norm) + "."); m->mothurOutEndLine();
}
+
//as long as you are not at the end of the file or done wih the lines you want
while((lookup[0] != NULL) && ((allLines == 1) || (userLabels.size() != 0))) {
if(allLines == 1 || labels.count(lookup[0]->getLabel()) == 1){
m->mothurOut(lookup[0]->getLabel()); m->mothurOutEndLine();
+ if (!m->printedHeaders) { lookup[0]->printHeaders(out); }
normalize(lookup, out);
processedLabels.insert(lookup[0]->getLabel());
for (int i = 0; i < lookup.size(); i++) { delete lookup[i]; }
lookup = input->getSharedRAbundVectors(lastLabel);
m->mothurOut(lookup[0]->getLabel()); m->mothurOutEndLine();
-
+ if (!m->printedHeaders) { lookup[0]->printHeaders(out); }
normalize(lookup, out);
processedLabels.insert(lookup[0]->getLabel());
lookup = input->getSharedRAbundVectors(lastLabel);
m->mothurOut(lookup[0]->getLabel()); m->mothurOutEndLine();
-
+ if (!m->printedHeaders) { lookup[0]->printHeaders(out); }
normalize(lookup, out);
for (int i = 0; i < lookup.size(); i++) { delete lookup[i]; }
if(allLines == 1 || labels.count(lookupFloat[0]->getLabel()) == 1){
m->mothurOut(lookupFloat[0]->getLabel()); m->mothurOutEndLine();
+
+ if (!m->printedHeaders) { lookupFloat[0]->printHeaders(out); }
normalize(lookupFloat, out);
processedLabels.insert(lookupFloat[0]->getLabel());
for (int i = 0; i < lookupFloat.size(); i++) { delete lookupFloat[i]; }
lookupFloat = input->getSharedRAbundFloatVectors(lastLabel);
- m->mothurOut(lookupFloat[0]->getLabel()); m->mothurOutEndLine();
+ m->mothurOut(lookupFloat[0]->getLabel()); m->mothurOutEndLine();
+ if (!m->printedHeaders) { lookupFloat[0]->printHeaders(out); }
normalize(lookupFloat, out);
processedLabels.insert(lookupFloat[0]->getLabel());
m->mothurOut(lookupFloat[0]->getLabel()); m->mothurOutEndLine();
+ if (!m->printedHeaders) { lookupFloat[0]->printHeaders(out); }
normalize(lookupFloat, out);
for (int i = 0; i < lookupFloat.size(); i++) { delete lookupFloat[i]; }