From: westcott Date: Thu, 27 May 2010 14:21:04 +0000 (+0000) Subject: fixed project X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=commitdiff_plain;h=44b464979e91c2a1f144ac45ca12c14fcf6579f0 fixed project --- diff --git a/Mothur.xcodeproj/project.pbxproj b/Mothur.xcodeproj/project.pbxproj index 6e97c88..9a61c6c 100644 --- a/Mothur.xcodeproj/project.pbxproj +++ b/Mothur.xcodeproj/project.pbxproj @@ -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 = ""; }; + A71D924311AEB42400D00CBC /* clustersplitcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = clustersplitcommand.h; sourceTree = ""; }; + A71D924411AEB42400D00CBC /* splitabundcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = splitabundcommand.cpp; sourceTree = ""; }; + A71D924511AEB42400D00CBC /* splitabundcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = splitabundcommand.h; sourceTree = ""; }; + A71D924611AEB42400D00CBC /* splitmatrix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = splitmatrix.cpp; sourceTree = ""; }; + A71D924711AEB42400D00CBC /* splitmatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = splitmatrix.h; sourceTree = ""; }; A72B3A62118B37FD004B9F8D /* phylodiversitycommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = phylodiversitycommand.h; sourceTree = ""; }; A72B3A63118B37FD004B9F8D /* phylodiversitycommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = phylodiversitycommand.cpp; sourceTree = ""; }; A72B3A7B118B4D1B004B9F8D /* phylodiversity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = phylodiversity.h; sourceTree = ""; }; @@ -670,6 +676,8 @@ A7D215C911996C6E00F13F13 /* clearcutcommand.cpp */, A7DA2021113FECD400BF472F /* clustercommand.cpp */, A7DA2022113FECD400BF472F /* clustercommand.h */, + A71D924311AEB42400D00CBC /* clustersplitcommand.h */, + A71D924211AEB42400D00CBC /* clustersplitcommand.cpp */, A7DA2025113FECD400BF472F /* collectcommand.cpp */, A7DA2026113FECD400BF472F /* collectcommand.h */, A7DA2029113FECD400BF472F /* collectsharedcommand.cpp */, @@ -764,6 +772,8 @@ A76C4A1111876BAF0009460B /* setlogfilecommand.cpp */, A7DA2110113FECD400BF472F /* sharedcommand.h */, A7DA210F113FECD400BF472F /* sharedcommand.cpp */, + A71D924511AEB42400D00CBC /* splitabundcommand.h */, + A71D924411AEB42400D00CBC /* splitabundcommand.cpp */, A7DA2155113FECD400BF472F /* summarycommand.h */, A7DA2154113FECD400BF472F /* summarycommand.cpp */, A7DA2159113FECD400BF472F /* summarysharedcommand.h */, @@ -915,6 +925,8 @@ A7DA20ED113FECD400BF472F /* readphylip.h */, A7DA20EE113FECD400BF472F /* readtree.cpp */, A7DA20EF113FECD400BF472F /* readtree.h */, + A71D924711AEB42400D00CBC /* splitmatrix.h */, + A71D924611AEB42400D00CBC /* splitmatrix.cpp */, ); name = read; sourceTree = ""; diff --git a/clustersplitcommand.cpp b/clustersplitcommand.cpp index ab8bdcf..e9ab530 100644 --- a/clustersplitcommand.cpp +++ b/clustersplitcommand.cpp @@ -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; } diff --git a/commandfactory.cpp b/commandfactory.cpp index 4d2b0ae..a40c432 100644 --- a/commandfactory.cpp +++ b/commandfactory.cpp @@ -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; diff --git a/trimseqscommand.cpp b/trimseqscommand.cpp index 5f7c9b2..7835b75 100644 --- a/trimseqscommand.cpp +++ b/trimseqscommand.cpp @@ -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;