diff options
author | Etienne Mollier <emollier@debian.org> | 2022-12-18 15:44:41 +0100 |
---|---|---|
committer | Etienne Mollier <emollier@debian.org> | 2022-12-18 15:44:41 +0100 |
commit | b28a53fee6ee50bfdc0726f25a6d6c175de497d9 (patch) | |
tree | 978f0cd30d6551b32f78f4f8d4d84a549bbd9f1d | |
parent | f8187a5a2ac369ede6fd1fb36ce3c0af91ddc0ff (diff) |
biopython-1.80.patch: add; migrate away from Bio.SubsMat.
This patch fixes build time test failures with Biopython 1.80 caused
by removal of Bio.SubsMat in favor of Bio.Align.substitution_matrices.
Closes: 1024835
-rw-r--r-- | debian/patches/biopython-1.80.patch | 52 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 53 insertions, 0 deletions
diff --git a/debian/patches/biopython-1.80.patch b/debian/patches/biopython-1.80.patch new file mode 100644 index 0000000..828bc0e --- /dev/null +++ b/debian/patches/biopython-1.80.patch @@ -0,0 +1,52 @@ +Description: port python-pauvre to python-biopython 1.80. +Author: Étienne Mollier <emollier@debian.org> +Bug: https://github.com/conchoecia/pauvre/issues/45 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1024835 +Forwarded: https://github.com/conchoecia/pauvre/pull/46 +Last-Update: 2022-12-18 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- python-pauvre.orig/pauvre/browser.py ++++ python-pauvre/pauvre/browser.py +@@ -49,7 +49,6 @@ + + # Biopython stuff + from Bio import SeqIO +-import Bio.SubsMat.MatrixInfo as MI + + + class PlotCommand: +--- python-pauvre.orig/pauvre/synplot.py ++++ python-pauvre/pauvre/synplot.py +@@ -43,7 +43,7 @@ + + # Biopython stuff + from Bio import SeqIO +-import Bio.SubsMat.MatrixInfo as MI ++from Bio.Align import substitution_matrices + + # following this tutorial to install helvetica + # https://github.com/olgabot/sciencemeetproductivity.tumblr.com/blob/master/posts/2012/11/how-to-set-helvetica-as-the-default-sans-serif-font-in.md +@@ -171,8 +171,9 @@ + def black_colormap(): + zeroone = np.linspace(0, 1, 100) + colorrange = [(0,0,0,x) for x in zeroone] +- minblosum = min(MI.blosum62.values()) +- maxblosum = max(MI.blosum62.values()) ++ blosumvals = substitution_matrices.load("BLOSUM62").values() ++ minblosum = int(min(blosumvals)) ++ maxblosum = int(max(blosumvals)) + colormap = {i: colorrange[int(translate(i, minblosum, maxblosum, 0, 99))] + for i in range(minblosum, maxblosum + 1, 1)} + return colormap +@@ -479,7 +480,9 @@ + # this needs to be increased by the bar_thickness (0.9 * track_width in this case, or 0.09) + y2 = len(optGFFs) - 2 - i + myPatches = plot_synteny(seq1, ind1, seq2, ind2, y1, y2, +- featType, MI.blosum62, cm, seqname) ++ featType, ++ substitution_matrices.load("BLOSUM62"), ++ cm, seqname) + for patch in myPatches: + allPatches.append(patch) + diff --git a/debian/patches/series b/debian/patches/series index c1f6c9b..a834f08 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ 2to3.patch lsi-test-args.patch +biopython-1.80.patch |