]> git.donarmstrong.com Git - mothur.git/commitdiff
working on citations
authorwestcott <westcott>
Wed, 11 May 2011 14:52:39 +0000 (14:52 +0000)
committerwestcott <westcott>
Wed, 11 May 2011 14:52:39 +0000 (14:52 +0000)
125 files changed:
Mothur.xcodeproj/project.pbxproj
ace.h
aligncommand.h
amovacommand.h
anosimcommand.h
bergerparker.h
blastdb.cpp
boneh.h
bootstrap.h
bootstrapsharedcommand.cpp
bstick.h
calculator.h
canberra.h
catchallcommand.h
chao1.h
chimerabellerophoncommand.h
chimeraccodecommand.h
chimeracheckcommand.h
chimerapintailcommand.h
chimeraslayercommand.h
classifyotucommand.h
classifyseqscommand.h
clearcutcommand.h
clustercommand.h
clusterdoturcommand.h
clustersplitcommand.h
collectcommand.cpp
collectcommand.h
collectsharedcommand.cpp
collectsharedcommand.h
corraxescommand.h
coverage.h
dist.h
distancecommand.h
eachgapdist.h
efron.h
geom.h
getcommandinfocommand.cpp
goodscoverage.h
gower.h
hamming.h
hclustercommand.h
heatmapsimcommand.cpp
heip.h
hellinger.h
homovacommand.h
indicatorcommand.h
invsimpson.h
jackknife.h
libshuffcommand.h
logsd.h
manhattan.h
mantelcommand.h
matrixoutputcommand.cpp
memchi2.h
memchord.h
memeuclidean.h
mempearson.h
metastatscommand.h
mgclustercommand.h
nmdscommand.h
npshannon.h
nseqs.h
odum.h
pairwiseseqscommand.h
parsimonycommand.h
pcacommand.h
pcoacommand.h
phylodiversitycommand.h
qstat.h
rarefactcommand.cpp
rarefactcommand.h
rarefactsharedcommand.cpp
rarefactsharedcommand.h
sensspeccommand.h
shannon.h
shannoneven.h
sharedace.h
sharedanderberg.h [deleted file]
sharedanderbergs.h
sharedbraycurtis.h
sharedchao1.h
sharedjabund.h
sharedjackknife.h
sharedjclass.h
sharedjest.h
sharedkstest.h
sharedkulczynski.h
sharedkulczynskicody.h
sharedlennon.h
sharedmarczewski.h
sharedmorisitahorn.h
sharednseqs.h
sharedochiai.h
sharedsobs.h
sharedsobscollectsummary.h
sharedsorabund.h
sharedsorclass.h
sharedsorest.h
sharedthetan.h
sharedthetayc.h
shen.h
simpson.h
simpsoneven.h
smithwilson.h
sobs.h
soergel.h
solow.h
spearman.h
speciesprofile.h
structchi2.h
structchord.h
structeuclidean.h
structkulczynski.h
structpearson.h
summarycommand.cpp
summarysharedcommand.cpp
treegroupscommand.cpp
trimseqscommand.cpp
unifracunweightedcommand.h
unifracweightedcommand.h
validcalculator.cpp
validcalculator.h
venncommand.cpp
whittaker.h

index 4d37747693cceafd0d66ea97075c0ca07cc94ec0..49ad9cceb6280f8cf38ce8a451185fdb5bda38f0 100644 (file)
                A7E9B7E812D37EC400DA6239 /* shannoneven.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = shannoneven.h; sourceTree = "<group>"; };
                A7E9B7E912D37EC400DA6239 /* sharedace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedace.cpp; sourceTree = "<group>"; };
                A7E9B7EA12D37EC400DA6239 /* sharedace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedace.h; sourceTree = "<group>"; };
-               A7E9B7EB12D37EC400DA6239 /* sharedanderberg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedanderberg.h; sourceTree = "<group>"; };
                A7E9B7EC12D37EC400DA6239 /* sharedanderbergs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedanderbergs.cpp; sourceTree = "<group>"; };
                A7E9B7ED12D37EC400DA6239 /* sharedanderbergs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedanderbergs.h; sourceTree = "<group>"; };
                A7E9B7EE12D37EC400DA6239 /* sharedbraycurtis.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedbraycurtis.cpp; sourceTree = "<group>"; };
                                A7E9B7E812D37EC400DA6239 /* shannoneven.h */,
                                A7E9B7E912D37EC400DA6239 /* sharedace.cpp */,
                                A7E9B7EA12D37EC400DA6239 /* sharedace.h */,
-                               A7E9B7EB12D37EC400DA6239 /* sharedanderberg.h */,
                                A7E9B7EC12D37EC400DA6239 /* sharedanderbergs.cpp */,
                                A7E9B7ED12D37EC400DA6239 /* sharedanderbergs.h */,
                                A7E9B7EE12D37EC400DA6239 /* sharedbraycurtis.cpp */,
diff --git a/ace.h b/ace.h
index 26d93b10014183a3ad94b0d6f991b1e68946494a..ce56b76af639b6170a3967269ffe0e561a7b3b22 100644 (file)
--- a/ace.h
+++ b/ace.h
@@ -23,6 +23,7 @@ public:
        Ace(int n) : abund(n), Calculator("ace", 3, false) {};
        EstOutput getValues(SAbundVector*);
        EstOutput getValues(vector<SharedRAbundVector*>) {return data;};
+       string getCitation() { return "http://www.mothur.org/wiki/Ace"; }
 private:
        int abund;
 };
index 1e1ebdc71188644f62dda2f1c2dbcb0d5226b29a..c0147512df11740241e9d4bd611a34b37a2d00b8 100644 (file)
@@ -27,7 +27,7 @@ public:
        string getCommandName()                 { return "align.seqs";                  }
        string getCommandCategory()             { return "Sequence Processing"; }
        string getHelpString(); 
-       string getCitation() { return "http://www.mothur.org/wiki/Align.seqs"; }
+       string getCitation() { return "DeSantis TZ, Jr., Hugenholtz P, Keller K, Brodie EL, Larsen N, Piceno YM, Phan R, Andersen GL (2006). NAST: a multiple sequence alignment server for comparative analysis of 16S rRNA genes. Nucleic Acids Res 34: W394-9.\nSchloss PD (2009). A high-throughput DNA sequence aligner for microbial ecology studies. PLoS ONE 4: e8230.\nSchloss PD (2010). The effects of alignment quality, distance calculation method, sequence filtering, and region on the analysis of 16S rRNA gene-based studies. PLoS Comput Biol 6: e1000844.\nhttp://www.mothur.org/wiki/Align.seqs http://www.mothur.org/wiki/Align.seqs"; }
        
        int execute(); 
        void help() { m->mothurOut(getHelpString()); }  
index ff82ac65f2d24ff122240d75fb326db2e03ff0c2..e9ae48176a782d40ee0eb776a9becb3d7ad2f9ad 100644 (file)
@@ -24,7 +24,7 @@ public:
        string getCommandName()                 { return "amova";                                       }
        string getCommandCategory()             { return "Hypothesis Testing";          }
        string getHelpString(); 
-       string getCitation() { return "Referenced: Anderson MJ (2001). A new method for non-parametric multivariate analysis of variance. Austral Ecol 26: 32-46. http://www.mothur.org/wiki/Amova"; }
+       string getCitation() { return "Anderson MJ (2001). A new method for non-parametric multivariate analysis of variance. Austral Ecol 26: 32-46.\nhttp://www.mothur.org/wiki/Amova"; }
        
        int execute();
        void help() { m->mothurOut(getHelpString()); }
index aad676ab17d04ef25a9f6be2faa685d3ae580fc4..593033d2fb086d9a3157ea4a27f1eae4e278e72e 100644 (file)
@@ -26,7 +26,7 @@ public:
        string getCommandName()                 { return "anosim";                                      }
        string getCommandCategory()             { return "Hypothesis Testing";          }
        string getHelpString(); 
-       string getCitation() { return "Referenced: Clarke, K. R. (1993). Non-parametric multivariate analysis of changes in community structure. _Australian Journal of Ecology_ 18, 117-143. http://www.mothur.org/wiki/Anosim"; }
+       string getCitation() { return "Clarke, K. R. (1993). Non-parametric multivariate analysis of changes in community structure. _Australian Journal of Ecology_ 18, 117-143.\nhttp://www.mothur.org/wiki/Anosim"; }
        
        int execute();
        void help() { m->mothurOut(getHelpString()); }
index 7b1dac975608834c615d467364e4f90a0c09d561..6ce6221b676ebf36ec27f835f34dd9802418f434 100644 (file)
@@ -22,6 +22,7 @@ public:
        BergerParker() : Calculator("bergerparker", 1, false) {};
        EstOutput getValues(SAbundVector*);
        EstOutput getValues(vector<SharedRAbundVector*>) {return data;};
+       string getCitation() { return "http://www.mothur.org/wiki/Bergerparker"; }
 
 private:
 };
index d227bc6a88cc8553181065680c7dc56fd1707a21..4f3047d4d3dcded81e738fba36a79abdc81e680b 100644 (file)
@@ -128,9 +128,15 @@ vector<int> BlastDB::findClosestMegaBlast(Sequence* seq, int n, int minPerID) {
                //      wordsize used in megablast.  I'm sure we're sacrificing accuracy for speed, but anyother way would take way too
                //      long.  With this setting, it seems comparable in speed to the suffix tree approach.
 //7000004128189528left 0       100             66      0       0       1       66      61      126     1e-31    131    
+               string blastCommand;
+               #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
+                       blastCommand = path + "blast/bin/megablast -e 1e-10 -d " + dbFileName + " -m 8 -b " + toString(n) + " -v " + toString(n); //-W 28 -p blastn
+                       blastCommand += (" -i " + (queryFileName+seq->getName()) + " -o " + blastFileName+seq->getName());
+               #else
+                       blastCommand = path + "blast\\bin\\megablast -e 1e-10 -d " + dbFileName + " -m 8 -b " + toString(n) + " -v " + toString(n); //-W 28 -p blastn
+                       blastCommand += (" -i " + (queryFileName+seq->getName()) + " -o " + blastFileName+seq->getName());
+               #endif
                
-               string blastCommand = path + "blast/bin/megablast -e 1e-10 -d " + dbFileName + " -m 8 -b " + toString(n) + " -v " + toString(n); //-W 28 -p blastn
-               blastCommand += (" -i " + (queryFileName+seq->getName()) + " -o " + blastFileName+seq->getName());
                system(blastCommand.c_str());
 
                ifstream m8FileHandle;
@@ -195,7 +201,13 @@ void BlastDB::generateDB() {
                for (int i = 0; i < path.length(); i++) { tempPath[i] = tolower(path[i]); }
                path = path.substr(0, (tempPath.find_last_of('m')));
        
-               string formatdbCommand = path + "blast/bin/formatdb -p F -o T -i " + dbFileName;        //      format the database, -o option gives us the ability
+               string formatdbCommand;
+               
+               #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
+                       formatdbCommand = path + "blast/bin/formatdb -p F -o T -i " + dbFileName;       //      format the database, -o option gives us the ability
+               #else
+                       formatdbCommand = path + "blast\\bin\\formatdb -p F -o T -i " + dbFileName;
+               #endif
                system(formatdbCommand.c_str());                                                                //      to get the right sequence names, i think. -p F
                                                                                                                                        //      option tells formatdb that seqs are DNA, not prot
                //m->mothurOut("DONE."); m->mothurOutEndLine(); m->mothurOutEndLine(); cout.flush();
diff --git a/boneh.h b/boneh.h
index d2d06c0fb0128b8870b5216b0d4ab779d2542155..d16ffa72ef48f0cd012bda5b1e00068f3b52afc3 100644 (file)
--- a/boneh.h
+++ b/boneh.h
@@ -23,6 +23,7 @@ public:
        Boneh(int size) : f(size), Calculator("boneh", 1, false) {};
        EstOutput getValues(SAbundVector*);     
        EstOutput getValues(vector<SharedRAbundVector*>) {return data;};
+       string getCitation() { return "http://www.mothur.org/wiki/Boneh"; }
 private:
        double getV(double, double, double);
        int f;
index 70fdf0512038c2babe35b0894b2e196db97e5de5..962780a767258830f895a3033676cf08adfd20d2 100644 (file)
@@ -23,6 +23,7 @@ public:
        Bootstrap() : Calculator("bootstrap", 1, false) {};
        EstOutput getValues(SAbundVector*);
        EstOutput getValues(vector<SharedRAbundVector*>) {return data;};
+       string getCitation() { return "http://www.mothur.org/wiki/Bootstrap"; }
        
 };
 
index cc0cfb63f37c4adad6c4965f9e419f0733100ef3..f63f2f496d05ac403cc7584db343067771e5ebb7 100644 (file)
@@ -144,6 +144,11 @@ BootSharedCommand::BootSharedCommand(string option) {
                                 if (calc == "default")  {  calc = "jclass-thetayc";  }
                        }
                        m->splitAtDash(calc, Estimators);
+                       if (m->inUsersGroups("citation", Estimators)) { 
+                               ValidCalculators validCalc; validCalc.printCitations(Estimators); 
+                               //remove citation from list of calcs
+                               for (int i = 0; i < Estimators.size(); i++) { if (Estimators[i] == "citation") {  Estimators.erase(Estimators.begin()+i); break; } }
+                       }
 
                        string temp;
                        temp = validParameter.validFile(parameters, "iters", false);  if (temp == "not found") { temp = "1000"; }
index 476b588d64f7223cfe2222ea15f2724d6f3ecdaf..11f4b8c631d4367ee5cff46df29c4072905277fa 100644 (file)
--- a/bstick.h
+++ b/bstick.h
@@ -21,7 +21,7 @@ public:
        BStick() : Calculator("bstick", 3, false) {};
        EstOutput getValues(SAbundVector*);
        EstOutput getValues(vector<SharedRAbundVector*>) {return data;};
-
+       string getCitation() { return "http://www.mothur.org/wiki/Bstick"; }
 private:
        double invSum(int, double);
        RAbundVector getRAbundVector(SAbundVector*);
index 3be6488f8ee09be5fd0c3aa85aae960a49edb0de..2c41329cff33ff7179054969a2595fcb53d2c717 100644 (file)
@@ -33,6 +33,8 @@ public:
        virtual int getCols()           {       return cols;    }
        virtual bool getMultiple()  {   return multiple;   }
        virtual bool getNeedsAll()  {   return needsAll;   }
+       virtual string getCitation() = 0;
+       void citation() { m->mothurOut(getCitation()); m->mothurOutEndLine(); }
 protected:
        MothurOut* m;
        EstOutput data;
index 94caf8516da2ceaa0db5fedc95c28b20d7f57156..483d119230ec7ecc99fc9bb3b24cb82ed6d55634 100644 (file)
@@ -22,6 +22,7 @@ public:
        Canberra() :  Calculator("canberra", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Canberra"; }
 private:
        
 };
index c9fe28590e5d5b2082f1d7f1bf04daf4316090ef..d32989bea50e014c800b84c0de35e72b6e5c859b 100644 (file)
@@ -32,7 +32,7 @@ public:
        string getCommandName()                 { return "catchall";                    }
        string getCommandCategory()             { return "OTU-Based Approaches";        }
        string getHelpString(); 
-       string getCitation() { return "http://www.northeastern.edu/catchall/index.html http://www.mothur.org/wiki/Catchall"; }
+       string getCitation() { return "Bunge, J. (2011). Estimating the number of species with CatchAll. Forthcoming in Proceedings of the Pacific Symposium on Biocomputing 2011.\nhttp://www.northeastern.edu/catchall/index.html http://www.mothur.org/wiki/Catchall"; }
 
        int execute(); 
        void help() { m->mothurOut(getHelpString()); }  
diff --git a/chao1.h b/chao1.h
index 1322aac979c30b916370927f71102e5d265b7a0a..21224eb00d26587cb5f4c4440e9fab42d5508e79 100644 (file)
--- a/chao1.h
+++ b/chao1.h
@@ -22,6 +22,7 @@ public:
        Chao1() : Calculator("chao", 3, false) {};
        EstOutput getValues(SAbundVector*);     
        EstOutput getValues(vector<SharedRAbundVector*>) {return data;};
+       string getCitation() { return "http://www.mothur.org/wiki/Chao"; }
 };
 
 
index b048459acc058e0287dfb6b8d0744f8afc92d3e7..ce85b777eee7a1c24fba9d607b15a9d36c8dc7db 100644 (file)
@@ -27,7 +27,7 @@ public:
        string getCommandName()                 { return "chimera.bellerophon"; }
        string getCommandCategory()             { return "Sequence Processing"; }
        string getHelpString(); 
-       string getCitation() { return "http://www.mothur.org/wiki/Chimera.bellerophon"; }
+       string getCitation() { return "Huber T, Faulkner G, Hugenholtz P (2004). Bellerophon: a program to detect chimeric sequences in multiple sequence alignments. Bioinformatics 20: 2317-9. \nhttp://www.mothur.org/wiki/Chimera.bellerophon"; }
 
        
        int execute(); 
index cedec2f690f6b3c981280d41a0f9bb59777ae015..36584e091537138c8d1ab853ee99be68cbc5bcec 100644 (file)
@@ -27,7 +27,7 @@ public:
        string getCommandName()                 { return "chimera.ccode";               }
        string getCommandCategory()             { return "Sequence Processing"; }
        string getHelpString(); 
-       string getCitation() { return "Evaluating putative chimeric sequences from PCR-amplified products' paper by Juan M. Gonzalez, Johannes Zimmerman and Cesareo Saiz-Jimenez. http://www.mothur.org/wiki/Chimera.ccode"; }
+       string getCitation() { return "Gonzalez JM, Zimmermann J, Saiz-Jimenez C (2005). Evaluating putative chimeric sequences from PCR-amplified products. Bioinformatics 21: 333-7. \nhttp://www.mothur.org/wiki/Chimera.ccode"; }
        
        int execute(); 
        void help() { m->mothurOut(getHelpString()); }  
index fbd49da312ab7c5ce015857bb482d2693aafca13..9238871de8d8564bb375087800f00c06591698cb 100644 (file)
@@ -28,7 +28,7 @@ public:
        string getCommandName()                 { return "chimera.check";               }
        string getCommandCategory()             { return "Sequence Processing"; }
        string getHelpString(); 
-       string getCitation() { return "CHIMERA_CHECK version 2.7 written by Niels Larsenhttp://www.mothur.org/wiki/Chimera.check"; }
+       string getCitation() { return "CHIMERA_CHECK version 2.7 written by Niels Larsen (http://wdcm.nig.ac.jp/RDP/docs/chimera_doc.html) \nhttp://www.mothur.org/wiki/Chimera.check"; }
 
        int execute(); 
        void help() { m->mothurOut(getHelpString()); }  
index 49912c69a243391311ba08f101f595da3e0c0c97..8dec0ac7d1ec75c4f58e1aa87d03a93bd0861aa8 100644 (file)
@@ -29,9 +29,8 @@ public:
        string getCommandName()                 { return "chimera.pintail";             }
        string getCommandCategory()             { return "Sequence Processing"; }
        string getHelpString(); 
-       string getCitation() { return "At Least 1 in 20 16S rRNA Sequence Records Currently Held in the Public Repositories is Estimated To Contain Substantial Anomalies' paper by Kevin E. Ashelford 1, Nadia A. Chuzhanova 3, John C. Fry 1, Antonia J. Jones 2 and Andrew J. Weightman 1. http://www.mothur.org/wiki/Chimera.pintail"; }
+       string getCitation() { return "Ashelford KE, Chuzhanova NA, Fry JC, Jones AJ, Weightman AJ (2005). At least 1 in 20 16S rRNA sequence records currently held in public repositories is estimated to contain substantial anomalies. Appl Environ Microbiol 71: 7724-36. \nAshelford KE, Chuzhanova NA, Fry JC, Jones AJ, Weightman AJ (2006). New screening software shows that most recent large 16S rRNA gene clone libraries contain chimeras. Appl Environ Microbiol 72: 5734-41. \nhttp://www.mothur.org/wiki/Chimera.pintail"; }
 
-       
        int execute(); 
        void help() { m->mothurOut(getHelpString()); }          
 private:
index 8d2a4280c0e0c5a53eedf76192413b5fae19cb83..90f6b62f83fea0bc4abc980baacccb362e216554 100644 (file)
@@ -26,7 +26,7 @@ public:
        string getCommandName()                 { return "chimera.slayer";              }
        string getCommandCategory()             { return "Sequence Processing"; }
        string getHelpString(); 
-       string getCitation() { return "http://www.mothur.org/wiki/Chimera.slayer"; }
+       string getCitation() { return "Haas BJ, Gevers D, Earl A, Feldgarden M, Ward DV, Giannokous G, Ciulla D, Tabbaa D, Highlander SK, Sodergren E, Methe B, Desantis TZ, Petrosino JF, Knight R, Birren BW (2011). Chimeric 16S rRNA sequence formation and detection in Sanger and 454-pyrosequenced PCR amplicons. Genome Res. \nhttp://www.mothur.org/wiki/Chimera.slayer"; }
 
        
        int execute(); 
index c38a7c97111b4bd842fb7038a6faaf2acedc5d53..f6bf78dfacb99509ada0d5a87d948f9ffe3aacb2 100644 (file)
@@ -26,7 +26,7 @@ public:
        string getCommandName()                 { return "classify.otu";                }
        string getCommandCategory()             { return "Phylotype Analysis";  }
        string getHelpString(); 
-       string getCitation() { return "http://www.mothur.org/wiki/Classify.otu"; }
+       string getCitation() { return "Schloss PD, Westcott SL (2011). Assessing and improving methods used in OTU-based approaches for 16S rRNA gene sequence analysis. Appl Environ Microbiol. \nhttp://www.mothur.org/wiki/Classify.otu"; }
 
        
        int execute(); 
index b813d40223a383dfb1e5c8734ded39f4e0b0e2a5..f075b41495afc9002e2a695d47972d4d947eafc9 100644 (file)
@@ -35,7 +35,7 @@ public:
        string getCommandName()                 { return "classify.seqs";               }
        string getCommandCategory()             { return "Phylotype Analysis";  }
        string getHelpString(); 
-       string getCitation() { return "http://www.mothur.org/wiki/Classify.seqs"; }
+       string getCitation() { return "Wang Q, Garrity GM, Tiedje JM, Cole JR (2007). Naive Bayesian classifier for rapid assignment of rRNA sequences into the new bacterial taxonomy. Appl Environ Microbiol 73: 5261-7. [ for Bayesian classifier ] \nAltschul SF, Madden TL, Schaffer AA, Zhang J, Zhang Z, Miller W, Lipman DJ (1997). Gapped BLAST and PSI-BLAST: a new generation of protein database search programs. Nucleic Acids Res 25: 3389-402. [ for BLAST ] \nDeSantis TZ, Hugenholtz P, Larsen N, Rojas M, Brodie EL, Keller K, Huber T, Dalevi D, Hu P, Andersen GL (2006). Greengenes, a chimera-checked 16S rRNA gene database and workbench compatible with ARB. Appl Environ Microbiol 72: 5069-72. [ for kmer ] \nhttp://www.mothur.org/wiki/Classify.seqs"; }
 
        
        int execute(); 
index 702fd7e14cb80dc57fd62cb0a738bdf3c6fd2bbd..ee64724cc16d711a32238113a66840bd7a4954d0 100644 (file)
@@ -31,7 +31,7 @@ public:
        string getCommandName()                 { return "clearcut";                    }
        string getCommandCategory()             { return "Hypothesis Testing";  }
        string getHelpString(); 
-       string getCitation() { return "The clearcut program written by Initiative for Bioinformatics and Evolutionary Studies (IBEST) at the University of Idaho. http://www.mothur.org/wiki/Clearcut"; }
+       string getCitation() { return "Sheneman L, Evans J, Foster JA (2006). Clearcut: a fast implementation of relaxed neighbor joining. Bioinformatics 22: 2823-4. \nhttp://www.mothur.org/wiki/Clearcut"; }
        
        int execute(); 
        void help() { m->mothurOut(getHelpString()); }  
index 23f728755aadb4c4f878e299790ed8669790034a..3dd4410b6a6a7f5aec286adf2f36338c8b198fad 100644 (file)
@@ -35,7 +35,7 @@ public:
        string getCommandName()                 { return "cluster";             }
        string getCommandCategory()             { return "Clustering";  }
        string getHelpString(); 
-       string getCitation() { return "http://www.mothur.org/wiki/Cluster"; }
+       string getCitation() { return "Schloss PD, Westcott SL (2011). Assessing and improving methods used in OTU-based approaches for 16S rRNA gene sequence analysis. Appl Environ Microbiol. \nhttp://www.mothur.org/wiki/Cluster"; }
        
        int execute(); 
        void help() { m->mothurOut(getHelpString()); }  
index e76332cbd9f7c82afed60ddfc48f84c0489798bb..42be4a6d659e6b290ccdd37d3be964ad49797df4 100644 (file)
@@ -28,7 +28,7 @@ public:
        string getCommandName()                 { return "cluster.classic";             }
        string getCommandCategory()             { return "Clustering";                  }
        string getHelpString(); 
-       string getCitation() { return "http://www.mothur.org/wiki/Cluster.classic"; }
+       string getCitation() { return "Schloss PD, Handelsman J (2005). Introducing DOTUR, a computer program for defining operational taxonomic units and estimating species richness. Appl Environ Microbiol 71: 1501-6. \nhttp://www.mothur.org/wiki/Cluster.classic"; }
        
        int execute(); 
        void help() { m->mothurOut(getHelpString()); }  
index 1485613431944edb5daee6e71978af897818cba1..c1152830ecc96b6211ea6a1842841fafa411a0c5 100644 (file)
@@ -29,7 +29,7 @@ public:
        string getCommandName()                 { return "cluster.split";               }
        string getCommandCategory()             { return "Clustering";                  }
        string getHelpString(); 
-       string getCitation() { return "http://www.mothur.org/wiki/Cluster.split"; }
+       string getCitation() { return "Schloss PD, Westcott SL (2011). Assessing and improving methods used in OTU-based approaches for 16S rRNA gene sequence analysis. Appl Environ Microbiol. \nhttp://www.mothur.org/wiki/Cluster.split"; }
        
        int execute(); 
        void help() { m->mothurOut(getHelpString()); }  
index 952131436cdb111a142970f3310b4283a1be7123..7b8364b9b25d07e457508dbe5fe0153a4cc3a27f 100644 (file)
@@ -272,6 +272,11 @@ CollectCommand::CollectCommand(string option)  {
                                 if (calc == "default")  {  calc = "sobs-chao-ace-jack-shannon-npshannon-simpson";  }
                        }
                        m->splitAtDash(calc, Estimators);
+                       if (m->inUsersGroups("citation", Estimators)) { 
+                               ValidCalculators validCalc; validCalc.printCitations(Estimators); 
+                               //remove citation from list of calcs
+                               for (int i = 0; i < Estimators.size(); i++) { if (Estimators[i] == "citation") {  Estimators.erase(Estimators.begin()+i); break; } }
+                       }
 
                        string temp;
                        temp = validParameter.validFile(parameters, "freq", false);                     if (temp == "not found") { temp = "100"; }
index d250126551f88a74bcdc7afebde65763e424aab7..9e513989fd7afea15967ae029d6c48565ba6c299 100644 (file)
@@ -37,7 +37,7 @@ public:
        vector<string> setParameters();
        string getCommandName()                 { return "collect.single";                      }
        string getCommandCategory()             { return "OTU-Based Approaches";        }
-       string getCitation() { return "http://www.mothur.org/wiki/Collect.single"; }
+       string getCitation() { return "Schloss PD, Handelsman J (2006). Introducing SONS, A tool that compares the membership of microbial communities. Appl Environ Microbiol 72: 6773-9. \nhttp://www.mothur.org/wiki/Collect.single"; }
        string getHelpString(); 
        
        int execute(); 
index b9b3606cd9318dd1fe1f3d32834dfc9c29e451f6..46f49b28f7b2de79b6525c05b2110325684194da 100644 (file)
@@ -259,6 +259,11 @@ CollectSharedCommand::CollectSharedCommand(string option)  {
                                 if (calc == "default")  {  calc = "sharedsobs-sharedchao-sharedace-jabund-sorabund-jclass-sorclass-jest-sorest-thetayc-thetan";  }
                        }
                        m->splitAtDash(calc, Estimators);
+                       if (m->inUsersGroups("citation", Estimators)) { 
+                               ValidCalculators validCalc; validCalc.printCitations(Estimators); 
+                               //remove citation from list of calcs
+                               for (int i = 0; i < Estimators.size(); i++) { if (Estimators[i] == "citation") {  Estimators.erase(Estimators.begin()+i); break; } }
+                       }
                        
                        groups = validParameter.validFile(parameters, "groups", false);                 
                        if (groups == "not found") { groups = ""; }
index a10fd554a2f6e062bdecd37eb7e357d6de5283e6..3eb56fefeaa9e8d26df18df66941d33f8e12a8d3 100644 (file)
@@ -30,7 +30,7 @@ public:
        string getCommandName()                 { return "collect.shared";                      }
        string getCommandCategory()             { return "OTU-Based Approaches";        }
        string getHelpString(); 
-       string getCitation() { return "http://www.mothur.org/wiki/Collect.shared"; }
+       string getCitation() { return "Schloss PD, Handelsman J (2006). Introducing SONS, A tool that compares the membership of microbial communities. Appl Environ Microbiol 72: 6773-9. \nhttp://www.mothur.org/wiki/Collect.shared"; }
        
        int execute(); 
        void help() { m->mothurOut(getHelpString()); }  
index f4a3dfe83b13fe004239b3db4b4b110c11052c02..45b6989406fc8f5610315dbe0adb511ca4c2349b 100644 (file)
@@ -25,7 +25,7 @@ public:
        string getCommandName()                 { return "corr.axes";                           }
        string getCommandCategory()             { return "Hypothesis Testing";          }
        string getHelpString(); 
-       string getCitation() { return "http://www.mothur.org/wiki/Corr.axes"; }
+       string getCitation() { return "McCune B, Grace JB, Urban DL (2002). Analysis of ecological communities. MjM Software Design: Gleneden Beach, OR. \nLegendre P, Legendre L (1998). Numerical Ecology. Elsevier: New York. \nhttp://www.mothur.org/wiki/Corr.axes"; }
        
        int execute();
        void help() { m->mothurOut(getHelpString()); }  
index 7b89c1e6f07d420a0e8a1737fc21154d44a411ce..8d6fead9aa33a25cb0fa9b3e1a98a01c61b18722 100644 (file)
@@ -23,6 +23,7 @@ public:
        Coverage() : Calculator("coverage", 1, false) {};
        EstOutput getValues(SAbundVector*);     
        EstOutput getValues(vector<SharedRAbundVector*>) {return data;};
+       string getCitation() { return "http://www.mothur.org/wiki/Coverage"; }
 };
 
 
diff --git a/dist.h b/dist.h
index b914d0d2b1004c56812cea18ea05d0ab1a787ae3..71055ae67bab87eb434a7dbe7f9370155a7efa53 100644 (file)
--- a/dist.h
+++ b/dist.h
@@ -21,6 +21,7 @@ public:
        virtual ~Dist() {}
        virtual void calcDist(Sequence, Sequence) = 0;
        double getDist()        {       return dist;    }
+
 protected:
        double dist;
        MothurOut* m;
index 71eac7d24a63ec27a4e918c3e57484e391a89889..81267d1604ca2ba2a4551b2520cc6eeee7182a0f 100644 (file)
@@ -28,7 +28,7 @@ public:
        string getCommandName()                 { return "dist.seqs";                   }
        string getCommandCategory()             { return "Sequence Processing"; }
        string getHelpString(); 
-       string getCitation() { return "http://www.mothur.org/wiki/Dist.seqs"; }
+       string getCitation() { return "Schloss PD (2010). The effects of alignment quality, distance calculation method, sequence filtering, and region on the analysis of 16S rRNA gene-based studies. PLoS Comput Biol 6: e1000844. \nhttp://www.mothur.org/wiki/Dist.seqs"; }
        
        int execute(); 
        void help() { m->mothurOut(getHelpString()); }  
index d66b40c8878cb41cf933fbf3589e82369b72cd4c..84fe56ec58da1652d9484832b9b55ec69f420814 100644 (file)
@@ -17,6 +17,7 @@
 class eachGapDist : public Dist {
        
 public:
+       
        void calcDist(Sequence A, Sequence B){          
                int diff = 0;
                int length = 0;
diff --git a/efron.h b/efron.h
index 44aee5a89162d7604bc8d8e4cf68e137e242c2a0..e485c5399a5f75fd46f8b749b6b1196f847d0884 100644 (file)
--- a/efron.h
+++ b/efron.h
@@ -23,6 +23,7 @@ public:
        Efron(int size) : f(size), Calculator("efron", 1, false) {};
        EstOutput getValues(SAbundVector*);     
        EstOutput getValues(vector<SharedRAbundVector*>) {return data;};
+       string getCitation() { return "http://www.mothur.org/wiki/Efron"; }
 private:
        int f;
 };
diff --git a/geom.h b/geom.h
index be60de39ed6d6f6e116e886f4a7aa608739e63db..a07676b6573ada920e9770d462ddbcd8b8be196d 100644 (file)
--- a/geom.h
+++ b/geom.h
@@ -24,7 +24,7 @@ public:
 
        EstOutput getValues(SAbundVector*);
        EstOutput getValues(vector<SharedRAbundVector*>) {return data;};
-
+       string getCitation() { return "http://www.mothur.org/wiki/Geometric"; }
 private:
        double kEq(double, double);
        RAbundVector getRAbundVector(SAbundVector*);
index e75897f6bae4bf45142ec7fd8cf643fcb4e483c0..283cd405eed10282df0ded886c616cb003b7847a 100644 (file)
@@ -102,6 +102,7 @@ int GetCommandInfoCommand::execute(){
                                
                                //general info
                                out << "commandName=" << thisCommand->getCommandName() << endl;
+                               //cout << thisCommand->getCommandName() << " current citation = " << thisCommand->getCitation() << endl;
                                out << "commandCategory=" << thisCommand->getCommandCategory() << endl;
                                
                                //remove /n from help string since gui reads line by line
index 4cce78b59f2c240a31e94382decc8251dd737da3..0ec77301d115902c0f8f039dd1845e859a602ac7 100644 (file)
@@ -22,6 +22,7 @@ public:
        GoodsCoverage() : Calculator("goodscoverage", 1, false) {};
        EstOutput getValues(SAbundVector*);
        EstOutput getValues(vector<SharedRAbundVector*>) {return data;};
+       string getCitation() { return "http://www.mothur.org/wiki/GoodsCoverage"; }
 
 private:
 };
diff --git a/gower.h b/gower.h
index b6337ced3229d6a545b9c0a5cd5af952ae3103f3..a04ef10c23388e74b3e35b146886c2921c670f28 100644 (file)
--- a/gower.h
+++ b/gower.h
@@ -21,6 +21,7 @@ public:
        Gower() :  Calculator("gower", 1, false, true) {};  //the true means this calculator needs all groups to calculate the pair value
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Gower"; }
 private:
        
 };
index 6d892922752ebaacae76a614912d95b3f0ff5bde..77eb51db090efdf8710328e420da33141178e36c 100644 (file)
--- a/hamming.h
+++ b/hamming.h
@@ -22,6 +22,7 @@ public:
        Hamming() :  Calculator("hamming", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Hamming"; }
 private:
        
 };
index f27837a312bd0b10eca4108352a95003e5ae2be4..adf9f25f3bc92f4f67e15a6e84c210637de7b2ef 100644 (file)
@@ -39,7 +39,7 @@ public:
        string getCommandName()                 { return "hcluster";    }
        string getCommandCategory()             { return "Clustering";  }
        string getHelpString(); 
-       string getCitation() { return "http://www.mothur.org/wiki/Hcluster"; }
+       string getCitation() { return "Sun Y, Cai Y, Liu L, Yu F, Farrell ML, Mckendree W, Farmerie W (2009). ESPRIT: estimating species richness using large collections of 16S rRNA pyrosequences. Nucleic Acids Res 37: e76. \nhttp://www.mothur.org/wiki/Hcluster"; }
        
        int execute(); 
        void help() { m->mothurOut(getHelpString()); }  
index 0de3ffc4416f3d8e2318c64ef1a3a3cce240ed7d..92271d9dad6d3532e3463fd7e0be4ad9dcbf395c 100644 (file)
@@ -223,6 +223,11 @@ HeatMapSimCommand::HeatMapSimCommand(string option)  {
                                if (calc == "default")  {  calc = "jest-thetayc";  }
                        }
                        m->splitAtDash(calc, Estimators);
+                       if (m->inUsersGroups("citation", Estimators)) { 
+                               ValidCalculators validCalc; validCalc.printCitations(Estimators); 
+                               //remove citation from list of calcs
+                               for (int i = 0; i < Estimators.size(); i++) { if (Estimators[i] == "citation") {  Estimators.erase(Estimators.begin()+i); break; } }
+                       }
                                
                        groups = validParameter.validFile(parameters, "groups", false);                 
                        if (groups == "not found") { groups = ""; }
diff --git a/heip.h b/heip.h
index 3ae115f1deeeb6587462a1cf0cbfe7282aac8843..806b299176c9f79820bc892021c1cdc07bd83887 100644 (file)
--- a/heip.h
+++ b/heip.h
@@ -20,6 +20,7 @@ public:
        Heip() : Calculator("heip", 1, false) {};
        EstOutput getValues(SAbundVector*);
        EstOutput getValues(vector<SharedRAbundVector*>) {return data;};
+       string getCitation() { return "http://www.mothur.org/wiki/Heip"; }
 };
 
 /***********************************************************************/
index 6382685fd8bf6d437e24875da141b432fa9d99dc..a06cfcee443066edd6a80788262e95ec5f1c10f4 100644 (file)
@@ -21,6 +21,7 @@ public:
        Hellinger() :  Calculator("hellinger", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Hellinger"; }
 private:
        
 };
index 8b31cc5a65aeedfc63412c5bc200faf6ce8fb603..d9daa0e2857f3090d8100a01fd57b8e2d72d69e7 100644 (file)
@@ -27,7 +27,7 @@ public:
        string getCommandName()                 { return "homova";                                      }
        string getCommandCategory()             { return "Hypothesis Testing";          }
        string getHelpString(); 
-       string getCitation() { return "Stewart CN, Excoffier L (1996). Assessing population genetic structure and variability with RAPD data: Application to Vaccinium macrocarpon (American Cranberry). J Evol Biol 9: 153-71. http://www.mothur.org/wiki/Homova"; }
+       string getCitation() { return "Stewart CN, Excoffier L (1996). Assessing population genetic structure and variability with RAPD data: Application to Vaccinium macrocarpon (American Cranberry). J Evol Biol 9: 153-71. \nhttp://www.mothur.org/wiki/Homova"; }
        
        int execute();
        void help() { m->mothurOut(getHelpString()); }  
index 9c8c6d437470588be099c656d89942ab8d78cc61..578aa95cbd6ebd773e6595c875ef487fe4a6861b 100644 (file)
@@ -27,7 +27,7 @@ public:
        string getCommandName()                 { return "indicator";                           }
        string getCommandCategory()             { return "Hypothesis Testing";          }
        string getHelpString(); 
-       string getCitation() { return "http://www.mothur.org/wiki/Indicator"; }
+       string getCitation() { return "Dufrene M, Legendre P (1997). Species assemblages and indicator species: The need for a flexible asymmetrical approach. Ecol Monogr 67: 345-66.\n McCune B, Grace JB, Urban DL (2002). Analysis of ecological communities. MjM Software Design: Gleneden Beach, OR. \nLegendre P, Legendre L (1998). Numerical Ecology. Elsevier: New York. \nhttp://www.mothur.org/wiki/Indicator"; }
        
        int execute();
        void help() { m->mothurOut(getHelpString()); }  
index e89d8a250d55495e7833f92032f1b773dcc4aa00..1471a6cf9997c23e0c3b88cb1549ee7bb4471ac5 100644 (file)
@@ -22,6 +22,7 @@ public:
        InvSimpson() : Calculator("invsimpson", 3, false) {};
        EstOutput getValues(SAbundVector*);
        EstOutput getValues(vector<SharedRAbundVector*>) {return data;};
+       string getCitation() { return "http://www.mothur.org/wiki/InvSimpson"; }
 };
 
 /***********************************************************************/
index ce9497b7ae56b3d208c2166186a0692bcaad1087..fe9f6b618ee8ce1a6a96a9fc3ea96f94ee722848 100644 (file)
@@ -23,6 +23,7 @@ public:
        Jackknife() : Calculator("jackknife", 3, false) {       getAMatrix(); };
        EstOutput getValues(SAbundVector*);
        EstOutput getValues(vector<SharedRAbundVector*>) {return data;};
+       string getCitation() { return "http://www.mothur.org/wiki/Jackknife"; }
 
 private:
        static const int maxOrder = 30;
index 25b128157b7fb6ba9a3382542cf353bd2ab74473..96e68f39b7caee9f369a2068ac6e7519cadfef45 100644 (file)
@@ -27,7 +27,7 @@ public:
        string getCommandName()                 { return "libshuff";                            }
        string getCommandCategory()             { return "Hypothesis Testing";          }
        string getHelpString(); 
-       string getCitation() { return "http://www.mothur.org/wiki/Libshuff"; }
+       string getCitation() { return "Singleton DR, Furlong MA, Rathbun SL, Whitman WB (2001). Quantitative comparisons of 16S rRNA gene sequence libraries from environmental samples. Appl Environ Microbiol 67: 4374-6. \nSchloss PD, Larget BR, Handelsman J (2004). Integration of microbial ecology and statistics: a test to compare gene libraries. Appl Environ Microbiol 70: 5485-92. \nhttp://www.mothur.org/wiki/Libshuff"; }
        
        int execute();
        void help() { m->mothurOut(getHelpString()); }  
diff --git a/logsd.h b/logsd.h
index 70d584dec9e19c4cc5362e4e9555c103e74e1231..c9e70881e02a8abbb585ba7758bd0c326f95773b 100644 (file)
--- a/logsd.h
+++ b/logsd.h
@@ -23,6 +23,7 @@ public:
        LogSD() : Calculator("logseries", 3, false) {};
        EstOutput getValues(SAbundVector*);
        EstOutput getValues(vector<SharedRAbundVector*>) {return data;};
+       string getCitation() { return "http://www.mothur.org/wiki/LogSeries"; }
 
 private:
        double logS(double);
index 3115da6486a70d099e0713df4938f7c9d0a6bd32..91d73a820ea91fe1a871c19185981755a9b5cd69 100644 (file)
@@ -21,6 +21,7 @@ public:
        Manhattan() :  Calculator("manhattan", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Manhattan"; }
 private:
        
 };
index 1a6f27b523e24dc0e6d702649eea33dad995a876..5b2fe6f347b5090991b7f1c83cb5a534e6c0c7f1 100644 (file)
@@ -23,7 +23,7 @@ public:
        string getCommandName()                 { return "mantel";                                      }
        string getCommandCategory()             { return "Hypothesis Testing";          }
        string getHelpString(); 
-       string getCitation() { return "Sokal, R. R., & Rohlf, F. J. (1995). Biometry, 3rd edn. New York: Freeman. http://www.mothur.org/wiki/Mantel"; }
+       string getCitation() { return "McCune B, Grace JB, Urban DL (2002). Analysis of ecological communities. MjM Software Design: Gleneden Beach, OR. \nLegendre P, Legendre L (1998). Numerical Ecology. Elsevier: New York. \nhttp://www.mothur.org/wiki/Mantel"; }
        
        int execute();
        void help() { m->mothurOut(getHelpString()); }
index 4ea8f021d3046a3f25be73b201869a73b98898ce..7fbd83059dbc7ef882e889cbc7b9a7d8563d4b0c 100644 (file)
@@ -188,6 +188,11 @@ MatrixOutputCommand::MatrixOutputCommand(string option)  {
                                 if (calc == "default")  {  calc = "jclass-thetayc";  }
                        }
                        m->splitAtDash(calc, Estimators);
+                       if (m->inUsersGroups("citation", Estimators)) { 
+                               ValidCalculators validCalc; validCalc.printCitations(Estimators); 
+                               //remove citation from list of calcs
+                               for (int i = 0; i < Estimators.size(); i++) { if (Estimators[i] == "citation") {  Estimators.erase(Estimators.begin()+i); break; } }
+                       }
 
                        if (abort == false) {
                        
index a81296ccc286c29427c9083ed094eb84490b109f..c23015497def6ae5d7314798fbecce09181d232b 100644 (file)
--- a/memchi2.h
+++ b/memchi2.h
@@ -22,6 +22,7 @@ public:
        MemChi2() :  Calculator("memchi2", 1, false, true) {};  //the true means this calculator needs all groups to calculate the pair value
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Memchi2"; }
 private:
        
 };
index fc705aba286b8c1e39828c1cf0ee9b218f3d15ce..8c4628b4bf349a7ed5b4982a4f29ee54bd574e2c 100644 (file)
@@ -21,6 +21,7 @@ public:
        MemChord() :  Calculator("memchord", 1, false) {};  
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Memchord"; }
 private:
        
 };
index ae22be146333f9675ada11b45819bb8fc2013ece..aeae07adc25007829e03e292495f3993e3eec2e2 100644 (file)
@@ -21,6 +21,7 @@ public:
        MemEuclidean() :  Calculator("memeuclidean", 1, false) {};  
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Memeuclidean"; }
 private:
        
 };
index d94f2acc4f1e0fc567533330bb92bc6f27e1fd9b..c09dce3246d0d0e741083a44bb566bc34b8f2229 100644 (file)
@@ -22,6 +22,7 @@ public:
        MemPearson() :  Calculator("mempearson", 1, false) {};  
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Mempearson"; }
 private:
        
 };
index 491e0761a35712638782fe8efb13cd6427d6b7f2..04c344375b65d33796d2544eff9dd1c2b61fda07 100644 (file)
@@ -25,7 +25,7 @@ public:
        string getCommandName()                 { return "metastats";                           }
        string getCommandCategory()             { return "OTU-Based Approaches";        }
        string getHelpString(); 
-       string getCitation() { return "White, J.R., Nagarajan, N. & Pop, M. Statistical methods for detecting differentially abundant features in clinical metagenomic samples. PLoS Comput Biol 5, e1000352 (2009). http://www.mothur.org/wiki/Metastats"; }
+       string getCitation() { return "White JR, Nagarajan N, Pop M (2009). Statistical methods for detecting differentially abundant features in clinical metagenomic samples. PLoS Comput Biol 5: e1000352. \nhttp://www.mothur.org/wiki/Metastats"; }
        
        int execute(); 
        void help() { m->mothurOut(getHelpString()); }  
index d5c784e27a28bb27e6b7cbdadbb8b94e25b199b5..6ad1855ad007a36907e0c63d89b8d3d249ee2939 100644 (file)
@@ -32,7 +32,7 @@ public:
        string getCommandName()                 { return "mgcluster";   }
        string getCommandCategory()             { return "Clustering";  }
        string getHelpString(); 
-       string getCitation() { return "http://www.mothur.org/wiki/Mgcluster"; }
+       string getCitation() { return "Schloss PD, Handelsman J (2008). A statistical toolbox for metagenomics. BMC Bioinformatics 9: 34. \nhttp://www.mothur.org/wiki/Mgcluster"; }
        
        int execute(); 
        void help() { m->mothurOut(getHelpString()); }  
index f099f95a4c0baadc0d50747cac5cd18e6972439f..0b7f5a8264c18b88ca0a271089e818cd85bfd86b 100644 (file)
@@ -38,7 +38,7 @@ public:
        string getCommandName()                 { return "nmds";                                        }
        string getCommandCategory()             { return "Hypothesis Testing";          }
        string getHelpString(); 
-       string getCitation() { return "Non-metric multidimensional scaling function using the majorization algorithm from Borg & Groenen 1997, Modern Multidimensional Scaling. http://www.mothur.org/wiki/Nmds"; }
+       string getCitation() { return "Borg, Groenen (1997). Non-metric multidimensional scaling function using the majorization algorithm, in Modern Multidimensional Scaling. Ed. T.F. Cox and M.A.A. Cox. Chapman and Hall. \nhttp://www.mothur.org/wiki/Nmds"; }
        
        int execute();
        void help() { m->mothurOut(getHelpString()); }
index 2e9578b3633e4743c23d271ca56002156cbfd098..ea870d3b390fede481ce727d939ed0b34ebbf621 100644 (file)
@@ -23,6 +23,7 @@ public:
        NPShannon() : Calculator("npshannon", 1, false) {};
        EstOutput getValues(SAbundVector*);
        EstOutput getValues(vector<SharedRAbundVector*>) {return data;};
+       string getCitation() { return "http://www.mothur.org/wiki/Npshannon"; }
 private:
        
 };
diff --git a/nseqs.h b/nseqs.h
index c011f10ca0980b0461f6f77d27061835da43949a..e82684b645041a10095c681061d4b16fa6929a9f 100644 (file)
--- a/nseqs.h
+++ b/nseqs.h
@@ -44,6 +44,7 @@ public:
 
                return data;
        }
+       string getCitation() { return "http://www.mothur.org/wiki/Nseqs"; }
 };
 
 /***********************************************************************/
diff --git a/odum.h b/odum.h
index 14641fd42e26bd631a22aa7fbaeddb5e7efe1ce8..ff2a3a7a90d153076ef998175f449d05f3735452 100644 (file)
--- a/odum.h
+++ b/odum.h
@@ -22,6 +22,7 @@ public:
        Odum() :  Calculator("odum", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Odum"; }
 private:
        
 };
index 69785186caa063419a06a7dc73054344ebcfeae9..cbd5aa402e7c61d624671590313bb32cb974dc11 100644 (file)
@@ -29,7 +29,7 @@ public:
        string getCommandName()                 { return "pairwise.seqs";               }
        string getCommandCategory()             { return "Sequence Processing"; }
        string getHelpString(); 
-       string getCitation() { return "http://www.mothur.org/wiki/Pairwise.seqs"; }
+       string getCitation() { return "Needleman SB, Wunsch CD (1970). A general method applicable to the search for similarities in the amino acid sequence of two proteins. J Mol Biol 48: 443-53. [ for needleman ]\nGotoh O (1982). An improved algorithm for matching biological sequences. J Mol Biol 162: 705-8. [ for gotoh ] \nhttp://www.mothur.org/wiki/Pairwise.seqs"; }
        
        int execute(); 
        void help() { m->mothurOut(getHelpString()); }  
index 30c8332c8285466c7571c4ca275977e47f3469fe..5e5484f4687474886730e437ea3d44d6aced3ccb 100644 (file)
@@ -29,7 +29,7 @@ public:
        string getCommandName()                 { return "parsimony";                           }
        string getCommandCategory()             { return "Hypothesis Testing";          }
        string getHelpString(); 
-       string getCitation() { return "http://www.mothur.org/wiki/Parsimony"; }
+       string getCitation() { return "Slatkin M, Maddison WP (1989). A cladistic measure of gene flow inferred from the phylogenies of alleles. Genetics 123: 603-13. \nSlatkin M, Maddison WP (1990). Detecting isolation by distance using phylogenies of genes. Genetics 126: 249-60. \nMartin AP (2002). Phylogenetic approaches for describing and comparing the diversity of microbial communities. Appl Environ Microbiol 68: 3673-82. \nSchloss PD, Handelsman J (2006). Introducing TreeClimber, a test to compare microbial community structure. Appl Environ Microbiol 72: 2379-84.\nhttp://www.mothur.org/wiki/Parsimony"; }
        
        int execute();
        void help() { m->mothurOut(getHelpString()); }
index 9b4a881cb181823a58fcfa9c7962ca561e394346..f139214d6b1c0e0ac526e3df484b0168674a3f05 100644 (file)
@@ -26,7 +26,7 @@ public:
        string getCommandName()                 { return "pca";                                 }
        string getCommandCategory()             { return "Hypothesis Testing";  }
        string getHelpString(); 
-       string getCitation() { return "http://www.mothur.org/wiki/Pca"; }
+       string getCitation() { return "McCune B, Grace JB, Urban DL (2002). Analysis of ecological communities. MjM Software Design: Gleneden Beach, OR. \nLegendre P, Legendre L (1998). Numerical Ecology. Elsevier: New York. \nhttp://www.mothur.org/wiki/Pca"; }
        
        int execute(); 
        void help() { m->mothurOut(getHelpString()); }  
index d9aa270320999d4e5f35e68b1525746ec78e3ae4..5b84d48cfa913f8b640646c272c1c90ec340bd58 100644 (file)
@@ -26,7 +26,7 @@ public:
        string getCommandName()                 { return "pcoa";                                        }
        string getCommandCategory()             { return "Hypothesis Testing";          }
        string getHelpString(); 
-       string getCitation() { return "http://www.mothur.org/wiki/Pcoa"; }
+       string getCitation() { return "McCune B, Grace JB, Urban DL (2002). Analysis of ecological communities. MjM Software Design: Gleneden Beach, OR. \nLegendre P, Legendre L (1998). Numerical Ecology. Elsevier: New York. \nhttp://www.mothur.org/wiki/Pcoa"; }
        
        int execute();
        void help() { m->mothurOut(getHelpString()); }
index 1be0e07a7c01398dce1cfd1f091269bbc68fbeca..52295cf65250846036ac07fdd687832c30ef5e10 100644 (file)
@@ -27,7 +27,7 @@ class PhyloDiversityCommand : public Command {
                string getCommandName()                 { return "phylo.diversity";                     }
                string getCommandCategory()             { return "Hypothesis Testing";          }
                string getHelpString(); 
-               string getCitation() { return "http://www.mothur.org/wiki/Phylo.diversity"; }
+               string getCitation() { return "Faith DP (1994). Phylogenetic pattern and the quantification of organismal biodiversity. Philos Trans R Soc Lond B Biol Sci 345: 45-58. \nhttp://www.mothur.org/wiki/Phylo.diversity"; }
        
                int execute();
                void help() { m->mothurOut(getHelpString()); }
diff --git a/qstat.h b/qstat.h
index 5bc6d9e5b92f8dfdd1cce82abd08615c651ca6b1..699ba55c4910e2c565f0c282ecb21f1096a9cd60 100644 (file)
--- a/qstat.h
+++ b/qstat.h
@@ -22,6 +22,7 @@ public:
 
        EstOutput getValues(SAbundVector*);
        EstOutput getValues(vector<SharedRAbundVector*>) {return data;};
+       string getCitation() { return "http://www.mothur.org/wiki/Qstat"; }
 
 private:
        RAbundVector rdata;
index 1c04bc4384fb632db099867821b6ffb3b4d79e95..82251c4a8fad67ea36fea2d7232b2f9171d5e3f5 100644 (file)
@@ -243,6 +243,11 @@ RareFactCommand::RareFactCommand(string option)  {
                                 if (calc == "default")  {  calc = "sobs";  }
                        }
                        m->splitAtDash(calc, Estimators);
+                       if (m->inUsersGroups("citation", Estimators)) { 
+                               ValidCalculators validCalc; validCalc.printCitations(Estimators); 
+                               //remove citation from list of calcs
+                               for (int i = 0; i < Estimators.size(); i++) { if (Estimators[i] == "citation") {  Estimators.erase(Estimators.begin()+i); break; } }
+                       }
 
                        string temp;
                        temp = validParameter.validFile(parameters, "freq", false);                     if (temp == "not found") { temp = "100"; }
index 58e6819bf07ef6d63d6fbf8f4bb92a2f154bf163..0bf8a4528025eafc3f0e16955e08fbf4553ea13b 100644 (file)
@@ -27,7 +27,7 @@ public:
        string getCommandName()                 { return "rarefaction.single";          }
        string getCommandCategory()             { return "OTU-Based Approaches";        }
        string getHelpString(); 
-       string getCitation() { return "http://www.mothur.org/wiki/Rarefaction.single"; }
+       string getCitation() { return "Magurran AE (2004). Measuring biological diversity. Blackwell Pub.: Malden, Ma. \nhttp://www.mothur.org/wiki/Rarefaction.single"; }
        
        int execute(); 
        void help() { m->mothurOut(getHelpString()); }  
index 0292cba70c536b38049dc943957127ec9a0cb95f..fe92f97038eea51cd87a05608bad0e2525070c58 100644 (file)
@@ -147,6 +147,11 @@ RareFactSharedCommand::RareFactSharedCommand(string option)  {
                                 if (calc == "default")  {  calc = "sharedobserved";  }
                        }
                        m->splitAtDash(calc, Estimators);
+                       if (m->inUsersGroups("citation", Estimators)) { 
+                               ValidCalculators validCalc; validCalc.printCitations(Estimators); 
+                               //remove citation from list of calcs
+                               for (int i = 0; i < Estimators.size(); i++) { if (Estimators[i] == "citation") {  Estimators.erase(Estimators.begin()+i); break; } }
+                       }
                        
                        groups = validParameter.validFile(parameters, "groups", false);                 
                        if (groups == "not found") { groups = ""; }
index 54d0495fdc8a1ac5063c8c01ff24970cea2b02fb..7d4dc5edb76222095d0d650b93476e3218417044 100644 (file)
@@ -26,7 +26,7 @@ public:
        string getCommandName()                 { return "rarefaction.shared";          }
        string getCommandCategory()             { return "OTU-Based Approaches";        }
        string getHelpString(); 
-       string getCitation() { return "http://www.mothur.org/wiki/Rarefaction.shared"; }
+       string getCitation() { return "Magurran AE (2004). Measuring biological diversity. Blackwell Pub.: Malden, Ma. \nhttp://www.mothur.org/wiki/Rarefaction.shared"; }
        
        int execute(); 
        void help() { m->mothurOut(getHelpString()); }  
index b2833bf70fc71c24dc76c0d71910b181fc09aa3c..47d6e4e5fedfd92ec15700b931ce06681e5daf2c 100644 (file)
@@ -25,7 +25,7 @@ public:
        string getCommandName()                 { return "sens.spec";                           }
        string getCommandCategory()             { return "OTU-Based Approaches";        }
        string getHelpString(); 
-       string getCitation() { return "http://www.mothur.org/wiki/Sens.spec"; }
+       string getCitation() { return "Schloss PD, Westcott SL (2011). Assessing and improving methods used in OTU-based approaches for 16S rRNA gene sequence analysis. Appl Environ Microbiol. \nhttp://www.mothur.org/wiki/Sens.spec"; }
        
        int execute(); 
        void help() { m->mothurOut(getHelpString()); }  
index 7fbcafc71cce3c4296e924fff20ead647dc589e3..3d9ecde690dd88989c57880070be40a9406940c3 100644 (file)
--- a/shannon.h
+++ b/shannon.h
@@ -23,6 +23,7 @@ public:
        Shannon() : Calculator("shannon", 3, false) {};
        EstOutput getValues(SAbundVector* rank);
        EstOutput getValues(vector<SharedRAbundVector*>) {return data;};
+       string getCitation() { return "http://www.mothur.org/wiki/Shannon"; }
 private:
        
 };
index 5b03d72944ea9502d433249a0380aea4193312c2..44d0766d8e01074a44847a896a9fce385898a665 100644 (file)
@@ -20,6 +20,7 @@ public:
        ShannonEven() : Calculator("shannoneven", 1, false) {};
        EstOutput getValues(SAbundVector*);
        EstOutput getValues(vector<SharedRAbundVector*>) {return data;};
+       string getCitation() { return "http://www.mothur.org/wiki/Shannoneven"; }
 };
 
 /***********************************************************************/
index 94fa00632f83bdb7375a329563ba75500240c634..9ea0d6a1c901e3fb73d296d1a31c35ff11a76539 100644 (file)
@@ -22,6 +22,7 @@ public:
        SharedAce(int n=10) : abund(n),  Calculator("sharedace", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/SharedAce"; }
 private:
        int abund;
 };
diff --git a/sharedanderberg.h b/sharedanderberg.h
deleted file mode 100644 (file)
index 4de5ca2..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef SHAREDANDERBERG_H
-#define SHAREDANDERBERG_H
-/*
- *  sharedanderberg.h
- *  Mothur
- *
- *  Created by Sarah Westcott on 3/23/09.
- *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
- *
- */
-
-#include "calculator.h"
-
-/***********************************************************************/
-
-class SharedAnderberg : public Calculator  {
-       
-public:
-       SharedAnderberg() :  Calculator("anderberg", 1) {};
-       EstOutput getValues(SAbundVector*) {return data;};
-       EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
-private:
-       
-};
-
-/***********************************************************************/
-
-
-
-#endif
\ No newline at end of file
index becfe7d090e968f3040c57b3fee17be2491fa345..785e52bd414ace766da04ef41d3ac7319b97f49b 100644 (file)
@@ -19,6 +19,7 @@ class Anderberg : public Calculator  {
                Anderberg() :  Calculator("anderberg", 1, false) {};
                EstOutput getValues(SAbundVector*) {return data;};
                EstOutput getValues(vector<SharedRAbundVector*>);
+               string getCitation() { return "http://www.mothur.org/wiki/Anderberg"; }
        private:
 
 };
index 7a8ef11864d2ecbd3cfbfb559f7fbe750d99b3b2..200f08c6b27fe64c3ec7b2873158866955fe4dbe 100644 (file)
@@ -18,6 +18,7 @@ public:
        BrayCurtis() :  Calculator("braycurtis", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Braycurtis"; }
 private:
        
 };
index e802cc3012c51728866dcfa51b01049dd2c84215..ae07a8706c30fa76d1b2c975db417201a9470b5f 100644 (file)
@@ -24,6 +24,7 @@ class SharedChao1 : public Calculator  {
                SharedChao1() : Calculator("sharedchao", 1, true) {};
                EstOutput getValues(SAbundVector*) {return data;};
                EstOutput getValues(vector<SharedRAbundVector*>);
+               string getCitation() { return "http://www.mothur.org/wiki/Sharedchao"; }
        private:
                IntNode* f1root;
                IntNode* f2root;
index 1bd41988f492571e8541667350ac4d1038eeb922..083ad2393480d91cb14d297d1050f9cca637375b 100644 (file)
@@ -23,6 +23,7 @@ public:
        JAbund() :  Calculator("jabund", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Jabund"; }
 private:
        UVEst* uv;
        
index 9f4ef724cdf770da3d19a5ebd16dec36af43cc25..1e9cbf539077e570dc6c5abaa9a4500266a19e11 100644 (file)
@@ -23,6 +23,7 @@ public:
        SharedJackknife() : numGroups(-1), callCount(0), count(0), currentCallDone(true), Calculator("sharedjackknife", 3, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Sharedjackknife"; }
        
 private:
        int numGroups, callCount, count;
index 59aea193c04bb8b0c5780508225ee131a12064a4..015b8acdd4ad1f0264dd75730e47e64bc823f3a6 100644 (file)
@@ -22,6 +22,7 @@ public:
        Jclass() :  Calculator("jclass", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Jclass"; }
 private:
        
 };
index c4111bc09bb57e164c3f46d6efedf76873e1d3a7..5f0688441dddd86eea0cc515da761b0e8958d7c3 100644 (file)
@@ -23,6 +23,7 @@ public:
        Jest() :  Calculator("jest", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Jest"; }
 private:
        
 };
index 6509b5330ad56930df42ee5a7d235eb97b1b31c4..1ffae83f484721188b70002003639daedd33e013 100644 (file)
@@ -21,6 +21,7 @@ public:
        KSTest() : Calculator("kstest", 3, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Kstest"; }
 private:
 };
 
index 0bace819b5f71f1087a7e3e6b8d471c4a2862b36..675ce4dec98c1e1cbdd735cfd26572e91af64b0d 100644 (file)
@@ -20,6 +20,7 @@ public:
        Kulczynski() :  Calculator("kulczynski", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Kulczynski"; }
 private:
        
 };
index 1df563addfb2e9bc87aac225942d7fb0009f6fb9..9cb651f8e4d490f277613e441639ddf839bf2cb3 100644 (file)
@@ -21,6 +21,7 @@ public:
        KulczynskiCody() :  Calculator("kulczynskicody", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Kulczynskicody"; }
 private:
        
 };
index 77eb6295d0fcd284b5aa1bb40236217d1e0c8092..cf1831ec21ac8e41e35a71a43bee77fec6ac7f53 100644 (file)
@@ -21,6 +21,7 @@ public:
        Lennon() :  Calculator("lennon", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Lennon"; }
 private:
        
 };
index 2bbd62255f633aace94e65be27861d9d76ae55b4..66a18f7030f993ff4a2c9db5f627137bb47e33a1 100644 (file)
@@ -20,6 +20,7 @@ public:
        SharedMarczewski() : Calculator("sharedmarczewski", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Sharedmarczewski"; }
 private:
 };
 
index a7980d031fa20cf5480bd7be28ed13ed34aa9dd6..7f0b6e9387aa4ea496d3849f0e51e26f9f75bdb4 100644 (file)
@@ -20,6 +20,7 @@ public:
        MorHorn() :  Calculator("morisitahorn", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Morisitahorn"; }
 private:
        
 };
index aa989bcc5ae030ecd3f561d55671e38414b1f915..5d403fa68ba111f16245ba6979a8dccf6524961b 100644 (file)
@@ -23,6 +23,7 @@ public:
                data[0] = (double)shared[0]->getNumSeqs() + (double)shared[1]->getNumSeqs();
                return data;
        }
+       string getCitation() { return "http://www.mothur.org/wiki/Sharednseqs"; }
 };
 
 /***********************************************************************/
index 78ec0ae647d153c23a34eeba5499f1cf7299f7f3..fb799def311f79727ad124d7b7585b1af74f90ea 100644 (file)
@@ -19,6 +19,7 @@ public:
        Ochiai() :  Calculator("ochiai", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/ochiai"; }
 private:
        
 };
index e71b6b881033258b5900d41072faf7a6364a3db9..3fa32cee636d2b4e7aa328356353b77cbf377df7 100644 (file)
@@ -22,6 +22,7 @@ public:
        SharedSobs() : Calculator("sharedsobs", 1, false) {};
        EstOutput getValues(SAbundVector* rank){ return data; };
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/sharedsobs"; }
 };
 
 /***********************************************************************/
index 6c8e7c32c5f55181eed23169fff8cf6bcc9c51ae..d35a2ac56e852eba082235b871365c663496fa11 100644 (file)
@@ -21,6 +21,7 @@ public:
        SharedSobsCS() : Calculator("sharedsobs", 1, true) {};
        EstOutput getValues(SAbundVector* rank){ return data; };
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Sharedsobs"; }
 };
 
 /***********************************************************************/
index 7ec112e31b7902fd442508b562f301353a8f54be..aa8562260de55160b713605dd64a20389cd10368 100644 (file)
@@ -23,6 +23,7 @@ public:
        SorAbund() :  Calculator("sorabund", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Sorabund"; }
 private:
        UVEst* uv;
        
index dc6f14cc686361f4eb0d3e38edb25c164d579be4..49ada2d7795d3d4cca8c2c87007173c240032b4c 100644 (file)
@@ -23,6 +23,7 @@ public:
        SorClass() :  Calculator("sorclass", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Sorclass"; }
 private:
        
 };
index 94bcc32afe7b7021b4aedde1a49f6ec46687c748..904a71208590d9b4e4cb9aeda50a12329a06d004 100644 (file)
@@ -23,6 +23,7 @@ public:
        SorEst() :  Calculator("sorest", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Sorest"; }
 private:
        
 };
index b3693d6f513a330b3e4531bcae5b0cacf2f6eccd..2d30ecc9b9efdde25adad24ad762f3229b56c2d6 100644 (file)
@@ -23,6 +23,7 @@ public:
        ThetaN() :  Calculator("thetan", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Thetan"; }
 private:
        
 };
index 536306c4c573898e146521c98f30560f275bb873..b132a56e5650cd7e82b2c5dd7eed5eb2c4c8e0d3 100644 (file)
@@ -23,6 +23,7 @@ public:
        ThetaYC() :  Calculator("thetayc", 3, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Thetayc"; }
 private:
        
 };
diff --git a/shen.h b/shen.h
index 1016e4c8056c1ba6c50e6251d5459e9c7288a78f..ad0eda47c54b7d8c0f081e908471ab16eb85d717 100644 (file)
--- a/shen.h
+++ b/shen.h
@@ -23,6 +23,7 @@ public:
        Shen(int size, int n) : f(size), abund(n), Calculator("shen", 1, false) {};
        EstOutput getValues(SAbundVector*);     
        EstOutput getValues(vector<SharedRAbundVector*>) {return data;};
+       string getCitation() { return "http://www.mothur.org/wiki/Shen"; }
 private:
        int f;
        int abund;
index 02142175bf90fcc1c99d8961a93011671444ea1f..d3d93a74965dad446b1bb18ae9df11c921bb4e59 100644 (file)
--- a/simpson.h
+++ b/simpson.h
@@ -23,6 +23,7 @@ public:
        Simpson() : Calculator("simpson", 3, false) {};
        EstOutput getValues(SAbundVector*);
        EstOutput getValues(vector<SharedRAbundVector*>) {return data;};
+       string getCitation() { return "http://www.mothur.org/wiki/Simpson"; }
 };
 
 /***********************************************************************/
index 0fb89497782e141701413fd2ec652c162c18637f..b793e54430cfc1b4d3a69c33ed6d1fa341a22d0e 100644 (file)
@@ -20,6 +20,7 @@ public:
        SimpsonEven() : Calculator("simpsoneven", 1, false) {};
        EstOutput getValues(SAbundVector*);
        EstOutput getValues(vector<SharedRAbundVector*>) {return data;};
+       string getCitation() { return "http://www.mothur.org/wiki/Simpsoneven"; }
 };
 
 /***********************************************************************/
index 6e060d9b91716eb11a49ce8cfc0ec2c185222e64..46c3af9aa8c671f993ab8513750ab933d99e8090 100644 (file)
@@ -20,6 +20,7 @@ public:
        SmithWilson() : Calculator("smithwilson", 1, false) {};
        EstOutput getValues(SAbundVector*);
        EstOutput getValues(vector<SharedRAbundVector*>) {return data;};
+       string getCitation() { return "http://www.mothur.org/wiki/Smithwilson"; }
 };
 
 /***********************************************************************/
diff --git a/sobs.h b/sobs.h
index 2259244796e0cc36dbaf244dfdd69d96c2e66d9e..05956a405fca4488aa39234c87d775c5841de33c 100644 (file)
--- a/sobs.h
+++ b/sobs.h
@@ -28,6 +28,7 @@ public:
                return data;
        }
        EstOutput getValues(vector<SharedRAbundVector*>) {return data;};
+       string getCitation() { return "http://www.mothur.org/wiki/Sobs"; }
 };
 
 /***********************************************************************/
index c26473a4a1c47ba88968215ceb01401a33988bbf..11df65ead52ce49e7cb8a96233d31561f00a589e 100644 (file)
--- a/soergel.h
+++ b/soergel.h
@@ -21,6 +21,7 @@ public:
        Soergel() :  Calculator("soergel", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Soergel"; }
 private:
        
 };
diff --git a/solow.h b/solow.h
index 08501418767f61c98bde2129f762bb13b34483be..38e7776991b4e1c9e4a9c657ffd83d2ce867a7e4 100644 (file)
--- a/solow.h
+++ b/solow.h
@@ -23,6 +23,7 @@ public:
        Solow(int size) : f(size), Calculator("solow", 1, false) {};
        EstOutput getValues(SAbundVector*);     
        EstOutput getValues(vector<SharedRAbundVector*>) {return data;};
+       string getCitation() { return "http://www.mothur.org/wiki/Solow"; }
 private:
        int f;
 };
index f49d86f0cc8cb17c1553a27423a74a72b04aaefc..06a4aa9aa9521f4b5dc50040f88adccd1376d7e6 100644 (file)
@@ -22,6 +22,7 @@ public:
        Spearman() :  Calculator("spearman", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Spearman"; }
 private:
        
 };
index 1ec8dd679f0d52546800b1d9c4dfe37a82f12310..f2c5ff4fe0f46da83bd7d7e6ca293d53797ac365 100644 (file)
@@ -21,6 +21,7 @@ public:
        SpeciesProfile() :  Calculator("speciesprofile", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Speciesprofile"; }
 private:
        
 };
index 614db07f5ea06b7d2d84d5629eaabf932c996f62..a444dd3621bff28aa58547da7f9aef9c81d4b568 100644 (file)
@@ -21,6 +21,7 @@ public:
        StructChi2() :  Calculator("structchi2", 1, false, true) {};  //the true means this calculator needs all groups to calculate the pair value
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Structchi2"; }
 private:
        
 };
index f35c89070f570c32b21f7780f2e98a4aeee832c3..b92007ed2cfc97e063e350c0281c8838cbc27675 100644 (file)
@@ -21,6 +21,7 @@ public:
        StructChord() :  Calculator("structchord", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Structchord"; }
 private:
        
 };
index 37c54fc4c02ae72f3e3fdd56942ab8222e654ce7..2a7bd5c11425dd2cd0c51055409617f82882c9e5 100644 (file)
@@ -22,6 +22,7 @@ public:
        StructEuclidean() :  Calculator("structeuclidean", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Structeuclidean"; }
 private:
        
 };
index 75cd8a6e615218a16946d371917fc22e524a5b08..a0e4b9d5430df86302fb30e28a3f81ac74b88da6 100644 (file)
@@ -21,6 +21,7 @@ public:
        StructKulczynski() :  Calculator("structkulczynski", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Structkulczynski"; }
 private:
        
 };
index c3b9455c040a66afb10231cfe5522c3a4222e298..c0cbf9b0e99918af2a5e6430420e0d22045f24ea 100644 (file)
@@ -22,6 +22,7 @@ public:
        StructPearson() :  Calculator("structpearson", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Structpearson"; }
 private:
        
 };
index 076c5ebd055259f81afa75c6953be2e13936d064..4d71c07511d711ec10baad3b94ca724cbf1e320f 100644 (file)
@@ -223,6 +223,11 @@ SummaryCommand::SummaryCommand(string option)  {
                                 if (calc == "default")  {  calc = "sobs-chao-ace-jack-shannon-npshannon-simpson";  }
                        }
                        m->splitAtDash(calc, Estimators);
+                       if (m->inUsersGroups("citation", Estimators)) { 
+                               ValidCalculators validCalc; validCalc.printCitations(Estimators); 
+                               //remove citation from list of calcs
+                               for (int i = 0; i < Estimators.size(); i++) { if (Estimators[i] == "citation") {  Estimators.erase(Estimators.begin()+i); break; } }
+                       }
 
                        string temp;
                        temp = validParameter.validFile(parameters, "abund", false);            if (temp == "not found") { temp = "10"; }
index 4cc32e320bc063e52e6ee821331cc91a182bc03e..8e162eed63a4f1a4b5ca026dcb09bb60f2b31743 100644 (file)
@@ -184,6 +184,11 @@ SummarySharedCommand::SummarySharedCommand(string option)  {
                                 if (calc == "default")  {  calc = "sharedsobs-sharedchao-sharedace-jabund-sorabund-jclass-sorclass-jest-sorest-thetayc-thetan";  }
                        }
                        m->splitAtDash(calc, Estimators);
+                       if (m->inUsersGroups("citation", Estimators)) { 
+                               ValidCalculators validCalc; validCalc.printCitations(Estimators); 
+                               //remove citation from list of calcs
+                               for (int i = 0; i < Estimators.size(); i++) { if (Estimators[i] == "citation") {  Estimators.erase(Estimators.begin()+i); break; } }
+                       }
                        
                        groups = validParameter.validFile(parameters, "groups", false);                 
                        if (groups == "not found") { groups = ""; }
index b5849d3a0d23f49951161ab3c0bde4abd9af86d1..582a3233ae847f64bc74209e14c918d2b6ebdc45 100644 (file)
@@ -248,6 +248,11 @@ TreeGroupCommand::TreeGroupCommand(string option)  {
                                 if (calc == "default")  {  calc = "jclass-thetayc";  }
                        }
                        m->splitAtDash(calc, Estimators);
+                       if (m->inUsersGroups("citation", Estimators)) { 
+                               ValidCalculators validCalc; validCalc.printCitations(Estimators); 
+                               //remove citation from list of calcs
+                               for (int i = 0; i < Estimators.size(); i++) { if (Estimators[i] == "citation") {  Estimators.erase(Estimators.begin()+i); break; } }
+                       }
 
                        string temp;
                        temp = validParameter.validFile(parameters, "precision", false);                        if (temp == "not found") { temp = "100"; }
index ae37a2a421ab7e81ca0f973e3a10ca2b00bef327..6d87f89c88b1055e033f3cce1cc18e0700377ff1 100644 (file)
@@ -798,7 +798,7 @@ int TrimSeqsCommand::createProcessesCreateTrim(string filename, string qFileName
 
 int TrimSeqsCommand::setLines(string filename, string qfilename, vector<unsigned long int>& fastaFilePos, vector<unsigned long int>& qfileFilePos) {
        try {
-               
+               #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
                //set file positions for fasta file
                fastaFilePos = m->divideFile(filename, processors);
                
@@ -871,6 +871,40 @@ int TrimSeqsCommand::setLines(string filename, string qfilename, vector<unsigned
                qfileFilePos.push_back(size);
                
                return processors;
+               
+               #else
+               
+                       fastaFilePos.push_back(0); qfileFilePos.push_back(0);
+                       //get last file position of fastafile
+                       FILE * pFile;
+                       unsigned long int size;
+                       
+                       //get num bytes in file
+                       pFile = fopen (filename.c_str(),"rb");
+                       if (pFile==NULL) perror ("Error opening file");
+                       else{
+                               fseek (pFile, 0, SEEK_END);
+                               size=ftell (pFile);
+                               fclose (pFile);
+                       }
+                       fastaFilePos.push_back(size);
+                       
+                       //get last file position of fastafile
+                       FILE * qFile;
+                       
+                       //get num bytes in file
+                       qFile = fopen (qfilename.c_str(),"rb");
+                       if (qFile==NULL) perror ("Error opening file");
+                       else{
+                               fseek (qFile, 0, SEEK_END);
+                               size=ftell (qFile);
+                               fclose (qFile);
+                       }
+                       qfileFilePos.push_back(size);
+               
+                       return 1;
+               
+               #endif
        }
        catch(exception& e) {
                m->errorOut(e, "TrimSeqsCommand", "setLines");
index 74ba2b2d18ed2642804befa4f1b4dc8b21595e67..415279c9b2adad30f95a11eeef309d9d3fd3b802 100644 (file)
@@ -28,7 +28,7 @@ class UnifracUnweightedCommand : public Command {
                string getCommandName()                 { return "unifrac.unweighted";          }
                string getCommandCategory()             { return "Hypothesis Testing";          }
                string getHelpString(); 
-               string getCitation() { return "http://www.mothur.org/wiki/Unifrac.unweighted"; }
+               string getCitation() { return "Lozupone C, Knight R (2005). UniFrac: a new phylogenetic method for comparing microbial communities. Appl Environ Microbiol 71: 8228-35. \nhttp://www.mothur.org/wiki/Unifrac.unweighted"; }
        
                int execute();
                void help() { m->mothurOut(getHelpString()); }
index 2e2ba3a64f11bf35f7b6ff612bd8b32e6bdd644a..fe5d76c700a130848c9f5f3eef657a3094cda177 100644 (file)
@@ -29,7 +29,7 @@ class UnifracWeightedCommand : public Command {
                string getCommandName()                 { return "unifrac.weighted";            }
                string getCommandCategory()             { return "Hypothesis Testing";          }
                string getHelpString(); 
-               string getCitation() { return "http://www.mothur.org/wiki/Unifrac.weighted"; }
+               string getCitation() { return "Lozupone CA, Hamady M, Kelley ST, Knight R (2007). Quantitative and qualitative beta diversity measures lead to different insights into factors that structure microbial communities. Appl Environ Microbiol 73: 1576-85. \nhttp://www.mothur.org/wiki/Unifrac.weighted"; }
        
                int execute();
                void help() { m->mothurOut(getHelpString()); }
index 2798b53ba50c8f3ffd50a20fcaa7462d62a071a7..a22ece24c3c83943d90971f51026ddeb6ddd3c73 100644 (file)
  */
 
 #include "validcalculator.h"
+#include "ace.h"
+#include "sobs.h"
+#include "nseqs.h"
+#include "chao1.h"
+#include "bootstrap.h"
+#include "simpson.h"
+#include "simpsoneven.h"
+#include "invsimpson.h"
+#include "npshannon.h"
+#include "shannon.h"
+#include "smithwilson.h"
+#include "heip.h"
+#include "shannoneven.h"
+#include "jackknife.h"
+#include "geom.h"
+#include "qstat.h"
+#include "logsd.h"
+#include "bergerparker.h"
+#include "bstick.h"
+#include "goodscoverage.h"
+#include "efron.h"
+#include "boneh.h"
+#include "solow.h"
+#include "shen.h"
+#include "coverage.h"
+#include "sharedsobscollectsummary.h"
+#include "sharedchao1.h"
+#include "sharedace.h"
+#include "sharedjabund.h"
+#include "sharedsorabund.h"
+#include "sharedjclass.h"
+#include "sharedsorclass.h"
+#include "sharedjest.h"
+#include "sharedsorest.h"
+#include "sharedthetayc.h"
+#include "sharedthetan.h"
+#include "sharedkstest.h"
+#include "whittaker.h"
+#include "sharednseqs.h"
+#include "sharedochiai.h"
+#include "sharedanderbergs.h"
+#include "sharedkulczynski.h"
+#include "sharedkulczynskicody.h"
+#include "sharedlennon.h"
+#include "sharedmorisitahorn.h"
+#include "sharedbraycurtis.h"
+#include "sharedjackknife.h"
+#include "whittaker.h"
+#include "odum.h"
+#include "canberra.h"
+#include "structeuclidean.h"
+#include "structchord.h"
+#include "hellinger.h"
+#include "manhattan.h"
+#include "structpearson.h"
+#include "soergel.h"
+#include "spearman.h"
+#include "structkulczynski.h"
+#include "structchi2.h"
+#include "speciesprofile.h"
+#include "hamming.h"
+#include "gower.h"
+#include "memchi2.h"
+#include "memchord.h"
+#include "memeuclidean.h"
+#include "mempearson.h"
+#include "sharedsobs.h"
+#include "sharednseqs.h"
+
 
 /********************************************************************/
 ValidCalculators::ValidCalculators() {
        try {
-                m = MothurOut::getInstance();
+               m = MothurOut::getInstance();
+               
+               initialSingle();  
+               initialShared();
+               initialRarefaction();
+               initialSharedRarefact();
+               initialSummary();
+               initialSharedSummary();
+               initialVennSingle();
+               initialVennShared();
+               initialTreeGroups();
+               initialBoot();
+               initialDistance();
+               initialMatrix();
+               initialHeat();
+               
+               for(it = single.begin(); it != single.end(); it++) { allCalcs.insert(it->first); } 
+               for(it = shared.begin(); it != shared.end(); it++) { allCalcs.insert(it->first); } 
+               for(it = rarefaction.begin(); it != rarefaction.end(); it++) { allCalcs.insert(it->first); } 
+               for(it = summary.begin(); it != summary.end(); it++) { allCalcs.insert(it->first); } 
+               for(it = sharedrarefaction.begin(); it != sharedrarefaction.end(); it++) { allCalcs.insert(it->first); } 
+               for(it = sharedsummary.begin(); it != sharedsummary.end(); it++) { allCalcs.insert(it->first); } 
+               for(it = vennsingle.begin(); it != vennsingle.end(); it++) { allCalcs.insert(it->first); } 
+               for(it = vennshared.begin(); it != vennshared.end(); it++) { allCalcs.insert(it->first); } 
+               for(it = treegroup.begin(); it != treegroup.end(); it++) { allCalcs.insert(it->first); } 
+               for(it = matrix.begin(); it != matrix.end(); it++) { allCalcs.insert(it->first); } 
+               for(it = heat.begin(); it != heat.end(); it++) { allCalcs.insert(it->first); } 
+               for(it = boot.begin(); it != boot.end(); it++) { allCalcs.insert(it->first); } 
+               for(it = distance.begin(); it != distance.end(); it++) { allCalcs.insert(it->first); } 
                
-                initialSingle();
-                initialShared();
-                initialRarefaction();
-                initialSharedRarefact();
-                initialSummary();
-                initialSharedSummary();
-                initialVennSingle();
-                initialVennShared();
-                initialTreeGroups();
-                initialBoot();
-                initialDistance();
-                initialMatrix();
-                initialHeat();
        }
        catch(exception& e) {
                m->errorOut(e, "ValidCalculator", "ValidCalculator");
                exit(1);
        }
 }
-
 /********************************************************************/
-
 ValidCalculators::~ValidCalculators() {}
-
+/********************************************************************/
+void ValidCalculators::printCitations(vector<string> Estimators) {
+       try {
+               
+               for (int i = 0; i < Estimators.size(); i++) {
+                       //is this citation, do nothing
+                       if ((Estimators[i] == "citation") || (Estimators[i] == "default") || (Estimators[i] == "eachgap") || (Estimators[i] == "nogaps") || (Estimators[i] == "onegap")) {}
+                       //is this a valid calculator
+                       else if (allCalcs.count(Estimators[i]) != 0) {
+                               if (Estimators[i] == "sobs") { Calculator* temp = new Sobs(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               }else if (Estimators[i] == "chao") { Calculator* temp = new Chao1(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               }else if (Estimators[i] == "nseqs") { Calculator* temp = new NSeqs(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               }else if (Estimators[i] == "coverage") { Calculator* temp = new Coverage(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               }else if (Estimators[i] == "ace") { Calculator* temp = new Ace(10); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               
+                               }else if (Estimators[i] == "jack") { Calculator* temp = new Jackknife(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               }else if (Estimators[i] == "shannon") { Calculator* temp = new Shannon(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               }else if (Estimators[i] == "shannoneven") { Calculator* temp = new ShannonEven(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               }else if (Estimators[i] == "npshannon") { Calculator* temp = new NPShannon(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               }else if (Estimators[i] == "heip") { Calculator* temp = new Heip(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               
+                               }else if (Estimators[i] == "smithwilson") { Calculator* temp = new SmithWilson(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               }else if (Estimators[i] == "simpson") { Calculator* temp = new Simpson(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               }else if (Estimators[i] == "simpsoneven") { Calculator* temp = new SimpsonEven(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               }else if (Estimators[i] == "invsimpson") { Calculator* temp = new InvSimpson(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               }else if (Estimators[i] == "bootstrap") { Calculator* temp = new Bootstrap(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               
+                               }else if (Estimators[i] == "geometric") { Calculator* temp = new Geom(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               }else if (Estimators[i] == "qstat") { Calculator* temp = new QStat(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               }else if (Estimators[i] == "logseries") { Calculator* temp = new LogSD(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               }else if (Estimators[i] == "bergerparker") { Calculator* temp = new BergerParker(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               }else if (Estimators[i] == "bstick") { Calculator* temp = new BStick(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               
+                               }else if (Estimators[i] == "goodscoverage") { Calculator* temp = new GoodsCoverage(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               }else if (Estimators[i] == "efron") { Calculator* temp = new Efron(10); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               }else if (Estimators[i] == "boneh") { Calculator* temp = new Boneh(10); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;  
+                               }else if (Estimators[i] == "solow") { Calculator* temp = new Solow(10); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               }else if (Estimators[i] == "shen") { Calculator* temp = new Shen(10, 10); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               
+                               }else if (Estimators[i] == "sharedchao") { Calculator* temp = new SharedChao1(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               }else if (Estimators[i] == "sharedsobs") { Calculator* temp = new SharedSobsCS(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               }else if (Estimators[i] == "sharedace") { Calculator* temp = new SharedAce(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               }else if (Estimators[i] == "jabund") {  Calculator* temp = new JAbund(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               }else if (Estimators[i] == "sorabund") { Calculator* temp = new SorAbund(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               
+                               }else if (Estimators[i] == "jclass") { Calculator* temp = new Jclass(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               }else if (Estimators[i] == "sorclass") { Calculator* temp = new SorClass(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;  
+                               }else if (Estimators[i] == "jest") { Calculator* temp = new Jest(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               }else if (Estimators[i] == "sorest") { Calculator* temp = new SorEst(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               }else if (Estimators[i] == "thetayc") { Calculator* temp = new ThetaYC(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               
+                               }else if (Estimators[i] == "thetan") { Calculator* temp = new ThetaN(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               }else if (Estimators[i] == "kstest") { Calculator* temp = new KSTest(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               }else if (Estimators[i] == "whittaker") { Calculator* temp = new Whittaker(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               }else if (Estimators[i] == "sharednseqs") { Calculator* temp = new SharedNSeqs(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;  
+                               }else if (Estimators[i] == "ochiai") { Calculator* temp = new Ochiai(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               
+                               }else if (Estimators[i] == "anderberg") { Calculator* temp = new Anderberg(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               }else if (Estimators[i] == "skulczynski") { Calculator* temp = new Kulczynski(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               }else if (Estimators[i] == "kulczynskicody") { Calculator* temp = new KulczynskiCody(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp; 
+                               }else if (Estimators[i] == "lennon") { Calculator* temp = new Lennon(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               }else if (Estimators[i] == "morisitahorn") { Calculator* temp = new MorHorn(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               
+                               }else if (Estimators[i] == "braycurtis") { Calculator* temp = new BrayCurtis(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               }else if (Estimators[i] == "odum") { Calculator* temp = new Odum(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               }else if (Estimators[i] == "canberra") { Calculator* temp = new Canberra(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               }else if (Estimators[i] == "structeuclidean") { Calculator* temp = new StructEuclidean(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               }else if (Estimators[i] == "structchord") { Calculator* temp = new StructChord(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               
+                               }else if (Estimators[i] == "hellinger") { Calculator* temp = new Hellinger(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               }else if (Estimators[i] == "manhattan") { Calculator* temp = new Manhattan(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               }else if (Estimators[i] == "structpearson") { Calculator* temp = new StructPearson(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               }else if (Estimators[i] == "soergel") { Calculator* temp = new Soergel(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               }else if (Estimators[i] == "spearman") { Calculator* temp = new Spearman(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               
+                               }else if (Estimators[i] == "structkulczynski") { Calculator* temp = new StructKulczynski(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               }else if (Estimators[i] == "speciesprofile") { Calculator* temp = new SpeciesProfile(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               }else if (Estimators[i] == "hamming") { Calculator* temp = new Hamming(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               }else if (Estimators[i] == "structchi2") { Calculator* temp = new StructChi2(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               }else if (Estimators[i] == "gower") { Calculator* temp = new Gower(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               
+                               }else if (Estimators[i] == "memchi2") { Calculator* temp = new MemChi2(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               }else if (Estimators[i] == "memchord") { Calculator* temp = new MemChord(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               }else if (Estimators[i] == "memeuclidean") { Calculator* temp = new MemEuclidean(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               }else if (Estimators[i] == "mempearson") { Calculator* temp = new MemPearson(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               }else if (Estimators[i] == "sharedobserved") { Calculator* temp = new SharedSobs(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               }else if (Estimators[i] == "kulczynski") { Calculator* temp = new Kulczynski(); m->mothurOut(temp->getName() + ": "); temp->citation(); delete temp;
+                               }else { m->mothurOut("[ERROR]: Missing else if for " + Estimators[i] + " in printCitations."); m->mothurOutEndLine(); }
+                       }else { m->mothurOut(Estimators[i] + " is not a valid calculator, no citation will be given."); m->mothurOutEndLine(); }
+               }
+                       
+       }
+       catch(exception& e) {
+               m->errorOut(e, "ValidCalculator", "printCitations");
+               exit(1);
+       }
+}
 /********************************************************************/
 
 bool ValidCalculators::isValidCalculator(string parameter, string calculator) {
index 6cdd4ae3d9cc48176b1a525723b5b5c1cc78fdd2..59f6bb3488ddb03acdc9a8682b748e9347f04fb9 100644 (file)
@@ -25,6 +25,7 @@ class ValidCalculators {
                bool isValidCalculator(string, string);
                void printCalc(string, ostream&);
                string printCalc(string);
+               void printCitations(vector<string>);
                
        private:
                map<string, string> single;
@@ -41,6 +42,7 @@ class ValidCalculators {
                map<string, string> boot;
                map<string, string> distance;
                map<string, string>::iterator it;
+               set<string> allCalcs;
                
                void initialSingle();
                void initialShared();
index fb0560b38d6c5659fc7ae8b88af2160e6b479191..cae041704c52e7caf6c4368ca393d441a69065c9 100644 (file)
@@ -183,6 +183,11 @@ VennCommand::VennCommand(string option)  {
                                }
                        }
                        m->splitAtDash(calc, Estimators);
+                       if (m->inUsersGroups("citation", Estimators)) { 
+                               ValidCalculators validCalc; validCalc.printCitations(Estimators); 
+                               //remove citation from list of calcs
+                               for (int i = 0; i < Estimators.size(); i++) { if (Estimators[i] == "citation") {  Estimators.erase(Estimators.begin()+i); break; } }
+                       }
                        
                        string temp;
                        temp = validParameter.validFile(parameters, "abund", false);            if (temp == "not found") { temp = "10"; }
index 7ffd0cc299ebf5bf527a10a6764026c9e915ec8f..3bbd94ae22253c966af6dd82bfe63182c0b02624 100644 (file)
@@ -21,6 +21,7 @@ public:
        Whittaker() : Calculator("whittaker", 1, false) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(vector<SharedRAbundVector*>);
+       string getCitation() { return "http://www.mothur.org/wiki/Whittaker"; }
 
 };