[med-svn] [Git][med-team/nanopolish][master] Run 2to3 to try Python3 port

Andreas Tille gitlab at salsa.debian.org
Wed Aug 7 19:44:49 BST 2019



Andreas Tille pushed to branch master at Debian Med / nanopolish


Commits:
eaa7978b by Andreas Tille at 2019-08-07T18:44:26Z
Run 2to3 to try Python3 port

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/2to3.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+nanopolish (0.11.1-2) UNRELEASED; urgency=medium
+
+  * Run 2to3 to try Python3 port
+
+ -- Andreas Tille <tille at debian.org>  Wed, 07 Aug 2019 20:38:25 +0200
+
 nanopolish (0.11.1-1) unstable; urgency=medium
 
   * Afif Elghraoui removed himself from Uploaders


=====================================
debian/patches/2to3.patch
=====================================
@@ -0,0 +1,174 @@
+Description: Run 2to3 to try Python3 port
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Wed, 07 Aug 2019 20:38:25 +0200
+
+--- a/docs/source/conf.py
++++ b/docs/source/conf.py
+@@ -45,18 +45,18 @@ source_suffix = '.rst'
+ master_doc = 'index'
+ 
+ # General information about the project.
+-project = u'Nanopolish'
+-copyright = u'2017, Simpson Lab'
+-author = u'Simpson Lab'
++project = 'Nanopolish'
++copyright = '2017, Simpson Lab'
++author = 'Simpson Lab'
+ 
+ # The version info for the project you're documenting, acts as replacement for
+ # |version| and |release|, also used in various other places throughout the
+ # built documents.
+ #
+ # The short X.Y version.
+-version = u'0.8.4'
++version = '0.8.4'
+ # The full version, including alpha/beta/rc tags.
+-release = u'0.8.4'
++release = '0.8.4'
+ 
+ # The language for content autogenerated by Sphinx. Refer to documentation
+ # for a list of supported languages.
+@@ -138,8 +138,8 @@ latex_elements = {
+ # (source start file, target name, title,
+ #  author, documentclass [howto, manual, or own class]).
+ latex_documents = [
+-    (master_doc, 'Nanopolish.tex', u'Nanopolish Documentation',
+-     u'Simpson Lab', 'manual'),
++    (master_doc, 'Nanopolish.tex', 'Nanopolish Documentation',
++     'Simpson Lab', 'manual'),
+ ]
+ 
+ 
+@@ -148,7 +148,7 @@ latex_documents = [
+ # One entry per manual page. List of tuples
+ # (source start file, name, description, authors, manual section).
+ man_pages = [
+-    (master_doc, 'nanopolish', u'Nanopolish Documentation',
++    (master_doc, 'nanopolish', 'Nanopolish Documentation',
+      [author], 1)
+ ]
+ 
+@@ -159,7 +159,7 @@ man_pages = [
+ # (source start file, target name, title, author,
+ #  dir menu entry, description, category)
+ texinfo_documents = [
+-    (master_doc, 'Nanopolish', u'Nanopolish Documentation',
++    (master_doc, 'Nanopolish', 'Nanopolish Documentation',
+      author, 'Nanopolish', 'One line description of project.',
+      'Miscellaneous'),
+ ]
+--- a/scripts/calculate_methylation_frequency.py
++++ b/scripts/calculate_methylation_frequency.py
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/python3
+ 
+ import math
+ import sys
+@@ -71,7 +71,7 @@ for record in csv_reader:
+ # header
+ print("\t".join(["chromosome", "start", "end", "num_motifs_in_group", "called_sites", "called_sites_methylated", "methylated_frequency", "group_sequence"]))
+ 
+-sorted_keys = sorted(sites.keys(), key = lambda x: x)
++sorted_keys = sorted(list(sites.keys()), key = lambda x: x)
+ 
+ for key in sorted_keys:
+     if sites[key].called_sites > 0:
+--- a/scripts/convert_all_models.py
++++ b/scripts/convert_all_models.py
+@@ -1,4 +1,4 @@
+-from __future__ import print_function
++
+ 
+ import sys
+ import os.path
+--- a/scripts/convert_model_to_header.py
++++ b/scripts/convert_model_to_header.py
+@@ -1,6 +1,6 @@
+-#! /usr/bin/env python
++#!/usr/bin/python3
+ # Convert a .model file into a .inl file that can be directly compiled into nanopolish
+-from __future__ import print_function
++
+ 
+ import argparse
+ 
+--- a/scripts/extract_reads_aligned_to_region.py
++++ b/scripts/extract_reads_aligned_to_region.py
+@@ -1,11 +1,11 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ """
+ ========================================================
+ Extract info on reads that align to a given region
+ in draft genome assembly.
+ ========================================================
+ """
+-from __future__ import print_function
++
+ 
+ try:
+ 	from Bio.SeqIO.FastaIO import SimpleFastaParser
+@@ -186,7 +186,7 @@ def main():
+ 	bad_read_id = ""
+ 	bad_f5_path = ""
+ 	num_bad_cases = 0
+-	for r in region_fast5_files.keys():
++	for r in list(region_fast5_files.keys()):
+ 		read_id = r
+ 		f5 = region_fast5_files[r]
+ 
+--- a/scripts/nanopolish_makerange.py
++++ b/scripts/nanopolish_makerange.py
+@@ -1,5 +1,5 @@
+-#! /usr/bin/env python
+-from __future__ import print_function
++#!/usr/bin/python3
++
+ 
+ import sys
+ import argparse
+--- a/scripts/nanopolish_merge.py
++++ b/scripts/nanopolish_merge.py
+@@ -1,4 +1,4 @@
+-from __future__ import print_function
++
+ 
+ import sys
+ import glob
+--- a/scripts/reestimate_polya_emissions.py
++++ b/scripts/reestimate_polya_emissions.py
+@@ -117,7 +117,7 @@ def make_segmentation_dict(segmentations
+         headers = ['tag', 'read_id', 'pos', 'L_start', 'A_start', 'P_start', 'P_end', 'rate', 'plen', 'alen']
+         rdr = csv.DictReader(f, delimiter='\t', quoting=csv.QUOTE_NONE, fieldnames=headers)
+         for row in rdr:
+-            if row['read_id'] not in segments.keys():
++            if row['read_id'] not in list(segments.keys()):
+                 segments[row['read_id']] = { 'L_start': int(float(row['L_start'])),
+                                              'A_start': int(float(row['A_start'])),
+                                              'P_start': int(float(row['P_start'])),
+@@ -138,7 +138,7 @@ def region_search(read_id, sample_ix, se
+     """
+     # find read ID in segmentations:
+     read_key = None
+-    for long_read_id in segmentations.keys():
++    for long_read_id in list(segmentations.keys()):
+         if long_read_id[0:len(read_id)] == read_id:
+             read_key = long_read_id
+ 
+--- a/scripts/dropmodel.py
++++ b/scripts/dropmodel.py
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/python3
+ # Generate a new model with a lower k-mer size than the input model
+ 
+ import sys
+--- a/scripts/import_ont_model.py
++++ b/scripts/import_ont_model.py
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python
++#!/usr/bin/python3
+ 
+ # This script takes a .model file provided by ONT and adds metadata that allows it
+ # to be compiled into nanopolish


=====================================
debian/patches/series
=====================================
@@ -1,2 +1,3 @@
 add-shebang-to-script.patch
 reproducible.patch
+2to3.patch



View it on GitLab: https://salsa.debian.org/med-team/nanopolish/commit/eaa7978bc52d3e4e92fdb6d5c94e2142964dd8ec

-- 
View it on GitLab: https://salsa.debian.org/med-team/nanopolish/commit/eaa7978bc52d3e4e92fdb6d5c94e2142964dd8ec
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/20190807/89d2877b/attachment-0001.html>


More information about the debian-med-commit mailing list