X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=chimeracheckrdp.h;h=25db15b6738f4909a3a02e939d9a114b9d63fa29;hp=e31cae7672ef016839e7eb736a5ac0bd1cde65a8;hb=050a3ff02473a3d4c0980964e1a9ebe52e55d6b8;hpb=1244c4907c07baea86b0f0676d098a29d2e95a39 diff --git a/chimeracheckrdp.h b/chimeracheckrdp.h index e31cae7..25db15b 100644 --- a/chimeracheckrdp.h +++ b/chimeracheckrdp.h @@ -14,9 +14,10 @@ #include "chimera.h" #include "kmer.hpp" #include "kmerdb.hpp" -#include "database.hpp" +#include "alignmentdb.h" -//This class was created using the algorythms described in +/***********************************************************/ +//This class was created using the algorithms described in //CHIMERA_CHECK version 2.7 written by Niels Larsen. /***********************************************************/ @@ -24,48 +25,35 @@ class ChimeraCheckRDP : public Chimera { public: - ChimeraCheckRDP(string, string); + ChimeraCheckRDP(string, string, string, bool, int, int, string); //fasta, template, name, svg, increment, ksize, outputDir ~ChimeraCheckRDP(); - void getChimeras(); - void print(ostream&); - - void setCons(string){}; - void setQuantiles(string q) {}; + int getChimeras(Sequence*); + Sequence print(ostream&, ostream&); + #ifdef USE_MPI + Sequence print(MPI_File&, MPI_File&); + #endif private: - vector lines; - vector querySeqs; - Database* templateDB; + Sequence* querySeq; + AlignmentDB* templateDB; Kmer* kmer; - - vector< vector > IS; //IS[0] is the vector of IS values for each window for querySeqs[0] - - //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 > > 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 > >:: iterator it; - map::iterator it2; - - vector closest; //closest[0] is the closest overall seq to querySeqs[0]. - - string fastafile, templateFile; - - - vector findIS(int); - int calcKmers(map, map); - vector< vector > createProcessesIS(vector, vector); - + Sequence closest; //closest is the closest overall seq to query + + vector IS; //IS is the vector of IS values for each window for query + string fastafile; + map names; + string name; + bool svg; + int kmerSize, increment; + + vector findIS(); + int calcKmers(map, map); + void makeSVGpic(vector); + void readName(string); }; - /***********************************************************/ #endif