[med-svn] [nanopolish] 04/04: Refresh patches
Andreas Tille
tille at debian.org
Fri Sep 1 06:39:32 UTC 2017
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository nanopolish.
commit e3ac02838d4c1f135f9d052eb481ee61ab916b50
Author: Andreas Tille <tille at debian.org>
Date: Fri Sep 1 08:37:38 2017 +0200
Refresh patches
---
debian/patches/adjust-include-path.patch | 39 ++----------------
debian/patches/compiler-flags.patch | 20 ++-------
debian/patches/external-libs.patch | 40 +++++++-----------
debian/patches/fast5-0.5.6.patch | 33 ---------------
debian/patches/fix-ftbfs-with-gcc6.patch | 14 -------
debian/patches/gcc-7.patch | 70 --------------------------------
debian/patches/reproducible.patch | 6 +--
debian/patches/series | 3 --
8 files changed, 25 insertions(+), 200 deletions(-)
diff --git a/debian/patches/adjust-include-path.patch b/debian/patches/adjust-include-path.patch
index 44ce571..b54e934 100644
--- a/debian/patches/adjust-include-path.patch
+++ b/debian/patches/adjust-include-path.patch
@@ -4,46 +4,13 @@ Description: Adjust #include statements
Author: Afif Elghraoui <afif at debian.org>
Forwarded: https://github.com/jts/nanopolish/pull/33
Last-Update: 2016-08-11
---- nanopolish.orig/src/nanopolish_poremodel.cpp
-+++ nanopolish/src/nanopolish_poremodel.cpp
-@@ -11,7 +11,7 @@
- #include <sstream>
- #include <cstring>
- #include <bits/stl_algo.h>
--#include "../fast5/src/fast5.hpp"
-+#include <fast5.hpp>
-
- void PoreModel::bake_gaussian_parameters()
- {
---- nanopolish.orig/src/nanopolish_poremodel.h
-+++ nanopolish/src/nanopolish_poremodel.h
-@@ -15,7 +15,7 @@
- #include <string>
- #include <map>
- #include "nanopolish_model_names.h"
--#include "../fast5/src/fast5.hpp"
-+#include <fast5.hpp>
-
- //
- struct PoreModelStateParams
---- nanopolish.orig/src/nanopolish_squiggle_read.cpp
-+++ nanopolish/src/nanopolish_squiggle_read.cpp
-@@ -11,7 +11,7 @@
- #include "nanopolish_squiggle_read.h"
- #include "nanopolish_pore_model_set.h"
- #include "nanopolish_methyltrain.h"
--#include "src/fast5.hpp"
-+#include <fast5.hpp>
-
- //
- SquiggleRead::SquiggleRead(const std::string& name, const std::string& path, const uint32_t flags) :
---- nanopolish.orig/src/nanopolish_methyltrain.cpp
-+++ nanopolish/src/nanopolish_methyltrain.cpp
+--- a/src/nanopolish_methyltrain.cpp
++++ b/src/nanopolish_methyltrain.cpp
@@ -42,7 +42,7 @@
#include "logger.hpp"
#include "nanopolish_scorereads.h"
--#include "../eigen/Eigen/Dense"
+-#include "Eigen/Dense"
+#include <eigen3/Eigen/Dense>
extern float g_p_skip, g_p_skip_self, g_p_bad, g_p_bad_self;
diff --git a/debian/patches/compiler-flags.patch b/debian/patches/compiler-flags.patch
index 6e32878..cf29691 100644
--- a/debian/patches/compiler-flags.patch
+++ b/debian/patches/compiler-flags.patch
@@ -4,24 +4,12 @@ Description: Allow adding settings to standard compiler flags
Author: Afif Elghraoui <afif at debian.org>
Forwarded: no
Last-Update: 2016-08-11
---- nanopolish.orig/Makefile
-+++ nanopolish/Makefile
-@@ -9,9 +9,9 @@
-
- #Basic flags every build needs
- LIBS=-lz
--CXXFLAGS = -g -O3
-+CXXFLAGS += -g -O3
- CXXFLAGS += -std=c++11 -fopenmp
--CFLAGS=-O3
-+CFLAGS += -O3
- CXX=g++
- CC=gcc
- HDF5=install
-@@ -108,11 +108,11 @@
+--- a/Makefile
++++ b/Makefile
+@@ -120,11 +120,11 @@ include .depend
# Link main executable
- $(PROGRAM): src/main/nanopolish.o $(CPP_OBJ) $(C_OBJ) $(HTS_LIB) $(H5_LIB) $(EIGEN)
+ $(PROGRAM): src/main/nanopolish.o $(CPP_OBJ) $(C_OBJ) $(HTS_LIB) $(H5_LIB) $(EIGEN_CHECK)
- $(CXX) -o $@ $(CXXFLAGS) $(CPPFLAGS) -fPIC $< $(CPP_OBJ) $(C_OBJ) $(HTS_LIB) $(H5_LIB) $(LIBS)
+ $(CXX) -o $@ $(CXXFLAGS) $(CPPFLAGS) -fPIC $< $(CPP_OBJ) $(C_OBJ) $(HTS_LIB) $(H5_LIB) $(LIBS) $(LDFLAGS)
diff --git a/debian/patches/external-libs.patch b/debian/patches/external-libs.patch
index 3f11455..0c3f382 100644
--- a/debian/patches/external-libs.patch
+++ b/debian/patches/external-libs.patch
@@ -4,40 +4,30 @@ Description: Set up build system to use externally installed libraries
Author: Afif Elghraoui <afif at ghraoui.name>
Forwarded: not-needed
Last-Update: 2016-01-18
---- nanopolish.orig/Makefile
-+++ nanopolish/Makefile
-@@ -14,7 +14,6 @@
- CFLAGS += -O3
- CXX=g++
- CC=gcc
+--- a/Makefile
++++ b/Makefile
+@@ -16,7 +16,6 @@ CXX ?= g++
+ CC ?= gcc
+
+ # Change the value of HDF5 or EIGEN below to any value to disable compilation of bundled HDF5 code
-HDF5=install
+ EIGEN=install
# Check operating system, OSX doesn't have -lrt
- UNAME_S := $(shell uname -s)
-@@ -34,9 +33,7 @@
- LIBS += -lhdf5
+@@ -46,14 +45,13 @@ else
endif
--# Bulild and link the libhts submodule
+ # Build and link the libhts submodule
-HTS_LIB=./htslib/libhts.a
-HTS_INCLUDE=-I./htslib
+LIBS += -lhts
# Include the header-only fast5 library
- FAST5_INCLUDE=-I./fast5
-@@ -68,13 +65,10 @@
- cd hdf5-1.8.14; ./configure --enable-threadsafe --prefix=`pwd`/..; make; make install
-
-
--# Download and install eigen if not already downloaded
--EIGEN=eigen/INSTALL
-+# Don't use external EIGEN
-+EIGEN=
+ FAST5_INCLUDE=-I./fast5/src
- $(EIGEN):
-- wget http://bitbucket.org/eigen/eigen/get/3.2.5.tar.bz2
-- tar -xjvf 3.2.5.tar.bz2
-- mv eigen-eigen-bdd17ee3b1b3 eigen
+ # Include the header-only eigen library
+-EIGEN_INCLUDE=-I./eigen/
++EIGEN_INCLUDE=-I/usr/include/eigen3/
- #
- # Source files
+ # Include the src subdirectories
+ NP_INCLUDE=$(addprefix -I./, $(SUBDIRS))
diff --git a/debian/patches/fast5-0.5.6.patch b/debian/patches/fast5-0.5.6.patch
deleted file mode 100644
index 4bffb27..0000000
--- a/debian/patches/fast5-0.5.6.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Description: Fix compatibility with fast5 0.5.6
-Author: Afif Elghraoui <afif at debian.org>
-Forwarded: https://github.com/jts/nanopolish/pull/61
-Last-Update: 2016-08-11
---- nanopolish.orig/src/nanopolish_squiggle_read.cpp
-+++ nanopolish/src/nanopolish_squiggle_read.cpp
-@@ -119,7 +119,7 @@
- }
- }
-
-- read_sequence = f_p->get_basecall_seq(basecall_group, read_type);
-+ read_sequence = f_p->get_basecall_seq(read_type, basecall_group);
-
- // Load PoreModel for both strands
- std::vector<EventRangeForBase> event_maps_1d[NUM_STRANDS];
-@@ -139,7 +139,7 @@
- }
-
- // Load the events for this strand
-- std::vector<fast5::Event_Entry> f5_events = f_p->get_basecall_events(event_group, si);
-+ std::vector<fast5::Event_Entry> f5_events = f_p->get_basecall_events(si, event_group);
-
- // copy events
- events[si].resize(f5_events.size());
-@@ -161,7 +161,7 @@
- // or discarded if this is a 2D read
-
- // NB we use event_group in this call rather than basecall_group as we want the 1D basecalls that match the events
-- read_sequences_1d[si] = f_p->get_basecall_seq(event_group, si == 0 ? SRT_TEMPLATE : SRT_COMPLEMENT);
-+ read_sequences_1d[si] = f_p->get_basecall_seq(si == 0 ? SRT_TEMPLATE : SRT_COMPLEMENT, event_group);
- event_maps_1d[si] = build_event_map_1d(f_p, read_sequences_1d[si], si, f5_events);
- std::vector<EventAlignment> alignment =
- get_eventalignment_for_1d_basecalls(read_sequences_1d[si], event_maps_1d[si], 5, si);
diff --git a/debian/patches/fix-ftbfs-with-gcc6.patch b/debian/patches/fix-ftbfs-with-gcc6.patch
deleted file mode 100644
index 534261f..0000000
--- a/debian/patches/fix-ftbfs-with-gcc6.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Description: fix build with GCC6
-Author: Sascha Steinbiss <satta at debian.org>
---- nanopolish.orig/src/common/nanopolish_variant.cpp
-+++ nanopolish/src/common/nanopolish_variant.cpp
-@@ -29,7 +29,8 @@
- const std::string& haplotype)
- {
- AlnParam par = aln_param_nt2nt;
-- par.band_width = std::max(20, abs(reference.size() - haplotype.size()) * 2);
-+ size_t difference = std::abs(reference.size() - haplotype.size());
-+ par.band_width = std::max((size_t) 20, difference * 2);
- AlnAln* aln = aln_stdaln(reference.c_str(), haplotype.c_str(), &par, 1, 1);
-
- // Make aligned strings where gaps are padded with '-'
diff --git a/debian/patches/gcc-7.patch b/debian/patches/gcc-7.patch
deleted file mode 100644
index a8bda2b..0000000
--- a/debian/patches/gcc-7.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-Autor: Andreas Tille <tille at debian.org>,
- Walter Landry <wlandry at caltech.edu>
-last-Update: Thu, 31 Aug 2017 23:33:00 +0200
-Bug-Debian: https://bugs.debian.org/853568
-Description: Make sure abs() gets int arguments
-
---- a/src/alignment/nanopolish_eventalign.cpp
-+++ b/src/alignment/nanopolish_eventalign.cpp
-@@ -679,7 +679,7 @@ std::vector<EventAlignment> align_read_t
- // over very large deletions wrt to the reference. The effect of this
- // is that we can get segments that have very few alignable events. We
- // just stop processing them for now
-- if(abs(input.event_start_idx - input.event_stop_idx) < 2)
-+ if(abs(static_cast<int>((input.event_start_idx - input.event_stop_idx)) < 2)
- break;
-
- input.strand = params.strand_idx;
---- a/src/common/nanopolish_variant.cpp
-+++ b/src/common/nanopolish_variant.cpp
-@@ -29,7 +29,7 @@ std::vector<Variant> extract_variants(co
- const std::string& haplotype)
- {
- AlnParam par = aln_param_nt2nt;
-- size_t difference = std::abs(reference.size() - haplotype.size());
-+ size_t difference = std::abs(static_cast<ptrdiff_t>(reference.size() - haplotype.size()));
- par.band_width = std::max((size_t) 20, difference * 2);
- AlnAln* aln = aln_stdaln(reference.c_str(), haplotype.c_str(), &par, 1, 1);
-
---- a/src/hmm/nanopolish_profile_hmm.cpp
-+++ b/src/hmm/nanopolish_profile_hmm.cpp
-@@ -290,7 +290,7 @@ void print_alignment(const std::string&
- double time_start = data.read->events[data.strand][data.event_start_idx].start_time;
- double time_end = data.read->events[data.strand][data.event_stop_idx].start_time;
- double total_duration = fabs(time_start - time_end);
-- double num_events = abs(data.event_start_idx - data.event_stop_idx) + 1;
-+ double num_events = abs(static_cast<int>(data.event_start_idx - data.event_stop_idx)) + 1;
- double final_lp = alignment[alignment.size() - 1].l_fm;
- double mean_lp = final_lp / num_events;
-
---- a/src/nanopolish_call_variants.cpp
-+++ b/src/nanopolish_call_variants.cpp
-@@ -392,7 +392,7 @@ void print_debug_stats(const std::string
- const HMMInputData& data = event_sequences[i];
-
- // summarize score
-- double num_events = abs(data.event_start_idx - data.event_stop_idx) + 1;
-+ double num_events = abs(static_cast<int>(data.event_start_idx - data.event_stop_idx)) + 1;
- double base_score = profile_hmm_score(base_haplotype.get_sequence(), data, alignment_flags);
- double called_score = profile_hmm_score(called_haplotype.get_sequence(), data, alignment_flags);
- double base_avg = base_score / num_events;
-@@ -548,7 +548,7 @@ Haplotype fix_homopolymers(const Haploty
- assert(kmer_size == 6);
-
- // skip small event regions
-- if( abs(event_sequences[j].event_start_idx - event_sequences[j].event_stop_idx) < 10) {
-+ if( abs(static_cast<int>(event_sequences[j].event_start_idx - event_sequences[j].event_stop_idx)) < 10) {
- continue;
- }
-
---- a/src/nanopolish_consensus.cpp
-+++ b/src/nanopolish_consensus.cpp
-@@ -531,7 +531,7 @@ void filter_outlier_data(std::vector<HMM
- const HMMInputData& rs = input[ri];
-
- double curr = score_sequence(sequence, rs);
-- double n_events = abs(rs.event_start_idx - rs.event_stop_idx) + 1.0f;
-+ double n_events = abs(static_cast<int>(rs.event_start_idx - rs.event_stop_idx)) + 1.0f;
- double lp_per_event = curr / n_events;
-
- if(opt::verbose >= 1) {
diff --git a/debian/patches/reproducible.patch b/debian/patches/reproducible.patch
index a96a7f3..2191158 100644
--- a/debian/patches/reproducible.patch
+++ b/debian/patches/reproducible.patch
@@ -2,9 +2,9 @@ Description: make build reproducible
This patch enforces stable input file ordering w.r.t. source file gathering
via Make's 'wildcard' directive.
Author: Sascha Steinbiss <satta at debian.org>
---- nanopolish.orig/Makefile
-+++ nanopolish/Makefile
-@@ -75,8 +75,8 @@
+--- a/Makefile
++++ b/Makefile
+@@ -91,8 +91,8 @@ eigen/INSTALL:
#
# Find the source files by searching subdirectories
diff --git a/debian/patches/series b/debian/patches/series
index b30a50b..dacdb9f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,7 +2,4 @@ adjust-include-path.patch
compiler-flags.patch
external-libs.patch
add-shebang-to-script.patch
-fix-ftbfs-with-gcc6.patch
reproducible.patch
-fast5-0.5.6.patch
-gcc-7.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/nanopolish.git
More information about the debian-med-commit
mailing list