Skip to content
Commits on Source (9)
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@debian.org> Mon, 02 Sep 2019 20:18:33 +0200
sga (0.10.15-4) unstable; urgency=medium
* debhelper 11
......
......@@ -4,7 +4,7 @@ Uploaders: Michael R. Crusoe <michael.crusoe@gmail.com>,
Andreas Tille <tille@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
......
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@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.
Description: Use 2to3 to port to Python3
Bug-Debian: https://bugs.debian.org/938472
Author: Andreas Tille <tille@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'])
......@@ -6,3 +6,4 @@
0006-remove-google-addsense.patch
gcc-7.patch
no_privacy_breach_url.patch
2to3.patch
......@@ -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
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
......