/******************************************************/
void ErrorCheck::refresh() {
- columnfile = globaldata->getColumnFile();
- phylipfile = globaldata->getPhylipFile();
- listfile = globaldata->getListFile();
- rabundfile = globaldata->getRabundFile();
- sabundfile = globaldata->getSabundFile();
- namefile = globaldata->getNameFile();
- groupfile = globaldata->getGroupFile();
- orderfile = globaldata->getOrderFile();
- fastafile = globaldata->getFastaFile();
- treefile = globaldata->getTreeFile();
- cutoff = globaldata->getCutOff();
- format = globaldata->getFormat();
- method = globaldata->getMethod();
- randomtree = globaldata->getRandomTree();
- sharedfile = globaldata->getSharedFile();
+ //columnfile = globaldata->getColumnFile();
+ //phylipfile = globaldata->getPhylipFile();
+ //listfile = globaldata->getListFile();
+ //rabundfile = globaldata->getRabundFile();
+ //sabundfile = globaldata->getSabundFile();
+ //namefile = globaldata->getNameFile();
+ //groupfile = globaldata->getGroupFile();
+ //orderfile = globaldata->getOrderFile();
+ //fastafile = globaldata->getFastaFile();
+ //treefile = globaldata->getTreeFile();
+ //cutoff = globaldata->getCutOff();
+ //format = globaldata->getFormat();
+ //method = globaldata->getMethod();
+ //randomtree = globaldata->getRandomTree();
+ //sharedfile = globaldata->getSharedFile();
}
/*******************************************************/
//is it a valid parameter
if (validParameter->isValidParameter(parameter, commandName, value) != true) { return false; }
-
-
if (parameter == "phylip" ) { phylipfile = value; }
if (parameter == "column" ) { columnfile = value; }
if (parameter == "abund" ) { abund = value; }
if (parameter == "random" ) { randomtree = value; }
if (parameter == "sorted" ) { sorted = value; }
+ if (parameter == "scale" ) { scale = value; }
+
}
//gets the last parameter and value
if (parameter == "random" ) { randomtree = value; }
if (parameter == "abund" ) { abund = value; }
if (parameter == "sorted" ) { sorted = value; }
+ if (parameter == "scale" ) { scale = value; }
}
}
validateReadFiles();
}
- //are you trying to cluster before you have read something
+ //are you trying to cluster before you have read something
if (((commandName == "cluster") && (globaldata->gSparseMatrix == NULL)) ||
((commandName == "cluster") && (globaldata->gListVector == NULL))) {
cout << "Before you use the cluster command, you first need to read in a distance matrix." << endl;
}
}
- if ((commandName == "unifrac.weighted") || (commandName == "unifrac.unweighted")) {
+ if ((commandName == "unifrac.weighted") || (commandName == "unifrac.unweighted") || (commandName == "concensus")) {
if (globaldata->gTree.size() == 0) {//no trees were read
- cout << "You must execute the read.tree command, before you may execute the unifrac.weighted or unifrac.unweighted command." << endl; return false; }
+ cout << "You must execute the read.tree command, before you may execute the unifrac.weighted, unifrac.unweighted or concensus command." << endl; return false; }
}
//check for valid method
if ((globaldata->getListFile() == "") && (globaldata->getRabundFile() == "") && (globaldata->getSabundFile() == "")) { cout << "You must read a list, sabund or rabund before you can use the collect.single, rarefaction.single or summary.single commands." << endl; return false; }
}
- if ((commandName == "collect.shared") || (commandName == "rarefaction.shared") || (commandName == "summary.shared") ){
+ if ((commandName == "collect.shared") || (commandName == "rarefaction.shared") || (commandName == "summary.shared") || (commandName == "tree.shared") || (commandName == "bootstrap.shared")){
if (globaldata->getSharedFile() == "") {
- if (globaldata->getListFile() == "") { cout << "You must read a list and a group, or a shared before you can use the collect.shared, rarefaction.shared or summary.shared commands." << endl; return false; }
- else if (globaldata->getGroupFile() == "") { cout << "You must read a list and a group, or a shared before you can use the collect.shared, rarefaction.shared or summary.shared commands." << endl; return false; }
+ if (globaldata->getListFile() == "") { cout << "You must read a list and a group, or a shared before you can use the collect.shared, rarefaction.shared, summary.shared, tree.shared or bootstrap.shared commands." << endl; return false; }
+ else if (globaldata->getGroupFile() == "") { cout << "You must read a list and a group, or a shared before you can use the collect.shared, rarefaction.shared, summary.shared, tree.shared or bootstrap.shared commands." << endl; return false; }
}
}
if ((globaldata->getListFile() == "")) { cout << "You must read a list file before you can use the bin.seqs command." << endl; return false; }
validateBinFiles();
}
+
+ if ((commandName == "get.oturep")) {
+ if ((globaldata->gSparseMatrix == NULL) || (globaldata->gListVector == NULL)) {
+ cout << "Before you use the get.oturep command, you first need to read in a distance matrix." << endl;
+ errorFree = false;
+ }
+ if (listfile == "") { cout << "list is a required parameter for the get.oturep command." << endl; errorFree = false; }
+ validateBinFiles();
+ }
+
return errorFree;
}
int ableToOpen;
if (fastafile == "") {
- cout << "fasta is a required parameter for bin.seqs." << endl; errorFree = false;
+ cout << "fasta is a required parameter for bin.seqs and get.oturep commands." << endl; errorFree = false;
}else if (fastafile != "") {
//is it a valid filename'
ableToOpen = openInputFile(fastafile, filehandle);
filehandle.close();
//unable to open
if (ableToOpen == 1) { errorFree = false; }
+ }else if (listfile != "") {
+ //is it a valid filename'
+ ableToOpen = openInputFile(listfile, filehandle);
+ filehandle.close();
+ //unable to open
+ if (ableToOpen == 1) { errorFree = false; }
}else if (globaldata->getNameFile() != "") {
//is it a valid filename'
ifstream filehandle;