#include "listvector.hpp"
#include "cluster.hpp"
#include "sparsematrix.hpp"
+#include <cfloat>
//**********************************************************************************************************************
// ...at some point should added some additional type checking...
string temp;
temp = validParameter.validFile(parameters, "lookup", true);
- if (temp == "not found") { lookupFileName = "LookUp_E123.pat"; }
+ if (temp == "not found") { lookupFileName = "LookUp_Titanium.pat"; }
else if(temp == "not open") { abort = true; }
else { lookupFileName = temp; }
cout << "\nGetting preliminary data..." << endl;
getSingleLookUp();
getJointLookUp();
-
+
vector<string> flowFileVector;
if(flowFilesFileName != "not found"){
string fName;
getSingleLookUp();
getJointLookUp();
-
-
+
vector<string> flowFileVector;
if(flowFilesFileName != "not found"){
string fName;
double clusterCutoff = cutoff;
while (matrix->getSmallDist() <= clusterCutoff && matrix->getNNodes() > 0){
cluster->update(clusterCutoff);
- float dist = matrix->getSmallDist();
}
list->setLabel(toString(cutoff));
for(int j=0;j<nSeqsPerOTU[i];j++){
int index = cumNumSeqs[i] + j;
int nI = seqIndex[index];
- int nIU = mapSeqToUnique[nI];
double tauValue = singleTau[seqNumber[index]];
for(int j=0;j<nSeqsPerOTU[i];j++){
int index = cumNumSeqs[i] + j;
- int nI = seqIndex[index];
double tauValue = singleTau[seqNumber[index]];
weight[i] += tauValue;
}
try{
- vector<double> P(numSeqs, 0);
+ vector<long double> P(numSeqs, 0);
int effNumOTUs = 0;
for(int i=0;i<numOTUs;i++){
}
}
+ string hold;
for(int i=0;i<numOTUs;i++){
for(int j=0;j<nSeqsPerOTU[i];j++){
int index = cumNumSeqs[i] + j;
P[nI] += weight[i] * exp(-singleDist * sigma);
}
}
-
double nLL = 0.00;
for(int i=0;i<numSeqs;i++){
+ if(P[i] == 0){ P[i] = DBL_EPSILON; }
+
nLL += -log(P[i]);
}
nLL = nLL -(double)numSeqs * log(sigma);
-
+
return nLL;
}
catch(exception& e) {
vector<vector<int> > qualities(numOTUs);
vector<double> pr(HOMOPS, 0);
- int index = 0;
for(int i=0;i<numOTUs;i++){
int index = 0;