//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();
else { m->mothurOut("You have no current fastafile and the fasta parameter is required."); m->mothurOutEndLine(); abort = true; }
}
else if (fastafile == "not open") { abort = true; }
+ else { m->setFastaFile(fastafile); }
listfile = validParameter.validFile(parameters, "list", true);
if (listfile == "not found") {
else { m->mothurOut("You have no current list file and the list parameter is required."); m->mothurOutEndLine(); abort = true; }
}
else if (listfile == "not open") { abort = true; }
+ else { m->setListFile(listfile); }
phylipfile = validParameter.validFile(parameters, "phylip", true);
if (phylipfile == "not found") { phylipfile = ""; }
else if (phylipfile == "not open") { abort = true; }
- else { distFile = phylipfile; format = "phylip"; }
+ else { distFile = phylipfile; format = "phylip"; m->setPhylipFile(phylipfile); }
columnfile = validParameter.validFile(parameters, "column", true);
if (columnfile == "not found") { columnfile = ""; }
else if (columnfile == "not open") { abort = true; }
- else { distFile = columnfile; format = "column"; }
+ else { distFile = columnfile; format = "column"; m->setColumnFile(columnfile); }
namefile = validParameter.validFile(parameters, "name", true);
if (namefile == "not open") { abort = true; }
else if (namefile == "not found") { namefile = ""; }
+ else { m->setNameFile(namefile); }
if ((phylipfile == "") && (columnfile == "")) { //is there are current file available for either of these?
//give priority to column, then phylip
groupfile = validParameter.validFile(parameters, "group", true);
if (groupfile == "not open") { groupfile = ""; abort = true; }
else if (groupfile == "not found") { groupfile = ""; }
-
+ else { m->setGroupFile(groupfile); }
+
sorted = validParameter.validFile(parameters, "sorted", false); if (sorted == "not found"){ sorted = ""; }
if (sorted == "none") { sorted=""; }
if ((sorted != "") && (sorted != "name") && (sorted != "bin") && (sorted != "size") && (sorted != "group")) {
//openfile for getMap to use
m->openInputFile(distFile, inRow);
- if (m->control_pressed) { inRow.close(); remove(distFile.c_str()); return 0; }
+ if (m->control_pressed) { inRow.close(); m->mothurRemove(distFile); return 0; }
}
if (m->control_pressed) {
- if (large) { inRow.close(); remove(distFile.c_str()); }
+ if (large) { inRow.close(); m->mothurRemove(distFile); }
return 0;
}
set<string> userLabels = labels;
if (m->control_pressed) {
- if (large) { inRow.close(); remove(distFile.c_str()); }
+ if (large) { inRow.close(); m->mothurRemove(distFile); }
delete input; delete list; return 0;
}
if (error == 1) { return 0; } //there is an error in hte input files, abort command
if (m->control_pressed) {
- if (large) { inRow.close(); remove(distFile.c_str()); }
- for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } outputTypes.clear();
+ if (large) { inRow.close(); m->mothurRemove(distFile); }
+ for (int i = 0; i < outputNames.size(); i++) { m->mothurRemove(outputNames[i]); } outputTypes.clear();
delete input; delete list; return 0;
}
if (error == 1) { return 0; } //there is an error in hte input files, abort command
if (m->control_pressed) {
- if (large) { inRow.close(); remove(distFile.c_str()); }
- for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } outputTypes.clear();
+ if (large) { inRow.close(); m->mothurRemove(distFile); }
+ for (int i = 0; i < outputNames.size(); i++) { m->mothurRemove(outputNames[i]); } outputTypes.clear();
delete input; delete list; return 0;
}
if (error == 1) { return 0; } //there is an error in hte input files, abort command
if (m->control_pressed) {
- if (large) { inRow.close(); remove(distFile.c_str()); }
- for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } outputTypes.clear();
+ if (large) { inRow.close(); m->mothurRemove(distFile); }
+ for (int i = 0; i < outputNames.size(); i++) { m->mothurRemove(outputNames[i]); } outputTypes.clear();
delete input; delete list; return 0;
}
}
//close and remove formatted matrix file
if (large) {
inRow.close();
- remove(distFile.c_str());
+ m->mothurRemove(distFile);
}
delete input;
out.close();
out2.close();
- remove(filename.c_str());
+ m->mothurRemove(filename);
rename(tempNameFile.c_str(), filename.c_str());
return 0;