A71FE12C12EDF72400963CA7 /* mergegroupscommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A71FE12B12EDF72400963CA7 /* mergegroupscommand.cpp */; };
A727864412E9E28C00F86ABA /* removerarecommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A727864312E9E28C00F86ABA /* removerarecommand.cpp */; };
A75790591301749D00A30DAB /* homovacommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A75790581301749D00A30DAB /* homovacommand.cpp */; };
+ A778FE6B134CA6CA00C0BA33 /* getcommandinfocommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A778FE6A134CA6CA00C0BA33 /* getcommandinfocommand.cpp */; };
A799F5B91309A3E000AEEFA0 /* makefastqcommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A799F5B81309A3E000AEEFA0 /* makefastqcommand.cpp */; };
A7A61F2D130062E000E05B6B /* amovacommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7A61F2C130062E000E05B6B /* amovacommand.cpp */; };
A7E9B88112D37EC400DA6239 /* ace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7E9B64F12D37EC300DA6239 /* ace.cpp */; };
A727864312E9E28C00F86ABA /* removerarecommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = removerarecommand.cpp; sourceTree = "<group>"; };
A75790571301749D00A30DAB /* homovacommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = homovacommand.h; sourceTree = "<group>"; };
A75790581301749D00A30DAB /* homovacommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = homovacommand.cpp; sourceTree = "<group>"; };
+ A778FE69134CA6CA00C0BA33 /* getcommandinfocommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = getcommandinfocommand.h; sourceTree = "<group>"; };
+ A778FE6A134CA6CA00C0BA33 /* getcommandinfocommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = getcommandinfocommand.cpp; sourceTree = "<group>"; };
A799F5B71309A3E000AEEFA0 /* makefastqcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = makefastqcommand.h; sourceTree = "<group>"; };
A799F5B81309A3E000AEEFA0 /* makefastqcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = makefastqcommand.cpp; sourceTree = "<group>"; };
A7A61F1A130035C800E05B6B /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
A7E9B6CB12D37EC400DA6239 /* distancecommand.cpp */,
A7E9B6E412D37EC400DA6239 /* filterseqscommand.h */,
A7E9B6E312D37EC400DA6239 /* filterseqscommand.cpp */,
+ A778FE69134CA6CA00C0BA33 /* getcommandinfocommand.h */,
+ A778FE6A134CA6CA00C0BA33 /* getcommandinfocommand.cpp */,
A7FE7C3E1330EA1000F7B327 /* getcurrentcommand.h */,
A7FE7C3F1330EA1000F7B327 /* getcurrentcommand.cpp */,
A7E9B6F312D37EC400DA6239 /* getgroupcommand.h */,
A71CB160130B04A2001E7287 /* anosimcommand.cpp in Sources */,
A7FE7C401330EA1000F7B327 /* getcurrentcommand.cpp in Sources */,
A7FE7E6D13311EA400F7B327 /* setcurrentcommand.cpp in Sources */,
+ A778FE6B134CA6CA00C0BA33 /* getcommandinfocommand.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
string AlignCommand::getHelpString(){
try {
string helpString = "";
- helpString += "The align.seqs command reads a file containing sequences and creates an alignment file and a report file.\n";
- helpString += "The align.seqs command parameters are reference, fasta, search, ksize, align, match, mismatch, gapopen, gapextend and processors.\n";
- helpString += "The reference and fasta parameters are required. You may leave fasta blank if you have a valid fasta file. You may enter multiple fasta files by separating their names with dashes. ie. fasta=abrecovery.fasta-amzon.fasta \n";
- helpString += "The search parameter allows you to specify the method to find most similar template. Your options are: suffix, kmer and blast. The default is kmer.\n";
- helpString += "The align parameter allows you to specify the alignment method to use. Your options are: gotoh, needleman, blast and noalign. The default is needleman.\n";
- helpString += "The ksize parameter allows you to specify the kmer size for finding most similar template to candidate. The default is 8.\n";
- helpString += "The match parameter allows you to specify the bonus for having the same base. The default is 1.0.\n";
- helpString += "The mistmatch parameter allows you to specify the penalty for having different bases. The default is -1.0.\n";
- helpString += "The gapopen parameter allows you to specify the penalty for opening a gap in an alignment. The default is -2.0.\n";
- helpString += "The gapextend parameter allows you to specify the penalty for extending a gap in an alignment. The default is -1.0.\n";
- helpString += "The flip parameter is used to specify whether or not you want mothur to try the reverse complement if a sequence falls below the threshold. The default is false.\n";
- helpString += "The threshold is used to specify a cutoff at which an alignment is deemed 'bad' and the reverse complement may be tried. The default threshold is 0.50, meaning 50% of the bases are removed in the alignment.\n";
- helpString += "If the flip parameter is set to true the reverse complement of the sequence is aligned and the better alignment is reported.\n";
- helpString += "The default for the threshold parameter is 0.50, meaning at least 50% of the bases must remain or the sequence is reported as potentially reversed.\n";
- helpString += "The align.seqs command should be in the following format: \n";
- helpString += "align.seqs(reference=yourTemplateFile, fasta=yourCandidateFile, align=yourAlignmentMethod, search=yourSearchmethod, ksize=yourKmerSize, match=yourMatchBonus, mismatch=yourMismatchpenalty, gapopen=yourGapopenPenalty, gapextend=yourGapExtendPenalty) \n";
- helpString += "Example align.seqs(candidate=candidate.fasta, template=core.filtered, align=kmer, search=gotoh, ksize=8, match=2.0, mismatch=3.0, gapopen=-2.0, gapextend=-1.0)\n";
- helpString += "Note: No spaces between parameter labels (i.e. candidate), '=' and parameters (i.e.yourFastaFile).\n\n";
+ helpString += "The align.seqs command reads a file containing sequences and creates an alignment file and a report file.";
+ helpString += "The align.seqs command parameters are reference, fasta, search, ksize, align, match, mismatch, gapopen, gapextend and processors.";
+ helpString += "The reference and fasta parameters are required. You may leave fasta blank if you have a valid fasta file. You may enter multiple fasta files by separating their names with dashes. ie. fasta=abrecovery.fasta-amzon.fasta.";
+ helpString += "The search parameter allows you to specify the method to find most similar template. Your options are: suffix, kmer and blast. The default is kmer.";
+ helpString += "The align parameter allows you to specify the alignment method to use. Your options are: gotoh, needleman, blast and noalign. The default is needleman.";
+ helpString += "The ksize parameter allows you to specify the kmer size for finding most similar template to candidate. The default is 8.";
+ helpString += "The match parameter allows you to specify the bonus for having the same base. The default is 1.0.";
+ helpString += "The mistmatch parameter allows you to specify the penalty for having different bases. The default is -1.0.";
+ helpString += "The gapopen parameter allows you to specify the penalty for opening a gap in an alignment. The default is -2.0.";
+ helpString += "The gapextend parameter allows you to specify the penalty for extending a gap in an alignment. The default is -1.0.";
+ helpString += "The flip parameter is used to specify whether or not you want mothur to try the reverse complement if a sequence falls below the threshold. The default is false.";
+ helpString += "The threshold is used to specify a cutoff at which an alignment is deemed 'bad' and the reverse complement may be tried. The default threshold is 0.50, meaning 50% of the bases are removed in the alignment.";
+ helpString += "If the flip parameter is set to true the reverse complement of the sequence is aligned and the better alignment is reported.";
+ helpString += "The default for the threshold parameter is 0.50, meaning at least 50% of the bases must remain or the sequence is reported as potentially reversed.";
+ helpString += "The align.seqs command should be in the following format:";
+ helpString += "align.seqs(reference=yourTemplateFile, fasta=yourCandidateFile, align=yourAlignmentMethod, search=yourSearchmethod, ksize=yourKmerSize, match=yourMatchBonus, mismatch=yourMismatchpenalty, gapopen=yourGapopenPenalty, gapextend=yourGapExtendPenalty)";
+ helpString += "Example align.seqs(candidate=candidate.fasta, template=core.filtered, align=kmer, search=gotoh, ksize=8, match=2.0, mismatch=3.0, gapopen=-2.0, gapextend=-1.0)";
+ helpString += "Note: No spaces between parameter labels (i.e. candidate), '=' and parameters (i.e.yourFastaFile).";
return helpString;
}
catch(exception& e) {
string AmovaCommand::getHelpString(){
try {
string helpString = "";
- helpString += "Referenced: Anderson MJ (2001). A new method for non-parametric multivariate analysis of variance. Austral Ecol 26: 32-46.\n";
- helpString += "The amova command outputs a .amova file. \n";
- helpString += "The amova command parameters are phylip, iters, and alpha. The phylip and design parameters are required, unless you have valid current files.\n";
- helpString += "The design parameter allows you to assign your samples to groups when you are running amova. It is required. \n";
- helpString += "The design file looks like the group file. It is a 2 column tab delimited file, where the first column is the sample name and the second column is the group the sample belongs to.\n";
- helpString += "The iters parameter allows you to set number of randomization for the P value. The default is 1000. \n";
- helpString += "The amova command should be in the following format: amova(phylip=file.dist, design=file.design).\n";
- helpString += "Note: No spaces between parameter labels (i.e. iters), '=' and parameters (i.e. 1000).\n\n";
+ helpString += "Referenced: Anderson MJ (2001). A new method for non-parametric multivariate analysis of variance. Austral Ecol 26: 32-46.";
+ helpString += "The amova command outputs a .amova file.";
+ helpString += "The amova command parameters are phylip, iters, and alpha. The phylip and design parameters are required, unless you have valid current files.";
+ helpString += "The design parameter allows you to assign your samples to groups when you are running amova. It is required.";
+ helpString += "The design file looks like the group file. It is a 2 column tab delimited file, where the first column is the sample name and the second column is the group the sample belongs to.";
+ helpString += "The iters parameter allows you to set number of randomization for the P value. The default is 1000.";
+ helpString += "The amova command should be in the following format: amova(phylip=file.dist, design=file.design).";
+ helpString += "Note: No spaces between parameter labels (i.e. iters), '=' and parameters (i.e. 1000).";
return helpString;
}
catch(exception& e) {
m->mothurOut("df\t" + toString(dfAmong) + '\t' + toString(dfWithin) + '\t' + toString(dfTotal) + '\n');
AMOVAFile << "MS\t" << MSAmong << '\t' << MSWithin << endl << endl;
- m->mothurOut("MS\t" + toString(MSAmong) + '\t' + toString(MSWithin) + "\n\n");
+ m->mothurOut("MS\t" + toString(MSAmong) + '\t' + toString(MSWithin) + "\n");
AMOVAFile << "Fs:\t" << Fs << endl;
m->mothurOut("Fs:\t" + toString(Fs) + '\n');
helpString += "The design file looks like the group file. It is a 2 column tab delimited file, where the first column is the sample name and the second column is the group the sample belongs to.\n";
helpString += "The iters parameter allows you to set number of randomization for the P value. The default is 1000. \n";
helpString += "The anosim command should be in the following format: anosim(phylip=file.dist, design=file.design).\n";
- helpString += "Note: No spaces between parameter labels (i.e. iters), '=' and parameters (i.e. 1000).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. iters), '=' and parameters (i.e. 1000).\n";
return helpString;
}
catch(exception& e) {
helpString += "The default value for label is all lines in your inputfile.\n";
helpString += "The bin.seqs command outputs a .fasta file for each distance you specify appending the OTU number to each name.\n";
helpString += "If you provide a groupfile, then it also appends the sequences group to the name.\n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n";
return helpString;
}
catch(exception& e) {
m8FileHandle.close();
remove((queryFileName+seq->getName()).c_str());
remove((blastFileName+seq->getName()).c_str());
-//cout << "\n\n" ;
+//cout << "\n" ;
return topMatches;
}
catch(exception& e) {
data[2] = 1.031/sqrt(rdata.size());
/*m->mothurOut(critVal); m->mothurOutEndLine();
- m->mothurOut("If D-Statistic is less than the critical value then the data fits the Broken Stick model w/ 95% confidence.\n\n");*/
+ m->mothurOut("If D-Statistic is less than the critical value then the data fits the Broken Stick model w/ 95% confidence.\n");*/
if (isnan(data[0]) || isinf(data[0])) { data[0] = 0; }
helpString += "The increment parameter allows you to specify how far you move each window while finding chimeric sequences, default is 25.\n";
helpString += "chimera.bellerophon(fasta=yourFastaFile, filter=yourFilter, correction=yourCorrection, processors=yourProcessors) \n";
helpString += "Example: chimera.bellerophon(fasta=AD.align, filter=True, correction=true, window=200) \n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n";
return helpString;
}
catch(exception& e) {
helpString += "The chimera.ccode command should be in the following format: \n";
helpString += "chimera.ccode(fasta=yourFastaFile, reference=yourTemplate) \n";
helpString += "Example: chimera.ccode(fasta=AD.align, reference=core_set_aligned.imputed.fasta) \n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n";
return helpString;
}
catch(exception& e) {
if (m->control_pressed) { MPI_File_close(&inMPI); MPI_File_close(&outMPI); MPI_File_close(&outMPIAccnos); for (int j = 0; j < outputNames.size(); j++) { remove(outputNames[j].c_str()); } outputTypes.clear(); delete chimera; return 0; }
if (pid == 0) { //you are the root process
- string outTemp = "For full window mapping info refer to " + mapInfo + "\n\n";
+ string outTemp = "For full window mapping info refer to " + mapInfo + "\n";
//print header
int length = outTemp.length();
helpString += "The chimera.check command should be in the following format: \n";
helpString += "chimera.check(fasta=yourFastaFile, reference=yourTemplateFile, processors=yourProcessors, ksize=yourKmerSize) \n";
helpString += "Example: chimera.check(fasta=AD.fasta, reference=core_set_aligned,imputed.fasta, processors=4, ksize=8) \n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n";
return helpString;
}
catch(exception& e) {
helpString += "The chimera.pintail command should be in the following format: \n";
helpString += "chimera.pintail(fasta=yourFastaFile, reference=yourTemplate) \n";
helpString += "Example: chimera.pintail(fasta=AD.align, reference=silva.bacteria.fasta) \n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n";
return helpString;
}
catch(exception& e) {
helpString += "The chimera.slayer command should be in the following format: \n";
helpString += "chimera.slayer(fasta=yourFastaFile, reference=yourTemplate, search=yourSearch) \n";
helpString += "Example: chimera.slayer(fasta=AD.align, reference=core_set_aligned.imputed.fasta, search=kmer) \n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n";
return helpString;
}
catch(exception& e) {
helpString += "The short parameter allows you to specify you want to keep sequences that are too short to chop, default=false.\n";
helpString += "For example, if you ran chop.seqs with numbases=200 and short=t, if a sequence had 100 bases mothur would keep the sequence rather than eliminate it.\n";
helpString += "Example chop.seqs(fasta=amazon.fasta, numbases=200, keep=front).\n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n";
return helpString;
}
catch(exception& e) {
helpString += "The probs parameter shuts off the outputting of the consensus confidence results. The default is true, meaning you want the confidence to be shown.\n";
helpString += "The classify.otu command should be in the following format: classify.otu(taxonomy=yourTaxonomyFile, list=yourListFile, name=yourNamesFile, label=yourLabels).\n";
helpString += "Example classify.otu(taxonomy=abrecovery.silva.full.taxonomy, list=abrecovery.fn.list, label=0.10).\n";
- helpString += "Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListFile).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListFile).\n";
return helpString;
}
catch(exception& e) {
helpString += "Example classify.seqs(fasta=amazon.fasta, reference=core.filtered, method=knn, search=gotoh, ksize=8, processors=2)\n";
helpString += "The .taxonomy file consists of 2 columns: 1 = your sequence name, 2 = the taxonomy for your sequence. \n";
helpString += "The .tax.summary is a summary of the different taxonomies represented in your fasta file. \n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n";
return helpString;
}
catch(exception& e) {
}
}
- printf("\n\n");
+ printf("\n");
}
}
- printf("\n");
+ printf("\n\n");
return;
}
helpString += "The cluster command parameter options are phylip, column, name, method, cuttoff, hard, precision, sim, showabund and timing. Phylip or column and name are required, unless you have a valid current file.\n";
helpString += "The cluster command should be in the following format: \n";
helpString += "cluster(method=yourMethod, cutoff=yourCutoff, precision=yourPrecision) \n";
- helpString += "The acceptable cluster methods are furthest, nearest, average and weighted. If no method is provided then furthest is assumed.\n\n";
+ helpString += "The acceptable cluster methods are furthest, nearest, average and weighted. If no method is provided then furthest is assumed.\n";
return helpString;
}
catch(exception& e) {
helpString += "The cluster.classic command parameter options are phylip, name, method, cuttoff, hard, sim, precision. Phylip is required, unless you have a valid current file.\n";
helpString += "The cluster.classic command should be in the following format: \n";
helpString += "cluster.classic(phylip=yourDistanceMatrix, method=yourMethod, cutoff=yourCutoff, precision=yourPrecision) \n";
- helpString += "The acceptable cluster methods are furthest, nearest, weighted and average. If no method is provided then furthest is assumed.\n\n";
+ helpString += "The acceptable cluster methods are furthest, nearest, weighted and average. If no method is provided then furthest is assumed.\n";
return helpString;
}
catch(exception& e) {
helpString += "The cluster.fragments command should be in the following format: \n";
helpString += "cluster.fragments(fasta=yourFastaFile, names=yourNamesFile) \n";
helpString += "Example cluster.fragments(fasta=amazon.fasta).\n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n";
return helpString;
}
catch(exception& e) {
string CollectCommand::getHelpString(){
try {
string helpString = "";
+ ValidCalculators validCalculator;
helpString += "The collect.single command parameters are list, sabund, rabund, shared, label, freq, calc and abund. list, sabund, rabund or shared is required unless you have a valid current file. \n";
helpString += "The collect.single command should be in the following format: \n";
helpString += "The freq parameter is used indicate when to output your data, by default it is set to 100. But you can set it to a percentage of the number of sequence. For example freq=0.10, means 10%. \n";
helpString += "collect.single(label=yourLabel, iters=yourIters, freq=yourFreq, calc=yourEstimators).\n";
helpString += "Example collect(label=unique-.01-.03, iters=10000, freq=10, calc=sobs-chao-ace-jack).\n";
helpString += "The default values for freq is 100, and calc are sobs-chao-ace-jack-shannon-npshannon-simpson.\n";
- helpString += validCalculator->printCalc("single");
+ helpString += validCalculator.printCalc("single");
helpString += "The label parameter is used to analyze specific labels in your input.\n";
- helpString += "Note: No spaces between parameter labels (i.e. freq), '=' and parameters (i.e.yourFreq).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. freq), '=' and parameters (i.e.yourFreq).\n";
return helpString;
}
catch(exception& e) {
allLines = 1;
//allow user to run help
- if(option == "help") { validCalculator = new ValidCalculators(); help(); delete validCalculator; abort = true; }
+ if(option == "help") { help(); abort = true; }
else {
vector<string> myArray = setParameters();
m->mothurOutEndLine(); m->mothurOut("Processing group " + groups[p]); m->mothurOutEndLine(); m->mothurOutEndLine();
}
- validCalculator = new ValidCalculators();
+ ValidCalculators validCalculator;
for (int i=0; i<Estimators.size(); i++) {
- if (validCalculator->isValidCalculator("single", Estimators[i]) == true) {
+ if (validCalculator.isValidCalculator("single", Estimators[i]) == true) {
if (Estimators[i] == "sobs") {
cDisplays.push_back(new CollectDisplay(new Sobs(), new OneColumnFile(fileNameRoot+"sobs")));
outputNames.push_back(fileNameRoot+"sobs"); outputTypes["sobs"].push_back(fileNameRoot+"sobs");
for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } outputTypes.clear();
delete input;
delete order;
- delete validCalculator;
m->Groups.clear();
return 0;
}
for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } outputTypes.clear();
delete input;
delete order;
- delete validCalculator;
m->Groups.clear();
return 0;
}
for(int i=0;i<cDisplays.size();i++){ delete cDisplays[i]; }
for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } outputTypes.clear();
delete input;
- delete validCalculator;
m->Groups.clear();
return 0;
}
for(int i=0;i<cDisplays.size();i++){ delete cDisplays[i]; }
for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } outputTypes.clear();
delete input;
- delete order;
- delete validCalculator;
+ delete order;
m->Groups.clear();
return 0;
}
for(int i=0;i<cDisplays.size();i++){ delete cDisplays[i]; }
cDisplays.clear();
delete input;
- delete validCalculator;
}
if (m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } return 0; }
OrderVector* order;
InputData* input;
Collect* cCurve;
- ValidCalculators* validCalculator;
vector<Display*> cDisplays;
int abund, size;
float freq;
helpString += "The all parameter is used to specify if you want the estimate of all your groups together. This estimate can only be made for sharedsobs and sharedchao calculators. The default is false.\n";
helpString += "If you use sharedchao and run into memory issues, set all to false. \n";
helpString += "The groups parameter allows you to specify which of the groups in your groupfile you would like analyzed. You must enter at least 2 valid groups.\n";
- helpString += "Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListfile).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListfile).\n";
return helpString;
}
catch(exception& e) {
*/
#include "command.hpp"
-//#include "readdistcommand.h"
-//#include "readtreecommand.h"
-//#include "readotucommand.h"
+#include "readdistcommand.h"
+#include "readtreecommand.h"
+#include "readotucommand.h"
#include "clustercommand.h"
#include "collectcommand.h"
#include "collectsharedcommand.h"
#include "getcurrentcommand.h"
#include "setcurrentcommand.h"
#include "sharedcommand.h"
+#include "getcommandinfocommand.h"
/*******************************************************/
append = false;
//initialize list of valid commands
- //commands["read.dist"] = "read.dist";
- //commands["read.otu"] = "read.otu";
- //commands["read.tree"] = "read.tree";
+ commands["read.dist"] = "read.dist";
+ commands["read.otu"] = "read.otu";
+ commands["read.tree"] = "read.tree";
commands["make.shared"] = "make.shared";
commands["bin.seqs"] = "bin.seqs";
commands["get.oturep"] = "get.oturep";
commands["merge.groups"] = "merge.groups";
commands["get.current"] = "get.current";
commands["set.current"] = "set.current";
+ commands["get.commandinfo"] = "get.commandinfo";
commands["pairwise.seqs"] = "MPIEnabled";
commands["pipeline.pds"] = "MPIEnabled";
commands["classify.seqs"] = "MPIEnabled";
else { optionString += "inputdir=" + inputDir; }
}
- //if(commandName == "read.dist") { command = new ReadDistCommand(optionString); }
- //else if(commandName == "read.otu") { command = new ReadOtuCommand(optionString); }
- //else if(commandName == "read.tree") { command = new ReadTreeCommand(optionString); }
- if(commandName == "cluster") { command = new ClusterCommand(optionString); }
+ if(commandName == "read.dist") { command = new ReadDistCommand(optionString); }
+ else if(commandName == "read.otu") { command = new ReadOtuCommand(optionString); }
+ else if(commandName == "read.tree") { command = new ReadTreeCommand(optionString); }
+ else if(commandName == "cluster") { command = new ClusterCommand(optionString); }
else if(commandName == "unique.seqs") { command = new DeconvoluteCommand(optionString); }
else if(commandName == "parsimony") { command = new ParsimonyCommand(optionString); }
else if(commandName == "help") { command = new HelpCommand(optionString); }
else if(commandName == "set.current") { command = new SetCurrentCommand(optionString); }
else if(commandName == "anosim") { command = new AnosimCommand(optionString); }
else if(commandName == "make.shared") { command = new SharedCommand(optionString); }
+ else if(commandName == "get.commandinfo") { command = new GetCommandInfoCommand(optionString); }
else { command = new NoCommand(optionString); }
return command;
else { optionString += "inputdir=" + inputDir; }
}
- //if(commandName == "read.dist") { pipecommand = new ReadDistCommand(optionString); }
- //else if(commandName == "read.otu") { pipecommand = new ReadOtuCommand(optionString); }
- //else if(commandName == "read.tree") { pipecommand = new ReadTreeCommand(optionString); }
- if(commandName == "cluster") { pipecommand = new ClusterCommand(optionString); }
+ if(commandName == "read.dist") { pipecommand = new ReadDistCommand(optionString); }
+ else if(commandName == "read.otu") { pipecommand = new ReadOtuCommand(optionString); }
+ else if(commandName == "read.tree") { pipecommand = new ReadTreeCommand(optionString); }
+ else if(commandName == "cluster") { pipecommand = new ClusterCommand(optionString); }
else if(commandName == "unique.seqs") { pipecommand = new DeconvoluteCommand(optionString); }
else if(commandName == "parsimony") { pipecommand = new ParsimonyCommand(optionString); }
else if(commandName == "help") { pipecommand = new HelpCommand(optionString); }
else if(commandName == "get.current") { pipecommand = new GetCurrentCommand(optionString); }
else if(commandName == "set.current") { pipecommand = new SetCurrentCommand(optionString); }
else if(commandName == "make.shared") { pipecommand = new SharedCommand(optionString); }
+ else if(commandName == "get.commandinfo") { pipecommand = new GetCommandInfoCommand(optionString); }
else { pipecommand = new NoCommand(optionString); }
return pipecommand;
try {
delete shellcommand; //delete the old command
- //if(commandName == "read.dist") { shellcommand = new ReadDistCommand(); }
- //else if(commandName == "read.otu") { shellcommand = new ReadOtuCommand(); }
- //else if(commandName == "read.tree") { shellcommand = new ReadTreeCommand(); }
- if(commandName == "cluster") { shellcommand = new ClusterCommand(); }
+ if(commandName == "read.dist") { shellcommand = new ReadDistCommand(); }
+ else if(commandName == "read.otu") { shellcommand = new ReadOtuCommand(); }
+ else if(commandName == "read.tree") { shellcommand = new ReadTreeCommand(); }
+ else if(commandName == "cluster") { shellcommand = new ClusterCommand(); }
else if(commandName == "unique.seqs") { shellcommand = new DeconvoluteCommand(); }
else if(commandName == "parsimony") { shellcommand = new ParsimonyCommand(); }
else if(commandName == "help") { shellcommand = new HelpCommand(); }
else if(commandName == "get.current") { shellcommand = new GetCurrentCommand(); }
else if(commandName == "set.current") { shellcommand = new SetCurrentCommand(); }
else if(commandName == "make.shared") { shellcommand = new SharedCommand(); }
+ else if(commandName == "get.commandinfo") { shellcommand = new GetCommandInfoCommand(); }
else { shellcommand = new NoCommand(); }
return shellcommand;
bool getAppend() { return append; }\r
string getOutputDir() { return outputDir; }\r
bool MPIEnabled(string);\r
-\r
+ map<string, string> getListCommands() { return commands; }\r
+ \r
private:\r
Command* command;\r
Command* shellcommand;\r
helpString += "The .consensus.tre file contains the consensus tree of the trees in your input file.\n";
helpString += "The branch lengths are the percentage of trees in your input file that had the given pair.\n";
helpString += "The .consensuspairs file contains a list of the internal nodes in your tree. For each node, the pair that was used in the consensus tree \n";
- helpString += "is reported with its percentage, as well as the other pairs that were seen for that node but not used and their percentages.\n\n";
+ helpString += "is reported with its percentage, as well as the other pairs that were seen for that node but not used and their percentages.\n";
return helpString;
}
catch(exception& e) {
helpString += "The consensus.seqs command should be in the following format: \n";
helpString += "consensus.seqs(fasta=yourFastaFile, list=yourListFile) \n";
helpString += "Example: consensus.seqs(fasta=abrecovery.align, list=abrecovery.fn.list) \n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n";
return helpString;
}
catch(exception& e) {
helpString += "The corr.axes command should be in the following format: corr.axes(axes=yourPcoaFile, shared=yourSharedFile, method=yourMethod).\n";
helpString += "Example corr.axes(axes=genus.pool.thetayc.genus.lt.pcoa, shared=genus.pool.shared, method=kendall).\n";
helpString += "The corr.axes command outputs a .corr.axes file.\n";
- helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n";
return helpString;
}
catch(exception& e) {
helpString += "The degap.seqs command should be in the following format: \n";
helpString += "degap.seqs(fasta=yourFastaFile) \n";
helpString += "Example: degap.seqs(fasta=abrecovery.align) \n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n";
return helpString;
}
catch(exception& e) {
helpString += "The deunique.seqs command should be in the following format: \n";
helpString += "deunique.seqs(fasta=yourFastaFile, name=yourNameFile) \n";
helpString += "Example deunique.seqs(fasta=abrecovery.unique.fasta, name=abrecovery.names).\n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n";
return helpString;
}
catch(exception& e) {
helpString += "The dist.seqs command should be in the following format: \n";
helpString += "dist.seqs(fasta=yourFastaFile, calc=yourCalc, countends=yourEnds, cutoff= yourCutOff, processors=yourProcessors) \n";
helpString += "Example dist.seqs(fasta=amazon.fasta, calc=eachgap, countends=F, cutoff= 2.0, processors=3).\n";
- helpString += "Note: No spaces between parameter labels (i.e. calc), '=' and parameters (i.e.yourCalc).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. calc), '=' and parameters (i.e.yourCalc).\n";
return helpString;
}
catch(exception& e) {
helpString += "The filter.seqs command should be in the following format: \n";
helpString += "filter.seqs(fasta=yourFastaFile, trump=yourTrump) \n";
helpString += "Example filter.seqs(fasta=abrecovery.fasta, trump=.).\n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n";
return helpString;
}
catch(exception& e) {
--- /dev/null
+/*
+ * getcommandinfo.cpp
+ * Mothur
+ *
+ * Created by westcott on 4/6/11.
+ * Copyright 2011 Schloss Lab. All rights reserved.
+ *
+ */
+
+#include "getcommandinfocommand.h"
+
+//**********************************************************************************************************************
+vector<string> GetCommandInfoCommand::setParameters(){
+ try {
+ CommandParameter poutput("output", "String", "", "", "", "", "",false,false); parameters.push_back(poutput);
+ 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, "GetCommandInfoCommand", "setParameters");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+string GetCommandInfoCommand::getHelpString(){
+ try {
+ string helpString = "";
+ helpString += "This command is used by the gui to get the information about current commands available in mothur.\n";
+ return helpString;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "GetCommandInfoCommand", "getHelpString");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+
+GetCommandInfoCommand::GetCommandInfoCommand(string option) {
+ try {
+ abort = false; calledHelp = false;
+
+ //allow user to run help
+ if(option == "help") { help(); abort = true; calledHelp = true; }
+
+ else {
+ vector<string> myArray = setParameters();
+
+ OptionParser parser(option);
+ map<string, string> parameters = parser.getParameters();
+
+ ValidParameters validParameter;
+ //check to make sure all parameters are valid for command
+ for (map<string,string>::iterator it = parameters.begin(); it != parameters.end(); it++) {
+ if (validParameter.isValidParameter(it->first, myArray, it->second) != true) { abort = true; }
+ }
+
+ output = validParameter.validFile(parameters, "output", false);
+ if (output == "not found") { output = ""; m->mothurOut("You must provide an output filename."); m->mothurOutEndLine(); abort=true; }
+
+ }
+ }
+ catch(exception& e) {
+ m->errorOut(e, "GetCommandInfoCommand", "GetCommandInfoCommand");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+
+int GetCommandInfoCommand::execute(){
+ try {
+
+ if (abort == true) { if (calledHelp) { return 0; } return 2; }
+
+ commandFactory = CommandFactory::getInstance();
+
+ ofstream out;
+ m->openOutputFile(output+".temp", out);
+
+ int numNonHidden = 0;
+
+ out << "mothurLocation=" << m->getFullPathName(m->argv) << endl;
+ out << "mothurVersion=" << m->getVersion() << endl;
+
+ map<string, string> commands = commandFactory->getListCommands();
+ map<string, string>::iterator it;
+
+ //loop through each command outputting info
+ for (it = commands.begin(); it != commands.end(); it++) {
+
+ if (m->control_pressed) { m->mothurOut("[ERROR]: did not complete making the file."); m->mothurOutEndLine(); out.close(); remove((output+".temp").c_str()); }
+
+ Command* thisCommand = commandFactory->getCommand(it->first);
+
+ //don't add hidden commands
+ if (thisCommand->getCommandCategory() != "Hidden") {
+ numNonHidden++;
+
+ //general info
+ out << "commandName=" << thisCommand->getCommandName() << endl;
+ out << "commandCategory=" << thisCommand->getCommandCategory() << endl;
+
+ //remove /n from help string since gui reads line by line
+ string myhelpString = thisCommand->getHelpString();
+ string newHelpString = "";
+ for (int i = 0; i < myhelpString.length(); i++) {
+ if (myhelpString[i] != '\n') { newHelpString += myhelpString[i]; }
+ }
+ out << "help=" << newHelpString << endl;
+
+ //outputTypes - makes something like outputTypes=fasta-name-qfile
+ map<string, vector<string> > thisOutputTypes = thisCommand->getOutputFiles();
+ map<string, vector<string> >::iterator itTypes;
+
+ if (thisOutputTypes.size() == 0) { out << "outputTypes=none" << endl; }
+ else {
+ string types = "";
+ for (itTypes = thisOutputTypes.begin(); itTypes != thisOutputTypes.end(); itTypes++) { types += itTypes->first + "-"; }
+ //rip off last -
+ types = types.substr(0, types.length()-1);
+ out << "outputTypes=" << types << endl;
+ }
+
+ vector<string> booleans; vector<string> numbers; vector<string> multiples; vector<string> Strings;
+ vector<string> inputGroupNames; map<string, string> inputTypes;
+
+ getInfo(thisCommand->getParameters(), booleans, numbers, multiples, Strings, inputGroupNames, inputTypes);
+
+ //output booleans
+ out << "Boolean=" << booleans.size() << endl;
+ for (int i = 0; i < booleans.size(); i++) { out << booleans[i] << endl; }
+
+ //output mulitples
+ out << "Multiple=" << multiples.size() << endl;
+ for (int i = 0; i < multiples.size(); i++) { out << multiples[i] << endl; }
+
+ //output numbers
+ out << "Numbers=" << numbers.size() << endl;
+ for (int i = 0; i < numbers.size(); i++) { out << numbers[i] << endl; }
+
+ //output strings
+ out << "String=" << Strings.size() << endl;
+ for (int i = 0; i < Strings.size(); i++) { out << Strings[i] << endl; }
+
+ //output groups
+ out << "inputGroupNames=" << inputGroupNames.size() << endl;
+ for (int i = 0; i < inputGroupNames.size(); i++) { out << inputGroupNames[i] << endl; }
+
+ //output input types
+ if (inputTypes.size() == 0) { out << "inputTypes=" << endl; }
+ else {
+ string types = "";
+ for (map<string, string>::iterator it2 = inputTypes.begin(); it2 != inputTypes.end(); it2++) { types += it2->first + "-"; }
+ //rip off last -
+ types = types.substr(0, types.length()-1);
+ out << "inputTypes=" << types << endl;
+
+ for (map<string, string>::iterator it2 = inputTypes.begin(); it2 != inputTypes.end(); it2++) {
+ out << it2->first << "=" << it2->second << endl;
+ }
+ }
+
+ }
+ }
+
+ out.close();
+
+ ofstream out2;
+ m->openOutputFile(output, out2);
+ out2 << numNonHidden << endl;
+ out2.close();
+
+ m->appendFiles(output+".temp", output);
+ remove((output+".temp").c_str());
+
+ m->mothurOutEndLine();
+ m->mothurOut("Output File Names: "); m->mothurOutEndLine();
+ m->mothurOut(output); m->mothurOutEndLine();
+ m->mothurOutEndLine();
+
+
+ return 0;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "GetCommandInfoCommand", "execute");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+
+int GetCommandInfoCommand::getInfo(vector<CommandParameter> para, vector<string>& booleans, vector<string>& numbers, vector<string>& multiples, vector<string>& strings, vector<string>& inputGroupNames, map<string, string>& inputTypes){
+ try {
+
+ map<string, set<string> > groups;
+ map<string, set<string> >::iterator itGroups;
+
+ for (int i = 0; i < para.size(); i++) {
+ if ((para[i].name == "inputdir") || (para[i].name == "outputdir")) {} //ignore
+ else {
+ if (para[i].type == "Boolean") {
+ string temp = para[i].name + "=" + para[i].optionsDefault;
+ booleans.push_back(temp);
+ }else if (para[i].type == "Multiple") {
+ string multAllowed = "F";
+ if (para[i].multipleSelectionAllowed) { multAllowed = "T"; }
+ string temp = para[i].name + "=" + para[i].options + "|" + para[i].optionsDefault + "|" + multAllowed;
+ multiples.push_back(temp);
+ }else if (para[i].type == "Number") {
+ string temp = para[i].name + "=" + para[i].optionsDefault;
+ numbers.push_back(temp);
+ }else if (para[i].type == "String") {
+ string temp = para[i].name + "=" + para[i].optionsDefault;
+ strings.push_back(temp);
+ }else if (para[i].type == "InputTypes") {
+ string required = "F";
+ if (para[i].required) { required = "T"; }
+ string temp = required + "|" + para[i].chooseOnlyOneGroup + "|" + para[i].chooseAtLeastOneGroup + "|" + para[i].linkedGroup;
+ inputTypes[para[i].name] = temp;
+
+ //add choose only one groups
+ groups[para[i].chooseOnlyOneGroup].insert(para[i].name);
+
+ //add at least one group names
+ groups[para[i].chooseAtLeastOneGroup].insert(para[i].name);
+
+ //add at linked group names
+ groups[para[i].linkedGroup].insert(para[i].name);
+
+ }else { m->mothurOut("[ERROR]: " + para[i].type + " is an unknown parameter type, please correct."); m->mothurOutEndLine(); }
+ }
+ }
+
+ for (itGroups = groups.begin(); itGroups != groups.end(); itGroups++) {
+ if (itGroups->first != "none") {
+ set<string> tempNames = itGroups->second;
+ string temp = itGroups->first + "=";
+ for (set<string>::iterator itNames = tempNames.begin(); itNames != tempNames.end(); itNames++) {
+ temp += *itNames + "-";
+ }
+ //rip off last -
+ temp = temp.substr(0, temp.length()-1);
+ inputGroupNames.push_back(temp);
+ }
+ }
+
+ return 0;
+
+ }
+ catch(exception& e) {
+ m->errorOut(e, "GetCommandInfoCommand", "getInfo");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************/
--- /dev/null
+#ifndef GETCOMMANDINFOCOMMAND_H
+#define GETCOMMANDINFOCOMMAND_H
+
+/*
+ * getcommandinfo.h
+ * Mothur
+ *
+ * Created by westcott on 4/6/11.
+ * Copyright 2011 Schloss Lab. All rights reserved.
+ *
+ */
+
+
+
+#include "command.hpp"
+#include "commandfactory.hpp"
+
+/**********************************************************/
+
+class GetCommandInfoCommand : public Command {
+
+public:
+ GetCommandInfoCommand(string);
+ GetCommandInfoCommand() { abort = true; calledHelp = true; setParameters(); }
+ ~GetCommandInfoCommand(){}
+
+ vector<string> setParameters();
+ string getCommandName() { return "get.commandinfo"; }
+ string getCommandCategory() { return "Hidden"; }
+ string getHelpString();
+
+ int execute();
+ void help() { m->mothurOut(getHelpString()); }
+
+private:
+ CommandFactory* commandFactory;
+ string output;
+ bool abort;
+ vector<string> outputNames;
+
+ int getInfo(vector<CommandParameter>, vector<string>&, vector<string>&, vector<string>&, vector<string>&, vector<string>&, map<string, string>&);
+
+
+
+};
+
+/**********************************************************/
+
+#endif
+
helpString += "The get.groups command should be in the following format: get.groups(accnos=yourAccnos, fasta=yourFasta, group=yourGroupFile).\n";
helpString += "Example get.groups(accnos=amazon.accnos, fasta=amazon.fasta, group=amazon.groups).\n";
helpString += "or get.groups(groups=pasture, fasta=amazon.fasta, group=amazon.groups).\n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n";
return helpString;
}
catch(exception& e) {
helpString += "Example get.lineage(taxonomy=amazon.silva.taxonomy, taxon=Bacteria;Firmicutes;Bacilli;Lactobacillales;).\n";
helpString += "Note: If you are running mothur in script mode you must wrap the taxon in ' characters so mothur will ignore the ; in the taxon.\n";
helpString += "Example get.lineage(taxonomy=amazon.silva.taxonomy, taxon='Bacteria;Firmicutes;Bacilli;Lactobacillales;').\n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n";
return helpString;
}
catch(exception& e) {
helpString += "Example get.otulist(list=amazon.fn.list, label=0.10).\n";
helpString += "The default value for label is all lines in your inputfile.\n";
helpString += "The get.otulist command outputs a .otu file for each distance you specify listing the bin number and the names of the sequences in that bin.\n";
- helpString += "Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListFile).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListFile).\n";
return helpString;
}
catch(exception& e) {
helpString += "The groups parameter allows you to indicate that you want representative sequences for each group specified for each OTU, group name should be separated by dashes. ex. groups=A-B-C.\n";
helpString += "The get.oturep command outputs a .fastarep and .rep.names file for each distance you specify, selecting one OTU representative for each bin.\n";
helpString += "If you provide a groupfile, then it also appends the names of the groups present in that bin.\n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n";
return helpString;
}
catch(exception& e) {
helpString += "The get.otus command should be in the following format: get.otus(accnos=yourAccnos, list=yourListFile, group=yourGroupFile, label=yourLabel).\n";
helpString += "Example get.otus(accnos=amazon.accnos, list=amazon.fn.list, group=amazon.groups, label=0.03).\n";
helpString += "or get.otus(groups=pasture, list=amazon.fn.list, amazon.groups, label=0.03).\n";
- helpString += "Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListFile).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListFile).\n";
return helpString;
}
catch(exception& e) {
helpString += "Example get.rabund(sorted=F).\n";
helpString += "The default value for label is all labels in your inputfile.\n";
helpString += "The get.rabund command outputs a .rabund file containing the lines you selected.\n";
- helpString += "Note: No spaces between parameter labels (i.e. label), '=' and parameters (i.e.yourLabels).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. label), '=' and parameters (i.e.yourLabels).\n";
return helpString;
}
catch(exception& e) {
helpString += "Example get.relabund(groups=A-B-C, scale=averagegroup).\n";
helpString += "The default value for groups is all the groups in your groupfile, and all labels in your inputfile will be used.\n";
helpString += "The get.relabund command outputs a .relabund file.\n";
- helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n";
return helpString;
}
catch(exception& e) {
helpString += "Example get.sabund().\n";
helpString += "The default value for label is all labels in your inputfile.\n";
helpString += "The get.sabund command outputs a .sabund file containing the labels you selected.\n";
- helpString += "Note: No spaces between parameter labels (i.e. label), '=' and parameters (i.e.yourLabel).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. label), '=' and parameters (i.e.yourLabel).\n";
return helpString;
}
catch(exception& e) {
helpString += "The dups parameter allows you to add the entire line from a name file if you add any name from the line. default=false. \n";
helpString += "The get.seqs command should be in the following format: get.seqs(accnos=yourAccnos, fasta=yourFasta).\n";
helpString += "Example get.seqs(accnos=amazon.accnos, fasta=amazon.fasta).\n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n";
return helpString;
}
catch(exception& e) {
helpString += "Example get.sharedseqs(list=amazon.fn.list, label=unique-0.01, group=forest-pasture, fasta=amazon.fasta, output=accnos).\n";
helpString += "The output to the screen is the distance and the number of otus at that distance for the groups you specified.\n";
helpString += "The default value for label is all labels in your inputfile. The default for groups is all groups in your file.\n";
- helpString += "Note: No spaces between parameter labels (i.e. label), '=' and parameters (i.e.yourLabel).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. label), '=' and parameters (i.e.yourLabel).\n";
return helpString;
}
catch(exception& e) {
helpString += "The name parameter allows you to enter your name file and is required if your distance file is in column format. \n";
helpString += "The hcluster command should be in the following format: \n";
helpString += "hcluster(column=youDistanceFile, name=yourNameFile, method=yourMethod, cutoff=yourCutoff, precision=yourPrecision) \n";
- helpString += "The acceptable hcluster methods are furthest, nearest, weighted and average.\n\n";
+ helpString += "The acceptable hcluster methods are furthest, nearest, weighted and average.\n";
return helpString;
}
catch(exception& e) {
helpString += "The default value for groups is all the groups in your groupfile, and all labels in your inputfile will be used.\n";
helpString += "The default value for scale is log10; your other options are log2 and linear.\n";
helpString += "The heatmap.bin command outputs a .svg file for each label you specify.\n";
- helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n";
return helpString;
}
catch(exception& e) {
string HeatMapSimCommand::getHelpString(){
try {
string helpString = "";
+ ValidCalculators validCalculator;
helpString += "The heatmap.sim command parameters are shared, phylip, column, name, groups, calc and label. shared or phylip or column and name are required unless valid current files exist.\n";
helpString += "There are two ways to use the heatmap.sim command. The first is with the read.otu command. \n";
helpString += "With the read.otu command you may use the groups, label and calc parameters. \n";
helpString += "The heatmap.sim command should be in the following format: heatmap.sim(groups=yourGroups, calc=yourCalc, label=yourLabels).\n";
helpString += "Example heatmap.sim(groups=A-B-C, calc=jabund).\n";
helpString += "The default value for groups is all the groups in your groupfile, and all labels in your inputfile will be used.\n";
- helpString += validCalculator->printCalc("heat");
+ helpString += validCalculator.printCalc("heat");
helpString += "The default value for calc is jclass-thetayc.\n";
helpString += "The heatmap.sim command outputs a .svg file for each calculator you choose at each label you specify.\n";
helpString += "The second way to use the heatmap.sim command is with a distance file representing the distance bewteen your groups. \n";
helpString += "Using the command this way, the phylip or column parameter are required, and only one may be used. If you use a column file the name filename is required. \n";
helpString += "The heatmap.sim command should be in the following format: heatmap.sim(phylip=yourDistanceFile).\n";
helpString += "Example heatmap.sim(phylip=amazonGroups.dist).\n";
- helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n";
return helpString;
}
catch(exception& e) {
allLines = 1;
//allow user to run help
- if(option == "help") { validCalculator = new ValidCalculators(); help(); abort = true; calledHelp = true; }
+ if(option == "help") { help(); abort = true; calledHelp = true; }
else {
vector<string> myArray = setParameters();
if (abort == false) {
- validCalculator = new ValidCalculators();
+ ValidCalculators validCalculator;
int i;
for (i=0; i<Estimators.size(); i++) {
- if (validCalculator->isValidCalculator("heat", Estimators[i]) == true) {
+ if (validCalculator.isValidCalculator("heat", Estimators[i]) == true) {
if (Estimators[i] == "jabund") {
heatCalculators.push_back(new JAbund());
}else if (Estimators[i] == "sorabund") {
}else{ runCommandDist(); }
delete heatmap;
- delete validCalculator;
if (m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } outputTypes.clear(); return 0; }
InputData* input;
vector<SharedRAbundVector*> lookup;
vector<Calculator*> heatCalculators;
- ValidCalculators* validCalculator;
HeatMapSim* heatmap;
OptionParser* parser;
bool abort, allLines;
helpString += "The design file looks like the group file. It is a 2 column tab delimited file, where the first column is the sample name and the second column is the group the sample belongs to.\n";
helpString += "The iters parameter allows you to set number of randomization for the P value. The default is 1000. \n";
helpString += "The homova command should be in the following format: homova(phylip=file.dist, design=file.design).\n";
- helpString += "Note: No spaces between parameter labels (i.e. iters), '=' and parameters (i.e. 1000).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. iters), '=' and parameters (i.e. 1000).\n";
return helpString;
}
catch(exception& e) {
helpString += "The groups parameter allows you to specify which of the groups in your shared or relabund you would like analyzed, or if you provide a design file the groups in your design file. The groups may be entered separated by dashes.\n";
helpString += "The label parameter indicates at what distance your tree relates to the shared or relabund.\n";
helpString += "The indicator command should be used in the following format: indicator(tree=test.tre, shared=test.shared, label=0.03)\n";
- helpString += "Note: No spaces between parameter labels (i.e. tree), '=' and parameters (i.e.yourTreefile).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. tree), '=' and parameters (i.e.yourTreefile).\n";
return helpString;
}
catch(exception& e) {
helpString += "Example libshuff(groups=A-B-C, iters=500, form=discrete, step=0.01, cutOff=2.0).\n";
helpString += "The default value for groups is all the groups in your groupfile, iters is 10000, cutoff is 1.0, form is integral and step is 0.01.\n";
helpString += "The libshuff command output two files: .coverage and .slsummary their descriptions are in the manual.\n";
- helpString += "Note: No spaces between parameter labels (i.e. iters), '=' and parameters (i.e.yourIters).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. iters), '=' and parameters (i.e.yourIters).\n";
return helpString;
}
catch(exception& e) {
helpString += "The list.seqs command parameters are fasta, name, group, list, taxonomy and alignreport. You must provide one of these parameters.\n";
helpString += "The list.seqs command should be in the following format: list.seqs(fasta=yourFasta).\n";
helpString += "Example list.seqs(fasta=amazon.fasta).\n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n";
return helpString;
}
catch(exception& e) {
helpString += "You must also provide an accnos containing the list of groups to get or set the groups parameter to the groups you wish to select.\n";
helpString += "The make.fastq command should be in the following format: make.fastq(qfile=yourQualityFile, fasta=yourFasta).\n";
helpString += "Example make.fastq(fasta=amazon.fasta, qfile=amazon.qual).\n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n";
return helpString;
}
catch(exception& e) {
helpString += "The make.group command should be in the following format: \n";
helpString += "make.group(fasta=yourFastaFiles, groups=yourGroups). \n";
helpString += "Example make.group(fasta=seqs1.fasta-seq2.fasta-seqs3.fasta, groups=A-B-C)\n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFiles).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFiles).\n";
return helpString;
}
catch(exception& e) {
helpString += "The iters parameter allows you to set number of randomization for the P value. The default is 1000. \n";
helpString += "The mantel command should be in the following format: mantel(phylip1=veg.dist, phylip2=env.dist).\n";
helpString += "The mantel command outputs a .mantel file.\n";
- helpString += "Note: No spaces between parameter labels (i.e. phylip1), '=' and parameters (i.e. veg.dist).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. phylip1), '=' and parameters (i.e. veg.dist).\n";
return helpString;
}
catch(exception& e) {
string MatrixOutputCommand::getHelpString(){
try {
string helpString = "";
+ ValidCalculators validCalculator;
helpString += "The dist.shared command parameters are shared, groups, calc, output and label. shared is a required, unless you have a valid current file.\n";
helpString += "The groups parameter allows you to specify which of the groups in your groupfile you would like included used.\n";
helpString += "The group names are separated by dashes. The label parameter allows you to select what distance levels you would like distance matrices created for, and is also separated by dashes.\n";
helpString += "Example dist.shared(groups=A-B-C, calc=jabund-sorabund).\n";
helpString += "The default value for groups is all the groups in your groupfile.\n";
helpString += "The default value for calc is jclass and thetayc.\n";
- helpString += validCalculator->printCalc("matrix");
+ helpString += validCalculator.printCalc("matrix");
helpString += "The dist.shared command outputs a .dist file for each calculator you specify at each distance you choose.\n";
- helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n";
return helpString;
}
catch(exception& e) {
allLines = 1;
//allow user to run help
- if(option == "help") { validCalculator = new ValidCalculators(); help(); abort = true; calledHelp = true; }
+ if(option == "help") { help(); abort = true; calledHelp = true; }
else {
vector<string> myArray = setParameters();
if (abort == false) {
- validCalculator = new ValidCalculators();
+ ValidCalculators validCalculator;
int i;
for (i=0; i<Estimators.size(); i++) {
- if (validCalculator->isValidCalculator("matrix", Estimators[i]) == true) {
+ if (validCalculator.isValidCalculator("matrix", Estimators[i]) == true) {
if (Estimators[i] == "sharedsobs") {
matrixCalculators.push_back(new SharedSobsCS());
}else if (Estimators[i] == "sharedchao") {
//**********************************************************************************************************************
-MatrixOutputCommand::~MatrixOutputCommand(){
- if (abort == false) {
- delete validCalculator;
- }
-}
+MatrixOutputCommand::~MatrixOutputCommand(){}
//**********************************************************************************************************************
vector<Calculator*> matrixCalculators;
vector< vector<float> > simMatrix;
InputData* input;
- ValidCalculators* validCalculator;
vector<SharedRAbundVector*> lookup;
string exportFileName, output, sharedfile;
int numGroups;
helpString += "The merge.file command takes a list of files separated by dashes and merges them into one file.";
helpString += "The merge.file command parameters are input and output.";
helpString += "Example merge.file(input=small.fasta-large.fasta, output=all.fasta).";
- helpString += "Note: No spaces between parameter labels (i.e. output), '=' and parameters (i.e.yourOutputFileName).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. output), '=' and parameters (i.e.yourOutputFileName).\n";
return helpString;
}
catch(exception& e) {
helpString += "The merge.groups command should be in the following format: merge.groups(design=yourDesignFile, shared=yourSharedFile).\n";
helpString += "Example merge.groups(design=temp.design, groups=A-B-C, shared=temp.shared).\n";
helpString += "The default value for groups is all the groups in your sharedfile, and all labels in your inputfile will be used.\n";
- helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n";
return helpString;
}
catch(exception& e) {
helpString += "The metastats command should be in the following format: metastats(design=yourDesignFile).\n";
helpString += "Example metastats(design=temp.design, groups=A-B-C).\n";
helpString += "The default value for groups is all the groups in your groupfile, and all labels in your inputfile will be used.\n";
- helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n";
return helpString;
}
catch(exception& e) {
helpString += "This command outputs a .list, .rabund and .sabund file that can be used with mothur other commands to estimate richness.\n";
helpString += "The cutoff parameter is used to specify the maximum distance you would like to cluster to. The default is 0.70.\n";
helpString += "The precision parameter's default value is 100. \n";
- helpString += "The acceptable mgcluster methods are furthest, nearest and average. If no method is provided then furthest is assumed.\n\n";
+ helpString += "The acceptable mgcluster methods are furthest, nearest and average. If no method is provided then furthest is assumed.\n";
helpString += "The min parameter allows you to specify is you want the minimum or maximum blast score ratio used in calculating the distance. The default is true, meaning you want the minimum.\n";
helpString += "The length parameter is used to specify the minimum overlap required. The default is 5.\n";
helpString += "The penalty parameter is used to adjust the error rate. The default is 0.10.\n";
helpString += "The hcluster parameter allows you to use the hcluster algorithm when clustering. This may be neccessary if your file is too large to fit into RAM. The default is false.\n";
helpString += "The mgcluster command should be in the following format: \n";
helpString += "mgcluster(blast=yourBlastfile, name=yourNameFile, cutoff=yourCutOff).\n";
- helpString += "Note: No spaces between parameter labels (i.e. balst), '=' and parameters (i.e.yourBlastfile).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. balst), '=' and parameters (i.e.yourBlastfile).\n";
return helpString;
}
catch(exception& e) {
helpString += "The iters parameter allows you to select the number of random configuration to try. Default=10\n";
helpString += "The epsilon parameter allows you to select set an acceptable stopping point. Default=1e-12.\n";
helpString += "Example nmds(phylip=yourDistanceFile).\n";
- helpString += "Note: No spaces between parameter labels (i.e. phylip), '=' and parameters (i.e.yourDistanceFile).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. phylip), '=' and parameters (i.e.yourDistanceFile).\n";
return helpString;
}
catch(exception& e) {
//Could choose to give more help here?fdsah
cout << "Invalid command.\n";
- CommandFactory* valid = CommandFactory::getInstance();
+ CommandFactory* valid = CommandFactory::getInstance();
valid->printCommands(cout);
return 0;
helpString += "Example normalize.shared(groups=A-B-C, scale=totalgroup).\n";
helpString += "The default value for groups is all the groups in your groupfile, and all labels in your inputfile will be used.\n";
helpString += "The normalize.shared command outputs a .norm.shared file.\n";
- helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n";
return helpString;
}
catch(exception& e) {
helpString += "otu.hierarchy(list=yourListFile, label=yourLabels).\n";
helpString += "Example otu.hierarchy(list=amazon.fn.list, label=0.01-0.03).\n";
helpString += "The otu.hierarchy command outputs a .otu.hierarchy file which is described on the wiki.\n";
- helpString += "Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListFile).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListFile).\n";
return helpString;
}
catch(exception& e) {
helpString += "The pairwise.seqs command should be in the following format: \n";
helpString += "pairwise.seqs(fasta=yourfastaFile, align=yourAlignmentMethod) \n";
helpString += "Example pairwise.seqs(fasta=candidate.fasta, align=blast)\n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n";
return helpString;
}
catch(exception& e) {
helpString += "The label parameter is used to read specific labels in your input you want to use.\n";
helpString += "The parse.list command should be used in the following format: parse.list(list=yourListFile, group=yourGroupFile, label=yourLabels).\n";
helpString += "Example: parse.list(list=abrecovery.fn.list, group=abrecovery.groups, label=0.03).\n";
- helpString += "Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListfile).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListfile).\n";
return helpString;
}
catch(exception& e) {
helpString += "Example parsimony(random=out, iters=500).\n";
helpString += "The default value for random is "" (meaning you want to use the trees in your inputfile, randomtree=out means you just want the random distribution of trees outputted to out.rd_parsimony),\n";
helpString += "and iters is 1000. The parsimony command output two files: .parsimony and .psummary their descriptions are in the manual.\n";
- helpString += "Note: No spaces between parameter labels (i.e. random), '=' and parameters (i.e.yourOutputFilename).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. random), '=' and parameters (i.e.yourOutputFilename).\n";
return helpString;
}
catch(exception& e) {
helpString += "The metric parameter allows indicate you if would like the pearson correlation coefficient calculated. Default=True";
helpString += "Example pca(groups=yourGroups).\n";
helpString += "Example pca(groups=A-B-C).\n";
- helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n";
return helpString;
}
catch(exception& e) {
helpString += "The phylip parameter allows you to enter your distance file.";
helpString += "The metric parameter allows indicate you if would like the pearson correlation coefficient calculated. Default=True";
helpString += "Example pcoa(phylip=yourDistanceFile).\n";
- helpString += "Note: No spaces between parameter labels (i.e. phylip), '=' and parameters (i.e.yourDistanceFile).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. phylip), '=' and parameters (i.e.yourDistanceFile).\n";
return helpString;
}
catch(exception& e) {
vector<vector<double> > G = D;
//vector<vector<double> > copy_G;
- m->mothurOut("\nProcessing...\n\n");
+ m->mothurOut("\nProcessing...\n");
for(int count=0;count<2;count++){
linearCalc.recenter(offset, D, G); if (m->control_pressed) { return 0; }
helpString += "The phylo.diversity command should be in the following format: phylo.diversity(groups=yourGroups, rarefy=yourRarefy, iters=yourIters).\n";
helpString += "Example phylo.diversity(groups=A-B-C, rarefy=T, iters=500).\n";
helpString += "The phylo.diversity command output two files: .phylo.diversity and if rarefy=T, .rarefaction.\n";
- helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n";
return helpString;
}
catch(exception& e) {
helpString += "For the label parameter, levels count down from the root to keep the output similiar to mothur's other commands which report information from finer resolution to coarser resolutions.\n";
helpString += "The phylotype command should be in the following format: \n";
helpString += "phylotype(taxonomy=yourTaxonomyFile, cutoff=yourCutoff, label=yourLabels) \n";
- helpString += "Eaxample: phylotype(taxonomy=amazon.taxonomy, cutoff=5, label=1-3-5).\n\n";
+ helpString += "Eaxample: phylotype(taxonomy=amazon.taxonomy, cutoff=5, label=1-3-5).\n";
return helpString;
}
catch(exception& e) {
helpString += "Example: trim.seqs(processors=8, allfiles=T, maxambig=0, maxhomop=8, flip=T, bdiffs=1, pdiffs=2, qwindowaverage=35, qwindowsize=50, fasta=may1.v13.fasta, oligos=may1.v13.oligos, qfile=may1.v13.qual)\n";
helpString += "then, you could enter unique.seqs(fasta=current), and mothur would use the .trim.fasta file from the trim.seqs command. \n";
helpString += "then you could enter align.seqs(candidate=current, template=silva.v13.align, processors=8). , and mothur would use the .trim.unique.fasta file from the unique.seqs command. \n";
- helpString += "If no pipeline file is given then mothur will use Pat's pipeline. \n\n";
+ helpString += "If no pipeline file is given then mothur will use Pat's pipeline. \n";
helpString += "Here is a list of the commands used in Pat's pipeline.\n";
helpString += "All paralellized commands will use the processors you entered.\n";
helpString += "The sffinfo command takes your sff file and extracts the fasta and quality files.\n";
helpString += "The classify.otu command is used to get the concensus taxonomy for otu files from cluster and phylotype commands. \n";
helpString += "The phylo.diversity command run on the tree generated by clearcut with rarefy=T, iters=100. \n";
helpString += "The unifrac commands are also run on the tree generated by clearcut with random=F, distance=T. \n";
- helpString += "\n\n";
+ helpString += "\n";
return helpString;
}
catch(exception& e) {
helpString += "The pre.cluster command should be in the following format: \n";
helpString += "pre.cluster(fasta=yourFastaFile, names=yourNamesFile, diffs=yourMaxDiffs) \n";
helpString += "Example pre.cluster(fasta=amazon.fasta, diffs=2).\n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n";
return helpString;
}
catch(exception& e) {
helpString += "The default values for iters is 1000, freq is 100, and calc is rarefaction which calculates the rarefaction curve for the observed richness.\n";
validCalculator.printCalc("rarefaction");
helpString += "The label parameter is used to analyze specific labels in your input.\n";
- helpString += "Note: No spaces between parameter labels (i.e. freq), '=' and parameters (i.e.yourFreq).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. freq), '=' and parameters (i.e.yourFreq).\n";
return helpString;
}
catch(exception& e) {
helpString += validCalculator.printCalc("sharedrarefaction");
helpString += "The label parameter is used to analyze specific labels in your input.\n";
helpString += "The groups parameter allows you to specify which of the groups in your groupfile you would like analyzed. You must enter at least 2 valid groups.\n";
- helpString += "Note: No spaces between parameter labels (i.e. freq), '=' and parameters (i.e.yourFreq).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. freq), '=' and parameters (i.e.yourFreq).\n";
return helpString;
}
catch(exception& e) {
helpString += "The remove.groups command should be in the following format: remove.groups(accnos=yourAccnos, fasta=yourFasta, group=yourGroupFile).\n";
helpString += "Example remove.groups(accnos=amazon.accnos, fasta=amazon.fasta, group=amazon.groups).\n";
helpString += "or remove.groups(groups=pasture, fasta=amazon.fasta, amazon.groups).\n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n";
return helpString;
}
catch(exception& e) {
helpString += "Example remove.lineage(taxonomy=amazon.silva.taxonomy, taxon=Bacteria;Firmicutes;Bacilli;Lactobacillales;).\n";
helpString += "Note: If you are running mothur in script mode you must wrap the taxon in ' characters so mothur will ignore the ; in the taxon.\n";
helpString += "Example remove.lineage(taxonomy=amazon.silva.taxonomy, taxon='Bacteria;Firmicutes;Bacilli;Lactobacillales;').\n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n";
return helpString;
}
catch(exception& e) {
helpString += "The remove.otus command should be in the following format: remove.otus(accnos=yourAccnos, list=yourListFile, group=yourGroupFile, label=yourLabel).\n";
helpString += "Example remove.otus(accnos=amazon.accnos, list=amazon.fn.list, group=amazon.groups, label=0.03).\n";
helpString += "or remove.otus(groups=pasture, list=amazon.fn.list, amazon.groups, label=0.03).\n";
- helpString += "Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListFile).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListFile).\n";
return helpString;
}
catch(exception& e) {
helpString += "The nseqs parameter allows you to set the cutoff for an otu to be deemed rare. It is required.\n";
helpString += "The remove.rare command should be in the following format: remove.rare(shared=yourSharedFile, nseqs=yourRareCutoff).\n";
helpString += "Example remove.rare(shared=amazon.fn.shared, nseqs=2).\n";
- helpString += "Note: No spaces between parameter labels (i.e. shared), '=' and parameters (i.e.yourSharedFile).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. shared), '=' and parameters (i.e.yourSharedFile).\n";
return helpString;
}
catch(exception& e) {
helpString += "The dups parameter allows you to remove the entire line from a name file if you remove any name from the line. default=true. \n";
helpString += "The remove.seqs command should be in the following format: remove.seqs(accnos=yourAccnos, fasta=yourFasta).\n";
helpString += "Example remove.seqs(accnos=amazon.accnos, fasta=amazon.fasta).\n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n";
return helpString;
}
catch(exception& e) {
helpString += "screen.seqs(fasta=yourFastaFile, name=youNameFile, group=yourGroupFIle, start=yourStart, end=yourEnd, maxambig=yourMaxambig, \n";
helpString += "maxhomop=yourMaxhomop, minlength=youMinlength, maxlength=yourMaxlength) \n";
helpString += "Example screen.seqs(fasta=abrecovery.fasta, name=abrecovery.names, group=abrecovery.groups, start=..., end=..., maxambig=..., maxhomop=..., minlength=..., maxlength=...).\n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n";
return helpString;
}
catch(exception& e) {
helpString += "The align.check command parameters are fasta and map, both are required.\n";
helpString += "The align.check command should be in the following format: align.check(fasta=yourFasta, map=yourMap).\n";
helpString += "Example align.check(map=silva.ss.map, fasta=amazon.fasta).\n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n";
return helpString;
}
catch(exception& e) {
helpString += "The groups parameter allows you to indicate that you want representative sequences for each group specified for each OTU, group name should be separated by dashes. ex. groups=A-B-C.\n";
helpString += "The get.oturep command outputs a .fastarep and .rep.names file for each distance you specify, selecting one OTU representative for each bin.\n";
helpString += "If you provide a groupfile, then it also appends the names of the groups present in that bin.\n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n";
return helpString;
}
catch(exception& e) {
helpString += "The seq.error command reads a query alignment file and a reference alignment file and creates .....\n";
helpString += "Example seq.error(...).\n";
helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n";
- helpString += "For more details please check out the wiki http://www.mothur.org/wiki/seq.error .\n\n";
+ helpString += "For more details please check out the wiki http://www.mothur.org/wiki/seq.error .\n";
return helpString;
}
catch(exception& e) {
ofstream errorCountFile;
m->openOutputFile(errorCountFileName, errorCountFile);
outputNames.push_back(errorCountFileName); outputTypes["error.count"].push_back(errorCountFileName);
- m->mothurOut("Overall error rate:\t" + toString((double)(totalBases - totalMatches) / (double)totalBases) + "\n\n");
+ m->mothurOut("Overall error rate:\t" + toString((double)(totalBases - totalMatches) / (double)totalBases) + "\n");
m->mothurOut("Errors\tSequences\n");
errorCountFile << "Errors\tSequences\n";
for(int i=0;i<misMatchCounts.size();i++){
helpString += "The name parameter allows you to enter a name file associated with your fasta file. \n";
helpString += "The summary.seqs command should be in the following format: \n";
helpString += "summary.seqs(fasta=yourFastaFile, processors=2) \n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n";
return helpString;
}
catch(exception& e) {
helpString += "To set the tempdefault to the directory where mothur.exe is located you may enter: tempdefault=default.\n";
helpString += "The set.dir command should be in the following format: set.dir(output=yourOutputDirectory, input=yourInputDirectory, tempdefault=yourTempDefault).\n";
helpString += "Example set.outdir(output=/Users/lab/desktop/outputs, input=/Users/lab/desktop/inputs).\n";
- helpString += "Note: No spaces between parameter labels (i.e. output), '=' and parameters (i.e.yourOutputDirectory).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. output), '=' and parameters (i.e.yourOutputDirectory).\n";
return helpString;
}
catch(exception& e) {
if(option == "help") { help(); abort = true; calledHelp = true; }
else {
- //valid paramters for this command
- string Array[] = {"output","input","tempdefault","outputdir","inputdir"};
- vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
+ vector<string> myArray = setParameters();
OptionParser parser(option);
map<string, string> parameters = parser.getParameters();
helpString += "The set.logfile command parameters are name and append, name is required. Append is set to false by default.\n";
helpString += "The set.logfile command should be in the following format: set.logfile(name=yourLogFileName, append=T).\n";
helpString += "Example set.logfile(name=/Users/lab/desktop/output.txt, append=T).\n";
- helpString += "Note: No spaces between parameter labels (i.e. name), '=' and parameters (i.e.yourLogFileName).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. name), '=' and parameters (i.e.yourLogFileName).\n";
return helpString;
}
catch(exception& e) {
helpString += "The trim parameter allows you to indicate if you would like a sequences and quality scores trimmed to the clipQualLeft and clipQualRight values. Default=True. \n";
helpString += "The accnos parameter allows you to provide a accnos file containing the names of the sequences you would like extracted. You may enter multiple files by separating them by -'s. \n";
helpString += "Example sffinfo(sff=mySffFile.sff, trim=F).\n";
- helpString += "Note: No spaces between parameter labels (i.e. sff), '=' and parameters (i.e.yourSffFileName).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. sff), '=' and parameters (i.e.yourSffFileName).\n";
return helpString;
}
catch(exception& e) {
helpString += "If you want .abund and .rare files for all groups, set groups=all. \n";
helpString += "The split.abund command should be used in the following format: split.abund(fasta=yourFasta, list=yourListFile, group=yourGroupFile, label=yourLabels, cutoff=yourCutoff).\n";
helpString += "Example: split.abund(fasta=abrecovery.fasta, list=abrecovery.fn.list, group=abrecovery.groups, label=0.03, cutoff=2).\n";
- helpString += "Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListfile).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListfile).\n";
return helpString;
}
catch(exception& e) {
helpString += "If you want .fasta and .names files for all groups, set groups=all. \n";
helpString += "The split.group command should be used in the following format: split.group(fasta=yourFasta, group=yourGroupFile).\n";
helpString += "Example: split.group(fasta=abrecovery.fasta, group=abrecovery.groups).\n";
- helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n";
return helpString;
}
catch(exception& e) {
helpString += "Example sub.sample(list=abrecovery.fn.list, group=abrecovery.groups, groups=B-C, size=20).\n";
helpString += "The default value for groups is all the groups in your groupfile, and all labels in your inputfile will be used.\n";
helpString += "The sub.sample command outputs a .subsample file.\n";
- helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n";
return helpString;
}
catch(exception& e) {
helpString += "The default value calc is sobs-chao-ace-jack-shannon-npshannon-simpson\n";
helpString += "If you are running summary.single with a shared file and would like your summary results collated in one file, set groupmode=t. (Default=true).\n";
helpString += "The label parameter is used to analyze specific labels in your input.\n";
- helpString += "Note: No spaces between parameter labels (i.e. label), '=' and parameters (i.e.yourLabels).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. label), '=' and parameters (i.e.yourLabels).\n";
return helpString;
}
catch(exception& e) {
helpString += "The all parameter is used to specify if you want the estimate of all your groups together. This estimate can only be made for sharedsobs and sharedchao calculators. The default is false.\n";
helpString += "If you use sharedchao and run into memory issues, set all to false. \n";
helpString += "The groups parameter allows you to specify which of the groups in your groupfile you would like analyzed. You must enter at least 2 valid groups.\n";
- helpString += "Note: No spaces between parameter labels (i.e. label), '=' and parameters (i.e.yourLabel).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. label), '=' and parameters (i.e.yourLabel).\n";
return helpString;
}
catch(exception& e) {
helpString += validCalculator.printCalc("treegroup");
helpString += "Or the tree.shared command can be in the following format: tree.shared(phylip=yourPhylipFile).\n";
helpString += "Example tree.shared(phylip=abrecovery.dist).\n";
- helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n";
return helpString;
}
catch(exception& e) {
string helpString = "";
helpString += "The trim.flows command reads a flowgram file and creates .....\n";
helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n";
- helpString += "For more details please check out the wiki http://www.mothur.org/wiki/Trim.flows.\n\n";
+ helpString += "For more details please check out the wiki http://www.mothur.org/wiki/Trim.flows.\n";
return helpString;
}
catch(exception& e) {
helpString += "maxhomop=yourMaxhomop, minlength=youMinlength, maxlength=yourMaxlength) \n";
helpString += "Example trim.seqs(fasta=abrecovery.fasta, flip=..., oligos=..., maxambig=..., maxhomop=..., minlength=..., maxlength=...).\n";
helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n";
- helpString += "For more details please check out the wiki http://www.mothur.org/wiki/Trim.seqs .\n\n";
+ helpString += "For more details please check out the wiki http://www.mothur.org/wiki/Trim.seqs .\n";
return helpString;
}
catch(exception& e) {
if(barcodes.size() != 0){
string thisGroup = barcodeNameVector[barcodeIndex];
- if (primers.size() != 0) { if (primerNameVector[primerIndex] != "") { thisGroup += "." + primerNameVector[primerIndex]; } }
+ if (primers.size() != 0) { thisGroup += "." + primerNameVector[primerIndex]; }
outGroupsFile << currSeq.getName() << '\t' << thisGroup << endl;
helpString += "Example unifrac.unweighted(groups=A-B-C, iters=500).\n";
helpString += "The default value for groups is all the groups in your groupfile, and iters is 1000.\n";
helpString += "The unifrac.unweighted command output two files: .unweighted and .uwsummary their descriptions are in the manual.\n";
- helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n";
return helpString;
}
catch(exception& e) {
helpString += "Example unifrac.weighted(groups=A-B-C, iters=500).\n";
helpString += "The default value for groups is all the groups in your groupfile, and iters is 1000.\n";
helpString += "The unifrac.weighted command output two files: .weighted and .wsummary their descriptions are in the manual.\n";
- helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n";
return helpString;
}
catch(exception& e) {
helpString += "If you have more than 4 groups, the permute parameter will find all possible combos of 4 of your groups and create pictures for them, default=F.\n";
helpString += "The only estimators available four 4 groups are sharedsobs and sharedchao.\n";
helpString += "The venn command outputs a .svg file for each calculator you specify at each distance you choose.\n";
- helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n\n";
+ helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n";
return helpString;
}
catch(exception& e) {