]> git.donarmstrong.com Git - mothur.git/blob - helpcommand.cpp
This contains Pat's bug fixes and updates. It represents mothur v.1.3.0
[mothur.git] / helpcommand.cpp
1 /*
2  *  helpcommand.cpp
3  *  Dotur
4  *
5  *  Created by Sarah Westcott on 1/2/09.
6  *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
7  *
8  */
9
10 #include "helpcommand.h"
11
12 //**********************************************************************************************************************
13
14 HelpCommand::HelpCommand(){
15         globaldata = GlobalData::getInstance();
16         validCommands = new ValidCommands();
17         validCalcs = new ValidCalculators();
18 }
19
20 //**********************************************************************************************************************
21
22 HelpCommand::~HelpCommand(){}
23
24 //**********************************************************************************************************************
25
26 int HelpCommand::execute(){
27
28         if (globaldata->helpRequest == "read.dist") {
29                 cout << "The read.dist command parameter options are phylip or column, group, name, cutoff and precision" << "\n";
30                 cout << "The read.dist command must be run before using the cluster or libshuff commands" << "\n";
31                 cout << "The read.dist command can be used in two ways.  The first is to read a phylip or column and run the cluster command" << "\n";
32                 cout << "For this use the read.dist command should be in the following format: " << "\n";
33                 cout << "read.dist(phylip=yourDistFile, name=yourNameFile, cutoff=yourCutoff, precision=yourPrecision) " << "\n";
34                 cout << "The phylip or column parameter is required, but only one may be used.  If you use a column file the name filename is required. " << "\n";
35                 cout << "If you do not provide a cutoff value 10.00 is assumed. If you do not provide a precision value then 100 is assumed." << "\n";
36                 cout << "The second way to use the read.dist command is to read a phylip or column and a group, so you can use the libshuff command." << "\n";
37                 cout << "For this use the read.dist command should be in the following format: " << "\n";
38                 cout << "read.dist(phylip=yourPhylipfile, group=yourGroupFile). The cutoff and precision parameters are not valid with this use.  " << "\n";
39                 cout << "Note: No spaces between parameter labels (i.e. phylip), '=' and parameters (i.e.yourPhylipfile)." << "\n" << "\n";
40         }else if (globaldata->helpRequest == "read.otu") {
41                 cout << "The read.otu command must be run before you execute a collect.single, rarefaction.single, summary.single, " << "\n";
42                 cout << "collect.shared, rarefaction.shared or summary.shared command.   Mothur will generate a .list, .rabund and .sabund upon completion of the cluster command " << "\n";
43                 cout << "or you may use your own. The read.otu command parameter options are list, rabund, sabund, shared, group, order, line and label." << "\n";
44                 cout << "The read.otu command can be used in two ways.  The first is to read a list, rabund or sabund and run the collect.single, rarefaction.single or summary.single." << "\n";
45                 cout << "For this use the read.otu command should be in the following format: read.otu(list=yourListFile, order=yourOrderFile, label=yourLabels)." << "\n";
46                 cout << "The list, rabund or sabund parameter is required, but you may only use one of them." << "\n";
47                 cout << "The line and label parameters are optional but you may not use both the line and label parameters at the same time." << "\n";
48                 cout << "The label and line parameters are used to read specific lines in your input." << "\n";
49                 cout << "The second way to use the read.otu command is to read a list and a group, or a shared so you can use the collect.shared, rarefaction.shared or summary.shared commands." << "\n";
50                 cout << "In this case the read.otu command should be in the following format: read.otu(list=yourListFile, group=yourGroupFile, line=yourLines) or read.otu(shared=yourSharedFile).  " << "\n";
51                 cout << "The list parameter and group paramaters or the shared paremeter is required. When using the command the second way with a list and group file read.otu command parses the .list file" << "\n";
52                 cout << "and separates it into groups.  It outputs a .shared file containing the OTU information for each group. The read.otu command also outputs a .list file for each group. " << "\n";
53                 cout << "Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListfile)." << "\n" << "\n";
54         }else if (globaldata->helpRequest == "read.tree") {
55                 cout << "The read.tree command must be run before you execute a unifrac.weighted, unifrac.unweighted. " << "\n";
56                 cout << "It also must be run before using the parsimony command, unless you are using the randomtree parameter." << "\n";
57                 cout << "The read.tree command should be in the following format: read.tree(tree=yourTreeFile, group=yourGroupFile)." << "\n";
58                 cout << "The tree and group parameters are both required." << "\n";
59                 cout << "Note: No spaces between parameter labels (i.e. tree), '=' and parameters (i.e.yourTreefile)." << "\n" << "\n";
60         }else if (globaldata->helpRequest == "cluster") {
61                 cout << "The cluster command can only be executed after a successful read.dist command." << "\n";
62                 cout << "The cluster command parameter options are method, cuttoff and precision. No parameters are required." << "\n";
63                 cout << "The cluster command should be in the following format: " << "\n";
64                 cout << "cluster(method=yourMethod, cutoff=yourCutoff, precision=yourPrecision) " << "\n";
65                 cout << "The acceptable cluster methods are furthest, nearest and average.  If no method is provided then furthest is assumed." << "\n" << "\n";
66         }else if (globaldata->helpRequest == "deconvolute") {
67                 cout << "The deconvolute command reads a fastafile and creates a namesfile." << "\n";
68                 cout << "It creates a file where the first column is the groupname and the second column is a list of sequence names who have the same sequence. " << "\n";
69                 cout << "If the sequence is unique the second column will just contain its name. " << "\n";
70                 cout << "The deconvolute command parameter is fasta and it is required." << "\n";
71                 cout << "The deconvolute command should be in the following format: " << "\n";
72                 cout << "deconvolute(fasta=yourFastaFile) " << "\n";
73         }else if (globaldata->helpRequest == "dist.seqs") {
74                 cout << "The dist.seqs command reads a file containing sequences and creates a distance file." << "\n";
75                 cout << "The dist.seqs command parameters are fasta, phylip, clustal, nexus, calc, countends, cutoff and processors.  " << "\n";
76                 cout << "You must use one of the following parameters for your filename: fasta, phylip, clustal or nexus. " << "\n";
77                 cout << "The calc parameter allows you to specify the method of calculating the distances.  Your options are: nogaps, onegap or eachgap. The default is onegap." << "\n";
78                 cout << "The countends parameter allows you to specify whether to include terminal gaps in distance.  Your options are: T or F. The default is T." << "\n";
79                 cout << "The cutoff parameter allows you to specify maximum distance to keep. The default is 1.0." << "\n";
80                 cout << "The processors parameter allows you to specify number of processors to use.  The default is 1, but you can use up to 4 processors." << "\n";
81                 cout << "The dist.seqs command should be in the following format: " << "\n";
82                 cout << "dist.seqs(fasta=yourFastaFile, calc=yourCalc, countends=yourEnds, cutoff= yourCutOff, processors=yourProcessors) " << "\n";
83                 cout << "Example dist.seqs(fasta=amazon.fasta, calc=eachgap, countends=F, cutoff= 2.0, processors=3)." << "\n";
84                 cout << "Note: No spaces between parameter labels (i.e. calc), '=' and parameters (i.e.yourCalc)." << "\n" << "\n";
85         }else if (globaldata->helpRequest == "align.seqs") {
86                 cout << "The align.seqs command reads a file containing sequences and creates an alignment file and a report file." << "\n";
87                 cout << "The align.seqs command parameters are fasta, candidate, search, ksize, align, match, mismatch, gapopen and gapextend.  " << "\n";
88                 cout << "The template parameter is also required." << "\n";
89                 cout << "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";
90                 cout << "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";
91                 cout << "The ksize parameter allows you to specify the kmer size for finding most similar template to candidate.  The default is 7." << "\n";
92                 cout << "The match parameter allows you to specify the bonus for having the same base. The default is 1.0." << "\n";
93                 cout << "The mistmatch parameter allows you to specify the penalty for having different bases.  The default is -1.0." << "\n";
94                 cout << "The gapopen parameter allows you to specify the penalty for opening a gap in an alignment. The default is -1.0." << "\n";
95                 cout << "The gapextend parameter allows you to specify the penalty for extending a gap in an alignment.  The default is -2.0." << "\n";
96                 cout << "The align.seqs command should be in the following format: " << "\n";
97                 cout << "align.seqs(fasta=yourTemplateFile, candidate=yourCandidateFile, align=yourAlignmentMethod, search=yourSearchmethod, ksize=yourKmerSize, match=yourMatchBonus, mismatch=yourMismatchpenalty, gapopen=yourGapopenPenalty, gapextend=yourGapExtendPenalty) " << "\n";
98                 cout << "Example align.seqs(candidate=candidate.fasta, fasta=core.filtered, align=kmer, search=gotoh, ksize=8, match=2.0, mismatch=3.0, gapopen=-2.0, gapextend=-1.0)" << "\n";
99                 cout << "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile)." << "\n" << "\n";
100         }else if (globaldata->helpRequest == "collect.single") {
101                 cout << "The collect.single command can only be executed after a successful read.otu command. WITH ONE EXECEPTION. " << "\n";
102                 cout << "The collect.single command can be executed after a successful cluster command.  It will use the .list file from the output of the cluster." << "\n";
103                 cout << "The collect.single command parameters are label, line, freq, calc and abund.  No parameters are required, but you may not use " << "\n";
104                 cout << "both the line and label parameters at the same time. The collect.single command should be in the following format: " << "\n";
105                 cout << "collect.single(label=yourLabel, line=yourLines, iters=yourIters, freq=yourFreq, calc=yourEstimators)." << "\n";
106                 cout << "Example collect(label=unique-.01-.03, line=0-5-10, iters=10000, freq=10, calc=sobs-chao-ace-jack)." << "\n";
107                 cout << "The default values for freq is 100, and calc are sobs-chao-ace-jack-shannon-npshannon-simpson." << "\n";
108                 validCalcs->printCalc("single", cout);
109                 cout << "The label and line parameters are used to analyze specific lines in your input." << "\n";
110                 cout << "Note: No spaces between parameter labels (i.e. freq), '=' and parameters (i.e.yourFreq)." << "\n" << "\n";
111         }else if (globaldata->helpRequest == "collect.shared") {
112                 cout << "The collect.shared command can only be executed after a successful read.otu command." << "\n";
113                 cout << "The collect.shared command parameters are label, line, freq, calc and groups.  No parameters are required, but you may not use " << "\n";
114                 cout << "both the line and label parameters at the same time. The collect.shared command should be in the following format: " << "\n";
115                 cout << "collect.shared(label=yourLabel, line=yourLines, freq=yourFreq, calc=yourEstimators, groups=yourGroups)." << "\n";
116                 cout << "Example collect.shared(label=unique-.01-.03, line=0-5-10, freq=10, groups=B-C, calc=sharedchao-sharedace-jabund-sorensonabund-jclass-sorclass-jest-sorest-thetayc-thetan)." << "\n";
117                 cout << "The default values for freq is 100 and calc are sharedsobs-sharedchao-sharedace-jabund-sorensonabund-jclass-sorclass-jest-sorest-thetayc-thetan." << "\n";
118                 cout << "The default value for groups is all the groups in your groupfile." << "\n";
119                 validCalcs->printCalc("shared", cout);
120                 cout << "The label and line parameters are used to analyze specific lines in your input." << "\n";
121                 cout << "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";
122                 cout << "Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListfile)." << "\n" << "\n";
123         }else if (globaldata->helpRequest == "get.group") {
124                 cout << "The get.group command can only be executed after a successful read.otu command of a group file." << "\n";
125                 cout << "You may not use any parameters with the get.group command." << "\n";
126                 cout << "The get.group command should be in the following format: " << "\n";
127                 cout << "get.group()" << "\n";
128                 cout << "Example get.group()." << "\n";
129         }else if (globaldata->helpRequest == "get.label") {
130                 cout << "The get.label command can only be executed after a successful read.otu command." << "\n";
131                 cout << "You may not use any parameters with the get.label command." << "\n";
132                 cout << "The get.label command should be in the following format: " << "\n";
133                 cout << "get.label()" << "\n";
134                 cout << "Example get.label()." << "\n";
135         }else if (globaldata->helpRequest == "get.line") {
136                 cout << "The get.line command can only be executed after a successful read.otu command." << "\n";
137                 cout << "You may not use any parameters with the get.line command." << "\n";
138                 cout << "The get.line command should be in the following format: " << "\n";
139                 cout << "get.line()" << "\n";
140                 cout << "Example get.line()." << "\n";
141         }else if (globaldata->helpRequest == "rarefaction.single") {
142                 cout << "The rarefaction.single command can only be executed after a successful read.otu WTIH ONE EXECEPTION." << "\n";
143                 cout << "The rarefaction.single command can be executed after a successful cluster command.  It will use the .list file from the output of the cluster." << "\n";
144                 cout << "The rarefaction.single command parameters are label, line, iters, freq, calc and abund.  No parameters are required, but you may not use " << "\n";
145                 cout << "both the line and label parameters at the same time. The rarefaction.single command should be in the following format: " << "\n";
146                 cout << "rarefaction.single(label=yourLabel, line=yourLines, iters=yourIters, freq=yourFreq, calc=yourEstimators)." << "\n";
147                 cout << "Example rarefaction.single(label=unique-.01-.03, line=0-5-10, iters=10000, freq=10, calc=sobs-rchao-race-rjack-rbootstrap-rshannon-rnpshannon-rsimpson)." << "\n";
148                 cout << "The default values for iters is 1000, freq is 100, and calc is rarefaction which calculates the rarefaction curve for the observed richness." << "\n";
149                 validCalcs->printCalc("rarefaction", cout);
150                 cout << "The label and line parameters are used to analyze specific lines in your input." << "\n";
151                 cout << "Note: No spaces between parameter labels (i.e. freq), '=' and parameters (i.e.yourFreq)." << "\n" << "\n";
152         }else if (globaldata->helpRequest == "rarefaction.shared") {
153                 cout << "The rarefaction.shared command can only be executed after a successful read.otu command." << "\n";
154                 cout << "The rarefaction.shared command parameters are label, line, iters, jumble, groups and calc.  No parameters are required, but you may not use " << "\n";
155                 cout << "both the line and label parameters at the same time. The rarefaction command should be in the following format: " << "\n";
156                 cout << "rarefaction.shared(label=yourLabel, line=yourLines, iters=yourIters, jumble=yourJumble, calc=yourEstimators, groups=yourGroups)." << "\n";
157                 cout << "Example rarefaction.shared(label=unique-.01-.03, line=0-5-10, iters=10000, jumble=1, groups=B-C, calc=sharedobserved)." << "\n";
158                 cout << "The default values for iters is 1000, jumble is 1 (meaning jumble, if it’s set to 0 then it will not jumble), freq is 100, and calc is sharedobserved which calculates the shared rarefaction curve for the observed richness." << "\n";
159                 cout << "The default value for groups is all the groups in your groupfile." << "\n";
160                 validCalcs->printCalc("sharedrarefaction", cout);
161                 cout << "The label and line parameters are used to analyze specific lines in your input." << "\n";
162                 cout << "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";
163                 cout << "Note: No spaces between parameter labels (i.e. freq), '=' and parameters (i.e.yourFreq)." << "\n" << "\n";
164         }else if (globaldata->helpRequest == "summary.single") { 
165                 cout << "The summary.single command can only be executed after a successful read.otu WTIH ONE EXECEPTION." << "\n";
166                 cout << "The summary.single command can be executed after a successful cluster command.  It will use the .list file from the output of the cluster." << "\n";
167                 cout << "The summary.single command parameters are label, line, calc, abund.  No parameters are required, but you may not use " << "\n";
168                 cout << "both the line and label parameters at the same time. The summary.single command should be in the following format: " << "\n";
169                 cout << "summary.single(label=yourLabel, line=yourLines, calc=yourEstimators)." << "\n";
170                 cout << "Example summary.single(label=unique-.01-.03, line=0,5,10, calc=sobs-chao-ace-jack-bootstrap-shannon-npshannon-simpson)." << "\n";
171                 validCalcs->printCalc("summary", cout);
172                 cout << "The default value calc is sobs-chao-ace-jack-shannon-npshannon-simpson" << "\n";
173                 cout << "The label and line parameters are used to analyze specific lines in your input." << "\n";
174                 cout << "Note: No spaces between parameter labels (i.e. line), '=' and parameters (i.e.yourLines)." << "\n" << "\n";
175         }else if (globaldata->helpRequest == "summary.shared") { 
176                 cout << "The summary.shared command can only be executed after a successful read.otu command." << "\n";
177                 cout << "The summary.shared command parameters are label, line and calc.  No parameters are required, but you may not use " << "\n";
178                 cout << "both the line and label parameters at the same time. The summary.shared command should be in the following format: " << "\n";
179                 cout << "summary.shared(label=yourLabel, line=yourLines, calc=yourEstimators, groups=yourGroups)." << "\n";
180                 cout << "Example summary.shared(label=unique-.01-.03, line=0,5,10, groups=B-C, calc=sharedchao-sharedace-jabund-sorensonabund-jclass-sorclass-jest-sorest-thetayc-thetan)." << "\n";
181                 validCalcs->printCalc("sharedsummary", cout);
182                 cout << "The default value for calc is sharedsobs-sharedchao-sharedace-jabund-sorensonabund-jclass-sorclass-jest-sorest-thetayc-thetan" << "\n";
183                 cout << "The default value for groups is all the groups in your groupfile." << "\n";
184                 cout << "The label and line parameters are used to analyze specific lines in your input." << "\n";
185                 cout << "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";
186                 cout << "Note: No spaces between parameter labels (i.e. line), '=' and parameters (i.e.yourLines)." << "\n" << "\n";
187         }else if (globaldata->helpRequest == "parsimony") { 
188                 cout << "The parsimony command can only be executed after a successful read.tree command, unless you use the random parameter." << "\n";
189                 cout << "The parsimony command parameters are random, groups and iters.  No parameters are required." << "\n";
190                 cout << "The groups parameter allows you to specify which of the groups in your groupfile you would like analyzed.  You must enter at least 1 valid group." << "\n";
191                 cout << "The group names are separated by dashes.  The iters parameter allows you to specify how many random trees you would like compared to your tree." << "\n";
192                 cout << "The parsimony command should be in the following format: parsimony(random=yourOutputFilename, groups=yourGroups, iters=yourIters)." << "\n";
193                 cout << "Example parsimony(random=out, iters=500)." << "\n";
194                 cout << "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";
195                 cout << "and iters is 1000.  The parsimony command output two files: .parsimony and .psummary their descriptions are in the manual." << "\n";
196                 cout << "Note: No spaces between parameter labels (i.e. random), '=' and parameters (i.e.yourOutputFilename)." << "\n" << "\n";
197         }else if (globaldata->helpRequest == "unifrac.weighted") { 
198                 cout << "The unifrac.weighted command can only be executed after a successful read.tree command." << "\n";
199                 cout << "The unifrac.weighted command parameters are groups and iters.  No parameters are required." << "\n";
200                 cout << "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";
201                 cout << "The group names are separated by dashes.  The iters parameter allows you to specify how many random trees you would like compared to your tree." << "\n";
202                 cout << "The unifrac.weighted command should be in the following format: unifrac.weighted(groups=yourGroups, iters=yourIters)." << "\n";
203                 cout << "Example unifrac.weighted(groups=A-B-C, iters=500)." << "\n";
204                 cout << "The default value for groups is all the groups in your groupfile, and iters is 1000." << "\n";
205                 cout << "The unifrac.weighted command output two files: .weighted and .wsummary their descriptions are in the manual." << "\n";
206                 cout << "Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListfile)." << "\n" << "\n";
207         }else if (globaldata->helpRequest == "unifrac.unweighted") { 
208                 cout << "The unifrac.unweighted command can only be executed after a successful read.tree command." << "\n";
209                 cout << "The unifrac.unweighted command parameters are groups and iters.  No parameters are required." << "\n";
210                 cout << "The groups parameter allows you to specify which of the groups in your groupfile you would like analyzed.  You must enter at least 1 valid group." << "\n";
211                 cout << "The group names are separated by dashes.  The iters parameter allows you to specify how many random trees you would like compared to your tree." << "\n";
212                 cout << "The unifrac.unweighted command should be in the following format: unifrac.unweighted(groups=yourGroups, iters=yourIters)." << "\n";
213                 cout << "Example unifrac.unweighted(groups=A-B-C, iters=500)." << "\n";
214                 cout << "The default value for groups is all the groups in your groupfile, and iters is 1000." << "\n";
215                 cout << "The unifrac.unweighted command output two files: .unweighted and .uwsummary their descriptions are in the manual." << "\n";
216                 cout << "Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListfile)." << "\n" << "\n";
217         }else if (globaldata->helpRequest == "libshuff") { 
218                 cout << "The libshuff command can only be executed after a successful read.dist command." << "\n";
219                 cout << "The libshuff command parameters are groups, iters, step, form and cutoff.  No parameters are required." << "\n";
220                 cout << "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";
221                 cout << "The group names are separated by dashes.  The iters parameter allows you to specify how many random matrices you would like compared to your matrix." << "\n";
222                 cout << "The step parameter allows you to specify change in distance you would like between each output if you are using the discrete form." << "\n";
223                 cout << "The form parameter allows you to specify if you would like to analyze your matrix using the discrete or integral form. Your options are integral or discrete." << "\n";
224                 cout << "The libshuff command should be in the following format: libshuff(groups=yourGroups, iters=yourIters, cutOff=yourCutOff, form=yourForm, step=yourStep)." << "\n";
225                 cout << "Example libshuff(groups=A-B-C, iters=500, form=discrete, step=0.01, cutOff=2.0)." << "\n";
226                 cout << "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";
227                 cout << "The libshuff command output two files: .coverage and .slsummary their descriptions are in the manual." << "\n";
228                 cout << "Note: No spaces between parameter labels (i.e. iters), '=' and parameters (i.e.yourIters)." << "\n" << "\n";
229         }else if (globaldata->helpRequest == "heatmap") { 
230                 cout << "The heatmap command can only be executed after a successful read.otu command." << "\n";
231                 cout << "The heatmap command parameters are groups, sorted, scale, line and label.  No parameters are required, but you may not use line and label at the same time." << "\n";
232                 cout << "The groups parameter allows you to specify which of the groups in your groupfile you would like included in your heatmap." << "\n";
233                 cout << "The sorted parameter allows you to choose to see the file with the shared otus at the top or the otus in the order they appear in your input file. " << "\n";
234                 cout << "The scale parameter allows you to choose the range of color your bin information will be displayed with." << "\n";
235                 cout << "The group names are separated by dashes. The line and label allow you to select what distance levels you would like a heatmap created for, and are also separated by dashes." << "\n";
236                 cout << "The heatmap command should be in the following format: heatmap(groups=yourGroups, sorted=yourSorted, line=yourLines, label=yourLabels)." << "\n";
237                 cout << "Example heatmap(groups=A-B-C, line=1-3-5, sorted=F, scale=log10)." << "\n";
238                 cout << "The default value for groups is all the groups in your groupfile, and all lines in your inputfile will be used." << "\n";
239                 cout << "The default value for sorted is T meaning you want the shared otus on top, you may change it to F meaning the exact representation of your input file." << "\n";
240                 cout << "The default value for scale is log10; your other options are log2 and linear." << "\n";
241                 cout << "The heatmap command outputs a .svg file for each line or label you specify." << "\n";
242                 cout << "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups)." << "\n" << "\n";
243         }else if (globaldata->helpRequest == "venn") { 
244                 cout << "The venn command can only be executed after a successful read.otu command." << "\n";
245                 cout << "The venn command parameters are groups, calc, line and label.  No parameters are required, but you may not use line and label at the same time." << "\n";
246                 cout << "The groups parameter allows you to specify which of the groups in your groupfile you would like included in your venn diagram, you may only use a maximum of 4 groups." << "\n";
247                 cout << "The group names are separated by dashes. The line and label allow you to select what distance levels you would like a venn diagram created for, and are also separated by dashes." << "\n";
248                 cout << "The venn command should be in the following format: venn(groups=yourGroups, calc=yourCalcs, line=yourLines, label=yourLabels)." << "\n";
249                 cout << "Example venn(groups=A-B-C, line=1-3-5, calc=sharedsobs-sharedchao)." << "\n";
250                 cout << "The default value for groups is all the groups in your groupfile up to 4, and all lines in your inputfile will be used." << "\n";
251                 cout << "The default value for calc is sobs if you have only read a list file or if you have selected only one group, and sharedsobs if you have multiple groups." << "\n";
252                 cout << "The default available estimators for calc are sobs, chao and ace if you have only read a list file, and sharedsobs, sharedchao and sharedace if you have read a list and group file or a shared file." << "\n";
253                 cout << "The only estmiator available four 4 groups is sharedsobs." << "\n";
254                 cout << "The venn command outputs a .svg file for each calculator you specify at each distance you choose." << "\n";
255                 cout << "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups)." << "\n" << "\n";
256         }else if (globaldata->helpRequest == "tree.shared") { 
257                 cout << "The tree.shared command can only be executed after a successful read.otu command." << "\n";
258                 cout << "The tree.shared command parameters are groups, calc, line and label.  The calc parameter is required, and you may not use line and label at the same time." << "\n";
259                 cout << "The groups parameter allows you to specify which of the groups in your groupfile you would like included used." << "\n";
260                 cout << "The group names are separated by dashes. The line and label allow you to select what distance levels you would like trees created for, and are also separated by dashes." << "\n";
261                 cout << "The tree.shared command should be in the following format: tree.shared(groups=yourGroups, calc=yourCalcs, line=yourLines, label=yourLabels)." << "\n";
262                 cout << "Example tree.shared(groups=A-B-C, line=1-3-5, calc=jabund-sorabund)." << "\n";
263                 cout << "The default value for groups is all the groups in your groupfile." << "\n";
264                 cout << "There is no default value for calc." << "\n";
265                 validCalcs->printCalc("treegroup", cout);
266                 cout << "The tree.shared command outputs a .tre file for each calculator you specify at each distance you choose." << "\n";
267                 cout << "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups)." << "\n" << "\n";
268         }else if (globaldata->helpRequest == "dist.shared") { 
269                 cout << "The dist.shared command can only be executed after a successful read.otu command." << "\n";
270                 cout << "The dist.shared command parameters are groups, calc, line and label.  The calc parameter is required, and you may not use line and label at the same time." << "\n";
271                 cout << "The groups parameter allows you to specify which of the groups in your groupfile you would like included used." << "\n";
272                 cout << "The group names are separated by dashes. The line and label allow you to select what distance levels you would like distance matrices created for, and are also separated by dashes." << "\n";
273                 cout << "The dist.shared command should be in the following format: dist.shared(groups=yourGroups, calc=yourCalcs, line=yourLines, label=yourLabels)." << "\n";
274                 cout << "Example dist.shared(groups=A-B-C, line=1-3-5, calc=jabund-sorabund)." << "\n";
275                 cout << "The default value for groups is all the groups in your groupfile." << "\n";
276                 cout << "The default value for calc is jclass and thetayc." << "\n";
277                 validCalcs->printCalc("matrix", cout);
278                 cout << "The dist.shared command outputs a .dist file for each calculator you specify at each distance you choose." << "\n";
279                 cout << "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups)." << "\n" << "\n";
280         }else if (globaldata->helpRequest == "bootstrap.shared") { 
281                 cout << "The bootstrap.shared command can only be executed after a successful read.otu command." << "\n";
282                 cout << "The bootstrap.shared command parameters are groups, calc, iters, line and label.  The calc parameter is required, and you may not use line and label at the same time." << "\n";
283                 cout << "The groups parameter allows you to specify which of the groups in your groupfile you would like included used." << "\n";
284                 cout << "The group names are separated by dashes. The line and label allow you to select what distance levels you would like trees created for, and are also separated by dashes." << "\n";
285                 cout << "The bootstrap.shared command should be in the following format: bootstrap.shared(groups=yourGroups, calc=yourCalcs, line=yourLines, label=yourLabels, iters=yourIters)." << "\n";
286                 cout << "Example bootstrap.shared(groups=A-B-C, line=1-3-5, calc=jabund-sorabund, iters=100)." << "\n";
287                 cout << "The default value for groups is all the groups in your groupfile." << "\n";
288                 cout << "There is no default value for calc. The default for iters is 1000." << "\n";
289                 validCalcs->printCalc("boot", cout);
290                 cout << "The bootstrap.shared command outputs a .tre file for each calculator you specify at each distance you choose containing iters number of trees." << "\n";
291                 cout << "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups)." << "\n" << "\n";
292         }else if (globaldata->helpRequest == "concensus") { 
293                 cout << "The concensus command can only be executed after a successful read.tree command." << "\n";
294                 cout << "The concensus command has no parameters." << "\n";
295                 cout << "The concensus command should be in the following format: concensus()." << "\n";
296                 cout << "The concensus command output two files: .concensus.tre and .concensuspairs." << "\n";
297                 cout << "The .concensus.tre file contains the concensus tree of the trees in your input file." << "\n";
298                 cout << "The branch lengths are the percentage of trees in your input file that had the given pair." << "\n";
299                 cout << "The .concensuspairs file contains a list of the internal nodes in your tree.  For each node, the pair that was used in the concensus tree " << "\n";
300                 cout << "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";
301         }else if (globaldata->helpRequest == "bin.seqs") { 
302                 cout << "The bin.seqs command can only be executed after a successful read.otu command of a list file." << "\n";
303                 cout << "The bin.seqs command parameters are fasta, name, line, label and group.  The fasta parameter is required, and you may not use line and label at the same time." << "\n";
304                 cout << "The line and label allow you to select what distance levels you would like a output files created for, and are separated by dashes." << "\n";
305                 cout << "The bin.seqs command should be in the following format: bin.seqs(fasta=yourFastaFile, name=yourNamesFile, group=yourGroupFile, line=yourLines, label=yourLabels)." << "\n";
306                 cout << "Example bin.seqs(fasta=amazon.fasta, group=amazon.groups, line=1-3-5, name=amazon.names)." << "\n";
307                 cout << "The default value for line and label are all lines in your inputfile." << "\n";
308                 cout << "The bin.seqs command outputs a .fasta file for each distance you specify appending the OTU number to each name." << "\n";
309                 cout << "If you provide a groupfile, then it also appends the sequences group to the name." << "\n";
310                 cout << "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile)." << "\n" << "\n";
311         }else if (globaldata->helpRequest == "get.oturep") { 
312                 cout << "The get.oturep command can only be executed after a successful read.dist command." << "\n";
313                 cout << "The get.oturep command parameters are list, fasta, name, group, line and label.  The fasta and list parameters are required, and you may not use line and label at the same time." << "\n";
314                 cout << "The line and label allow you to select what distance levels you would like a output files created for, and are separated by dashes." << "\n";
315                 cout << "The get.oturep command should be in the following format: get.oturep(fasta=yourFastaFile, list=yourListFile, name=yourNamesFile, group=yourGroupFile, line=yourLines, label=yourLabels)." << "\n";
316                 cout << "Example get.oturep(fasta=amazon.fasta, list=amazon.fn.list, group=amazon.groups, line=1-3-5, name=amazon.names)." << "\n";
317                 cout << "The default value for line and label are all lines in your inputfile." << "\n";
318                 cout << "The get.oturep command outputs a .fastarep file for each distance you specify, selecting one OTU representative for each bin." << "\n";
319                 cout << "If you provide a groupfile, then it also appends the names of the groups present in that bin." << "\n";
320                 cout << "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile)." << "\n" << "\n";
321         }else if (globaldata->helpRequest == "quit") {
322                 cout << "The quit command will terminate mothur and should be in the following format: " << "\n";
323                 cout << "quit()" << "\n" << "\n";
324         }else if (globaldata->helpRequest == "") {
325                 validCommands->printCommands(cout);
326                 cout << "For more information about a specific command type 'help(commandName)' i.e. 'help(read.dist)'" << endl;
327         }else {
328                 cout << globaldata->helpRequest << " is not a valid command" << endl;
329         }
330         
331         cout << endl << "For further assistance please refer to the Mothur manual on our wiki at http://schloss.micro.umass.edu/mothur/, or contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
332         return 0;
333 }
334
335 //**********************************************************************************************************************/