X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=slayer.h;h=107b02785fffb395662508dc8875e49013103b47;hb=47af4126c6ece121172cd486c1ca7eeb1ccae2de;hp=33ccc3fda70ad9e6dca595eb626c0bb9e5dedc1c;hpb=aa9238c0a9e6e7aa0ed8b8b606b08ad4fd7dcfe3;p=mothur.git diff --git a/slayer.h b/slayer.h index 33ccc3f..107b027 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,7 +29,7 @@ class Slayer { public: - Slayer(int, int, int, float, int, int); + Slayer(int, int, int, float, int, int, int); ~Slayer() {}; string getResults(Sequence*, vector); @@ -73,17 +38,18 @@ class Slayer { private: - int windowSize, windowStep, parentFragmentThreshold, iters, percentSNPSample; + int windowSize, windowStep, parentFragmentThreshold, iters, percentSNPSample, minBS; float divRThreshold; vector outputResults; vector< map > baseSpots; + Sequence myQuery; map verticalFilter(vector); float computePercentID(string, string, int, int); vector runBellerophon(Sequence*, Sequence*, Sequence*, map&); vector getSNPS(string, string, string, int, int); - int bootstrapSNPS(vector, vector, float&, float&); + int bootstrapSNPS(vector, vector, float&, float&, int); float snpQA(vector); float snpQB(vector); float snpAB(vector);