]> git.donarmstrong.com Git - mothur.git/blobdiff - clustersplitcommand.cpp
added otu.association command. added calcSpearman, calcKendall and calcPearson functi...
[mothur.git] / clustersplitcommand.cpp
index e9b3077d18eb969114aebe881520760fb71e1d77..34caf654124886f9cd23638a149b2b3487ca53e2 100644 (file)
@@ -201,7 +201,7 @@ ClusterSplitCommand::ClusterSplitCommand(string option)  {
                        else { distfile = fastafile;  splitmethod = "fasta";  m->setFastaFile(fastafile); }
                        
                        taxFile = validParameter.validFile(parameters, "taxonomy", true);
-                       if (taxFile == "not open") { abort = true; }    
+                       if (taxFile == "not open") { taxFile = ""; abort = true; }      
                        else if (taxFile == "not found") { taxFile = ""; }
                        else {  m->setTaxonomyFile(taxFile); }
                        
@@ -264,7 +264,7 @@ ClusterSplitCommand::ClusterSplitCommand(string option)  {
                        if (temp == "not found") { temp = "100"; }
                        //saves precision legnth for formatting below
                        length = temp.length();
-                       convert(temp, precision); 
+                       m->mothurConvert(temp, precision); 
                        
                        temp = validParameter.validFile(parameters, "hard", false);                     if (temp == "not found") { temp = "T"; }
                        hard = m->isTrue(temp);
@@ -274,7 +274,7 @@ ClusterSplitCommand::ClusterSplitCommand(string option)  {
                        
                        temp = validParameter.validFile(parameters, "processors", false);       if (temp == "not found"){       temp = m->getProcessors();      }
                        m->setProcessors(temp);
-                       convert(temp, processors);
+                       m->mothurConvert(temp, processors);
                        
                        temp = validParameter.validFile(parameters, "splitmethod", false);      
                        if (splitmethod != "fasta") {
@@ -283,11 +283,11 @@ ClusterSplitCommand::ClusterSplitCommand(string option)  {
                        }
                        
                        temp = validParameter.validFile(parameters, "cutoff", false);           if (temp == "not found")  { temp = "0.25"; }
-                       convert(temp, cutoff); 
+                       m->mothurConvert(temp, cutoff); 
                        cutoff += (5 / (precision * 10.0));  
                        
                        temp = validParameter.validFile(parameters, "taxlevel", false);         if (temp == "not found")  { temp = "3"; }
-                       convert(temp, taxLevelCutoff); 
+                       m->mothurConvert(temp, taxLevelCutoff); 
                        
                        method = validParameter.validFile(parameters, "method", false);         if (method == "not found") { method = "average"; }
                        
@@ -564,14 +564,14 @@ int ClusterSplitCommand::execute(){
                                        listFileNames = cluster(distName, labels); //clusters individual files and returns names of list files
                                }else{
                                        
-                                       cout << processors << '\t' << distName.size() << endl;
+                                       //cout << processors << '\t' << distName.size() << endl;
                                        vector < vector < map<string, string> > > dividedNames; //distNames[1] = vector of filenames for process 1...
                                        dividedNames.resize(processors);
                                        
                                        //for each file group figure out which process will complete it
                                        //want to divide the load intelligently so the big files are spread between processes
                                        for (int i = 0; i < distName.size(); i++) { 
-                                               cout << i << endl;
+                                               //cout << i << endl;
                                                int processToAssign = (i+1) % processors; 
                                                if (processToAssign == 0) { processToAssign = processors; }
                                                
@@ -580,7 +580,7 @@ int ClusterSplitCommand::execute(){
                                        
                                        //not lets reverse the order of ever other process, so we balance big files running with little ones
                                        for (int i = 0; i < processors; i++) {
-                                               cout << i << endl;
+                                               //cout << i << endl;
                                                int remainder = ((i+1) % processors);
                                                if (remainder) {  reverse(dividedNames[i].begin(), dividedNames[i].end());  }
                                        }