#include "memchord.h"
#include "memeuclidean.h"
#include "mempearson.h"
+#include "sharedjsd.h"
+#include "sharedrjsd.h"
// aka. dist.shared()
vector<string> setParameters();
string getCommandName() { return "dist.shared"; }
string getCommandCategory() { return "OTU-Based Approaches"; }
+
string getHelpString();
+ string getOutputPattern(string);
string getCitation() { return "http://www.mothur.org/wiki/Dist.shared"; }
string getDescription() { return "generate a distance matrix that describes the dissimilarity among multiple groups"; }
bool abort, allLines, subsample;
set<string> labels; //holds labels to be used
- string outputFile, calc, groups, label, outputDir;
+ string outputFile, calc, groups, label, outputDir, mode;
vector<string> Estimators, Groups, outputNames; //holds estimators to be used
int process(vector<SharedRAbundVector*>, string, string);
int driver(vector<SharedRAbundVector*>, int, int, vector< vector<seqDist> >&);
unsigned long long start;
unsigned long long end;
MothurOut* m;
+ int count;
distSharedData(){}
distSharedData(MothurOut* mout, unsigned long long st, unsigned long long en, vector<string> est, vector<SharedRAbundVector*> lu) {
end = en;
Estimators = est;
thisLookup = lu;
+ count = 0;
}
};
/**************************************************************************************************/
matrixCalculators.push_back(new MemEuclidean());
}else if (pDataArray->Estimators[i] == "mempearson") {
matrixCalculators.push_back(new MemPearson());
+ }else if (pDataArray->Estimators[i] == "jsd") {
+ matrixCalculators.push_back(new JSD());
+ }else if (pDataArray->Estimators[i] == "rjsd") {
+ matrixCalculators.push_back(new RJSD());
}
+
}
}
vector<SharedRAbundVector*> subset;
for (int k = pDataArray->start; k < pDataArray->end; k++) { // pass cdd each set of groups to compare
-
+ pDataArray->count++;
for (int l = 0; l < k; l++) {
if (k != l) { //we dont need to similiarity of a groups to itself