]> git.donarmstrong.com Git - mothur.git/commitdiff
added heatmap command
authorwestcott <westcott>
Fri, 27 Mar 2009 20:02:04 +0000 (20:02 +0000)
committerwestcott <westcott>
Fri, 27 Mar 2009 20:02:04 +0000 (20:02 +0000)
Mothur.xcodeproj/project.pbxproj
collectsharedcommand.cpp
commandfactory.cpp
globaldata.cpp
heatmap.cpp
heatmap.h
heatmapcommand.cpp
heatmapcommand.h
sharedkstest.cpp
utilities.hpp
validparameter.cpp

index c6e343c99a644234875b8e86756b2dbae8e1f3d8..a84195d4332a491ff9c0e7f0ff7832f92eccb396 100644 (file)
                3746107E0F4064D100460C57 /* weighted.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3746107D0F4064D100460C57 /* weighted.cpp */; };
                374610830F40652400460C57 /* unweighted.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 374610820F40652400460C57 /* unweighted.cpp */; };
                3746109D0F40657600460C57 /* unifracunweightedcommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3746109C0F40657600460C57 /* unifracunweightedcommand.cpp */; };
+               375873A70F7D61240040F377 /* coverage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3758738B0F7D61240040F377 /* coverage.cpp */; };
+               375873A80F7D61240040F377 /* fullmatrix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3758738D0F7D61240040F377 /* fullmatrix.cpp */; };
+               375873A90F7D61240040F377 /* heatmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3758738F0F7D61240040F377 /* heatmap.cpp */; };
+               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 */; };
+               375873F20F7D64800040F377 /* heatmapcommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 375873F00F7D64800040F377 /* heatmapcommand.cpp */; };
+               375873F50F7D648F0040F377 /* libshuffcommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 375873F30F7D648F0040F377 /* libshuffcommand.cpp */; };
+               375873F80F7D649C0040F377 /* nocommands.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 375873F60F7D649C0040F377 /* nocommands.cpp */; };
+               375873FD0F7D64DA0040F377 /* sharedbraycurtis.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 375873FC0F7D64DA0040F377 /* sharedbraycurtis.cpp */; };
+               375874040F7D64EF0040F377 /* sharedkulczynski.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 375873FE0F7D64EF0040F377 /* sharedkulczynski.cpp */; };
+               375874050F7D64EF0040F377 /* sharedlennon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 375873FF0F7D64EF0040F377 /* sharedlennon.cpp */; };
+               375874060F7D64EF0040F377 /* sharedkulczynskicody.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 375874020F7D64EF0040F377 /* sharedkulczynskicody.cpp */; };
+               3758740C0F7D64FC0040F377 /* sharedmorisitahorn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 375874080F7D64FC0040F377 /* sharedmorisitahorn.cpp */; };
+               3758740D0F7D64FC0040F377 /* sharedochiai.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3758740B0F7D64FC0040F377 /* sharedochiai.cpp */; };
                379293C30F2DE73400B9034A /* treemap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 379293C20F2DE73400B9034A /* treemap.cpp */; };
                379294700F2E191800B9034A /* parsimonycommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3792946F0F2E191800B9034A /* parsimonycommand.cpp */; };
                3792948A0F2E258500B9034A /* parsimony.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 379294890F2E258500B9034A /* parsimony.cpp */; };
@@ -49,7 +75,6 @@
                37D9286E0F21331F001D4494 /* listvector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37D927ED0F21331F001D4494 /* listvector.cpp */; };
                37D9286F0F21331F001D4494 /* mothur.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37D927EF0F21331F001D4494 /* mothur.cpp */; };
                37D928700F21331F001D4494 /* nameassignment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37D927F00F21331F001D4494 /* nameassignment.cpp */; };
-               37D928710F21331F001D4494 /* nocommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37D927F20F21331F001D4494 /* nocommand.cpp */; };
                37D928720F21331F001D4494 /* npshannon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37D927F40F21331F001D4494 /* npshannon.cpp */; };
                37D928730F21331F001D4494 /* ordervector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37D927F70F21331F001D4494 /* ordervector.cpp */; };
                37D928740F21331F001D4494 /* parselistcommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37D927F90F21331F001D4494 /* parselistcommand.cpp */; };
                EB6F015B0F6AC1670048081A /* sharedbdiversity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EB6F015A0F6AC1670048081A /* sharedbdiversity.cpp */; };
                EB9303EB0F534D9400E8EF26 /* logsd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EB9303EA0F534D9400E8EF26 /* logsd.cpp */; };
                EB9303F90F53517300E8EF26 /* geom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EB9303F80F53517300E8EF26 /* geom.cpp */; };
-               EBE2A41E0F7D5C6100A54BF8 /* jackknife2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EBE2A41D0F7D5C6100A54BF8 /* jackknife2.cpp */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXCopyFilesBuildPhase section */
                374610820F40652400460C57 /* unweighted.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = unweighted.cpp; sourceTree = "<group>"; };
                3746109B0F40657600460C57 /* unifracunweightedcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unifracunweightedcommand.h; sourceTree = "<group>"; };
                3746109C0F40657600460C57 /* unifracunweightedcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = unifracunweightedcommand.cpp; sourceTree = "<group>"; };
+               3758738B0F7D61240040F377 /* coverage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = coverage.cpp; sourceTree = "<group>"; };
+               3758738C0F7D61240040F377 /* coverage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = coverage.h; sourceTree = "<group>"; };
+               3758738D0F7D61240040F377 /* fullmatrix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fullmatrix.cpp; sourceTree = "<group>"; };
+               3758738E0F7D61240040F377 /* fullmatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fullmatrix.h; sourceTree = "<group>"; };
+               3758738F0F7D61240040F377 /* heatmap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = heatmap.cpp; sourceTree = "<group>"; };
+               375873900F7D61240040F377 /* heatmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = heatmap.h; sourceTree = "<group>"; };
+               375873910F7D61240040F377 /* heatmapcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = heatmapcommand.cpp; sourceTree = "<group>"; };
+               375873920F7D61240040F377 /* heatmapcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = heatmapcommand.h; sourceTree = "<group>"; };
+               375873930F7D61240040F377 /* libshuffcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = libshuffcommand.cpp; sourceTree = "<group>"; };
+               375873940F7D61240040F377 /* libshuffcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = libshuffcommand.h; sourceTree = "<group>"; };
+               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>"; };
+               3758739D0F7D61240040F377 /* sharedkulczynski.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedkulczynski.h; sourceTree = "<group>"; };
+               3758739E0F7D61240040F377 /* sharedkulczynskicody.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedkulczynskicody.cpp; sourceTree = "<group>"; };
+               3758739F0F7D61240040F377 /* sharedkulczynskicody.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedkulczynskicody.h; sourceTree = "<group>"; };
+               375873A00F7D61240040F377 /* sharedlennon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedlennon.cpp; sourceTree = "<group>"; };
+               375873A10F7D61240040F377 /* sharedlennon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedlennon.h; sourceTree = "<group>"; };
+               375873A20F7D61240040F377 /* sharedmorisitahorn.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedmorisitahorn.cpp; sourceTree = "<group>"; };
+               375873A30F7D61240040F377 /* sharedmorisitahorn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedmorisitahorn.h; 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>"; };
+               375873EB0F7D64520040F377 /* fullmatrix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fullmatrix.cpp; sourceTree = "<group>"; };
+               375873ED0F7D646F0040F377 /* heatmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = heatmap.h; sourceTree = "<group>"; };
+               375873EE0F7D646F0040F377 /* heatmap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = heatmap.cpp; sourceTree = "<group>"; };
+               375873F00F7D64800040F377 /* heatmapcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = heatmapcommand.cpp; sourceTree = "<group>"; };
+               375873F10F7D64800040F377 /* heatmapcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = heatmapcommand.h; sourceTree = "<group>"; };
+               375873F30F7D648F0040F377 /* libshuffcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = libshuffcommand.cpp; sourceTree = "<group>"; };
+               375873F40F7D648F0040F377 /* libshuffcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = libshuffcommand.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>"; };
+               375873FF0F7D64EF0040F377 /* sharedlennon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedlennon.cpp; sourceTree = "<group>"; };
+               375874000F7D64EF0040F377 /* sharedkulczynski.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedkulczynski.h; sourceTree = "<group>"; };
+               375874010F7D64EF0040F377 /* sharedlennon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedlennon.h; sourceTree = "<group>"; };
+               375874020F7D64EF0040F377 /* sharedkulczynskicody.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedkulczynskicody.cpp; sourceTree = "<group>"; };
+               375874030F7D64EF0040F377 /* sharedkulczynskicody.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedkulczynskicody.h; sourceTree = "<group>"; };
+               375874070F7D64FC0040F377 /* sharedmorisitahorn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedmorisitahorn.h; sourceTree = "<group>"; };
+               375874080F7D64FC0040F377 /* sharedmorisitahorn.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedmorisitahorn.cpp; sourceTree = "<group>"; };
+               375874090F7D64FC0040F377 /* sharedochiai.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedochiai.h; sourceTree = "<group>"; };
+               3758740A0F7D64FC0040F377 /* sharednseqs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharednseqs.h; sourceTree = "<group>"; };
+               3758740B0F7D64FC0040F377 /* sharedochiai.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedochiai.cpp; sourceTree = "<group>"; };
                379293C10F2DE73400B9034A /* treemap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = treemap.h; sourceTree = "<group>"; };
                379293C20F2DE73400B9034A /* treemap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = treemap.cpp; sourceTree = "<group>"; };
                3792946E0F2E191800B9034A /* parsimonycommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = parsimonycommand.h; sourceTree = "<group>"; };
                37D927EF0F21331F001D4494 /* mothur.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mothur.cpp; sourceTree = "<group>"; };
                37D927F00F21331F001D4494 /* nameassignment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nameassignment.cpp; sourceTree = "<group>"; };
                37D927F10F21331F001D4494 /* nameassignment.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = nameassignment.hpp; sourceTree = "<group>"; };
-               37D927F20F21331F001D4494 /* nocommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nocommand.cpp; sourceTree = "<group>"; };
-               37D927F30F21331F001D4494 /* nocommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nocommand.h; sourceTree = "<group>"; };
                37D927F40F21331F001D4494 /* npshannon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = npshannon.cpp; sourceTree = "<group>"; };
                37D927F50F21331F001D4494 /* npshannon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = npshannon.h; sourceTree = "<group>"; };
                37D927F60F21331F001D4494 /* observable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = observable.h; sourceTree = "<group>"; };
                EB9303EA0F534D9400E8EF26 /* logsd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = logsd.cpp; sourceTree = "<group>"; };
                EB9303F70F53517300E8EF26 /* geom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = geom.h; sourceTree = "<group>"; };
                EB9303F80F53517300E8EF26 /* geom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = geom.cpp; sourceTree = "<group>"; };
-               EBE2A41C0F7D5C5C00A54BF8 /* jackknife2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = jackknife2.h; path = ../jackknife2.h; sourceTree = SOURCE_ROOT; };
-               EBE2A41D0F7D5C6100A54BF8 /* jackknife2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = jackknife2.cpp; path = ../jackknife2.cpp; sourceTree = SOURCE_ROOT; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
                                37D927DD0F21331F001D4494 /* fileoutput.cpp */,
                                37D927E00F21331F001D4494 /* globaldata.hpp */,
                                37D927DF0F21331F001D4494 /* globaldata.cpp */,
+                               375873ED0F7D646F0040F377 /* heatmap.h */,
+                               375873EE0F7D646F0040F377 /* heatmap.cpp */,
                                37D927E60F21331F001D4494 /* inputdata.h */,
                                37D927E50F21331F001D4494 /* inputdata.cpp */,
                                37D927EA0F21331F001D4494 /* kmer.hpp */,
                                37D927EF0F21331F001D4494 /* mothur.cpp */,
                                37D927F10F21331F001D4494 /* nameassignment.hpp */,
                                37D927F00F21331F001D4494 /* nameassignment.cpp */,
+                               3758738B0F7D61240040F377 /* coverage.cpp */,
+                               3758738C0F7D61240040F377 /* coverage.h */,
+                               3758738D0F7D61240040F377 /* fullmatrix.cpp */,
+                               3758738E0F7D61240040F377 /* fullmatrix.h */,
+                               3758738F0F7D61240040F377 /* heatmap.cpp */,
+                               375873900F7D61240040F377 /* heatmap.h */,
+                               375873910F7D61240040F377 /* heatmapcommand.cpp */,
+                               375873920F7D61240040F377 /* heatmapcommand.h */,
+                               375873930F7D61240040F377 /* libshuffcommand.cpp */,
+                               375873940F7D61240040F377 /* libshuffcommand.h */,
+                               375873950F7D61240040F377 /* nocommands.cpp */,
+                               375873960F7D61240040F377 /* nocommands.h */,
+                               375873970F7D61240040F377 /* nseqs.h */,
+                               375873980F7D61240040F377 /* sharedanderberg.cpp */,
+                               375873990F7D61240040F377 /* sharedanderberg.h */,
+                               3758739A0F7D61240040F377 /* sharedbraycurtis.cpp */,
+                               3758739B0F7D61240040F377 /* sharedbraycurtis.h */,
+                               3758739C0F7D61240040F377 /* sharedkulczynski.cpp */,
+                               3758739D0F7D61240040F377 /* sharedkulczynski.h */,
+                               3758739E0F7D61240040F377 /* sharedkulczynskicody.cpp */,
+                               3758739F0F7D61240040F377 /* sharedkulczynskicody.h */,
+                               375873A00F7D61240040F377 /* sharedlennon.cpp */,
+                               375873A10F7D61240040F377 /* sharedlennon.h */,
+                               375873A20F7D61240040F377 /* sharedmorisitahorn.cpp */,
+                               375873A30F7D61240040F377 /* sharedmorisitahorn.h */,
+                               375873A40F7D61240040F377 /* sharednseqs.h */,
+                               375873A50F7D61240040F377 /* sharedochiai.cpp */,
+                               375873A60F7D61240040F377 /* sharedochiai.h */,
                                37D927F60F21331F001D4494 /* observable.h */,
                                37D927FC0F21331F001D4494 /* progress.hpp */,
                                37D927FB0F21331F001D4494 /* progress.cpp */,
                                37D927BD0F21331F001D4494 /* calculator.cpp */,
                                37D927B90F21331F001D4494 /* ace.h */,
                                37D927B80F21331F001D4494 /* ace.cpp */,
+                               EB1216860F619B83004A865F /* bergerparker.h */,
+                               EB1216870F619B83004A865F /* bergerparker.cpp */,
                                37D927BC0F21331F001D4494 /* bootstrap.h */,
                                37D927BB0F21331F001D4494 /* bootstrap.cpp */,
+                               EB1216E30F61ACFB004A865F /* bstick.h */,
+                               EB1216E40F61ACFB004A865F /* bstick.cpp */,
                                37D927C00F21331F001D4494 /* chao1.h */,
                                37D927BF0F21331F001D4494 /* chao1.cpp */,
+                               375873E60F7D63E90040F377 /* coverage.h */,
+                               375873E50F7D63E90040F377 /* coverage.cpp */,
                                EB9303F70F53517300E8EF26 /* geom.h */,
                                EB9303F80F53517300E8EF26 /* geom.cpp */,
-                               EB6E68170F5F1C780044E17B /* qstat.h */,
-                               EB6E68180F5F1C780044E17B /* qstat.cpp */,
                                EB9303E90F534D9400E8EF26 /* logsd.h */,
                                EB9303EA0F534D9400E8EF26 /* logsd.cpp */,
-                               EB1216860F619B83004A865F /* bergerparker.h */,
-                               EB1216870F619B83004A865F /* bergerparker.cpp */,
-                               EB1216E30F61ACFB004A865F /* bstick.h */,
-                               EB1216E40F61ACFB004A865F /* bstick.cpp */,
-                               EB1217210F61C9AC004A865F /* sharedkstest.h */,
-                               EB1217220F61C9AC004A865F /* sharedkstest.cpp */,
-                               EB6F01590F6AC1670048081A /* sharedbdiversity.h */,
-                               EB6F015A0F6AC1670048081A /* sharedbdiversity.cpp */,
-                               EBE2A41C0F7D5C5C00A54BF8 /* jackknife2.h */,
-                               EBE2A41D0F7D5C6100A54BF8 /* jackknife2.cpp */,
+                               EB6E68170F5F1C780044E17B /* qstat.h */,
+                               EB6E68180F5F1C780044E17B /* qstat.cpp */,
                                37D927E80F21331F001D4494 /* jackknife.h */,
                                37D927E70F21331F001D4494 /* jackknife.cpp */,
+                               375873F90F7D64AB0040F377 /* nseqs.h */,
                                37D927F50F21331F001D4494 /* npshannon.h */,
                                37D927F40F21331F001D4494 /* npshannon.cpp */,
                                379294880F2E258500B9034A /* parsimony.h */,
                                37D9281E0F21331F001D4494 /* shannon.cpp */,
                                37D928230F21331F001D4494 /* sharedace.h */,
                                37D928220F21331F001D4494 /* sharedace.cpp */,
+                               375873FA0F7D64D20040F377 /* sharedanderberg.h */,
+                               375873E20F7D63B50040F377 /* sharedanderberg.cpp */,
+                               375873FB0F7D64DA0040F377 /* sharedbraycurtis.h */,
+                               375873FC0F7D64DA0040F377 /* sharedbraycurtis.cpp */,
+                               EB6F01590F6AC1670048081A /* sharedbdiversity.h */,
+                               EB6F015A0F6AC1670048081A /* sharedbdiversity.cpp */,
                                37D928250F21331F001D4494 /* sharedchao1.h */,
                                37D928240F21331F001D4494 /* sharedchao1.cpp */,
                                37D928290F21331F001D4494 /* sharedjabund.h */,
                                37D9282A0F21331F001D4494 /* sharedjclass.cpp */,
                                37D9282D0F21331F001D4494 /* sharedjest.h */,
                                37D9282C0F21331F001D4494 /* sharedjest.cpp */,
+                               EB1217210F61C9AC004A865F /* sharedkstest.h */,
+                               EB1217220F61C9AC004A865F /* sharedkstest.cpp */,
+                               375873FE0F7D64EF0040F377 /* sharedkulczynski.cpp */,
+                               375873FF0F7D64EF0040F377 /* sharedlennon.cpp */,
+                               375874000F7D64EF0040F377 /* sharedkulczynski.h */,
+                               375874010F7D64EF0040F377 /* sharedlennon.h */,
+                               375874020F7D64EF0040F377 /* sharedkulczynskicody.cpp */,
+                               375874030F7D64EF0040F377 /* sharedkulczynskicody.h */,
+                               375874070F7D64FC0040F377 /* sharedmorisitahorn.h */,
+                               375874080F7D64FC0040F377 /* sharedmorisitahorn.cpp */,
+                               375874090F7D64FC0040F377 /* sharedochiai.h */,
+                               3758740A0F7D64FC0040F377 /* sharednseqs.h */,
+                               3758740B0F7D64FC0040F377 /* sharedochiai.cpp */,
                                37D928350F21331F001D4494 /* sharedsobs.h */,
                                37D928340F21331F001D4494 /* sharedsobs.cpp */,
                                37AFC71D0F445386005F492D /* sharedsobscollectsummary.h */,
                                A70B53A60F4CD7AD0064797E /* getlabelcommand.cpp */,
                                A70B53A90F4CD7AD0064797E /* getlinecommand.h */,
                                A70B53A80F4CD7AD0064797E /* getlinecommand.cpp */,
+                               375873F00F7D64800040F377 /* heatmapcommand.cpp */,
+                               375873F10F7D64800040F377 /* heatmapcommand.h */,
                                37D927E40F21331F001D4494 /* helpcommand.h */,
                                37D927E30F21331F001D4494 /* helpcommand.cpp */,
-                               37D927F30F21331F001D4494 /* nocommand.h */,
-                               37D927F20F21331F001D4494 /* nocommand.cpp */,
+                               375873F30F7D648F0040F377 /* libshuffcommand.cpp */,
+                               375873F40F7D648F0040F377 /* libshuffcommand.h */,
+                               375873F60F7D649C0040F377 /* nocommands.cpp */,
+                               375873F70F7D649C0040F377 /* nocommands.h */,
                                37D927FA0F21331F001D4494 /* parselistcommand.h */,
                                37D927F90F21331F001D4494 /* parselistcommand.cpp */,
                                3792946E0F2E191800B9034A /* parsimonycommand.h */,
                                37D927D50F21331F001D4494 /* datavector.hpp */,
                                37D927DC0F21331F001D4494 /* fastamap.h */,
                                37D927DB0F21331F001D4494 /* fastamap.cpp */,
+                               375873EA0F7D64520040F377 /* fullmatrix.h */,
+                               375873EB0F7D64520040F377 /* fullmatrix.cpp */,
                                37D927E20F21331F001D4494 /* groupmap.h */,
                                37D927E10F21331F001D4494 /* groupmap.cpp */,
                                37D927EE0F21331F001D4494 /* listvector.hpp */,
                                37D9286E0F21331F001D4494 /* listvector.cpp in Sources */,
                                37D9286F0F21331F001D4494 /* mothur.cpp in Sources */,
                                37D928700F21331F001D4494 /* nameassignment.cpp in Sources */,
-                               37D928710F21331F001D4494 /* nocommand.cpp in Sources */,
                                37D928720F21331F001D4494 /* npshannon.cpp in Sources */,
                                37D928730F21331F001D4494 /* ordervector.cpp in Sources */,
                                37D928740F21331F001D4494 /* parselistcommand.cpp in Sources */,
                                EB1216E50F61ACFB004A865F /* bstick.cpp in Sources */,
                                EB1217230F61C9AC004A865F /* sharedkstest.cpp in Sources */,
                                EB6F015B0F6AC1670048081A /* sharedbdiversity.cpp in Sources */,
-                               EBE2A41E0F7D5C6100A54BF8 /* jackknife2.cpp in Sources */,
+                               375873A70F7D61240040F377 /* coverage.cpp in Sources */,
+                               375873A80F7D61240040F377 /* fullmatrix.cpp in Sources */,
+                               375873A90F7D61240040F377 /* heatmap.cpp in Sources */,
+                               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 */,
+                               375873F20F7D64800040F377 /* heatmapcommand.cpp in Sources */,
+                               375873F50F7D648F0040F377 /* libshuffcommand.cpp in Sources */,
+                               375873F80F7D649C0040F377 /* nocommands.cpp in Sources */,
+                               375873FD0F7D64DA0040F377 /* sharedbraycurtis.cpp in Sources */,
+                               375874040F7D64EF0040F377 /* sharedkulczynski.cpp in Sources */,
+                               375874050F7D64EF0040F377 /* sharedlennon.cpp in Sources */,
+                               375874060F7D64EF0040F377 /* sharedkulczynskicody.cpp in Sources */,
+                               3758740C0F7D64FC0040F377 /* sharedmorisitahorn.cpp in Sources */,
+                               3758740D0F7D64FC0040F377 /* sharedochiai.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index 01a93434720a44fe7a108ae1d56ffa3b7320f32c..c5b8130e40a4dea5a18930c98a5db524b8de134f 100644 (file)
 #include "sharedsorest.h"
 #include "sharedthetayc.h"
 #include "sharedthetan.h"
-<<<<<<< collectsharedcommand.cpp
 #include "sharedkstest.h"
 #include "sharedbdiversity.h"
-=======
 #include "sharednseqs.h"
 #include "sharedochiai.h"
 #include "sharedanderberg.h"
@@ -31,7 +29,7 @@
 #include "sharedlennon.h"
 #include "sharedmorisitahorn.h"
 #include "sharedbraycurtis.h"
->>>>>>> 1.13
+
 
 
 //**********************************************************************************************************************
index 7670d412df334d2d656000cf07349aa404ffd21b..56fd56b348bdb497cdb04b01d01f4c3a87901a61 100644 (file)
@@ -30,6 +30,7 @@
 #include "unifracunweightedcommand.h"
 #include "unifracweightedcommand.h"
 #include "libshuffcommand.h"
+#include "heatmapcommand.h"
 #include "mothur.h"
 #include "nocommands.h"
 
@@ -75,6 +76,7 @@ Command* CommandFactory::getCommand(string commandName){
                else if(commandName == "get.label")             {   command = new GetlabelCommand();                    }
                else if(commandName == "get.line")              {   command = new GetlineCommand();                             }
                else if(commandName == "libshuff")              {   command = new LibShuffCommand();                    }
+               else if(commandName == "heatmap")                               {   command = new HeatMapCommand();                             }
                else                                                                                    {       command = new NoCommand();                                      }
 
                return command;
index cc102a57487e725525688d82d8f32c5de5cec4ce..2848860d41c35db65029a26409b8b9d3f5201685 100644 (file)
@@ -79,6 +79,7 @@ void GlobalData::parseGlobalData(string commandString, string optionText){
                                
                                if (key == "line") {//stores lines to be used in a set
                                        lines.clear();
+                                       labels.clear();
                                        line = value;
                                        label = "";
                                        splitAtDash(value, lines);
@@ -86,6 +87,7 @@ void GlobalData::parseGlobalData(string commandString, string optionText){
                                }
                                if (key == "label") {//stores labels to be used in a set
                                        labels.clear();
+                                       lines.clear();
                                        label = value;
                                        line = "";
                                        splitAtDash(value, labels);
@@ -129,6 +131,7 @@ void GlobalData::parseGlobalData(string commandString, string optionText){
 
                        if (key == "line") {//stores lines to be used in a vector
                                lines.clear();
+                               labels.clear();
                                line = value;
                                label = "";
                                if (line != "all") {  splitAtDash(value, lines);  allLines = 0;  }
@@ -136,6 +139,7 @@ void GlobalData::parseGlobalData(string commandString, string optionText){
                        }
                        if (key == "label") {//stores lines to be used in a vector
                                labels.clear();
+                               lines.clear();
                                label = value;
                                line = "";
                                if (label != "all") {  splitAtDash(value, labels);  allLines = 0;  }
index 3da6dcc569b012352d4fd5852d4c5e50e7814f40..fb070567da4bb6f05c95111d067a7795d45b2239 100644 (file)
@@ -15,8 +15,6 @@ HeatMap::HeatMap(){
                globaldata = GlobalData::getInstance();
                format = globaldata->getFormat();
                
-               if (format != "list") {  setGroups();  }
-               
        }
        catch(exception& e) {
                cout << "Standard Error: " << e.what() << " has occurred in the HeatMap class Function HeatMap. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
@@ -30,8 +28,47 @@ HeatMap::HeatMap(){
 //**********************************************************************************************************************
 void HeatMap::getPic(OrderVector* order) {
        try {
-               sabund = order->getSAbundVector();
-               string filename = getRootName(globaldata->inputFileName) + "heatmap" + order->getLabel();
+               colorScale.clear();
+               
+               rabund = order->getRAbundVector();
+               
+               for (int i = 0; i < rabund.size(); i++) {
+                       colorScale[rabund.get(i)] = "";
+               }
+               
+               float scaler = 255 / (float) colorScale.size();
+               
+               //go through map and give each score a color value
+               for (it = colorScale.begin(); it != colorScale.end(); it++) {
+                       it->second = toHex(int(float(it->first) * scaler));
+                       if(it->second.length() == 1) {  it->second = "0" + it->second;  }
+               }
+
+               string filenamesvg = globaldata->inputFileName + ".heatmap." + order->getLabel() + ".svg";
+               
+               openOutputFile(filenamesvg, outsvg);
+               
+               //scale max rank so the maxrank = bright red
+                       
+               //svg image
+               outsvg << "<svg width=\"100%\" height=\"100%\" viewBox=\"0 0 300 " + toString((rabund.getNumBins()*5 + 15))  + "\">\n";
+               outsvg << "<g>\n";
+               
+               int x = 15;
+               int y = 15;
+               string color;
+
+               for (int i = 0; i <= rabund.getNumBins(); i++) {
+               
+                       color = colorScale[rabund.get(i)];
+                       
+                       outsvg << "<rect fill=\"#" + color + "0000\" stroke=\"#" + color + "0000\" x=\"" + toString(x) + "\" y=\"" + toString(y) + "\" width=\"300\" height=\"5\"/>\n";
+                       y += 5;
+               }
+               outsvg << "</g>\n</svg>\n";
+               
+               outsvg.close();
+               
        }
        catch(exception& e) {
                cout << "Standard Error: " << e.what() << " has occurred in the HeatMap class Function getPic. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
@@ -45,10 +82,54 @@ void HeatMap::getPic(OrderVector* order) {
 //**********************************************************************************************************************
 void HeatMap::getPic(SharedOrderVector* sharedorder) {
        try {
+               colorScale.clear();
+               
                //fills vector of sharedsabunds - lookup
                getSharedVectors(sharedorder);
                
-               string filename = getRootName(globaldata->inputFileName) + "heatmap" + sharedorder->getLabel();
+               //get maxBin
+               for (int i = 0; i < lookup.size(); i++) {
+                       for (int j = 0; j < lookup[i]->size(); j++) {
+                               colorScale[lookup[i]->getAbundance(j)] = "";
+                       }
+               }
+               
+               //get scaler
+               float scaler = 255 / (float) colorScale.size();
+               
+               //go through map and give each score a color value
+               for (it = colorScale.begin(); it != colorScale.end(); it++) {
+                       it->second = toHex(int(float(it->first) * scaler));
+                       if(it->second.length() == 1) {  it->second = "0" + it->second;  }
+               }
+               
+               string filenamesvg = globaldata->inputFileName + ".heatmap." + sharedorder->getLabel() + "." + groupComb + ".svg";
+               openOutputFile(filenamesvg, outsvg);
+               
+               //svg image
+               outsvg << "<svg width=\"100%\" height=\"100%\" viewBox=\"0 0 " + toString(lookup.size() * 300) + " " + toString((lookup[0]->getNumBins()*5 + 15))  + "\">\n";
+               outsvg << "<g>\n";
+               
+               int x = 15;
+               int y = 15;
+               string color;
+
+               for (int i = 0; i <= lookup[0]->getNumBins(); i++) {
+               
+                       for (int j = 0; j < lookup.size(); j++) {
+                       
+                               color = colorScale[lookup[j]->getAbundance(i)]; 
+                                               
+                               outsvg << "<rect fill=\"#" + color + "0000\" stroke=\"#" + color + "0000\" x=\"" + toString(x) + "\" y=\"" + toString(y) + "\" width=\"300\" height=\"5\"/>\n";
+                               x += 300;
+                       }
+                       x = 15;
+                       y += 5;
+               }
+               outsvg << "</g>\n</svg>\n";
+               
+               outsvg.close();
+
                
                
        }
@@ -66,14 +147,15 @@ void HeatMap::getSharedVectors(SharedOrderVector* order){
        try {
                lookup.clear();
                
-               vector<SharedRAbundVector*> templookup;
+               groupComb = "";
                
                //create and initialize vector of sharedvectors, one for each group
                for (int i = 0; i < globaldata->Groups.size(); i++) { 
-                       SharedRAbundVector* temp = new SharedRAbundVector(order->getMaxRank());
+                       SharedRAbundVector* temp = new SharedRAbundVector(order->getNumBins());
                        temp->setLabel(order->getLabel());
                        temp->setGroup(globaldata->Groups[i]);
-                       templookup.push_back(temp);
+                       groupComb += globaldata->Groups[i];
+                       lookup.push_back(temp);
                }
                
                int numSeqs = order->size();
@@ -84,22 +166,15 @@ void HeatMap::getSharedVectors(SharedOrderVector* order){
                        int abundance; 
                                        
                        //set info for sharedvector in chosens group
-                       for (int j = 0; j < templookup.size(); j++) { 
-                               if (chosen.group == templookup[j]->getGroup()) {
-                                        abundance = templookup[j]->getAbundance(chosen.bin);
-                                        templookup[j]->set(chosen.bin, (abundance + 1), chosen.group);
+                       for (int j = 0; j < lookup.size(); j++) { 
+                               if (chosen.group == lookup[j]->getGroup()) {
+                                        abundance = lookup[j]->getAbundance(chosen.bin);
+                                        lookup[j]->set(chosen.bin, (abundance + 1), chosen.group);
                                         break;
                                }
                        }
                }
                
-               //convert templookups rabunds to lookups sabunds
-               for (int j = 0; j < templookup.size(); j++) { 
-                       lookup.push_back(templookup[j]->getSharedSAbundVector());
-                       delete templookup[j];
-               }
-               
-               
        }
        catch(exception& e) {
                cout << "Standard Error: " << e.what() << " has occurred in the HeatMap class Function getSharedVectors. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
@@ -113,49 +188,6 @@ void HeatMap::getSharedVectors(SharedOrderVector* order){
 }
 
 //**********************************************************************************************************************
-void HeatMap::setGroups() {
-       try {
-               //if the user has not entered specific groups to analyze then do them all
-               if (globaldata->Groups.size() != 0) {
-                       if (globaldata->Groups[0] != "all") {
-                               //check that groups are valid
-                               for (int i = 0; i < globaldata->Groups.size(); i++) {
-                                       if (globaldata->gGroupmap->isValidGroup(globaldata->Groups[i]) != true) {
-                                               cout << globaldata->Groups[i] << " is not a valid group, and will be disregarded." << endl;
-                                               // erase the invalid group from globaldata->Groups
-                                               globaldata->Groups.erase(globaldata->Groups.begin()+i);
-                                       }
-                               }
-                       
-                               //if the user only entered invalid groups
-                               if (globaldata->Groups.size() == 0) { 
-                                       cout << "When using the groups parameter you must have at least 1 valid groups. I will run the command using all the groups in your groupfile." << endl; 
-                                       for (int i = 0; i < globaldata->gGroupmap->namesOfGroups.size(); i++) {
-                                               globaldata->Groups.push_back(globaldata->gGroupmap->namesOfGroups[i]);
-                                       }
-                               }
-                       }else{//user has enter "all" and wants the default groups
-                               globaldata->Groups.clear();
-                               for (int i = 0; i < globaldata->gGroupmap->namesOfGroups.size(); i++) {
-                                       globaldata->Groups.push_back(globaldata->gGroupmap->namesOfGroups[i]);
-                               }
-                               globaldata->setGroups("");
-                       }
-               }else {
-                       for (int i = 0; i < globaldata->gGroupmap->namesOfGroups.size(); i++) {
-                               globaldata->Groups.push_back(globaldata->gGroupmap->namesOfGroups[i]);
-                       }
-               }
-               
-       }
-       catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the HeatMap class Function setGroups. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
-               exit(1);
-       }
-       catch(...) {
-               cout << "An unknown error has occurred in the HeatMap class function setGroups. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
-               exit(1);
-       }               
 
-}
-/***********************************************************/
+
+
index fe79e43c81ced356e29a8919bd58ddfac7acbb6c..0678aa0827b8765f72c5012dfc3fa18522d995a6 100644 (file)
--- a/heatmap.h
+++ b/heatmap.h
@@ -12,8 +12,8 @@
 using namespace std;
 
 #include "ordervector.hpp"
-#include "sabundvector.hpp"
-#include "sharedsabundvector.h"
+#include "rabundvector.hpp"
+#include "sharedrabundvector.h"
 #include "sharedordervector.h"
 #include "datavector.hpp"
 #include "globaldata.hpp"
@@ -31,15 +31,21 @@ class HeatMap {
 
        private:
                void getSharedVectors(SharedOrderVector*);
-               void setGroups();
        
                GlobalData* globaldata;
-               vector<SharedSAbundVector> lookup;
-               SAbundVector sabund;
+               vector<SharedRAbundVector*> lookup;
+               RAbundVector rabund;
                string format;
+               ofstream outsvg;
+               map<int, string> colorScale;
+               map<int, string>::iterator it;
+               string groupComb;
 
                        
 };
+/***********************************************************************/
 
 #endif
 
+
+
index 5da80d8179f4cb29f3c005490526ef6e8c5a93ab..10264c87951668a890b92903d87073fed2b0aa03 100644 (file)
@@ -15,7 +15,9 @@
 HeatMapCommand::HeatMapCommand(){
        try {
                globaldata = GlobalData::getInstance();
+               heatmap = new HeatMap();
                format = globaldata->getFormat();
+               
        }
        catch(exception& e) {
                cout << "Standard Error: " << e.what() << " has occurred in the HeatMapCommand class Function HeatMapCommand. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
@@ -31,6 +33,7 @@ HeatMapCommand::HeatMapCommand(){
 HeatMapCommand::~HeatMapCommand(){
        delete input;
        delete read;
+       delete heatmap;
 }
 
 //**********************************************************************************************************************
@@ -62,14 +65,19 @@ int HeatMapCommand::execute(){
                        ordersingle = globaldata->gorder;
                        input = globaldata->ginput;
                }
+
                
                if (format != "list") { 
+                       
+                       setGroups();
+                       
                        while(order != NULL){
                
                                if(globaldata->allLines == 1 || globaldata->lines.count(count) == 1 || globaldata->labels.count(order->getLabel()) == 1){                       
        
                                        cout << order->getLabel() << '\t' << count << endl;
-//call heatmap class to make file
+                                       heatmap->getPic(order);
+
                                }
                                                
                                //get next line to process
@@ -93,10 +101,11 @@ int HeatMapCommand::execute(){
                }else{
                        while(ordersingle != NULL){
                
-                               if(globaldata->allLines == 1 || globaldata->lines.count(count) == 1 || globaldata->labels.count(order->getLabel()) == 1){                       
+                               if(globaldata->allLines == 1 || globaldata->lines.count(count) == 1 || globaldata->labels.count(ordersingle->getLabel()) == 1){                 
        
-                                       cout << order->getLabel() << '\t' << count << endl;
-//call heatmap class to make file
+                                       cout << ordersingle->getLabel() << '\t' << count << endl;
+                                       heatmap->getPic(ordersingle);
+                                       
                                }
                                
                                ordersingle = (input->getOrderVector());
@@ -117,4 +126,50 @@ int HeatMapCommand::execute(){
 }
 
 //**********************************************************************************************************************
+void HeatMapCommand::setGroups() {
+       try {
+               //if the user has not entered specific groups to analyze then do them all
+               if (globaldata->Groups.size() != 0) {
+                       if (globaldata->Groups[0] != "all") {
+                               //check that groups are valid
+                               for (int i = 0; i < globaldata->Groups.size(); i++) {
+                                       if (globaldata->gGroupmap->isValidGroup(globaldata->Groups[i]) != true) {
+                                               cout << globaldata->Groups[i] << " is not a valid group, and will be disregarded." << endl;
+                                               // erase the invalid group from globaldata->Groups
+                                               globaldata->Groups.erase(globaldata->Groups.begin()+i);
+                                       }
+                               }
+                       
+                               //if the user only entered invalid groups
+                               if (globaldata->Groups.size() == 0) { 
+                                       cout << "When using the groups parameter you must have at least 1 valid groups. I will run the command using all the groups in your groupfile." << endl; 
+                                       for (int i = 0; i < globaldata->gGroupmap->namesOfGroups.size(); i++) {
+                                               globaldata->Groups.push_back(globaldata->gGroupmap->namesOfGroups[i]);
+                                       }
+                               }
+                       }else{//user has enter "all" and wants the default groups
+                               globaldata->Groups.clear();
+                               for (int i = 0; i < globaldata->gGroupmap->namesOfGroups.size(); i++) {
+                                       globaldata->Groups.push_back(globaldata->gGroupmap->namesOfGroups[i]);
+                               }
+                               globaldata->setGroups("");
+                       }
+               }else {
+                       for (int i = 0; i < globaldata->gGroupmap->namesOfGroups.size(); i++) {
+                               globaldata->Groups.push_back(globaldata->gGroupmap->namesOfGroups[i]);
+                       }
+               }
+               
+       }
+       catch(exception& e) {
+               cout << "Standard Error: " << e.what() << " has occurred in the HeatMapCommand class Function setGroups. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               exit(1);
+       }
+       catch(...) {
+               cout << "An unknown error has occurred in the HeatMapCommand class function setGroups. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               exit(1);
+       }               
+
+}
+/***********************************************************/
 
index 1b3c108836665085d953dc56b9aab20ae0687071..5eeae265471785c8d582e7b250c76046554711e7 100644 (file)
@@ -15,6 +15,7 @@
 #include "inputdata.h"
 #include "readmatrix.hpp"
 #include "sharedlistvector.h"
+#include "heatmap.h"
 
 
 class GlobalData;
@@ -34,7 +35,10 @@ private:
        SharedListVector* SharedList;
        SharedOrderVector* order;
        OrderVector* ordersingle;
+       HeatMap* heatmap;
        string format;
+       
+       void setGroups();
 
 };
 
index 214c4d857924ee10db6f975cd7597962f09a9c75..897432d57a20973cae256a14839b56a209c5ab0d 100644 (file)
@@ -42,7 +42,7 @@ EstOutput SharedKSTest::getValues(SharedRAbundVector* shared1, SharedRAbundVecto
                
                double DStatistic = maxDiff*numNZ1*numNZ2;
                double a = pow((double)(numNZ1 + numNZ2)/(numNZ1*numNZ2),.5);
-               double pVal = exp(-2*pow(maxDiff/a,2));
+               //double pVal = exp(-2*pow(maxDiff/a,2));
                double critVal = 1.36*a*numNZ1*numNZ2;
                
                /*cout << "Kolmogorov-Smirnov 2-sample test:\n";
index 90d10c1cc4e96f34561c37f81738015158957488..d1b32490beca985771529fb0665842109272329b 100644 (file)
@@ -52,6 +52,17 @@ string toString(const T&x){
 
 //**********************************************************************************************************************
 
+template<typename T>
+string toHex(const T&x){
+       stringstream output;
+       
+       output << hex << x;
+
+    return output.str();
+}
+
+//**********************************************************************************************************************
+
 template<typename T>
 string toString(const T&x, int i){
        stringstream output;
index 50610f0bbc43d0903e60d6def31fe46b0401ad65..9c8ce2e89136a671d775cb6b41484b3bc6cc869a 100644 (file)
 
 ValidParameters::ValidParameters() {
        try {
-               parameters["phylip"]            = "phylip";
-               parameters["column"]                = "column";
-               parameters["list"]                      = "list"; 
-               parameters["rabund"]            = "rabund"; 
-               parameters["sabund"]            = "sabund"; 
-               parameters["name"]                      = "name"; 
-               parameters["group"]                     = "group"; 
-               parameters["order"]             = "order"; 
-               parameters["fasta"]                         = "fasta"; 
-               parameters["tree"]                      = "tree";
-               parameters["fileroot"]                  = "fileroot";
-               parameters["cutoff"]                    = "cutoff"; 
-               parameters["method"]                    = "method";
-               parameters["format"]                    = "format"; 
-               parameters["precision"]                 = "precision"; 
-               parameters["label"]                             = "label"; 
-               parameters["line"]                              = "line";
-               parameters["iters"]                             = "iters"; 
-               parameters["jumble"]                    = "jumble"; 
-               parameters["freq"]                              = "freq"; 
-               parameters["abund"]             = "abund";
-               parameters["random"]                    = "random";
-               parameters["groups"]                    = "groups";
-               parameters["calc"]                              = "calc";
-               parameters["sharedrarefaction"] = "sharedrarefaction";
-               parameters["sharedsummary"]     = "sharedsummary";
-               parameters["shared"]            = "shared";
-               parameters["single"]            = "single";
-               parameters["rarefaction"]       = "rarefaction";
-               
                initCommandParameters();                
                initParameterRanges();
+
        }
        catch(exception& e) {
                cout << "Standard Error: " << e.what() << " has occurred in the ValidParameters class Function ValidParameters. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
@@ -284,7 +255,10 @@ void ValidParameters::initCommandParameters() {
 
                string rarefactionsharedArray[] =  {"iters","jumble","line","label","sharedrarefaction"};
                commandParameters["rarefaction.shared"] = addParameters(rarefactionsharedArray, sizeof(rarefactionsharedArray)/sizeof(string));
-
+               
+               string libshuffArray[] =  {"iters","groups","step","form","cutoff"};
+               commandParameters["libshuff"] = addParameters(libshuffArray, sizeof(libshuffArray)/sizeof(string));
+               
                string summarysingleArray[] =  {"line","label","summary","abund"};
                commandParameters["summary.single"] = addParameters(summarysingleArray, sizeof(summarysingleArray)/sizeof(string));
 
@@ -369,5 +343,4 @@ vector<string> ValidParameters::addParameters(string parameters[], int size) {
        }
 }
 
-/***********************************************************************/