]> git.donarmstrong.com Git - mothur.git/blobdiff - classifyseqscommand.h
added count file to get.groups and remove.groups. added shortcut parameter to classif...
[mothur.git] / classifyseqscommand.h
index 6d43dcb9dd2067bab91f46d42ff8afa238a4a191..6d11d9236778028e326c6f4fdd4925dd6430fd50 100644 (file)
@@ -74,7 +74,7 @@ private:
        string fastaFileName, templateFileName, countfile, distanceFileName, namefile, search, method, taxonomyFileName, outputDir, groupfile;
        int processors, kmerSize, numWanted, cutoff, iters;
        float match, misMatch, gapOpen, gapExtend;
-       bool abort, probs, save, flip, hasName, hasCount;
+       bool abort, probs, save, flip, hasName, hasCount, writeShortcuts;
        
        int driver(linePair*, string, string, string, string);
        int createProcesses(string, string, string, string); 
@@ -100,10 +100,10 @@ struct classifyData {
        MothurOut* m;
        float match, misMatch, gapOpen, gapExtend;
        int count, kmerSize, threadID, cutoff, iters, numWanted;
-       bool probs, flip;
+       bool probs, flip, writeShortcuts;
         
        classifyData(){}
-       classifyData(string acc, bool p, string me, string te, string tx, string a, string r, string f, string se, int ks, int i, int numW, MothurOut* mout, unsigned long long st, unsigned long long en, float ma, float misMa, float gapO, float gapE, int cut, int tid, bool fli) {
+       classifyData(string acc, bool p, string me, string te, string tx, string a, string r, string f, string se, int ks, int i, int numW, MothurOut* mout, unsigned long long st, unsigned long long en, float ma, float misMa, float gapO, float gapE, int cut, int tid, bool fli, bool wsh) {
                accnos = acc;
                taxonomyFileName = tx;
                templateFileName = te;
@@ -127,6 +127,7 @@ struct classifyData {
                probs = p;
                count = 0;
                flip = fli;
+        writeShortcuts = wsh;
        }
 };
 
@@ -163,12 +164,12 @@ static DWORD WINAPI MyClassThreadFunction(LPVOID lpParam){
                
                //make classify
                Classify* myclassify;
-               if(pDataArray->method == "bayesian"){   myclassify = new Bayesian(pDataArray->taxonomyFileName, pDataArray->templateFileName, pDataArray->search, pDataArray->kmerSize, pDataArray->cutoff, pDataArray->iters, pDataArray->threadID, pDataArray->flip);         }
+               if(pDataArray->method == "bayesian"){   myclassify = new Bayesian(pDataArray->taxonomyFileName, pDataArray->templateFileName, pDataArray->search, pDataArray->kmerSize, pDataArray->cutoff, pDataArray->iters, pDataArray->threadID, pDataArray->flip, pDataArray->writeShortcuts);             }
                else if(pDataArray->method == "knn"){   myclassify = new Knn(pDataArray->taxonomyFileName, pDataArray->templateFileName, pDataArray->search, pDataArray->kmerSize, pDataArray->gapOpen, pDataArray->gapExtend, pDataArray->match, pDataArray->misMatch, pDataArray->numWanted, pDataArray->threadID);                           }
                else {
                        pDataArray->m->mothurOut(pDataArray->search + " is not a valid method option. I will run the command using bayesian.");
                        pDataArray->m->mothurOutEndLine();
-                       myclassify = new Bayesian(pDataArray->taxonomyFileName, pDataArray->templateFileName, pDataArray->search, pDataArray->kmerSize, pDataArray->cutoff, pDataArray->iters, pDataArray->threadID, pDataArray->flip); 
+                       myclassify = new Bayesian(pDataArray->taxonomyFileName, pDataArray->templateFileName, pDataArray->search, pDataArray->kmerSize, pDataArray->cutoff, pDataArray->iters, pDataArray->threadID, pDataArray->flip, pDataArray->writeShortcuts);     
                }
                
                if (pDataArray->m->control_pressed) { delete myclassify; return 0; }