[med-svn] [Git][med-team/sga][debian/unstable] 9 commits: Use 2to3 to port to Python3

Andreas Tille gitlab at salsa.debian.org
Mon Sep 2 19:51:21 BST 2019



Andreas Tille pushed to branch debian/unstable at Debian Med / sga


Commits:
1db00556 by Andreas Tille at 2019-09-02T18:20:15Z
Use 2to3 to port to Python3

- - - - -
51d61e2d by Andreas Tille at 2019-09-02T18:21:00Z
Adjust (Build-)Depends

- - - - -
0d89879e by Andreas Tille at 2019-09-02T18:21:23Z
debhelper-compat 12

- - - - -
2b4b5b8b by Andreas Tille at 2019-09-02T18:21:26Z
Standards-Version: 4.4.0

- - - - -
db1be50f by Andreas Tille at 2019-09-02T18:21:27Z
Secure URI in copyright format

- - - - -
9f9ad8bd by Andreas Tille at 2019-09-02T18:21:27Z
Trim trailing whitespace.

Fixes lintian: file-contains-trailing-whitespace
See https://lintian.debian.org/tags/file-contains-trailing-whitespace.html for more details.

- - - - -
b9723af4 by Andreas Tille at 2019-09-02T18:21:29Z
Set fields Upstream-Contact in debian/copyright.
- - - - -
79cdf7b8 by Andreas Tille at 2019-09-02T18:21:30Z
Remove obsolete fields Name, Contact from debian/upstream/metadata.
- - - - -
424abe8d by Andreas Tille at 2019-09-02T18:41:23Z
s/python/python3/

- - - - -


8 changed files:

- debian/changelog
- − debian/compat
- debian/control
- debian/copyright
- + debian/patches/2to3.patch
- debian/patches/series
- debian/rules
- debian/upstream/metadata


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,16 @@
+sga (0.10.15-5) UNRELEASED; urgency=medium
+
+  * Use 2to3 to port to Python3
+    Closes: 938472
+  * debhelper-compat 12
+  * Standards-Version: 4.4.0
+  * Secure URI in copyright format
+  * Trim trailing whitespace.
+  * Set fields Upstream-Contact in debian/copyright.
+  * Remove obsolete fields Name, Contact from debian/upstream/metadata.
+
+ -- Andreas Tille <tille at debian.org>  Mon, 02 Sep 2019 20:18:33 +0200
+
 sga (0.10.15-4) unstable; urgency=medium
 
   * debhelper 11


=====================================
debian/compat deleted
=====================================
@@ -1 +0,0 @@
-11


=====================================
debian/control
=====================================
@@ -4,7 +4,7 @@ Uploaders: Michael R. Crusoe <michael.crusoe at gmail.com>,
            Andreas Tille <tille at debian.org>
 Section: science
 Priority: optional
-Build-Depends: debhelper (>= 11~),
+Build-Depends: debhelper-compat (= 12),
                libsparsehash-dev,
                zlib1g-dev | libz-dev,
                libbamtools-dev,
@@ -13,10 +13,10 @@ Build-Depends: debhelper (>= 11~),
 # Run-Time Depends
 # (to prevent building on architectures where it won't be installable)
                samtools,
-               python,
-               python-ruffus,
-               python-pysam
-Standards-Version: 4.2.1
+               python3,
+               python3-ruffus,
+               python3-pysam
+Standards-Version: 4.4.0
 Vcs-Browser: https://salsa.debian.org/med-team/sga
 Vcs-Git: https://salsa.debian.org/med-team/sga.git
 Homepage: https://github.com/jts/sga
@@ -26,9 +26,9 @@ Architecture: any
 Depends: ${shlibs:Depends},
          ${misc:Depends},
          samtools,
-         python,
-         python-ruffus,
-         python-pysam
+         python3,
+         python3-ruffus,
+         python3-pysam
 Recommends: abyss (>= 2.0.2-1)
 Description: de novo genome assembler that uses string graphs
  The major goal of SGA is to be very memory efficient, which is achieved by


=====================================
debian/copyright
=====================================
@@ -1,6 +1,7 @@
-Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: sga
 Source: https://github.com/jts/sga
+Upstream-Contact: http://groups.google.com/group/sga-users
 
 Files: *
 Copyright: 2009-2012 Jared T. Simpson <js18 at sanger.ac.uk>
@@ -87,4 +88,3 @@ License: Expat
  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.
-


=====================================
debian/patches/2to3.patch
=====================================
@@ -0,0 +1,95 @@
+Description: Use 2to3 to port to Python3
+Bug-Debian: https://bugs.debian.org/938472
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Mon, 02 Sep 2019 20:18:33 +0200
+
+
+--- a/src/bin/sga-astat.py
++++ b/src/bin/sga-astat.py
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/python3
+ #
+ # sga-astat.py - Compute Myers' a-statistic for a set of contigs using read alignments
+ # in a bam file
+@@ -30,20 +30,20 @@ genomeSize = 0
+ arrivalRate = 0
+ 
+ def usage():
+-    print 'usage: sga-astat.py in.bam'
+-    print 'Compute Myers\' a-statistic for a set of contigs using the read alignments in in.bam'
+-    print 'Options:'
+-    print '    -m=INT          only compute a-stat for contigs at least INT bases in length'
+-    print '    -b=INT          use the longest INT contigs to perform the initial estimate'
+-    print '                    of the arrival rate (default: ' + str(numContigsForInitialEstimate) + ')' 
+-    print '    -n=INT          perform INT bootstrap iterations of the estimate'
+-    print '    -g=INT          use INT as the genome size instead of estimating it'
+-    print '    --no-duplicates do not use duplicate reads to calculate statistics'
++    print('usage: sga-astat.py in.bam')
++    print('Compute Myers\' a-statistic for a set of contigs using the read alignments in in.bam')
++    print('Options:')
++    print('    -m=INT          only compute a-stat for contigs at least INT bases in length')
++    print('    -b=INT          use the longest INT contigs to perform the initial estimate')
++    print('                    of the arrival rate (default: ' + str(numContigsForInitialEstimate) + ')') 
++    print('    -n=INT          perform INT bootstrap iterations of the estimate')
++    print('    -g=INT          use INT as the genome size instead of estimating it')
++    print('    --no-duplicates do not use duplicate reads to calculate statistics')
+ 
+ try:
+     opts, args = getopt.gnu_getopt(sys.argv[1:], 'm:b:n:g:', ['help', 'no-duplicates'])
+-except getopt.GetoptError, err:
+-        print str(err)
++except getopt.GetoptError as err:
++        print(str(err))
+         usage()
+         sys.exit(2)
+ 
+@@ -63,7 +63,7 @@ for (oflag, oarg) in opts:
+             sys.exit(1)
+ 
+ if len(args) == 0:
+-    print 'Error: a BAM file must be provided\n'
++    print('Error: a BAM file must be provided\n')
+     usage()
+     sys.exit(2)
+ 
+@@ -172,7 +172,7 @@ sumUnique = 0
+ sumRepeat = 0
+ for cd in contigData:
+     if cd.len >= minLength and cd.nlen > 0:
+-        print '%s\t%d\t%d\t%d\t%f\t%f' % (cd.name, cd.len, cd.nlen, cd.n, cd.n / (cd.nlen * arrivalRate), cd.astat)
++        print('%s\t%d\t%d\t%d\t%f\t%f' % (cd.name, cd.len, cd.nlen, cd.n, cd.n / (cd.nlen * arrivalRate), cd.astat))
+         
+         if cd.bUnique:
+             sumUnique += cd.len
+--- a/src/bin/sga-preqc-report.py
++++ b/src/bin/sga-preqc-report.py
+@@ -1,8 +1,8 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ """Generate a readable report from preqc output.
+ """
+ 
+-from __future__ import print_function, division
++
+ 
+ import sys, os.path
+ import matplotlib as MPL
+@@ -458,7 +458,7 @@ def plot_mean_quality_scores(ax, data, l
+             'mean_quality' in d[QUALITY_SCORE_NAME] ):
+             names.append(d['name'])
+             mean_quality = d[QUALITY_SCORE_NAME]['mean_quality']
+-            indices = range(0, len(mean_quality))
++            indices = list(range(0, len(mean_quality)))
+             marker = d['plot_marker'] if( use_markers ) else None
+             ax.plot(indices, mean_quality, '-',
+                     marker=marker, color=d['plot_color'])
+@@ -478,7 +478,7 @@ def plot_q30_quality_scores(ax, data, le
+             'fraction_q30' in d[QUALITY_SCORE_NAME] ):
+             names.append(d['name'])
+             q30_fraction = d[QUALITY_SCORE_NAME]['fraction_q30']
+-            indices = range(0, len(q30_fraction))
++            indices = list(range(0, len(q30_fraction)))
+             marker = d['plot_marker'] if( use_markers ) else None
+             ax.plot(indices, q30_fraction, '-',
+                     marker=marker, color=d['plot_color'])


=====================================
debian/patches/series
=====================================
@@ -6,3 +6,4 @@
 0006-remove-google-addsense.patch
 gcc-7.patch
 no_privacy_breach_url.patch
+2to3.patch


=====================================
debian/rules
=====================================
@@ -53,4 +53,3 @@ override_dh_installman:
 		--name="generate sga merge commands from a list of files" \
 		--output $(mandir)/sga-mergeDriver.1 \
 		$(bindir)/sga-mergeDriver
-


=====================================
debian/upstream/metadata
=====================================
@@ -1,27 +1,25 @@
-Contact: http://groups.google.com/group/sga-users
 FAQ: https://github.com/jts/sga/wiki/FAQ
-Name: SGA (String Graph Assembler)
 Reference:
- Author: Jared T. Simpson and Richard Durbin
- DOI: 10.1101/gr.126953.111
- Eprint: http://genome.cshlp.org/content/22/3/549.full.pdf
- Journal: Genome Res
- Number: 3
- Pages: 549-555
- PMID: 22156294
- Title: Efficient de novo assembly of large genomes using compressed data structures.
- Type: article
- URL: http://genome.cshlp.org/content/22/3/549.abstract
- Volume: 22
- Year: 2012
+  Author: Jared T. Simpson and Richard Durbin
+  DOI: 10.1101/gr.126953.111
+  Eprint: http://genome.cshlp.org/content/22/3/549.full.pdf
+  Journal: Genome Res
+  Number: 3
+  Pages: 549-555
+  PMID: 22156294
+  Title: Efficient de novo assembly of large genomes using compressed data structures.
+  Type: article
+  URL: http://genome.cshlp.org/content/22/3/549.abstract
+  Volume: 22
+  Year: 2012
 Repository: git://github.com/jts/sga.git
 Repository-Browse: https://github.com/jts/sga/tree/master/src
 Bug-Database: https://github.com/jts/sga/issues
 Bug-Submit: https://github.com/jts/sga/issues/new
 Registry:
- - Name: OMICtools
-   Entry: OMICS_00028
- - Name: bio.tools
-   Entry: SGA
- - Name: SciCrunch
-   Entry: SCR_001982
+- Name: OMICtools
+  Entry: OMICS_00028
+- Name: bio.tools
+  Entry: SGA
+- Name: SciCrunch
+  Entry: SCR_001982



View it on GitLab: https://salsa.debian.org/med-team/sga/compare/1dc3d29ba6f22edfc01969b55ac9ec4c114e20e1...424abe8d350549bd96232876639f6784c0baef63

-- 
View it on GitLab: https://salsa.debian.org/med-team/sga/compare/1dc3d29ba6f22edfc01969b55ac9ec4c114e20e1...424abe8d350549bd96232876639f6784c0baef63
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/20190902/25fb8d92/attachment-0001.html>


More information about the debian-med-commit mailing list