]> git.donarmstrong.com Git - mothur.git/commitdiff
added heatmap command
authorwestcott <westcott>
Fri, 27 Mar 2009 20:09:47 +0000 (20:09 +0000)
committerwestcott <westcott>
Fri, 27 Mar 2009 20:09:47 +0000 (20:09 +0000)
Mothur.xcodeproj/project.pbxproj
collectsharedcommand.cpp
sharedanderberg.cpp [deleted file]
summarysharedcommand.cpp

index a84195d4332a491ff9c0e7f0ff7832f92eccb396..64eb04be9c26f62c31b3d161e9fe55ffafd24ea2 100644 (file)
                375873AA0F7D61240040F377 /* heatmapcommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 375873910F7D61240040F377 /* heatmapcommand.cpp */; };
                375873AB0F7D61240040F377 /* libshuffcommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 375873930F7D61240040F377 /* libshuffcommand.cpp */; };
                375873AC0F7D61240040F377 /* nocommands.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 375873950F7D61240040F377 /* nocommands.cpp */; };
-               375873AD0F7D61240040F377 /* sharedanderberg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 375873980F7D61240040F377 /* sharedanderberg.cpp */; };
                375873AE0F7D61240040F377 /* sharedbraycurtis.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3758739A0F7D61240040F377 /* sharedbraycurtis.cpp */; };
                375873AF0F7D61240040F377 /* sharedkulczynski.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3758739C0F7D61240040F377 /* sharedkulczynski.cpp */; };
                375873B00F7D61240040F377 /* sharedkulczynskicody.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3758739E0F7D61240040F377 /* sharedkulczynskicody.cpp */; };
                375873B10F7D61240040F377 /* sharedlennon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 375873A00F7D61240040F377 /* sharedlennon.cpp */; };
                375873B20F7D61240040F377 /* sharedmorisitahorn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 375873A20F7D61240040F377 /* sharedmorisitahorn.cpp */; };
                375873B30F7D61240040F377 /* sharedochiai.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 375873A50F7D61240040F377 /* sharedochiai.cpp */; };
-               375873E30F7D63B50040F377 /* sharedanderberg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 375873E20F7D63B50040F377 /* sharedanderberg.cpp */; };
                375873E70F7D63E90040F377 /* coverage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 375873E50F7D63E90040F377 /* coverage.cpp */; };
                375873EC0F7D64520040F377 /* fullmatrix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 375873EB0F7D64520040F377 /* fullmatrix.cpp */; };
                375873EF0F7D646F0040F377 /* heatmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 375873EE0F7D646F0040F377 /* heatmap.cpp */; };
                375873950F7D61240040F377 /* nocommands.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nocommands.cpp; sourceTree = "<group>"; };
                375873960F7D61240040F377 /* nocommands.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nocommands.h; sourceTree = "<group>"; };
                375873970F7D61240040F377 /* nseqs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nseqs.h; sourceTree = "<group>"; };
-               375873980F7D61240040F377 /* sharedanderberg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedanderberg.cpp; sourceTree = "<group>"; };
-               375873990F7D61240040F377 /* sharedanderberg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedanderberg.h; sourceTree = "<group>"; };
                3758739A0F7D61240040F377 /* sharedbraycurtis.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedbraycurtis.cpp; sourceTree = "<group>"; };
                3758739B0F7D61240040F377 /* sharedbraycurtis.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedbraycurtis.h; sourceTree = "<group>"; };
                3758739C0F7D61240040F377 /* sharedkulczynski.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedkulczynski.cpp; sourceTree = "<group>"; };
                375873A40F7D61240040F377 /* sharednseqs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharednseqs.h; sourceTree = "<group>"; };
                375873A50F7D61240040F377 /* sharedochiai.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedochiai.cpp; sourceTree = "<group>"; };
                375873A60F7D61240040F377 /* sharedochiai.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedochiai.h; sourceTree = "<group>"; };
-               375873E20F7D63B50040F377 /* sharedanderberg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedanderberg.cpp; sourceTree = "<group>"; };
                375873E50F7D63E90040F377 /* coverage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = coverage.cpp; sourceTree = "<group>"; };
                375873E60F7D63E90040F377 /* coverage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = coverage.h; sourceTree = "<group>"; };
                375873EA0F7D64520040F377 /* fullmatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fullmatrix.h; sourceTree = "<group>"; };
                375873F60F7D649C0040F377 /* nocommands.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nocommands.cpp; sourceTree = "<group>"; };
                375873F70F7D649C0040F377 /* nocommands.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nocommands.h; sourceTree = "<group>"; };
                375873F90F7D64AB0040F377 /* nseqs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nseqs.h; sourceTree = "<group>"; };
-               375873FA0F7D64D20040F377 /* sharedanderberg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedanderberg.h; sourceTree = "<group>"; };
                375873FB0F7D64DA0040F377 /* sharedbraycurtis.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedbraycurtis.h; sourceTree = "<group>"; };
                375873FC0F7D64DA0040F377 /* sharedbraycurtis.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedbraycurtis.cpp; sourceTree = "<group>"; };
                375873FE0F7D64EF0040F377 /* sharedkulczynski.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedkulczynski.cpp; sourceTree = "<group>"; };
                                375873950F7D61240040F377 /* nocommands.cpp */,
                                375873960F7D61240040F377 /* nocommands.h */,
                                375873970F7D61240040F377 /* nseqs.h */,
-                               375873980F7D61240040F377 /* sharedanderberg.cpp */,
-                               375873990F7D61240040F377 /* sharedanderberg.h */,
                                3758739A0F7D61240040F377 /* sharedbraycurtis.cpp */,
                                3758739B0F7D61240040F377 /* sharedbraycurtis.h */,
                                3758739C0F7D61240040F377 /* sharedkulczynski.cpp */,
                                37D9281E0F21331F001D4494 /* shannon.cpp */,
                                37D928230F21331F001D4494 /* sharedace.h */,
                                37D928220F21331F001D4494 /* sharedace.cpp */,
-                               375873FA0F7D64D20040F377 /* sharedanderberg.h */,
-                               375873E20F7D63B50040F377 /* sharedanderberg.cpp */,
                                375873FB0F7D64DA0040F377 /* sharedbraycurtis.h */,
                                375873FC0F7D64DA0040F377 /* sharedbraycurtis.cpp */,
                                EB6F01590F6AC1670048081A /* sharedbdiversity.h */,
                                375873AA0F7D61240040F377 /* heatmapcommand.cpp in Sources */,
                                375873AB0F7D61240040F377 /* libshuffcommand.cpp in Sources */,
                                375873AC0F7D61240040F377 /* nocommands.cpp in Sources */,
-                               375873AD0F7D61240040F377 /* sharedanderberg.cpp in Sources */,
                                375873AE0F7D61240040F377 /* sharedbraycurtis.cpp in Sources */,
                                375873AF0F7D61240040F377 /* sharedkulczynski.cpp in Sources */,
                                375873B00F7D61240040F377 /* sharedkulczynskicody.cpp in Sources */,
                                375873B10F7D61240040F377 /* sharedlennon.cpp in Sources */,
                                375873B20F7D61240040F377 /* sharedmorisitahorn.cpp in Sources */,
                                375873B30F7D61240040F377 /* sharedochiai.cpp in Sources */,
-                               375873E30F7D63B50040F377 /* sharedanderberg.cpp in Sources */,
                                375873E70F7D63E90040F377 /* coverage.cpp in Sources */,
                                375873EC0F7D64520040F377 /* fullmatrix.cpp in Sources */,
                                375873EF0F7D646F0040F377 /* heatmap.cpp in Sources */,
index c5b8130e40a4dea5a18930c98a5db524b8de134f..3c1ad527c1ce7e881305fb79bf08b027058e9113 100644 (file)
@@ -23,7 +23,7 @@
 #include "sharedbdiversity.h"
 #include "sharednseqs.h"
 #include "sharedochiai.h"
-#include "sharedanderberg.h"
+//#include "sharedanderberg.h"
 #include "sharedkulczynski.h"
 #include "sharedkulczynskicody.h"
 #include "sharedlennon.h"
@@ -75,8 +75,8 @@ CollectSharedCommand::CollectSharedCommand(){
                                        cDisplays.push_back(new CollectDisplay(new SharedNSeqs(), new SharedOneColumnFile(fileNameRoot+"shared.nseqs")));
                                }else if (globaldata->Estimators[i] == "sharedochiai") { 
                                        cDisplays.push_back(new CollectDisplay(new SharedOchiai(), new SharedOneColumnFile(fileNameRoot+"shared.ochiai")));
-                               }else if (globaldata->Estimators[i] == "sharedanderberg") { 
-                                       cDisplays.push_back(new CollectDisplay(new SharedAnderberg(), new SharedOneColumnFile(fileNameRoot+"shared.anderberg")));
+                               //}else if (globaldata->Estimators[i] == "sharedanderberg") { 
+                               //      cDisplays.push_back(new CollectDisplay(new SharedAnderberg(), new SharedOneColumnFile(fileNameRoot+"shared.anderberg")));
                                }else if (globaldata->Estimators[i] == "sharedkulczynski") { 
                                        cDisplays.push_back(new CollectDisplay(new SharedKulczynski(), new SharedOneColumnFile(fileNameRoot+"shared.kulczynski")));
                                }else if (globaldata->Estimators[i] == "sharedkulczynskicody") { 
diff --git a/sharedanderberg.cpp b/sharedanderberg.cpp
deleted file mode 100644 (file)
index 52745ec..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- *  sharedanderberg.cpp
- *  Mothur
- *
- *  Created by Sarah Westcott on 3/23/09.
- *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
- *
- */
-
-#include "sharedanderberg.h"
-
-/***********************************************************************/
-
-EstOutput SharedAnderberg::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
-       try {
-               int S1, S2, S12, tempA, tempB;
-               S1 = 0; S2 = 0; S12 = 0; tempA = 0; tempB = 0; 
-               
-               /*S1, S2 = number of OTUs observed or estimated in A and B 
-               S12=number of OTUs shared between A and B */
-
-               data.resize(1,0);
-               
-               for (int i = 0; i < shared1->size(); i++) {
-                       //store in temps to avoid multiple repetitive function calls
-                       tempA = shared1->getAbundance(i);
-                       tempB = shared2->getAbundance(i);
-                       
-                       if (tempA != 0) { S1++; }
-                       if (tempB != 0) { S2++; } 
-
-                       //they are shared
-                       if ((tempA != 0) && (tempB != 0)) {     S12++; }
-               }
-               
-               data[0] = S12 / ((float)((2 * S1) + (2 * S2) - (3 * S12)));
-               
-               if (isnan(data[0]) || isinf(data[0])) { data[0] = 0; }
-               
-               return data;
-       }
-       catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the SharedAnderberg class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
-               exit(1);
-       }
-       catch(...) {
-               cout << "An unknown error has occurred in the SharedAnderberg class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
-               exit(1);
-       }       
-}
-
-/***********************************************************************/
index a7c38f7726f4ff12ec876085d06dfdfea47be5e7..8b3a63f8688e557f290aa9db1acda63ae4de5426 100644 (file)
@@ -23,7 +23,7 @@
 #include "sharedkstest.h"
 #include "sharedbdiversity.h"
 #include "sharedochiai.h"
-#include "sharedanderberg.h"
+//#include "sharedanderberg.h"
 #include "sharedkulczynski.h"
 #include "sharedkulczynskicody.h"
 #include "sharedlennon.h"
@@ -72,8 +72,8 @@ SummarySharedCommand::SummarySharedCommand(){
                                        sumCalculators.push_back(new SharedNSeqs());
                                }else if (globaldata->Estimators[i] == "sharedochiai") { 
                                        sumCalculators.push_back(new SharedOchiai());
-                               }else if (globaldata->Estimators[i] == "sharedanderberg") { 
-                                       sumCalculators.push_back(new SharedAnderberg());
+                               //}else if (globaldata->Estimators[i] == "sharedanderberg") { 
+                                       //sumCalculators.push_back(new SharedAnderberg());
                                }else if (globaldata->Estimators[i] == "sharedkulczynski") { 
                                        sumCalculators.push_back(new SharedKulczynski());
                                }else if (globaldata->Estimators[i] == "sharedkulczynskicody") {