m->mothurOut("The default value for label is all labels in your inputfile.\n");
m->mothurOut("The sorted parameter allows you to indicate you want the output sorted. You can sort by sequence name, bin number, bin size or group. The default is no sorting, but your options are name, number, size, or group.\n");
m->mothurOut("The large parameter allows you to indicate that your distance matrix is too large to fit in RAM. The default value is false.\n");
+ m->mothurOut("The group parameter allows you provide a group file.\n");
m->mothurOut("The groups parameter allows you to indicate that you want representative sequences for each group specified for each OTU, group name should be separated by dashes. ex. groups=A-B-C.\n");
m->mothurOut("The get.oturep command outputs a .fastarep and .rep.names file for each distance you specify, selecting one OTU representative for each bin.\n");
m->mothurOut("If you provide a groupfile, then it also appends the names of the groups present in that bin.\n");
try {
if (pickedGroups) { eliminateZeroOTUS(thisLookUp); }
- int totalNumSeqs = 0;
- if ((scale == "totalgroup") || (scale == "averagegroup")) {
- for (int i = 0; i < thisLookUp.size(); i++) {
- //find total number of sequences in all samples
- totalNumSeqs += thisLookUp[i]->getNumSeqs();
- }
- }
- float averageNumSeqs = totalNumSeqs / (float) thisLookUp.size();
for (int i = 0; i < thisLookUp.size(); i++) {
out << thisLookUp[i]->getLabel() << '\t' << thisLookUp[i]->getGroup() << '\t' << thisLookUp[i]->getNumBins() << '\t';
float relabund = 0.0;
- if (scale == "totalgroup") { //abund of this otu compared to total number of sequence in my group
- relabund = abund / (float) totalNumSeqs;
+ if (scale == "totalgroup") {
+ relabund = abund / (float) thisLookUp[i]->getNumSeqs();
}else if (scale == "totalotu") {
//calc the total in this otu
int totalOtu = 0;
relabund = abund / (float) totalOtu;
}else if (scale == "averagegroup") {
- relabund = abund / (float) averageNumSeqs;
+ relabund = abund / (float) (thisLookUp[i]->getNumSeqs() / (float) thisLookUp[i]->getNumBins());
}else if (scale == "averageotu") {
//calc the total in this otu
int totalOtu = 0;
CXXFLAGS += -O3
-MOTHUR_FILES = "\"/Users/SarahsWork/desktop/Release\""
+MOTHUR_FILES = "\"Enter_your_default_path_here\""
ifeq ($(strip $(MOTHUR_FILES)),"\"Enter_your_default_path_here\"")
else
CXXFLAGS += -DMOTHUR_FILES=${MOTHUR_FILES}
float overlapDistance;
inOverlap >> firstName >> secondName >> overlapDistance; gobble(inOverlap);
- map<string,int>::iterator itA = nameMap->find(firstName);
- map<string,int>::iterator itB = nameMap->find(secondName);
- if(itA == nameMap->end()){ cerr << "AAError: Sequence '" << firstName << "' was not found in the names file, please correct\n"; exit(1); }
- if(itB == nameMap->end()){ cerr << "ABError: Sequence '" << secondName << "' was not found in the names file, please correct\n"; exit(1); }
+ //commented out because we check this in readblast already
+ //map<string,int>::iterator itA = nameMap->find(firstName);
+ //map<string,int>::iterator itB = nameMap->find(secondName);
+ //if(itA == nameMap->end()){ cerr << "AAError: Sequence '" << firstName << "' was not found in the names file, please correct\n"; exit(1); }
+ //if(itB == nameMap->end()){ cerr << "ABError: Sequence '" << secondName << "' was not found in the names file, please correct\n"; exit(1); }
- overlapNode.seq1 = itA->second;
- overlapNode.seq2 = itB->second;
+ //overlapNode.seq1 = itA->second;
+ //overlapNode.seq2 = itB->second;
+ overlapNode.seq1 = nameMap->get(firstName);
+ overlapNode.seq2 = nameMap->get(secondName);
overlapNode.dist = overlapDistance;
}else { inOverlap.close(); break; }
}