From: westcott Date: Fri, 27 Mar 2009 20:02:04 +0000 (+0000) Subject: added heatmap command X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=commitdiff_plain;h=29351fe29c017d2225366418973ed0e000ce5293 added heatmap command --- diff --git a/Mothur.xcodeproj/project.pbxproj b/Mothur.xcodeproj/project.pbxproj index c6e343c..a84195d 100644 --- a/Mothur.xcodeproj/project.pbxproj +++ b/Mothur.xcodeproj/project.pbxproj @@ -14,6 +14,32 @@ 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 */; }; @@ -103,7 +128,6 @@ 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 */ @@ -133,6 +157,62 @@ 374610820F40652400460C57 /* unweighted.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = unweighted.cpp; sourceTree = ""; }; 3746109B0F40657600460C57 /* unifracunweightedcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unifracunweightedcommand.h; sourceTree = ""; }; 3746109C0F40657600460C57 /* unifracunweightedcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = unifracunweightedcommand.cpp; sourceTree = ""; }; + 3758738B0F7D61240040F377 /* coverage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = coverage.cpp; sourceTree = ""; }; + 3758738C0F7D61240040F377 /* coverage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = coverage.h; sourceTree = ""; }; + 3758738D0F7D61240040F377 /* fullmatrix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fullmatrix.cpp; sourceTree = ""; }; + 3758738E0F7D61240040F377 /* fullmatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fullmatrix.h; sourceTree = ""; }; + 3758738F0F7D61240040F377 /* heatmap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = heatmap.cpp; sourceTree = ""; }; + 375873900F7D61240040F377 /* heatmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = heatmap.h; sourceTree = ""; }; + 375873910F7D61240040F377 /* heatmapcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = heatmapcommand.cpp; sourceTree = ""; }; + 375873920F7D61240040F377 /* heatmapcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = heatmapcommand.h; sourceTree = ""; }; + 375873930F7D61240040F377 /* libshuffcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = libshuffcommand.cpp; sourceTree = ""; }; + 375873940F7D61240040F377 /* libshuffcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = libshuffcommand.h; sourceTree = ""; }; + 375873950F7D61240040F377 /* nocommands.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nocommands.cpp; sourceTree = ""; }; + 375873960F7D61240040F377 /* nocommands.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nocommands.h; sourceTree = ""; }; + 375873970F7D61240040F377 /* nseqs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nseqs.h; sourceTree = ""; }; + 375873980F7D61240040F377 /* sharedanderberg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedanderberg.cpp; sourceTree = ""; }; + 375873990F7D61240040F377 /* sharedanderberg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedanderberg.h; sourceTree = ""; }; + 3758739A0F7D61240040F377 /* sharedbraycurtis.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedbraycurtis.cpp; sourceTree = ""; }; + 3758739B0F7D61240040F377 /* sharedbraycurtis.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedbraycurtis.h; sourceTree = ""; }; + 3758739C0F7D61240040F377 /* sharedkulczynski.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedkulczynski.cpp; sourceTree = ""; }; + 3758739D0F7D61240040F377 /* sharedkulczynski.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedkulczynski.h; sourceTree = ""; }; + 3758739E0F7D61240040F377 /* sharedkulczynskicody.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedkulczynskicody.cpp; sourceTree = ""; }; + 3758739F0F7D61240040F377 /* sharedkulczynskicody.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedkulczynskicody.h; sourceTree = ""; }; + 375873A00F7D61240040F377 /* sharedlennon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedlennon.cpp; sourceTree = ""; }; + 375873A10F7D61240040F377 /* sharedlennon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedlennon.h; sourceTree = ""; }; + 375873A20F7D61240040F377 /* sharedmorisitahorn.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedmorisitahorn.cpp; sourceTree = ""; }; + 375873A30F7D61240040F377 /* sharedmorisitahorn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedmorisitahorn.h; sourceTree = ""; }; + 375873A40F7D61240040F377 /* sharednseqs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharednseqs.h; sourceTree = ""; }; + 375873A50F7D61240040F377 /* sharedochiai.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedochiai.cpp; sourceTree = ""; }; + 375873A60F7D61240040F377 /* sharedochiai.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedochiai.h; sourceTree = ""; }; + 375873E20F7D63B50040F377 /* sharedanderberg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedanderberg.cpp; sourceTree = ""; }; + 375873E50F7D63E90040F377 /* coverage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = coverage.cpp; sourceTree = ""; }; + 375873E60F7D63E90040F377 /* coverage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = coverage.h; sourceTree = ""; }; + 375873EA0F7D64520040F377 /* fullmatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fullmatrix.h; sourceTree = ""; }; + 375873EB0F7D64520040F377 /* fullmatrix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fullmatrix.cpp; sourceTree = ""; }; + 375873ED0F7D646F0040F377 /* heatmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = heatmap.h; sourceTree = ""; }; + 375873EE0F7D646F0040F377 /* heatmap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = heatmap.cpp; sourceTree = ""; }; + 375873F00F7D64800040F377 /* heatmapcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = heatmapcommand.cpp; sourceTree = ""; }; + 375873F10F7D64800040F377 /* heatmapcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = heatmapcommand.h; sourceTree = ""; }; + 375873F30F7D648F0040F377 /* libshuffcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = libshuffcommand.cpp; sourceTree = ""; }; + 375873F40F7D648F0040F377 /* libshuffcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = libshuffcommand.h; sourceTree = ""; }; + 375873F60F7D649C0040F377 /* nocommands.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nocommands.cpp; sourceTree = ""; }; + 375873F70F7D649C0040F377 /* nocommands.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nocommands.h; sourceTree = ""; }; + 375873F90F7D64AB0040F377 /* nseqs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nseqs.h; sourceTree = ""; }; + 375873FA0F7D64D20040F377 /* sharedanderberg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedanderberg.h; sourceTree = ""; }; + 375873FB0F7D64DA0040F377 /* sharedbraycurtis.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedbraycurtis.h; sourceTree = ""; }; + 375873FC0F7D64DA0040F377 /* sharedbraycurtis.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedbraycurtis.cpp; sourceTree = ""; }; + 375873FE0F7D64EF0040F377 /* sharedkulczynski.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedkulczynski.cpp; sourceTree = ""; }; + 375873FF0F7D64EF0040F377 /* sharedlennon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedlennon.cpp; sourceTree = ""; }; + 375874000F7D64EF0040F377 /* sharedkulczynski.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedkulczynski.h; sourceTree = ""; }; + 375874010F7D64EF0040F377 /* sharedlennon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedlennon.h; sourceTree = ""; }; + 375874020F7D64EF0040F377 /* sharedkulczynskicody.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedkulczynskicody.cpp; sourceTree = ""; }; + 375874030F7D64EF0040F377 /* sharedkulczynskicody.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedkulczynskicody.h; sourceTree = ""; }; + 375874070F7D64FC0040F377 /* sharedmorisitahorn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedmorisitahorn.h; sourceTree = ""; }; + 375874080F7D64FC0040F377 /* sharedmorisitahorn.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedmorisitahorn.cpp; sourceTree = ""; }; + 375874090F7D64FC0040F377 /* sharedochiai.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedochiai.h; sourceTree = ""; }; + 3758740A0F7D64FC0040F377 /* sharednseqs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharednseqs.h; sourceTree = ""; }; + 3758740B0F7D64FC0040F377 /* sharedochiai.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedochiai.cpp; sourceTree = ""; }; 379293C10F2DE73400B9034A /* treemap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = treemap.h; sourceTree = ""; }; 379293C20F2DE73400B9034A /* treemap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = treemap.cpp; sourceTree = ""; }; 3792946E0F2E191800B9034A /* parsimonycommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = parsimonycommand.h; sourceTree = ""; }; @@ -207,8 +287,6 @@ 37D927EF0F21331F001D4494 /* mothur.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mothur.cpp; sourceTree = ""; }; 37D927F00F21331F001D4494 /* nameassignment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nameassignment.cpp; sourceTree = ""; }; 37D927F10F21331F001D4494 /* nameassignment.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = nameassignment.hpp; sourceTree = ""; }; - 37D927F20F21331F001D4494 /* nocommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nocommand.cpp; sourceTree = ""; }; - 37D927F30F21331F001D4494 /* nocommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nocommand.h; sourceTree = ""; }; 37D927F40F21331F001D4494 /* npshannon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = npshannon.cpp; sourceTree = ""; }; 37D927F50F21331F001D4494 /* npshannon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = npshannon.h; sourceTree = ""; }; 37D927F60F21331F001D4494 /* observable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = observable.h; sourceTree = ""; }; @@ -321,8 +399,6 @@ EB9303EA0F534D9400E8EF26 /* logsd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = logsd.cpp; sourceTree = ""; }; EB9303F70F53517300E8EF26 /* geom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = geom.h; sourceTree = ""; }; EB9303F80F53517300E8EF26 /* geom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = geom.cpp; sourceTree = ""; }; - 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 */ @@ -374,6 +450,8 @@ 37D927DD0F21331F001D4494 /* fileoutput.cpp */, 37D927E00F21331F001D4494 /* globaldata.hpp */, 37D927DF0F21331F001D4494 /* globaldata.cpp */, + 375873ED0F7D646F0040F377 /* heatmap.h */, + 375873EE0F7D646F0040F377 /* heatmap.cpp */, 37D927E60F21331F001D4494 /* inputdata.h */, 37D927E50F21331F001D4494 /* inputdata.cpp */, 37D927EA0F21331F001D4494 /* kmer.hpp */, @@ -384,6 +462,34 @@ 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 */, @@ -426,28 +532,25 @@ 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 */, @@ -458,6 +561,12 @@ 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 */, @@ -466,6 +575,19 @@ 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 */, @@ -511,10 +633,14 @@ 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 */, @@ -551,6 +677,8 @@ 37D927D50F21331F001D4494 /* datavector.hpp */, 37D927DC0F21331F001D4494 /* fastamap.h */, 37D927DB0F21331F001D4494 /* fastamap.cpp */, + 375873EA0F7D64520040F377 /* fullmatrix.h */, + 375873EB0F7D64520040F377 /* fullmatrix.cpp */, 37D927E20F21331F001D4494 /* groupmap.h */, 37D927E10F21331F001D4494 /* groupmap.cpp */, 37D927EE0F21331F001D4494 /* listvector.hpp */, @@ -672,7 +800,6 @@ 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 */, @@ -740,7 +867,32 @@ 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; }; diff --git a/collectsharedcommand.cpp b/collectsharedcommand.cpp index 01a9343..c5b8130 100644 --- a/collectsharedcommand.cpp +++ b/collectsharedcommand.cpp @@ -19,10 +19,8 @@ #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 + //********************************************************************************************************************** diff --git a/commandfactory.cpp b/commandfactory.cpp index 7670d41..56fd56b 100644 --- a/commandfactory.cpp +++ b/commandfactory.cpp @@ -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; diff --git a/globaldata.cpp b/globaldata.cpp index cc102a5..2848860 100644 --- a/globaldata.cpp +++ b/globaldata.cpp @@ -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; } diff --git a/heatmap.cpp b/heatmap.cpp index 3da6dcc..fb07056 100644 --- a/heatmap.cpp +++ b/heatmap.cpp @@ -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 << "\n"; + outsvg << "\n"; + + int x = 15; + int y = 15; + string color; + + for (int i = 0; i <= rabund.getNumBins(); i++) { + + color = colorScale[rabund.get(i)]; + + outsvg << "\n"; + y += 5; + } + outsvg << "\n\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 << "getNumBins()*5 + 15)) + "\">\n"; + outsvg << "\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 << "\n"; + x += 300; + } + x = 15; + y += 5; + } + outsvg << "\n\n"; + + outsvg.close(); + } @@ -66,14 +147,15 @@ void HeatMap::getSharedVectors(SharedOrderVector* order){ try { lookup.clear(); - vector 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); - } -} -/***********************************************************/ + + diff --git a/heatmap.h b/heatmap.h index fe79e43..0678aa0 100644 --- 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 lookup; - SAbundVector sabund; + vector lookup; + RAbundVector rabund; string format; + ofstream outsvg; + map colorScale; + map::iterator it; + string groupComb; }; +/***********************************************************************/ #endif + + diff --git a/heatmapcommand.cpp b/heatmapcommand.cpp index 5da80d8..10264c8 100644 --- a/heatmapcommand.cpp +++ b/heatmapcommand.cpp @@ -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); + } + +} +/***********************************************************/ diff --git a/heatmapcommand.h b/heatmapcommand.h index 1b3c108..5eeae26 100644 --- a/heatmapcommand.h +++ b/heatmapcommand.h @@ -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(); }; diff --git a/sharedkstest.cpp b/sharedkstest.cpp index 214c4d8..897432d 100644 --- a/sharedkstest.cpp +++ b/sharedkstest.cpp @@ -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"; diff --git a/utilities.hpp b/utilities.hpp index 90d10c1..d1b3249 100644 --- a/utilities.hpp +++ b/utilities.hpp @@ -52,6 +52,17 @@ string toString(const T&x){ //********************************************************************************************************************** +template +string toHex(const T&x){ + stringstream output; + + output << hex << x; + + return output.str(); +} + +//********************************************************************************************************************** + template string toString(const T&x, int i){ stringstream output; diff --git a/validparameter.cpp b/validparameter.cpp index 50610f0..9c8ce2e 100644 --- a/validparameter.cpp +++ b/validparameter.cpp @@ -13,38 +13,9 @@ 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 ValidParameters::addParameters(string parameters[], int size) { } } -/***********************************************************************/