]> git.donarmstrong.com Git - mothur.git/blobdiff - chimeracheckrdp.h
added out.hierarchy command
[mothur.git] / chimeracheckrdp.h
index e31cae7672ef016839e7eb736a5ac0bd1cde65a8..e885af5d171d24acd230748ff6a5783aa9952a5b 100644 (file)
@@ -14,8 +14,9 @@
 #include "chimera.h"
 #include "kmer.hpp"
 #include "kmerdb.hpp"
-#include "database.hpp"
+#include "alignmentdb.h"
 
+/***********************************************************/
 //This class was created using the algorythms described in 
 //CHIMERA_CHECK version 2.7 written by Niels Larsen. 
 
@@ -27,7 +28,7 @@ class ChimeraCheckRDP : public Chimera {
                ChimeraCheckRDP(string, string);        
                ~ChimeraCheckRDP();
                
-               void getChimeras();
+               int getChimeras();
                void print(ostream&);
                
                void setCons(string){};
@@ -38,31 +39,28 @@ class ChimeraCheckRDP : public Chimera {
                
                vector<linePair*> lines;
                vector<Sequence*> querySeqs;
-               Database* templateDB;
+               AlignmentDB* templateDB;
                Kmer* kmer;
                
                vector< vector<sim> > IS;  //IS[0] is the vector of IS values for each window for querySeqs[0]
+               float chimeraCutoff;
+               
                
-               //map of vector of maps- I know its a little convaluted but I am trying to save time 
-               //I think that since the window is only sliding 10 bases there is a good probability that the closest seq to each fragment
-               //will be the same for several windows so I want to save the vector of maps containing its kmer info rather than regenerating it.
-               //So...
-               map<string, vector< map<int, int> > > seqKmerInfo;  // outer map - sequence name -> kmer info 
-                                                                                                                       // kmer info: inner vector of maps - each entry in the vector is a map of the kmers up to that spot in the unaligned seq
-                                                                                                                       //example:  seqKmerInfo["ecoli"][50] = map containing the kmers found in the first 50 + kmersize characters of ecoli.
-                                                                                                                       //i chose to store the kmers numbers in a map so you wouldn't have to check for dupilcate entries and could easily find the 
-                                                                                                                       //kmers 2 seqs had in common.  There may be a better way to do this thats why I am leaving so many comments...
-               map<string, vector< map<int, int> > >:: iterator it;
-               map<int, int>::iterator it2;
+               //map<string, vector< map<int, int> > >:: iterator it;
+               //map<int, int>::iterator it2;
                
                vector<Sequence> closest;               //closest[0] is the closest overall seq to querySeqs[0].
                
                string fastafile, templateFile;
-               
+               map<string, string> names;
                
                vector<sim> findIS(int);
-               int calcKmers(map<int, int>, map<int, int>);            
-               vector< vector<sim> > createProcessesIS(vector<Sequence*>, vector<linePair*>);
+               int calcKmers(map<int, int>, map<int, int>);
+               void getCutoff();
+               void makeSVGpic(vector<sim>, int);
+               void readName(string);
+                               
+               void createProcessesIS();
                
 };