X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=globaldata.cpp;h=b18324b8766f9d498295a6e630caaec1b5cc9595;hb=0486bc2eed084ac387d2f59b6d23d13b2382daf7;hp=690a8c3400c802844dc71c49f13f898a0e822e0e;hpb=f37a59b81c339f574d97042ff6e364146feb457a;p=mothur.git diff --git a/globaldata.cpp b/globaldata.cpp index 690a8c3..b18324b 100644 --- a/globaldata.cpp +++ b/globaldata.cpp @@ -26,13 +26,13 @@ string GlobalData::getSabundFile() { return sabundfile; } string GlobalData::getNameFile() { return namefile; } string GlobalData::getGroupFile() { return groupfile; } string GlobalData::getOrderFile() { return orderfile; } +string GlobalData::getOrderGroupFile() { return ordergroup; } string GlobalData::getTreeFile() { return treefile; } -string GlobalData::getSharedFile() { return sharedfile; } -//string GlobalData::getFastaFile() { return fastafile; } +string GlobalData::getSharedFile() { return sharedfile; } +string GlobalData::getRelAbundFile() { return relAbundfile; } string GlobalData::getFormat() { return format; } void GlobalData::setListFile(string file) { listfile = file; inputFileName = file; } -//void GlobalData::setFastaFile(string file) { fastafile = file; inputFileName = file; } void GlobalData::setTreeFile(string file) { treefile = file; inputFileName = file; } void GlobalData::setRabundFile(string file) { rabundfile = file; inputFileName = file; } void GlobalData::setSabundFile(string file) { sabundfile = file; inputFileName = file; } @@ -40,8 +40,10 @@ void GlobalData::setPhylipFile(string file) { phylipfile = file; inputFileNa void GlobalData::setColumnFile(string file) { columnfile = file; inputFileName = file; } void GlobalData::setGroupFile(string file) { groupfile = file; } void GlobalData::setSharedFile(string file) { sharedfile = file; inputFileName = file; } +void GlobalData::setRelAbundFile(string file) { relAbundfile = file; inputFileName = file; } void GlobalData::setNameFile(string file) { namefile = file; } void GlobalData::setOrderFile(string file) { orderfile = file; } +void GlobalData::setOrderGroupFile(string file) { ordergroup = file; } void GlobalData::setFormat(string Format) { format = Format; } @@ -49,6 +51,7 @@ void GlobalData::setFormat(string Format) { format = Format; } /******************************************************/ GlobalData::GlobalData() { + m = MothurOut::getInstance(); //option definitions should go here... clear(); gListVector = NULL; @@ -63,6 +66,8 @@ GlobalData::GlobalData() { gMatrix = NULL; gTreemap = NULL; gSequenceDB = NULL; + nameMap = NULL; + saveNextLabel = ""; } /*******************************************************/ @@ -77,9 +82,13 @@ void GlobalData::clear() { namefile = ""; //do we need this? groupfile = ""; //do we need this? orderfile = ""; + ordergroup = ""; // fastafile = ""; //do we need this? treefile = ""; sharedfile = ""; + relAbundfile = ""; + format = ""; + saveNextLabel = ""; } @@ -115,6 +124,8 @@ void GlobalData::newRead() { if (gTreemap != NULL) { delete gTreemap; gTreemap = NULL; } if (gSequenceDB != NULL) { delete gSequenceDB; gSequenceDB = NULL;} + + if (nameMap != NULL) { delete nameMap; nameMap = NULL; } gTree.clear(); @@ -122,9 +133,10 @@ void GlobalData::newRead() { labels.clear(); Groups.clear(); allLines = 1; runParse = true; + names.clear(); } catch(exception& e) { - errorOut(e, "GlobalData", "newRead"); + m->errorOut(e, "GlobalData", "newRead"); exit(1); } } @@ -147,9 +159,10 @@ GlobalData::~GlobalData() { if (gMatrix != NULL) { delete gMatrix; gMatrix = NULL;} if (gTreemap != NULL) { delete gTreemap; gTreemap = NULL; } if (gSequenceDB != NULL) { delete gSequenceDB; gSequenceDB = NULL;} + if (nameMap != NULL) { delete nameMap; nameMap = NULL; } } catch(exception& e) { - errorOut(e, "GlobalData", "~GlobalData"); + m->errorOut(e, "GlobalData", "~GlobalData"); exit(1); } }