]> git.donarmstrong.com Git - mothur.git/blobdiff - helpcommand.cpp
updated errorchecking so it checks if the parameter is valid for the command.
[mothur.git] / helpcommand.cpp
index 206df13651075afac626139b30a917e1ae43562a..a0b35d0a34f8ffda7be2c25df53307622fddb65b 100644 (file)
@@ -25,24 +25,29 @@ HelpCommand::~HelpCommand(){}
 int HelpCommand::execute(){
 
        if (globaldata->helpRequest == "read.dist") {
-               cout << "The read.dist command parameter options are phylip or column, name, cutoff and precision" << "\n";
-               cout << "The read.dist command should be in the following format: " << "\n";
+               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 << "Note: No spaces between parameter labels (i.e. dist), '=' and parameters (i.e.yourDistfile)." << "\n" << "\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 << "or you may use your own. The read.otu command parameter options are list, rabund, sabund, shared, 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 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).  " << "\n";
-               cout << "The list parameter and group paramaters are required. When using the command the second way read.otu command parses the .list file" << "\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") {
@@ -51,11 +56,6 @@ int HelpCommand::execute(){
                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 == "read.shared") {
-               cout << "The read.shared must be run before you execute a collect.shared, rarefaction.shared or summary.shared command." << "\n";
-               cout << "The read.shared command is used to read a shared file. The read.shared should be entered in the following format:" << "\n";
-               cout << "read.shared(shared=yourSharedFile). The shared parameter is required." << "\n";
-               cout << "Note: No spaces between parameter labels (i.e. shared), '=' and parameters (i.e.yourSharedfile)." << "\n" << "\n";
        }else if (globaldata->helpRequest == "cluster") {
                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";
@@ -106,7 +106,6 @@ int HelpCommand::execute(){
                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.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";
@@ -153,7 +152,7 @@ int HelpCommand::execute(){
                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 three files: .parsimony, .psummary and .pdistrib, their descriptions are in the manual." << "\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";
@@ -163,7 +162,7 @@ int HelpCommand::execute(){
                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 three files: .weighted, .wsummary and .wdistrib, their descriptions are in the manual." << "\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";
@@ -173,8 +172,20 @@ int HelpCommand::execute(){
                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 three files: .unweighted, .uwsummary and .uwdistrib, their descriptions are in the manual." << "\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";