From c568e44459665aca4d8233d45514ab7e0152feeb Mon Sep 17 00:00:00 2001 From: westcott Date: Wed, 15 Sep 2010 11:24:31 +0000 Subject: [PATCH] added normalize.shared command --- Mothur.xcodeproj/project.pbxproj | 6 +++++- commandfactory.cpp | 3 +++ screenseqscommand.cpp | 8 ++++---- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Mothur.xcodeproj/project.pbxproj b/Mothur.xcodeproj/project.pbxproj index 31da91d..875a3c5 100644 --- a/Mothur.xcodeproj/project.pbxproj +++ b/Mothur.xcodeproj/project.pbxproj @@ -61,6 +61,8 @@ A7825503116519F70002E2DD /* chimerabellerophoncommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = chimerabellerophoncommand.cpp; sourceTree = ""; }; A78434881162224F00100BE0 /* chimeraccodecommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chimeraccodecommand.h; sourceTree = ""; }; A78434891162224F00100BE0 /* chimeraccodecommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = chimeraccodecommand.cpp; sourceTree = ""; }; + A798626D1240D91B005FC847 /* normalizesharedcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = normalizesharedcommand.h; sourceTree = ""; }; + A798626E1240D91B005FC847 /* normalizesharedcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = normalizesharedcommand.cpp; sourceTree = ""; }; A7AE6302121C3408001DE6FC /* sharedrabundfloatvector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedrabundfloatvector.h; sourceTree = ""; }; A7AE6303121C3408001DE6FC /* sharedrabundfloatvector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedrabundfloatvector.cpp; sourceTree = ""; }; A7BBDA7B11B5694E006E6551 /* classifyotucommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = classifyotucommand.h; sourceTree = ""; }; @@ -468,7 +470,7 @@ A7DA217B113FECD400BF472F /* whittaker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = whittaker.cpp; sourceTree = ""; }; A7DA217C113FECD400BF472F /* whittaker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = whittaker.h; sourceTree = ""; }; A7DF0AD4121EBB14004A03EA /* clearcut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = clearcut.h; sourceTree = ""; }; - A7DF0AD5121EBB14004A03EA /* cmdargs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cmdargs.cpp; sourceTree = ""; }; + A7DF0AD5121EBB14004A03EA /* cmdargs.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 4; path = cmdargs.cpp; sourceTree = ""; }; A7DF0AD6121EBB14004A03EA /* cmdargs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cmdargs.h; sourceTree = ""; }; A7DF0AD7121EBB14004A03EA /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = common.h; sourceTree = ""; }; A7DF0AD8121EBB14004A03EA /* dayhoff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dayhoff.h; sourceTree = ""; }; @@ -791,6 +793,8 @@ A7DA209D113FECD400BF472F /* mgclustercommand.h */, A7DA20AC113FECD400BF472F /* nocommands.cpp */, A7DA20AD113FECD400BF472F /* nocommands.h */, + A798626D1240D91B005FC847 /* normalizesharedcommand.h */, + A798626E1240D91B005FC847 /* normalizesharedcommand.cpp */, A7DA20B8113FECD400BF472F /* otuhierarchycommand.cpp */, A7DA20B9113FECD400BF472F /* otuhierarchycommand.h */, A7DA20BC113FECD400BF472F /* parselistscommand.cpp */, diff --git a/commandfactory.cpp b/commandfactory.cpp index f86a354..8562a8d 100644 --- a/commandfactory.cpp +++ b/commandfactory.cpp @@ -85,6 +85,7 @@ #include "sensspeccommand.h" #include "sffinfocommand.h" #include "seqerrorcommand.h" +#include "normalizesharedcommand.h" /*******************************************************/ @@ -174,6 +175,7 @@ CommandFactory::CommandFactory(){ commands["degap.seqs"] = "degap.seqs"; commands["get.relabund"] = "get.relabund"; commands["sffinfo"] = "sffinfo"; + commands["normalize.shared"] = "normalize.shared"; commands["classify.seqs"] = "MPIEnabled"; commands["dist.seqs"] = "MPIEnabled"; commands["filter.seqs"] = "MPIEnabled"; @@ -306,6 +308,7 @@ Command* CommandFactory::getCommand(string commandName, string optionString){ else if(commandName == "sens.spec") { command = new SensSpecCommand(optionString); } else if(commandName == "seq.error") { command = new SeqErrorCommand(optionString); } else if(commandName == "sffinfo") { command = new SffInfoCommand(optionString); } + else if(commandName == "normalize.shared") { command = new NormalizeSharedCommand(optionString); } else { command = new NoCommand(optionString); } return command; diff --git a/screenseqscommand.cpp b/screenseqscommand.cpp index 1b3cc93..c3080d9 100644 --- a/screenseqscommand.cpp +++ b/screenseqscommand.cpp @@ -220,10 +220,10 @@ int ScreenSeqsCommand::execute(){ numSeqsPerProcessor = numFastaSeqs / processors; int startIndex = pid * numSeqsPerProcessor; if(pid == (processors - 1)){ numSeqsPerProcessor = numFastaSeqs - pid * numSeqsPerProcessor; } - + cout << pid << '\t' << numSeqsPerProcessor << '\t' << startIndex << endl; //align your part driverMPI(startIndex, numSeqsPerProcessor, inMPI, outMPIGood, outMPIBadAccnos, MPIPos, badSeqNames); - + cout << pid << " done" << endl; if (m->control_pressed) { MPI_File_close(&inMPI); MPI_File_close(&outMPIGood); MPI_File_close(&outMPIBadAccnos); return 0; } for (int i = 1; i < processors; i++) { @@ -253,10 +253,10 @@ int ScreenSeqsCommand::execute(){ numSeqsPerProcessor = numFastaSeqs / processors; int startIndex = pid * numSeqsPerProcessor; if(pid == (processors - 1)){ numSeqsPerProcessor = numFastaSeqs - pid * numSeqsPerProcessor; } - + cout << pid << '\t' << numSeqsPerProcessor << '\t' << startIndex << endl; //align your part driverMPI(startIndex, numSeqsPerProcessor, inMPI, outMPIGood, outMPIBadAccnos, MPIPos, badSeqNames); - +cout << pid << " done" << endl; if (m->control_pressed) { MPI_File_close(&inMPI); MPI_File_close(&outMPIGood); MPI_File_close(&outMPIBadAccnos); return 0; } //send bad list -- 2.39.2