]> git.donarmstrong.com Git - mothur.git/commitdiff
1.23.0
authorwestcott <westcott>
Mon, 9 Jan 2012 13:39:57 +0000 (13:39 +0000)
committerwestcott <westcott>
Mon, 9 Jan 2012 13:39:57 +0000 (13:39 +0000)
Mothur.xcodeproj/project.pbxproj
aligncommand.h
chimerauchimecommand.h
makegroupcommand.cpp
preclustercommand.cpp
sharedordervector.cpp
sharedrabundvector.cpp
shhhercommand.cpp

index 3a37569346033b002f50264181406079e0c30179..c7c7cee1ad0c4a9ad5b1e9bfb02ba09c6db0b3fb 100644 (file)
                        outputFiles = (
                                "$(TARGET_BUILD_DIR)/$(INPUT_FILE_BASE).o",
                        );
-                       script = "gfortran -g -m64 -c ${PROJECT_DIR}/${INPUT_FILE_NAME} -o ${TARGET_BUILD_DIR}/${INPUT_FILE_BASE}.o";
+                       script = "/usr/local/gfortran/bin/gfortran -g -m64 -c ${PROJECT_DIR}/${INPUT_FILE_NAME} -o ${TARGET_BUILD_DIR}/${INPUT_FILE_BASE}.o";
                };
 /* End PBXBuildRule section */
 
                        };
                        buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "Mothur" */;
                        compatibilityVersion = "Xcode 3.1";
-                       developmentRegion = English;
                        hasScannedForEncodings = 1;
                        knownRegions = (
                                English,
index 7f5122a66039c4dcd90c338dad078d11ce81e601..d42369520f127a8ba06c1c86ae9e9929c20f4fac 100644 (file)
@@ -147,7 +147,7 @@ static DWORD WINAPI MyAlignThreadFunction(LPVOID lpParam){
                
                pDataArray->count = pDataArray->end;
                
-               AlignmentDB* templateDB = new AlignmentDB(templateFileName, pDataArray->search, pDataArray->kmerSize, pDataArray->gapOpen, pDataArray->gapExtend, pDataArray->match, pDataArray->misMatch, pDataArray->threadID);
+               AlignmentDB* templateDB = new AlignmentDB(pDataArray->templateFileName, pDataArray->search, pDataArray->kmerSize, pDataArray->gapOpen, pDataArray->gapExtend, pDataArray->match, pDataArray->misMatch, pDataArray->threadID);
                
                //moved this into driver to avoid deep copies in windows paralellized version
                Alignment* alignment;
index 45dd8a8ef332f634564c3911b18b96ae641a49dc..b401ae85ae3c22e6d587fd27e649d27db9c6d939 100644 (file)
@@ -149,9 +149,9 @@ static DWORD WINAPI MyUchimeThreadFunction(LPVOID lpParam){
        
        try {
                
-               pDataArray->outputFName = pDataArray->m->getFullPathName(outputFName);
-               pDataArray->filename = pDataArray->m->getFullPathName(filename);
-               pDataArray->alns = pDataArray->m->getFullPathName(alns);
+               pDataArray->outputFName = pDataArray->m->getFullPathName(pDataArray->outputFName);
+               pDataArray->filename = pDataArray->m->getFullPathName(pDataArray->filename);
+               pDataArray->alns = pDataArray->m->getFullPathName(pDataArray->alns);
                
                //clears files
                ofstream out, out1, out2;
@@ -330,17 +330,6 @@ static DWORD WINAPI MyUchimeThreadFunction(LPVOID lpParam){
                                cPara.push_back(tempIdsmoothwindow);
                        }
                        
-                       /*if (useMinsmoothid) {
-                        char* tempminsmoothid = new char[14]; 
-                        //strcpy(tempminsmoothid, "--minsmoothid"); 
-                        *tempminsmoothid = '\0'; strncat(tempminsmoothid, "--minsmoothid", 13);
-                        cPara.push_back(tempminsmoothid);
-                        char* tempMinsmoothid = new char[minsmoothid.length()+1];
-                        *tempMinsmoothid = '\0'; strncat(tempMinsmoothid, minsmoothid.c_str(), minsmoothid.length());
-                        //strcpy(tempMinsmoothid, minsmoothid.c_str());
-                        cPara.push_back(tempMinsmoothid);
-                        }*/
-                       
                        if (pDataArray->useMaxp) {
                                char* tempmaxp = new char[7]; 
                                //strcpy(tempmaxp, "--maxp"); 
@@ -498,9 +487,9 @@ static DWORD WINAPI MyUchimeSeqsThreadFunction(LPVOID lpParam){
        
        try {
                
-               pDataArray->outputFName = pDataArray->m->getFullPathName(outputFName);
-               pDataArray->filename = pDataArray->m->getFullPathName(filename);
-               pDataArray->alns = pDataArray->m->getFullPathName(alns);
+               pDataArray->outputFName = pDataArray->m->getFullPathName(pDataArray->outputFName);
+               pDataArray->filename = pDataArray->m->getFullPathName(pDataArray->filename);
+               pDataArray->alns = pDataArray->m->getFullPathName(pDataArray->alns);
                
                int totalSeqs = 0;
                int numChimeras = 0;
index e32af2152e1bd3d420a0a94dac738a97c19c24af..0add62e03a99270babfde920acca61a65dcdc2b3 100644 (file)
@@ -16,6 +16,7 @@ vector<string> MakeGroupCommand::setParameters(){
        try {
                CommandParameter pfasta("fasta", "InputTypes", "", "", "none", "none", "none",false,true); parameters.push_back(pfasta);
                CommandParameter pgroups("groups", "String", "", "", "", "", "",false,false); parameters.push_back(pgroups);
+               CommandParameter poutput("output", "String", "", "", "", "", "",false,false); parameters.push_back(poutput);
                CommandParameter pinputdir("inputdir", "String", "", "", "", "", "",false,false); parameters.push_back(pinputdir);
                CommandParameter poutputdir("outputdir", "String", "", "", "", "", "",false,false); parameters.push_back(poutputdir);
                
index cac80b8d775d2e5bd4810198e69a2d5ad625c04d..21de0344e7c856bb83105abe9b51cf8fe5b4a8ec 100644 (file)
@@ -372,9 +372,9 @@ int PreClusterCommand::createProcessesGroups(SequenceParser* parser, string newF
                
                //append output files
                for(int i=0;i<processIDS.size();i++){
-                       newFName = m->getFullPathName(".\\" + newFName);
-                       newNName = m->getFullPathName(".\\" + newNName);
-                       cout << newFName << endl;
+                       //newFName = m->getFullPathName(".\\" + newFName);
+                       //newNName = m->getFullPathName(".\\" + newNName);
+                       
                        m->appendFiles((newFName + toString(processIDS[i]) + ".temp"), newFName);
                        m->mothurRemove((newFName + toString(processIDS[i]) + ".temp"));
                        
index ca26362672e130364f66ed8bd005ae8fa9d68d4c..5231b3cd654ff6f1321bbc12f2cf4fe602a30553 100644 (file)
@@ -38,9 +38,45 @@ SharedOrderVector::SharedOrderVector(ifstream& f) : DataVector() {  //reads in a
                individual newguy;
                
                //read in first row since you know there is at least 1 group.
-               f >> label >> groupN >> num;
+               //are we at the beginning of the file??
+               if (m->saveNextLabel == "") {  
+                       f >> label; 
+                       
+                       //is this a shared file that has headers
+                       if (label == "label") { 
+                               //gets "group"
+                               f >> label; m->gobble(f);
+                               
+                               //gets "numOtus"
+                               f >> label; m->gobble(f);
+                               
+                               //eat rest of line
+                               label = m->getline(f); m->gobble(f);
+                               
+                               //parse labels to save
+                               istringstream iStringStream(label);
+                               m->binLabelsInFile.clear();
+                               while(!iStringStream.eof()){
+                                       if (m->control_pressed) { break; }
+                                       string temp;
+                                       iStringStream >> temp;  m->gobble(iStringStream);
+                                       
+                                       m->binLabelsInFile.push_back(temp);
+                               }
+                               
+                               f >> label;
+                       }
+               }else { label = m->saveNextLabel; }
+               
+               //reset labels, currentLabels may have gotten changed as otus were eliminated because of group choices or sampling
+               m->currentBinLabels = m->binLabelsInFile;
+               
+               //read in first row since you know there is at least 1 group.
+               f >> groupN >> num;
+               
                holdLabel = label;
                
+               
                vector<string> allGroups;
                //save group in groupmap
                allGroups.push_back(groupN);
@@ -58,7 +94,7 @@ SharedOrderVector::SharedOrderVector(ifstream& f) : DataVector() {  //reads in a
                
                m->gobble(f); 
                
-               if (f.eof() != true) { f >> nextLabel; }
+               if (!(f.eof())) { f >> nextLabel; }
                
                //read the rest of the groups info in
                while ((nextLabel == holdLabel) && (f.eof() != true)) {
@@ -86,9 +122,8 @@ SharedOrderVector::SharedOrderVector(ifstream& f) : DataVector() {  //reads in a
 
                }
                
-               //put file pointer back since you are now at a new distance label
-               for (int i = 0; i < nextLabel.length(); i++) { f.unget();  }
-               
+               m->saveNextLabel = nextLabel;
+                       
                groupmap->setNamesOfGroups(allGroups);
                m->setAllGroups(allGroups);
                
index 4a0e5e8f09c59c18c419353cbecbdfecae2c1ba9..5ad4b2d7e70d2620c037b498a66b4d16cef62371 100644 (file)
@@ -104,6 +104,7 @@ SharedRAbundVector::SharedRAbundVector(ifstream& f) : DataVector(), maxRank(0),
                
                //read in first row since you know there is at least 1 group.
                f >> groupN >> num;
+               
                holdLabel = label;
                
                //add new vector to lookup
index e266b98837f4a787975319c7e098904cae552209..40a4c8499a599207b56831c91e6f0f41c023eb2c 100644 (file)
@@ -2150,7 +2150,9 @@ void ShhherCommand::setOTUs(){
 void ShhherCommand::writeQualities(vector<int> otuCounts){
        
        try {
-               string qualityFileName = flowFileName.substr(0,flowFileName.find_last_of('.')) + ".shhh.qual";
+               string thisOutputDir = outputDir;
+               if (outputDir == "") {  thisOutputDir += m->hasPath(flowFileName);  }
+               string qualityFileName = thisOutputDir + flowFileName.substr(0,flowFileName.find_last_of('.')) + ".shhh.qual";
 
                ofstream qualityFile;
                m->openOutputFile(qualityFileName, qualityFile);
@@ -2255,8 +2257,9 @@ void ShhherCommand::writeQualities(vector<int> otuCounts){
 
 void ShhherCommand::writeSequences(vector<int> otuCounts){
        try {
-               
-               string fastaFileName = flowFileName.substr(0,flowFileName.find_last_of('.')) + ".shhh.fasta";
+               string thisOutputDir = outputDir;
+               if (outputDir == "") {  thisOutputDir += m->hasPath(flowFileName);  }
+               string fastaFileName = thisOutputDir + flowFileName.substr(0,flowFileName.find_last_of('.')) + ".shhh.fasta";
                ofstream fastaFile;
                m->openOutputFile(fastaFileName, fastaFile);
                
@@ -2302,7 +2305,9 @@ void ShhherCommand::writeSequences(vector<int> otuCounts){
 
 void ShhherCommand::writeNames(vector<int> otuCounts){
        try {
-               string nameFileName = flowFileName.substr(0,flowFileName.find_last_of('.')) + ".shhh.names";
+               string thisOutputDir = outputDir;
+               if (outputDir == "") {  thisOutputDir += m->hasPath(flowFileName);  }
+               string nameFileName = thisOutputDir + flowFileName.substr(0,flowFileName.find_last_of('.')) + ".shhh.names";
                ofstream nameFile;
                m->openOutputFile(nameFileName, nameFile);
                
@@ -2338,7 +2343,9 @@ void ShhherCommand::writeNames(vector<int> otuCounts){
 
 void ShhherCommand::writeGroups(){
        try {
-               string fileRoot = flowFileName.substr(0,flowFileName.find_last_of('.'));
+               string thisOutputDir = outputDir;
+               if (outputDir == "") {  thisOutputDir += m->hasPath(flowFileName);  }
+               string fileRoot = thisOutputDir + flowFileName.substr(0,flowFileName.find_last_of('.'));
                string groupFileName = fileRoot + ".shhh.groups";
                ofstream groupFile;
                m->openOutputFile(groupFileName, groupFile);
@@ -2361,7 +2368,9 @@ void ShhherCommand::writeGroups(){
 
 void ShhherCommand::writeClusters(vector<int> otuCounts){
        try {
-               string otuCountsFileName = flowFileName.substr(0,flowFileName.find_last_of('.')) + ".shhh.counts";
+               string thisOutputDir = outputDir;
+               if (outputDir == "") {  thisOutputDir += m->hasPath(flowFileName);  }
+               string otuCountsFileName = thisOutputDir + flowFileName.substr(0,flowFileName.find_last_of('.')) + ".shhh.counts";
                ofstream otuCountsFile;
                m->openOutputFile(otuCountsFileName, otuCountsFile);