From d037597badc8d18e235c59f0c1114180edb7f98f Mon Sep 17 00:00:00 2001 From: westcott Date: Wed, 11 Feb 2009 15:42:13 +0000 Subject: [PATCH] adding treeclimber and unifrac pieces --- Mothur.xcodeproj/project.pbxproj | 384 +++++++++++++++++-------------- calculator.h | 2 +- collect.cpp | 2 +- commandfactory.cpp | 36 +-- errorchecking.cpp | 24 +- errorchecking.h | 3 +- globaldata.cpp | 26 ++- globaldata.hpp | 7 +- inputdata.cpp | 2 +- npshannon.cpp | 2 +- parsimony.cpp | 42 ++++ parsimony.h | 32 +++ parsimonycommand.cpp | 284 +++++++++++++++++++++++ parsimonycommand.h | 62 +++++ raredisplay.cpp | 2 +- readtree.cpp | 131 +++++++++-- readtree.h | 14 +- readtreecommand.cpp | 8 +- sharedsabundvector.cpp | 2 +- tree.cpp | 262 ++++++++++++++++++++- tree.h | 31 ++- treecalculator.h | 48 ++++ treemap.cpp | 11 +- treemap.h | 6 +- treenode.cpp | 5 +- treenode.h | 18 +- unifracunweightedcommand.cpp | 232 +++++++++++++++++++ unifracunweightedcommand.h | 64 ++++++ unifracweightedcommand.cpp | 280 ++++++++++++++++++++++ unifracweightedcommand.h | 64 ++++++ unweighted.cpp | 88 +++++++ unweighted.h | 37 +++ validcommands.cpp | 6 +- validparameter.cpp | 4 +- weighted.cpp | 121 ++++++++++ weighted.h | 36 +++ 36 files changed, 2126 insertions(+), 252 deletions(-) create mode 100644 parsimony.cpp create mode 100644 parsimony.h create mode 100644 parsimonycommand.cpp create mode 100644 parsimonycommand.h create mode 100644 treecalculator.h create mode 100644 unifracunweightedcommand.cpp create mode 100644 unifracunweightedcommand.h create mode 100644 unifracweightedcommand.cpp create mode 100644 unifracweightedcommand.h create mode 100644 unweighted.cpp create mode 100644 unweighted.h create mode 100644 weighted.cpp create mode 100644 weighted.h diff --git a/Mothur.xcodeproj/project.pbxproj b/Mothur.xcodeproj/project.pbxproj index e773981..1e47346 100644 --- a/Mothur.xcodeproj/project.pbxproj +++ b/Mothur.xcodeproj/project.pbxproj @@ -10,7 +10,13 @@ 372E12700F26365B0095CF7E /* readotucommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 372E126F0F26365B0095CF7E /* readotucommand.cpp */; }; 372E12960F263D5A0095CF7E /* readdistcommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 372E12950F263D5A0095CF7E /* readdistcommand.cpp */; }; 372E12ED0F264D320095CF7E /* commandfactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 372E12EC0F264D320095CF7E /* commandfactory.cpp */; }; + 374610780F40645300460C57 /* unifracweightedcommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 374610770F40645300460C57 /* unifracweightedcommand.cpp */; }; + 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 */; }; 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 */; }; 37AD4CE40F28AEA300AA2D49 /* sharedlistvector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37AD4CE30F28AEA300AA2D49 /* sharedlistvector.cpp */; }; 37AD4DBB0F28E2FE00AA2D49 /* tree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37AD4DBA0F28E2FE00AA2D49 /* tree.cpp */; }; 37AD4DCA0F28F3DD00AA2D49 /* readtree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37AD4DC90F28F3DD00AA2D49 /* readtree.cpp */; }; @@ -85,7 +91,6 @@ 37D9289F0F21331F001D4494 /* validparameter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37D928530F21331F001D4494 /* validparameter.cpp */; }; 37E5F3E30F29FD4200F8D827 /* treenode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37E5F3E20F29FD4200F8D827 /* treenode.cpp */; }; 37E5F4920F2A3DA800F8D827 /* readtreecommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37E5F4910F2A3DA800F8D827 /* readtreecommand.cpp */; }; - 7E44EBD10F3235D900B0D45D /* makefile in Sources */ = {isa = PBXBuildFile; fileRef = 7E44EBD00F32358B00B0D45D /* makefile */; }; 8DD76F6A0486A84900D96B5E /* Mothur.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = C6859E8B029090EE04C91782 /* Mothur.1 */; }; /* End PBXBuildFile section */ @@ -103,170 +108,182 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 372E126E0F26365B0095CF7E /* readotucommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = readotucommand.h; sourceTree = SOURCE_ROOT; }; - 372E126F0F26365B0095CF7E /* readotucommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = readotucommand.cpp; sourceTree = SOURCE_ROOT; }; - 372E12940F263D5A0095CF7E /* readdistcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = readdistcommand.h; sourceTree = SOURCE_ROOT; }; - 372E12950F263D5A0095CF7E /* readdistcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = readdistcommand.cpp; sourceTree = SOURCE_ROOT; }; - 372E12EC0F264D320095CF7E /* commandfactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = commandfactory.cpp; sourceTree = SOURCE_ROOT; }; - 379293C10F2DE73400B9034A /* treemap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = treemap.h; sourceTree = SOURCE_ROOT; }; - 379293C20F2DE73400B9034A /* treemap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = treemap.cpp; sourceTree = SOURCE_ROOT; }; - 37AD4CE20F28AEA300AA2D49 /* sharedlistvector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedlistvector.h; sourceTree = SOURCE_ROOT; }; - 37AD4CE30F28AEA300AA2D49 /* sharedlistvector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedlistvector.cpp; sourceTree = SOURCE_ROOT; }; - 37AD4DB90F28E2FE00AA2D49 /* tree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tree.h; sourceTree = SOURCE_ROOT; }; - 37AD4DBA0F28E2FE00AA2D49 /* tree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tree.cpp; sourceTree = SOURCE_ROOT; }; - 37AD4DC80F28F3DD00AA2D49 /* readtree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = readtree.h; sourceTree = SOURCE_ROOT; }; - 37AD4DC90F28F3DD00AA2D49 /* readtree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = readtree.cpp; sourceTree = SOURCE_ROOT; }; - 37B28F660F27590100808A62 /* deconvolutecommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = deconvolutecommand.h; sourceTree = SOURCE_ROOT; }; - 37B28F670F27590100808A62 /* deconvolutecommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = deconvolutecommand.cpp; sourceTree = SOURCE_ROOT; }; - 37D927B80F21331F001D4494 /* ace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ace.cpp; sourceTree = SOURCE_ROOT; }; - 37D927B90F21331F001D4494 /* ace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ace.h; sourceTree = SOURCE_ROOT; }; - 37D927BA0F21331F001D4494 /* averagelinkage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = averagelinkage.cpp; sourceTree = SOURCE_ROOT; }; - 37D927BB0F21331F001D4494 /* bootstrap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = bootstrap.cpp; sourceTree = SOURCE_ROOT; }; - 37D927BC0F21331F001D4494 /* bootstrap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bootstrap.h; sourceTree = SOURCE_ROOT; }; - 37D927BD0F21331F001D4494 /* calculator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = calculator.cpp; sourceTree = SOURCE_ROOT; }; - 37D927BE0F21331F001D4494 /* calculator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = calculator.h; sourceTree = SOURCE_ROOT; }; - 37D927BF0F21331F001D4494 /* chao1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = chao1.cpp; sourceTree = SOURCE_ROOT; }; - 37D927C00F21331F001D4494 /* chao1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chao1.h; sourceTree = SOURCE_ROOT; }; - 37D927C10F21331F001D4494 /* cluster.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cluster.cpp; sourceTree = SOURCE_ROOT; }; - 37D927C20F21331F001D4494 /* cluster.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = cluster.hpp; sourceTree = SOURCE_ROOT; }; - 37D927C30F21331F001D4494 /* clustercommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = clustercommand.cpp; sourceTree = SOURCE_ROOT; }; - 37D927C40F21331F001D4494 /* clustercommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = clustercommand.h; sourceTree = SOURCE_ROOT; }; - 37D927C50F21331F001D4494 /* collect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = collect.cpp; sourceTree = SOURCE_ROOT; }; - 37D927C60F21331F001D4494 /* collect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = collect.h; sourceTree = SOURCE_ROOT; }; - 37D927C70F21331F001D4494 /* collectcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = collectcommand.cpp; sourceTree = SOURCE_ROOT; }; - 37D927C80F21331F001D4494 /* collectcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = collectcommand.h; sourceTree = SOURCE_ROOT; }; - 37D927C90F21331F001D4494 /* collectdisplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = collectdisplay.h; sourceTree = SOURCE_ROOT; }; - 37D927CA0F21331F001D4494 /* collectorscurvedata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = collectorscurvedata.h; sourceTree = SOURCE_ROOT; }; - 37D927CB0F21331F001D4494 /* collectsharedcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = collectsharedcommand.cpp; sourceTree = SOURCE_ROOT; }; - 37D927CC0F21331F001D4494 /* collectsharedcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = collectsharedcommand.h; sourceTree = SOURCE_ROOT; }; - 37D927CD0F21331F001D4494 /* command.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = command.hpp; sourceTree = SOURCE_ROOT; }; - 37D927CF0F21331F001D4494 /* commandfactory.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = commandfactory.hpp; sourceTree = SOURCE_ROOT; }; - 37D927D00F21331F001D4494 /* commandoptionparser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = commandoptionparser.cpp; sourceTree = SOURCE_ROOT; }; - 37D927D10F21331F001D4494 /* commandoptionparser.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = commandoptionparser.hpp; sourceTree = SOURCE_ROOT; }; - 37D927D20F21331F001D4494 /* completelinkage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = completelinkage.cpp; sourceTree = SOURCE_ROOT; }; - 37D927D30F21331F001D4494 /* database.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = database.cpp; sourceTree = SOURCE_ROOT; }; - 37D927D40F21331F001D4494 /* database.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = database.hpp; sourceTree = SOURCE_ROOT; }; - 37D927D50F21331F001D4494 /* datavector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = datavector.hpp; sourceTree = SOURCE_ROOT; }; - 37D927D60F21331F001D4494 /* display.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = display.h; sourceTree = SOURCE_ROOT; }; - 37D927D70F21331F001D4494 /* engine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = engine.cpp; sourceTree = SOURCE_ROOT; }; - 37D927D80F21331F001D4494 /* engine.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = engine.hpp; sourceTree = SOURCE_ROOT; }; - 37D927D90F21331F001D4494 /* errorchecking.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = errorchecking.cpp; sourceTree = SOURCE_ROOT; }; - 37D927DA0F21331F001D4494 /* errorchecking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = errorchecking.h; sourceTree = SOURCE_ROOT; }; - 37D927DB0F21331F001D4494 /* fastamap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fastamap.cpp; sourceTree = SOURCE_ROOT; }; - 37D927DC0F21331F001D4494 /* fastamap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fastamap.h; sourceTree = SOURCE_ROOT; }; - 37D927DD0F21331F001D4494 /* fileoutput.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fileoutput.cpp; sourceTree = SOURCE_ROOT; }; - 37D927DE0F21331F001D4494 /* fileoutput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fileoutput.h; sourceTree = SOURCE_ROOT; }; - 37D927DF0F21331F001D4494 /* globaldata.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = globaldata.cpp; sourceTree = SOURCE_ROOT; }; - 37D927E00F21331F001D4494 /* globaldata.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = globaldata.hpp; sourceTree = SOURCE_ROOT; }; - 37D927E10F21331F001D4494 /* groupmap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = groupmap.cpp; sourceTree = SOURCE_ROOT; }; - 37D927E20F21331F001D4494 /* groupmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = groupmap.h; sourceTree = SOURCE_ROOT; }; - 37D927E30F21331F001D4494 /* helpcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = helpcommand.cpp; sourceTree = SOURCE_ROOT; }; - 37D927E40F21331F001D4494 /* helpcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = helpcommand.h; sourceTree = SOURCE_ROOT; }; - 37D927E50F21331F001D4494 /* inputdata.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = inputdata.cpp; sourceTree = SOURCE_ROOT; }; - 37D927E60F21331F001D4494 /* inputdata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = inputdata.h; sourceTree = SOURCE_ROOT; }; - 37D927E70F21331F001D4494 /* jackknife.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jackknife.cpp; sourceTree = SOURCE_ROOT; }; - 37D927E80F21331F001D4494 /* jackknife.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jackknife.h; sourceTree = SOURCE_ROOT; }; - 37D927E90F21331F001D4494 /* kmer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = kmer.cpp; sourceTree = SOURCE_ROOT; }; - 37D927EA0F21331F001D4494 /* kmer.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = kmer.hpp; sourceTree = SOURCE_ROOT; }; - 37D927EB0F21331F001D4494 /* kmerdb.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = kmerdb.cpp; sourceTree = SOURCE_ROOT; }; - 37D927EC0F21331F001D4494 /* kmerdb.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = kmerdb.hpp; sourceTree = SOURCE_ROOT; }; - 37D927ED0F21331F001D4494 /* listvector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = listvector.cpp; sourceTree = SOURCE_ROOT; }; - 37D927EE0F21331F001D4494 /* listvector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = listvector.hpp; sourceTree = SOURCE_ROOT; }; - 37D927EF0F21331F001D4494 /* mothur.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mothur.cpp; sourceTree = SOURCE_ROOT; }; - 37D927F00F21331F001D4494 /* nameassignment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nameassignment.cpp; sourceTree = SOURCE_ROOT; }; - 37D927F10F21331F001D4494 /* nameassignment.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = nameassignment.hpp; sourceTree = SOURCE_ROOT; }; - 37D927F20F21331F001D4494 /* nocommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nocommand.cpp; sourceTree = SOURCE_ROOT; }; - 37D927F30F21331F001D4494 /* nocommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nocommand.h; sourceTree = SOURCE_ROOT; }; - 37D927F40F21331F001D4494 /* npshannon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = npshannon.cpp; sourceTree = SOURCE_ROOT; }; - 37D927F50F21331F001D4494 /* npshannon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = npshannon.h; sourceTree = SOURCE_ROOT; }; - 37D927F60F21331F001D4494 /* observable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = observable.h; sourceTree = SOURCE_ROOT; }; - 37D927F70F21331F001D4494 /* ordervector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ordervector.cpp; sourceTree = SOURCE_ROOT; }; - 37D927F80F21331F001D4494 /* ordervector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = ordervector.hpp; sourceTree = SOURCE_ROOT; }; - 37D927F90F21331F001D4494 /* parselistcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = parselistcommand.cpp; sourceTree = SOURCE_ROOT; }; - 37D927FA0F21331F001D4494 /* parselistcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = parselistcommand.h; sourceTree = SOURCE_ROOT; }; - 37D927FB0F21331F001D4494 /* progress.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = progress.cpp; sourceTree = SOURCE_ROOT; }; - 37D927FC0F21331F001D4494 /* progress.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = progress.hpp; sourceTree = SOURCE_ROOT; }; - 37D927FD0F21331F001D4494 /* quitcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = quitcommand.cpp; sourceTree = SOURCE_ROOT; }; - 37D927FE0F21331F001D4494 /* quitcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = quitcommand.h; sourceTree = SOURCE_ROOT; }; - 37D927FF0F21331F001D4494 /* rabundvector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rabundvector.cpp; sourceTree = SOURCE_ROOT; }; - 37D928000F21331F001D4494 /* rabundvector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = rabundvector.hpp; sourceTree = SOURCE_ROOT; }; - 37D928010F21331F001D4494 /* rarecalc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rarecalc.cpp; sourceTree = SOURCE_ROOT; }; - 37D928020F21331F001D4494 /* rarecalc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rarecalc.h; sourceTree = SOURCE_ROOT; }; - 37D928030F21331F001D4494 /* raredisplay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = raredisplay.cpp; sourceTree = SOURCE_ROOT; }; - 37D928040F21331F001D4494 /* raredisplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = raredisplay.h; sourceTree = SOURCE_ROOT; }; - 37D928050F21331F001D4494 /* rarefact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rarefact.cpp; sourceTree = SOURCE_ROOT; }; - 37D928060F21331F001D4494 /* rarefact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rarefact.h; sourceTree = SOURCE_ROOT; }; - 37D928070F21331F001D4494 /* rarefactcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rarefactcommand.cpp; sourceTree = SOURCE_ROOT; }; - 37D928080F21331F001D4494 /* rarefactcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rarefactcommand.h; sourceTree = SOURCE_ROOT; }; - 37D928090F21331F001D4494 /* rarefactioncurvedata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rarefactioncurvedata.h; sourceTree = SOURCE_ROOT; }; - 37D9280A0F21331F001D4494 /* rarefactsharedcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rarefactsharedcommand.cpp; sourceTree = SOURCE_ROOT; }; - 37D9280B0F21331F001D4494 /* rarefactsharedcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rarefactsharedcommand.h; sourceTree = SOURCE_ROOT; }; - 37D928120F21331F001D4494 /* readmatrix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = readmatrix.cpp; sourceTree = SOURCE_ROOT; }; - 37D928130F21331F001D4494 /* readmatrix.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = readmatrix.hpp; sourceTree = SOURCE_ROOT; }; - 37D9281A0F21331F001D4494 /* sabundvector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sabundvector.cpp; sourceTree = SOURCE_ROOT; }; - 37D9281B0F21331F001D4494 /* sabundvector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = sabundvector.hpp; sourceTree = SOURCE_ROOT; }; - 37D9281C0F21331F001D4494 /* sequence.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sequence.cpp; sourceTree = SOURCE_ROOT; }; - 37D9281D0F21331F001D4494 /* sequence.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = sequence.hpp; sourceTree = SOURCE_ROOT; }; - 37D9281E0F21331F001D4494 /* shannon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = shannon.cpp; sourceTree = SOURCE_ROOT; }; - 37D9281F0F21331F001D4494 /* shannon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = shannon.h; sourceTree = SOURCE_ROOT; }; - 37D928200F21331F001D4494 /* shared.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = shared.cpp; sourceTree = SOURCE_ROOT; }; - 37D928210F21331F001D4494 /* shared.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = shared.h; sourceTree = SOURCE_ROOT; }; - 37D928220F21331F001D4494 /* sharedace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedace.cpp; sourceTree = SOURCE_ROOT; }; - 37D928230F21331F001D4494 /* sharedace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedace.h; sourceTree = SOURCE_ROOT; }; - 37D928240F21331F001D4494 /* sharedchao1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedchao1.cpp; sourceTree = SOURCE_ROOT; }; - 37D928250F21331F001D4494 /* sharedchao1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedchao1.h; sourceTree = SOURCE_ROOT; }; - 37D928260F21331F001D4494 /* sharedcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedcommand.cpp; sourceTree = SOURCE_ROOT; }; - 37D928270F21331F001D4494 /* sharedcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedcommand.h; sourceTree = SOURCE_ROOT; }; - 37D928280F21331F001D4494 /* sharedjabund.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedjabund.cpp; sourceTree = SOURCE_ROOT; }; - 37D928290F21331F001D4494 /* sharedjabund.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedjabund.h; sourceTree = SOURCE_ROOT; }; - 37D9282A0F21331F001D4494 /* sharedjclass.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedjclass.cpp; sourceTree = SOURCE_ROOT; }; - 37D9282B0F21331F001D4494 /* sharedjclass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedjclass.h; sourceTree = SOURCE_ROOT; }; - 37D9282C0F21331F001D4494 /* sharedjest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedjest.cpp; sourceTree = SOURCE_ROOT; }; - 37D9282D0F21331F001D4494 /* sharedjest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedjest.h; sourceTree = SOURCE_ROOT; }; - 37D9282E0F21331F001D4494 /* sharedordervector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedordervector.cpp; sourceTree = SOURCE_ROOT; }; - 37D9282F0F21331F001D4494 /* sharedordervector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedordervector.h; sourceTree = SOURCE_ROOT; }; - 37D928300F21331F001D4494 /* sharedrabundvector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedrabundvector.cpp; sourceTree = SOURCE_ROOT; }; - 37D928310F21331F001D4494 /* sharedrabundvector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedrabundvector.h; sourceTree = SOURCE_ROOT; }; - 37D928320F21331F001D4494 /* sharedsabundvector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedsabundvector.cpp; sourceTree = SOURCE_ROOT; }; - 37D928330F21331F001D4494 /* sharedsabundvector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedsabundvector.h; sourceTree = SOURCE_ROOT; }; - 37D928340F21331F001D4494 /* sharedsobs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedsobs.cpp; sourceTree = SOURCE_ROOT; }; - 37D928350F21331F001D4494 /* sharedsobs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedsobs.h; sourceTree = SOURCE_ROOT; }; - 37D928360F21331F001D4494 /* sharedsorabund.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedsorabund.cpp; sourceTree = SOURCE_ROOT; }; - 37D928370F21331F001D4494 /* sharedsorabund.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedsorabund.h; sourceTree = SOURCE_ROOT; }; - 37D928380F21331F001D4494 /* sharedsorclass.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedsorclass.cpp; sourceTree = SOURCE_ROOT; }; - 37D928390F21331F001D4494 /* sharedsorclass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedsorclass.h; sourceTree = SOURCE_ROOT; }; - 37D9283A0F21331F001D4494 /* sharedsorest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedsorest.cpp; sourceTree = SOURCE_ROOT; }; - 37D9283B0F21331F001D4494 /* sharedsorest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedsorest.h; sourceTree = SOURCE_ROOT; }; - 37D9283C0F21331F001D4494 /* sharedthetan.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedthetan.cpp; sourceTree = SOURCE_ROOT; }; - 37D9283D0F21331F001D4494 /* sharedthetan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedthetan.h; sourceTree = SOURCE_ROOT; }; - 37D9283E0F21331F001D4494 /* sharedthetayc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedthetayc.cpp; sourceTree = SOURCE_ROOT; }; - 37D9283F0F21331F001D4494 /* sharedthetayc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedthetayc.h; sourceTree = SOURCE_ROOT; }; - 37D928400F21331F001D4494 /* simpson.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = simpson.cpp; sourceTree = SOURCE_ROOT; }; - 37D928410F21331F001D4494 /* simpson.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = simpson.h; sourceTree = SOURCE_ROOT; }; - 37D928420F21331F001D4494 /* singlelinkage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = singlelinkage.cpp; sourceTree = SOURCE_ROOT; }; - 37D928430F21331F001D4494 /* sobs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sobs.h; sourceTree = SOURCE_ROOT; }; - 37D928440F21331F001D4494 /* sparsematrix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sparsematrix.cpp; sourceTree = SOURCE_ROOT; }; - 37D928450F21331F001D4494 /* sparsematrix.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = sparsematrix.hpp; sourceTree = SOURCE_ROOT; }; - 37D928460F21331F001D4494 /* summarycommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = summarycommand.cpp; sourceTree = SOURCE_ROOT; }; - 37D928470F21331F001D4494 /* summarycommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = summarycommand.h; sourceTree = SOURCE_ROOT; }; - 37D928480F21331F001D4494 /* summarydata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = summarydata.h; sourceTree = SOURCE_ROOT; }; - 37D928490F21331F001D4494 /* summarydisplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = summarydisplay.h; sourceTree = SOURCE_ROOT; }; - 37D9284A0F21331F001D4494 /* summarysharedcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = summarysharedcommand.cpp; sourceTree = SOURCE_ROOT; }; - 37D9284B0F21331F001D4494 /* summarysharedcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = summarysharedcommand.h; sourceTree = SOURCE_ROOT; }; - 37D9284C0F21331F001D4494 /* utilities.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = utilities.hpp; sourceTree = SOURCE_ROOT; }; - 37D9284D0F21331F001D4494 /* uvest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = uvest.cpp; sourceTree = SOURCE_ROOT; }; - 37D9284E0F21331F001D4494 /* uvest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uvest.h; sourceTree = SOURCE_ROOT; }; - 37D9284F0F21331F001D4494 /* validcalculator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = validcalculator.cpp; sourceTree = SOURCE_ROOT; }; - 37D928500F21331F001D4494 /* validcalculator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = validcalculator.h; sourceTree = SOURCE_ROOT; }; - 37D928510F21331F001D4494 /* validcommands.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = validcommands.cpp; sourceTree = SOURCE_ROOT; }; - 37D928520F21331F001D4494 /* validcommands.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = validcommands.h; sourceTree = SOURCE_ROOT; }; - 37D928530F21331F001D4494 /* validparameter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = validparameter.cpp; sourceTree = SOURCE_ROOT; }; - 37D928540F21331F001D4494 /* validparameter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = validparameter.h; sourceTree = SOURCE_ROOT; }; - 37E5F3E10F29FD4200F8D827 /* treenode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = treenode.h; sourceTree = SOURCE_ROOT; }; - 37E5F3E20F29FD4200F8D827 /* treenode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = treenode.cpp; sourceTree = SOURCE_ROOT; }; - 37E5F4900F2A3DA800F8D827 /* readtreecommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = readtreecommand.h; sourceTree = SOURCE_ROOT; }; - 37E5F4910F2A3DA800F8D827 /* readtreecommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = readtreecommand.cpp; sourceTree = SOURCE_ROOT; }; - 7E44EBD00F32358B00B0D45D /* makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = makefile; sourceTree = ""; }; + 372E126E0F26365B0095CF7E /* readotucommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = readotucommand.h; sourceTree = ""; }; + 372E126F0F26365B0095CF7E /* readotucommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = readotucommand.cpp; sourceTree = ""; }; + 372E12940F263D5A0095CF7E /* readdistcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = readdistcommand.h; sourceTree = ""; }; + 372E12950F263D5A0095CF7E /* readdistcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = readdistcommand.cpp; sourceTree = ""; }; + 372E12EC0F264D320095CF7E /* commandfactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = commandfactory.cpp; sourceTree = ""; }; + 374610760F40645300460C57 /* unifracweightedcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unifracweightedcommand.h; sourceTree = ""; }; + 374610770F40645300460C57 /* unifracweightedcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = unifracweightedcommand.cpp; sourceTree = ""; }; + 3746107C0F4064D100460C57 /* weighted.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = weighted.h; sourceTree = ""; }; + 3746107D0F4064D100460C57 /* weighted.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = weighted.cpp; sourceTree = ""; }; + 374610810F40652400460C57 /* unweighted.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unweighted.h; sourceTree = ""; }; + 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 = ""; }; + 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 = ""; }; + 3792946F0F2E191800B9034A /* parsimonycommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = parsimonycommand.cpp; sourceTree = ""; }; + 379294880F2E258500B9034A /* parsimony.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = parsimony.h; sourceTree = ""; }; + 379294890F2E258500B9034A /* parsimony.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = parsimony.cpp; sourceTree = ""; }; + 3792948D0F2E271100B9034A /* treecalculator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = treecalculator.h; sourceTree = ""; }; + 37AD4CE20F28AEA300AA2D49 /* sharedlistvector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedlistvector.h; sourceTree = ""; }; + 37AD4CE30F28AEA300AA2D49 /* sharedlistvector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedlistvector.cpp; sourceTree = ""; }; + 37AD4DB90F28E2FE00AA2D49 /* tree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tree.h; sourceTree = ""; }; + 37AD4DBA0F28E2FE00AA2D49 /* tree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tree.cpp; sourceTree = ""; }; + 37AD4DC80F28F3DD00AA2D49 /* readtree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = readtree.h; sourceTree = ""; }; + 37AD4DC90F28F3DD00AA2D49 /* readtree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = readtree.cpp; sourceTree = ""; }; + 37B28F660F27590100808A62 /* deconvolutecommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = deconvolutecommand.h; sourceTree = ""; }; + 37B28F670F27590100808A62 /* deconvolutecommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = deconvolutecommand.cpp; sourceTree = ""; }; + 37D927B80F21331F001D4494 /* ace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ace.cpp; sourceTree = ""; }; + 37D927B90F21331F001D4494 /* ace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ace.h; sourceTree = ""; }; + 37D927BA0F21331F001D4494 /* averagelinkage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = averagelinkage.cpp; sourceTree = ""; }; + 37D927BB0F21331F001D4494 /* bootstrap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = bootstrap.cpp; sourceTree = ""; }; + 37D927BC0F21331F001D4494 /* bootstrap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bootstrap.h; sourceTree = ""; }; + 37D927BD0F21331F001D4494 /* calculator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = calculator.cpp; sourceTree = ""; }; + 37D927BE0F21331F001D4494 /* calculator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = calculator.h; sourceTree = ""; }; + 37D927BF0F21331F001D4494 /* chao1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = chao1.cpp; sourceTree = ""; }; + 37D927C00F21331F001D4494 /* chao1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chao1.h; sourceTree = ""; }; + 37D927C10F21331F001D4494 /* cluster.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cluster.cpp; sourceTree = ""; }; + 37D927C20F21331F001D4494 /* cluster.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = cluster.hpp; sourceTree = ""; }; + 37D927C30F21331F001D4494 /* clustercommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = clustercommand.cpp; sourceTree = ""; }; + 37D927C40F21331F001D4494 /* clustercommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = clustercommand.h; sourceTree = ""; }; + 37D927C50F21331F001D4494 /* collect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = collect.cpp; sourceTree = ""; }; + 37D927C60F21331F001D4494 /* collect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = collect.h; sourceTree = ""; }; + 37D927C70F21331F001D4494 /* collectcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = collectcommand.cpp; sourceTree = ""; }; + 37D927C80F21331F001D4494 /* collectcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = collectcommand.h; sourceTree = ""; }; + 37D927C90F21331F001D4494 /* collectdisplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = collectdisplay.h; sourceTree = ""; }; + 37D927CA0F21331F001D4494 /* collectorscurvedata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = collectorscurvedata.h; sourceTree = ""; }; + 37D927CB0F21331F001D4494 /* collectsharedcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = collectsharedcommand.cpp; sourceTree = ""; }; + 37D927CC0F21331F001D4494 /* collectsharedcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = collectsharedcommand.h; sourceTree = ""; }; + 37D927CD0F21331F001D4494 /* command.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = command.hpp; sourceTree = ""; }; + 37D927CF0F21331F001D4494 /* commandfactory.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = commandfactory.hpp; sourceTree = ""; }; + 37D927D00F21331F001D4494 /* commandoptionparser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = commandoptionparser.cpp; sourceTree = ""; }; + 37D927D10F21331F001D4494 /* commandoptionparser.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = commandoptionparser.hpp; sourceTree = ""; }; + 37D927D20F21331F001D4494 /* completelinkage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = completelinkage.cpp; sourceTree = ""; }; + 37D927D30F21331F001D4494 /* database.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = database.cpp; sourceTree = ""; }; + 37D927D40F21331F001D4494 /* database.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = database.hpp; sourceTree = ""; }; + 37D927D50F21331F001D4494 /* datavector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = datavector.hpp; sourceTree = ""; }; + 37D927D60F21331F001D4494 /* display.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = display.h; sourceTree = ""; }; + 37D927D70F21331F001D4494 /* engine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = engine.cpp; sourceTree = ""; }; + 37D927D80F21331F001D4494 /* engine.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = engine.hpp; sourceTree = ""; }; + 37D927D90F21331F001D4494 /* errorchecking.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = errorchecking.cpp; sourceTree = ""; }; + 37D927DA0F21331F001D4494 /* errorchecking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = errorchecking.h; sourceTree = ""; }; + 37D927DB0F21331F001D4494 /* fastamap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fastamap.cpp; sourceTree = ""; }; + 37D927DC0F21331F001D4494 /* fastamap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fastamap.h; sourceTree = ""; }; + 37D927DD0F21331F001D4494 /* fileoutput.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fileoutput.cpp; sourceTree = ""; }; + 37D927DE0F21331F001D4494 /* fileoutput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fileoutput.h; sourceTree = ""; }; + 37D927DF0F21331F001D4494 /* globaldata.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = globaldata.cpp; sourceTree = ""; }; + 37D927E00F21331F001D4494 /* globaldata.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = globaldata.hpp; sourceTree = ""; }; + 37D927E10F21331F001D4494 /* groupmap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = groupmap.cpp; sourceTree = ""; }; + 37D927E20F21331F001D4494 /* groupmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = groupmap.h; sourceTree = ""; }; + 37D927E30F21331F001D4494 /* helpcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = helpcommand.cpp; sourceTree = ""; }; + 37D927E40F21331F001D4494 /* helpcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = helpcommand.h; sourceTree = ""; }; + 37D927E50F21331F001D4494 /* inputdata.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = inputdata.cpp; sourceTree = ""; }; + 37D927E60F21331F001D4494 /* inputdata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = inputdata.h; sourceTree = ""; }; + 37D927E70F21331F001D4494 /* jackknife.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jackknife.cpp; sourceTree = ""; }; + 37D927E80F21331F001D4494 /* jackknife.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jackknife.h; sourceTree = ""; }; + 37D927E90F21331F001D4494 /* kmer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = kmer.cpp; sourceTree = ""; }; + 37D927EA0F21331F001D4494 /* kmer.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = kmer.hpp; sourceTree = ""; }; + 37D927EB0F21331F001D4494 /* kmerdb.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = kmerdb.cpp; sourceTree = ""; }; + 37D927EC0F21331F001D4494 /* kmerdb.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = kmerdb.hpp; sourceTree = ""; }; + 37D927ED0F21331F001D4494 /* listvector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = listvector.cpp; sourceTree = ""; }; + 37D927EE0F21331F001D4494 /* listvector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = listvector.hpp; sourceTree = ""; }; + 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 = ""; }; + 37D927F70F21331F001D4494 /* ordervector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ordervector.cpp; sourceTree = ""; }; + 37D927F80F21331F001D4494 /* ordervector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = ordervector.hpp; sourceTree = ""; }; + 37D927F90F21331F001D4494 /* parselistcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = parselistcommand.cpp; sourceTree = ""; }; + 37D927FA0F21331F001D4494 /* parselistcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = parselistcommand.h; sourceTree = ""; }; + 37D927FB0F21331F001D4494 /* progress.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = progress.cpp; sourceTree = ""; }; + 37D927FC0F21331F001D4494 /* progress.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = progress.hpp; sourceTree = ""; }; + 37D927FD0F21331F001D4494 /* quitcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = quitcommand.cpp; sourceTree = ""; }; + 37D927FE0F21331F001D4494 /* quitcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = quitcommand.h; sourceTree = ""; }; + 37D927FF0F21331F001D4494 /* rabundvector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rabundvector.cpp; sourceTree = ""; }; + 37D928000F21331F001D4494 /* rabundvector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = rabundvector.hpp; sourceTree = ""; }; + 37D928010F21331F001D4494 /* rarecalc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rarecalc.cpp; sourceTree = ""; }; + 37D928020F21331F001D4494 /* rarecalc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rarecalc.h; sourceTree = ""; }; + 37D928030F21331F001D4494 /* raredisplay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = raredisplay.cpp; sourceTree = ""; }; + 37D928040F21331F001D4494 /* raredisplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = raredisplay.h; sourceTree = ""; }; + 37D928050F21331F001D4494 /* rarefact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rarefact.cpp; sourceTree = ""; }; + 37D928060F21331F001D4494 /* rarefact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rarefact.h; sourceTree = ""; }; + 37D928070F21331F001D4494 /* rarefactcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rarefactcommand.cpp; sourceTree = ""; }; + 37D928080F21331F001D4494 /* rarefactcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rarefactcommand.h; sourceTree = ""; }; + 37D928090F21331F001D4494 /* rarefactioncurvedata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rarefactioncurvedata.h; sourceTree = ""; }; + 37D9280A0F21331F001D4494 /* rarefactsharedcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rarefactsharedcommand.cpp; sourceTree = ""; }; + 37D9280B0F21331F001D4494 /* rarefactsharedcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rarefactsharedcommand.h; sourceTree = ""; }; + 37D928120F21331F001D4494 /* readmatrix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = readmatrix.cpp; sourceTree = ""; }; + 37D928130F21331F001D4494 /* readmatrix.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = readmatrix.hpp; sourceTree = ""; }; + 37D9281A0F21331F001D4494 /* sabundvector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sabundvector.cpp; sourceTree = ""; }; + 37D9281B0F21331F001D4494 /* sabundvector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = sabundvector.hpp; sourceTree = ""; }; + 37D9281C0F21331F001D4494 /* sequence.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sequence.cpp; sourceTree = ""; }; + 37D9281D0F21331F001D4494 /* sequence.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = sequence.hpp; sourceTree = ""; }; + 37D9281E0F21331F001D4494 /* shannon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = shannon.cpp; sourceTree = ""; }; + 37D9281F0F21331F001D4494 /* shannon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = shannon.h; sourceTree = ""; }; + 37D928200F21331F001D4494 /* shared.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = shared.cpp; sourceTree = ""; }; + 37D928210F21331F001D4494 /* shared.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = shared.h; sourceTree = ""; }; + 37D928220F21331F001D4494 /* sharedace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedace.cpp; sourceTree = ""; }; + 37D928230F21331F001D4494 /* sharedace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedace.h; sourceTree = ""; }; + 37D928240F21331F001D4494 /* sharedchao1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedchao1.cpp; sourceTree = ""; }; + 37D928250F21331F001D4494 /* sharedchao1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedchao1.h; sourceTree = ""; }; + 37D928260F21331F001D4494 /* sharedcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedcommand.cpp; sourceTree = ""; }; + 37D928270F21331F001D4494 /* sharedcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedcommand.h; sourceTree = ""; }; + 37D928280F21331F001D4494 /* sharedjabund.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedjabund.cpp; sourceTree = ""; }; + 37D928290F21331F001D4494 /* sharedjabund.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedjabund.h; sourceTree = ""; }; + 37D9282A0F21331F001D4494 /* sharedjclass.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedjclass.cpp; sourceTree = ""; }; + 37D9282B0F21331F001D4494 /* sharedjclass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedjclass.h; sourceTree = ""; }; + 37D9282C0F21331F001D4494 /* sharedjest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedjest.cpp; sourceTree = ""; }; + 37D9282D0F21331F001D4494 /* sharedjest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedjest.h; sourceTree = ""; }; + 37D9282E0F21331F001D4494 /* sharedordervector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedordervector.cpp; sourceTree = ""; }; + 37D9282F0F21331F001D4494 /* sharedordervector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedordervector.h; sourceTree = ""; }; + 37D928300F21331F001D4494 /* sharedrabundvector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedrabundvector.cpp; sourceTree = ""; }; + 37D928310F21331F001D4494 /* sharedrabundvector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedrabundvector.h; sourceTree = ""; }; + 37D928320F21331F001D4494 /* sharedsabundvector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedsabundvector.cpp; sourceTree = ""; }; + 37D928330F21331F001D4494 /* sharedsabundvector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedsabundvector.h; sourceTree = ""; }; + 37D928340F21331F001D4494 /* sharedsobs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedsobs.cpp; sourceTree = ""; }; + 37D928350F21331F001D4494 /* sharedsobs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedsobs.h; sourceTree = ""; }; + 37D928360F21331F001D4494 /* sharedsorabund.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedsorabund.cpp; sourceTree = ""; }; + 37D928370F21331F001D4494 /* sharedsorabund.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedsorabund.h; sourceTree = ""; }; + 37D928380F21331F001D4494 /* sharedsorclass.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedsorclass.cpp; sourceTree = ""; }; + 37D928390F21331F001D4494 /* sharedsorclass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedsorclass.h; sourceTree = ""; }; + 37D9283A0F21331F001D4494 /* sharedsorest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedsorest.cpp; sourceTree = ""; }; + 37D9283B0F21331F001D4494 /* sharedsorest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedsorest.h; sourceTree = ""; }; + 37D9283C0F21331F001D4494 /* sharedthetan.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedthetan.cpp; sourceTree = ""; }; + 37D9283D0F21331F001D4494 /* sharedthetan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedthetan.h; sourceTree = ""; }; + 37D9283E0F21331F001D4494 /* sharedthetayc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedthetayc.cpp; sourceTree = ""; }; + 37D9283F0F21331F001D4494 /* sharedthetayc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedthetayc.h; sourceTree = ""; }; + 37D928400F21331F001D4494 /* simpson.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = simpson.cpp; sourceTree = ""; }; + 37D928410F21331F001D4494 /* simpson.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = simpson.h; sourceTree = ""; }; + 37D928420F21331F001D4494 /* singlelinkage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = singlelinkage.cpp; sourceTree = ""; }; + 37D928430F21331F001D4494 /* sobs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sobs.h; sourceTree = ""; }; + 37D928440F21331F001D4494 /* sparsematrix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sparsematrix.cpp; sourceTree = ""; }; + 37D928450F21331F001D4494 /* sparsematrix.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = sparsematrix.hpp; sourceTree = ""; }; + 37D928460F21331F001D4494 /* summarycommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = summarycommand.cpp; sourceTree = ""; }; + 37D928470F21331F001D4494 /* summarycommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = summarycommand.h; sourceTree = ""; }; + 37D928480F21331F001D4494 /* summarydata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = summarydata.h; sourceTree = ""; }; + 37D928490F21331F001D4494 /* summarydisplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = summarydisplay.h; sourceTree = ""; }; + 37D9284A0F21331F001D4494 /* summarysharedcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = summarysharedcommand.cpp; sourceTree = ""; }; + 37D9284B0F21331F001D4494 /* summarysharedcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = summarysharedcommand.h; sourceTree = ""; }; + 37D9284C0F21331F001D4494 /* utilities.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = utilities.hpp; sourceTree = ""; }; + 37D9284D0F21331F001D4494 /* uvest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = uvest.cpp; sourceTree = ""; }; + 37D9284E0F21331F001D4494 /* uvest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uvest.h; sourceTree = ""; }; + 37D9284F0F21331F001D4494 /* validcalculator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = validcalculator.cpp; sourceTree = ""; }; + 37D928500F21331F001D4494 /* validcalculator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = validcalculator.h; sourceTree = ""; }; + 37D928510F21331F001D4494 /* validcommands.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = validcommands.cpp; sourceTree = ""; }; + 37D928520F21331F001D4494 /* validcommands.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = validcommands.h; sourceTree = ""; }; + 37D928530F21331F001D4494 /* validparameter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = validparameter.cpp; sourceTree = ""; }; + 37D928540F21331F001D4494 /* validparameter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = validparameter.h; sourceTree = ""; }; + 37E5F3E10F29FD4200F8D827 /* treenode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = treenode.h; sourceTree = ""; }; + 37E5F3E20F29FD4200F8D827 /* treenode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = treenode.cpp; sourceTree = ""; }; + 37E5F4900F2A3DA800F8D827 /* readtreecommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = readtreecommand.h; sourceTree = ""; }; + 37E5F4910F2A3DA800F8D827 /* readtreecommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = readtreecommand.cpp; sourceTree = ""; }; 8DD76F6C0486A84900D96B5E /* mothur */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = mothur; sourceTree = BUILT_PRODUCTS_DIR; }; C6859E8B029090EE04C91782 /* Mothur.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = Mothur.1; sourceTree = ""; }; /* End PBXFileReference section */ @@ -315,7 +332,6 @@ 37D927D60F21331F001D4494 /* display.h */, 37D927D80F21331F001D4494 /* engine.hpp */, 37D927D70F21331F001D4494 /* engine.cpp */, - 7E44EBD00F32358B00B0D45D /* makefile */, 37D928B10F213472001D4494 /* errorcheckor */, 37D927DE0F21331F001D4494 /* fileoutput.h */, 37D927DD0F21331F001D4494 /* fileoutput.cpp */, @@ -354,7 +370,7 @@ 37D9284C0F21331F001D4494 /* utilities.hpp */, ); name = Source; - sourceTree = SOURCE_ROOT; + sourceTree = ""; }; 1AB674ADFE9D54B511CA2CBB /* Products */ = { isa = PBXGroup; @@ -368,6 +384,7 @@ isa = PBXGroup; children = ( 37D927BE0F21331F001D4494 /* calculator.h */, + 3792948D0F2E271100B9034A /* treecalculator.h */, 37D927BD0F21331F001D4494 /* calculator.cpp */, 37D927B90F21331F001D4494 /* ace.h */, 37D927B80F21331F001D4494 /* ace.cpp */, @@ -379,6 +396,8 @@ 37D927E70F21331F001D4494 /* jackknife.cpp */, 37D927F50F21331F001D4494 /* npshannon.h */, 37D927F40F21331F001D4494 /* npshannon.cpp */, + 379294880F2E258500B9034A /* parsimony.h */, + 379294890F2E258500B9034A /* parsimony.cpp */, 37D928020F21331F001D4494 /* rarecalc.h */, 37D928010F21331F001D4494 /* rarecalc.cpp */, 37D9281F0F21331F001D4494 /* shannon.h */, @@ -408,11 +427,15 @@ 37D928410F21331F001D4494 /* simpson.h */, 37D928400F21331F001D4494 /* simpson.cpp */, 37D928430F21331F001D4494 /* sobs.h */, + 374610810F40652400460C57 /* unweighted.h */, + 374610820F40652400460C57 /* unweighted.cpp */, 37D9284E0F21331F001D4494 /* uvest.h */, 37D9284D0F21331F001D4494 /* uvest.cpp */, + 3746107C0F4064D100460C57 /* weighted.h */, + 3746107D0F4064D100460C57 /* weighted.cpp */, ); name = calculators; - sourceTree = SOURCE_ROOT; + sourceTree = ""; }; 37D928A90F2133E5001D4494 /* commands */ = { isa = PBXGroup; @@ -432,6 +455,10 @@ 37D927F30F21331F001D4494 /* nocommand.h */, 37D927FA0F21331F001D4494 /* parselistcommand.h */, 37D927F90F21331F001D4494 /* parselistcommand.cpp */, + 3792946E0F2E191800B9034A /* parsimonycommand.h */, + 3792946F0F2E191800B9034A /* parsimonycommand.cpp */, + 37D927FE0F21331F001D4494 /* quitcommand.h */, + 37D927FD0F21331F001D4494 /* quitcommand.cpp */, 37D928080F21331F001D4494 /* rarefactcommand.h */, 37D928070F21331F001D4494 /* rarefactcommand.cpp */, 37D9280B0F21331F001D4494 /* rarefactsharedcommand.h */, @@ -448,11 +475,13 @@ 37D928460F21331F001D4494 /* summarycommand.cpp */, 37D9284B0F21331F001D4494 /* summarysharedcommand.h */, 37D9284A0F21331F001D4494 /* summarysharedcommand.cpp */, - 37D927FE0F21331F001D4494 /* quitcommand.h */, - 37D927FD0F21331F001D4494 /* quitcommand.cpp */, + 3746109B0F40657600460C57 /* unifracunweightedcommand.h */, + 3746109C0F40657600460C57 /* unifracunweightedcommand.cpp */, + 374610760F40645300460C57 /* unifracweightedcommand.h */, + 374610770F40645300460C57 /* unifracweightedcommand.cpp */, ); name = commands; - sourceTree = SOURCE_ROOT; + sourceTree = ""; }; 37D928AC0F213420001D4494 /* containers */ = { isa = PBXGroup; @@ -486,7 +515,7 @@ 37E5F3E20F29FD4200F8D827 /* treenode.cpp */, ); name = containers; - sourceTree = SOURCE_ROOT; + sourceTree = ""; }; 37D928B10F213472001D4494 /* errorcheckor */ = { isa = PBXGroup; @@ -501,7 +530,7 @@ 37D928530F21331F001D4494 /* validparameter.cpp */, ); name = errorcheckor; - sourceTree = SOURCE_ROOT; + sourceTree = ""; }; C6859E8C029090F304C91782 /* Documentation */ = { isa = PBXGroup; @@ -632,7 +661,12 @@ 37E5F3E30F29FD4200F8D827 /* treenode.cpp in Sources */, 37E5F4920F2A3DA800F8D827 /* readtreecommand.cpp in Sources */, 379293C30F2DE73400B9034A /* treemap.cpp in Sources */, - 7E44EBD10F3235D900B0D45D /* makefile in Sources */, + 379294700F2E191800B9034A /* parsimonycommand.cpp in Sources */, + 3792948A0F2E258500B9034A /* parsimony.cpp in Sources */, + 374610780F40645300460C57 /* unifracweightedcommand.cpp in Sources */, + 3746107E0F4064D100460C57 /* weighted.cpp in Sources */, + 374610830F40652400460C57 /* unweighted.cpp in Sources */, + 3746109D0F40657600460C57 /* unifracunweightedcommand.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -685,7 +719,7 @@ ppc, i386, ); - GCC_OPTIMIZATION_LEVEL = 3; + GCC_OPTIMIZATION_LEVEL = 0; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; PREBINDING = NO; diff --git a/calculator.h b/calculator.h index 06c3a24..c119892 100644 --- a/calculator.h +++ b/calculator.h @@ -17,7 +17,7 @@ using namespace std; #include "rabundvector.hpp" #include "uvest.h" -/* The calculator class is the parent class for all the different estimators implemented in mothur. +/* The calculator class is the parent class for all the different estimators implemented in mothur except the tree calculators. It has 2 pure functions EstOutput getValues(SAbundVector*), which works on a single group, and EstOutput getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2), which compares 2 groups. */ diff --git a/collect.cpp b/collect.cpp index 0a92218..a06c320 100644 --- a/collect.cpp +++ b/collect.cpp @@ -3,7 +3,7 @@ * Dotur * * Created by Sarah Westcott on 11/18/08. - * Copyright 2008 __MyCompanyName__. All rights reserved. + * Copyright 2008 Schloss Lab UMASS Amherst. All rights reserved. * */ diff --git a/commandfactory.cpp b/commandfactory.cpp index 0a065cd..dbcfb54 100644 --- a/commandfactory.cpp +++ b/commandfactory.cpp @@ -24,6 +24,9 @@ #include "helpcommand.h" #include "commandfactory.hpp" #include "deconvolutecommand.h" +#include "parsimonycommand.h" +#include "unifracunweightedcommand.h" +#include "unifracweightedcommand.h" #include @@ -49,21 +52,24 @@ Command* CommandFactory::getCommand(string commandName){ try { delete command; //delete the old command - if(commandName == "read.dist") { command = new ReadDistCommand(); } - else if(commandName == "read.otu") { command = new ReadOtuCommand(); } - //else if(commandName == "read.tree") { command = new ReadTreeCommand(); } - else if(commandName == "cluster") { command = new ClusterCommand(); } - else if(commandName == "deconvolute") { command = new DeconvoluteCommand(); } - else if(commandName == "help") { command = new HelpCommand(); } - else if(commandName == "quit") { command = new QuitCommand(); } - else if(commandName == "collect.single") { command = new CollectCommand(); } - else if(commandName == "collect.shared") { command = new CollectSharedCommand(); } - else if(commandName == "rarefaction.single") { command = new RareFactCommand(); } - else if(commandName == "rarefaction.shared") { command = new RareFactSharedCommand(); } - else if(commandName == "summary.single") { command = new SummaryCommand(); } - else if(commandName == "summary.shared") { command = new SummarySharedCommand(); } - else { command = new NoCommand(); } - + if(commandName == "read.dist") { command = new ReadDistCommand(); } + else if(commandName == "read.otu") { command = new ReadOtuCommand(); } + else if(commandName == "read.tree") { command = new ReadTreeCommand(); } + else if(commandName == "cluster") { command = new ClusterCommand(); } + else if(commandName == "deconvolute") { command = new DeconvoluteCommand(); } + else if(commandName == "parsimony") { command = new ParsimonyCommand(); } + else if(commandName == "help") { command = new HelpCommand(); } + else if(commandName == "quit") { command = new QuitCommand(); } + else if(commandName == "collect.single") { command = new CollectCommand(); } + else if(commandName == "collect.shared") { command = new CollectSharedCommand(); } + else if(commandName == "rarefaction.single") { command = new RareFactCommand(); } + else if(commandName == "rarefaction.shared") { command = new RareFactSharedCommand(); } + else if(commandName == "summary.single") { command = new SummaryCommand(); } + else if(commandName == "summary.shared") { command = new SummarySharedCommand(); } + else if(commandName == "unifrac.weighted") { command = new UnifracWeightedCommand(); } + else if(commandName == "unifrac.unweighted") { command = new UnifracUnweightedCommand(); } + else { command = new NoCommand(); } + return command; } catch(exception& e) { diff --git a/errorchecking.cpp b/errorchecking.cpp index 7d63e9b..03844d5 100644 --- a/errorchecking.cpp +++ b/errorchecking.cpp @@ -18,6 +18,12 @@ ErrorCheck::ErrorCheck() { validCommand = new ValidCommands(); validParameter = new ValidParameters(); validCalculator = new ValidCalculators(); +} +/*******************************************************/ + +/******************************************************/ + +void ErrorCheck::refresh() { columnfile = globaldata->getColumnFile(); phylipfile = globaldata->getPhylipFile(); listfile = globaldata->getListFile(); @@ -31,8 +37,9 @@ ErrorCheck::ErrorCheck() { cutoff = globaldata->getCutOff(); format = globaldata->getFormat(); method = globaldata->getMethod(); - + randomtree = globaldata->getRandomTree(); } + /*******************************************************/ /******************************************************/ @@ -46,7 +53,10 @@ ErrorCheck::~ErrorCheck() {} bool ErrorCheck::checkInput(string input) { errorFree = true; clear(); - + + //refresh variable + refresh(); + //get command name and parameters int openParen = input.find_first_of('('); int closeParen = input.find_last_of(')'); @@ -91,6 +101,7 @@ bool ErrorCheck::checkInput(string input) { if (parameter == "fileroot" ) { fileroot = value; } if (parameter == "line" ) { line = value; } if (parameter == "label" ) { label = value; } + if (parameter == "randomtree" ) { randomtree = value; } if (parameter == "single") {//stores estimators in a vector singleEsimators.clear(); //clears out old values @@ -160,6 +171,7 @@ bool ErrorCheck::checkInput(string input) { if (parameter == "fileroot" ) { fileroot = value; } if (parameter == "line" ) { line = value; } if (parameter == "label" ) { label = value; } + if (parameter == "randomtree" ) { randomtree = value; } if (parameter == "single") {//stores estimators in a vector singleEsimators.clear(); //clears out old values @@ -234,6 +246,14 @@ bool ErrorCheck::checkInput(string input) { errorFree = false; } + if (commandName == "parsimony") { + //are you trying to use parsimony without reading a tree or saying you want random distribution + if (randomtree == "0") { + if ((globaldata->getTreeFile() == "") || (globaldata->getGroupFile() == "")) { + cout << "You must read a treefile and a groupfile or set the randomtree parameter to 1, before you may execute the parsimony command." << endl; return false; } + } + } + //check for valid method if (commandName == "cluster") { if ((method == "furthest") || (method == "nearest") || (method == "average")) { } diff --git a/errorchecking.h b/errorchecking.h index d1e2f82..9387bc5 100644 --- a/errorchecking.h +++ b/errorchecking.h @@ -36,8 +36,9 @@ class ErrorCheck { void validateParseFiles(); void validateTreeFiles(); void clear(); + void refresh(); string phylipfile, columnfile, listfile, rabundfile, sabundfile, namefile, groupfile, orderfile, fastafile, treefile, cutoff, format; - string precision, method, fileroot, label, line, iters, jumble, freq, single, rarefaction, shared, summary; + string precision, method, fileroot, label, line, iters, jumble, freq, single, rarefaction, shared, summary, randomtree; string commandName, optionText; bool errorFree; vector singleEsimators, sharedEstimators, rareEstimators, summaryEstimators, sharedRareEstimators; diff --git a/globaldata.cpp b/globaldata.cpp index f706b53..bc836e8 100644 --- a/globaldata.cpp +++ b/globaldata.cpp @@ -114,6 +114,8 @@ void GlobalData::parseGlobalData(string commandString, string optionText){ if (key == "freq" ) { freq = value; } if (key == "method" ) { method = value; } if (key == "fileroot" ) { fileroot = value; } + if (key == "randomtree" ) { randomtree = value; } + if (key == "groups" ) { groups = value; } if (key == "single") {//stores estimators in a vector singleEstimators.clear(); //clears out old values @@ -145,20 +147,26 @@ void GlobalData::parseGlobalData(string commandString, string optionText){ if (value == "default") { value = "sharedobserved"; } splitAtDash(value, sharedRareEstimators); } - if (key == "line") {//stores lines to be used in a vector + if (key == "line") {//stores lines to be used in a set lines.clear(); line = value; label = ""; splitAtDash(value, lines); allLines = 0; } - if (key == "label") {//stores lines to be used in a vector + if (key == "label") {//stores lines to be used in a set labels.clear(); label = value; line = ""; splitAtDash(value, labels); allLines = 0; } + if (key == "groups") {//stores lines to be used in a vector + Groups.clear(); + groups = value; + splitAtDash(value, Groups); + } + } //saves the last parameter @@ -181,7 +189,8 @@ void GlobalData::parseGlobalData(string commandString, string optionText){ if (key == "freq" ) { freq = value; } if (key == "method" ) { method = value; } if (key == "fileroot" ) { fileroot = value; } - + if (key == "randomtree" ) { randomtree = value; } + if (key == "single") {//stores estimators in a vector singleEstimators.clear(); //clears out old values if (value == "default") { value = "sobs-chao-ace-jack-bootstrap-shannon-npshannon-simpson-rarefraction"; } @@ -293,14 +302,16 @@ string GlobalData::getFileRoot() { return fileroot; } string GlobalData::getIters() { return iters; } string GlobalData::getJumble() { return jumble; } string GlobalData::getFreq() { return freq; } +string GlobalData::getRandomTree() { return randomtree; } void GlobalData::setListFile(string file) { listfile = file; inputFileName = file;} void GlobalData::setRabundFile(string file) { rabundfile = file; inputFileName = file;} void GlobalData::setSabundFile(string file) { sabundfile = file; inputFileName = file;} void GlobalData::setPhylipFile(string file) { phylipfile = file; inputFileName = file;} void GlobalData::setColumnFile(string file) { columnfile = file; inputFileName = file;} -//void GlobalData::setGroupFile(string file) { groupfile = file; } -void GlobalData::setNameFile(string file) { namefile = file; } -void GlobalData::setFormat(string Format) { format = Format; } +//void GlobalData::setGroupFile(string file) { groupfile = file; } +void GlobalData::setNameFile(string file) { namefile = file; } +void GlobalData::setFormat(string Format) { format = Format; } +void GlobalData::setRandomTree(string Random) { randomtree = Random; } /*******************************************************/ @@ -334,7 +345,8 @@ void GlobalData::clear() { iters = "1000"; line = ""; label = ""; - jumble = "1"; + jumble = "1"; //0 means don't jumble, 1 means jumble. + randomtree = "0"; //0 means user will enter some user trees, 1 means they just want the random tree distribution. freq = "100"; method = "furthest"; fileroot = ""; diff --git a/globaldata.hpp b/globaldata.hpp index f513d52..8089167 100644 --- a/globaldata.hpp +++ b/globaldata.hpp @@ -27,7 +27,7 @@ public: InputData* ginput; OrderVector* gorder; ListVector* glist; - Tree* gTree; + vector gTree; SharedListVector* gSharedList; SAbundVector* sabund; GroupMap* gGroupmap; @@ -37,6 +37,7 @@ public: vector singleEstimators, summaryEstimators, sharedEstimators, rareEstimators, sharedRareEstimators, sharedSummaryEstimators; //holds estimators to be used set lines; //hold lines to be used set labels; //holds labels to be used + vector Groups; string getPhylipFile(); string getColumnFile(); @@ -56,6 +57,7 @@ public: string getIters(); string getJumble(); string getFreq(); + string getRandomTree(); void setListFile(string); void setPhylipFile(string); void setColumnFile(string); @@ -63,6 +65,7 @@ public: void setRabundFile(string); void setSabundFile(string); void setFormat(string); + void setRandomTree(string); void setListVector(ListVector*); @@ -77,7 +80,7 @@ public: void splitAtDash(string&, set&); private: - string phylipfile, columnfile, listfile, rabundfile, sabundfile, namefile, groupfile, orderfile, fastafile, treefile, line, label; + string phylipfile, columnfile, listfile, rabundfile, sabundfile, namefile, groupfile, orderfile, fastafile, treefile, line, label, randomtree, groups; string cutoff, format, precision, method, fileroot, iters, jumble, freq, single, rarefaction, shared, summary, sharedsummary, sharedrarefaction; static GlobalData* _uniqueInstance; GlobalData( const GlobalData& ); // Disable copy constructor diff --git a/inputdata.cpp b/inputdata.cpp index e5513ab..4ed9c27 100644 --- a/inputdata.cpp +++ b/inputdata.cpp @@ -3,7 +3,7 @@ * Dotur * * Created by Sarah Westcott on 11/18/08. - * Copyright 2008 __MyCompanyName__. All rights reserved. + * Copyright 2008 Schloss Lab UMASS Amherst. All rights reserved. * */ diff --git a/npshannon.cpp b/npshannon.cpp index 4ff2611..80c8372 100644 --- a/npshannon.cpp +++ b/npshannon.cpp @@ -3,7 +3,7 @@ * Dotur * * Created by John Westcott on 1/7/09. - * Copyright 2009 __MyCompanyName__. All rights reserved. + * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. * */ diff --git a/parsimony.cpp b/parsimony.cpp new file mode 100644 index 0000000..6c18470 --- /dev/null +++ b/parsimony.cpp @@ -0,0 +1,42 @@ +/* + * parsimony.cpp + * Mothur + * + * Created by Sarah Westcott on 1/26/09. + * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. + * + */ + +#include "parsimony.h" + +/**************************************************************************************************/ +EstOutput Parsimony::getValues(Tree* t) { + try { + data.resize(1,0); + + int score = 0; + + for(int i=t->getNumLeaves();igetNumNodes();i++){ + int lc = t->tree[i].getLChild(); + int rc = t->tree[i].getRChild(); + + if(t->tree[i].pGroups.size() > t->tree[rc].pGroups.size() || t->tree[i].pGroups.size() > t->tree[lc].pGroups.size()){ + score++; + } + } + + data[0] = score; + + return data; + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the Parsimony class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the Parsimony class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + +} +/**************************************************************************************************/ diff --git a/parsimony.h b/parsimony.h new file mode 100644 index 0000000..b5d7e20 --- /dev/null +++ b/parsimony.h @@ -0,0 +1,32 @@ +#ifndef PARSIMONY_H +#define PARSIMONY_H + + +/* + * parsimony.h + * Mothur + * + * Created by Sarah Westcott on 1/26/09. + * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. + * + */ + +#include "treecalculator.h" +#include "treemap.h" + +/***********************************************************************/ + +class Parsimony : public TreeCalculator { + + public: + Parsimony(TreeMap* t) : tmap(t) {}; + ~Parsimony() {}; + EstOutput getValues(Tree*); + + private: + EstOutput data; + TreeMap* tmap; +}; + +/***********************************************************************/ +#endif \ No newline at end of file diff --git a/parsimonycommand.cpp b/parsimonycommand.cpp new file mode 100644 index 0000000..4632019 --- /dev/null +++ b/parsimonycommand.cpp @@ -0,0 +1,284 @@ +/* + * parsimonycommand.cpp + * Mothur + * + * Created by Sarah Westcott on 1/26/09. + * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. + * + */ + +#include "parsimonycommand.h" + +/***********************************************************/ +ParsimonyCommand::ParsimonyCommand() { + try { + globaldata = GlobalData::getInstance(); + + //randomtree will tell us if user had their own treefile or if they just want the random distribution + convert(globaldata->getRandomTree(), randomtree); + + //user has entered their own tree + if (randomtree == 0) { + T = globaldata->gTree; + tmap = globaldata->gTreemap; + parsFile = globaldata->getTreeFile() + ".parsimony"; + openOutputFile(parsFile, out); + sumFile = globaldata->getTreeFile() + ".psummary"; + openOutputFile(sumFile, outSum); + distFile = globaldata->getTreeFile() + ".pdistrib"; + openOutputFile(distFile, outDist); + + }else { //user wants random distribution + getUserInput(); + parsFile = "rd_parsimony"; + openOutputFile(parsFile, out); + } + + convert(globaldata->getIters(), iters); //how many random trees to generate + pars = new Parsimony(tmap); + + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the ParsimonyCommand class Function ParsimonyCommand. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the ParsimonyCommand class function ParsimonyCommand. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} +/***********************************************************/ +int ParsimonyCommand::execute() { + try { + + //get pscore for users tree + userData.resize(1,0); //data[0] = pscore. + randomData.resize(1,0); //data[0] = pscore. + + //format output + outDist.setf(ios::fixed, ios::floatfield); outDist.setf(ios::showpoint); + outDist << "RandomTree#" << '\t' << "ParsScore" << endl; + + if (randomtree == 0) { + //get pscores for users trees + for (int i = 0; i < T.size(); i++) { + cout << "Processing tree " << i+1 << endl; + userData = pars->getValues(T[i]); //userData[0] = pscore + //update uscoreFreq + it = uscoreFreq.find(userData[0]); + if (it == uscoreFreq.end()) {//new score + uscoreFreq[userData[0]] = 1; + }else{ uscoreFreq[userData[0]]++; } + + //add users score to valid scores + validScores[userData[0]] = userData[0]; + + //save score for summary file + userTreeScores.push_back(userData[0]); + + } + + //get pscores for random trees + for (int j = 0; j < iters; j++) { + //create new tree with same num nodes and leaves as users + randT = new Tree(); + //create random relationships between nodes + randT->assembleRandomTree(); + //get pscore of random tree + randomData = pars->getValues(randT); + + //add trees pscore to map of scores + it2 = rscoreFreq.find(randomData[0]); + if (it2 != rscoreFreq.end()) {//already have that score + rscoreFreq[randomData[0]]++; + }else{//first time we have seen this score + rscoreFreq[randomData[0]] = 1; + } + + //add randoms score to validscores + validScores[randomData[0]] = randomData[0]; + + //output info to pdistrib file + outDist << j+1 << '\t'<< '\t' << randomData[0] << endl; + + delete randT; + } + }else { + //get pscores for random trees + for (int j = 0; j < iters; j++) { + //create new tree with same num nodes and leaves as users + randT = new Tree(); + //create random relationships between nodes + randT->assembleRandomTree(); + //get pscore of random tree + randomData = pars->getValues(randT); + + //add trees pscore to map of scores + it2 = rscoreFreq.find(randomData[0]); + if (it2 != rscoreFreq.end()) {//already have that score + rscoreFreq[randomData[0]]++; + }else{//first time we have seen this score + rscoreFreq[randomData[0]] = 1; + } + + //add randoms score to validscores + validScores[randomData[0]] = randomData[0]; + + delete randT; + } + } + + float rcumul = 0.0000; + float ucumul = 0.0000; + + //this loop fills the cumulative maps and put 0.0000 in the score freq map to make it easier to print. + for (it = validScores.begin(); it != validScores.end(); it++) { + if (randomtree == 0) { + it2 = uscoreFreq.find(it->first); + //user data has that score + if (it2 != uscoreFreq.end()) { uscoreFreq[it->first] /= T.size(); ucumul+= it2->second; } + else { uscoreFreq[it->first] = 0.0000; } //no user trees with that score + //make uCumul map + uCumul[it->first] = ucumul; + } + + //make rscoreFreq map and rCumul + it2 = rscoreFreq.find(it->first); + //get percentage of random trees with that info + if (it2 != rscoreFreq.end()) { rscoreFreq[it->first] /= iters; rcumul+= it2->second; } + else { rscoreFreq[it->first] = 0.0000; } //no random trees with that score + rCumul[it->first] = rcumul; + } + + //find the signifigance of each user trees score when compared to the random trees and save for printing the summary file + for (int h = 0; h < userTreeScores.size(); h++) { + UScoreSig.push_back(rCumul[userTreeScores[h]]); + } + + printParsimonyFile(); + printUSummaryFile(); + + //reset randomTree parameter to 0 + globaldata->setRandomTree("0"); + + return 0; + + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the ParsimonyCommand class Function execute. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the ParsimonyCommand class function execute. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} + +/***********************************************************/ +void ParsimonyCommand::printParsimonyFile() { + try { + //column headers + if (randomtree == 0) { + out << "Score" << '\t' << "UserFreq" << '\t' << "UserCumul" << '\t' << "RandFreq" << '\t' << "RandCumul" << endl; + }else { + out << "Score" << '\t' << "RandFreq" << '\t' << "RandCumul" << endl; + } + + //format output + out.setf(ios::fixed, ios::floatfield); out.setf(ios::showpoint); + + //print each line + for (it = validScores.begin(); it != validScores.end(); it++) { + if (randomtree == 0) { + out << setprecision(6) << it->first << '\t' << '\t' << uscoreFreq[it->first] << '\t' << uCumul[it->first] << '\t' << rscoreFreq[it->first] << '\t' << rCumul[it->first] << endl; + }else{ + out << setprecision(6) << it->first << '\t' << '\t' << rscoreFreq[it->first] << '\t' << rCumul[it->first] << endl; + } + } + + out.close(); + + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the ParsimonyCommand class Function printParsimonyFile. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the ParsimonyCommand class function printParsimonyFile. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} +/***********************************************************/ +void ParsimonyCommand::printUSummaryFile() { + try { + //column headers + outSum << "Tree#" << '\t' << "ParsScore" << '\t' << '\t' << "ParsSig" << endl; + + //format output + outSum.setf(ios::fixed, ios::floatfield); outSum.setf(ios::showpoint); + + //print each line + for (int i = 0; i< T.size(); i++) { + outSum << setprecision(6) << i+1 << '\t' << '\t' << userTreeScores[i] << '\t' << UScoreSig[i] << endl; + } + + outSum.close(); + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the ParsimonyCommand class Function printUSummaryFile. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the ParsimonyCommand class function printUSummaryFile. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} + +/***********************************************************/ +void ParsimonyCommand::getUserInput() { + try { + + //create treemap + tmap = new TreeMap(); + + cout << "Please enter the number of groups you would like to analyze: "; + cin >> numGroups; + + int num, count; + count = 1; + numEachGroup.resize(numGroups, 0); + + for (int i = 1; i <= numGroups; i++) { + cout << "Please enter the number of sequences in group " << i << ": "; + cin >> num; + + //set tmaps seqsPerGroup + tmap->seqsPerGroup[toString(i)] = num; + + //set tmaps namesOfSeqs + for (int j = 0; j < num; j++) { + tmap->namesOfSeqs.push_back(toString(count)); + tmap->treemap[toString(count)].groupname = toString(i); + count++; + } + } + + //clears buffer so next command doesn't have error + string s; + getline(cin, s); + + //save tmap for later + globaldata->gTreemap = tmap; + + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the ParsimonyCommand class Function getUserInput. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the ParsimonyCommand class function getUserInput. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} +/***********************************************************/ + diff --git a/parsimonycommand.h b/parsimonycommand.h new file mode 100644 index 0000000..5429e77 --- /dev/null +++ b/parsimonycommand.h @@ -0,0 +1,62 @@ +#ifndef PARSIMONYCOMMAND_H +#define PARSIMONYCOMMAND_H +/* + * parsimonycommand.h + * Mothur + * + * Created by Sarah Westcott on 1/26/09. + * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. + * + */ + +#include +#include +#include +#include +#include +#include "command.hpp" +#include "parsimony.h" +#include "treemap.h" + +using namespace std; + +class GlobalData; + +class ParsimonyCommand : public Command { + + public: + ParsimonyCommand(); + ~ParsimonyCommand() { delete pars; } + int execute(); + + private: + GlobalData* globaldata; + vector T; //user trees + Tree* randT; //random tree + TreeMap* tmap; + Parsimony* pars; + string parsFile, sumFile, distFile; + int iters, randomtree, numGroups; + vector numEachGroup; //vector containing the number of sequences in each group the users wants for random distrib. + vector userTreeScores; //scores for users trees + vector UScoreSig; //tree score signifigance when compared to random trees - percentage of random trees with that score or lower. + EstOutput userData; //pscore info for user tree + EstOutput randomData; //pscore info for random trees + map validScores; //contains scores from both user and random + map rscoreFreq; //pscore, number of random trees with that score. + map uscoreFreq; //pscore, number of user trees with that score. + map rCumul; //pscore, cumulative percentage of number of random trees with that score or lower. + map uCumul; //pscore, cumulative percentage of number of user trees with that score or lower . + map::iterator it; + map::iterator it2; + + ofstream out, outSum, outDist; + + void printParsimonyFile(); + void printUSummaryFile(); + void getUserInput(); + +}; + + +#endif diff --git a/raredisplay.cpp b/raredisplay.cpp index e2c75e9..0b80307 100644 --- a/raredisplay.cpp +++ b/raredisplay.cpp @@ -3,7 +3,7 @@ * Dotur * * Created by Sarah Westcott on 11/18/08. - * Copyright 2008 __MyCompanyName__. All rights reserved. + * Copyright 2008 Schloss Lab UMASS Amherst. All rights reserved. * */ diff --git a/readtree.cpp b/readtree.cpp index 47da6d6..77277e7 100644 --- a/readtree.cpp +++ b/readtree.cpp @@ -10,15 +10,10 @@ #include "readtree.h" /***********************************************************************/ -//Parent Class -// The following functions are used by all reading formats. -/***********************************************************************/ -ReadTree::ReadTree() { +ReadTree::ReadTree() { try { - globaldata = GlobalData::getInstance(); - T = new Tree(); - numNodes = T->getNumNodes(); - numLeaves = T->getNumLeaves(); + globaldata = GlobalData::getInstance(); + globaldata->gTree.clear(); } catch(exception& e) { cout << "Standard Error: " << e.what() << " has occurred in the ReadTree class Function ReadTree. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; @@ -117,6 +112,115 @@ float ReadTree::readBranchLength(istream& f) { void ReadNewickTree::read() { try { + int c; + int comment = 0; + + //if you are not a nexus file + if ((c = filehandle.peek()) != '#') { + while((c = filehandle.peek()) != EOF) { + //make new tree + T = new Tree(); + numNodes = T->getNumNodes(); + numLeaves = T->getNumLeaves(); + + readTreeString(); + //save trees for later commands + globaldata->gTree.push_back(T); + } + //if you are a nexus file + }else if ((c = filehandle.peek()) == '#') { + nexusTranslation(); //reads file through the translation and updates treemap + while((c = filehandle.peek()) != EOF) { + // get past comments + while ((c = filehandle.peek()) != EOF) { + if(holder == "[" || holder == "[!"){ + comment = 1; + } + if(holder == "]"){ + comment = 0; + } + if((holder == "tree" || holder == "end;") && comment != 1){ holder = ""; comment = 0; break;} + filehandle >> holder; + } + + //pass over the "tree rep.6878900 = " + while (((c = filehandle.get()) != '(') && ((c = filehandle.peek()) != EOF) ) {;} + + if (c == EOF ) { break; } + filehandle.putback(c); //put back first ( of tree. + + //make new tree + T = new Tree(); + numNodes = T->getNumNodes(); + numLeaves = T->getNumLeaves(); + + //read tree info + readTreeString(); + //save trees for later commands + globaldata->gTree.push_back(T); + } + } + + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the ReadNewickTree class Function read. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the ReadNewickTree class function read. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} +/**************************************************************************************************/ +//This function read the file through the translation of the sequences names and updates treemap. +void ReadNewickTree::nexusTranslation() { + try { + + holder = ""; + int numSeqs = globaldata->gTreemap->getNumSeqs(); //must save this some when we clear old names we can still know how many sequences there were + int comment = 0; + + // get past comments + while(holder != "translate" && holder != "Translate"){ + if(holder == "[" || holder == "[!"){ + comment = 1; + } + if(holder == "]"){ + comment = 0; + } + filehandle >> holder; + if(holder == "tree" && comment != 1){return;} + } + + //update treemap + globaldata->gTreemap->namesOfSeqs.clear(); + for(int i=0;i> number; + filehandle >> name; + name.erase(name.end()-1); //erase the comma + //insert new one with new name + globaldata->gTreemap->treemap[toString(number)].groupname = globaldata->gTreemap->treemap[name].groupname; + globaldata->gTreemap->treemap[toString(number)].vectorIndex = globaldata->gTreemap->treemap[name].vectorIndex; + //erase old one. so treemap[sarah].groupnumber is now treemap[1].groupnumber. if number is 1 and name is sarah. + globaldata->gTreemap->treemap.erase(name); + globaldata->gTreemap->namesOfSeqs.push_back(number); + } + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the ReadNewickTree class Function nexus. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the ReadNewickTree class function nexus. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} + +/**************************************************************************************************/ +void ReadNewickTree::readTreeString() { + try { + int n = 0; int lc, rc; @@ -143,7 +247,7 @@ void ReadNewickTree::read() { } } //note: treeclimber had the code below added - not sure why? - else{ + else{ filehandle.putback(ch); char name[MAX_LINE]; filehandle.get(name, MAX_LINE,'\n'); @@ -166,18 +270,17 @@ void ReadNewickTree::read() { if(lc!=-1){ T->tree[lc].setParent(n); } if(rc!=-1){ T->tree[rc].setParent(n); } } - - //save tree for later commands - globaldata->gTree = T; + } catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the ReadNewickTree class Function read. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + cout << "Standard Error: " << e.what() << " has occurred in the ReadNewickTree class Function readTreeString. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; exit(1); } catch(...) { - cout << "An unknown error has occurred in the ReadNewickTree class function read. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + cout << "An unknown error has occurred in the ReadNewickTree class function readTreeString. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; exit(1); } + } /**************************************************************************************************/ diff --git a/readtree.h b/readtree.h index 1abef8a..02b6129 100644 --- a/readtree.h +++ b/readtree.h @@ -32,15 +32,11 @@ class ReadTree { int readSpecialChar(istream&, char, string); int readNodeChar(istream& f); float readBranchLength(istream& f); - - - Tree* getTree() { return T; } - int numNodes, numLeaves; + protected: GlobalData* globaldata; + int numNodes, numLeaves; - protected: - Tree* T; }; /****************************************************************************/ @@ -48,14 +44,18 @@ class ReadTree { class ReadNewickTree : public ReadTree { public: - ReadNewickTree(string file) : treeFile(file) { openInputFile(file, filehandle); } + ReadNewickTree(string file) : treeFile(file) { openInputFile(file, filehandle); } ~ReadNewickTree() {}; void read(); private: + Tree* T; int readNewickInt(istream&, int&, Tree*); + void readTreeString(); + void nexusTranslation(); ifstream filehandle; string treeFile; + string holder; }; /****************************************************************************/ diff --git a/readtreecommand.cpp b/readtreecommand.cpp index 7cca943..a540c74 100644 --- a/readtreecommand.cpp +++ b/readtreecommand.cpp @@ -46,8 +46,12 @@ int ReadTreeCommand::execute(){ read->read(); - Tree* T = globaldata->gTree; -// T->createNewickFile(); + vector T = globaldata->gTree; + + //assemble users trees + for (int i = 0; i < T.size(); i++) { + T[i]->assembleTree(); + } return 0; } diff --git a/sharedsabundvector.cpp b/sharedsabundvector.cpp index c581d93..8b6f8fa 100644 --- a/sharedsabundvector.cpp +++ b/sharedsabundvector.cpp @@ -3,7 +3,7 @@ * Dotur * * Created by Sarah Westcott on 12/10/08. - * Copyright 2008 __MyCompanyName__. All rights reserved. + * Copyright 2008 Schloss Lab UMASS Amherst. All rights reserved. * */ diff --git a/tree.cpp b/tree.cpp index 03eb171..94ab326 100644 --- a/tree.cpp +++ b/tree.cpp @@ -13,8 +13,8 @@ /*****************************************************************/ Tree::Tree() { try { + globaldata = GlobalData::getInstance(); - numLeaves = globaldata->gTreemap->getNumSeqs(); numNodes = 2*numLeaves - 1; @@ -22,15 +22,18 @@ Tree::Tree() { //initialize tree with correct number of nodes, name and group info. for (int i = 0; i < numNodes; i++) { - //initialize leaf nodes if (i <= (numLeaves-1)) { tree[i].setName(globaldata->gTreemap->namesOfSeqs[i]); tree[i].setGroup(globaldata->gTreemap->getGroup(globaldata->gTreemap->namesOfSeqs[i])); //the node knows its index tree[i].setIndex(i); + //set pcount and pGroup for groupname to 1. + tree[i].pcount[globaldata->gTreemap->getGroup(globaldata->gTreemap->namesOfSeqs[i])] = 1; + tree[i].pGroups[globaldata->gTreemap->getGroup(globaldata->gTreemap->namesOfSeqs[i])] = 1; //Treemap knows name, group and index to speed up search globaldata->gTreemap->setIndex(globaldata->gTreemap->namesOfSeqs[i], i); + //intialize non leaf nodes }else if (i > (numLeaves-1)) { tree[i].setName(""); @@ -85,7 +88,262 @@ void Tree::setIndex(string searchName, int index) { exit(1); } } +/*****************************************************************/ +void Tree::assembleTree() { + try { + //build the pGroups in non leaf nodes to be used in the parsimony calcs. + for (int i = numLeaves; i < numNodes; i++) { + tree[i].pGroups = (mergeGroups(i)); + tree[i].pcount = (mergeGcounts(i)); + } + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the Tree class Function assembleTree. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the Tree class function assembleTree. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} +/*****************************************************************/ +void Tree::getCopy(Tree* copy) { + try { + + //for each node in the tree copy its info + for (int i = 0; i < numNodes; i++) { + //copy name + tree[i].setName(copy->tree[i].getName()); + + //copy group + tree[i].setGroup(copy->tree[i].getGroup()); + + //copy branch length + tree[i].setBranchLength(copy->tree[i].getBranchLength()); + + //copy parent + tree[i].setParent(copy->tree[i].getParent()); + + //copy children + tree[i].setChildren(copy->tree[i].getLChild(), copy->tree[i].getRChild()); + + //copy index in node and tmap + tree[i].setIndex(copy->tree[i].getIndex()); + setIndex(copy->tree[i].getName(), getIndex(copy->tree[i].getName())); + + //copy pGroups + tree[i].pGroups = copy->tree[i].pGroups; + + //copy pcount + tree[i].pcount = copy->tree[i].pcount; + } + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the Tree class Function getCopy. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the Tree class function getCopy. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} +/*****************************************************************/ +//returns a map with a groupname and the number of times that group was seen in the children +//for instance if your children are white and black then it would return a map with 2 entries +// p[white] = 1 and p[black] = 1. Now go up a level and merge that with a node who has p[white] = 1 +//and you get p[white] = 2, p[black] = 1, but you erase the p[black] because you have a p value higher than 1. + +map Tree::mergeGroups(int i) { + try { + + int lc = tree[i].getLChild(); + int rc = tree[i].getRChild(); + + //set parsimony groups to left child + map parsimony = tree[lc].pGroups; + + int maxPars = 1; + + //look at right child groups and update maxPars if right child has something higher for that group. + for(it=tree[rc].pGroups.begin();it!=tree[rc].pGroups.end();it++){ + parsimony[it->first]++; + + if(parsimony[it->first] > maxPars){ + maxPars = parsimony[it->first]; + } + } + + // this is true if right child had a greater parsimony for a certain group + if(maxPars > 1){ + //erase all the groups that are only 1 because you found something with 2. + for(it=parsimony.begin();it!=parsimony.end();it++){ + if(it->second == 1){ + parsimony.erase(it->first); + it--; + } + } + //set one remaining groups to 1 + //so with our above example p[white] = 2 would be left and it would become p[white] = 1 + for(it=parsimony.begin();it!=parsimony.end();it++){ + parsimony[it->first] = 1; + } + + } + + return parsimony; + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the Tree class Function mergeGroups. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the Tree class function mergeGroups. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} + +/**************************************************************************************************/ +map Tree::mergeGcounts(int position) { + try{ + map::iterator pos; + + int lc = tree[position].getLChild(); + int rc = tree[position].getRChild(); + + map sum = tree[lc].pcount; + + for(it=tree[rc].pcount.begin();it!=tree[rc].pcount.end();it++){ + sum[it->first] += it->second; + } + return sum; + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the Tree class Function mergeGcounts. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the Tree class function mergeGcounts. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} +/**************************************************************************************************/ + +void Tree::randomLabels() { + try { + for(int i=numLeaves-1;i>=0;i--){ + if(tree[i].pGroups.size() == 0){ + continue; + } + + int escape = 1; + int z; + + while(escape == 1){ + z = int((float)(i+1) * (float)(rand()) / ((float)RAND_MAX+1.0)); + + if(tree[z].pGroups.size() != 0){ + escape = 0; + } + } + + + map lib_hold = tree[z].pGroups; + tree[z].pGroups = (tree[i].pGroups); + tree[i].pGroups = (lib_hold); + + tree[z].setGroup(tree[z].pGroups.begin()->first); + tree[i].setGroup(tree[i].pGroups.begin()->first); + + map gcount_hold = tree[z].pcount; + tree[z].pcount = (tree[i].pcount); + tree[i].pcount = (gcount_hold); + } + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the Tree class Function randomLabels. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the Tree class function randomLabels. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} +/**************************************************************************************************/ + +void Tree::randomBlengths() { + try { + for(int i=numNodes-1;i>=0;i--){ + int z = int((float)(i+1) * (float)(rand()) / ((float)RAND_MAX+1.0)); + + float bl_hold = tree[z].getBranchLength(); + tree[z].setBranchLength(tree[i].getBranchLength()); + tree[i].setBranchLength(bl_hold); + } + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the Tree class Function randomBlengths. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the Tree class function randomBlengths. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} +/*************************************************************************************************/ +void Tree::assembleRandomUnifracTree() { + randomLabels(); + assembleTree(); +} + +/*************************************************************************************************/ +//for now it's just random topology but may become random labels as well later that why this is such a simple function now... +void Tree::assembleRandomTree() { + randomTopology(); + assembleTree(); +} +/**************************************************************************************************/ + +void Tree::randomTopology() { + try { + for(int i=0;i #include #include +#include +#include +#include +#include + #include "treenode.h" #include "globaldata.hpp" /* This class represents the treefile. */ - - class Tree { public: - Tree(); + Tree(); //to generate a tree from a file ~Tree() {}; - Tree generateRandomTree(); + + void getCopy(Tree*); //makes tree a copy of the one passed in. + void assembleRandomTree(); + void assembleRandomUnifracTree(); void createNewickFile(); int getIndex(string); void setIndex(string, int); int getNumNodes() { return numNodes; } - int getNumLeaves(){ return numLeaves;} + int getNumLeaves(){ return numLeaves; } + + //this function takes the leaf info and populates the non leaf nodes + void assembleTree(); + vector tree; //the first n nodes are the leaves, where n is the number of sequences. private: GlobalData* globaldata; - int findRoot(); //return index of root node - void printBranch(int); //recursively print out tree int numNodes, numLeaves; ofstream out; string filename; + + map::iterator it; + map mergeGroups(int); //returns a map with a groupname and the number of times that group was seen in the children + map Tree::mergeGcounts(int); + void randomTopology(); + void randomBlengths(); + void randomLabels(); + int findRoot(); //return index of root node + void printBranch(int); //recursively print out tree }; #endif diff --git a/treecalculator.h b/treecalculator.h new file mode 100644 index 0000000..0bc41d9 --- /dev/null +++ b/treecalculator.h @@ -0,0 +1,48 @@ +#ifndef TREECALCULATOR_H +#define TREECALCULATOR_H + +/* + * treecalculator.h + * Mothur + * + * Created by Sarah Westcott on 1/26/09. + * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. + * + */ + +using namespace std; + +#include +#include +#include +#include +#include +#include +#include "utilities.hpp" +#include "tree.h" + +/* The tree calculator class is the parent class for tree calculators in mothur. */ + +typedef vector EstOutput; + +/***********************************************************************/ + +class TreeCalculator { + +public: + TreeCalculator(){}; + TreeCalculator(string n) : name(n) {}; + ~TreeCalculator(){}; + virtual EstOutput getValues(Tree*) = 0; + + virtual string getName() { return name; } + +protected: + EstOutput data; + string name; + +}; + +/***********************************************************************/ + +#endif \ No newline at end of file diff --git a/treemap.cpp b/treemap.cpp index 6fb8536..bee0d11 100644 --- a/treemap.cpp +++ b/treemap.cpp @@ -31,7 +31,14 @@ void TreeMap::readMap() { setNamesOfGroups(seqGroup); treemap[seqName].groupname = seqGroup; //store data in map - + + it2 = seqsPerGroup.find(seqGroup); + if (it2 == seqsPerGroup.end()) { //if it's a new group + seqsPerGroup[seqGroup] = 1; + }else {//it's a group we already have + seqsPerGroup[seqGroup]++; + } + gobble(fileHandle); } fileHandle.close(); @@ -40,7 +47,7 @@ void TreeMap::readMap() { int TreeMap::getNumGroups() { - return namesOfGroups.size(); + return seqsPerGroup.size(); } /************************************************************/ diff --git a/treemap.h b/treemap.h index d9617f5..60f75b3 100644 --- a/treemap.h +++ b/treemap.h @@ -26,6 +26,7 @@ struct GroupIndex { class TreeMap { public: + TreeMap() {}; TreeMap(string); ~TreeMap(); void readMap(); @@ -36,6 +37,8 @@ public: string getGroup(string); vector namesOfGroups; vector namesOfSeqs; + map seqsPerGroup; //groupname, number of seqs in that group. + map treemap; //sequence name and groupname void print(ostream&); private: @@ -43,8 +46,9 @@ private: string groupFileName; int numGroups; map::iterator it; + map::iterator it2; void setNamesOfGroups(string); - map treemap; //sequence name and groupname + }; #endif diff --git a/treenode.cpp b/treenode.cpp index b31fefd..ae7d0e4 100644 --- a/treenode.cpp +++ b/treenode.cpp @@ -23,8 +23,7 @@ Node::Node() { /****************************************************************/ void Node::setName(string Name) { name = Name; } /****************************************************************/ -//non leaf nodes will belong to multiple groups, leaf nodes will only belong to one. -void Node::setGroup(string groups) { group.push_back(groups); } +void Node::setGroup(string groups) { group =groups; } /****************************************************************/ void Node::setBranchLength(float l) { branchLength = l; } /****************************************************************/ @@ -36,7 +35,7 @@ void Node::setChildren(int lc, int rc) { lchild = lc; rchild = rc; } //leftchild /****************************************************************/ string Node::getName() { return name; } /****************************************************************/ -vector Node::getGroup() { return group; } +string Node::getGroup() { return group; } /****************************************************************/ float Node::getBranchLength() { return branchLength; } /****************************************************************/ diff --git a/treenode.h b/treenode.h index 8bd0559..7995956 100644 --- a/treenode.h +++ b/treenode.h @@ -17,6 +17,7 @@ using namespace std; #include #include #include +#include /* This class represents a node on a tree. */ @@ -27,25 +28,34 @@ class Node { ~Node() {}; void setName(string); - void setGroup(string); //non leaf nodes will belong to multiple groups, leaf nodes will only belong to one. + void setGroup(string); void setBranchLength(float); void setParent(int); void setChildren(int, int); //leftchild, rightchild void setIndex(int); string getName(); - vector getGroup(); //leaf nodes will only have 1 group, but branch nodes may have multiple groups. + string getGroup(); float getBranchLength(); int getParent(); int getLChild(); int getRChild(); int getIndex(); - void printNode(ostream&); //prints out the name and the branch length + + //pGroup is the parsimony group info. i.e. for a leaf node it would contain 1 enter pGroup["groupname"] = 1; + //but for a branch node it may contain several entries so if the nodes children are from different groups it + //would have at least two entries pgroup["groupnameOfLeftChild"] = 1, pgroup["groupnameOfRightChild"] = 1. + //pCount is the nodes descendant group infomation. i.e. pCount["black"] = 20 would mean that 20 of the nodes + //descendant are from group black. + + map pGroups; //leaf nodes will only have 1 group, but branch nodes may have multiple groups. + map pcount; + private: string name; - vector group; + string group; float branchLength; int parent; int lchild; diff --git a/unifracunweightedcommand.cpp b/unifracunweightedcommand.cpp new file mode 100644 index 0000000..8adff2d --- /dev/null +++ b/unifracunweightedcommand.cpp @@ -0,0 +1,232 @@ +/* + * unifracunweightedcommand.cpp + * Mothur + * + * Created by Sarah Westcott on 2/9/09. + * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. + * + */ + +#include "unifracunweightedcommand.h" + +/***********************************************************/ +UnifracUnweightedCommand::UnifracUnweightedCommand() { + try { + globaldata = GlobalData::getInstance(); + + T = globaldata->gTree; + tmap = globaldata->gTreemap; + unweightedFile = globaldata->getTreeFile() + ".unweighted"; + openOutputFile(unweightedFile, out); + sumFile = globaldata->getTreeFile() + ".uwsummary"; + openOutputFile(sumFile, outSum); + distFile = globaldata->getTreeFile() + ".uwdistrib"; + openOutputFile(distFile, outDist); + + convert(globaldata->getIters(), iters); //how many random trees to generate + unweighted = new Unweighted(tmap); + + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the UnifracUnweightedCommand class Function UnifracUnweightedCommand. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the UnifracUnweightedCommand class function UnifracUnweightedCommand. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} +/***********************************************************/ +int UnifracUnweightedCommand::execute() { + try { + + //get unweighted for users tree + userData.resize(1,0); //data[0] = unweightedscore + randomData.resize(1,0); //data[0] = unweightedscore + + //format output + outDist.setf(ios::fixed, ios::floatfield); outDist.setf(ios::showpoint); + outDist << "Tree#" << '\t' << "Iter" << '\t' << "UWScore" << endl; + + //create new tree with same num nodes and leaves as users + randT = new Tree(); + + //get pscores for users trees + for (int i = 0; i < T.size(); i++) { + cout << "Processing tree " << i+1 << endl; + userData = unweighted->getValues(T[i]); //userData[0] = unweightedscore + + //update uscoreFreq + it = uscoreFreq.find(userData[0]); + if (it == uscoreFreq.end()) {//new score + uscoreFreq[userData[0]] = 1; + }else{ uscoreFreq[userData[0]]++; } + + //add users score to valid scores + validScores[userData[0]] = userData[0]; + + //saves users score + utreeScores.push_back(userData[0]); + + //copy T[i]'s info. + randT->getCopy(T[i]); + + //get unweighted scores for random trees + for (int j = 0; j < iters; j++) { + //create a random tree with same topology as T[i], but different labels + randT->assembleRandomUnifracTree(); + //get pscore of random tree + randomData = unweighted->getValues(randT); + + //add trees unweighted score to map of scores + it2 = rscoreFreq.find(randomData[0]); + if (it2 != rscoreFreq.end()) {//already have that score + rscoreFreq[randomData[0]]++; + }else{//first time we have seen this score + rscoreFreq[randomData[0]] = 1; + } + + //add randoms score to validscores + validScores[randomData[0]] = randomData[0]; + + //output info to uwdistrib file + outDist << i+1 << '\t' << '\t'<< j+1 << '\t' << '\t' << randomData[0] << endl; + } + + //find the signifigance of the score + float rcumul = 0.0000; + for (it = rscoreFreq.begin(); it != rscoreFreq.end(); it++) { + //get percentage of random trees with that info + rscoreFreq[it->first] /= iters; + rcumul+= it->second; + rCumul[it->first] = rcumul; + } + + //save the signifigance of the users score for printing later + UWScoreSig.push_back(rCumul[userData[0]]); + + saveRandomScores(); //save all random scores for unweighted file + + //clear random data + rscoreFreq.clear(); //you clear this because in the summary file you want the unweighted signifinance to be relative to these 1000 trees. + rCumul.clear(); + } + + float ucumul = 0.0000; + float rcumul = 0.0000; + //this loop fills the cumulative maps and put 0.0000 in the score freq map to make it easier to print. + for (it = validScores.begin(); it != validScores.end(); it++) { + it2 = uscoreFreq.find(it->first); + //user data has that score + if (it2 != uscoreFreq.end()) { uscoreFreq[it->first] /= T.size(); ucumul+= it2->second; } + else { uscoreFreq[it->first] = 0.0000; } //no user trees with that score + //make uCumul map + uCumul[it->first] = ucumul; + + //make rscoreFreq map and rCumul + it2 = totalrscoreFreq.find(it->first); + //get percentage of random trees with that info + if (it2 != totalrscoreFreq.end()) { totalrscoreFreq[it->first] /= (iters*T.size()); rcumul+= it2->second; } + else { totalrscoreFreq[it->first] = 0.0000; } //no random trees with that score + rCumul[it->first] = rcumul; + } + + printUnweightedFile(); + printUWSummaryFile(); + + //reset randomTree parameter to 0 + globaldata->setRandomTree("0"); + + delete randT; + + return 0; + + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the UnifracUnweightedCommand class Function execute. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the UnifracUnweightedCommand class function execute. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} +/***********************************************************/ +void UnifracUnweightedCommand::printUnweightedFile() { + try { + //column headers + + out << "Score" << '\t' << "UserFreq" << '\t' << "UserCumul" << '\t' << "RandFreq" << '\t' << "RandCumul" << endl; + + //format output + out.setf(ios::fixed, ios::floatfield); out.setf(ios::showpoint); + + //print each line + for (it = validScores.begin(); it != validScores.end(); it++) { + out << setprecision(6) << it->first << '\t' << '\t' << uscoreFreq[it->first] << '\t' << uCumul[it->first] << '\t' << totalrscoreFreq[it->first] << '\t' << rCumul[it->first] << endl; + } + + out.close(); + + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the UnifracUnweightedCommand class Function printUnweightedFile. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the UnifracUnweightedCommand class function printUnweightedFile. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} + +/***********************************************************/ +void UnifracUnweightedCommand::printUWSummaryFile() { + try { + //column headers + outSum << "Tree#" << '\t' << "UWScore" << '\t' << '\t' << "UWSig" << endl; + + //format output + outSum.setf(ios::fixed, ios::floatfield); outSum.setf(ios::showpoint); + + //print each line + for (int i = 0; i< T.size(); i++) { + outSum << setprecision(6) << i+1 << '\t' << '\t' << utreeScores[i] << '\t' << UWScoreSig[i] << endl; + } + + outSum.close(); + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the UnifracUnweightedCommand class Function printUWSummaryFile. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the UnifracUnweightedCommand class function printUWSummaryFile. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} +/***********************************************************/ +void UnifracUnweightedCommand::saveRandomScores() { + try { + //update total map with new random scores + for (it = rscoreFreq.begin(); it != rscoreFreq.end(); it++) { + //does this score already exist in the total map + it2 = totalrscoreFreq.find(it->first); + //if yes then add them + if (it2 != totalrscoreFreq.end()) { + it2->second += it->second; + }else{ //its a new score + totalrscoreFreq[it->first] = 1; + } + } + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the UnifracUnweightedCommand class Function saveRandomScores. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the UnifracUnweightedCommand class function saveRandomScores. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} + +/***********************************************************/ \ No newline at end of file diff --git a/unifracunweightedcommand.h b/unifracunweightedcommand.h new file mode 100644 index 0000000..cc01aab --- /dev/null +++ b/unifracunweightedcommand.h @@ -0,0 +1,64 @@ +#ifndef UNIFRACUNWEIGHTEDCOMMAND_H +#define UNIFRACUNWEIGHTEDCOMMAND_H + +/* + * unifracunweightedcommand.h + * Mothur + * + * Created by Sarah Westcott on 2/9/09. + * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. + * + */ + +#include +#include +#include +#include +#include +#include "command.hpp" +#include "unweighted.h" +#include "treemap.h" + +using namespace std; + +class GlobalData; + +class UnifracUnweightedCommand : public Command { + + public: + UnifracUnweightedCommand(); + ~UnifracUnweightedCommand() { delete unweighted; } + int execute(); + + private: + GlobalData* globaldata; + vector T; //user trees + vector utreeScores; //user tree unweighted scores + vector UWScoreSig; //tree unweighted score signifigance when compared to random trees - percentage of random trees with that score or lower. + Tree* randT; //random tree + TreeMap* tmap; + Unweighted* unweighted; + string sumFile, distFile, unweightedFile; + int iters; + EstOutput userData; //unweighted score info for user tree + EstOutput randomData; //unweighted score info for random trees + map validScores; //contains scores from both user and random + map rscoreFreq; //unweighted score, number of random trees with that score. + map uscoreFreq; //unweighted, number of user trees with that score. + map totalrscoreFreq; //unweighted score, number of random trees with that score. + map rCumul; //unweighted score, cumulative percentage of number of random trees with that score or lower. + map uCumul; //unweighted, cumulative percentage of number of user trees with that score or lower . + map::iterator it; + map::iterator it2; + + ofstream outSum, outDist, out; + + void printUWSummaryFile(); + void printUnweightedFile(); + void saveRandomScores(); + +}; + + + +#endif \ No newline at end of file diff --git a/unifracweightedcommand.cpp b/unifracweightedcommand.cpp new file mode 100644 index 0000000..ff2c245 --- /dev/null +++ b/unifracweightedcommand.cpp @@ -0,0 +1,280 @@ +/* + * unifracweightedcommand.cpp + * Mothur + * + * Created by Sarah Westcott on 2/9/09. + * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. + * + */ + +#include "unifracweightedcommand.h" + +/***********************************************************/ +UnifracWeightedCommand::UnifracWeightedCommand() { + try { + globaldata = GlobalData::getInstance(); + + T = globaldata->gTree; + tmap = globaldata->gTreemap; + weightedFile = globaldata->getTreeFile() + ".weighted"; + openOutputFile(weightedFile, out); + sumFile = globaldata->getTreeFile() + ".wsummary"; + openOutputFile(sumFile, outSum); + distFile = globaldata->getTreeFile() + ".wdistrib"; + openOutputFile(distFile, outDist); + + numGroups = tmap->getNumGroups(); + + //calculate number of comparisons i.e. with groups A,B,C = AB, AC, BC = 3; + numComp = 0; + int n = 1; + for (int i=1; inamesOfGroups[i-1]+tmap->namesOfGroups[l]); + } + n++; + } + + convert(globaldata->getIters(), iters); //how many random trees to generate + weighted = new Weighted(tmap); + + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the UnifracWeightedCommand class Function UnifracWeightedCommand. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the UnifracWeightedCommand class function UnifracWeightedCommand. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} +/***********************************************************/ +int UnifracWeightedCommand::execute() { + try { + + //get weighted for users tree + userData.resize(numComp,0); //data[0] = weightedscore AB, data[1] = weightedscore AC... + randomData.resize(numComp,0); //data[0] = weightedscore AB, data[1] = weightedscore AC... + uscoreFreq.resize(numComp); + validScores.resize(numComp); + totalrscoreFreq.resize(numComp); + uCumul.resize(numComp); + + //format output + outDist.setf(ios::fixed, ios::floatfield); outDist.setf(ios::showpoint); + outDist << "Tree#" << '\t' << "Iter" << '\t' << "Groups"<< '\t' << "WScore" << endl; + + + //create new tree with same num nodes and leaves as users + randT = new Tree(); + + //get pscores for users trees + for (int i = 0; i < T.size(); i++) { + rscoreFreq.resize(numComp); //data[0] = weightedscore AB, data[1] = weightedscore AC... + rCumul.resize(numComp); //data[0] = weightedscore AB, data[1] = weightedscore AC... + + cout << "Processing tree " << i+1 << endl; + userData = weighted->getValues(T[i]); //userData[0] = weightedscore + + //save users score + for (int s=0; sgetCopy(T[i]); + + //get pscores for random trees + for (int j = 0; j < iters; j++) { + //create a random tree with same topology as T[i], but different labels + randT->assembleRandomUnifracTree(); + //get pscore of random tree + randomData = weighted->getValues(randT); + + //save ramdoms score + for (int p=0; pfirst); + //get percentage of random trees with that info + if (it2 != rscoreFreq[t].end()) { rscoreFreq[t][it->first] /= iters; rcumul+= it2->second; } + else { rscoreFreq[t][it->first] = 0.0000; } //no random trees with that score + rCumul[t][it->first] = rcumul; + } + } + + //save the signifigance of the users score for printing later + for (int f = 0; f < numComp; f++) { + WScoreSig.push_back(rCumul[f][userData[f]]); + } + + + //clear random data + rscoreFreq.clear(); + rCumul.clear(); + } + + rCumul.resize(numComp); + for (int b = 0; b < numComp; b++) { + float ucumul = 0.0000; + float rcumul = 0.0000; + //this loop fills the cumulative maps and put 0.0000 in the score freq map to make it easier to print. + for (it = validScores[b].begin(); it != validScores[b].end(); it++) { + it2 = uscoreFreq[b].find(it->first); + //user data has that score + if (it2 != uscoreFreq[b].end()) { uscoreFreq[b][it->first] /= T.size(); ucumul+= it2->second; } + else { uscoreFreq[b][it->first] = 0.0000; } //no user trees with that score + //make uCumul map + uCumul[b][it->first] = ucumul; + + //make rscoreFreq map and rCumul + it2 = totalrscoreFreq[b].find(it->first); + //get percentage of random trees with that info + if (it2 != totalrscoreFreq[b].end()) { totalrscoreFreq[b][it->first] /= (iters * T.size()); rcumul+= it2->second; } + else { totalrscoreFreq[b][it->first] = 0.0000; } //no random trees with that score + rCumul[b][it->first] = rcumul; + } + } + + printWeightedFile(); + printWSummaryFile(); + + //reset randomTree parameter to 0 + globaldata->setRandomTree("0"); + + delete randT; + + return 0; + + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the UnifracWeightedCommand class Function execute. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the UnifracWeightedCommand class function execute. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} +/***********************************************************/ +void UnifracWeightedCommand::printWeightedFile() { + try { + //column headers + + out << "Group" << '\t' << "Score" << '\t' << "UserFreq" << '\t' << "UserCumul" << '\t' << "RandFreq" << '\t' << "RandCumul" << endl; + + //format output + out.setf(ios::fixed, ios::floatfield); out.setf(ios::showpoint); + + //for each group + for (int e = 0; e < numComp; e++) { + //print each line in that group + for (it = validScores[e].begin(); it != validScores[e].end(); it++) { + out << setprecision(6) << groupComb[e] << '\t' << it->first << '\t' << '\t' << uscoreFreq[e][it->first] << '\t' << uCumul[e][it->first] << '\t' << totalrscoreFreq[e][it->first] << '\t' << rCumul[e][it->first] << endl; + } + } + + out.close(); + + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the UnifracWeightedCommand class Function printWeightedFile. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the UnifracWeightedCommand class function printWeightedFile. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} + + +/***********************************************************/ +void UnifracWeightedCommand::printWSummaryFile() { + try { + //column headers + outSum << "Tree#" << '\t' << "Groups" << '\t' << '\t' << "WScore" << '\t' << '\t' << "WSig" << endl; + + //format output + outSum.setf(ios::fixed, ios::floatfield); outSum.setf(ios::showpoint); + + //print each line + int count = 0; + for (int i = 0; i < T.size(); i++) { + for (int j = 0; j < numComp; j++) { + outSum << setprecision(6) << i+1 << '\t' << '\t' << groupComb[j] << '\t' << utreeScores[count] << '\t' << WScoreSig[count] << endl; + count++; + } + } + outSum.close(); + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the UnifracWeightedCommand class Function printWeightedFile. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the UnifracWeightedCommand class function printWeightedFile. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} + +/***********************************************************/ +void UnifracWeightedCommand::saveRandomScores() { + try { + for (int e = 0; e < numComp; e++) { + //update total map with new random scores + for (it = rscoreFreq[e].begin(); it != rscoreFreq[e].end(); it++) { + //does this score already exist in the total map + it2 = totalrscoreFreq[e].find(it->first); + //if yes then add them + if (it2 != totalrscoreFreq[e].end()) { + totalrscoreFreq[e][it->first] += rscoreFreq[e][it->first]; + }else{ //its a new score + totalrscoreFreq[e][it->first] = rscoreFreq[e][it->first]; + } + } + } + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the UnifracWeightedCommand class Function saveRandomScores. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the UnifracWeightedCommand class function saveRandomScores. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } +} + +/***********************************************************/ diff --git a/unifracweightedcommand.h b/unifracweightedcommand.h new file mode 100644 index 0000000..047c92b --- /dev/null +++ b/unifracweightedcommand.h @@ -0,0 +1,64 @@ +#ifndef UNIFRACWEIGHTEDCOMMAND_H +#define UNIFRACWEIGHTEDCOMMAND_H + +/* + * unifracweightedcommand.h + * Mothur + * + * Created by Sarah Westcott on 2/9/09. + * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. + * + */ + +#include +#include +#include +#include +#include +#include "command.hpp" +#include "weighted.h" +#include "treemap.h" + +using namespace std; + +class GlobalData; + +class UnifracWeightedCommand : public Command { + + public: + UnifracWeightedCommand(); + ~UnifracWeightedCommand() { delete weighted; } + int execute(); + + private: + GlobalData* globaldata; + vector T; //user trees + vector utreeScores; //user tree unweighted scores + vector WScoreSig; //tree weighted score signifigance when compared to random trees - percentage of random trees with that score or lower. + vector groupComb; // AB. AC, BC... + Tree* randT; //random tree + TreeMap* tmap; + Weighted* weighted; + string weightedFile, sumFile, distFile; + int iters, numGroups, numComp; + EstOutput userData; //weighted score info for user tree + EstOutput randomData; //weighted score info for random trees + vector< map > validScores; //vector each group comb has an entry + vector< map > rscoreFreq; //vector each group comb has an entry + vector< map > uscoreFreq; //vector each group comb has an entry + vector< map > totalrscoreFreq; //vector each group comb has an entry + vector< map > rCumul; //vector each group comb has an entry + vector< map > uCumul; //vector each group comb has an entry + map::iterator it; + map::iterator it2; + + ofstream outSum, outDist, out; + + void printWSummaryFile(); + void printWeightedFile(); + void saveRandomScores(); +}; + + + +#endif diff --git a/unweighted.cpp b/unweighted.cpp new file mode 100644 index 0000000..a7cf9c9 --- /dev/null +++ b/unweighted.cpp @@ -0,0 +1,88 @@ +/* + * unweighted.cpp + * Mothur + * + * Created by Sarah Westcott on 2/9/09. + * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. + * + */ + +#include "unweighted.h" + +/**************************************************************************************************/ + +EstOutput Unweighted::getValues(Tree* t) { + try { + + //clear out old values + data.resize(1,0); + penalty.resize(t->getNumLeaves(), 0); + + map unique; //group, total of all branch lengths of nodes with that group. + double shared = 0.0000; + double UW=0.0000; + + //add up the branch lengths for each group. + for(int i=0;igetNumLeaves();i++){ + if(t->tree[i].pGroups.size() > 0){ + unique[t->tree[i].pGroups.begin()->first] += t->tree[i].getBranchLength(); + } + } + + //for each non-leaf node + for(int i=t->getNumLeaves();igetNumNodes();i++){ + + int lc = t->tree[i].getLChild(); //lc = vector index of left child + int rc = t->tree[i].getRChild(); //rc = vector index of right child + + //get penalty values + if(t->tree[rc].pGroups.size() == 0 || t->tree[lc].pGroups.size() == 0){ + penalty.push_back(penalty[t->tree[rc].getIndex()]+penalty[t->tree[lc].getIndex()]); + } + else if(t->tree[i].pGroups.size() > t->tree[rc].pGroups.size() || t->tree[i].pGroups.size() > t->tree[lc].pGroups.size()){ + penalty.push_back(penalty[t->tree[rc].getIndex()]+penalty[t->tree[lc].getIndex()]+1); + } + else{ + penalty.push_back(penalty[t->tree[rc].getIndex()]+penalty[t->tree[lc].getIndex()]); + } + + //not sure when this would ever be true??? if your parent is root could be, but pGroups.size() should never be 0. + if(t->tree[i].getParent() == -1 && (t->tree[lc].pGroups.size() == 0 || t->tree[rc].pGroups.size() == 0)){ + shared -= 1; + } + else if(penalty[i] != 0 && t->tree[i].pGroups.size() != 0){ + shared += t->tree[i].getBranchLength(); + } + else if( t->tree[i].pGroups.size() != 0){ + unique[t->tree[i].pGroups.begin()->first] += t->tree[i].getBranchLength(); + } + } + + map::iterator pos; + for(pos=unique.begin();pos!=unique.end();pos++){ + if(pos->first!="xxx"){ + UW += unique[pos->first]; + } + } + + UW /= (UW + shared); + + if (isnan(UW) || isinf(UW)) { UW = 0; } + + data[0] = UW; + + return data; + + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the Unweighted class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the Unweighted class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + +} + +/**************************************************************************************************/ \ No newline at end of file diff --git a/unweighted.h b/unweighted.h new file mode 100644 index 0000000..d39b5e7 --- /dev/null +++ b/unweighted.h @@ -0,0 +1,37 @@ +#ifndef UNWEIGHTED_H +#define UNWEIGHTED_H + + +/* + * unweighted.h + * Mothur + * + * Created by Sarah Westcott on 2/9/09. + * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. + * + */ + +#include "treecalculator.h" +#include "treemap.h" + +/***********************************************************************/ + +class Unweighted : public TreeCalculator { + + public: + Unweighted(TreeMap* t) : tmap(t) {}; + ~Unweighted() {}; + EstOutput getValues(Tree*); + + private: + EstOutput data; + vector penalty; + TreeMap* tmap; + +}; + +/***********************************************************************/ + + + +#endif \ No newline at end of file diff --git a/validcommands.cpp b/validcommands.cpp index 734e0ce..8f06fef 100644 --- a/validcommands.cpp +++ b/validcommands.cpp @@ -16,9 +16,10 @@ ValidCommands::ValidCommands() { commands["read.dist"] = "read.dist"; commands["read.otu"] = "read.otu"; - // commands["read.tree"] = "read.tree"; + commands["read.tree"] = "read.tree"; commands["cluster"] = "cluster"; commands["deconvolute"] = "deconvolute"; + commands["parsimony"] = "parsimony"; commands["help"] = "help"; commands["quit"] = "quit"; commands["collect.single"] = "collect.single"; @@ -27,6 +28,9 @@ ValidCommands::ValidCommands() { commands["rarefaction.shared"] = "rarefaction.shared"; commands["summary.single"] = "summary.single"; commands["summary.shared"] = "summary.shared"; + commands["unifrac.weighted"] = "unifrac.weighted"; + commands["unifrac.unweighted"] = "unifrac.unweighted"; + } catch(exception& e) { diff --git a/validparameter.cpp b/validparameter.cpp index 1f6e1ef..7072825 100644 --- a/validparameter.cpp +++ b/validparameter.cpp @@ -40,7 +40,9 @@ ValidParameters::ValidParameters() { parameters["shared"] = "shared"; parameters["summary"] = "summary"; parameters["sharedsummary"] = "sharedsummary"; - + parameters["randomtree"] = "randomtree"; + parameters["groups"] = "groups"; + } 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"; diff --git a/weighted.cpp b/weighted.cpp new file mode 100644 index 0000000..481b34e --- /dev/null +++ b/weighted.cpp @@ -0,0 +1,121 @@ +/* + * weighted.cpp + * Mothur + * + * Created by Sarah Westcott on 2/9/09. + * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. + * + */ + +#include "weighted.h" + +/**************************************************************************************************/ + +EstOutput Weighted::getValues(Tree* t) { + try { + + int numGroups = tmap->getNumGroups(); + + //calculate number of comparisons i.e. with groups A,B,C = AB, AC, BC = 3; + int n = 1; + for (int i=1; inamesOfGroups[i-1]+tmap->namesOfGroups[l]] = 0.0; + } + } + + data.clear(); //clear out old values + + double D = 0.0000; + + for(int i=0;igetNumLeaves();i++){ + int index = i; + double sum = 0.0000; + + //while you aren't at root + while(t->tree[index].getParent() != -1){ + + if(t->tree[index].pGroups.size() != 0){ + sum += t->tree[index].getBranchLength(); + } + + //old_index = you + int old_index = index; + //index = your parent + index = t->tree[index].getParent(); + + //if you grandparent is the root + if(t->tree[index].getParent() == -1 && t->tree[old_index].pGroups.size() != 0){ + int lc = t->tree[t->tree[index].getLChild()].pGroups.size(); + int rc = t->tree[t->tree[index].getRChild()].pGroups.size(); + + + if(lc == 0 || rc == 0){ + sum -= t->tree[old_index].getBranchLength(); + } + } + } + + if(t->tree[i].getGroup() != ""){ + sum /= (double)tmap->seqsPerGroup[t->tree[i].getGroup()]; + D += sum; + } + } + + + for(int i=0;igetNumNodes();i++){ + //calculate weighted score for each of the group comb i.e. with groups A,B,C = AB, AC, BC. + n = 1; + for (int b=1; btree[i].pcount.find(tmap->namesOfGroups[b-1]); + //if it does u = # of its descendants with a certain group / total number in tree with a certain group + if (it != t->tree[i].pcount.end()) { + u = (double) t->tree[i].pcount[tmap->namesOfGroups[b-1]] / (double) tmap->seqsPerGroup[tmap->namesOfGroups[b-1]]; + }else { u = 0.00; } + + //does this node have descendants from group l + it = t->tree[i].pcount.find(tmap->namesOfGroups[l]); + //if it does subtract their percentage from u + if (it != t->tree[i].pcount.end()) { + u -= (double) t->tree[i].pcount[tmap->namesOfGroups[l]] / (double) tmap->seqsPerGroup[tmap->namesOfGroups[l]]; + } + + u = abs(u) * t->tree[i].getBranchLength(); + + //save groupcombs u value + WScore[tmap->namesOfGroups[b-1]+tmap->namesOfGroups[l]] += u; + + } + n++; + } + } + + //calculate weighted score for each group combination + double UN; + n = 1; + for (int i=1; inamesOfGroups[i-1]+tmap->namesOfGroups[l]] / D); + if (isnan(UN) || isinf(UN)) { UN = 0; } + data.push_back(UN); + } + } + + return data; + } + catch(exception& e) { + cout << "Standard Error: " << e.what() << " has occurred in the Weighted class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + catch(...) { + cout << "An unknown error has occurred in the Weighted class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + exit(1); + } + +} + +/**************************************************************************************************/ \ No newline at end of file diff --git a/weighted.h b/weighted.h new file mode 100644 index 0000000..b0d4433 --- /dev/null +++ b/weighted.h @@ -0,0 +1,36 @@ +#ifndef WEIGHTED_H +#define WEIGHTED_H + + +/* + * weighted.h + * Mothur + * + * Created by Sarah Westcott on 2/9/09. + * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. + * + */ + +#include "treecalculator.h" +#include "treemap.h" + +/***********************************************************************/ + +class Weighted : public TreeCalculator { + + public: + Weighted(TreeMap* t) : tmap(t) {}; + ~Weighted() {}; + EstOutput getValues(Tree*); + + private: + EstOutput data; + TreeMap* tmap; + map::iterator it; + map WScore; //a score for each group combination i.e. AB, AC, BC. +}; + +/***********************************************************************/ + + +#endif \ No newline at end of file -- 2.39.2