X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=slayer.h;h=eeefc62392b64cdb0eb5797cba1c994b27058f50;hp=ea79727561fbfad37dfaf1478276e529b79df22b;hb=1a20e24ee786195ab0e1cccd4f5aede7a88f3f4e;hpb=58cc09a375d1e1afceef3b036574ff21394ccc4d diff --git a/slayer.h b/slayer.h index ea79727..eeefc62 100644 --- a/slayer.h +++ b/slayer.h @@ -11,46 +11,11 @@ #include "sequence.hpp" +#include "chimera.h" /***********************************************************************/ //This class was modeled after the chimeraSlayer written by the Broad Institute /***********************************************************************/ -struct data_struct { //this is crazy big...but follow original. - float divr_qla_qrb; - float divr_qlb_qra; - float qla_qrb; - float qlb_qra; - float qla; - float qrb; - float ab; - float qa; - float qb; - float lab; - float rab; - float qra; - float qlb; - int winLStart; - int winLEnd; - int winRStart; - int winREnd; - Sequence querySeq; - Sequence parentA; - Sequence parentB; - float bsa; - float bsb; - float bsMax; - float chimeraMax; - -}; -/***********************************************************************/ -//sorts lowest to highest first by bsMax, then if tie by chimeraMax -inline bool compareDataStruct(data_struct left, data_struct right){ - if (left.bsMax < right.bsMax) { return true; } - else if (left.bsMax == right.bsMax) { - return (left.chimeraMax < right.chimeraMax); - }else { return false; } -} -/***********************************************************************/ struct snps { char queryChar; char parentAChar; @@ -64,28 +29,31 @@ class Slayer { public: - Slayer(int, int, int, float); + Slayer(int, int, int, float, int, int, int); ~Slayer() {}; - string getResults(Sequence*, vector); + string getResults(Sequence, vector); vector getOutput() { return outputResults; } private: - int windowSize, windowStep, parentFragmentThreshold; + int windowSize, windowStep, parentFragmentThreshold, iters, percentSNPSample, minBS; float divRThreshold; vector outputResults; + vector< map > baseSpots; + Sequence myQuery; - void verticalFilter(vector); + map verticalFilter(Sequence&, Sequence&, Sequence&); float computePercentID(string, string, int, int); - vector runBellerophon(Sequence*, Sequence*, Sequence*); + vector runBellerophon(Sequence, Sequence, Sequence, map&); vector getSNPS(string, string, string, int, int); - void bootstrapSNPS(vector, vector, float&, float&); + int bootstrapSNPS(vector, vector, float&, float&, int); float snpQA(vector); float snpQB(vector); float snpAB(vector); + MothurOut* m; };