]> git.donarmstrong.com Git - mothur.git/commitdiff
changed int to pid_t type in fork(). roughed in get.mimarkscommand.
authorSarah Westcott <mothur.westcott@gmail.com>
Tue, 25 Mar 2014 13:18:32 +0000 (09:18 -0400)
committerSarah Westcott <mothur.westcott@gmail.com>
Tue, 25 Mar 2014 13:18:32 +0000 (09:18 -0400)
46 files changed:
Mothur.xcodeproj/project.pbxproj
aligncommand.cpp
bellerophon.cpp
chimeraccodecommand.cpp
chimeracheckcommand.cpp
chimeraperseuscommand.cpp
chimerapintailcommand.cpp
chimeraslayercommand.cpp
chimerauchimecommand.cpp
chopseqscommand.cpp
classifyseqscommand.cpp
clustersplitcommand.cpp
countseqscommand.cpp
distancecommand.cpp
filterseqscommand.cpp
getmetacommunitycommand.cpp
getmimarkspackagecommand.cpp [new file with mode: 0644]
getmimarkspackagecommand.h [new file with mode: 0644]
indicatorcommand.cpp
makecontigscommand.cpp
matrixoutputcommand.cpp
metastatscommand.cpp
myseqdist.cpp
pairwiseseqscommand.cpp
parsimony.cpp
phylodiversitycommand.cpp
pintail.cpp
prcseqscommand.cpp
preclustercommand.cpp
primerdesigncommand.cpp
rarefact.cpp
screenseqscommand.cpp
seqerrorcommand.cpp
seqsummarycommand.cpp
sffmultiplecommand.cpp
shhhercommand.cpp
shhhseqscommand.cpp
sparcccommand.cpp
summaryqualcommand.cpp
summarysharedcommand.cpp
treegroupscommand.cpp
trimflowscommand.cpp
trimseqscommand.cpp
unifracweightedcommand.cpp
unweighted.cpp
weighted.cpp

index 80b05db9c02288a1c91fb0085c13426774d06fc7..0448c02cbbc5d21fc8c353c1cdb60bb9c7ad08c8 100644 (file)
@@ -10,6 +10,7 @@
                219C1DE01552C4BD004209F9 /* newcommandtemplate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 219C1DDF1552C4BD004209F9 /* newcommandtemplate.cpp */; };
                219C1DE41559BCCF004209F9 /* getcoremicrobiomecommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 219C1DE31559BCCD004209F9 /* getcoremicrobiomecommand.cpp */; };
                483C952E188F0CAD0035E7B7 /* sharedrjsd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 483C952D188F0CAD0035E7B7 /* sharedrjsd.cpp */; };
+               48A85BAD18E1AF2000199B6F /* getmimarkspackagecommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 48A85BAC18E1AF2000199B6F /* getmimarkspackagecommand.cpp */; };
                48E981CF189C38FB0042BE9D /* mergesfffilecommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 48E981CE189C38FB0042BE9D /* mergesfffilecommand.cpp */; };
                7E6BE10A12F710D8007ADDBE /* refchimeratest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7E6BE10912F710D8007ADDBE /* refchimeratest.cpp */; };
                834D9D581656D7C400E7FAB9 /* regularizedrandomforest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 834D9D561656D7C400E7FAB9 /* regularizedrandomforest.cpp */; };
                219C1DE51559BCF2004209F9 /* getcoremicrobiomecommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = getcoremicrobiomecommand.h; sourceTree = "<group>"; };
                483C952C188F0C960035E7B7 /* sharedrjsd.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = sharedrjsd.h; sourceTree = "<group>"; };
                483C952D188F0CAD0035E7B7 /* sharedrjsd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedrjsd.cpp; sourceTree = "<group>"; };
+               48A85BAB18E1AF0600199B6F /* getmimarkspackagecommand.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = getmimarkspackagecommand.h; sourceTree = "<group>"; };
+               48A85BAC18E1AF2000199B6F /* getmimarkspackagecommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = getmimarkspackagecommand.cpp; sourceTree = "<group>"; };
                48E981CD189C38E60042BE9D /* mergesfffilecommand.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mergesfffilecommand.h; sourceTree = "<group>"; };
                48E981CE189C38FB0042BE9D /* mergesfffilecommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mergesfffilecommand.cpp; sourceTree = "<group>"; };
                7E6BE10812F710D8007ADDBE /* refchimeratest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = refchimeratest.h; sourceTree = "<group>"; };
                                A7E9B6F812D37EC400DA6239 /* getlineagecommand.cpp */,
                                A7E9B6FB12D37EC400DA6239 /* getlistcountcommand.h */,
                                A7E9B6FA12D37EC400DA6239 /* getlistcountcommand.cpp */,
+                               48A85BAB18E1AF0600199B6F /* getmimarkspackagecommand.h */,
+                               48A85BAC18E1AF2000199B6F /* getmimarkspackagecommand.cpp */,
                                A7E9B6FF12D37EC400DA6239 /* getoturepcommand.h */,
                                A7E9B6FE12D37EC400DA6239 /* getoturepcommand.cpp */,
                                A7E9B70112D37EC400DA6239 /* getotuscommand.h */,
                                A7E9B8ED12D37EC400DA6239 /* kmer.cpp in Sources */,
                                A7E9B8EE12D37EC400DA6239 /* kmerdb.cpp in Sources */,
                                A7E9B8EF12D37EC400DA6239 /* knn.cpp in Sources */,
+                               48A85BAD18E1AF2000199B6F /* getmimarkspackagecommand.cpp in Sources */,
                                A7E9B8F012D37EC400DA6239 /* libshuff.cpp in Sources */,
                                A7E9B8F112D37EC400DA6239 /* libshuffcommand.cpp in Sources */,
                                A7E9B8F212D37EC400DA6239 /* listseqscommand.cpp in Sources */,
index 6b0ef5a8b661efd635ad918965a4bd047e2aef52..3222f8c2d72a32bef9898eb71dd9d270056de0c3 100644 (file)
@@ -865,7 +865,7 @@ int AlignCommand::createProcesses(string alignFileName, string reportFileName, s
                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index 013c4dd7e6dd4d704964a6d4c308885733469a1d..59c70a0a6b45697c2dab20849587d27e55a05537 100644 (file)
@@ -363,7 +363,7 @@ int Bellerophon::createProcesses(vector<int> mid) {
                                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index 925be97f050b10d0b33dd911afc547198cbad712..b266025f1720d5c0ef7366d1ee7d155182f3fa21 100644 (file)
@@ -633,7 +633,7 @@ int ChimeraCcodeCommand::createProcesses(string outputFileName, string filename,
                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index 988c7112fc1109118f13ed6d45f160930d833dda..ab079fd073ccd0463b55e909cab4d4d46e7f1bc3 100644 (file)
@@ -622,7 +622,7 @@ int ChimeraCheckCommand::createProcesses(string outputFileName, string filename)
                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index 353b124f8d556760b57a8086573caefe65e575f8..ef3058d8cda30d8781e9a0057c9e93d77feeb1b9 100644 (file)
@@ -1092,7 +1092,7 @@ int ChimeraPerseusCommand::createProcessesGroups(string outputFName, string accn
                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index 805709937724b9c046f8e99e7b5434c2e5dabc49..0b8e5940777090cdc6aef97829c63f96ad4503d8 100644 (file)
@@ -720,7 +720,7 @@ int ChimeraPintailCommand::createProcesses(string outputFileName, string filenam
                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index 9a2b249ce213bb97096b94a41bc36d54f9919d30..d0f3516156656853dfd64f453179c0dfcdefc1c4 100644 (file)
@@ -1577,7 +1577,7 @@ int ChimeraSlayerCommand::createProcessesGroups(string outputFName, string accno
 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
@@ -2006,7 +2006,7 @@ int ChimeraSlayerCommand::createProcesses(string outputFileName, string filename
 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index 61a91f4116b171395981f453f6c39e65bd2d2b52..d7df400d1c70cd8842dd48120f5d9974311ad87d 100644 (file)
@@ -1633,7 +1633,7 @@ int ChimeraUchimeCommand::createProcesses(string outputFileName, string filename
                                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
@@ -1817,7 +1817,7 @@ int ChimeraUchimeCommand::createProcessesGroups(string outputFName, string filen
                                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index 8c82992854d06d9a559ecd2cf32149ffbaef5b3c..8027224a02409f73f31c0c36c72ea13c13115af5 100644 (file)
@@ -372,7 +372,7 @@ bool ChopSeqsCommand::createProcesses(vector<linePair> lines, string filename, s
                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index d494068522e692386dd0ed7a0025c9fb25b416ed..2bbefcbbf968f0cf5c2b1188000bf3a9cfd90400 100644 (file)
@@ -974,7 +974,7 @@ int ClassifySeqsCommand::createProcesses(string taxFileName, string tempTaxFile,
                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index 0dae8934f9331cdf5364769d6736a14e4fa56065..e61e10794caafa3e3cb8f5ffd45d847a7fd2bc8a 100644 (file)
@@ -971,7 +971,7 @@ vector<string>  ClusterSplitCommand::createProcesses(vector< map<string, string>
                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index 88c1409b0dc48f18b07ed418339ffc47ca7166f8..cfe8d27e2909d3174e37ce9a161764902e164f11 100644 (file)
@@ -427,7 +427,7 @@ int CountSeqsCommand::createProcesses(GroupMap*& groupMap, string outputFileName
                
                //loop through and create all the processes you want
                while (process != processors-1) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index 8be3ad4f8e084c688ab7e4937944f97f52ed521c..80ce6e5117799b2dcde34ce537fca421f926fd42 100644 (file)
@@ -534,7 +534,7 @@ void DistanceCommand::createProcesses(string filename) {
                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index 031ac0ecf5f6d5fcc6d8449fd8b35a90a95aba85..6041c95d59952fbaf1c856055181d4e145c3a9c0 100644 (file)
@@ -653,7 +653,7 @@ int FilterSeqsCommand::createProcessesRunFilter(string F, string filename, strin
                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
@@ -1079,7 +1079,7 @@ int FilterSeqsCommand::createProcessesCreateFilter(Filters& F, string filename)
                                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index 288e5ca2e0f84daf6f92eeba2a2b4a93943b596c..5b86c7420e1e5e2cbe564fd766edb63919388ea3 100644 (file)
@@ -408,7 +408,7 @@ int GetMetaCommunityCommand::createProcesses(vector<SharedRAbundVector*>& thislo
                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
diff --git a/getmimarkspackagecommand.cpp b/getmimarkspackagecommand.cpp
new file mode 100644 (file)
index 0000000..43138e1
--- /dev/null
@@ -0,0 +1,194 @@
+//
+//  getmimarkspackagecommand.cpp
+//  Mothur
+//
+//  Created by Sarah Westcott on 3/25/14.
+//  Copyright (c) 2014 Schloss Lab. All rights reserved.
+//
+
+#include "getmimarkspackagecommand.h"
+
+//**********************************************************************************************************************
+vector<string> GetMIMarksPackageCommand::setParameters(){
+       try {
+        //files that have dependancies
+        CommandParameter pgroup("group", "InputTypes", "", "", "groupOligos", "none", "none","",false,false); parameters.push_back(pgroup);
+        CommandParameter poligos("oligos", "InputTypes", "", "", "groupOligos", "none", "none","",false,false); parameters.push_back(poligos);
+               CommandParameter pinputdir("inputdir", "String", "", "", "", "", "","",false,false); parameters.push_back(pinputdir);
+               CommandParameter poutputdir("outputdir", "String", "", "", "", "", "","",false,false); parameters.push_back(poutputdir);
+               
+               vector<string> myArray;
+               for (int i = 0; i < parameters.size(); i++) {   myArray.push_back(parameters[i].name);          }
+               return myArray;
+       }
+       catch(exception& e) {
+               m->errorOut(e, "GetMIMarksPackageCommand", "setParameters");
+               exit(1);
+       }
+}
+//**********************************************************************************************************************
+string GetMIMarksPackageCommand::getHelpString(){
+       try {
+               string helpString = "";
+               helpString += "The get.mimarkspackage command creates a mimarks package form with your groups. The required fields are flagged with * characters.\n";
+        helpString += "Further documentation on the different packages and required formats can be found here, http://www.mothur.org/wiki/MIMarks_Data_Packages.\n";
+               helpString += "The get.mimarkspackage command parameters are: oligos, group and package. oligos or group is required.\n";
+               helpString += "The oligos parameter is used to provide your oligos file so mothur can extract your group names.\n";
+        helpString += "The group parameter is used to provide your group file so mothur can extract your group names.\n";
+        helpString += "The package parameter is used to select the mimarks package you would like to use. Default=???\n";
+               helpString += "The get.mimarkspackage command should be in the following format: get.mimarkspackage(oligos=yourOligosFile, package=yourPackage)\n";
+               helpString += "get.mimarkspackage(oligos=GQY1XT001.oligos, package=???)\n";
+               return helpString;
+       }
+       catch(exception& e) {
+               m->errorOut(e, "GetMIMarksPackageCommand", "getHelpString");
+               exit(1);
+       }
+}
+//**********************************************************************************************************************
+string GetMIMarksPackageCommand::getOutputPattern(string type) {
+    try {
+        string pattern = "";
+        
+        if (type == "tsv") {  pattern = "[filename],tsv"; }
+        else { m->mothurOut("[ERROR]: No definition for type " + type + " output pattern.\n"); m->control_pressed = true;  }
+        
+        return pattern;
+    }
+    catch(exception& e) {
+        m->errorOut(e, "GetMIMarksPackageCommand", "getOutputPattern");
+        exit(1);
+    }
+}
+//**********************************************************************************************************************
+GetMIMarksPackageCommand::GetMIMarksPackageCommand(){
+       try {
+               abort = true; calledHelp = true;
+               setParameters();
+        vector<string> tempOutNames;
+               outputTypes["tsv"] = tempOutNames;
+       }
+       catch(exception& e) {
+               m->errorOut(e, "GetMIMarksPackageCommand", "GetMIMarksPackageCommand");
+               exit(1);
+       }
+}
+//**********************************************************************************************************************
+GetMIMarksPackageCommand::GetMIMarksPackageCommand(string option)  {
+       try {
+        
+               abort = false; calledHelp = false;
+               
+               //allow user to run help
+               if(option == "help") { help(); abort = true; calledHelp = true; }
+               else if(option == "citation") { citation(); abort = true; calledHelp = true;}
+               
+               else {
+                       //valid paramters for this command
+                       vector<string> myArray = setParameters();
+                       
+                       OptionParser parser(option);
+                       map<string,string> parameters = parser.getParameters();
+                       
+                       ValidParameters validParameter;
+                       map<string,string>::iterator it;
+                       //check to make sure all parameters are valid for command
+                       for (it = parameters.begin(); it != parameters.end(); it++) {
+                               if (validParameter.isValidParameter(it->first, myArray, it->second) != true) {  abort = true;  }
+                       }
+                       
+            vector<string> tempOutNames;
+                       outputTypes["tsv"] = tempOutNames;
+            
+                       //if the user changes the input directory command factory will send this info to us in the output parameter
+                       string inputDir = validParameter.validFile(parameters, "inputdir", false);
+                       if (inputDir == "not found"){   inputDir = "";          }
+                       else {
+                
+                               string path;
+                               it = parameters.find("oligos");
+                               //user has given a template file
+                               if(it != parameters.end()){
+                                       path = m->hasPath(it->second);
+                                       //if the user has not given a path then, add inputdir. else leave path alone.
+                                       if (path == "") {       parameters["oligos"] = inputDir + it->second;           }
+                               }
+                               
+                               it = parameters.find("group");
+                               //user has given a template file
+                               if(it != parameters.end()){
+                                       path = m->hasPath(it->second);
+                                       //if the user has not given a path then, add inputdir. else leave path alone.
+                                       if (path == "") {       parameters["group"] = inputDir + it->second;            }
+                               }
+                               
+            }
+            
+                       groupfile = validParameter.validFile(parameters, "group", true);
+                       if (groupfile == "not open") {  groupfile = "";  abort = true; }
+                       else if (groupfile == "not found") { groupfile = ""; }
+            else {  m->setGroupFile(groupfile); }
+            
+            oligosfile = validParameter.validFile(parameters, "oligos", true);
+                       if (oligosfile == "not found")      {   oligosfile = "";        }
+                       else if(oligosfile == "not open")       {       abort = true;           }
+                       else {  m->setOligosFile(oligosfile); }
+
+            if ((groupfile != "") && (oligosfile != "")) {
+                m->mothurOut("[ERROR]: You may not use a group file and an oligos file, only one."); m->mothurOutEndLine(); abort = true;
+            }
+
+            if ((groupfile == "") && (oligosfile == "")) {
+                oligosfile = m->getOligosFile();
+                if (oligosfile != "") {  m->mothurOut("Using " + oligosfile + " as input file for the oligos parameter."); m->mothurOutEndLine(); }
+                else {
+                    groupfile = m->getGroupFile();
+                    if (groupfile != "") {  m->mothurOut("Using " + groupfile + " as input file for the group parameter."); m->mothurOutEndLine(); }
+                    else {
+                        m->mothurOut("[ERROR]: You must provide groupfile or oligos file for the get.mimarkspackage command."); m->mothurOutEndLine(); abort = true;
+                    }
+                }
+            }
+            
+            package = validParameter.validFile(parameters, "package", false);         if (package == "not found") { package = "package"; }
+            //if (!checkCasesPackage(package)) { abort = true; } //error message in function
+            
+            //turn _ to spaces mothur's work around
+            for (int i = 0; i < package.length(); i++) { if (package[i] == '_') { package[i] = ' '; }  }
+
+
+               }
+               
+       }
+       catch(exception& e) {
+               m->errorOut(e, "GetMIMarksPackageCommand", "GetMIMarksPackageCommand");
+               exit(1);
+       }
+}
+//**********************************************************************************************************************
+
+int GetMIMarksPackageCommand::execute(){
+       try {
+               
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
+        
+
+        
+        
+               
+        //output files created by command
+               m->mothurOutEndLine();
+               m->mothurOut("Output File Names: "); m->mothurOutEndLine();
+               for (int i = 0; i < outputNames.size(); i++) {  m->mothurOut(outputNames[i]); m->mothurOutEndLine();    }
+               m->mothurOutEndLine();
+        return 0;
+               
+    }
+       catch(exception& e) {
+               m->errorOut(e, "GetMIMarksPackageCommand", "GetMIMarksPackageCommand");
+               exit(1);
+       }
+}
+//**********************************************************************************************************************
+
+
diff --git a/getmimarkspackagecommand.h b/getmimarkspackagecommand.h
new file mode 100644 (file)
index 0000000..e45dfe7
--- /dev/null
@@ -0,0 +1,46 @@
+//
+//  getmimarkspackagecommand.h
+//  Mothur
+//
+//  Created by Sarah Westcott on 3/25/14.
+//  Copyright (c) 2014 Schloss Lab. All rights reserved.
+//
+
+#ifndef Mothur_getmimarkspackagecommand_h
+#define Mothur_getmimarkspackagecommand_h
+
+#include "command.hpp"
+
+/**************************************************************************************************/
+
+class GetMIMarksPackageCommand : public Command {
+public:
+    GetMIMarksPackageCommand(string);
+    GetMIMarksPackageCommand();
+    ~GetMIMarksPackageCommand(){}
+    
+    vector<string> setParameters();
+    string getCommandName()                    { return "get.mimarkspackage";                  }
+    string getCommandCategory()                { return "Sequence Processing";         }
+    
+    string getOutputPattern(string);
+       string getHelpString();
+    string getCitation() { return "http://www.mothur.org/wiki/get.mimarkspackage"; }
+    string getDescription()            { return "create blank mimarks package form for sra command"; }
+    
+    int execute();
+    void help() { m->mothurOut(getHelpString()); }
+    
+private:
+    bool abort;
+    string oligosfile, groupfile, package;
+    string outputDir;
+    vector<string> outputNames;
+};
+
+/**************************************************************************************************/
+
+
+
+
+#endif
index 36640e72b7995710565325658cfafa1ddfc67f58..74d63688333be27374c36fecc8147bc4419ee8bc 100644 (file)
@@ -1191,7 +1191,7 @@ vector<float> IndicatorCommand::getPValues(vector< vector<SharedRAbundFloatVecto
                                                
                        //loop through and create all the processes you want
                        while (process != processors) {
-                               int pid = fork();
+                               pid_t pid = fork();
                                
                                if (pid > 0) {
                                        processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
@@ -1369,7 +1369,7 @@ vector<float> IndicatorCommand::getPValues(vector< vector<SharedRAbundVector*> >
             
                        //loop through and create all the processes you want
                        while (process != processors) {
-                               int pid = fork();
+                               pid_t pid = fork();
                                
                                if (pid > 0) {
                                        processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index 72e8ea09aeeac366fc08175dd7019e404020835d..15f002bffdbdc96e65ba18522955d500aa0fa8b0 100644 (file)
@@ -690,7 +690,7 @@ int MakeContigsCommand::createProcesses(vector< vector<string> > files, string o
                
                //loop through and create all the processes you want
                while (process != processors-1) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index 67e54d034ecf6d1658e69acf0841c0f72115fee4..5665426e537deca591a971a560f58283020eb9d3 100644 (file)
@@ -531,7 +531,7 @@ int MatrixOutputCommand::process(vector<SharedRAbundVector*> thisLookup){
                 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
                 //loop through and create all the processes you want
                 while (process != processors) {
-                    int pid = fork();
+                    pid_t pid = fork();
                     
                     if (pid > 0) {
                         processIDS.push_back(pid); 
index de03dab2a147174384d3e3ffce329c1e16fa07f5..4ad7f600232a37f0ccc15f8a69e719b6a9ff34c1 100644 (file)
@@ -367,7 +367,7 @@ int MetaStatsCommand::process(vector<SharedRAbundVector*>& thisLookUp){
                #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
                                        //loop through and create all the processes you want
                                        while (process != processors) {
-                                               int pid = fork();
+                                               pid_t pid = fork();
                        
                                                if (pid > 0) {
                                                        processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index b43af1cfeb7b86dae7e17646f983f1cae1c51287..a23e6096eff1cd9ccd747c860ba635a801781500 100644 (file)
@@ -152,7 +152,7 @@ int correctDist::createProcess(string distanceFileName){
                
                while(process != processors){
                        
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if(pid > 0){
                                processIDs.push_back(pid);
index 357724d64ec154de5de813d5f129a373272e2cb0..3a43123a6a8b3612e0e8abf8a275f54a10473f94 100644 (file)
@@ -522,7 +522,7 @@ void PairwiseSeqsCommand::createProcesses(string filename) {
                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid); 
index 9dc8cf720a3001285d26657ea97915f53b8b2321..9ab193fa9bd6ffdbeaa77c71f1c454a0899ba093 100644 (file)
@@ -89,7 +89,7 @@ EstOutput Parsimony::createProcesses(Tree* t, vector< vector<string> > namesOfGr
                                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index b84ee2544638f17df4bf4a225ecd2bfb6c22842a..9b52fc9d67452d193986d844c0d10b81dac9572d 100644 (file)
@@ -412,7 +412,7 @@ int PhyloDiversityCommand::createProcesses(vector<int>& procIters, Tree* t, map<
                                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index 9f46cf97a5611a7f5667ac9f6c46551629e7ca02..e131371123f179056b816d1e66ebc2b48c2d2611 100644 (file)
@@ -535,7 +535,7 @@ void Pintail::createProcessesQuan() {
                                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  
index c4416b34bf6c8adc444c2292fc03fd140d0b5d0a..ee15bed0a2362a9f9921cd45789ebb83384c0ea5 100644 (file)
@@ -436,7 +436,7 @@ int PcrSeqsCommand::createProcesses(string filename, string goodFileName, string
         
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index 9acfa650a3822a6a771d42d2740a56c8ce773930..def53255b1c124c2d40ae76120723f78f47a7bec 100644 (file)
@@ -383,7 +383,7 @@ int PreClusterCommand::createProcessesGroups(string newFName, string newNName, s
                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index 584aa9d8462927cda625ec17901c80014ac60948..768aa69e529defa11e05922c4219c521833c3f9a 100644 (file)
@@ -560,7 +560,7 @@ set<int> PrimerDesignCommand::createProcesses(string newSummaryFile, vector<doub
                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
@@ -819,7 +819,7 @@ vector<Sequence> PrimerDesignCommand::createProcessesConSeqs(map<string, int>& n
 
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index 039cde9b9affb15da629fb2fc6a8f3162e470c20..83a6306db7568ac228fb110f1ad1c405cec9c7ec 100644 (file)
@@ -123,7 +123,7 @@ int Rarefact::createProcesses(vector<int>& procIters, RarefactionCurveData* rcd,
                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index 4671b7926df8866ea2d3beee6e6706b448047b6d..ff5f4650c73d3b71c6e76f7398603e711f788859 100644 (file)
@@ -1433,7 +1433,7 @@ int ScreenSeqsCommand::createProcessesContigsSummary(vector<int>& oLength, vecto
         
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
@@ -1703,7 +1703,7 @@ int ScreenSeqsCommand::createProcessesAlignSummary(vector<float>& sims, vector<f
         
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
@@ -1986,7 +1986,7 @@ int ScreenSeqsCommand::createProcessesCreateSummary(vector<int>& startPosition,
                                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
@@ -2526,7 +2526,7 @@ int ScreenSeqsCommand::createProcesses(string goodFileName, string badAccnos, st
                                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index d196db85e3da3fabf72307f47ac58996833b6457..f7edb21f8f6586686de459800472bf9a27582467 100644 (file)
@@ -462,7 +462,7 @@ int SeqErrorCommand::createProcesses(string filename, string qFileName, string r
                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index 3f7565923cb57d11673d581215c74509d1ac40b8..88478a10ec86f97802a1b5b152fcf434c7e6dc14 100644 (file)
@@ -584,7 +584,7 @@ int SeqSummaryCommand::createProcessesCreateSummary(vector<int>& startPosition,
                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index c1dd258c43b5c37fdc434dedc9155c1a07241e23..365bb93dc503b65025da52ec2fc11bf21dad5b92 100644 (file)
@@ -747,7 +747,7 @@ int SffMultipleCommand::createProcesses(vector<string> sffFiles, vector<string>
                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index 21dd089c40824d0df1d1e6cdd4ec27eed977cd36..282b1284c94f6208a659a5b8ea1c30b5c5cad7cc 100644 (file)
@@ -2070,7 +2070,7 @@ int ShhherCommand::createProcesses(vector<string> filenames){
                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index f9983224f36eea8451f88d07c4f4beaf3090c4bc..f6fd90da276951724132140828d27c9de3a0d47a 100644 (file)
@@ -392,7 +392,7 @@ vector<string> ShhhSeqsCommand::createProcessesGroups(SequenceParser& parser, st
                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index f4d08df2698cd0f01c8abae416c1b8f934761094..f319c014793560eb2809435a8da9ebf68df97543 100644 (file)
@@ -427,7 +427,7 @@ vector<vector<float> > SparccCommand::createProcesses(vector<vector<float> >& sh
             
                        //loop through and create all the processes you want
                        while (process != processors) {
-                               int pid = fork();
+                               pid_t pid = fork();
                                
                                if (pid > 0) {
                                        processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index 3dc6582f93f6654c41b14c0da5739348d023b11b..6396f8ff6f5944fc167d49895a44c5248b5f0523 100644 (file)
@@ -337,7 +337,7 @@ int SummaryQualCommand::createProcessesCreateSummary(vector<int>& position, vect
                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index fd8f7750b641a359efdda2783f9e79450b9eab6d..66a0113899cf32595b1af20c024f8b8210c23aa1 100644 (file)
@@ -626,7 +626,7 @@ int SummarySharedCommand::process(vector<SharedRAbundVector*> thisLookup, string
 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
                 //loop through and create all the processes you want
                 while (process != processors) {
-                    int pid = fork();
+                    pid_t pid = fork();
                     
                     if (pid > 0) {
                         processIDS.push_back(pid); 
index 2ea653bc7c7b9186ae33e235543d3ad62d8fe70e..4b4f21c86366000b8efb195bf94232059a78d03c 100644 (file)
@@ -800,7 +800,7 @@ int TreeGroupCommand::process(vector<SharedRAbundVector*> thisLookup) {
 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
                 //loop through and create all the processes you want
                 while (process != processors) {
-                    int pid = fork();
+                    pid_t pid = fork();
                     
                     if (pid > 0) {
                         processIDS.push_back(pid); 
index 37beccd53455ec4f07cabb24ac88b1a3e2f28253..5800cde2146f108ae6efc3d1bce50b9bb9913750 100644 (file)
@@ -825,7 +825,7 @@ int TrimFlowsCommand::createProcessesCreateTrim(string flowFileName, string trim
                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index 7f2a85287099cfafd8731b3055b232dfbad4a00f..de607c62f40b7e95083e3058aae53636b260503a 100644 (file)
@@ -1030,7 +1030,7 @@ int TrimSeqsCommand::createProcessesCreateTrim(string filename, string qFileName
 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
                                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index fb365776a6adccb86b0c7f968de55333431e4c81..e7009322c66ba8df3a7838fca8073bbfcd0034dd 100644 (file)
@@ -768,7 +768,7 @@ int UnifracWeightedCommand::createProcesses(Tree* t, vector< vector<string> > na
 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index 30c54b69d2021acb5ed7b24f34971b52ce0cea77..3f4d205a82413c393a8a811ad9f772f1138e3b46 100644 (file)
@@ -85,7 +85,7 @@ EstOutput Unweighted::createProcesses(Tree* t, vector< vector<string> > namesOfG
                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
@@ -347,7 +347,7 @@ EstOutput Unweighted::createProcesses(Tree* t, vector< vector<string> > namesOfG
 
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
index 91a21445e023e120b5409e7456062d8b863cca21..35c2c6c868982048f3daed2a4acd5d47d7727a8a 100644 (file)
@@ -68,7 +68,7 @@ EstOutput Weighted::createProcesses(Tree* t, vector< vector<string> > namesOfGro
                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later