[med-svn] [Git][med-team/python-biopython][master] 2 commits: Adapt to python3-scipy by taking over pull request

Andreas Tille gitlab at salsa.debian.org
Wed Aug 5 11:04:37 BST 2020



Andreas Tille pushed to branch master at Debian Med / python-biopython


Commits:
9bd2383c by Andreas Tille at 2020-08-05T11:33:39+02:00
Adapt to python3-scipy by taking over pull request
      https://github.com/biopython/biopython/pull/2998
    as quilt patch.

- - - - -
0cd5271c by Andreas Tille at 2020-08-05T12:04:21+02:00
Upload to unstable

- - - - -


4 changed files:

- debian/changelog
- + debian/patches/1c3504736d41e6f6d0931e6f2685f95e486b27c8.patch
- + debian/patches/71d9f4e2398d542d04001eabb1b467a6f3fdeecf.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,8 +1,14 @@
-python-biopython (1.77+dfsg-3) UNRELEASED; urgency=medium
+python-biopython (1.77+dfsg-3) unstable; urgency=medium
 
+  [ Etienne Mollier ]
   * Forwarded implementation of makeblastdb's `-blastdb_version` flag to
     upstream.  (minor change)
 
+  [ Andreas Tille ]
+  * Adapt to python3-scipy by taking over pull request
+      https://github.com/biopython/biopython/pull/2998
+    as quilt patch.
+
  -- Etienne Mollier <etienne.mollier at mailoo.org>  Mon, 22 Jun 2020 19:21:47 +0200
 
 python-biopython (1.77+dfsg-2) unstable; urgency=medium


=====================================
debian/patches/1c3504736d41e6f6d0931e6f2685f95e486b27c8.patch
=====================================
@@ -0,0 +1,29 @@
+From 1c3504736d41e6f6d0931e6f2685f95e486b27c8 Mon Sep 17 00:00:00 2001
+From: Zheng Ruan <zruan1991 at gmail.com>
+Date: Thu, 25 Jun 2020 08:37:20 -0400
+Subject: [PATCH] fix syntax issues for _ml method
+
+---
+ Bio/codonalign/codonseq.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/Bio/codonalign/codonseq.py b/Bio/codonalign/codonseq.py
+index 641d3dde92..81bf5ce33d 100644
+--- a/Bio/codonalign/codonseq.py
++++ b/Bio/codonalign/codonseq.py
+@@ -1185,6 +1185,7 @@ def func(
+                     pass
+     Sd *= t
+     Nd *= t
++
+     # count differences (with w fixed to 1)
+     def func_w1(
+         params, pi=pi, codon_cnt=codon_cnt, codon_lst=codon_lst, codon_table=codon_table
+@@ -1199,6 +1200,7 @@ def func_w1(
+             codon_lst=codon_lst,
+             codon_table=codon_table,
+         )
++
+     opt_res = minimize(
+         func_w1,
+         [1, 0.1],


=====================================
debian/patches/71d9f4e2398d542d04001eabb1b467a6f3fdeecf.patch
=====================================
@@ -0,0 +1,47 @@
+From 71d9f4e2398d542d04001eabb1b467a6f3fdeecf Mon Sep 17 00:00:00 2001
+From: Zheng Ruan <zruan1991 at gmail.com>
+Date: Wed, 24 Jun 2020 23:25:43 -0400
+Subject: [PATCH] fix the bound issue of _ml when using the minimize function
+ of scipy>=1.5.0
+
+---
+ Bio/codonalign/codonseq.py | 22 ++++++++++++++++++----
+ 1 file changed, 18 insertions(+), 4 deletions(-)
+
+diff --git a/Bio/codonalign/codonseq.py b/Bio/codonalign/codonseq.py
+index d4bf472bf6..641d3dde92 100644
+--- a/Bio/codonalign/codonseq.py
++++ b/Bio/codonalign/codonseq.py
+@@ -1186,14 +1186,28 @@ def func(
+     Sd *= t
+     Nd *= t
+     # count differences (with w fixed to 1)
++    def func_w1(
++        params, pi=pi, codon_cnt=codon_cnt, codon_lst=codon_lst, codon_table=codon_table
++    ):
++        """Temporary function, params = [t, k]. w is fixed to 1."""
++        return -_likelihood_func(
++            params[0],
++            params[1],
++            1.0,
++            pi,
++            codon_cnt,
++            codon_lst=codon_lst,
++            codon_table=codon_table,
++        )
+     opt_res = minimize(
+-        func,
+-        [1, 0.1, 2],
++        func_w1,
++        [1, 0.1],
+         method="L-BFGS-B",
+-        bounds=((1e-10, 20), (1e-10, 20), (1, 1)),
++        bounds=((1e-10, 20), (1e-10, 20)),
+         tol=1e-5,
+     )
+-    t, k, w = opt_res.x
++    t, k = opt_res.x
++    w = 1.0
+     Q = _get_Q(pi, k, w, codon_lst, codon_table)
+     rhoS = rhoN = 0
+     for i, c1 in enumerate(codon_lst):


=====================================
debian/patches/series
=====================================
@@ -2,3 +2,5 @@ remove_mathml-qname.patch
 privacy_breach.patch
 blastdbv4-impl.patch
 blastdbv4-test.patch
+71d9f4e2398d542d04001eabb1b467a6f3fdeecf.patch
+1c3504736d41e6f6d0931e6f2685f95e486b27c8.patch



View it on GitLab: https://salsa.debian.org/med-team/python-biopython/-/compare/f35e21fbe96f7345ecfb6859845af550e836f3fc...0cd5271cdd29c06262f71dd2e0e47e5f728ce8c1

-- 
View it on GitLab: https://salsa.debian.org/med-team/python-biopython/-/compare/f35e21fbe96f7345ecfb6859845af550e836f3fc...0cd5271cdd29c06262f71dd2e0e47e5f728ce8c1
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200805/54b9774d/attachment-0001.html>


More information about the debian-med-commit mailing list