Permalink
Browse files

Improvements to memory pre.cluster

  • Loading branch information...
1 parent 278f690 commit 13647f87988ddf12f03aa0c74946518c7be80b5b @mothur-westcott mothur-westcott committed Sep 26, 2016
@@ -776,12 +776,12 @@
};
8DD76FAF0486AB0100D96B5E /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
- buildActionMask = 8;
- dstPath = Users/SarahsWork/desktop/debug;
+ buildActionMask = 12;
+ dstPath = "";
dstSubfolderSpec = 16;
files = (
);
- runOnlyForDeploymentPostprocessing = 1;
+ runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
@@ -3342,10 +3342,10 @@
"DYLIB_CURRENT_VERSION[sdk=*]" = "";
GCC_DYNAMIC_NO_PIC = NO;
GCC_MODEL_TUNING = G5;
- GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_OPTIMIZATION_LEVEL = 3;
GCC_PREPROCESSOR_DEFINITIONS = (
- "VERSION=\"\\\"1.37.1\\\"\"",
- "RELEASE_DATE=\"\\\"04/11/2016\\\"\"",
+ "VERSION=\"\\\"1.38.1\\\"\"",
+ "RELEASE_DATE=\"\\\"09/26/2016\\\"\"",
"MOTHUR_FILES=\"\\\"/Users/sarahwestcott/desktop/release\\\"\"",
);
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
@@ -3377,10 +3377,10 @@
DEPLOYMENT_LOCATION = YES;
DSTROOT = TARGET_BUILD_DIR;
GCC_MODEL_TUNING = G5;
- GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_OPTIMIZATION_LEVEL = 3;
GCC_PREPROCESSOR_DEFINITIONS = (
- "VERSION=\"\\\"1.37.1\\\"\"",
- "RELEASE_DATE=\"\\\"04/11/2016\\\"\"",
+ "VERSION=\"\\\"1.38.1\\\"\"",
+ "RELEASE_DATE=\"\\\"09/26/2016\\\"\"",
"MOTHUR_FILES=\"\\\"/Users/sarahwestcott/desktop/release\\\"\"",
);
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
@@ -3458,8 +3458,8 @@
GCC_MODEL_TUNING = "";
GCC_OPTIMIZATION_LEVEL = 3;
GCC_PREPROCESSOR_DEFINITIONS = (
- "VERSION=\"\\\"1.37.6\\\"\"",
- "RELEASE_DATE=\"\\\"06/20/2016\\\"\"",
+ "VERSION=\"\\\"1.38.1\\\"\"",
+ "RELEASE_DATE=\"\\\"09/26/2016\\\"\"",
"MOTHUR_FILES=\"\\\"/Users/sarahwestcott/desktop/release\\\"\"",
);
GCC_VERSION = "";
@@ -38,11 +38,18 @@ struct seqPNode {
/************************************************************/
inline bool comparePriorityTopDown(seqPNode first, seqPNode second) {
if (first.numIdentical > second.numIdentical) { return true; }
+ //else if (first.numIdentical == second.numIdentical) {
+ //if (first.seq.getName() > second.seq.getName()) { return true; }
+ //}
+
return false;
}
/************************************************************/
inline bool comparePriorityDownTop(seqPNode first, seqPNode second) {
if (first.numIdentical < second.numIdentical) { return true; }
+ //else if (first.numIdentical == second.numIdentical) {
+ //if (first.seq.getName() > second.seq.getName()) { return true; }
+ //}
return false;
}
//************************************************************/
@@ -81,7 +88,6 @@ class PreClusterCommand : public Command {
vector<string> outputNames;
int readFASTA();
- void readNameFile();
int calcMisMatches(string, string);
void printData(string, string, string); //fasta filename, names file name
int process(string);
@@ -31,18 +31,18 @@ SequenceCountParser::SequenceCountParser(string countfile, string fastafile) {
ifstream in;
m->openInputFile(fastafile, in);
- int fastaCount = 0;
+ //int fastaCount = 0;
while (!in.eof()) {
if (m->control_pressed) { break; }
Sequence seq(in); m->gobble(in);
- fastaCount++;
- if (m->debug) { if((fastaCount) % 1000 == 0){ m->mothurOut("[DEBUG]: reading seq " + toString(fastaCount) + "\n."); } }
+ //fastaCount++;
+ //if (m->debug) { if((fastaCount) % 1000 == 0){ m->mothurOut("[DEBUG]: reading seq " + toString(fastaCount) + "\n."); } }
if (seq.getName() != "") {
- allSeqsMap[seq.getName()] = seq.getName();
+ //allSeqsMap[seq.getName()] = seq.getName();
vector<int> groupCounts = countTable.getGroupCounts(seq.getName());
for (int i = 0; i < namesOfGroups.size(); i++) {
@@ -91,7 +91,7 @@ SequenceCountParser::SequenceCountParser(string fastafile, CountTable& countTabl
if (seq.getName() != "") {
- allSeqsMap[seq.getName()] = seq.getName();
+ //allSeqsMap[seq.getName()] = seq.getName();
vector<int> groupCounts = countTable.getGroupCounts(seq.getName());
for (int i = 0; i < namesOfGroups.size(); i++) {
@@ -138,6 +138,24 @@ int SequenceCountParser::getNumSeqs(string g){
}
}
/************************************************************/
+map<string, string> SequenceCountParser::getAllSeqsMap(){
+ try {
+ map<string, string > allSeqsMap;
+ map<string, vector<Sequence> >::iterator it;
+
+ for (it = seqs.begin(); it != seqs.end(); it++) {
+ vector<Sequence> temp = it->second;
+ for (int i = 0; i < temp.size(); i++) { allSeqsMap[temp[i].getName()] = temp[i].getName(); }
+ }
+
+ return allSeqsMap;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "SequenceCountParser", "getAllSeqsMap");
+ exit(1);
+ }
+}
+/************************************************************/
vector<Sequence> SequenceCountParser::getSeqs(string g){
try {
map<string, vector<Sequence> >::iterator it;
@@ -41,14 +41,14 @@ class SequenceCountParser {
int getSeqs(string, string, string, string, bool); //prints unique sequences in a specific group to a file - group, filename, uchimeFormat=false, tag (/ab= or ;size=), tag2(/ or ;)
int getCountTable(string, string); //print seqName -> numberRedundantSeqs for a specific group - group, filename
- map<string, string> getAllSeqsMap(){ return allSeqsMap; } //returns map where the key=sequenceName and the value=representativeSequence - helps us remove duplicates after group by group processing
+ map<string, string> getAllSeqsMap(); //returns map where the key=sequenceName and the value=representativeSequence - helps us remove duplicates after group by group processing
private:
CountTable countTable;
MothurOut* m;
int numSeqs;
- map<string, string> allSeqsMap;
+ //map<string, string> allSeqsMap;
map<string, vector<Sequence> > seqs; //a vector for each group
map<string, map<string, int> > countTablePerGroup; //countTable for each group
vector<string> namesOfGroups;

0 comments on commit 13647f8

Please sign in to comment.