From: westcott Date: Thu, 4 Jun 2009 14:10:53 +0000 (+0000) Subject: fixed some bugs X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=commitdiff_plain;h=74c78f9abd9e733f0c2f812efec97a76632fcbf8 fixed some bugs --- diff --git a/Mothur.xcodeproj/project.pbxproj b/Mothur.xcodeproj/project.pbxproj index 34dacfa..ec6d06c 100644 --- a/Mothur.xcodeproj/project.pbxproj +++ b/Mothur.xcodeproj/project.pbxproj @@ -12,6 +12,7 @@ 21DDC01B0F97A8FE0060691C /* bootstrapsharedcommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 21DDC01A0F97A8FE0060691C /* bootstrapsharedcommand.cpp */; }; 21E859D80FC4632E005E1A48 /* matrixoutputcommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 21E859D70FC4632E005E1A48 /* matrixoutputcommand.cpp */; }; 370B88070F8A4EE4005AB382 /* getoturepcommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 370B88060F8A4EE4005AB382 /* getoturepcommand.cpp */; }; + 371B30B40FD7EE67000414CA /* screenseqscommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 371B30B20FD7EE67000414CA /* screenseqscommand.cpp */; }; 372E12700F26365B0095CF7E /* readotucommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 372E126F0F26365B0095CF7E /* readotucommand.cpp */; }; 372E12960F263D5A0095CF7E /* readdistcommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 372E12950F263D5A0095CF7E /* readdistcommand.cpp */; }; 372E12ED0F264D320095CF7E /* commandfactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 372E12EC0F264D320095CF7E /* commandfactory.cpp */; }; @@ -188,6 +189,8 @@ 21E859D70FC4632E005E1A48 /* matrixoutputcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = matrixoutputcommand.cpp; sourceTree = SOURCE_ROOT; }; 370B88050F8A4EE4005AB382 /* getoturepcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = getoturepcommand.h; sourceTree = SOURCE_ROOT; }; 370B88060F8A4EE4005AB382 /* getoturepcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = getoturepcommand.cpp; sourceTree = SOURCE_ROOT; }; + 371B30B20FD7EE67000414CA /* screenseqscommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = screenseqscommand.cpp; sourceTree = ""; }; + 371B30B30FD7EE67000414CA /* screenseqscommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = screenseqscommand.h; sourceTree = ""; }; 372E126E0F26365B0095CF7E /* readotucommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = readotucommand.h; sourceTree = SOURCE_ROOT; }; 372E126F0F26365B0095CF7E /* readotucommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = readotucommand.cpp; sourceTree = SOURCE_ROOT; }; 372E12940F263D5A0095CF7E /* readdistcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = readdistcommand.h; sourceTree = SOURCE_ROOT; }; @@ -815,6 +818,8 @@ 372E126F0F26365B0095CF7E /* readotucommand.cpp */, 37E5F4900F2A3DA800F8D827 /* readtreecommand.h */, 37E5F4910F2A3DA800F8D827 /* readtreecommand.cpp */, + 371B30B30FD7EE67000414CA /* screenseqscommand.h */, + 371B30B20FD7EE67000414CA /* screenseqscommand.cpp */, 3799A94E0FD6A58C00E33EDE /* seqsummarycommand.cpp */, 3799A94F0FD6A58C00E33EDE /* seqsummarycommand.h */, 37D928270F21331F001D4494 /* sharedcommand.h */, @@ -847,8 +852,8 @@ 37D927D40F21331F001D4494 /* database.hpp */, 37D927D30F21331F001D4494 /* database.cpp */, 37D927D50F21331F001D4494 /* datavector.hpp */, - 3799A94C0FD6A58C00E33EDE /* distancedb.cpp */, 3799A94D0FD6A58C00E33EDE /* distancedb.hpp */, + 3799A94C0FD6A58C00E33EDE /* distancedb.cpp */, 37D927DC0F21331F001D4494 /* fastamap.h */, 37D927DB0F21331F001D4494 /* fastamap.cpp */, 375873EA0F7D64520040F377 /* fullmatrix.h */, @@ -1117,6 +1122,7 @@ 3749273F0FD5956B0031C06B /* getrabundcommand.cpp in Sources */, 3799A9500FD6A58C00E33EDE /* distancedb.cpp in Sources */, 3799A9510FD6A58C00E33EDE /* seqsummarycommand.cpp in Sources */, + 371B30B40FD7EE67000414CA /* screenseqscommand.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/alignment.cpp b/alignment.cpp index 6db3b3d..55ba1a1 100644 --- a/alignment.cpp +++ b/alignment.cpp @@ -9,15 +9,9 @@ * */ -using namespace std; - -#include -#include - #include "alignmentcell.hpp" #include "alignment.hpp" -#include /**************************************************************************************************/ diff --git a/alignment.hpp b/alignment.hpp index 3367812..b317556 100644 --- a/alignment.hpp +++ b/alignment.hpp @@ -12,7 +12,6 @@ * As of 12/18/08 these included alignments based on blastn, needleman-wunsch, and the Gotoh algorithms * */ -using namespace std; #include "mothur.h" #include "alignmentcell.hpp" diff --git a/alignmentcell.cpp b/alignmentcell.cpp index 544c218..72bcb31 100644 --- a/alignmentcell.cpp +++ b/alignmentcell.cpp @@ -13,6 +13,6 @@ //******************************************************************************************************************** -AlignmentCell::AlignmentCell() : prevCell('x'), cValue(0.0000), dValue(0.0000), iValue(0.0000) {}; +AlignmentCell::AlignmentCell() : prevCell('x'), cValue(0.0000), dValue(0.0000), iValue(0.0000) {} //******************************************************************************************************************** diff --git a/blastalign.cpp b/blastalign.cpp index a477313..e4d5e8a 100644 --- a/blastalign.cpp +++ b/blastalign.cpp @@ -11,7 +11,6 @@ * */ -using namespace std; #include "alignment.hpp" #include "blastalign.hpp" @@ -83,10 +82,10 @@ void BlastAlignment::setPairwiseSeqs(){ // This method call assigns the blast ge string candidateName, templateName; - while(d=blastFile.get() != '='){}; + while(d=blastFile.get() != '='){} blastFile >> candidateName; // Get the candidate sequence name from flatfile - while(d=blastFile.get() != '('){}; + while(d=blastFile.get() != '('){} blastFile >> candidateLength; // Get the candidate sequence length from flatfile while(d=blastFile.get()){ @@ -115,10 +114,10 @@ void BlastAlignment::setPairwiseSeqs(){ // This method call assigns the blast ge } } - while(d=blastFile.get() != '='){}; + while(d=blastFile.get() != '='){} blastFile >> templateLength; // Get the template sequence length from flatfile - while(d=blastFile.get() != 'Q'){}; // Suck up everything else until we get to the start of the alignment + while(d=blastFile.get() != 'Q'){} // Suck up everything else until we get to the start of the alignment int queryStart, sbjctStart, queryEnd, sbjctEnd; string queryLabel, sbjctLabel, query, sbjct; diff --git a/blastdb.cpp b/blastdb.cpp index 82b104e..6f4ebcc 100644 --- a/blastdb.cpp +++ b/blastdb.cpp @@ -7,8 +7,6 @@ * */ -using namespace std; - #include "database.hpp" #include "sequence.hpp" diff --git a/boneh.cpp b/boneh.cpp index f5c8f90..32ec033 100644 --- a/boneh.cpp +++ b/boneh.cpp @@ -84,7 +84,7 @@ EstOutput Boneh::getValues(SAbundVector* sabund){ cout << "An unknown error has occurred in the Coverage class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; exit(1); } -}; +} /***********************************************************************/ diff --git a/calculator.h b/calculator.h index 127c835..8b21f70 100644 --- a/calculator.h +++ b/calculator.h @@ -1,7 +1,6 @@ #ifndef CALCULATOR_H #define CALCULATOR_H -using namespace std; #include "mothur.h" #include "sabundvector.hpp" @@ -14,7 +13,6 @@ It has 2 pure functions EstOutput getValues(SAbundVector*), which works on a sin EstOutput getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2), which compares 2 groups. */ -using namespace std; typedef vector EstOutput; /***********************************************************************/ diff --git a/chao1.cpp b/chao1.cpp index c05bdef..7757fb0 100644 --- a/chao1.cpp +++ b/chao1.cpp @@ -67,6 +67,6 @@ EstOutput Chao1::getValues(SAbundVector* rank){ cout << "An unknown error has occurred in the Chao1 class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; exit(1); } -}; +} /***********************************************************************/ diff --git a/cluster.hpp b/cluster.hpp index 5f01038..de86f85 100644 --- a/cluster.hpp +++ b/cluster.hpp @@ -1,7 +1,6 @@ #ifndef CLUSTER_H #define CLUSTER_H -using namespace std; #include "mothur.h" #include "sparsematrix.hpp" diff --git a/collect.h b/collect.h index 295673e..134edf0 100644 --- a/collect.h +++ b/collect.h @@ -1,10 +1,6 @@ #ifndef COLLECT_H #define COLLECT_H -using namespace std; - - - #include "collectorscurvedata.h" #include "display.h" #include "ordervector.hpp" diff --git a/collectdisplay.h b/collectdisplay.h index 7e40ad7..110d816 100644 --- a/collectdisplay.h +++ b/collectdisplay.h @@ -8,8 +8,6 @@ #include "display.h" -using namespace std; - /***********************************************************************/ class CollectDisplay : public Display { diff --git a/collectorscurvedata.h b/collectorscurvedata.h index 480bc36..5cbe2be 100644 --- a/collectorscurvedata.h +++ b/collectorscurvedata.h @@ -1,13 +1,11 @@ #ifndef COLLECTORSCURVEDATA_H #define COLLECTORSCURVEDATA_H -#include "mothur.h" #include "sabundvector.hpp" #include "sharedrabundvector.h" #include "display.h" #include "observable.h" -using namespace std; /***********************************************************************/ diff --git a/command.hpp b/command.hpp index e418de8..c8dae40 100644 --- a/command.hpp +++ b/command.hpp @@ -12,7 +12,6 @@ /*This class is a parent to all the command classes. It has one pure int execute(). */ -using namespace std; #include "mothur.h" diff --git a/commandfactory.cpp b/commandfactory.cpp index 7b3a5c0..c9a3e6a 100644 --- a/commandfactory.cpp +++ b/commandfactory.cpp @@ -74,7 +74,7 @@ Command* CommandFactory::getCommand(string commandName){ else if(commandName == "read.otu") { command = new ReadOtuCommand(); } else if(commandName == "read.tree") { command = new ReadTreeCommand(); } else if(commandName == "cluster") { command = new ClusterCommand(); } - else if(commandName == "deconvolute") { command = new DeconvoluteCommand(); } + else if(commandName == "unique.seqs") { command = new DeconvoluteCommand(); } else if(commandName == "parsimony") { command = new ParsimonyCommand(); } else if(commandName == "help") { command = new HelpCommand(); } else if(commandName == "quit") { command = new QuitCommand(); } diff --git a/commandoptionparser.cpp b/commandoptionparser.cpp index a46c0a6..6fc43ab 100644 --- a/commandoptionparser.cpp +++ b/commandoptionparser.cpp @@ -8,9 +8,6 @@ */ -using namespace std; - - #include "globaldata.hpp" #include "commandoptionparser.hpp" diff --git a/coverage.cpp b/coverage.cpp index a93cbf3..441a029 100644 --- a/coverage.cpp +++ b/coverage.cpp @@ -27,7 +27,7 @@ EstOutput Coverage::getValues(SAbundVector* rank){ cout << "An unknown error has occurred in the Coverage class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; exit(1); } -}; +} /***********************************************************************/ diff --git a/database.cpp b/database.cpp index 44e663b..f849146 100644 --- a/database.cpp +++ b/database.cpp @@ -7,9 +7,7 @@ * */ -using namespace std; - - +#include "mothur.h" #include "sequence.hpp" #include "database.hpp" diff --git a/database.hpp b/database.hpp index 09fea85..2fced3f 100644 --- a/database.hpp +++ b/database.hpp @@ -10,6 +10,9 @@ * */ + +/* This class is a parent to blastdb, distancedb, kmerdb, suffixdb. Which are used to convert a squencedb object into that form. */ + #include "mothur.h" class Sequence; diff --git a/datavector.hpp b/datavector.hpp index 18ac695..692332f 100644 --- a/datavector.hpp +++ b/datavector.hpp @@ -1,7 +1,6 @@ #ifndef datavector_h #define datavector_h -using namespace std; #include "mothur.h" diff --git a/deconvolutecommand.cpp b/deconvolutecommand.cpp index 36cc776..51362e5 100644 --- a/deconvolutecommand.cpp +++ b/deconvolutecommand.cpp @@ -34,6 +34,9 @@ int DeconvoluteCommand::execute() { //the second column is the list of names of identical sequences separated by ','. fastamap->printNamesFile(out); fastamap->printCondensedFasta(outFasta); + + out.close(); + outFasta.close(); return 0; } diff --git a/deconvolutecommand.h b/deconvolutecommand.h index fe5c0db..aaed841 100644 --- a/deconvolutecommand.h +++ b/deconvolutecommand.h @@ -13,10 +13,9 @@ #include "fastamap.h" #include "globaldata.hpp" -/* The deconvolute command reads a fasta file, finds the duplicate sequences and outputs a names file +/* The unique.seqs command reads a fasta file, finds the duplicate sequences and outputs a names file containing 2 columns. The first being the groupname and the second the list of identical sequence names. */ -using namespace std; class DeconvoluteCommand : public Command { diff --git a/display.h b/display.h index c4301ba..0207bbf 100644 --- a/display.h +++ b/display.h @@ -7,8 +7,6 @@ #include "fileoutput.h" -using namespace std; - /***********************************************************************/ class Display { diff --git a/distancecommand.cpp b/distancecommand.cpp index 1bc16f3..fbec46c 100644 --- a/distancecommand.cpp +++ b/distancecommand.cpp @@ -25,7 +25,7 @@ DistanceCommand::DistanceCommand(){ convert(globaldata->getCutOff(), cutoff); int i; - if (countends == "T") { + if (isTrue(countends) == true) { for (i=0; iEstimators.size(); i++) { if (validCalculator->isValidCalculator("distance", globaldata->Estimators[i]) == true) { if (globaldata->Estimators[i] == "nogaps") { diff --git a/distancecommand.h b/distancecommand.h index 6bd7572..8bdf845 100644 --- a/distancecommand.h +++ b/distancecommand.h @@ -22,8 +22,6 @@ #include "readseqsphylip.h" -using namespace std; - class DistanceCommand : public Command { public: diff --git a/distancedb.cpp b/distancedb.cpp index ce74854..3cb739d 100644 --- a/distancedb.cpp +++ b/distancedb.cpp @@ -8,9 +8,6 @@ */ -using namespace std; - - #include "database.hpp" #include "sequence.hpp" #include "distancedb.hpp" diff --git a/distancedb.hpp b/distancedb.hpp index dc4c9a6..9c13faf 100644 --- a/distancedb.hpp +++ b/distancedb.hpp @@ -11,8 +11,6 @@ */ -using namespace std; - #include "mothur.h" class DistanceDB : public Database { diff --git a/efron.cpp b/efron.cpp index e88b025..62d924b 100644 --- a/efron.cpp +++ b/efron.cpp @@ -35,7 +35,7 @@ EstOutput Efron::getValues(SAbundVector* rank){ cout << "An unknown error has occurred in the Coverage class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; exit(1); } -}; +} /***********************************************************************/ diff --git a/engine.cpp b/engine.cpp index ddd6776..d5192bf 100644 --- a/engine.cpp +++ b/engine.cpp @@ -10,7 +10,7 @@ * Fix later, don't have time now. * */ -using namespace std; + #include "engine.hpp" @@ -47,7 +47,7 @@ bool InteractEngine::getInput(){ ErrorCheck* errorCheckor = new ErrorCheck(); cout << "mothur v.1.3.0" << endl; - cout << "Last updated: 4/25/2009" << endl << endl; + cout << "Last updated: 5/29/2009" << endl << endl; cout << "by" << endl; cout << "Patrick D. Schloss" << endl << endl; cout << "Department of Microbiology" << endl; diff --git a/engine.hpp b/engine.hpp index 276d292..d42406e 100644 --- a/engine.hpp +++ b/engine.hpp @@ -19,9 +19,6 @@ #include "commandfactory.hpp" #include "errorchecking.h" - -using namespace std; - class GlobalData; class Engine { diff --git a/errorchecking.cpp b/errorchecking.cpp index 0652492..caf7f73 100644 --- a/errorchecking.cpp +++ b/errorchecking.cpp @@ -205,8 +205,8 @@ bool ErrorCheck::checkInput(string input) { } }else if (commandName == "read.tree") { validateTreeFiles(); //checks the treefile and groupfile parameters - }else if (commandName == "deconvolute") { - if (fastafile == "") { cout << "You must enter a fastafile with the deconvolute() command." << endl; return false; } + }else if (commandName == "unique.seqs") { + if (fastafile == "") { cout << "You must enter a fastafile with the unique.seqs() command." << endl; return false; } validateReadFiles(); } @@ -281,8 +281,8 @@ bool ErrorCheck::checkInput(string input) { } if ((commandName == "filter.seqs") || (commandName == "dist.seqs")) { - if ((fastafile == "") && (nexusfile == "") && (clustalfile == "") && (phylipfile == "")) { - cout << "You must enter either a fasta, nexus, clustal, or phylip file before you can use the filter.seqs or dist.seqs command." << endl; return false; + if (fastafile == "") { + cout << "You must enter either a fasta file before you can use the filter.seqs or dist.seqs command." << endl; return false; } validateSeqsFiles(); } diff --git a/fastamap.cpp b/fastamap.cpp index 0848363..1cc9abf 100644 --- a/fastamap.cpp +++ b/fastamap.cpp @@ -14,54 +14,100 @@ void FastaMap::readFastaFile(ifstream& in) { try { string name, sequence, line; sequence = ""; - - in >> line; - name = line.substr(1, line.length()); //rips off '>' - + int c; + string temp; + + //read through file - while (!in.eof()) { - in >> line; + while ((c = in.get()) != EOF) { + name = ""; sequence = ""; + //is this a name + if (c == '>') { + name = readName(in); + sequence = readSequence(in); + }else { cout << "Error fasta in your file. Please correct." << endl; } - if (line[0] != '>') { //if it's a sequence line - sequence += line; - } - else{ + //store info in map //input sequence info into map - seqmap[name] = sequence; - - it = data.find(sequence); - if (it == data.end()) { //it's unique. - data[sequence].groupname = name; //group name will be the name of the first duplicate sequence found. - data[sequence].groupnumber = 1; - data[sequence].names = name; - }else { // its a duplicate. - data[sequence].names += "," + name; - data[sequence].groupnumber++; - } - name = (line.substr(1, (line.npos))); //The line you just read is a new name so rip off '>' - sequence = ""; - } + seqmap[name] = sequence; + it = data.find(sequence); + if (it == data.end()) { //it's unique. + data[sequence].groupname = name; //group name will be the name of the first duplicate sequence found. + data[sequence].groupnumber = 1; + data[sequence].names = name; + }else { // its a duplicate. + data[sequence].names += "," + name; + data[sequence].groupnumber++; + } gobble(in); } - it = data.find(sequence); - if (it == data.end()) { //it's unique. - data[sequence].groupname = name; //group name will be the name of the first duplicate sequence found. - data[sequence].groupnumber = 1; - data[sequence].names = name; - }else { // its a duplicate. - data[sequence].names += "," + name; - data[sequence].groupnumber++; + + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the FastaMap class Function readFastaFile. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the FastaMap class function readFastaFile. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} +/*******************************************************************************/ +string FastaMap::readName(ifstream& in) { + try{ + string name = ""; + int c; + string temp; + + while ((c = in.get()) != EOF) { + //if c is not a line return + if (c != 10) { + name += c; + }else { break; } } + + return name; + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the FastaMap class Function readName. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the FastaMap class function readName. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} + +/*******************************************************************************/ +string FastaMap::readSequence(ifstream& in) { + try{ + string sequence = ""; + string line; + int pos, c; + while (!in.eof()) { + //save position in file in case next line is a new name. + pos = in.tellg(); + line = ""; + in >> line; + //if you are at a new name + if (line[0] == '>') { + //put file pointer back since you are now at a new name + in.seekg(pos, ios::beg); + c = in.get(); //because you put it back to a newline char + break; + }else { sequence += line; } + } + return sequence; } catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the FastaMap class Function readFastaFile. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + cout << "Standard Error: " << e.what() << " has occurred in the FastaMap class Function readSequence. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; exit(1); } catch(...) { - cout << "An unknown error has occurred in the FastaMap class function readFastaFile. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + cout << "An unknown error has occurred in the FastaMap class function readSequence. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; exit(1); } } @@ -124,7 +170,7 @@ void FastaMap::printNamesFile(ostream& out){ //prints data /*******************************************************************************/ void FastaMap::printCondensedFasta(ostream& out){ //prints data try { - // two column file created with groupname and them list of identical sequence names + //creates a fasta file for (it = data.begin(); it != data.end(); it++) { out << ">" << it->second.groupname << endl; out << it->first << endl; diff --git a/fastamap.h b/fastamap.h index 355a8df..6051874 100644 --- a/fastamap.h +++ b/fastamap.h @@ -10,8 +10,6 @@ * */ -using namespace std; - #include "mothur.h" @@ -47,6 +45,9 @@ private: map seqmap; //name, sequence - uncondensed representation of file map::iterator it; map::iterator it2; + + string readName(ifstream&); + string readSequence(ifstream&); }; #endif diff --git a/fileoutput.cpp b/fileoutput.cpp index 74b5335..d4db546 100644 --- a/fileoutput.cpp +++ b/fileoutput.cpp @@ -16,7 +16,7 @@ ThreeColumnFile::~ThreeColumnFile(){ inFile.close(); outFile.close(); remove(outName.c_str()); -}; +} /***********************************************************************/ @@ -71,7 +71,7 @@ void ThreeColumnFile::output(int nSeqs, vector data){ cout << "An unknown error has occurred in the ThreeColumnFile class function output. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; exit(1); } -}; +} /***********************************************************************/ @@ -111,7 +111,7 @@ ColumnFile::~ColumnFile(){ inFile.close(); outFile.close(); remove(outName.c_str()); -}; +} /***********************************************************************/ @@ -183,7 +183,7 @@ void ColumnFile::output(vector data){ cout << "An unknown error has occurred in the ColumnFile class function output. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; exit(1); } -}; +} /***********************************************************************/ @@ -223,7 +223,7 @@ SharedThreeColumnFile::~SharedThreeColumnFile(){ inFile.close(); outFile.close(); remove(outName.c_str()); -}; +} /***********************************************************************/ @@ -279,7 +279,7 @@ void SharedThreeColumnFile::output(int nSeqs, vector data){ cout << "An unknown error has occurred in the SharedThreeColumnFile class function output. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; exit(1); } -}; +} /***********************************************************************/ @@ -319,7 +319,7 @@ OneColumnFile::~OneColumnFile(){ inFile.close(); outFile.close(); remove(outName.c_str()); -}; +} /***********************************************************************/ @@ -374,7 +374,7 @@ void OneColumnFile::output(int nSeqs, vector data){ cout << "An unknown error has occurred in the OneColumnFile class function output. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; exit(1); } -}; +} /***********************************************************************/ @@ -413,7 +413,7 @@ SharedOneColumnFile::~SharedOneColumnFile(){ inFile.close(); outFile.close(); remove(outName.c_str()); -}; +} /***********************************************************************/ @@ -477,7 +477,7 @@ void SharedOneColumnFile::output(int nSeqs, vector data){ cout << "An unknown error has occurred in the OneColumnFile class function output. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; exit(1); } -}; +} /***********************************************************************/ diff --git a/fileoutput.h b/fileoutput.h index d7c4726..359946c 100644 --- a/fileoutput.h +++ b/fileoutput.h @@ -4,8 +4,6 @@ #include "mothur.h" #include "globaldata.hpp" -using namespace std; - /***********************************************************************/ class FileOutput { diff --git a/filterseqscommand.cpp b/filterseqscommand.cpp index 8864bb3..7330268 100644 --- a/filterseqscommand.cpp +++ b/filterseqscommand.cpp @@ -118,7 +118,6 @@ void FilterSeqsCommand::doSoft() { int FilterSeqsCommand::execute() { try { - ifstream inFASTA; openInputFile(globaldata->getFastaFile(), inFASTA); @@ -130,14 +129,8 @@ int FilterSeqsCommand::execute() { if(globaldata->getHard().compare("") != 0) { doHard(); } // has to be applied first! if(globaldata->getTrump().compare("") != 0) { doTrump(); } - if(isTrue(globaldata->getVertical())) { doVertical(); } + if(isTrue(globaldata->getVertical()) == true) { doVertical(); } if(globaldata->getSoft().compare("") != 0) { doSoft(); } - - - - - - ofstream outfile; string filterFile = getRootName(globaldata->inputFileName) + "filter"; diff --git a/filterseqscommand.h b/filterseqscommand.h index b59d0a4..6fe171a 100644 --- a/filterseqscommand.h +++ b/filterseqscommand.h @@ -11,14 +11,12 @@ */ #include "command.hpp" -#include "mothur.h" #include "globaldata.hpp" #include "readfasta.h" #include "readnexus.h" #include "readclustal.h" #include "readseqsphylip.h" -using namespace std; class FilterSeqsCommand : public Command { diff --git a/fullmatrix.h b/fullmatrix.h index 5912b6c..95c472f 100644 --- a/fullmatrix.h +++ b/fullmatrix.h @@ -14,7 +14,6 @@ #include "globaldata.hpp" #include "progress.hpp" -using namespace std; struct Names { string seqName; diff --git a/globaldata.cpp b/globaldata.cpp index 62641be..d7afc40 100644 --- a/globaldata.cpp +++ b/globaldata.cpp @@ -366,8 +366,8 @@ GlobalData::GlobalData() { //option definitions should go here... helpRequest = ""; clear(); - gListVector == NULL; - gSparseMatrix == NULL; + gListVector = NULL; + gSparseMatrix = NULL; } /*******************************************************/ @@ -404,7 +404,7 @@ void GlobalData::clear() { step = "0.01"; form = "integral"; sorted = "T"; //F means don't sort, T means sort. - vertical = ""; + vertical = "F"; trump = ""; hard = ""; soft = ""; diff --git a/globaldata.hpp b/globaldata.hpp index f97d98b..11422e0 100644 --- a/globaldata.hpp +++ b/globaldata.hpp @@ -4,14 +4,10 @@ #include "mothur.h" #include "groupmap.h" #include "treemap.h" - #include "rabundvector.hpp" #include "sabundvector.hpp" #include "listvector.hpp" - -using namespace std; - class ListVector; class SharedListVector; class SparseMatrix; diff --git a/gotohoverlap.cpp b/gotohoverlap.cpp index 57d884b..e3be6c3 100644 --- a/gotohoverlap.cpp +++ b/gotohoverlap.cpp @@ -17,7 +17,6 @@ * */ -using namespace std; #include "alignmentcell.hpp" #include "overlap.hpp" diff --git a/groupmap.cpp b/groupmap.cpp index 63fb465..38addc9 100644 --- a/groupmap.cpp +++ b/groupmap.cpp @@ -18,7 +18,7 @@ } /************************************************************/ - GroupMap::~GroupMap(){}; + GroupMap::~GroupMap(){} /************************************************************/ void GroupMap::readMap() { diff --git a/heatmap.cpp b/heatmap.cpp index 4bb9385..3aceef1 100644 --- a/heatmap.cpp +++ b/heatmap.cpp @@ -106,7 +106,7 @@ void HeatMap::getPic(RAbundVector* rabund) { void HeatMap::getPic(vector lookup) { try { //sort lookup so shared bins are on top - if (sorted == "T") { sortSharedVectors(lookup); } + if (isTrue(sorted) == true) { sortSharedVectors(lookup); } vector > scaleRelAbund; vector maxRelAbund(lookup.size(), 0.0); @@ -301,7 +301,6 @@ void HeatMap::printLegend(int y, float maxbin) { else if(scaler== "log2") { label = maxbin * log2(51*i) / log2(255); } else if(scaler== "linear") { label = maxbin * 51 * i / 255; } else { label = maxbin * log10(51*i) / log10(255); } - file://localhost/Users/westcott/Desktop/c.amazon.fn.0.19.rep.fasta label = int(label * 1000 + 0.5); label /= 1000.0; string text = toString(label, 3); diff --git a/heatmap.h b/heatmap.h index 29b6b9a..7c5b561 100644 --- a/heatmap.h +++ b/heatmap.h @@ -9,8 +9,6 @@ * */ -using namespace std; - #include "rabundvector.hpp" #include "sharedrabundvector.h" #include "datavector.hpp" diff --git a/helpcommand.cpp b/helpcommand.cpp index 731d77e..a572e76 100644 --- a/helpcommand.cpp +++ b/helpcommand.cpp @@ -63,17 +63,17 @@ int HelpCommand::execute(){ cout << "The cluster command should be in the following format: " << "\n"; cout << "cluster(method=yourMethod, cutoff=yourCutoff, precision=yourPrecision) " << "\n"; cout << "The acceptable cluster methods are furthest, nearest and average. If no method is provided then furthest is assumed." << "\n" << "\n"; - }else if (globaldata->helpRequest == "deconvolute") { - cout << "The deconvolute command reads a fastafile and creates a namesfile." << "\n"; + }else if (globaldata->helpRequest == "unique.seqs") { + cout << "The unique.seqs command reads a fastafile and creates a namesfile." << "\n"; cout << "It creates a file where the first column is the groupname and the second column is a list of sequence names who have the same sequence. " << "\n"; cout << "If the sequence is unique the second column will just contain its name. " << "\n"; - cout << "The deconvolute command parameter is fasta and it is required." << "\n"; - cout << "The deconvolute command should be in the following format: " << "\n"; - cout << "deconvolute(fasta=yourFastaFile) " << "\n"; + cout << "The unique.seqs command parameter is fasta and it is required." << "\n"; + cout << "The unique.seqs command should be in the following format: " << "\n"; + cout << "unique.seqs(fasta=yourFastaFile) " << "\n"; }else if (globaldata->helpRequest == "dist.seqs") { cout << "The dist.seqs command reads a file containing sequences and creates a distance file." << "\n"; - cout << "The dist.seqs command parameters are fasta, phylip, clustal, nexus, calc, countends, cutoff and processors. " << "\n"; - cout << "You must use one of the following parameters for your filename: fasta, phylip, clustal or nexus. " << "\n"; + cout << "The dist.seqs command parameters are fasta, calc, countends, cutoff and processors. " << "\n"; + cout << "The fasta parameter is required." << "\n"; cout << "The calc parameter allows you to specify the method of calculating the distances. Your options are: nogaps, onegap or eachgap. The default is onegap." << "\n"; cout << "The countends parameter allows you to specify whether to include terminal gaps in distance. Your options are: T or F. The default is T." << "\n"; cout << "The cutoff parameter allows you to specify maximum distance to keep. The default is 1.0." << "\n"; @@ -85,7 +85,7 @@ int HelpCommand::execute(){ }else if (globaldata->helpRequest == "align.seqs") { cout << "The align.seqs command reads a file containing sequences and creates an alignment file and a report file." << "\n"; cout << "The align.seqs command parameters are fasta, candidate, search, ksize, align, match, mismatch, gapopen and gapextend. " << "\n"; - cout << "The template parameter is also required." << "\n"; + cout << "The fasta and candidate parameters are required." << "\n"; cout << "The search parameter allows you to specify the method to find most similar template. Your options are: suffix, kmer and blast. The default is kmer." << "\n"; cout << "The align parameter allows you to specify the alignment method to use. Your options are: gotoh, needleman, blast and noalign. The default is needleman." << "\n"; cout << "The ksize parameter allows you to specify the kmer size for finding most similar template to candidate. The default is 7." << "\n"; @@ -309,6 +309,18 @@ int HelpCommand::execute(){ cout << "The bin.seqs command outputs a .fasta file for each distance you specify appending the OTU number to each name." << "\n"; cout << "If you provide a groupfile, then it also appends the sequences group to the name." << "\n"; cout << "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile)." << "\n" << "\n"; + }else if (globaldata->helpRequest == "filter.seqs") { + cout << "The filter.seqs command reads a file containing sequences and creates a .filter and .filter.fasta file." << "\n"; + cout << "The filter.seqs command parameters are fasta, trump, soft, hard and vertical. " << "\n"; + cout << "The fasta parameter is required." << "\n"; + cout << "The trump parameter .... The default is ...." << "\n"; + cout << "The soft parameter .... The default is ...." << "\n"; + cout << "The hard parameter .... The default is ...." << "\n"; + cout << "The vertical parameter .... The default is ...." << "\n"; + cout << "The filter.seqs command should be in the following format: " << "\n"; + cout << "filter.seqs(fasta=yourFastaFile, trump=yourTrump, soft=yourSoft, hard=yourHard, vertical=yourVertical) " << "\n"; + cout << "Example filter.seqs(fasta=abrecovery.fasta, trump=..., soft=..., hard=..., vertical=...)." << "\n"; + cout << "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta)." << "\n" << "\n"; }else if (globaldata->helpRequest == "get.oturep") { cout << "The get.oturep command can only be executed after a successful read.dist command." << "\n"; cout << "The get.oturep command parameters are list, fasta, name, group, line and label. The fasta and list parameters are required, and you may not use line and label at the same time." << "\n"; diff --git a/inputdata.h b/inputdata.h index f21daec..e9deb9d 100644 --- a/inputdata.h +++ b/inputdata.h @@ -8,8 +8,6 @@ #include "listvector.hpp" -using namespace std; - class InputData { public: diff --git a/kmer.cpp b/kmer.cpp index dcb6475..b3bf022 100644 --- a/kmer.cpp +++ b/kmer.cpp @@ -7,9 +7,6 @@ * */ -using namespace std; - - #include "kmer.hpp" /**************************************************************************************************/ diff --git a/kmerdb.cpp b/kmerdb.cpp index 9652ac4..572acda 100644 --- a/kmerdb.cpp +++ b/kmerdb.cpp @@ -22,9 +22,6 @@ */ -using namespace std; - - #include "sequence.hpp" #include "kmer.hpp" #include "database.hpp" diff --git a/libshuffcommand.h b/libshuffcommand.h index 18bfade..07c1ba5 100644 --- a/libshuffcommand.h +++ b/libshuffcommand.h @@ -14,7 +14,6 @@ #include "fullmatrix.h" #include "libshuff.h" -using namespace std; class GlobalData; diff --git a/listvector.cpp b/listvector.cpp index 205fe60..4b21d5f 100644 --- a/listvector.cpp +++ b/listvector.cpp @@ -7,8 +7,6 @@ * */ -using namespace std; - #include "sabundvector.hpp" #include "rabundvector.hpp" @@ -18,11 +16,11 @@ using namespace std; /***********************************************************************/ -ListVector::ListVector() : DataVector(), maxRank(0), numBins(0), numSeqs(0){}; +ListVector::ListVector() : DataVector(), maxRank(0), numBins(0), numSeqs(0){} /***********************************************************************/ -ListVector::ListVector(int n): DataVector(), data(n, "") , maxRank(0), numBins(0), numSeqs(0){}; +ListVector::ListVector(int n): DataVector(), data(n, "") , maxRank(0), numBins(0), numSeqs(0){} /***********************************************************************/ diff --git a/mothur.cpp b/mothur.cpp index add60fa..8d0e507 100644 --- a/mothur.cpp +++ b/mothur.cpp @@ -11,8 +11,6 @@ #include "engine.hpp" #include "globaldata.hpp" -using namespace std; - /**************************************************************************************************/ GlobalData* GlobalData::_uniqueInstance = 0; diff --git a/mothur.h b/mothur.h index f07f343..9c9e23c 100644 --- a/mothur.h +++ b/mothur.h @@ -40,6 +40,15 @@ using namespace std; #include #include #include +#include + +#ifdef _WIN32 + #define exp(x) (exp((double) x)) + #define sqrt(x) (sqrt((double) x)) + #define log10(x) (log10((double) x)) + #define log2(x) (log10(x)/log10(2)) +#endif + typedef unsigned long long ull; @@ -139,6 +148,13 @@ inline void gobble(istream& f){ f.putback(d); } +/***********************************************************************/ + +inline bool isTrue(string f){ + + if ((f == "TRUE") || (f == "T") || (f == "true") || (f == "t")) { return true; } + else { return false; } +} /***********************************************************************/ diff --git a/nameassignment.cpp b/nameassignment.cpp index cd9ef4e..21703e4 100644 --- a/nameassignment.cpp +++ b/nameassignment.cpp @@ -1,4 +1,4 @@ -using namespace std; + #include "nameassignment.hpp" diff --git a/nameassignment.hpp b/nameassignment.hpp index 77b772b..93299cc 100644 --- a/nameassignment.hpp +++ b/nameassignment.hpp @@ -1,8 +1,6 @@ #ifndef NAMEASSIGNMENT_HPP #define NAMEASSIGNMENT_HPP -using namespace std; - #include "mothur.h" #include "listvector.hpp" diff --git a/nast.cpp b/nast.cpp index 0fae6ab..2d3db22 100644 --- a/nast.cpp +++ b/nast.cpp @@ -15,8 +15,6 @@ * */ -using namespace std; - #include "sequence.hpp" #include "alignment.hpp" #include "nast.hpp" diff --git a/nastreport.cpp b/nastreport.cpp index 799793e..0f361f1 100644 --- a/nastreport.cpp +++ b/nastreport.cpp @@ -7,8 +7,6 @@ * */ -using namespace std; - #include "sequence.hpp" #include "nast.hpp" #include "alignment.hpp" diff --git a/nastreport.hpp b/nastreport.hpp index 424b0bb..be75efd 100644 --- a/nastreport.hpp +++ b/nastreport.hpp @@ -13,8 +13,6 @@ #include "mothur.h" -using namespace std; - /******************************************************************************************************************/ class NastReport { diff --git a/needlemanoverlap.cpp b/needlemanoverlap.cpp index 8f5d464..effe0d3 100644 --- a/needlemanoverlap.cpp +++ b/needlemanoverlap.cpp @@ -17,8 +17,6 @@ * */ -using namespace std; - #include "alignmentcell.hpp" #include "alignment.hpp" #include "overlap.hpp" diff --git a/noalign.hpp b/noalign.hpp index bd9817a..2e520b3 100644 --- a/noalign.hpp +++ b/noalign.hpp @@ -9,7 +9,6 @@ * Copyright 2009Schloss Lab UMASS Amherst. All rights reserved. * */ -using namespace std; #include "mothur.h" diff --git a/observable.h b/observable.h index 616ef0d..457a176 100644 --- a/observable.h +++ b/observable.h @@ -4,7 +4,6 @@ #include "collectdisplay.h" -using namespace std; /***********************************************************************/ diff --git a/ordervector.cpp b/ordervector.cpp index ccbfa66..e306205 100644 --- a/ordervector.cpp +++ b/ordervector.cpp @@ -7,8 +7,6 @@ * */ -using namespace std; - #include "ordervector.hpp" @@ -18,7 +16,7 @@ OrderVector::OrderVector() : DataVector() {} /***********************************************************************/ -//OrderVector::OrderVector(int ns) : DataVector(), data(ns, -1) {}; +//OrderVector::OrderVector(int ns) : DataVector(), data(ns, -1) {} /***********************************************************************/ diff --git a/overlap.cpp b/overlap.cpp index 9645e7a..e30b51d 100644 --- a/overlap.cpp +++ b/overlap.cpp @@ -12,7 +12,6 @@ * issues at the 5' end of the alignment seem to take care of themselves in the traceback. * */ -using namespace std; #include "alignmentcell.hpp" #include "overlap.hpp" diff --git a/parsimonycommand.h b/parsimonycommand.h index 26d392e..603506f 100644 --- a/parsimonycommand.h +++ b/parsimonycommand.h @@ -16,7 +16,6 @@ #include "sharedutilities.h" #include "fileoutput.h" -using namespace std; class GlobalData; diff --git a/progress.cpp b/progress.cpp index a01ae71..65c01b9 100644 --- a/progress.cpp +++ b/progress.cpp @@ -10,8 +10,6 @@ #include "progress.hpp" -using namespace std; - const int totalTicks = 50; const char marker = '|'; diff --git a/progress.hpp b/progress.hpp index a2ae7d1..fba393e 100644 --- a/progress.hpp +++ b/progress.hpp @@ -3,8 +3,6 @@ #include "mothur.h" -using namespace std; - class Progress { public: diff --git a/rabundvector.cpp b/rabundvector.cpp index 1613f0a..471c7e2 100644 --- a/rabundvector.cpp +++ b/rabundvector.cpp @@ -6,7 +6,6 @@ * Copyright 2008 Patrick D. Schloss. All rights reserved. * */ -using namespace std; #include "rabundvector.hpp" #include "sabundvector.hpp" @@ -16,15 +15,15 @@ using namespace std; /***********************************************************************/ -RAbundVector::RAbundVector() : DataVector(), maxRank(0), numBins(0), numSeqs(0) {}; +RAbundVector::RAbundVector() : DataVector(), maxRank(0), numBins(0), numSeqs(0) {} /***********************************************************************/ -RAbundVector::RAbundVector(int n) : DataVector(), data(n,0) , maxRank(0), numBins(0), numSeqs(0) {}; +RAbundVector::RAbundVector(int n) : DataVector(), data(n,0) , maxRank(0), numBins(0), numSeqs(0) {} /***********************************************************************/ -//RAbundVector::RAbundVector(const RAbundVector& rav) : DataVector(rav), data(rav.data), (rav.label), (rav.maxRank), (rav.numBins), (rav.numSeqs){}; +//RAbundVector::RAbundVector(const RAbundVector& rav) : DataVector(rav), data(rav.data), (rav.label), (rav.maxRank), (rav.numBins), (rav.numSeqs){} /***********************************************************************/ diff --git a/raredisplay.cpp b/raredisplay.cpp index 3d50b26..61362c7 100644 --- a/raredisplay.cpp +++ b/raredisplay.cpp @@ -66,7 +66,7 @@ void RareDisplay::update(SAbundVector* rank){ cout << "An unknown error has occurred in the RareDisplay class function update. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; exit(1); } -}; +} /***********************************************************************/ void RareDisplay::update(vector shared, int numSeqs, int numGroupComb) { @@ -99,7 +99,7 @@ void RareDisplay::update(vector shared, int numSeqs, int nu cout << "An unknown error has occurred in the RareDisplay class function update. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; exit(1); } -}; +} /***********************************************************************/ diff --git a/raredisplay.h b/raredisplay.h index b7711d2..c906706 100644 --- a/raredisplay.h +++ b/raredisplay.h @@ -6,9 +6,6 @@ #include "fileoutput.h" #include "display.h" - -using namespace std; - /***********************************************************************/ class RareDisplay : public Display { diff --git a/rarefact.h b/rarefact.h index 6eed912..aff5cb6 100644 --- a/rarefact.h +++ b/rarefact.h @@ -1,8 +1,6 @@ #ifndef RAREFACT_H #define RAREFACT_H -using namespace std; - #include "rarefactioncurvedata.h" #include "raredisplay.h" #include "ordervector.hpp" diff --git a/rarefactioncurvedata.h b/rarefactioncurvedata.h index fad613b..ecbdbfd 100644 --- a/rarefactioncurvedata.h +++ b/rarefactioncurvedata.h @@ -6,8 +6,6 @@ #include "display.h" #include "observable.h" -using namespace std; - /***********************************************************************/ class RarefactionCurveData : public Observable { diff --git a/readclustal.h b/readclustal.h index 547112c..cedcaa7 100644 --- a/readclustal.h +++ b/readclustal.h @@ -9,7 +9,6 @@ * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. * */ -using namespace std; #include "readseqs.h" #include "globaldata.hpp" diff --git a/readfasta.cpp b/readfasta.cpp index e1f22ce..fcac6bd 100644 --- a/readfasta.cpp +++ b/readfasta.cpp @@ -12,18 +12,7 @@ #include /*******************************************************************************/ -ReadFasta::ReadFasta(string file) : ReadSeqs(file) { - try { - } - catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the ReadTree class Function ReadTree. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } - catch(...) { - cout << "An unknown error has occurred in the ReadTree class function ReadTree. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } -} +ReadFasta::ReadFasta(string file) : ReadSeqs(file) {} /*******************************************************************************/ ReadFasta::~ReadFasta(){ //for(int i = 0; i < sequencedb.getNumSeqs(); i++) @@ -31,7 +20,8 @@ ReadFasta::~ReadFasta(){ } /*******************************************************************************/ void ReadFasta::read() { - string name = ""; + try { + /*string name = ""; string sequence = ""; string temp; int count = 0; @@ -61,12 +51,104 @@ void ReadFasta::read() { } Sequence newSequence(name, sequence); - sequencedb.add(newSequence); + sequencedb.add(newSequence); */ + + string name, sequence, line; + sequence = ""; + int c; + string temp; + + + //read through file + while ((c = filehandle.get()) != EOF) { + name = ""; sequence = ""; + //is this a name + if (c == '>') { + name = readName(filehandle); + sequence = readSequence(filehandle); + }else { cout << "Error fasta in your file. Please correct." << endl; } - filehandle.close(); + //input sequence info into sequencedb + Sequence newSequence(name, sequence); + sequencedb.add(newSequence); + + //takes care of white space + gobble(filehandle); + } + + filehandle.close(); + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the ReadFasta class Function read. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the ReadFasta class function read. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } } /*********************************************************************************/ SequenceDB* ReadFasta::getDB() { return &sequencedb; } +/*******************************************************************************/ +string ReadFasta::readName(ifstream& in) { + try{ + string name = ""; + int c; + string temp; + + while ((c = in.get()) != EOF) { + //if c is not a line return + if (c != 10) { + name += c; + }else { break; } + } + + return name; + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the ReadFasta class Function readName. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the ReadFasta class function readName. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} + +/*******************************************************************************/ +string ReadFasta::readSequence(ifstream& in) { + try{ + string sequence = ""; + string line; + int pos, c; + + while (!in.eof()) { + //save position in file in case next line is a new name. + pos = in.tellg(); + line = ""; + in >> line; + //if you are at a new name + if (line[0] == '>') { + //put file pointer back since you are now at a new name + in.seekg(pos, ios::beg); + c = in.get(); //because you put it back to a newline char + break; + }else { sequence += line; } + } + + return sequence; + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the ReadFasta class Function readSequence. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the ReadFasta class function readSequence. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} +/*******************************************************************************/ + diff --git a/readfasta.h b/readfasta.h index 11cdab0..a8e398b 100644 --- a/readfasta.h +++ b/readfasta.h @@ -10,8 +10,6 @@ * */ -using namespace std; - #include "readseqs.h" #include "globaldata.hpp" #include "sequencedb.h" @@ -25,7 +23,11 @@ class ReadFasta : public ReadSeqs { ReadFasta(string); ~ReadFasta(); void read(); - SequenceDB* getDB(); + SequenceDB* getDB(); + private: + string readName(ifstream&); + string readSequence(ifstream&); + }; #endif \ No newline at end of file diff --git a/readnexus.h b/readnexus.h index 374b820..7a0efba 100644 --- a/readnexus.h +++ b/readnexus.h @@ -9,7 +9,6 @@ * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. * */ -using namespace std; #include "readseqs.h" #include "globaldata.hpp" diff --git a/readnexusal.h b/readnexusal.h index 4d0e400..ea216ec 100644 --- a/readnexusal.h +++ b/readnexusal.h @@ -10,11 +10,9 @@ * */ -using namespace std; - #include "globaldata.hpp" #include "sequencedb.h" -#include "utilities.hpp" +//#include "utilities.hpp" /**********************************************************************************/ diff --git a/readseqs.cpp b/readseqs.cpp index a1e7a50..5e0826f 100644 --- a/readseqs.cpp +++ b/readseqs.cpp @@ -8,9 +8,6 @@ */ #include "readseqs.h" -#include -#include - /*******************************************************************************/ ReadSeqs::ReadSeqs(string file) { @@ -20,11 +17,11 @@ ReadSeqs::ReadSeqs(string file) { globaldata = GlobalData::getInstance(); } catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the ReadTree class Function ReadTree. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + cout << "Standard Error: " << e.what() << " has occurred in the ReadSeqs class Function ReadSeqs. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; exit(1); } catch(...) { - cout << "An unknown error has occurred in the ReadTree class function ReadTree. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + cout << "An unknown error has occurred in the ReadSeqs class function ReadSeqs. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; exit(1); } } diff --git a/readseqs.h b/readseqs.h index bba8017..1aefcc6 100644 --- a/readseqs.h +++ b/readseqs.h @@ -10,8 +10,6 @@ * */ -using namespace std; - #include "globaldata.hpp" #include "sequencedb.h" #include "mothur.h" diff --git a/readseqsphylip.cpp b/readseqsphylip.cpp index fbb99c9..72c7d90 100644 --- a/readseqsphylip.cpp +++ b/readseqsphylip.cpp @@ -31,18 +31,7 @@ bool ReadPhylip::isSeq(string seq) { } /*******************************************************************************/ -ReadPhylip::ReadPhylip(string file) : ReadSeqs(file) { - try { - } - catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the ReadTree class Function ReadTree. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } - catch(...) { - cout << "An unknown error has occurred in the ReadTree class function ReadTree. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } -} +ReadPhylip::ReadPhylip(string file) : ReadSeqs(file) { } /*******************************************************************************/ ReadPhylip::~ReadPhylip(){ // for(int i = 0; i < sequencedb.getNumSeqs(); i++) diff --git a/readseqsphylip.h b/readseqsphylip.h index be4168d..ae2693b 100644 --- a/readseqsphylip.h +++ b/readseqsphylip.h @@ -9,7 +9,6 @@ * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. * */ -using namespace std; #include "readseqs.h" #include "globaldata.hpp" diff --git a/readtree.h b/readtree.h index 3df0e0a..c8e866a 100644 --- a/readtree.h +++ b/readtree.h @@ -9,8 +9,6 @@ * */ -using namespace std; - #include "mothur.h" #include "globaldata.hpp" #include "tree.h" diff --git a/sabundvector.cpp b/sabundvector.cpp index 04476c7..c1997d5 100644 --- a/sabundvector.cpp +++ b/sabundvector.cpp @@ -6,18 +6,17 @@ * Copyright 2008 Patrick D. Schloss. All rights resesaved. * */ -using namespace std; #include "sabundvector.hpp" #include "calculator.h" /***********************************************************************/ -SAbundVector::SAbundVector() : DataVector(), maxRank(0), numBins(0), numSeqs(0){}; +SAbundVector::SAbundVector() : DataVector(), maxRank(0), numBins(0), numSeqs(0){} /***********************************************************************/ -SAbundVector::SAbundVector(int size) : DataVector(), data(size, 0), maxRank(0), numBins(0), numSeqs(0) {}; +SAbundVector::SAbundVector(int size) : DataVector(), data(size, 0), maxRank(0), numBins(0), numSeqs(0) {} /***********************************************************************/ diff --git a/sabundvector.hpp b/sabundvector.hpp index bd657aa..769a35d 100644 --- a/sabundvector.hpp +++ b/sabundvector.hpp @@ -1,8 +1,6 @@ #ifndef SABUND_H #define SABUND_H -using namespace std; - #include "datavector.hpp" #include "rabundvector.hpp" #include "ordervector.hpp" diff --git a/screenseqscommand.h b/screenseqscommand.h index 56c9d82..425b473 100644 --- a/screenseqscommand.h +++ b/screenseqscommand.h @@ -17,7 +17,6 @@ #include "readclustal.h" #include "readseqsphylip.h" -using namespace std; class ScreenSeqsCommand : public Command { diff --git a/seqsummarycommand.h b/seqsummarycommand.h index 9b2be27..2334628 100644 --- a/seqsummarycommand.h +++ b/seqsummarycommand.h @@ -18,7 +18,6 @@ #include "readclustal.h" #include "readseqsphylip.h" -using namespace std; class SeqSummaryCommand : public Command { public: diff --git a/sequence.cpp b/sequence.cpp index 98aa7b0..e997cc2 100644 --- a/sequence.cpp +++ b/sequence.cpp @@ -7,8 +7,6 @@ * */ -using namespace std; - #include "sequence.hpp" /***********************************************************************/ diff --git a/sequence.hpp b/sequence.hpp index 904e25a..ac9384b 100644 --- a/sequence.hpp +++ b/sequence.hpp @@ -13,7 +13,6 @@ * to set and get these values for the other classes where they are needed. * * */ -using namespace std; #include "mothur.h" diff --git a/sequencedb.h b/sequencedb.h index eb89454..9ee8806 100644 --- a/sequencedb.h +++ b/sequencedb.h @@ -11,14 +11,13 @@ */ -using namespace std; +/* This class is a container to store the sequences. */ + #include "sequence.hpp" #include "calculator.h" - - class SequenceDB { public: diff --git a/shared.h b/shared.h index a3f55d5..06d558d 100644 --- a/shared.h +++ b/shared.h @@ -9,8 +9,6 @@ * Copyright 2008 Schloss Lab UMASS Amherst. All rights reserved. * */ - -using namespace std; #include "mothur.h" #include "sharedrabundvector.h" diff --git a/sharedjackknife.cpp b/sharedjackknife.cpp index 6db2d11..c1e5ff4 100644 --- a/sharedjackknife.cpp +++ b/sharedjackknife.cpp @@ -12,7 +12,7 @@ /*************************************************************************************** ***************************************************************************************/ -double SharedJackknife::simpson(int abunds[], double numInd, int numBins){ +double SharedJackknife::simpson(vector abunds, double numInd, int numBins){ double denom = numInd*(numInd-1); double sum = 0; for(int i = 0; i < numBins; i++) @@ -25,7 +25,7 @@ double SharedJackknife::simpson(int abunds[], double numInd, int numBins){ double* SharedJackknife::jackknife(){ int numBins = groups.at(0)->getNumBins()-1; - int cArray[numBins]; + vector cArray(numBins); for(int i = 0; i < numBins; i++) cArray[i] = 0; @@ -39,7 +39,7 @@ double* SharedJackknife::jackknife(){ double baseD = 1/simpson(cArray, numInd, numBins); - double pseudoVals[numBins]; + vector pseudoVals(numBins); double jackknifeEstimate = 0; for(int i = 0; i < numGroups; i++) { for(int j = 0; j < numBins-1; j++) { diff --git a/sharedjackknife.h b/sharedjackknife.h index bdec8f7..a248893 100644 --- a/sharedjackknife.h +++ b/sharedjackknife.h @@ -30,7 +30,7 @@ private: int numGroups, callCount, count; bool currentCallDone; vector groups; - double simpson(int[], double, int); + double simpson(vector, double, int); double* jackknife(); }; diff --git a/sharedlistvector.cpp b/sharedlistvector.cpp index 2dc4502..33d3692 100644 --- a/sharedlistvector.cpp +++ b/sharedlistvector.cpp @@ -7,10 +7,6 @@ * */ - -using namespace std; - - #include "sabundvector.hpp" #include "rabundvector.hpp" #include "ordervector.hpp" @@ -20,11 +16,11 @@ using namespace std; /***********************************************************************/ -SharedListVector::SharedListVector() : DataVector(), maxRank(0), numBins(0), numSeqs(0){}; +SharedListVector::SharedListVector() : DataVector(), maxRank(0), numBins(0), numSeqs(0){} /***********************************************************************/ -SharedListVector::SharedListVector(int n): DataVector(), data(n, "") , maxRank(0), numBins(0), numSeqs(0){}; +SharedListVector::SharedListVector(int n): DataVector(), data(n, "") , maxRank(0), numBins(0), numSeqs(0){} /***********************************************************************/ SharedListVector::SharedListVector(ifstream& f) : DataVector(), maxRank(0), numBins(0), numSeqs(0) { diff --git a/sharedordervector.cpp b/sharedordervector.cpp index 08692de..d0c97f9 100644 --- a/sharedordervector.cpp +++ b/sharedordervector.cpp @@ -7,9 +7,6 @@ * */ -using namespace std; - - #include "sharedordervector.h" #include "sharedutilities.h" diff --git a/sharedordervector.h b/sharedordervector.h index 30d655f..d0a714c 100644 --- a/sharedordervector.h +++ b/sharedordervector.h @@ -15,8 +15,6 @@ the group it is in and the abundance is equal to the OTU number. */ -using namespace std; - #include "datavector.hpp" struct individual { diff --git a/sharedrabundvector.cpp b/sharedrabundvector.cpp index ca24b91..94a6519 100644 --- a/sharedrabundvector.cpp +++ b/sharedrabundvector.cpp @@ -7,9 +7,6 @@ * */ - -using namespace std; - #include "sharedrabundvector.h" #include "sabundvector.hpp" #include "ordervector.hpp" @@ -18,7 +15,7 @@ using namespace std; /***********************************************************************/ -SharedRAbundVector::SharedRAbundVector() : DataVector(), maxRank(0), numBins(0), numSeqs(0) {}; +SharedRAbundVector::SharedRAbundVector() : DataVector(), maxRank(0), numBins(0), numSeqs(0) {} /***********************************************************************/ @@ -30,7 +27,7 @@ SharedRAbundVector::SharedRAbundVector(int n) : DataVector(), maxRank(0), numBin newGuy.abundance = 0; data.push_back(newGuy); } -}; +} /*********************************************************************** diff --git a/sharedsabundvector.cpp b/sharedsabundvector.cpp index 0e86977..51058cf 100644 --- a/sharedsabundvector.cpp +++ b/sharedsabundvector.cpp @@ -10,12 +10,10 @@ #include "sharedsabundvector.h" #include "sabundvector.hpp" -using namespace std; - /***********************************************************************/ -SharedSAbundVector::SharedSAbundVector() : DataVector(), maxRank(0), numBins(0), numSeqs(0){}; +SharedSAbundVector::SharedSAbundVector() : DataVector(), maxRank(0), numBins(0), numSeqs(0){} /***********************************************************************/ @@ -27,7 +25,7 @@ SharedSAbundVector::SharedSAbundVector(int size) : DataVector(), maxRank(0), num newGuy.abundance = 0; data.push_back(newGuy); } -}; +} /***********************************************************************/ diff --git a/sharedsabundvector.h b/sharedsabundvector.h index 64b8983..29b3745 100644 --- a/sharedsabundvector.h +++ b/sharedsabundvector.h @@ -23,7 +23,6 @@ An individual which knows the OTU from which it came, the group it is in and its abundance. */ -using namespace std; class SharedSAbundVector : public DataVector { diff --git a/solow.cpp b/solow.cpp index 6f14147..e227a9d 100644 --- a/solow.cpp +++ b/solow.cpp @@ -33,7 +33,7 @@ EstOutput Solow::getValues(SAbundVector* rank){ cout << "An unknown error has occurred in the Coverage class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; exit(1); } -}; +} /***********************************************************************/ diff --git a/sparsematrix.cpp b/sparsematrix.cpp index fc10d27..c4120f4 100644 --- a/sparsematrix.cpp +++ b/sparsematrix.cpp @@ -2,13 +2,11 @@ #include "sparsematrix.hpp" #include "listvector.hpp" -using namespace std; - typedef list::iterator MatData; /***********************************************************************/ -SparseMatrix::SparseMatrix() : numNodes(0), minsIndex(0), smallDist(1e6){}; +SparseMatrix::SparseMatrix() : numNodes(0), minsIndex(0), smallDist(1e6){} /***********************************************************************/ diff --git a/suffixdb.cpp b/suffixdb.cpp index b4639f9..15f7753 100644 --- a/suffixdb.cpp +++ b/suffixdb.cpp @@ -15,8 +15,6 @@ * */ -using namespace std; - #include "database.hpp" #include "sequence.hpp" #include "suffixtree.hpp" diff --git a/suffixdb.hpp b/suffixdb.hpp index 3d0b01d..15114cf 100644 --- a/suffixdb.hpp +++ b/suffixdb.hpp @@ -9,7 +9,7 @@ * Copyright 2008 Patrick D. Schloss. All rights reserved. * * This is a child class of the Database abstract datatype. The class is basically a database of suffix trees and an - * encapsulation of the method for finding the most similar tree to an inputted sequence. the suffixForest objecct + * encapsulation of the method for finding the most similar tree to an inputted sequence. the suffixForest object * is a vector of SuffixTrees, with each template sequence being represented by a different SuffixTree. The class also * provides a method to take an unaligned sequence and find the closest sequence in the suffixForest. The search * method is inspired by the article and Perl source code provided at http://www.ddj.com/web-development/184416093. I diff --git a/suffixnodes.cpp b/suffixnodes.cpp index 79826ff..8134695 100644 --- a/suffixnodes.cpp +++ b/suffixnodes.cpp @@ -15,7 +15,6 @@ #include "suffixnodes.hpp" -using namespace std; //******************************************************************************************************************** diff --git a/suffixnodes.hpp b/suffixnodes.hpp index 863a3ae..82d4be9 100644 --- a/suffixnodes.hpp +++ b/suffixnodes.hpp @@ -18,8 +18,6 @@ #include "mothur.h" -using namespace std; - //******************************************************************************************************************** class SuffixNode { diff --git a/suffixtree.cpp b/suffixtree.cpp index 56ce6ed..492460d 100644 --- a/suffixtree.cpp +++ b/suffixtree.cpp @@ -26,7 +26,6 @@ #include "suffixnodes.hpp" #include "suffixtree.hpp" -using namespace std; //******************************************************************************************************************** diff --git a/suffixtree.hpp b/suffixtree.hpp index 387d4bd..28b6fd1 100644 --- a/suffixtree.hpp +++ b/suffixtree.hpp @@ -27,8 +27,6 @@ #include "mothur.h" -using namespace std; - class SuffixNode; //******************************************************************************************************************** diff --git a/summarydata.h b/summarydata.h index 9afe0e4..4620337 100644 --- a/summarydata.h +++ b/summarydata.h @@ -6,8 +6,6 @@ #include "display.h" #include "observable.h" -using namespace std; - /***********************************************************************/ class SummaryData : public Observable { diff --git a/tree.h b/tree.h index 7fc3838..4f77e50 100644 --- a/tree.h +++ b/tree.h @@ -10,8 +10,6 @@ * */ -using namespace std; - #include "treenode.h" #include "globaldata.hpp" diff --git a/treecalculator.h b/treecalculator.h index cfd648e..16663bf 100644 --- a/treecalculator.h +++ b/treecalculator.h @@ -10,8 +10,6 @@ * */ -using namespace std; - #include "mothur.h" #include "tree.h" diff --git a/treemap.cpp b/treemap.cpp index 8e3fd58..ad8a2af 100644 --- a/treemap.cpp +++ b/treemap.cpp @@ -17,7 +17,7 @@ } /************************************************************/ - TreeMap::~TreeMap(){}; + TreeMap::~TreeMap(){} /************************************************************/ void TreeMap::readMap() { diff --git a/treenode.h b/treenode.h index df30cd3..d6163a2 100644 --- a/treenode.h +++ b/treenode.h @@ -10,8 +10,6 @@ * */ -using namespace std; - #include "mothur.h" /* This class represents a node on a tree. */ diff --git a/unifracunweightedcommand.h b/unifracunweightedcommand.h index e900af4..0a92538 100644 --- a/unifracunweightedcommand.h +++ b/unifracunweightedcommand.h @@ -17,8 +17,6 @@ #include "fileoutput.h" -using namespace std; - class GlobalData; class UnifracUnweightedCommand : public Command { diff --git a/unifracweightedcommand.h b/unifracweightedcommand.h index 5cd93a9..491d384 100644 --- a/unifracweightedcommand.h +++ b/unifracweightedcommand.h @@ -17,7 +17,6 @@ #include "sharedutilities.h" #include "fileoutput.h" -using namespace std; class GlobalData; diff --git a/uvest.h b/uvest.h index 4f86fed..86b96fd 100644 --- a/uvest.h +++ b/uvest.h @@ -12,8 +12,6 @@ /* This class implements the UVEst estimator on two groups. It is used by sharedJAbund and SharedSorensonAbund. */ - -using namespace std; #include "mothur.h" #include "sharedrabundvector.h" diff --git a/validcalculator.h b/validcalculator.h index 15ff311..ff93c58 100644 --- a/validcalculator.h +++ b/validcalculator.h @@ -9,7 +9,6 @@ * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. * */ -using namespace std; #include "mothur.h" diff --git a/validcommands.cpp b/validcommands.cpp index a4b1783..ec60b3b 100644 --- a/validcommands.cpp +++ b/validcommands.cpp @@ -20,7 +20,7 @@ ValidCommands::ValidCommands() { commands["bin.seqs"] = "bin.seqs"; commands["get.oturep"] = "get.oturep"; commands["cluster"] = "cluster"; - commands["deconvolute"] = "deconvolute"; + commands["unique.seqs"] = "unique.seqs"; commands["dist.seqs"] = "dist.seqs"; commands["dist.shared"] = "dist.shared"; commands["collect.single"] = "collect.single"; diff --git a/validcommands.h b/validcommands.h index e59316f..091281e 100644 --- a/validcommands.h +++ b/validcommands.h @@ -9,7 +9,6 @@ * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. * */ -using namespace std; #include "mothur.h" diff --git a/validparameter.cpp b/validparameter.cpp index cd3b054..5e401c1 100644 --- a/validparameter.cpp +++ b/validparameter.cpp @@ -223,7 +223,7 @@ void ValidParameters::initCommandParameters() { commandParameters["cluster"] = addParameters(clusterArray, sizeof(clusterArray)/sizeof(string)); string deconvoluteArray[] = {"fasta"}; - commandParameters["deconvolute"] = addParameters(deconvoluteArray, sizeof(deconvoluteArray)/sizeof(string)); + commandParameters["unique.seqs"] = addParameters(deconvoluteArray, sizeof(deconvoluteArray)/sizeof(string)); string collectsingleArray[] = {"freq","line","label","calc","abund","size"}; commandParameters["collect.single"] = addParameters(collectsingleArray, sizeof(collectsingleArray)/sizeof(string)); @@ -273,7 +273,7 @@ void ValidParameters::initCommandParameters() { string heatmapArray[] = {"groups","line","label","sorted","scale"}; commandParameters["heatmap"] = addParameters(heatmapArray, sizeof(heatmapArray)/sizeof(string)); - string filterseqsArray[] = {"fasta","phylip","clustal","nexus", "trump", "soft", "hard", "vertical"}; + string filterseqsArray[] = {"fasta", "trump", "soft", "hard", "vertical"}; commandParameters["filter.seqs"] = addParameters(filterseqsArray, sizeof(filterseqsArray)/sizeof(string)); string summaryseqsArray[] = {"fasta","phylip","clustal","nexus"}; @@ -303,7 +303,7 @@ void ValidParameters::initCommandParameters() { string concensusArray[] = {}; commandParameters["concensus"] = addParameters(concensusArray, sizeof(concensusArray)/sizeof(string)); - string distanceArray[] = {"fasta","phylip","clustal","nexus", "calc", "countends", "cutoff", "processors"}; + string distanceArray[] = {"fasta", "calc", "countends", "cutoff", "processors"}; commandParameters["dist.seqs"] = addParameters(distanceArray, sizeof(distanceArray)/sizeof(string)); string AlignArray[] = {"fasta", "candidate", "search", "ksize", "align", "match", "mismatch", "gapopen", "gapextend"}; diff --git a/validparameter.h b/validparameter.h index 30ba461..ff886ef 100644 --- a/validparameter.h +++ b/validparameter.h @@ -9,7 +9,6 @@ * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. * */ -using namespace std; #include "mothur.h" @@ -30,23 +29,6 @@ class ValidParameters { void initParameterRanges(); private: - map readdist; - map readotu; - map readtree; - map cluster; - map deconvolute; - map parsimony; - map collectsingle; - map collectshared; - map rarefactsingle; - map rarefactshared; - map summarysingle; - map summaryshared; - map unifracweighted; - map unifracunweighted; - map libshuff; - map heatmap; - map::iterator it; map > commandParameters; map > parameterRanges; diff --git a/venn.h b/venn.h index 35c1d1c..8a789c3 100644 --- a/venn.h +++ b/venn.h @@ -9,8 +9,6 @@ * */ -using namespace std; - #include "sabundvector.hpp" #include "sharedrabundvector.h" #include "datavector.hpp"