]> git.donarmstrong.com Git - mothur.git/commitdiff
fixed project
authorwestcott <westcott>
Thu, 27 May 2010 14:21:04 +0000 (14:21 +0000)
committerwestcott <westcott>
Thu, 27 May 2010 14:21:04 +0000 (14:21 +0000)
Mothur.xcodeproj/project.pbxproj
clustersplitcommand.cpp
commandfactory.cpp
trimseqscommand.cpp

index 6e97c882128e5579df63dacbc915dcda9c66c2e9..9a61c6caf688ba4dace1673e9d4a26e4be656e16 100644 (file)
@@ -9,6 +9,12 @@
 /* Begin PBXFileReference section */
                A703FE931194645F002C397E /* makegroupcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = makegroupcommand.h; sourceTree = SOURCE_ROOT; };
                A703FE941194645F002C397E /* makegroupcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = makegroupcommand.cpp; sourceTree = SOURCE_ROOT; };
+               A71D924211AEB42400D00CBC /* clustersplitcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = clustersplitcommand.cpp; sourceTree = "<group>"; };
+               A71D924311AEB42400D00CBC /* clustersplitcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = clustersplitcommand.h; sourceTree = "<group>"; };
+               A71D924411AEB42400D00CBC /* splitabundcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = splitabundcommand.cpp; sourceTree = "<group>"; };
+               A71D924511AEB42400D00CBC /* splitabundcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = splitabundcommand.h; sourceTree = "<group>"; };
+               A71D924611AEB42400D00CBC /* splitmatrix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = splitmatrix.cpp; sourceTree = "<group>"; };
+               A71D924711AEB42400D00CBC /* splitmatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = splitmatrix.h; sourceTree = "<group>"; };
                A72B3A62118B37FD004B9F8D /* phylodiversitycommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = phylodiversitycommand.h; sourceTree = "<group>"; };
                A72B3A63118B37FD004B9F8D /* phylodiversitycommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = phylodiversitycommand.cpp; sourceTree = "<group>"; };
                A72B3A7B118B4D1B004B9F8D /* phylodiversity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = phylodiversity.h; sourceTree = "<group>"; };
                                A7D215C911996C6E00F13F13 /* clearcutcommand.cpp */,
                                A7DA2021113FECD400BF472F /* clustercommand.cpp */,
                                A7DA2022113FECD400BF472F /* clustercommand.h */,
+                               A71D924311AEB42400D00CBC /* clustersplitcommand.h */,
+                               A71D924211AEB42400D00CBC /* clustersplitcommand.cpp */,
                                A7DA2025113FECD400BF472F /* collectcommand.cpp */,
                                A7DA2026113FECD400BF472F /* collectcommand.h */,
                                A7DA2029113FECD400BF472F /* collectsharedcommand.cpp */,
                                A76C4A1111876BAF0009460B /* setlogfilecommand.cpp */,
                                A7DA2110113FECD400BF472F /* sharedcommand.h */,
                                A7DA210F113FECD400BF472F /* sharedcommand.cpp */,
+                               A71D924511AEB42400D00CBC /* splitabundcommand.h */,
+                               A71D924411AEB42400D00CBC /* splitabundcommand.cpp */,
                                A7DA2155113FECD400BF472F /* summarycommand.h */,
                                A7DA2154113FECD400BF472F /* summarycommand.cpp */,
                                A7DA2159113FECD400BF472F /* summarysharedcommand.h */,
                                A7DA20ED113FECD400BF472F /* readphylip.h */,
                                A7DA20EE113FECD400BF472F /* readtree.cpp */,
                                A7DA20EF113FECD400BF472F /* readtree.h */,
+                               A71D924711AEB42400D00CBC /* splitmatrix.h */,
+                               A71D924611AEB42400D00CBC /* splitmatrix.cpp */,
                        );
                        name = read;
                        sourceTree = "<group>";
index ab8bdcfdfa6ea950745c857efe482352bbc19d4c..e9ab530936af07faf4375b263d82d79e6d30846a 100644 (file)
@@ -93,8 +93,8 @@ ClusterSplitCommand::ClusterSplitCommand(string option)  {
                        if (namefile == "not open") { abort = true; }   
                        else if (namefile == "not found") { namefile = ""; }
                        
-                       if ((phylipfile == "") && (columnfile == "")) { m->mothurOut("When executing a hcluster command you must enter a phylip or a column."); m->mothurOutEndLine(); abort = true; }
-                       else if ((phylipfile != "") && (columnfile != "")) { m->mothurOut("When executing a hcluster command you must enter ONLY ONE of the following: phylip or column."); m->mothurOutEndLine(); abort = true; }
+                       if ((phylipfile == "") && (columnfile == "")) { m->mothurOut("When executing a cluster.split command you must enter a phylip or a column."); m->mothurOutEndLine(); abort = true; }
+                       else if ((phylipfile != "") && (columnfile != "")) { m->mothurOut("When executing a cluster.split command you must enter ONLY ONE of the following: phylip or column."); m->mothurOutEndLine(); abort = true; }
                
                        if (columnfile != "") {
                                if (namefile == "") {  cout << "You need to provide a namefile if you are going to use the column format." << endl; abort = true; }
index 4d2b0ae2b93a6e205ae8b8d24a86dea37c2f6606..a40c432f54d18c19e549e9370253fb52dd9ddfa3 100644 (file)
@@ -164,7 +164,7 @@ CommandFactory::CommandFactory(){
        commands["clearcut"]                    = "clearcut";
        commands["catchall"]                    = "catchall";
        commands["split.abund"]                 = "split.abund";
-       //commands["cluster.split"]             = "cluster.split";
+       commands["cluster.split"]               = "cluster.split";
        commands["classify.seqs"]               = "MPIEnabled"; 
        commands["dist.seqs"]                   = "MPIEnabled";
        commands["filter.seqs"]                 = "MPIEnabled";
@@ -249,7 +249,7 @@ Command* CommandFactory::getCommand(string commandName, string optionString){
                else if(commandName == "tree.shared")                   {   command = new TreeGroupCommand(optionString);                               }
                else if(commandName == "dist.shared")                   {   command = new MatrixOutputCommand(optionString);                    }
                else if(commandName == "bootstrap.shared")              {   command = new BootSharedCommand(optionString);                              }
-               //else if(commandName == "consensus")                   {   command = new ConcensusCommand(optionString);                               }
+               else if(commandName == "consensus")                             {   command = new ConcensusCommand(optionString);                               }
                else if(commandName == "dist.seqs")                             {   command = new DistanceCommand(optionString);                                }
                else if(commandName == "align.seqs")                    {   command = new AlignCommand(optionString);                                   }
                else if(commandName == "summary.seqs")                  {       command = new SeqSummaryCommand(optionString);                          }
@@ -287,7 +287,7 @@ Command* CommandFactory::getCommand(string commandName, string optionString){
                else if(commandName == "clearcut")                              {       command = new ClearcutCommand(optionString);                            }
                else if(commandName == "catchall")                              {       command = new CatchAllCommand(optionString);                            }
                else if(commandName == "split.abund")                   {       command = new SplitAbundCommand(optionString);                          }
-               //else if(commandName == "cluster.split")                       {       command = new ClusterSplitCommand(optionString);                        }
+               else if(commandName == "cluster.split")                 {       command = new ClusterSplitCommand(optionString);                        }
                else                                                                                    {       command = new NoCommand(optionString);                                          }
 
                return command;
index 5f7c9b2199d28960fe1b619a4df2394be3b352a6..7835b7598ae6ddcc76001788d44daf1faf17cfdd 100644 (file)
@@ -999,13 +999,28 @@ bool TrimSeqsCommand::stripQualThreshold(Sequence& seq, ifstream& qFile){
                int seqLength;  // = rawSequence.length();
                string name, temp, temp2;
                
-               qFile >> name >> temp;
+               qFile >> name;
+               
+               //get rest of line
+               temp = "";
+               while (!qFile.eof())    {       
+                       char c = qFile.get(); 
+                       if (c == 10 || c == 13){        break;  }       
+                       else { temp += c; }
+               } 
        
+               int pos = temp.find("length");
+               if (pos == temp.npos) { m->mothurOut("Cannot find length in qfile for " + seq.getName()); m->mothurOutEndLine();  seqLength = 0;  }
+               else {
+                       string tempLength = temp.substr(pos);
+                       istringstream iss (tempLength,istringstream::in);
+                       iss >> temp;
+               }
+               
                splitAtEquals(temp2, temp); //separates length=242, temp=length, temp2=242
                convert(temp, seqLength); //converts string to int
        
                if (name.length() != 0) {  if(name.substr(1) != seq.getName())  {       m->mothurOut("sequence name mismatch btwn fasta and qual file"); m->mothurOutEndLine(); }  } 
-               while (!qFile.eof())    {       char c = qFile.get(); if (c == 10 || c == 13){  break;  }       }
                
                int score;
                int end = seqLength;