CommandParameter pdups("dups", "Boolean", "", "T", "", "", "",false,false); parameters.push_back(pdups);
CommandParameter pinputdir("inputdir", "String", "", "", "", "", "",false,false); parameters.push_back(pinputdir);
CommandParameter poutputdir("outputdir", "String", "", "", "", "", "",false,false); parameters.push_back(poutputdir);
-
+ CommandParameter paccnos2("accnos2", "InputTypes", "", "", "none", "none", "none",false,true); parameters.push_back(paccnos2);
+
vector<string> myArray;
for (int i = 0; i < parameters.size(); i++) { myArray.push_back(parameters[i].name); }
return myArray;
m->mothurOut("You have no valid accnos file and accnos is required."); m->mothurOutEndLine();
abort = true;
}
- }
+ }else { m->setAccnosFile(accnosfile); }
if (accnosfile2 == "not found") { accnosfile2 = ""; }
fastafile = validParameter.validFile(parameters, "fasta", true);
if (fastafile == "not open") { abort = true; }
- else if (fastafile == "not found") { fastafile = ""; }
+ else if (fastafile == "not found") { fastafile = ""; }
+ else { m->setFastaFile(fastafile); }
namefile = validParameter.validFile(parameters, "name", true);
if (namefile == "not open") { abort = true; }
else if (namefile == "not found") { namefile = ""; }
+ else { m->setNameFile(namefile); }
groupfile = validParameter.validFile(parameters, "group", true);
if (groupfile == "not open") { abort = true; }
else if (groupfile == "not found") { groupfile = ""; }
+ else { m->setGroupFile(groupfile); }
alignfile = validParameter.validFile(parameters, "alignreport", true);
if (alignfile == "not open") { abort = true; }
listfile = validParameter.validFile(parameters, "list", true);
if (listfile == "not open") { abort = true; }
else if (listfile == "not found") { listfile = ""; }
+ else { m->setListFile(listfile); }
taxfile = validParameter.validFile(parameters, "taxonomy", true);
if (taxfile == "not open") { abort = true; }
else if (taxfile == "not found") { taxfile = ""; }
+ else { m->setTaxonomyFile(taxfile); }
qualfile = validParameter.validFile(parameters, "qfile", true);
if (qualfile == "not open") { abort = true; }
else if (qualfile == "not found") { qualfile = ""; }
+ else { m->setQualFile(qualfile); }
+
+ accnosfile2 = validParameter.validFile(parameters, "accnos2", true);
+ if (accnosfile2 == "not open") { abort = true; }
+ else if (accnosfile2 == "not found") { accnosfile2 = ""; }
+
string usedDups = "true";
string temp = validParameter.validFile(parameters, "dups", false); if (temp == "not found") { temp = "true"; usedDups = ""; }
in >> name;
if (namesAccnos.count(name) == 0){ //name unique to accnos2
- namesAccnos2.insert(name);
+ int pos = name.find_last_of('_');
+ string tempName = name;
+ if (pos != string::npos) { tempName = tempName.substr(pos+1); cout << tempName << endl; }
+ if (namesAccnos.count(tempName) == 0){
+ namesAccnos2.insert(name);
+ }else { //you are in both so erase
+ namesAccnos.erase(name);
+ namesDups.insert(name);
+ }
}else { //you are in both so erase
namesAccnos.erase(name);
namesDups.insert(name);