]> git.donarmstrong.com Git - mothur.git/blobdiff - readdistcommand.cpp
changed confidence scores calculation in bayesian
[mothur.git] / readdistcommand.cpp
index bcecb7844e8a0348180884fbdb54993c286c53ac..414f33087738ba355ad5ff51c2e89349d41b21f9 100644 (file)
@@ -22,7 +22,7 @@ ReadDistCommand::ReadDistCommand(string option) {
                
                else {
                        //valid paramters for this command
-                       string Array[] =  {"phylip", "column", "name", "cutoff", "precision", "group","outputdir","inputdir","sim"};
+                       string Array[] =  {"phylip", "column", "name", "cutoff","hard", "precision", "group","outputdir","inputdir","sim"};
                        vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
                        
                        OptionParser parser(option);
@@ -126,9 +126,12 @@ ReadDistCommand::ReadDistCommand(string option) {
                        sim = isTrue(temp); 
                        globaldata->sim = sim;
                        
+                       temp = validParameter.validFile(parameters, "hard", false);                     if (temp == "not found") { temp = "F"; }
+                       hard = isTrue(temp);
+                       
                        temp = validParameter.validFile(parameters, "cutoff", false);                   if (temp == "not found") { temp = "10"; }
                        convert(temp, cutoff); 
-                       cutoff += (5 / (precision * 10.0));
+                       if (!hard) {  cutoff += (5 / (precision * 10.0));  }
                        
                        if (abort == false) {
                                distFileName = globaldata->inputFileName;
@@ -175,7 +178,7 @@ void ReadDistCommand::help(){
                m->mothurOut("For this use the read.dist command should be in the following format: \n");
                m->mothurOut("read.dist(phylip=yourDistFile, name=yourNameFile, cutoff=yourCutoff, precision=yourPrecision) \n");
                m->mothurOut("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");
-               m->mothurOut("The sim parameter is used to indicate that your distance file contains similiarity values instead of distance values. The default is false, if sim=true then mothur will convert the similairity values to distances. \n");
+               m->mothurOut("The sim parameter is used to indicate that your distance file contains similarity values instead of distance values. The default is false, if sim=true then mothur will convert the similarity values to distances. \n");
                m->mothurOut("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");
                m->mothurOut("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");
                m->mothurOut("For this use the read.dist command should be in the following format: \n");