From: westcott Date: Fri, 23 Jul 2010 14:27:45 +0000 (+0000) Subject: 1.12.0 X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=commitdiff_plain;h=ccaad73f103d8f105264d65491ce19e5df80477d 1.12.0 --- diff --git a/getoturepcommand.cpp b/getoturepcommand.cpp index b3bfd42..89c62fa 100644 --- a/getoturepcommand.cpp +++ b/getoturepcommand.cpp @@ -214,6 +214,7 @@ void GetOTURepCommand::help(){ 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"); diff --git a/getrelabundcommand.cpp b/getrelabundcommand.cpp index 4d155f2..90d084f 100644 --- a/getrelabundcommand.cpp +++ b/getrelabundcommand.cpp @@ -226,14 +226,6 @@ int GetRelAbundCommand::getRelAbundance(vector& thisLookUp, 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'; @@ -246,8 +238,8 @@ int GetRelAbundCommand::getRelAbundance(vector& thisLookUp, 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; @@ -255,7 +247,7 @@ int GetRelAbundCommand::getRelAbundance(vector& thisLookUp, 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; diff --git a/makefile b/makefile index 974890d..3f0893c 100644 --- a/makefile +++ b/makefile @@ -13,7 +13,7 @@ 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} diff --git a/mgclustercommand.cpp b/mgclustercommand.cpp index 269e088..9a1ac21 100644 --- a/mgclustercommand.cpp +++ b/mgclustercommand.cpp @@ -500,13 +500,16 @@ ListVector* MGClusterCommand::mergeOPFs(map binInfo, float dist){ float overlapDistance; inOverlap >> firstName >> secondName >> overlapDistance; gobble(inOverlap); - map::iterator itA = nameMap->find(firstName); - map::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::iterator itA = nameMap->find(firstName); + //map::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; } }