Skip to content
Commits on Source (9)
ssake (4.0-3) unstable; urgency=medium
* Use 2to3 to port to Python3
Closes: #938561
* Build-Depends: markdown instead of python-markdown
* debhelper-compat 12
* Standards-Version: 4.4.0
* Respect DEB_BUILD_OPTIONS in override_dh_auto_test target
* Remove trailing whitespace in debian/changelog
* Set fields Upstream-Name in debian/copyright.
* Remove obsolete fields Name from debian/upstream/metadata.
-- Andreas Tille <tille@debian.org> Thu, 05 Sep 2019 14:30:57 +0200
ssake (4.0-2) unstable; urgency=medium
* Fix installation of tools
......
......@@ -4,9 +4,9 @@ Uploaders: Andreas Tille <tille@debian.org>,
Charles Plessy <plessy@debian.org>
Section: science
Priority: optional
Build-Depends: debhelper (>= 11~),
python-markdown
Standards-Version: 4.2.1
Build-Depends: debhelper-compat (= 12),
markdown
Standards-Version: 4.4.0
Vcs-Browser: https://salsa.debian.org/med-team/ssake
Vcs-Git: https://salsa.debian.org/med-team/ssake.git
Homepage: http://www.bcgsc.ca/platform/bioinfo/software/ssake
......@@ -15,7 +15,7 @@ Package: ssake
Architecture: all
Depends: ${misc:Depends},
${perl:Depends},
python,
python3,
libperl4-corelibs-perl
Suggests: ssake-examples
Description: genomics application for assembling millions of very short DNA sequences
......
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: http://www.bcgsc.ca/platform/bioinfo/software/ssake/releases/3.8/ssake_v3-8-tar.gz
Upstream-Name: SSAKE
Files: *
Copyright: © 2006-2018 Canada's Michael Smith Genome Science Centre
......@@ -25,4 +26,3 @@ Copyright: © 2008-2018 Andreas Tille <tille@debian.org>
© 2009 Charles Plessy <plessy@debian.org>
License: Same-as-SSAKE-itelf
(see above)
Description: Use 2to3 to port to Python3
Bug-Debian: https://bugs.debian.org/938561
Author: Andreas Tille <tille@debian.org>
Last-Update: Thu, 05 Sep 2019 14:24:24 +0200
--- a/readme.md
+++ b/readme.md
@@ -188,7 +188,7 @@ SSAKE is implemented in PERL and runs on
Side-by-side comparison between ssake2.0 and vcake1.0 indicates that SSAKE is nearly 3-fold faster and yields contigs that are as contiguous and accurate.
-The python version 2.0 (released in ssake_v2.0.tar.gz and distributed under ./tools) has not yet been fully tested.
+The python3 version 2.0 (released in ssake_v2.0.tar.gz and distributed under ./tools) has not yet been fully tested.
Due to SSAKE's memory requirements, you would need a version
of the perl interpreter compiled for 64-bit computers if you intend to assemble millions of short sequences.
Development of SSAKE was done using perl v5.8.5 built for x86_64-linux-thread-multi
--- a/tools/TQS.py
+++ b/tools/TQS.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
__doc__ = """
TQS
@@ -53,18 +53,18 @@ def main():
f = open(opts.seqfile)
seq = f.readlines()
f.close()
- except Exception, e:
- print "ERROR: Could not read from %s: %s" % (opts.seqfile, e)
- print usage % (sys.argv[0:])
+ except Exception as e:
+ print("ERROR: Could not read from %s: %s" % (opts.seqfile, e))
+ print(usage % (sys.argv[0:]))
sys.exit()
try:
f = open(opts.qualfile)
qual = f.readlines()
f.close()
- except Exception, e:
- print "ERROR: Could not read from %s: %s" % (opts.qualfile, e)
- print usage % (sys.argv[0:])
+ except Exception as e:
+ print("ERROR: Could not read from %s: %s" % (opts.qualfile, e))
+ print(usage % (sys.argv[0:]))
sys.exit()
@@ -75,22 +75,22 @@ def main():
try:
FASTA = open(fasta, 'w')
except:
- print "ERROR: Can not write to %s" % fasta
+ print("ERROR: Can not write to %s" % fasta)
sys.exit()
try:
LOG = open(log, 'w')
except:
- print "ERROR: Can not write to %s" % log
+ print("ERROR: Can not write to %s" % log)
sys.exit()
if opts.mer < 15 or opts.mer > 200:
- print "ERROR: -l must be a number between 15 and 200."
+ print("ERROR: -l must be a number between 15 and 200.")
sys.exit()
if opts.consec < 16 or opts.consec > opts.mer:
- print "ERROR: -c must be a number between 16 and -l."
+ print("ERROR: -c must be a number between 16 and -l.")
sys.exit()
LOG.write("""
@@ -130,7 +130,7 @@ def parseQualFile(threshold, difference,
read_number = 0
if verbose:
- print "Printing trimming pattern for all reads passing the set threshold values...\n"
+ print("Printing trimming pattern for all reads passing the set threshold values...\n")
for line in qual:
read_number += 1 ### this keeps track of the read order, respected between the prb and seq files
@@ -156,7 +156,7 @@ def parseQualFile(threshold, difference,
if head_match != None:
ok_read += 1
col = head_match.span()
- if not trim_info.has_key(read_number):
+ if read_number not in trim_info:
trim_info[read_number] = {}
start = int(col[0])
@@ -167,7 +167,7 @@ def parseQualFile(threshold, difference,
if verbose:
sub = concat[trim_info[read_number]['start']:trim_info[read_number]['end']]
- print "passed seqs:%i line#%i %s (start trim:%i,length:%i) %s\n" % (ok_read, read_number, concat, start, end, sub)
+ print("passed seqs:%i line#%i %s (start trim:%i,length:%i) %s\n" % (ok_read, read_number, concat, start, end, sub))
LOG.write("%i out of %i sequences passed your filter (I >= %i and D >= %i and L >= %i)\n" % (ok_read, read_number, threshold, difference, consecutive))
@@ -191,7 +191,7 @@ def readNTrim(trim_info, seq, verbose, F
gDNAlinker2_field = re.compile('^ATCTAACAG')
if verbose:
- print "Printing trimmed sequences for all reads passing the set threshold values minus, excluding sequence containing linkers...\n"
+ print("Printing trimmed sequences for all reads passing the set threshold values minus, excluding sequence containing linkers...\n")
for line in seq:
read_number += 1 ### tracks read number / will match order in prb file
@@ -199,7 +199,7 @@ def readNTrim(trim_info, seq, verbose, F
info = line.split("\t") ### split line, the seq file lists: lane tile xcoord y coord DNAseq
dna_string = info[4]
- if trim_info.has_key(read_number):
+ if read_number in trim_info:
trim_seq = dna_string[trim_info[read_number]['start']:trim_info[read_number]['end']]
if re.match(dna_sequence_field, trim_seq): ### no ambiguous bases?
if re.match(gDNAlinker1_field, trim_seq) or re.match(gDNAlinker2_field,trim_seq): ### matches gDNA linker?
@@ -208,7 +208,7 @@ def readNTrim(trim_info, seq, verbose, F
usable_reads += 1
FASTA.write(">%s-%s-%s-%s\n%s\n" % (info[0],info[1],info[2],info[3],trim_seq))
if verbose:
- print "line#%i %s (start trim:%i,length:%i) %s" % (read_number,info[4],trim_info[read_number]['start'],trim_info[read_number]['end'],trim_seq)
+ print("line#%i %s (start trim:%i,length:%i) %s" % (read_number,info[4],trim_info[read_number]['start'],trim_info[read_number]['end'],trim_seq))
LOG.write("%i out of %i sequences appear to be usable, after filtering out sequences hard-coded in this program * %i gDNA linker sequences*\n" % (usable_reads, read_number,gDNAlinker_count))
return
--- a/tools/TQS.readme
+++ b/tools/TQS.readme
@@ -24,12 +24,12 @@ __version__ = '1.0'
Execution example
==================
-python TQS.py -f test_seq.txt -q test_prb.txt -l 36 -t 5 -d 5 -c 20
+python3 TQS.py -f test_seq.txt -q test_prb.txt -l 36 -t 5 -d 5 -c 20
Options
=======
-python TQS.py --help
+python3 TQS.py --help
Usage: TQS.py [options]
--- a/tools/TQSexport.py
+++ b/tools/TQSexport.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
__doc__ = """
TQS
@@ -47,9 +47,9 @@ def main():
f = open(opts.exportfile)
seq = f.readlines()
f.close()
- except Exception, e:
- print "ERROR: Could not read from %s: %s" % (opts.exportfile, e)
- print usage % (sys.argv[0:])
+ except Exception as e:
+ print("ERROR: Could not read from %s: %s" % (opts.exportfile, e))
+ print(usage % (sys.argv[0:]))
sys.exit()
@@ -61,17 +61,17 @@ def main():
try:
FASTA = open(fasta, 'w')
except:
- print "ERROR: Can not write to %s" % fasta
+ print("ERROR: Can not write to %s" % fasta)
sys.exit()
try:
LOG = open(log, 'w')
except:
- print "ERROR: Can not write to %s" % log
+ print("ERROR: Can not write to %s" % log)
sys.exit()
if opts.consec < minimum_length:
- print "ERROR: -c must be a number larger than %i." % (minimum_length)
+ print("ERROR: -c must be a number larger than %i." % (minimum_length))
sys.exit()
LOG.write("""
@@ -106,7 +106,7 @@ YYYYRYYYYYYYYYYYTTTTTOOOMOOOMMOOOOOG chr
read_number = 0
if verbose:
- print "Printing trimming pattern for all reads passing the set threshold values...\n"
+ print("Printing trimming pattern for all reads passing the set threshold values...\n")
for line in export:
read_number += 1
@@ -134,7 +134,7 @@ YYYYRYYYYYYYYYYYTTTTTOOOMOOOMMOOOOOG chr
if head_match != None:
ok_read += 1
col = head_match.span()
- if not trim_info.has_key(read_number):
+ if read_number not in trim_info:
trim_info[read_number] = {}
start = int(col[0])
@@ -150,7 +150,7 @@ YYYYRYYYYYYYYYYYTTTTTOOOMOOOMMOOOOOG chr
FASTA.write(">%s-%s-%s-%s%s\n%s\n" % (info[1],info[2],info[3],info[4],pair,trim_seq))
if verbose:
- print "passed seqs:%i line#%i %s (start trim:%i,end trim:%i) %s\n" % (ok_read, read_number, concat, start, end, trim_seq)
+ print("passed seqs:%i line#%i %s (start trim:%i,end trim:%i) %s\n" % (ok_read, read_number, concat, start, end, trim_seq))
LOG.write("%i out of %i sequences passed your filter (-t >= %i and -c >= %i)\n" % (ok_read, read_number, threshold, consecutive))
--- a/tools/TQSfastq.py
+++ b/tools/TQSfastq.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
__doc__ = """
TQS
@@ -52,9 +52,9 @@ def main():
f = open(opts.fastqfile)
seq = f.readlines()
f.close()
- except Exception, e:
- print "ERROR: Could not read from %s: %s" % (opts.fastqfile, e)
- print usage % (sys.argv[0:])
+ except Exception as e:
+ print("ERROR: Could not read from %s: %s" % (opts.fastqfile, e))
+ print(usage % (sys.argv[0:]))
sys.exit()
@@ -66,21 +66,21 @@ def main():
try:
FASTA = open(fasta, 'w')
except:
- print "ERROR: Can not write to %s" % fasta
+ print("ERROR: Can not write to %s" % fasta)
sys.exit()
try:
LOG = open(log, 'w')
except:
- print "ERROR: Can not write to %s" % log
+ print("ERROR: Can not write to %s" % log)
sys.exit()
if opts.consec < minimum_length:
- print "ERROR: -c must be a number larger than %i." % (minimum_length)
+ print("ERROR: -c must be a number larger than %i." % (minimum_length))
sys.exit()
if opts.encoding != 33 and opts.encoding != 64:
- print "ERROR: -e must be either 33 or 64."
+ print("ERROR: -e must be either 33 or 64.")
sys.exit()
LOG.write("""
@@ -115,7 +115,7 @@ def readNtrim(fastq, threshold, consecut
record_line = 0
if verbose:
- print "Printing trimming pattern for all reads passing the set threshold values...\n"
+ print("Printing trimming pattern for all reads passing the set threshold values...\n")
for line in fastq:
record_line += 1
@@ -161,7 +161,7 @@ def readNtrim(fastq, threshold, consecut
FASTA.write(">%s\n%s\n" % (read_id, trim_seq))
if verbose:
- print "%s\n%s\n%s\n passed seqs:%i line#%i %s (start trim:%i,end trim:%i) %s\n" % (read_id,seq,qual,ok_read, read_number, concat, start, end, trim_seq)
+ print("%s\n%s\n%s\n passed seqs:%i line#%i %s (start trim:%i,end trim:%i) %s\n" % (read_id,seq,qual,ok_read, read_number, concat, start, end, trim_seq))
"""LOG.write("%i out of %i sequences passed your filter (-t >= %i and -c >= %i)\n" % (ok_read, read_number, threshold, consecutive))"""
do_not_send_mail_after_testing.patch
no_privacy_breach_logo.patch
2to3.patch
......@@ -30,12 +30,12 @@ override_dh_installexamples:
override_dh_installdocs:
dh_installdocs
markdown_py -f $(CURDIR)/debian/$(DEB_SOURCE)/usr/share/doc/$(DEB_SOURCE)/README.html readme.md
markdown readme.md > $(CURDIR)/debian/$(DEB_SOURCE)/usr/share/doc/$(DEB_SOURCE)/README.html
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
TESTDIR := $(shell mktemp -d)
override_dh_auto_test:
cp -a test/* $(TESTDIR)
cd $(TESTDIR) && $(CURDIR)/SSAKE -f Herpesvirus_3.60kb.reads.fa -m 16 -o 2 -r 0.6 -p 0 -t 0 -c 1 -w 5 -b myFirstSSAKErun
rm -rf $(TESTDIR)
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
TESTDIR=$$(mktemp -d) ; \
cp -a test/* $${TESTDIR} ; \
cd $${TESTDIR} && $(CURDIR)/SSAKE -f Herpesvirus_3.60kb.reads.fa -m 16 -o 2 -r 0.6 -p 0 -t 0 -c 1 -w 5 -b myFirstSSAKErun
rm -rf $${TESTDIR}
endif
Name: SSAKE
Reference:
author: >
Warren, Rene L. and Sutton, Granger G. and Jones, Steven J. M. and Holt,
......