]> git.donarmstrong.com Git - mothur.git/blobdiff - chimeraslayer.h
modified chimera.slayer template=self
[mothur.git] / chimeraslayer.h
index fbe880fde4ed0723dff1e3ec8e982942360e993a..cac96eb158a721ac5fe3d5c68a82d61979fd99e8 100644 (file)
 #include "maligner.h"
 #include "slayer.h"
 
-
-
 //***********************************************************************/
 //This class was modeled after the chimeraSlayer written by the Broad Institute
 /***********************************************************************/
 
-
 class ChimeraSlayer : public Chimera {
        
        public:
-               ChimeraSlayer(string, string, string, int, int, int, int, float, int, int, int, int, int, int, int, int, bool);
-               ChimeraSlayer(string, string, string, string, string, int, int, int, int, float, int, int, int, int, int, int, int, int, bool);
+               ChimeraSlayer(string, string, bool, string, int, int, int, int, float, int, int, int, int, int, int, int, int, bool);
+               ChimeraSlayer(string, string, bool, string, string, int, int, int, int, float, int, int, int, int, int, int, int, int, bool);
 
                ~ChimeraSlayer();
                
                int getChimeras(Sequence*);
-               int print(ostream&, ostream&);
+               Sequence* print(ostream&, ostream&);
+               Sequence* print(ostream&, ostream&, data_results, data_results);
                void printHeader(ostream&);
                int doPrep();
+               data_results getResults() { return printResults; }
                
                #ifdef USE_MPI
-               int print(MPI_File&, MPI_File&);
+               Sequence* print(MPI_File&, MPI_File&);
+               Sequence* print(MPI_File&, MPI_File&, data_results, data_results);
                #endif
                
        private:
                Sequence* querySeq;
+               Sequence trimQuery;
                DeCalculator* decalc;
                map<int, int>  spotMap;
                Database* databaseRight;
                Database* databaseLeft;
-               map<string, vector<string> > nameMapRank;  //sequence name to rank so you can construct a template of the abundant sequences if the user uses itself as template
+               vector<Sequence*> userTemplate;  //when template=self, the query file is sorted from most abundance to least abundant
+                                                                                //userTemplate grows as the query file is processed by adding sequences that are not chimeric
+               set<string> namesOfChimericSeqs; //only used when template=self
                
                vector<data_struct>  chimeraResults;
-               string chimeraFlags, searchMethod, fastafile, includeAbunds;
-               bool realign;
+               data_results printResults;
+               string chimeraFlags, searchMethod, fastafile;
+               bool realign, trimChimera;
                int window, numWanted, kmerSize, match, misMatch, minSim, minCov, minBS, minSNP, parents, iters, increment;
                float divR;
        
                void printBlock(data_struct, string, ostream&);
+               void printBlock(data_results, data_results, bool, bool, string, ostream&);
                string getBlock(data_struct, string);
-               int readNameFile(string);
-               vector<Sequence*> getTemplate(Sequence*);
+               string getBlock(data_results, data_results, bool, bool, string);
+               //int readNameFile(string);
+               int getTemplate(Sequence*);
                
 };