diff options
author | Étienne Mollier <emollier@debian.org> | 2022-12-18 15:56:49 +0100 |
---|---|---|
committer | Étienne Mollier <emollier@debian.org> | 2022-12-18 15:56:49 +0100 |
commit | 5e77729124b7c2c3d7676c408f7c0666d36e26ed (patch) | |
tree | b57995be3ceeb81a43b65b237523fa46ec76c8db | |
parent | 14912d3d77351e517e2f286e0b44f912a62ea6b0 (diff) |
port python-pauvre to python-biopython 1.80.
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
Last-Update: 2022-12-18
Gbp-Pq: Name biopython-1.80.patch
-rw-r--r-- | pauvre/browser.py | 1 | ||||
-rw-r--r-- | pauvre/synplot.py | 11 |
2 files changed, 7 insertions, 5 deletions
diff --git a/pauvre/browser.py b/pauvre/browser.py index d6b96ec..75d1a4d 100644 --- a/pauvre/browser.py +++ b/pauvre/browser.py @@ -49,7 +49,6 @@ import time # Biopython stuff from Bio import SeqIO -import Bio.SubsMat.MatrixInfo as MI class PlotCommand: diff --git a/pauvre/synplot.py b/pauvre/synplot.py index 724a187..98d0b47 100644 --- a/pauvre/synplot.py +++ b/pauvre/synplot.py @@ -43,7 +43,7 @@ from itertools import product # 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 shuffle_optimize_gffs(args, GFFs): 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 @@ def synplot(args): # 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) |