summaryrefslogtreecommitdiff
path: root/biology/haplohseq/files/patch-src_FreqPhase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'biology/haplohseq/files/patch-src_FreqPhase.cpp')
-rw-r--r--biology/haplohseq/files/patch-src_FreqPhase.cpp29
1 files changed, 0 insertions, 29 deletions
diff --git a/biology/haplohseq/files/patch-src_FreqPhase.cpp b/biology/haplohseq/files/patch-src_FreqPhase.cpp
deleted file mode 100644
index 9bab76aee2f5..000000000000
--- a/biology/haplohseq/files/patch-src_FreqPhase.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
---- src/FreqPhase.cpp.orig 2019-11-13 14:19:06 UTC
-+++ src/FreqPhase.cpp
-@@ -5,6 +5,7 @@
- * Email: sanlucas@gmail.com
- */
-
-+#include <sysexits.h>
- #include "FreqPhase.h"
-
- namespace haplohseq {
-@@ -180,10 +181,17 @@ double FreqPhase::meanValue(const std::v
- double FreqPhase::medianValue(const std::vector<double>& values) {
- double median;
- size_t size = values.size();
-+
-+ // We can probably detect this condition earlier while loading the VCF
-+ if ( size == 0 ) {
-+ std::cerr << "FreqPhase::medianValue(): values vector is empty." << std::endl;
-+ std::cerr << "Make sure your VCF has all of GT:AD:DP in the FORMAT column." << std::endl;
-+ exit(EX_DATAERR);
-+ }
- std::vector<double> tempFreqs(values);
- sort(tempFreqs.begin(), tempFreqs.end());
-
-- if (size % 2 == 0) {
-+ if (size % 2 == 0) {
- median = (tempFreqs[size / 2 - 1] + tempFreqs[size / 2]) / 2;
- }
- else {