From d837e1c3699c12d6b7b435c68ac55c6f9325cd20 Mon Sep 17 00:00:00 2001 From: Adam Orr Date: Tue, 2 Jan 2018 09:37:41 -0700 Subject: [PATCH 1/7] fix bold GFM rendering Without a space between the *** and the : , Github won't render *** as bold. --- doc/happy.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/happy.md b/doc/happy.md index 98d5e98..89b7287 100755 --- a/doc/happy.md +++ b/doc/happy.md @@ -44,13 +44,13 @@ are not supported, all input bed or bed.gz files must only contain bed records). Hap.py will report counts of -* ***true-positives (TP)***: variants/genotypes that match in truth and query. -* ***false-positives (FP)***: variants that have mismatching genotypes or alt +* ***true-positives (TP)*** : variants/genotypes that match in truth and query. +* ***false-positives (FP)*** : variants that have mismatching genotypes or alt alleles, as well as query variant calls in regions a truth set would call confident hom-ref regions. * ***false-negatives (FN)*** : variants present in the truth set, but missed in the query. -* ***non-assessed calls (UNK)***: variants outside the truth set regions +* ***non-assessed calls (UNK)*** : variants outside the truth set regions From these counts, we are able to calculate From d945a9541071acf4e5a7c0f334db2f7560a0455c Mon Sep 17 00:00:00 2001 From: Lilian Janin Date: Tue, 17 Apr 2018 14:34:58 +0100 Subject: [PATCH 2/7] typos? --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 307ca07..cb79c38 100755 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ when using variant calling methods that produce many complex variant calls, these corner cases can become relevant. Moreover, when benchmarking against gold-standard datasets that cover difficult regions of the genome (e.g. [Platinum Genomes](http://www.illumina.com/platinumgenomes/)), the more complicated -subsets of the genome will be respnsible for most of the difference between +subsets of the genome will be responsible for most of the difference between methods. ### Variant preprocessing @@ -164,7 +164,7 @@ prefer to combine local haplotypes in the same variant records different variant calling methods. ``` -chr1 201586350 . CTCTCTCTCT C +chr1 201586350 . CTCTCTCTC C chr1 201586359 . T A ``` From d6016c88b6b2923f8f7cf7563c77e2d39f59c0bc Mon Sep 17 00:00:00 2001 From: Evan Benn Date: Tue, 10 Jul 2018 13:50:46 +1000 Subject: [PATCH 3/7] Clarify that INFO.VQSLOD is required for --roc --- doc/happy.md | 4 ++-- example/happy/microbenchmark.sh | 2 +- src/sh/run_happy_pg_test.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/happy.md b/doc/happy.md index 98d5e98..d80662d 100755 --- a/doc/happy.md +++ b/doc/happy.md @@ -458,8 +458,8 @@ a ROC curve based on the query GQX field: The `--roc` switch specifies the feature to filter on. Hap.py translates the truth and query GQ(X) fields into the INFO fields T_GQ and Q_GQ, it tries to use GQX first, if this is not present, it will use GQ. When run without -internal preprocessing any other input INFO field can be used (e.g. VQSLOD for -GATK). +internal preprocessing any other input INFO field can be used (e.g. +--roc INFO.VQSLOD for GATK). The `--roc-filter` switch may be used to specify the particular VCF filter which implements a threshold on the quality score. When calculating filtered diff --git a/example/happy/microbenchmark.sh b/example/happy/microbenchmark.sh index 7ebf186..6bcf677 100755 --- a/example/happy/microbenchmark.sh +++ b/example/happy/microbenchmark.sh @@ -44,7 +44,7 @@ REF=$DIR/hg38.chr21.fa # ------- # # To make ROCs for GATK, we discard the LowQual filter and use QUAL -# For VQSR ROCs, we would use VQSLOD and discard the VQSR Tranche filters +# For VQSR ROCs, we would use INFO.VQSLOD and discard the VQSR Tranche filters f=GATK3 g=${DIR}/NA12878-GATK3-chr21.vcf.gz diff --git a/src/sh/run_happy_pg_test.sh b/src/sh/run_happy_pg_test.sh index 3a0400f..5ab593b 100755 --- a/src/sh/run_happy_pg_test.sh +++ b/src/sh/run_happy_pg_test.sh @@ -95,7 +95,7 @@ ${PYTHON} ${HCDIR}/hap.py \ -r ${DIR}/../../example/chr21.fa \ -o ${TMP_OUT}.unhappy \ -X --unhappy \ - --roc VQSLOD \ + --roc INFO.VQSLOD \ --force-interactive if [[ $? != 0 ]]; then From f8901c633ff4a10992bed07bfa6fb8dae2486fd6 Mon Sep 17 00:00:00 2001 From: Nils Homer Date: Tue, 11 Dec 2018 11:53:50 -0700 Subject: [PATCH 4/7] Update read me with GCC/G++ 4.9.2+ requirement See https://github.com/Illumina/hap.py/issues/66 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 307ca07..6fdf4b2 100755 --- a/README.md +++ b/README.md @@ -351,7 +351,7 @@ docker build -f Dockerfile.centos6 . You will need these tools / libraries on your system to compile the code: * CMake > 2.8 -* GCC/G++ 4.8+ for compiling +* GCC/G++ 4.9.2+ for compiling * Boost 1.55+ * Python 2, version 2.7.8 or greater * Python packages: Pandas, Numpy, Scipy, pysam, bx-python From 4609616505d5a9de754f300ffa53f720d4ca5032 Mon Sep 17 00:00:00 2001 From: Peter Krusche Date: Sun, 28 Apr 2019 20:45:06 +0200 Subject: [PATCH 5/7] Remove regex dependency + fix test error with gcc 7.3 --- .../lib/diploidgraphs/DiploidReference.cpp | 5 +++++ src/c++/lib/quantify/QuantifyRegions.cpp | 20 ++++++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/c++/lib/diploidgraphs/DiploidReference.cpp b/src/c++/lib/diploidgraphs/DiploidReference.cpp index a966228..a8e976c 100755 --- a/src/c++/lib/diploidgraphs/DiploidReference.cpp +++ b/src/c++/lib/diploidgraphs/DiploidReference.cpp @@ -230,6 +230,11 @@ void DiploidReference::setRegion( if(opposite_path != nu_haps.end() && opposite_path != nu_haps.begin()) { size_t p2 = opposite_path->second; + // make order reproducible since map is not ordered + if(p2 > p1) + { + std::swap(p1, p2); + } nu_haps.erase(nu_haps.begin()); nu_haps.erase(opposite_path); diff --git a/src/c++/lib/quantify/QuantifyRegions.cpp b/src/c++/lib/quantify/QuantifyRegions.cpp index 6324b73..04e1a44 100644 --- a/src/c++/lib/quantify/QuantifyRegions.cpp +++ b/src/c++/lib/quantify/QuantifyRegions.cpp @@ -41,7 +41,6 @@ #include "helpers/BCFHelpers.hh" #include -#include #include #include @@ -102,7 +101,6 @@ namespace variant void QuantifyRegions::load(std::vector const &rnames, bool fixchr) { std::unordered_map label_map; - const std::regex trailing_number_regex ("(.+)_([0-9]+)$"); for (std::string const &f : rnames) { std::vector v; @@ -238,10 +236,22 @@ namespace variant if (!fixed_label && v.size() > 3) { - std::smatch string_matches; - if(std::regex_match(v[3], string_matches, trailing_number_regex)) + size_t split = v[3].size(); + for (size_t pos = v[3].size(); pos != 0; --pos) { - label_ids.insert(getLabelId(label + "_" + string_matches.str(1), 1)); + if (v[3][pos] < '0' || v[3][pos] > '9') + { + break; + } + else + { + split = pos; + } + } + + if(split < v[3].size() && v[3][split] == '_') + { + label_ids.insert(getLabelId(label + "_" + v[3].substr(0, split), 1)); label_ids.insert(getLabelId(label + "_" + v[3], 2)); } else From e0087f34bbcfde98b1cbb09642df6bafc40e226d Mon Sep 17 00:00:00 2001 From: Peter Krusche Date: Sun, 28 Apr 2019 22:10:51 +0200 Subject: [PATCH 6/7] Fix Docker build --- .dockerignore | 5 ++++- Dockerfile | 13 +++++++------ Dockerfile.ubuntu-with-tests | 13 +++++++------ 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/.dockerignore b/.dockerignore index 8cbbfa2..a71fda1 100644 --- a/.dockerignore +++ b/.dockerignore @@ -24,4 +24,7 @@ compile_commands.json tags tags_sorted_by_file .tags -.tags_sorted_by_file \ No newline at end of file +.tags_sorted_by_file +cmake-build-debug +cmake-build-release +build diff --git a/Dockerfile b/Dockerfile index 0685cbc..4b3b8dd 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ -FROM ubuntu:16.04 +FROM ubuntu:18.04 +ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get upgrade -y RUN apt-get install build-essential zlib1g-dev libbz2-dev pkg-config cmake libncurses5-dev autoconf -y RUN apt-get install git bzip2 wget -y @@ -14,17 +15,17 @@ RUN apt-get install python2.7 python2.7-dev python \ python-pysam \ python-scipy \ -y -RUN apt-get install software-properties-common python-software-properties -y +RUN apt-get install software-properties-common -y RUN apt-get clean -y RUN pip install bx-python -RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \ - add-apt-repository -y ppa:webupd8team/java && \ +RUN echo oracle-java11-installer shared/accepted-oracle-license-v1-2 select true | debconf-set-selections && \ + add-apt-repository -y ppa:linuxuprising/java && \ apt-get update && \ - apt-get install -y oracle-java8-installer && \ + apt-get install -y oracle-java11-installer && \ rm -rf /var/lib/apt/lists/* && \ - rm -rf /var/cache/oracle-jdk8-installer + rm -rf /var/cache/oracle-jdk11-installer # copy git repository into the image RUN mkdir -p /opt/hap.py-source diff --git a/Dockerfile.ubuntu-with-tests b/Dockerfile.ubuntu-with-tests index e23ce80..e154bac 100755 --- a/Dockerfile.ubuntu-with-tests +++ b/Dockerfile.ubuntu-with-tests @@ -1,5 +1,6 @@ -FROM ubuntu:16.04 +FROM ubuntu:18.04 +ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get upgrade -y RUN apt-get install build-essential zlib1g-dev libbz2-dev pkg-config cmake libncurses5-dev autoconf -y RUN apt-get install git bzip2 wget -y @@ -14,17 +15,17 @@ RUN apt-get install python2.7 python2.7-dev python \ python-pysam \ python-scipy \ -y -RUN apt-get install software-properties-common python-software-properties -y +RUN apt-get install software-properties-common -y RUN apt-get clean -y RUN pip install bx-python -RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \ - add-apt-repository -y ppa:webupd8team/java && \ +RUN echo oracle-java11-installer shared/accepted-oracle-license-v1-2 select true | debconf-set-selections && \ + add-apt-repository -y ppa:linuxuprising/java && \ apt-get update && \ - apt-get install -y oracle-java8-installer && \ + apt-get install -y oracle-java11-installer && \ rm -rf /var/lib/apt/lists/* && \ - rm -rf /var/cache/oracle-jdk8-installer + rm -rf /var/cache/oracle-jdk11-installer # copy git repository into the image RUN mkdir -p /opt/hap.py-source From d7384b8a5537a1b3ecaa3a975df669ac0046a704 Mon Sep 17 00:00:00 2001 From: Peter Krusche Date: Sun, 28 Apr 2019 22:25:43 +0200 Subject: [PATCH 7/7] Update rtg-tools to work with new Java --- external/make_dependencies.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/external/make_dependencies.sh b/external/make_dependencies.sh index 5932563..fefd3bc 100755 --- a/external/make_dependencies.sh +++ b/external/make_dependencies.sh @@ -115,9 +115,9 @@ if [[ ! -z $BUILD_VCFEVAL ]]; then cd ${TLD} mkdir -p ${TLD}/rtg-tools cd rtg-tools - wget http://github.com/pkrusche/rtg-tools/archive/3.8.2-refpatch.tar.gz -O ${TLD}/rtg-tools/rtg-tools.tar.gz + wget http://github.com/RealTimeGenomics/rtg-tools/archive/3.10.1.tar.gz -O ${TLD}/rtg-tools/rtg-tools.tar.gz tar xvf rtg-tools.tar.gz - cd rtg-tools-3.8.2-refpatch + cd rtg-tools-3.10.1 if [[ ! -z ${ANT_HOME} ]]; then $ANT_HOME/bin/ant zip-nojre @@ -126,7 +126,7 @@ if [[ ! -z $BUILD_VCFEVAL ]]; then fi cd .. - RTG_ZIPFILE=$(ls rtg-tools-3.8.2-refpatch/dist/*-nojre.zip | head -1) + RTG_ZIPFILE=$(ls rtg-tools-3.10.1/dist/*-nojre.zip | head -1) RTG_BASE=$(basename $RTG_ZIPFILE -nojre.zip) jar xvf $RTG_ZIPFILE mv $RTG_BASE ${ISD}/libexec/rtg-tools-install