}
lookup.clear();
-
+
+ sort(Groups.begin(), Groups.end());
+
//create and initialize vector of sharedvectors, one for each group
for (int i = 0; i < Groups.size(); i++) {
SharedRAbundVector* temp = new SharedRAbundVector(order->getNumBins());
//need to have mode because different commands require different number of valid groups
void SharedUtil::setGroups(vector<string>& userGroups, vector<string>& allGroups) {
try {
+
+ sort(userGroups.begin(), userGroups.end());
+ sort(allGroups.begin(), allGroups.end());
+
if (userGroups.size() != 0) {
if (userGroups[0] != "all") {
//check that groups are valid
//if the user only entered invalid groups
if (userGroups.size() == 0) {
- m->mothurOut("You provided no valid groups. I will run the command using all the groups in your groupfile."); m->mothurOutEndLine();
+ m->mothurOut("You provided no valid groups. I will run the command using all the groups in your file."); m->mothurOutEndLine();
for (int i = 0; i < allGroups.size(); i++) {
userGroups.push_back(allGroups[i]);
}
//need to have mode because different commands require different number of valid groups
void SharedUtil::setGroups(vector<string>& userGroups, vector<string>& allGroups, string mode) {
try {
+
+ sort(userGroups.begin(), userGroups.end());
+ sort(allGroups.begin(), allGroups.end());
+
if (userGroups.size() != 0) {
if (userGroups[0] != "all") {
//check that groups are valid
//for parsimony and unifrac commands you set pairwise groups as well as an allgroups in calc
void SharedUtil::setGroups(vector<string>& userGroups, vector<string>& allGroups, string& label, int& numGroups, string mode){ //globaldata->Groups, your tree or group map, allgroups, mode
try {
+ sort(userGroups.begin(), userGroups.end());
+ sort(allGroups.begin(), allGroups.end());
+
numGroups = 0;
label = "";
/**************************************************************************************/
void SharedUtil::getCombos(vector<string>& groupComb, vector<string> userGroups, int& numComp) { //groupcomb, globaldata->Groups, numcomb
try {
+ sort(userGroups.begin(), userGroups.end());
//calculate number of comparisons i.e. with groups A,B,C = AB, AC, BC = 3;
numComp = 0;
for (int i=0; i< userGroups.size(); i++) {
}
}
-/**************************************************************************************
+/**************************************************************************************/
void SharedUtil::updateGroupIndex(vector<string>& userGroups, map<string, int>& index) {
try {
index.clear();