]> git.donarmstrong.com Git - mothur.git/blobdiff - helpcommand.cpp
libshuff and updated help to include libshuff and modifications to read.dist.
[mothur.git] / helpcommand.cpp
index f1cf89367b2c62dfead85d70547cfb94a53c50db..e04f63606f05626ceaa7d2e8600dae669c15b845 100644 (file)
 
 //**********************************************************************************************************************
 
-HelpCommand::HelpCommand(){}
+HelpCommand::HelpCommand(){
+       globaldata = GlobalData::getInstance();
+       validCommands = new ValidCommands();
+}
 
 //**********************************************************************************************************************
 
@@ -21,132 +24,180 @@ HelpCommand::~HelpCommand(){}
 
 int HelpCommand::execute(){
 
-       globaldata = GlobalData::getInstance();
-       
-       if (globaldata->helpRequest == "read.phylip") {
-               cout << "The read.phylip command parameter options are distfile, namefile, cutoff and precision" << "\n";
-               cout << "The read.phylip command should be in the following format: " << "\n";
-               cout << "read.phylip(distfile=yourDistFile, namefile=yourNameFile, cutoff=yourCutoff, precision=yourPrecision) " << "\n";
-               cout << "The distfile parameter is required.  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";
-               cout << "Note: No spaces between parameter labels (i.e. distfile), '=' and parameters (i.e.yourDistfile)." << "\n" << "\n";
-       }else if (globaldata->helpRequest == "read.column") {
-               cout << "The read.column command parameter options are distfile, namefile, cutoff and precision" << "\n";
-               cout << "The read.column command should be in the following format: " << "\n";
-               cout << "read.column(distfile=yourDistFile, namefile=yourNameFile, cutoff=yourCutoff, precision=yourPrecision) " << "\n";
-               cout << "The distfile and namefile parameters are required.  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";
-               cout << "Note: No spaces between parameter labels (i.e. distfile), '=' and parameters (i.e.yourDistfile)." << "\n" << "\n";
-       }else if (globaldata->helpRequest == "read.list") {
-               cout << "The read.list command parameter options are listfile and orderfile." << "\n";
-               cout << "The read.list command should be in the following format: " << "\n";
-               cout << "read.list(listfile=yourListFile, orderfile=yourOrderFile) " << "\n";
-               cout << "The listfile parameter is required." << "\n";
-               cout << "Note: No spaces between parameter labels (i.e. listfile), '=' and parameters (i.e.yourListfile)." << "\n" << "\n";
-       }else if (globaldata->helpRequest == "read.rabund") {
-               cout << "The read.rabund command parameter options are rabundfile and orderfile." << "\n";
-               cout << "The read.rabund command should be in the following format: " << "\n";
-               cout << "read.rabund(rabundfile=yourRAbundFile, orderfile=yourOrderFile) " << "\n";
-               cout << "The rabundfile parameter is required." << "\n";
-               cout << "Note: No spaces between parameter labels (i.e. rabundfile), '=' and parameters (i.e.yourRAbundfile)." << "\n" << "\n";
-       }else if (globaldata->helpRequest == "read.sabund") {
-               cout << "The read.sabund command parameter options are sabundfile and orderfile." << "\n";
-               cout << "The read.sabund command should be in the following format: " << "\n";
-               cout << "read.sabund(sabundfile=yourSAbundFile, orderfile=yourOrderFile) " << "\n";
-               cout << "The sabundfile parameter is required." << "\n";
-               cout << "Note: No spaces between parameter labels (i.e. sabundfile), '=' and parameters (i.e.yourSAbundfile)." << "\n" << "\n";
-       }else if (globaldata->helpRequest == "read.shared") {
-               cout << "The read.shared command parameter options are listfile and groupfile." << "\n";
-               cout << "The read.shared command should be in the following format: " << "\n";
-               cout << "read.shared(listfile=yourListFile, groupfile=yourGroupFile) " << "\n";
-               cout << "The listfile parameter and groupfile paramaters are required." << "\n";
-               cout << "Note: No spaces between parameter labels (i.e. listfile), '=' and parameters (i.e.yourListfile)." << "\n" << "\n";
+       if (globaldata->helpRequest == "read.dist") {
+               cout << "The read.dist command parameter options are phylip or column, group, name, cutoff and precision" << "\n";
+               cout << "The read.dist command must be run before using the cluster or libshuff commands" << "\n";
+               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";
+               cout << "For this use the read.dist command should be in the following format: " << "\n";
+               cout << "read.dist(phylip=yourDistFile, name=yourNameFile, cutoff=yourCutoff, precision=yourPrecision) " << "\n";
+               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";
+               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";
+               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";
+               cout << "For this use the read.dist command should be in the following format: " << "\n";
+               cout << "read.dist(phylip=yourPhylipfile, group=yourGroupFile). The cutoff and precision parameters are not valid with this use.  " << "\n";
+               cout << "Note: No spaces between parameter labels (i.e. phylip), '=' and parameters (i.e.yourPhylipfile)." << "\n" << "\n";
+       }else if (globaldata->helpRequest == "read.otu") {
+               cout << "The read.otu command must be run before you execute a collect.single, rarefaction.single, summary.single, " << "\n";
+               cout << "collect.shared, rarefaction.shared or summary.shared command.   Mothur will generate a .list, .rabund and .sabund upon completion of the cluster command " << "\n";
+               cout << "or you may use your own. The read.otu command parameter options are list, rabund, sabund, group, order, line and label." << "\n";
+               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";
+               cout << "For this use the read.otu command should be in the following format: read.otu(list=yourListFile, order=yourOrderFile, label=yourLabels)." << "\n";
+               cout << "The list, rabund or sabund parameter is required, but you may only use one of them." << "\n";
+               cout << "The line and label parameters are optional but you may not use both the line and label parameters at the same time." << "\n";
+               cout << "The label and line parameters are used to read specific lines in your input." << "\n";
+               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";
+               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";
+               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";
+               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";
+               cout << "Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListfile)." << "\n" << "\n";
+       }else if (globaldata->helpRequest == "read.tree") {
+               cout << "The read.tree command must be run before you execute a unifrac.weighted, unifrac.unweighted. " << "\n";
+               cout << "It also must be run before using the parsimony command, unless you are using the randomtree parameter." << "\n";
+               cout << "The read.tree command should be in the following format: read.tree(tree=yourTreeFile, group=yourGroupFile)." << "\n";
+               cout << "The tree and group parameters are both required." << "\n";
+               cout << "Note: No spaces between parameter labels (i.e. tree), '=' and parameters (i.e.yourTreefile)." << "\n" << "\n";
        }else if (globaldata->helpRequest == "cluster") {
-               cout << "The cluster command can only be executed after a successful read.phylip or read.column command." << "\n";
+               cout << "The cluster command can only be executed after a successful read.dist command." << "\n";
                cout << "The cluster command parameter options are method, cuttoff and precision. No parameters are required." << "\n";
                cout << "The cluster command should be in the following format: " << "\n";
                cout << "cluster(method=yourMethod, cutoff=yourCutoff, precision=yourPrecision) " << "\n";
                cout << "The acceptable cluster methods are furthest, nearest and average.  If no method is provided then furthest is assumed." << "\n" << "\n";
+       }else if (globaldata->helpRequest == "deconvolute") {
+               cout << "The deconvolute command reads a fastafile and creates a namesfile." << "\n";
+               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";
+               cout << "If the sequence is unique the second column will just contain its name. " << "\n";
+               cout << "The deconvolute command parameter is fasta and it is required." << "\n";
+               cout << "The deconvolute command should be in the following format: " << "\n";
+               cout << "deconvolute(fasta=yourFastaFile) " << "\n";
        }else if (globaldata->helpRequest == "collect.single") {
-               cout << "The collect.single command can only be executed after a successful read.list read.rabund or rad.sabund command. WITH ONE EXECEPTION. " << "\n";
+               cout << "The collect.single command can only be executed after a successful read.otu command. WITH ONE EXECEPTION. " << "\n";
                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";
-               cout << "The collect.single command parameters are label, line, freq, single.  No parameters are required, but you may not use " << "\n";
+               cout << "The collect.single command parameters are label, line, freq, calc.  No parameters are required, but you may not use " << "\n";
                cout << "both the line and label parameters at the same time. The collect.single command should be in the following format: " << "\n";
-               cout << "collect.single(label=yourLabel, line=yourLines, iters=yourIters, freq=yourFreq, single=yourEstimators)." << "\n";
-               cout << "Example collect(label=unique-.01-.03, line=0,5,10, iters=10000, freq=10, single=collect-chao-ace-jack)." << "\n";
-               cout << "The default values for freq is 100, and single are sobs-chao-ace-jack-bootstrap-shannon-npshannon-simpson." << "\n";
+               cout << "collect.single(label=yourLabel, line=yourLines, iters=yourIters, freq=yourFreq, calc=yourEstimators)." << "\n";
+               cout << "Example collect(label=unique-.01-.03, line=0,5,10, iters=10000, freq=10, calc=sobs-chao-ace-jack)." << "\n";
+               cout << "The default values for freq is 100, and calc are sobs-chao-ace-jack-bootstrap-shannon-npshannon-simpson." << "\n";
                cout << "The label and line parameters are used to analyze specific lines in your input." << "\n";
-               cout << "Note: No spaces between parameter labels (i.e. listfile), '=' and parameters (i.e.yourListfile)." << "\n" << "\n";
+               cout << "Note: No spaces between parameter labels (i.e. freq), '=' and parameters (i.e.yourFreq)." << "\n" << "\n";
        }else if (globaldata->helpRequest == "collect.shared") {
-               cout << "The collect.shared command can only be executed after a successful read.shared command." << "\n";
-               cout << "The collect.shared command parameters are label, line, freq, jumble, shared.  No parameters are required, but you may not use " << "\n";
+               cout << "The collect.shared command can only be executed after a successful read.otu command." << "\n";
+               cout << "The collect.shared command parameters are label, line, freq, jumble, calc.  No parameters are required, but you may not use " << "\n";
                cout << "both the line and label parameters at the same time. The collect.shared command should be in the following format: " << "\n";
-               cout << "collect.shared(label=yourLabel, line=yourLines, freq=yourFreq, jumble=yourJumble, shared=yourEstimators)." << "\n";
-               cout << "Example collect.shared(label=unique-.01-.03, line=0,5,10, freq=10, jumble=1, shared=sharedChao-sharedAce-sharedJabund-sharedSorensonAbund-sharedJclass-sharedSorClass-sharedJest-sharedSorEst-SharedThetaYC-SharedThetaN)." << "\n";
-               cout << "The default values for jumble is 0 (meaning don’t jumble, if it’s set to 1 then it will jumble), freq is 100 and shared are sharedChao-sharedAce-sharedJabund-sharedSorensonAbund-sharedJclass-sharedSorClass-sharedJest-sharedSorEst-SharedThetaYC-SharedThetaN." << "\n";
+               cout << "collect.shared(label=yourLabel, line=yourLines, freq=yourFreq, jumble=yourJumble, calc=yourEstimators)." << "\n";
+               cout << "Example collect.shared(label=unique-.01-.03, line=0,5,10, freq=10, jumble=1, calc=sharedChao-sharedAce-sharedJabund-sharedSorensonAbund-sharedJclass-sharedSorClass-sharedJest-sharedSorEst-SharedThetaYC-SharedThetaN)." << "\n";
+               cout << "The default values for jumble is 1 (meaning jumble, if it’s set to 0 then it will not jumble), freq is 100 and calc are sharedsobs-sharedChao-sharedAce-sharedJabund-sharedSorensonAbund-sharedJclass-sharedSorClass-sharedJest-sharedSorEst-SharedThetaYC-SharedThetaN." << "\n";
                cout << "The label and line parameters are used to analyze specific lines in your input." << "\n";
-               cout << "Note: No spaces between parameter labels (i.e. listfile), '=' and parameters (i.e.yourListfile)." << "\n" << "\n";
+               cout << "Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListfile)." << "\n" << "\n";
+       }else if (globaldata->helpRequest == "get.group") {
+               cout << "The get.group command can only be executed after a successful read.otu command of a group file." << "\n";
+               cout << "You may not use any parameters with the get.group command." << "\n";
+               cout << "The get.group command should be in the following format: " << "\n";
+               cout << "get.group()" << "\n";
+               cout << "Example get.group()." << "\n";
+       }else if (globaldata->helpRequest == "get.label") {
+               cout << "The get.label command can only be executed after a successful read.otu command." << "\n";
+               cout << "You may not use any parameters with the get.label command." << "\n";
+               cout << "The get.label command should be in the following format: " << "\n";
+               cout << "get.label()" << "\n";
+               cout << "Example get.label()." << "\n";
+       }else if (globaldata->helpRequest == "get.line") {
+               cout << "The get.line command can only be executed after a successful read.otu command." << "\n";
+               cout << "You may not use any parameters with the get.line command." << "\n";
+               cout << "The get.line command should be in the following format: " << "\n";
+               cout << "get.line()" << "\n";
+               cout << "Example get.line()." << "\n";
+               cout << "Note: No spaces between parameter labels (i.e. freq), '=' and parameters (i.e.yourFreq)." << "\n" << "\n";
        }else if (globaldata->helpRequest == "rarefaction.single") {
-               cout << "The rarefaction.single command can only be executed after a successful read.list, read.rabund or read.sabund. WTIH ONE EXECEPTION." << "\n";
+               cout << "The rarefaction.single command can only be executed after a successful read.otu WTIH ONE EXECEPTION." << "\n";
                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";
-               cout << "The rarefaction.single command parameters are label, line, iters, freq, rarefaction.  No parameters are required, but you may not use " << "\n";
+               cout << "The rarefaction.single command parameters are label, line, iters, freq, calc.  No parameters are required, but you may not use " << "\n";
                cout << "both the line and label parameters at the same time. The rarefaction.single command should be in the following format: " << "\n";
-               cout << "rarefaction.single(label=yourLabel, line=yourLines, iters=yourIters, freq=yourFreq, rarefaction=yourEstimators)." << "\n";
-               cout << "Example rarefaction.single(label=unique-.01-.03, line=0,5,10, iters=10000, freq=10, rarefaction=rarefaction-rchao-race-rjack-rbootstrap-rshannon-rnpshannon-rsimpson)." << "\n";
-               cout << "The default values for iters is 1000, freq is 100, and rarefaction is rarefaction which calculates the rarefaction curve for the observed richness." << "\n";
+               cout << "rarefaction.single(label=yourLabel, line=yourLines, iters=yourIters, freq=yourFreq, calc=yourEstimators)." << "\n";
+               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";
+               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";
                cout << "The label and line parameters are used to analyze specific lines in your input." << "\n";
-               cout << "Note: No spaces between parameter labels (i.e. listfile), '=' and parameters (i.e.yourListfile)." << "\n" << "\n";
+               cout << "Note: No spaces between parameter labels (i.e. freq), '=' and parameters (i.e.yourFreq)." << "\n" << "\n";
        }else if (globaldata->helpRequest == "rarefaction.shared") {
-               cout << "The rarefaction.shared command can only be executed after a successful read.shared command." << "\n";
-               cout << "The rarefaction.shared command parameters are label, line, iters, jumble and sharedrarefaction.  No parameters are required, but you may not use " << "\n";
+               cout << "The rarefaction.shared command can only be executed after a successful read.otu command." << "\n";
+               cout << "The rarefaction.shared command parameters are label, line, iters, jumble and calc.  No parameters are required, but you may not use " << "\n";
                cout << "both the line and label parameters at the same time. The rarefaction command should be in the following format: " << "\n";
-               cout << "rarefaction.shared(label=yourLabel, line=yourLines, iters=yourIters, jumble=yourJumble, sharedrarefaction=yourEstimators)." << "\n";
-               cout << "Example rarefaction.shared(label=unique-.01-.03, line=0,5,10, iters=10000, jumble=1, sharedrarefaction=sharedobserved)." << "\n";
-               cout << "The default values for iters is 1000, jumble is 0 (meaning don’t jumble, if it’s set to 1 then it will jumble), freq is 100, and sharedrarefaction is sharedobserved which calculates the shared rarefaction curve for the observed richness." << "\n";
+               cout << "rarefaction.shared(label=yourLabel, line=yourLines, iters=yourIters, jumble=yourJumble, calc=yourEstimators)." << "\n";
+               cout << "Example rarefaction.shared(label=unique-.01-.03, line=0,5,10, iters=10000, jumble=1, calc=sharedobserved)." << "\n";
+               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";
                cout << "The label and line parameters are used to analyze specific lines in your input." << "\n";
-               cout << "Note: No spaces between parameter labels (i.e. listfile), '=' and parameters (i.e.yourListfile)." << "\n" << "\n";
+               cout << "Note: No spaces between parameter labels (i.e. freq), '=' and parameters (i.e.yourFreq)." << "\n" << "\n";
        }else if (globaldata->helpRequest == "summary.single") { 
-               cout << "The summary.single command can only be executed after a successful read.list, read.rabund or read.sabund. WTIH ONE EXECEPTION." << "\n";
+               cout << "The summary.single command can only be executed after a successful read.otu WTIH ONE EXECEPTION." << "\n";
                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";
-               cout << "The summary.single command parameters are label, line, summary.  No parameters are required, but you may not use " << "\n";
+               cout << "The summary.single command parameters are label, line, calc.  No parameters are required, but you may not use " << "\n";
                cout << "both the line and label parameters at the same time. The summary.single command should be in the following format: " << "\n";
-               cout << "summary.single(label=yourLabel, line=yourLines, summary=yourEstimators)." << "\n";
-               cout << "Example summary.single(label=unique-.01-.03, line=0,5,10, summary=sobs-chao-ace-jack-bootstrap-shannon-npshannon-simpson)." << "\n";
-               cout << "The default value summary is sobs-chao-ace-jack-bootstrap-shannon-npshannon-simpson" << "\n";
+               cout << "summary.single(label=yourLabel, line=yourLines, calc=yourEstimators)." << "\n";
+               cout << "Example summary.single(label=unique-.01-.03, line=0,5,10, calc=sobs-chao-ace-jack-bootstrap-shannon-npshannon-simpson)." << "\n";
+               cout << "The default value calc is sobs-chao-ace-jack-bootstrap-shannon-npshannon-simpson" << "\n";
                cout << "The label and line parameters are used to analyze specific lines in your input." << "\n";
-               cout << "Note: No spaces between parameter labels (i.e. listfile), '=' and parameters (i.e.yourListfile)." << "\n" << "\n";
+               cout << "Note: No spaces between parameter labels (i.e. line), '=' and parameters (i.e.yourLines)." << "\n" << "\n";
        }else if (globaldata->helpRequest == "summary.shared") { 
-               cout << "The summary.shared command can only be executed after a successful read.shared command." << "\n";
-               cout << "The summary.shared command parameters are label, line, jumble and sharedsummary.  No parameters are required, but you may not use " << "\n";
+               cout << "The summary.shared command can only be executed after a successful read.otu command." << "\n";
+               cout << "The summary.shared command parameters are label, line, jumble and calc.  No parameters are required, but you may not use " << "\n";
                cout << "both the line and label parameters at the same time. The summary.shared command should be in the following format: " << "\n";
-               cout << "summary.shared(label=yourLabel, line=yourLines, jumble=yourJumble, sharedsummary=yourEstimators)." << "\n";
-               cout << "Example summary.shared(label=unique-.01-.03, line=0,5,10, jumble=1, sharedsummary=sharedChao-sharedAce-sharedJabund-sharedSorensonAbund-sharedJclass-sharedSorClass-sharedJest-sharedSorEst-SharedThetaYC-SharedThetaN)." << "\n";
-               cout << "The default value for jumble is 0 (meaning don’t jumble, if it’s set to 1 then it will jumble) and sharedsummary is sharedChao-sharedAce-sharedJabund-sharedSorensonAbund-sharedJclass-sharedSorClass-sharedJest-sharedSorEst-SharedThetaYC-SharedThetaN" << "\n";
+               cout << "summary.shared(label=yourLabel, line=yourLines, jumble=yourJumble, calc=yourEstimators)." << "\n";
+               cout << "Example summary.shared(label=unique-.01-.03, line=0,5,10, jumble=1, calc=sharedChao-sharedAce-sharedJabund-sharedSorensonAbund-sharedJclass-sharedSorClass-sharedJest-sharedSorEst-SharedThetaYC-SharedThetaN)." << "\n";
+               cout << "The default value for jumble is 1 (meaning jumble, if it’s set to 0 then it will not jumble) and calc is sharedsobs-sharedChao-sharedAce-sharedJabund-sharedSorensonAbund-sharedJclass-sharedSorClass-sharedJest-sharedSorEst-SharedThetaYC-SharedThetaN" << "\n";
                cout << "The label and line parameters are used to analyze specific lines in your input." << "\n";
-               cout << "Note: No spaces between parameter labels (i.e. listfile), '=' and parameters (i.e.yourListfile)." << "\n" << "\n";
-       }else if (globaldata->helpRequest == "shared") { 
-               cout << "The shared command can only be executed after a successful read.shared command." << "\n";
-               cout << "The shared command parses a list file and separates it into groups." << "\n";
-               cout << "It outputs a shared file containing the otu information for each group.  There are no shared command parameters." << "\n";
-               cout << "The shared command should be in the following format: shared()." << "\n";
-               cout << "Example shared()." << "\n";
-       }else if (globaldata->helpRequest == "parselist") { 
-               cout << "The parselist command parses a list file and separates it into groups." << "\n";
-               cout << "It outputs a list file for each group." << "\n";
-               cout << "The parselist command parameter options are listfile and groupfile." << "\n";
-               cout << "The parselist command should be in the following format: " << "\n";
-               cout << "parselist(listfile=yourListFile, groupfile=yourGroupFile) " << "\n";
-               cout << "The listfile parameter and groupfile paramater are required." << "\n";
-               cout << "Note: No spaces between parameter labels (i.e. listfile), '=' and parameters (i.e.yourListfile)." << "\n" << "\n";
+               cout << "Note: No spaces between parameter labels (i.e. line), '=' and parameters (i.e.yourLines)." << "\n" << "\n";
+       }else if (globaldata->helpRequest == "parsimony") { 
+               cout << "The parsimony command can only be executed after a successful read.tree command, unless you use the random parameter." << "\n";
+               cout << "The parsimony command parameters are random, groups and iters.  No parameters are required." << "\n";
+               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";
+               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";
+               cout << "The parsimony command should be in the following format: parsimony(random=yourOutputFilename, groups=yourGroups, iters=yourIters)." << "\n";
+               cout << "Example parsimony(random=out, iters=500)." << "\n";
+               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";
+               cout << "and iters is 1000.  The parsimony command output two files: .parsimony and .psummary their descriptions are in the manual." << "\n";
+               cout << "Note: No spaces between parameter labels (i.e. random), '=' and parameters (i.e.yourOutputFilename)." << "\n" << "\n";
+       }else if (globaldata->helpRequest == "unifrac.weighted") { 
+               cout << "The unifrac.weighted command can only be executed after a successful read.tree command." << "\n";
+               cout << "The unifrac.weighted command parameters are groups and iters.  No parameters are required." << "\n";
+               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";
+               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";
+               cout << "The unifrac.weighted command should be in the following format: unifrac.weighted(groups=yourGroups, iters=yourIters)." << "\n";
+               cout << "Example unifrac.weighted(groups=A-B-C, iters=500)." << "\n";
+               cout << "The default value for groups is all the groups in your groupfile, and iters is 1000." << "\n";
+               cout << "The unifrac.weighted command output two files: .weighted and .wsummary their descriptions are in the manual." << "\n";
+               cout << "Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListfile)." << "\n" << "\n";
+       }else if (globaldata->helpRequest == "unifrac.unweighted") { 
+               cout << "The unifrac.unweighted command can only be executed after a successful read.tree command." << "\n";
+               cout << "The unifrac.unweighted command parameters are groups and iters.  No parameters are required." << "\n";
+               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";
+               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";
+               cout << "The unifrac.unweighted command should be in the following format: unifrac.unweighted(groups=yourGroups, iters=yourIters)." << "\n";
+               cout << "Example unifrac.unweighted(groups=A-B-C, iters=500)." << "\n";
+               cout << "The default value for groups is all the groups in your groupfile, and iters is 1000." << "\n";
+               cout << "The unifrac.unweighted command output two files: .unweighted and .uwsummary their descriptions are in the manual." << "\n";
+               cout << "Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListfile)." << "\n" << "\n";
+       }else if (globaldata->helpRequest == "libshuff") { 
+               cout << "The libshuff command can only be executed after a successful read.dist command." << "\n";
+               cout << "The libshuff command parameters are groups, iters, step, form and cutoff.  No parameters are required." << "\n";
+               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";
+               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";
+               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";
+               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";
+               cout << "The libshuff command should be in the following format: libshuff(groups=yourGroups, iters=yourIters, cutOff=yourCutOff, form=yourForm, step=yourStep)." << "\n";
+               cout << "Example libshuff(groups=A-B-C, iters=500, form=discrete, step=0.01, cutOff=2.0)." << "\n";
+               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";
+               cout << "The libshuff command output two files: .coverage and .slsummary their descriptions are in the manual." << "\n";
+               cout << "Note: No spaces between parameter labels (i.e. iters), '=' and parameters (i.e.yourIters)." << "\n" << "\n";
        }else if (globaldata->helpRequest == "quit") {
                cout << "The quit command will terminate Dotur and should be in the following format: " << "\n";
                cout << "quit()" << "\n" << "\n";
        }else if (globaldata->helpRequest == "") {
-               cout << "Valid commands are read.phylip(), read.column(), read.list(), read.rabund(), read.sabund(), cluster(), collect.single(), rarefaction.single(), summary.single(), collect.shared(), rarefaction.shared(), summary.shared(), shared(), pareselist(), quit(), help()." << "\n";
-               cout << "For more information about a specific command type 'help(commandName)' i.e. 'help(read.phylip)'" << endl;
+               validCommands->printCommands(cout);
+               cout << "For more information about a specific command type 'help(commandName)' i.e. 'help(read.dist)'" << endl;
        }else {
-               cout << "not a valid command" << endl;
+               cout << globaldata->helpRequest << " is not a valid command" << endl;
        }
        
-       cout << endl << "For further assistance please refer to the Mothur manual, or contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+       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";
        return 0;
 }