Codebase list python-pauvre / b28a53f
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 Etienne Mollier 1 year, 4 months ago
2 changed file(s) with 53 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 Description: port python-pauvre to python-biopython 1.80.
1 Author: Étienne Mollier <emollier@debian.org>
2 Bug: https://github.com/conchoecia/pauvre/issues/45
3 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1024835
4 Forwarded: https://github.com/conchoecia/pauvre/pull/46
5 Last-Update: 2022-12-18
6 ---
7 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
8 --- python-pauvre.orig/pauvre/browser.py
9 +++ python-pauvre/pauvre/browser.py
10 @@ -49,7 +49,6 @@
11
12 # Biopython stuff
13 from Bio import SeqIO
14 -import Bio.SubsMat.MatrixInfo as MI
15
16
17 class PlotCommand:
18 --- python-pauvre.orig/pauvre/synplot.py
19 +++ python-pauvre/pauvre/synplot.py
20 @@ -43,7 +43,7 @@
21
22 # Biopython stuff
23 from Bio import SeqIO
24 -import Bio.SubsMat.MatrixInfo as MI
25 +from Bio.Align import substitution_matrices
26
27 # following this tutorial to install helvetica
28 # https://github.com/olgabot/sciencemeetproductivity.tumblr.com/blob/master/posts/2012/11/how-to-set-helvetica-as-the-default-sans-serif-font-in.md
29 @@ -171,8 +171,9 @@
30 def black_colormap():
31 zeroone = np.linspace(0, 1, 100)
32 colorrange = [(0,0,0,x) for x in zeroone]
33 - minblosum = min(MI.blosum62.values())
34 - maxblosum = max(MI.blosum62.values())
35 + blosumvals = substitution_matrices.load("BLOSUM62").values()
36 + minblosum = int(min(blosumvals))
37 + maxblosum = int(max(blosumvals))
38 colormap = {i: colorrange[int(translate(i, minblosum, maxblosum, 0, 99))]
39 for i in range(minblosum, maxblosum + 1, 1)}
40 return colormap
41 @@ -479,7 +480,9 @@
42 # this needs to be increased by the bar_thickness (0.9 * track_width in this case, or 0.09)
43 y2 = len(optGFFs) - 2 - i
44 myPatches = plot_synteny(seq1, ind1, seq2, ind2, y1, y2,
45 - featType, MI.blosum62, cm, seqname)
46 + featType,
47 + substitution_matrices.load("BLOSUM62"),
48 + cm, seqname)
49 for patch in myPatches:
50 allPatches.append(patch)
51
00 2to3.patch
11 lsi-test-args.patch
2 biopython-1.80.patch