From cb8abaf8da071159ec51ca8c206078df22da65e9 Mon Sep 17 00:00:00 2001 From: Joe Zhu Date: Sun, 14 Oct 2018 10:32:27 +0100 Subject: [PATCH 1/5] rework on copier --- src/dEploid.cpp | 1 + src/dEploidIO.cpp | 110 +++++++++++++++++++++++----------------------- 2 files changed, 56 insertions(+), 55 deletions(-) diff --git a/src/dEploid.cpp b/src/dEploid.cpp index 7bb05b78..4fb98b6c 100644 --- a/src/dEploid.cpp +++ b/src/dEploid.cpp @@ -84,6 +84,7 @@ int main(int argc, char *argv[]) { dEploidIO.writeHap(hap, false); } else { if (dEploidIO.useIBD()) { // ibd + DEploidIO tmpIO(dEploidIO); McmcSample * ibdMcmcSample = new McmcSample(); MersenneTwister ibdRg(dEploidIO.randomSeed()); diff --git a/src/dEploidIO.cpp b/src/dEploidIO.cpp index aad28b4c..93dce8d2 100644 --- a/src/dEploidIO.cpp +++ b/src/dEploidIO.cpp @@ -745,62 +745,62 @@ void DEploidIO::readPanel() { } -DEploidIO::DEploidIO(const DEploidIO ¤tDEploidIO) { +DEploidIO::DEploidIO(const DEploidIO &cpFrom) { this->setIsCopied(true); - this->setDoExportRecombProb(currentDEploidIO.doExportRecombProb()); - this->setrandomSeedWasGiven(currentDEploidIO.randomSeedWasGiven()); - this->setCompressVcf(currentDEploidIO.compressVcf()); - this->setInitialPropWasGiven(currentDEploidIO.initialPropWasGiven()); - this->setInitialHapWasGiven(currentDEploidIO.initialHapWasGiven()); - this->initialProp = vector (currentDEploidIO.initialProp.begin(), - currentDEploidIO.initialProp.end()); - this->setPleaseCheckInitialP(currentDEploidIO.pleaseCheckInitialP()); - this->setExcludeSites(currentDEploidIO.excludeSites()); - this->excludedMarkers = currentDEploidIO.excludedMarkers; - this->panel = currentDEploidIO.panel; - this->set_seed(currentDEploidIO.randomSeed_); - this->set_help(currentDEploidIO.help()); - this->setVersion(currentDEploidIO.version()); - this->setUsePanel(currentDEploidIO.usePanel()); - this->precision_ = currentDEploidIO.precision_; - this->prefix_ = currentDEploidIO.prefix_; - this->setKStrainWasManuallySet(currentDEploidIO.kStrainWasManuallySet()); - this->setKStrainWasSetByHap(currentDEploidIO.kStrainWasSetByHap()); - this->setKStrainWasSetByProp(currentDEploidIO.kStrainWasSetByProp()); - this->setKstrain(currentDEploidIO.kStrain()); - this->nMcmcSample_ = currentDEploidIO.nMcmcSample(); - this->setDoUpdateProp(currentDEploidIO.doUpdateProp()); - this->setDoUpdatePair(currentDEploidIO.doUpdatePair()); - this->setDoUpdateSingle(currentDEploidIO.doUpdateSingle()); - this->setDoExportPostProb(currentDEploidIO.doExportPostProb()); - this->setDoLsPainting(currentDEploidIO.doLsPainting()); - this->setDoIbdPainting(currentDEploidIO.doIbdPainting()); - this->setUseIBD(currentDEploidIO.useIBD()); - this->setUseLasso(currentDEploidIO.useLasso()); - this->setDoExportSwitchMissCopy(currentDEploidIO.doExportSwitchMissCopy()); - this->setDoAllowInbreeding(currentDEploidIO.doAllowInbreeding()); - this->mcmcBurn_ = currentDEploidIO.mcmcBurn_; - this->mcmcMachineryRate_ = currentDEploidIO.mcmcMachineryRate_; - this->missCopyProb_ = currentDEploidIO.missCopyProb_; - this->useConstRecomb_ = currentDEploidIO.useConstRecomb(); - this->setForbidCopyFromSame(currentDEploidIO.forbidCopyFromSame()); - this->constRecombProb_ = currentDEploidIO.constRecombProb(); - this->averageCentimorganDistance_ = currentDEploidIO.averageCentimorganDistance(); - this->setScalingFactor(currentDEploidIO.scalingFactor()); - this->setParameterG(currentDEploidIO.parameterG()); - this->setParameterSigma(currentDEploidIO.parameterSigma()); - this->setIBDSigma(currentDEploidIO.ibdSigma()); - this->setUseVcf(currentDEploidIO.useVcf()); - this->vcfReaderPtr_ = currentDEploidIO.vcfReaderPtr_; - this->setDoExportVcf(currentDEploidIO.doExportVcf()); - this->setDoComputeLLK(currentDEploidIO.doComputeLLK()); - - this->refCount_ = vector (currentDEploidIO.refCount_.begin(), - currentDEploidIO.refCount_.end()); - this->altCount_ = vector (currentDEploidIO.altCount_.begin(), - currentDEploidIO.altCount_.end()); - this->plaf_ = vector (currentDEploidIO.plaf_.begin(), - currentDEploidIO.plaf_.end()); + this->setDoExportRecombProb(cpFrom.doExportRecombProb()); + this->setrandomSeedWasGiven(cpFrom.randomSeedWasGiven()); + this->setCompressVcf(cpFrom.compressVcf()); + this->setInitialPropWasGiven(cpFrom.initialPropWasGiven()); + this->setInitialHapWasGiven(cpFrom.initialHapWasGiven()); + this->initialProp = vector (cpFrom.initialProp.begin(), + cpFrom.initialProp.end()); + this->setPleaseCheckInitialP(cpFrom.pleaseCheckInitialP()); + this->setExcludeSites(cpFrom.excludeSites()); + this->excludedMarkers = cpFrom.excludedMarkers; + this->panel = cpFrom.panel; + this->set_seed(cpFrom.randomSeed_); + this->set_help(cpFrom.help()); + this->setVersion(cpFrom.version()); + this->setUsePanel(cpFrom.usePanel()); + this->precision_ = cpFrom.precision_; + this->prefix_ = cpFrom.prefix_; + this->setKStrainWasManuallySet(cpFrom.kStrainWasManuallySet()); + this->setKStrainWasSetByHap(cpFrom.kStrainWasSetByHap()); + this->setKStrainWasSetByProp(cpFrom.kStrainWasSetByProp()); + this->setKstrain(cpFrom.kStrain()); + this->nMcmcSample_ = cpFrom.nMcmcSample(); + this->setDoUpdateProp(cpFrom.doUpdateProp()); + this->setDoUpdatePair(cpFrom.doUpdatePair()); + this->setDoUpdateSingle(cpFrom.doUpdateSingle()); + this->setDoExportPostProb(cpFrom.doExportPostProb()); + this->setDoLsPainting(cpFrom.doLsPainting()); + this->setDoIbdPainting(cpFrom.doIbdPainting()); + this->setUseIBD(cpFrom.useIBD()); + this->setUseLasso(cpFrom.useLasso()); + this->setDoExportSwitchMissCopy(cpFrom.doExportSwitchMissCopy()); + this->setDoAllowInbreeding(cpFrom.doAllowInbreeding()); + this->mcmcBurn_ = cpFrom.mcmcBurn_; + this->mcmcMachineryRate_ = cpFrom.mcmcMachineryRate_; + this->missCopyProb_ = cpFrom.missCopyProb_; + this->useConstRecomb_ = cpFrom.useConstRecomb(); + this->setForbidCopyFromSame(cpFrom.forbidCopyFromSame()); + this->constRecombProb_ = cpFrom.constRecombProb(); + this->averageCentimorganDistance_ = cpFrom.averageCentimorganDistance(); + this->setScalingFactor(cpFrom.scalingFactor()); + this->setParameterG(cpFrom.parameterG()); + this->setParameterSigma(cpFrom.parameterSigma()); + this->setIBDSigma(cpFrom.ibdSigma()); + this->setUseVcf(cpFrom.useVcf()); + this->vcfReaderPtr_ = cpFrom.vcfReaderPtr_; + this->setDoExportVcf(cpFrom.doExportVcf()); + this->setDoComputeLLK(cpFrom.doComputeLLK()); + + this->refCount_ = vector (cpFrom.refCount_.begin(), + cpFrom.refCount_.end()); + this->altCount_ = vector (cpFrom.altCount_.begin(), + cpFrom.altCount_.end()); + this->plaf_ = vector (cpFrom.plaf_.begin(), + cpFrom.plaf_.end()); } From d3c7ccd4067f9b7aa34529eaf6d110e2e0e44553 Mon Sep 17 00:00:00 2001 From: Joe Zhu Date: Mon, 15 Oct 2018 00:26:16 +0100 Subject: [PATCH 2/5] update style --- .ci/checkedList | 1 + .ci/mycppfileList | 2 -- src/vcfReader.hpp | 67 ++++++++++++++++++++++------------------------- 3 files changed, 32 insertions(+), 38 deletions(-) diff --git a/.ci/checkedList b/.ci/checkedList index 30ef0528..e3a6ca74 100644 --- a/.ci/checkedList +++ b/.ci/checkedList @@ -7,3 +7,4 @@ src/txtReader.cpp src/txtReader.hpp src/ibd.hpp src/ibd.cpp +src/vcfReader.hpp diff --git a/.ci/mycppfileList b/.ci/mycppfileList index e093ddb3..c111fe84 100644 --- a/.ci/mycppfileList +++ b/.ci/mycppfileList @@ -4,8 +4,6 @@ src/mcmc.cpp src/mcmc.hpp src/panel.cpp src/panel.hpp -src/txtReader.cpp -src/txtReader.hpp src/updateHap.cpp src/updateHap.hpp src/utility.cpp diff --git a/src/vcfReader.hpp b/src/vcfReader.hpp index 834b9cef..e76a4faf 100644 --- a/src/vcfReader.hpp +++ b/src/vcfReader.hpp @@ -38,7 +38,7 @@ // using std::endl; struct InvalidVcf : public InvalidInput{ - InvalidVcf(string str) : InvalidInput(str) { + explicit InvalidVcf(string str):InvalidInput(str) { } virtual ~InvalidVcf() throw() {} // virtual const char* what () const noexcept { @@ -48,7 +48,8 @@ struct InvalidVcf : public InvalidInput{ struct VcfInvalidHeaderFieldNames : public InvalidVcf{ - VcfInvalidHeaderFieldNames(string str1, string str2):InvalidVcf(str1) { + explicit VcfInvalidHeaderFieldNames(string str1, string str2): + InvalidVcf(str1) { this->reason = " VCF field header expects: "; throwMsg = this->reason + this->src + ", " + str2 + " was found!"; } @@ -57,7 +58,7 @@ struct VcfInvalidHeaderFieldNames : public InvalidVcf{ struct VcfInvalidVariantEntry : public InvalidVcf{ - VcfInvalidVariantEntry(string str):InvalidVcf(str) {} + explicit VcfInvalidVariantEntry(string str):InvalidVcf(str) {} virtual ~VcfInvalidVariantEntry() throw() {} // virtual const char* what () const noexcept { // return throwMsg.c_str(); @@ -66,42 +67,37 @@ struct VcfInvalidVariantEntry : public InvalidVcf{ struct VcfCoverageFieldNotFound : public VcfInvalidVariantEntry{ - VcfCoverageFieldNotFound( string str ):VcfInvalidVariantEntry( str) { + explicit VcfCoverageFieldNotFound(string str):VcfInvalidVariantEntry(str) { this->reason = "Coverage field AD was not found in the FORMAT, found: "; - throwMsg = this->reason + this->src ; + throwMsg = this->reason + this->src; } ~VcfCoverageFieldNotFound() throw() {} }; -// This requires more thinking, check for data type? - - -// More informative exceptions for vcf related errors - class VariantLine{ - friend class VcfReader; - friend class DEploidIO; - public: - VariantLine ( string tmpLine ); - ~VariantLine(){} + friend class VcfReader; + friend class DEploidIO; + public: + explicit VariantLine(string tmpLine); + ~VariantLine() {} - private: + private: string tmpLine_; string tmpStr_; - void init( string tmpLine ); + void init(string tmpLine); - void extract_field_CHROM ( ); - void extract_field_POS ( ); - void extract_field_ID ( ); - void extract_field_REF ( ); - void extract_field_ALT ( ); - void extract_field_QUAL ( ); - void extract_field_FILTER ( ); - void extract_field_INFO ( ); - void extract_field_FORMAT ( ); - void extract_field_VARIANT ( ); + void extract_field_CHROM(); + void extract_field_POS(); + void extract_field_ID(); + void extract_field_REF(); + void extract_field_ALT(); + void extract_field_QUAL(); + void extract_field_FILTER(); + void extract_field_INFO(); + void extract_field_FORMAT(); + void extract_field_VARIANT(); size_t feildStart_; size_t fieldEnd_; @@ -126,28 +122,27 @@ class VariantLine{ /*! \brief VCF file reader @ingroup group_data */ class VcfReader : public VariantIndex { - #ifdef UNITTEST - friend class TestVCF; + friend class TestVCF; #endif - friend class DEploidIO; - public: + friend class DEploidIO; + public: // Constructors and Destructors - VcfReader(string fileName); // parse in exclude sites - ~VcfReader(){} + explicit VcfReader(string fileName); // parse in exclude sites + ~VcfReader() {} - private: + private: vector variants; vector keptVariants; vector refCount; vector altCount; - vector headerLines ; + vector headerLines; string fileName_; ifstream inFile; igzstream inFileGz; bool isCompressed_; bool isCompressed() const { return this->isCompressed_; } - void setIsCompressed (const bool compressed) { + void setIsCompressed(const bool compressed) { this->isCompressed_ = compressed; } void checkFileCompressed(); string sampleName; From 069ba3bf177e2518e750e20e682faa53d15cc075 Mon Sep 17 00:00:00 2001 From: Joe Zhu Date: Mon, 15 Oct 2018 10:57:33 +0100 Subject: [PATCH 3/5] add style --- .ci/checkedList | 2 ++ .ci/mycppfileList | 1 - src/debug/mcmcDebug.cpp | 17 ++++++----------- src/debug/vcfReaderDebug.cpp | 6 +++--- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/.ci/checkedList b/.ci/checkedList index e3a6ca74..263b2991 100644 --- a/.ci/checkedList +++ b/.ci/checkedList @@ -8,3 +8,5 @@ src/txtReader.hpp src/ibd.hpp src/ibd.cpp src/vcfReader.hpp +src/debug/mcmcDebug.cpp +src/debug/vcfReaderDebug.cpp diff --git a/.ci/mycppfileList b/.ci/mycppfileList index c111fe84..303d1fe2 100644 --- a/.ci/mycppfileList +++ b/.ci/mycppfileList @@ -10,7 +10,6 @@ src/utility.cpp src/utility.hpp src/vcfReader.cpp src/vcfReader.hpp -src/debug/mcmcDebug.cpp src/debug/vcfReaderDebug.cpp src/export/dEploidIOExport.cpp src/export/dEploidIOExportPosteriorProb.cpp diff --git a/src/debug/mcmcDebug.cpp b/src/debug/mcmcDebug.cpp index a50dd8e2..f0670e60 100644 --- a/src/debug/mcmcDebug.cpp +++ b/src/debug/mcmcDebug.cpp @@ -24,26 +24,21 @@ */ #include "mcmc.hpp" -//#include "utility.hpp" -//#include /* ceil */ -//#include -//#include "updateHap.hpp" -//#include -bool McmcMachinery::doutProp(){ +bool McmcMachinery::doutProp() { dout << " Update proportion to: "; - for ( auto const& value: this->currentProp_ ){ + for (auto const& value : this->currentProp_) { dout << value << " "; } - - dout< // std::cout +#include "global.h" #include "vcfReader.hpp" -using namespace std; +using std::endl; -bool VcfReader::printSampleName(){ +bool VcfReader::printSampleName() { dout << "Sample name is " << this->sampleName << endl; return true; } From 54cfc8760c4c04e5c96d0138620f2a6a1108319a Mon Sep 17 00:00:00 2001 From: Joe Zhu Date: Mon, 15 Oct 2018 23:56:19 +0100 Subject: [PATCH 4/5] apply ibd only on wsaf > 0, sites --- src/dEploid.cpp | 16 +++++---- src/dEploidIO.cpp | 82 +++++++++++++++++++++++++++++++++++++++++++- src/dEploidIO.hpp | 23 ++++++++++--- src/variantIndex.hpp | 5 ++- 4 files changed, 113 insertions(+), 13 deletions(-) diff --git a/src/dEploid.cpp b/src/dEploid.cpp index 4fb98b6c..1ef4cf68 100644 --- a/src/dEploid.cpp +++ b/src/dEploid.cpp @@ -85,19 +85,23 @@ int main(int argc, char *argv[]) { } else { if (dEploidIO.useIBD()) { // ibd DEploidIO tmpIO(dEploidIO); + tmpIO.ibdTrimming(); McmcSample * ibdMcmcSample = new McmcSample(); - MersenneTwister ibdRg(dEploidIO.randomSeed()); + MersenneTwister ibdRg(tmpIO.randomSeed()); - McmcMachinery ibdMcmcMachinery(&dEploidIO.plaf_, - &dEploidIO.refCount_, - &dEploidIO.altCount_, - dEploidIO.panel, - &dEploidIO, + McmcMachinery ibdMcmcMachinery(&tmpIO.plaf_, + &tmpIO.refCount_, + &tmpIO.altCount_, + tmpIO.panel, + &tmpIO, ibdMcmcSample, &ibdRg, true); ibdMcmcMachinery.runMcmcChain(true, // show progress true); // use IBD + dEploidIO.initialProp = tmpIO.initialProp; + dEploidIO.setInitialPropWasGiven(true); + dEploidIO.setDoUpdateProp(false); delete ibdMcmcSample; } McmcSample * mcmcSample = new McmcSample(); diff --git a/src/dEploidIO.cpp b/src/dEploidIO.cpp index 93dce8d2..f01eaf99 100644 --- a/src/dEploidIO.cpp +++ b/src/dEploidIO.cpp @@ -794,13 +794,25 @@ DEploidIO::DEploidIO(const DEploidIO &cpFrom) { this->vcfReaderPtr_ = cpFrom.vcfReaderPtr_; this->setDoExportVcf(cpFrom.doExportVcf()); this->setDoComputeLLK(cpFrom.doComputeLLK()); - + this->setNLoci(cpFrom.nLoci()); this->refCount_ = vector (cpFrom.refCount_.begin(), cpFrom.refCount_.end()); this->altCount_ = vector (cpFrom.altCount_.begin(), cpFrom.altCount_.end()); this->plaf_ = vector (cpFrom.plaf_.begin(), cpFrom.plaf_.end()); + this->chrom_ = vector (cpFrom.chrom_.begin(), + cpFrom.chrom_.end()); + this->position_ = vector < vector > (cpFrom.position_.begin(), + cpFrom.position_.end()); + this->indexOfChromStarts_ = vector (cpFrom.indexOfChromStarts_.begin(), + cpFrom.indexOfChromStarts_.end()); + this->strExportProp = cpFrom.strExportProp; + this->strExportLLK = cpFrom.strExportLLK; + this->strExportHap = cpFrom.strExportHap; + this->strIbdExportProp = cpFrom.strIbdExportProp; + this->strIbdExportLLK = cpFrom.strIbdExportLLK; + this->strIbdExportHap = cpFrom.strIbdExportHap; } @@ -905,3 +917,71 @@ void DEploidIO::dEploidLasso() { } } + +void DEploidIO::computeObsWsaf() { + assert(this->obsWsaf_.size() == 0); + for ( size_t i = 0; i < this->nLoci(); i++) { + this->obsWsaf_.push_back(this->altCount_[i] / + (this->refCount_[i] + this->altCount_[i] + 0.00000000000001)); + } + assert(this->obsWsaf_.size() == this->nLoci()); +} + + +void DEploidIO::findWsafGreaterZeroAt() { + assert(wsafGt0At_.size() == 0); + for ( size_t i = 0; i < this->nLoci(); i++) { + if (this->obsWsaf_[i] > 0 ) { + this->wsafGt0At_.push_back(i); + } + } + // cout << "wsafGt0At_.size() = " << wsafGt0At_.size() << endl; +} + + +void DEploidIO::trimVec(vector &vec, vector &idx) { + vector ret; + for (auto const& value : idx){ + ret.push_back(vec[value]); + } + //return ret; + vec.clear(); + for (auto const& value : ret){ + vec.push_back(value); + } +} + + +void DEploidIO::ibdTrimming() { + this->computeObsWsaf(); + this->findWsafGreaterZeroAt(); + + this->trimVec(this->refCount_, this->wsafGt0At_); + this->trimVec(this->altCount_, this->wsafGt0At_); + this->trimVec(this->plaf_, this->wsafGt0At_); + + this->setNLoci(this->plaf_.size()); + + vector oldChrom = vector (chrom_.begin(), chrom_.end()); + this->chrom_.clear(); + + vector < vector < int > > oldposition = this->position_; + this->position_.clear(); + + for (size_t chromI = 0; chromI < oldChrom.size(); chromI++) { + size_t hapIndex = indexOfChromStarts_[chromI]; + vector newTrimmedPos; + for (size_t posI = 0; posI < oldposition[chromI].size(); posI++) { + if (std::find(this->wsafGt0At_.begin(),this->wsafGt0At_.end(), hapIndex) + != this->wsafGt0At_.end()){ + if (newTrimmedPos.size() == 0) { + this->chrom_.push_back(oldChrom[chromI]); + } + newTrimmedPos.push_back(oldposition[chromI][posI]); + } + + hapIndex++; + } + this->position_.push_back(newTrimmedPos); + } +} diff --git a/src/dEploidIO.hpp b/src/dEploidIO.hpp index ce5592f7..ae045bc7 100644 --- a/src/dEploidIO.hpp +++ b/src/dEploidIO.hpp @@ -104,6 +104,17 @@ class DEploidIO{ void writeHap (vector < vector > &hap, bool useIBD = false); bool doPrintLassoPanel_; + // Trimming related + void ibdTrimming(); + + + + void setInitialHapWasGiven(const bool setTo) { this->initialHapWasGiven_ = setTo; } + vector < vector > initialHap; + vector initialProp; + void setDoUpdateProp ( const bool setTo ) { this->doUpdateProp_ = setTo; } + void setInitialPropWasGiven(const bool setTo) {this->initialPropWasGiven_ = setTo; } + private: void core(); double llkFromInitialHap_; @@ -146,11 +157,10 @@ class DEploidIO{ bool useIBD_; bool useLasso_; - vector initialProp; vector finalProp; - vector < vector > initialHap; vector chrom_; vector obsWsaf_; + vector wsafGt0At_; size_t nLoci_; // Help related @@ -286,7 +296,6 @@ class DEploidIO{ void setIsCopied ( const bool setTo ) { this->isCopied_ = setTo; } bool isCopied() const { return this->isCopied_; } - void setDoUpdateProp ( const bool setTo ) { this->doUpdateProp_ = setTo; } bool doUpdateProp() const { return this->doUpdateProp_; } void setDoUpdateSingle ( const bool setTo ) { this->doUpdateSingle_ = setTo; } @@ -311,13 +320,11 @@ class DEploidIO{ void setUseLasso( const bool setTo) { this->useLasso_ = setTo; } bool initialPropWasGiven() const { return initialPropWasGiven_; } - void setInitialPropWasGiven(const bool setTo) {this->initialPropWasGiven_ = setTo; } bool pleaseCheckInitialP() const { return pleaseCheckInitialP_; } void setPleaseCheckInitialP(const bool setTo) {this->pleaseCheckInitialP_ = setTo; } bool initialHapWasGiven() const { return initialHapWasGiven_; } - void setInitialHapWasGiven(const bool setTo) { this->initialHapWasGiven_ = setTo; } bool randomSeedWasGiven() const {return this->randomSeedWasGiven_; } @@ -406,6 +413,12 @@ class DEploidIO{ vector lassoComputeObsWsaf(size_t segmentStartIndex, size_t nLoci); vector < vector > lassoSubsetPanel(size_t segmentStartIndex, size_t nLoci); void writePanel(Panel *panel, size_t chromi, vector hdr); + + // Trimming related + void computeObsWsaf(); + void findWsafGreaterZeroAt(); + void trimVec(vector &vec, vector &idx); + }; #endif diff --git a/src/variantIndex.hpp b/src/variantIndex.hpp index 66267f40..a155a406 100644 --- a/src/variantIndex.hpp +++ b/src/variantIndex.hpp @@ -61,6 +61,8 @@ class VariantIndex { // For removing markers and positions void findWhoToBeKept(ExcludeMarker* excludedMarkers); + void findWhoToBeKeptWsafGt0(const vector & wsafGt0At); + virtual void removeMarkers(); /* Index of content/info will be kept */ @@ -80,11 +82,12 @@ class VariantIndex { void getIndexOfChromStarts(); void removePositions(); void checkSortedPositions(string fileName); + void findAndKeepMarkers(ExcludeMarker* excludedMarkers); + void findAndKeepMarkersAtWsafGt0(const vector & wsafGt0At); public: VariantIndex(); virtual ~VariantIndex() {} - void findAndKeepMarkers(ExcludeMarker* excludedMarkers); }; From c72f5781c3975734243b10367957d14c78c1c8b3 Mon Sep 17 00:00:00 2001 From: Joe Zhu Date: Tue, 16 Oct 2018 00:41:29 +0100 Subject: [PATCH 5/5] turnning off checking against previous version --- .circleci/config.yml | 6 +++--- .travis.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b3f31d42..32a31c3b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -36,7 +36,7 @@ jobs: ./tests/test_binary.sh ./tests/testPOS.sh ./tests/test_binaryVcfVsTxt.sh - ./tests/test-against-previous-version.sh + #./tests/test-against-previous-version.sh ./tests/test_binaryReproducible.sh #- valgrind --leak-check=full -v --show-leak-kinds=all ./unit_tests #- coveralls --exclude lib --exclude tests --exclude src/random --exclude src/codeCogs/ --exclude src/export/ --gcov-options '\-lp' @@ -77,7 +77,7 @@ jobs: ./tests/test_binary.sh ./tests/testPOS.sh ./tests/test_binaryVcfVsTxt.sh - ./tests/test-against-previous-version.sh + #./tests/test-against-previous-version.sh ./tests/test_binaryReproducible.sh "18.04": @@ -116,7 +116,7 @@ jobs: ./tests/test_binary.sh ./tests/testPOS.sh ./tests/test_binaryVcfVsTxt.sh - ./tests/test-against-previous-version.sh + #./tests/test-against-previous-version.sh ./tests/test_binaryReproducible.sh diff --git a/.travis.yml b/.travis.yml index 82609e44..6908be44 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ script: - if [ $TRAVIS_OS_NAME == linux ]; then ./tests/test_binary.sh; fi - ./tests/testPOS.sh - ./tests/test_binaryVcfVsTxt.sh - - ./tests/test-against-previous-version.sh + #- ./tests/test-against-previous-version.sh - ./tests/test_binaryReproducible.sh - if [ $TRAVIS_OS_NAME == linux ]; then cd docs/doxygen; doxygen Doxyfile; cd ../..; fi