[med-svn] [python-biotools] 02/02: Fix prok-geneseek as well

Andreas Tille tille at debian.org
Thu Mar 2 12:36:51 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository python-biotools.

commit 58979bc8ac196223bfa415b592e2b68a00be87c5
Author: Andreas Tille <tille at debian.org>
Date:   Thu Mar 2 13:36:12 2017 +0100

    Fix prok-geneseek as well
---
 debian/patches/2to3.patch | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/debian/patches/2to3.patch b/debian/patches/2to3.patch
index ce87b3d..5bd36c1 100644
--- a/debian/patches/2to3.patch
+++ b/debian/patches/2to3.patch
@@ -1,3 +1,7 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Thu, 02 Mar 2017 11:51:33 +0100
+Description: Fix Python3 errors by using 2to3
+
 --- a/src/analysis/report.py
 +++ b/src/analysis/report.py
 @@ -43,7 +43,7 @@ def plot(plotdata, directory, bottom=Tru
@@ -30,3 +34,40 @@
 +    print('Average variance: ')
 +    print('\t', sum(snpdata['nt']['var']) / lnt, 'per base pair')
 +    print('\t', sum(snpdata['aa']['var']) / laa, 'per amino acid')
+--- a/prok-geneseek
++++ b/prok-geneseek
+@@ -40,16 +40,16 @@ if __name__ == "__main__":
+     report = report and calculate
+ 
+     if not (predict or cluster or rename or calculate or plot or report):
+-        print "I don't know what you want, I give up."
++        print("I don't know what you want, I give up.")
+         exit(0)
+ 
+     if predict:
+         names = pr.run(database, names)
+-        print "Homologous sequences written to " + direc + 'sequences' + sep
++        print("Homologous sequences written to " + direc + 'sequences' + sep)
+ 
+     if cluster:
+         names = cw.run(direc + 'clusters' + sep, names)
+-        print "Clustalw files written to " + direc + "clusters" + sep
++        print("Clustalw files written to " + direc + "clusters" + sep)
+ 
+     if rename:
+         names = mv.rename(direc + 'clusters' + sep, database, names)
+@@ -89,7 +89,7 @@ if __name__ == "__main__":
+                 cv.plot(plotdata, direc + 'plots' + sep,
+                         filename=metadata['filename'])
+             except Exception as e:
+-                print metadata['filename'], e
++                print(metadata['filename'], e)
+         if report:
+             try:
+                 os.mkdir(direc + 'data' + sep)
+@@ -99,4 +99,4 @@ if __name__ == "__main__":
+             fh = open(direc + 'data' + sep + metadata['strain'] + '.py', 'w')
+             fh.write('plotdata = ' + repr(plotdata) + '\n')
+             fh.write('metadata = ' + repr(metadata) + '\n')
+-    print "Done"
++    print("Done")

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-biotools.git



More information about the debian-med-commit mailing list