From: Sarah Westcott Date: Tue, 25 Mar 2014 13:18:32 +0000 (-0400) Subject: changed int to pid_t type in fork(). roughed in get.mimarkscommand. X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=commitdiff_plain;h=cac38e9e251998fa0b825d00189534534948d226 changed int to pid_t type in fork(). roughed in get.mimarkscommand. --- diff --git a/Mothur.xcodeproj/project.pbxproj b/Mothur.xcodeproj/project.pbxproj index 80b05db..0448c02 100644 --- a/Mothur.xcodeproj/project.pbxproj +++ b/Mothur.xcodeproj/project.pbxproj @@ -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 */; }; @@ -410,6 +411,8 @@ 219C1DE51559BCF2004209F9 /* getcoremicrobiomecommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = getcoremicrobiomecommand.h; sourceTree = ""; }; 483C952C188F0C960035E7B7 /* sharedrjsd.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = sharedrjsd.h; sourceTree = ""; }; 483C952D188F0CAD0035E7B7 /* sharedrjsd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedrjsd.cpp; sourceTree = ""; }; + 48A85BAB18E1AF0600199B6F /* getmimarkspackagecommand.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = getmimarkspackagecommand.h; sourceTree = ""; }; + 48A85BAC18E1AF2000199B6F /* getmimarkspackagecommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = getmimarkspackagecommand.cpp; sourceTree = ""; }; 48E981CD189C38E60042BE9D /* mergesfffilecommand.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mergesfffilecommand.h; sourceTree = ""; }; 48E981CE189C38FB0042BE9D /* mergesfffilecommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mergesfffilecommand.cpp; sourceTree = ""; }; 7E6BE10812F710D8007ADDBE /* refchimeratest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = refchimeratest.h; sourceTree = ""; }; @@ -1455,6 +1458,8 @@ A7E9B6F812D37EC400DA6239 /* getlineagecommand.cpp */, A7E9B6FB12D37EC400DA6239 /* getlistcountcommand.h */, A7E9B6FA12D37EC400DA6239 /* getlistcountcommand.cpp */, + 48A85BAB18E1AF0600199B6F /* getmimarkspackagecommand.h */, + 48A85BAC18E1AF2000199B6F /* getmimarkspackagecommand.cpp */, A7E9B6FF12D37EC400DA6239 /* getoturepcommand.h */, A7E9B6FE12D37EC400DA6239 /* getoturepcommand.cpp */, A7E9B70112D37EC400DA6239 /* getotuscommand.h */, @@ -2191,6 +2196,7 @@ 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 */, diff --git a/aligncommand.cpp b/aligncommand.cpp index 6b0ef5a..3222f8c 100644 --- a/aligncommand.cpp +++ b/aligncommand.cpp @@ -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 diff --git a/bellerophon.cpp b/bellerophon.cpp index 013c4dd..59c70a0 100644 --- a/bellerophon.cpp +++ b/bellerophon.cpp @@ -363,7 +363,7 @@ int Bellerophon::createProcesses(vector 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 diff --git a/chimeraccodecommand.cpp b/chimeraccodecommand.cpp index 925be97..b266025 100644 --- a/chimeraccodecommand.cpp +++ b/chimeraccodecommand.cpp @@ -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 diff --git a/chimeracheckcommand.cpp b/chimeracheckcommand.cpp index 988c711..ab079fd 100644 --- a/chimeracheckcommand.cpp +++ b/chimeracheckcommand.cpp @@ -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 diff --git a/chimeraperseuscommand.cpp b/chimeraperseuscommand.cpp index 353b124..ef3058d 100644 --- a/chimeraperseuscommand.cpp +++ b/chimeraperseuscommand.cpp @@ -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 diff --git a/chimerapintailcommand.cpp b/chimerapintailcommand.cpp index 8057099..0b8e594 100644 --- a/chimerapintailcommand.cpp +++ b/chimerapintailcommand.cpp @@ -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 diff --git a/chimeraslayercommand.cpp b/chimeraslayercommand.cpp index 9a2b249..d0f3516 100644 --- a/chimeraslayercommand.cpp +++ b/chimeraslayercommand.cpp @@ -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 diff --git a/chimerauchimecommand.cpp b/chimerauchimecommand.cpp index 61a91f4..d7df400 100644 --- a/chimerauchimecommand.cpp +++ b/chimerauchimecommand.cpp @@ -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 diff --git a/chopseqscommand.cpp b/chopseqscommand.cpp index 8c82992..8027224 100644 --- a/chopseqscommand.cpp +++ b/chopseqscommand.cpp @@ -372,7 +372,7 @@ bool ChopSeqsCommand::createProcesses(vector 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 diff --git a/classifyseqscommand.cpp b/classifyseqscommand.cpp index d494068..2bbefcb 100644 --- a/classifyseqscommand.cpp +++ b/classifyseqscommand.cpp @@ -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 diff --git a/clustersplitcommand.cpp b/clustersplitcommand.cpp index 0dae893..e61e107 100644 --- a/clustersplitcommand.cpp +++ b/clustersplitcommand.cpp @@ -971,7 +971,7 @@ vector ClusterSplitCommand::createProcesses(vector< 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 diff --git a/countseqscommand.cpp b/countseqscommand.cpp index 88c1409..cfe8d27 100644 --- a/countseqscommand.cpp +++ b/countseqscommand.cpp @@ -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 diff --git a/distancecommand.cpp b/distancecommand.cpp index 8be3ad4..80ce6e5 100644 --- a/distancecommand.cpp +++ b/distancecommand.cpp @@ -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 diff --git a/filterseqscommand.cpp b/filterseqscommand.cpp index 031ac0e..6041c95 100644 --- a/filterseqscommand.cpp +++ b/filterseqscommand.cpp @@ -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 diff --git a/getmetacommunitycommand.cpp b/getmetacommunitycommand.cpp index 288e5ca..5b86c74 100644 --- a/getmetacommunitycommand.cpp +++ b/getmetacommunitycommand.cpp @@ -408,7 +408,7 @@ int GetMetaCommunityCommand::createProcesses(vector& 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 index 0000000..43138e1 --- /dev/null +++ b/getmimarkspackagecommand.cpp @@ -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 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 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 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 myArray = setParameters(); + + OptionParser parser(option); + map parameters = parser.getParameters(); + + ValidParameters validParameter; + map::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 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 index 0000000..e45dfe7 --- /dev/null +++ b/getmimarkspackagecommand.h @@ -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 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 outputNames; +}; + +/**************************************************************************************************/ + + + + +#endif diff --git a/indicatorcommand.cpp b/indicatorcommand.cpp index 36640e7..74d6368 100644 --- a/indicatorcommand.cpp +++ b/indicatorcommand.cpp @@ -1191,7 +1191,7 @@ vector IndicatorCommand::getPValues(vector< vector 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 IndicatorCommand::getPValues(vector< vector > //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/makecontigscommand.cpp b/makecontigscommand.cpp index 72e8ea0..15f002b 100644 --- a/makecontigscommand.cpp +++ b/makecontigscommand.cpp @@ -690,7 +690,7 @@ int MakeContigsCommand::createProcesses(vector< vector > 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 diff --git a/matrixoutputcommand.cpp b/matrixoutputcommand.cpp index 67e54d0..5665426 100644 --- a/matrixoutputcommand.cpp +++ b/matrixoutputcommand.cpp @@ -531,7 +531,7 @@ int MatrixOutputCommand::process(vector 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); diff --git a/metastatscommand.cpp b/metastatscommand.cpp index de03dab..4ad7f60 100644 --- a/metastatscommand.cpp +++ b/metastatscommand.cpp @@ -367,7 +367,7 @@ int MetaStatsCommand::process(vector& 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 diff --git a/myseqdist.cpp b/myseqdist.cpp index b43af1c..a23e609 100644 --- a/myseqdist.cpp +++ b/myseqdist.cpp @@ -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); diff --git a/pairwiseseqscommand.cpp b/pairwiseseqscommand.cpp index 357724d..3a43123 100644 --- a/pairwiseseqscommand.cpp +++ b/pairwiseseqscommand.cpp @@ -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); diff --git a/parsimony.cpp b/parsimony.cpp index 9dc8cf7..9ab193f 100644 --- a/parsimony.cpp +++ b/parsimony.cpp @@ -89,7 +89,7 @@ EstOutput Parsimony::createProcesses(Tree* t, vector< vector > 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 diff --git a/phylodiversitycommand.cpp b/phylodiversitycommand.cpp index b84ee25..9b52fc9 100644 --- a/phylodiversitycommand.cpp +++ b/phylodiversitycommand.cpp @@ -412,7 +412,7 @@ int PhyloDiversityCommand::createProcesses(vector& 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 diff --git a/pintail.cpp b/pintail.cpp index 9f46cf9..e131371 100644 --- a/pintail.cpp +++ b/pintail.cpp @@ -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); diff --git a/prcseqscommand.cpp b/prcseqscommand.cpp index c4416b3..ee15bed 100644 --- a/prcseqscommand.cpp +++ b/prcseqscommand.cpp @@ -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 diff --git a/preclustercommand.cpp b/preclustercommand.cpp index 9acfa65..def5325 100644 --- a/preclustercommand.cpp +++ b/preclustercommand.cpp @@ -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 diff --git a/primerdesigncommand.cpp b/primerdesigncommand.cpp index 584aa9d..768aa69 100644 --- a/primerdesigncommand.cpp +++ b/primerdesigncommand.cpp @@ -560,7 +560,7 @@ set PrimerDesignCommand::createProcesses(string newSummaryFile, vector 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 PrimerDesignCommand::createProcessesConSeqs(map& 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 diff --git a/rarefact.cpp b/rarefact.cpp index 039cde9..83a6306 100644 --- a/rarefact.cpp +++ b/rarefact.cpp @@ -123,7 +123,7 @@ int Rarefact::createProcesses(vector& 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 diff --git a/screenseqscommand.cpp b/screenseqscommand.cpp index 4671b79..ff5f465 100644 --- a/screenseqscommand.cpp +++ b/screenseqscommand.cpp @@ -1433,7 +1433,7 @@ int ScreenSeqsCommand::createProcessesContigsSummary(vector& 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& sims, vector 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& 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 diff --git a/seqerrorcommand.cpp b/seqerrorcommand.cpp index d196db8..f7edb21 100644 --- a/seqerrorcommand.cpp +++ b/seqerrorcommand.cpp @@ -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 diff --git a/seqsummarycommand.cpp b/seqsummarycommand.cpp index 3f75659..88478a1 100644 --- a/seqsummarycommand.cpp +++ b/seqsummarycommand.cpp @@ -584,7 +584,7 @@ int SeqSummaryCommand::createProcessesCreateSummary(vector& 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 diff --git a/sffmultiplecommand.cpp b/sffmultiplecommand.cpp index c1dd258..365bb93 100644 --- a/sffmultiplecommand.cpp +++ b/sffmultiplecommand.cpp @@ -747,7 +747,7 @@ int SffMultipleCommand::createProcesses(vector sffFiles, vector //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/shhhercommand.cpp b/shhhercommand.cpp index 21dd089..282b128 100644 --- a/shhhercommand.cpp +++ b/shhhercommand.cpp @@ -2070,7 +2070,7 @@ int ShhherCommand::createProcesses(vector 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 diff --git a/shhhseqscommand.cpp b/shhhseqscommand.cpp index f998322..f6fd90d 100644 --- a/shhhseqscommand.cpp +++ b/shhhseqscommand.cpp @@ -392,7 +392,7 @@ vector 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 diff --git a/sparcccommand.cpp b/sparcccommand.cpp index f4d08df..f319c01 100644 --- a/sparcccommand.cpp +++ b/sparcccommand.cpp @@ -427,7 +427,7 @@ vector > SparccCommand::createProcesses(vector >& 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 diff --git a/summaryqualcommand.cpp b/summaryqualcommand.cpp index 3dc6582..6396f8f 100644 --- a/summaryqualcommand.cpp +++ b/summaryqualcommand.cpp @@ -337,7 +337,7 @@ int SummaryQualCommand::createProcessesCreateSummary(vector& 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 diff --git a/summarysharedcommand.cpp b/summarysharedcommand.cpp index fd8f775..66a0113 100644 --- a/summarysharedcommand.cpp +++ b/summarysharedcommand.cpp @@ -626,7 +626,7 @@ int SummarySharedCommand::process(vector 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); diff --git a/treegroupscommand.cpp b/treegroupscommand.cpp index 2ea653b..4b4f21c 100644 --- a/treegroupscommand.cpp +++ b/treegroupscommand.cpp @@ -800,7 +800,7 @@ int TreeGroupCommand::process(vector 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); diff --git a/trimflowscommand.cpp b/trimflowscommand.cpp index 37beccd..5800cde 100644 --- a/trimflowscommand.cpp +++ b/trimflowscommand.cpp @@ -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 diff --git a/trimseqscommand.cpp b/trimseqscommand.cpp index 7f2a852..de607c6 100644 --- a/trimseqscommand.cpp +++ b/trimseqscommand.cpp @@ -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 diff --git a/unifracweightedcommand.cpp b/unifracweightedcommand.cpp index fb36577..e700932 100644 --- a/unifracweightedcommand.cpp +++ b/unifracweightedcommand.cpp @@ -768,7 +768,7 @@ int UnifracWeightedCommand::createProcesses(Tree* t, vector< vector > 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 diff --git a/unweighted.cpp b/unweighted.cpp index 30c54b6..3f4d205 100644 --- a/unweighted.cpp +++ b/unweighted.cpp @@ -85,7 +85,7 @@ EstOutput Unweighted::createProcesses(Tree* t, vector< vector > 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 > 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 diff --git a/weighted.cpp b/weighted.cpp index 91a2144..35c2c6c 100644 --- a/weighted.cpp +++ b/weighted.cpp @@ -68,7 +68,7 @@ EstOutput Weighted::createProcesses(Tree* t, vector< vector > 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