[med-svn] [Git][med-team/kmer][master] 9 commits: Use 2to3 to port from Python2 to Python3

Andreas Tille gitlab at salsa.debian.org
Thu Dec 19 11:52:43 GMT 2019



Andreas Tille pushed to branch master at Debian Med / kmer


Commits:
337ab116 by Andreas Tille at 2019-12-19T09:45:52Z
Use 2to3 to port from Python2 to Python3

- - - - -
186d9025 by Andreas Tille at 2019-12-19T09:47:27Z
Switch packaging to Python3

- - - - -
b628c2c9 by Andreas Tille at 2019-12-19T10:11:20Z
Fix configure

- - - - -
6035af0a by Andreas Tille at 2019-12-19T10:17:50Z
routine-update: debhelper-compat 12

- - - - -
e8861073 by Andreas Tille at 2019-12-19T10:17:56Z
routine-update: Standards-Version: 4.4.1

- - - - -
af0afcf2 by Andreas Tille at 2019-12-19T10:17:59Z
debian/copyright: use spaces rather than tabs to start continuation lines.

Fixes lintian: tab-in-licence-text
See https://lintian.debian.org/tags/tab-in-licence-text.html for more details.

- - - - -
7fd561d6 by Andreas Tille at 2019-12-19T10:18:04Z
Remove obsolete field Name from debian/upstream/metadata (already present in machine-readable debian/copyright).
- - - - -
0033e6b0 by Andreas Tille at 2019-12-19T11:14:42Z
Replace Py_InitModule

- - - - -
cd6de6e9 by Andreas Tille at 2019-12-19T11:42:33Z
Drop useless definitions

- - - - -


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,8 +1,21 @@
 kmer (0~20150903+r2013-7) UNRELEASED; urgency=medium
 
+  * Team upload.
+
+  [ Jelmer Vernooij ]
   * Use secure copyright file specification URI.
 
- -- Jelmer Vernooij <jelmer at debian.org>  Wed, 24 Oct 2018 21:58:00 +0000
+  [ Andreas Tille ]
+  * Use 2to3 to port from Python2 to Python3
+    Closes: #936802
+  * debhelper-compat 12
+  * Standards-Version: 4.4.1
+  * debian/copyright: use spaces rather than tabs to start continuation
+    lines.
+  * Remove obsolete field Name from debian/upstream/metadata (already
+    present in machine-readable debian/copyright).
+
+ -- Andreas Tille <tille at debian.org>  Thu, 19 Dec 2019 10:43:09 +0100
 
 kmer (0~20150903+r2013-6) unstable; urgency=medium
 


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


=====================================
debian/control
=====================================
@@ -3,12 +3,12 @@ Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.
 Uploaders: Afif Elghraoui <afif at debian.org>
 Section: science
 Priority: optional
-Build-Depends: debhelper (>= 11~),
+Build-Depends: debhelper-compat (= 12),
                dh-exec,
 # For ATAC
                dh-python,
-               python-all-dev
-Standards-Version: 4.2.1
+               python3-dev
+Standards-Version: 4.4.1
 Vcs-Browser: https://salsa.debian.org/med-team/kmer
 Vcs-Git: https://salsa.debian.org/med-team/kmer.git
 Homepage: http://kmer.sourceforge.net
@@ -119,7 +119,7 @@ Package: atac
 Architecture: any
 Depends: ${shlibs:Depends},
          ${misc:Depends},
-         ${python:Depends},
+         ${python3:Depends},
          ${perl:Depends},
          libfile-which-perl,
          leaff,


=====================================
debian/copyright
=====================================
@@ -6,11 +6,11 @@ Source: http://sourceforge.net/p/kmer/code/HEAD/tree/
 Files: *
 Copyright: © 2002 PE Corporation (NY) through the Celera Genomics Group
            © 2003-2004 Applied Biosystems
-	   © 2004-2015 Brian Walenz
-	   © 1998-2003, 2009-2010 Liliana Florea
-	   © 2009-2010 Leming Zhou
-	   © 2001-2009 Mihaela Pertea
-	   © 1998-2009 Arthur Delcher
+           © 2004-2015 Brian Walenz
+           © 1998-2003, 2009-2010 Liliana Florea
+           © 2009-2010 Leming Zhou
+           © 2001-2009 Mihaela Pertea
+           © 1998-2009 Arthur Delcher
 License: GPL-2+
 
 Files: libutil/md5.c
@@ -19,8 +19,8 @@ License: RSA
 
 Files: libutil/qsort_mt.c
 Copyright:
-	1992-1993 Regents of the University of California
-	2006-2007 Diomidis Spinellis
+ 	1992-1993 Regents of the University of California
+ 	2006-2007 Diomidis Spinellis
 License: BSD-3-Clause
 
 Files: libutil/kazlib/*
@@ -33,7 +33,7 @@ License: BSD-3-Clause-Generic
 
 Files: debian/*
 Copyright:
-	2015-2016 Afif Elghraoui <afif at debian.org>
+ 	2015-2016 Afif Elghraoui <afif at debian.org>
 License: GPL-2+
 
 Files: debian/tests/test-data/test_data.tar.gz


=====================================
debian/patches/2to3.patch
=====================================
@@ -0,0 +1,1628 @@
+Description: Use 2to3 to port from Python2 to Python3
+Bug-Debian: https://bugs.debian.org/936802
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Thu, 19 Dec 2019 10:43:09 +0100
+
+--- a/Makefile.wiki
++++ b/Makefile.wiki
+@@ -1370,9 +1370,9 @@ there the <tt>_OS|FULL_</tt> is useful,
+ install LAPACK in all sorts of ways.
+ 
+ <pre>
+-PYTHON    :=$(shell which python)
++PYTHON    :=$(shell which python3)
+ PYTHON_FLAGS :=
+-CFLAGS_PY    :=-I/usr/local/include/python
++CFLAGS_PY    :=-I/usr/include/python
+ ifeq (${_OS_}${_CC_},TRU64)
+   CFLAGS_PY :=-I/usr/local/ir/Python-2.2.2 -I/usr/local/ir/Python-2.2.2/Include
+   PYTHON    :=/usr/local/ir/bin/python
+--- a/atac-driver/chainer/python/AtacDriver.py
++++ b/atac-driver/chainer/python/AtacDriver.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ 
+ """
+ The environmental variable "PYTHONPATH" is a colon separated list
+@@ -32,7 +32,7 @@ STDERR=sys.stderr
+ STDOUT=sys.stdout
+ 
+ def die(message):
+-    print >>STDERR, message
++    print(message, file=STDERR)
+     os.exit(1)
+ 
+ def cvm(f,x,y):
+@@ -58,7 +58,7 @@ class GlobalParam:
+     
+ 
+ def usage (*_):
+-    print >>STDERR, "Usage: atacdriver.py matchFilePrefix"
++    print("Usage: atacdriver.py matchFilePrefix", file=STDERR)
+ # end def
+ 
+ def filterByMatchLength( inpfile, outfile, minimum_length):
+@@ -69,7 +69,7 @@ def filterByMatchLength( inpfile, outfil
+             FM = MatchRecord.MatchRecord(line)
+             if (FM.x_length >= minimum_length and
+                 FM.y_length >= minimum_length ):
+-                print >>outfile, FM
++                print(FM, file=outfile)
+             # end if
+         # end if
+     # end for
+@@ -90,7 +90,7 @@ def onlyKeepLongRuns ( inpfile, outname,
+             SL = FM.x_length
+             if FL != None and FL.runid != FM.runid :
+                 for x in store:
+-                    print >>rejectsfile, x
++                    print(x, file=rejectsfile)
+                 # end for
+                 store = []
+                 lenInMatches = SL
+@@ -102,10 +102,10 @@ def onlyKeepLongRuns ( inpfile, outname,
+                 store.append(FM)
+             else:
+                 for x in store:
+-                    print >>outfile, x
++                    print(x, file=outfile)
+                 # end for
+                 store = []
+-                print >>outfile, FM
++                print(FM, file=outfile)
+             # end if
+             FL = FM
+         # end if
+@@ -142,10 +142,10 @@ def coalesceMatches ( inpfile, outfile,
+             assert(py >= 0)
+             assert(ny >= 0)
+             if (not (not needs_to_share_diagonal or nx == ny)):
+-                print >>STDERR, 'Bombed on:'
+-                print >>STDERR, str(curF)
+-                print >>STDERR, 'needs_to_share_diagonal=' + str(needs_to_share_diagonal)
+-                print >>STDERR, 'nx=' + str(nx) + '  ny=' + str(ny)
++                print('Bombed on:', file=STDERR)
++                print(str(curF), file=STDERR)
++                print('needs_to_share_diagonal=' + str(needs_to_share_diagonal), file=STDERR)
++                print('nx=' + str(nx) + '  ny=' + str(ny), file=STDERR)
+             # end if
+             assert((hghHitPX == None or (not needs_to_share_diagonal) or nx == ny))
+             forward = (curF.x_orientation == curF.y_orientation)
+@@ -182,7 +182,7 @@ def coalesceMatches ( inpfile, outfile,
+                     firstF.y_start = lowHitPY
+                     firstF.x_length = hghHitPX - lowHitPX
+                     firstF.y_length = hghHitPY - lowHitPY
+-                    print >>outfile, firstF
++                    print(firstF, file=outfile)
+                 # end if
+                 firstF = curF
+                 lowHitPX = lowMerPX
+@@ -209,7 +209,7 @@ def coalesceMatches ( inpfile, outfile,
+         firstF.y_start = lowHitPY
+         firstF.x_length = hghHitPX - lowHitPX
+         firstF.y_length = hghHitPY - lowHitPY
+-        print >>outfile, firstF
++        print(firstF, file=outfile)
+ 
+     return
+ # end def
+@@ -243,12 +243,12 @@ def boxRecovery( inpfile, rawfile, outna
+                     if( rawline[0] == 'M'):
+                         rawMatch = MatchRecord.MatchRecord(rawline)
+                         if(rawMatch.sameAs(rightMatch)):
+-                            print >>outfile, rightMatch
++                            print(rightMatch, file=outfile)
+                             break
+                         else:
+                             # print "Inside run rawMatch=", rawMatch
+                             if(rawMatch.isInsideBox(leftMatch,rightMatch)):
+-                                print >>outfile, rawMatch
++                                print(rawMatch, file=outfile)
+                             # end if
+                         # end if
+                     # end if
+@@ -260,7 +260,7 @@ def boxRecovery( inpfile, rawfile, outna
+                     if( rawline[0] == 'M'):
+                         rawMatch = MatchRecord.MatchRecord(rawline)
+                         if(rawMatch.sameAs(rightMatch)):
+-                            print >>outfile, rightMatch
++                            print(rightMatch, file=outfile)
+                             break
+                         else: 
+                             # print >>STDERR, "Discard rawMatch=", rawMatch
+@@ -281,7 +281,7 @@ def boxRecovery( inpfile, rawfile, outna
+ class AtacDriver(AtacFile.AtacFile):
+     def runOld(self):
+         self.globals['atacAlgorithmVersion'] = str(17)
+-        print >>STDERR, "runName = %s\n" % self.runName
++        print("runName = %s\n" % self.runName, file=STDERR)
+ 
+         # The ATAC globals used by this script:
+         opt_t = int(self.globals['globalMatchMinSize'])
+@@ -295,7 +295,7 @@ class AtacDriver(AtacFile.AtacFile):
+         assemblyFile2 = self.globals['assemblyFile2']
+ 
+         boxRecoveryOn = 0  # Deprecated for same species comparisons 2003/09/09.
+-        if(self.globals.has_key("boxRecoveryOn")):
++        if("boxRecoveryOn" in self.globals):
+             boxRecoveryOn = int(self.globals['boxRecoveryOn'])
+             
+         t0 = time.time()
+@@ -309,24 +309,24 @@ class AtacDriver(AtacFile.AtacFile):
+         redo = 0
+         keep = 0
+         step = 0
+-        if(self.globals.has_key("ckpKeep")):
++        if("ckpKeep" in self.globals):
+             keep = int(self.globals['ckpKeep'])
+         ckpName = "AllDone"
+         ###################################################################
+ 
+-        print >>STDERR, 'Keep step=' + str(keep)
+-        print >>STDERR, 'At step=' + str(step)
+-        print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
++        print('Keep step=' + str(keep), file=STDERR)
++        print('At step=' + str(step), file=STDERR)
++        print('Time elapsed=' + str(time.time()-t0), file=STDERR)
+ 
+         outprefix = self.runName
+ 
+         step += 1
+-        print >>STDERR, 'At uniqueFilter, step=' + str(step)
+-        print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
+-        if (redo or ((keep < step) and not self.globals.has_key(ckpName))):
++        print('At uniqueFilter, step=' + str(step), file=STDERR)
++        print('Time elapsed=' + str(time.time()-t0), file=STDERR)
++        if (redo or ((keep < step) and ckpName not in self.globals)):
+             redo = 1
+-            if(not(self.globals.has_key('uniqueFilterOn') and self.globals['uniqueFilterOn']=="0")):
+-                print >>STDERR, 'Running UniqueFilter'
++            if(not('uniqueFilterOn' in self.globals and self.globals['uniqueFilterOn']=="0")):
++                print('Running UniqueFilter', file=STDERR)
+                 outfile = MyFile.myfile()
+                 UniqueFilter.main( self.matches, outfile)
+                 self.matches = outfile
+@@ -334,11 +334,11 @@ class AtacDriver(AtacFile.AtacFile):
+                 self.checkpoint(outprefix)
+ 
+         step += 1
+-        print >>STDERR, 'At filterByMatchLength, step=' + str(step)
+-        print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
+-        if (redo or ((keep < step) and not self.globals.has_key(ckpName))):
++        print('At filterByMatchLength, step=' + str(step), file=STDERR)
++        print('Time elapsed=' + str(time.time()-t0), file=STDERR)
++        if (redo or ((keep < step) and ckpName not in self.globals)):
+             redo = 1
+-            print >>STDERR, 'Running filterByMatchLength'
++            print('Running filterByMatchLength', file=STDERR)
+             outfile = MyFile.myfile()
+             filterByMatchLength( self.matches, outfile, opt_t)
+             self.matches = outfile
+@@ -346,15 +346,15 @@ class AtacDriver(AtacFile.AtacFile):
+             self.checkpoint(outprefix)
+ 
+         step += 1
+-        print >>STDERR, 'At trimMatchOverlaps, step=' + str(step)
+-        print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
+-        if (redo or ((keep < step) and not self.globals.has_key(ckpName))):
++        print('At trimMatchOverlaps, step=' + str(step), file=STDERR)
++        print('Time elapsed=' + str(time.time()-t0), file=STDERR)
++        if (redo or ((keep < step) and ckpName not in self.globals)):
+             redo = 1
+-            print >>STDERR, "Start trimming for bp one-to-one-ness"
++            print("Start trimming for bp one-to-one-ness", file=STDERR)
+             tempdata = MyFile.myfile()
+             TrimMatchOverlaps.trimMatchOverlapsInBoth(self.matches,tempdata,'u')
+             self.matches = tempdata
+-            print >>STDERR, "Finished trimming for bp one-to-one-ness"
++            print("Finished trimming for bp one-to-one-ness", file=STDERR)
+             outprefix += '.trim'
+             self.checkpoint(outprefix)
+ 
+@@ -363,11 +363,11 @@ class AtacDriver(AtacFile.AtacFile):
+             rawfile = self.matches
+ 
+         step += 1
+-        print >>STDERR, 'At formPerfectRuns, step=' + str(step)
+-        print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
+-        if (redo or ((keep < step) and not self.globals.has_key(ckpName))):
++        print('At formPerfectRuns, step=' + str(step), file=STDERR)
++        print('Time elapsed=' + str(time.time()-t0), file=STDERR)
++        if (redo or ((keep < step) and ckpName not in self.globals)):
+             redo = 1
+-            print >>STDERR, 'from ' + outprefix + ' making ' + outprefix + '.p6'
++            print('from ' + outprefix + ' making ' + outprefix + '.p6', file=STDERR)
+             tempdata = PerfectRuns.formPerfectRuns(self.matches,
+                                                    MatchRecord.sortInXorderAP,
+                                                    MatchRecord.sortInYorderAP,
+@@ -378,22 +378,22 @@ class AtacDriver(AtacFile.AtacFile):
+         # end if
+ 
+         step += 1
+-        print >>STDERR, 'At onlyKeepLongRuns, step=' + str(step)
+-        print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
+-        if (redo or ((keep < step) and not self.globals.has_key(ckpName))):
++        print('At onlyKeepLongRuns, step=' + str(step), file=STDERR)
++        print('Time elapsed=' + str(time.time()-t0), file=STDERR)
++        if (redo or ((keep < step) and ckpName not in self.globals)):
+             redo = 1
+-            print >>STDERR, 'from ' + outprefix + ' making ' + outprefix + '.l' + str(opt_l)
++            print('from ' + outprefix + ' making ' + outprefix + '.l' + str(opt_l), file=STDERR)
+             tempdata = onlyKeepLongRuns( self.matches, outprefix, opt_l)
+             self.matches = tempdata
+             outprefix += '.l' + str(opt_l)
+             self.checkpoint(outprefix)
+ 
+         step += 1
+-        print >>STDERR, 'At formPerfectRuns, step=' + str(step) 
+-        print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
+-        if (redo or ((keep < step) and not self.globals.has_key(ckpName))):
++        print('At formPerfectRuns, step=' + str(step), file=STDERR) 
++        print('Time elapsed=' + str(time.time()-t0), file=STDERR)
++        if (redo or ((keep < step) and ckpName not in self.globals)):
+             redo = 1
+-            print >>STDERR, 'Heal the perfect runs'
++            print('Heal the perfect runs', file=STDERR)
+             tempdata = PerfectRuns.formPerfectRuns(self.matches,
+                                        MatchRecord.sortInYorderAP,
+                                        MatchRecord.sortInXorderAP, maxdiff, 'r')
+@@ -405,16 +405,16 @@ class AtacDriver(AtacFile.AtacFile):
+ 
+             # This is a box recovery step.
+             step += 1
+-            print >>STDERR, 'At boxRecovery, step=' + str(step) 
+-            print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
+-            if (redo or ((keep < step) and not self.globals.has_key(ckpName))):
++            print('At boxRecovery, step=' + str(step), file=STDERR) 
++            print('Time elapsed=' + str(time.time()-t0), file=STDERR)
++            if (redo or ((keep < step) and ckpName not in self.globals)):
+                 redo = 1
+-                print >>STDERR, 'from ' + outprefix + ' making ' + outprefix + '.br'
+-                print >>STDERR, "Make sorted raw matches"
++                print('from ' + outprefix + ' making ' + outprefix + '.br', file=STDERR)
++                print("Make sorted raw matches", file=STDERR)
+                 outfile = MyFile.myfile()
+                 MatchRecord.sortInXorderAP( rawfile, outfile)
+                 rawfile = outfile
+-                print >>STDERR, "perform box recovery"
++                print("perform box recovery", file=STDERR)
+                 tempdata = boxRecovery( self.matches, rawfile, outprefix)
+                 self.matches = tempdata
+                 outprefix += '.br'
+@@ -422,12 +422,12 @@ class AtacDriver(AtacFile.AtacFile):
+             # end if
+ 
+             step += 1
+-            print >>STDERR, 'At formPerfectRuns, step=' + str(step)
+-            print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
+-            if (redo or ( (keep < step) and not self.globals.has_key(ckpName))):
+-                print >>STDERR, "form perfect runs"
++            print('At formPerfectRuns, step=' + str(step), file=STDERR)
++            print('Time elapsed=' + str(time.time()-t0), file=STDERR)
++            if (redo or ( (keep < step) and ckpName not in self.globals)):
++                print("form perfect runs", file=STDERR)
+                 redo = 1
+-                print >>STDERR, 'from ' + outprefix + ' to ' + outprefix + '.p6'
++                print('from ' + outprefix + ' to ' + outprefix + '.p6', file=STDERR)
+                 tempdata = PerfectRuns.formPerfectRuns(self.matches,
+                                        MatchRecord.sortInXorderAP,
+                                        MatchRecord.sortInYorderAP, maxdiff, 'r')
+@@ -436,11 +436,11 @@ class AtacDriver(AtacFile.AtacFile):
+                 self.checkpoint(outprefix)
+ 
+         step += 1
+-        print >>STDERR, 'At squeezeIntraRunGaps, step=' + str(step)
+-        print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
+-        if (redo or ((keep < step) and not self.globals.has_key(ckpName))):
++        print('At squeezeIntraRunGaps, step=' + str(step), file=STDERR)
++        print('Time elapsed=' + str(time.time()-t0), file=STDERR)
++        if (redo or ((keep < step) and ckpName not in self.globals)):
+             redo = 1
+-            print >>STDERR, 'from ' + outprefix + ' to ' + outprefix + '.sq'
++            print('from ' + outprefix + ' to ' + outprefix + '.sq', file=STDERR)
+             tempdata = MyFile.myfile()
+             squeezeIntraRunGaps.mainLoop(
+                 self.matches,
+@@ -454,39 +454,39 @@ class AtacDriver(AtacFile.AtacFile):
+             self.checkpoint(outprefix)
+ 
+         step += 1
+-        print >>STDERR, 'At TrimMatchOverlaps, step=' + str(step)
+-        print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
+-        if (redo or ((keep < step) and not self.globals.has_key(ckpName))):
++        print('At TrimMatchOverlaps, step=' + str(step), file=STDERR)
++        print('Time elapsed=' + str(time.time()-t0), file=STDERR)
++        if (redo or ((keep < step) and ckpName not in self.globals)):
+             redo = 1
+-            print >>STDERR, "Start trimming for bp one-to-one-ness"
++            print("Start trimming for bp one-to-one-ness", file=STDERR)
+             tempdata = MyFile.myfile()
+             TrimMatchOverlaps.trimMatchOverlapsInBoth(self.matches,tempdata,'u')
+             self.matches = tempdata
+             outprefix += '.trim'
+-            print >>STDERR, "Finished trimming for bp one-to-one-ness"
++            print("Finished trimming for bp one-to-one-ness", file=STDERR)
+ 
+         step += 1
+-        print >>STDERR, 'At RunsAsMatches, step=' + str(step)
+-        print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
+-        if (redo or ((keep < step) and not self.globals.has_key(ckpName))):
++        print('At RunsAsMatches, step=' + str(step), file=STDERR)
++        print('Time elapsed=' + str(time.time()-t0), file=STDERR)
++        if (redo or ((keep < step) and ckpName not in self.globals)):
+             redo = 1
+             self.runs = PerfectRuns.runsAsMatches( self.matches)
+             outprefix += '.runs'
+             self.checkpoint(outprefix)
+         # end if
+ 
+-        if(self.globals.has_key('fillIntraRunGapsOn') and self.globals['fillIntraRunGapsOn']=="1" ):
++        if('fillIntraRunGapsOn' in self.globals and self.globals['fillIntraRunGapsOn']=="1" ):
+         
+             # Next comes the DNA sequence dependent stuff.
+             step += 1
+-            print >>STDERR, 'At fillIntraRunGaps, step=' + str(step)
+-            print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
+-            if (redo or ((keep < step) and not self.globals.has_key(ckpName))):
++            print('At fillIntraRunGaps, step=' + str(step), file=STDERR)
++            print('Time elapsed=' + str(time.time()-t0), file=STDERR)
++            if (redo or ((keep < step) and ckpName not in self.globals)):
+                 redo = 1
+-                print >>STDERR, "fill the intrarun gaps"
+-                if(not self.globals.has_key('fillIntraRunGapsErate')):
++                print("fill the intrarun gaps", file=STDERR)
++                if('fillIntraRunGapsErate' not in self.globals):
+                     self.globals['fillIntraRunGapsErate'] = 0.10
+-                if(not self.globals.has_key('fillIntraRunGapsMaxGap')):
++                if('fillIntraRunGapsMaxGap' not in self.globals):
+                     self.globals['fillIntraRunGapsMaxGap'] = 100000
+                 fillIntraRunGapsErate = float(self.globals['fillIntraRunGapsErate'])
+                 fillIntraRunGapsMaxGap = int(self.globals['fillIntraRunGapsMaxGap'])
+@@ -499,11 +499,11 @@ class AtacDriver(AtacFile.AtacFile):
+                 self.checkpoint(outprefix)
+ 
+             step += 1
+-            print >>STDERR, 'At TrimMatchOverlaps, step=' + str(step)
+-            print >>STDERR, 'Time elapsed=' + str(time.time()-t0)
+-            if (redo or ((keep < step) and not self.globals.has_key(ckpName))):
++            print('At TrimMatchOverlaps, step=' + str(step), file=STDERR)
++            print('Time elapsed=' + str(time.time()-t0), file=STDERR)
++            if (redo or ((keep < step) and ckpName not in self.globals)):
+                 redo = 1
+-                print >>STDERR, "trim the overlaps"
++                print("trim the overlaps", file=STDERR)
+                 tempdata = MyFile.myfile()
+                 TrimMatchOverlaps.trimMatchOverlapsInBoth(self.matches,tempdata,'u')
+                 self.matches = tempdata
+@@ -522,7 +522,7 @@ class localExecutable :
+         self.name = name
+     def run(self,argline,inpfile,outfile):
+         cmd = "%s %s %s %s" % (self.name,argline,inpfile,outfile)
+-        print >>STDERR,"cmd =", cmd
++        print("cmd =", cmd, file=STDERR)
+         iret = os.system(cmd)
+         assert(iret == 0)
+ 
+@@ -533,14 +533,14 @@ def main(runName):
+     obj = AtacDriver(runName)
+ 
+     t1 = time.time()
+-    print >>STDERR, "Read checkpoint in %d seconds." % (t1-t0)
++    print("Read checkpoint in %d seconds." % (t1-t0), file=STDERR)
+     t0=t1
+ 
+     # The following are required:
+-    assert(obj.globals.has_key('assemblyId1'))
+-    assert(obj.globals.has_key('assemblyId2'))
+-    assert(obj.globals.has_key('assemblyFile1'))
+-    assert(obj.globals.has_key('assemblyFile2'))
++    assert('assemblyId1' in obj.globals)
++    assert('assemblyId2' in obj.globals)
++    assert('assemblyFile1' in obj.globals)
++    assert('assemblyFile2' in obj.globals)
+ 
+     assemblyId1 = obj.globals['assemblyId1']
+     assemblyId2 = obj.globals['assemblyId2']
+@@ -560,33 +560,33 @@ def main(runName):
+     assert(os.path.exists(assemblyFile1+".idxStore"))
+     assert(os.path.exists(assemblyFile2+".idxStore"))
+ 
+-    if not obj.globals.has_key('matchesFile'):
+-        print >>STDERR, "We need to make the raw matches."
++    if 'matchesFile' not in obj.globals:
++        print("We need to make the raw matches.", file=STDERR)
+             
+-    if(not obj.globals.has_key('rawMatchMerSize')):
++    if('rawMatchMerSize' not in obj.globals):
+         obj.globals['rawMatchMerSize'] = 20
+-    if(not obj.globals.has_key('rawMatchMerMaxDegeneracy')):
++    if('rawMatchMerMaxDegeneracy' not in obj.globals):
+         obj.globals['rawMatchMerMaxDegeneracy'] = 1
+-    if(not obj.globals.has_key('rawMatchMinFillSize')):
++    if('rawMatchMinFillSize' not in obj.globals):
+         obj.globals['rawMatchMinSize'] = obj.globals['rawMatchMerSize']
+ 
+     # Many 2*rawMatchMerSize-1 matches are due to isolated single
+     # nucleotide mutations in otherwise perfect repeats.
+ 
+-    if(not obj.globals.has_key('globalMatchMinSize')):
++    if('globalMatchMinSize' not in obj.globals):
+         obj.globals['globalMatchMinSize'] = 2*int(obj.globals['rawMatchMerSize'])
+-    if(not obj.globals.has_key('globalPerfectRunMinLen')):
++    if('globalPerfectRunMinLen' not in obj.globals):
+         obj.globals['globalPerfectRunMinLen'] = 100
+-    if(not obj.globals.has_key('globalPerfectRunMaxGapLen')):
++    if('globalPerfectRunMaxGapLen' not in obj.globals):
+         obj.globals['globalPerfectRunMaxGapLen'] = 100000
+ 
+-    if(not obj.globals.has_key('intraRunGapIsolatedMismatchLen')):
++    if('intraRunGapIsolatedMismatchLen' not in obj.globals):
+         obj.globals['intraRunGapIsolatedMismatchLen'] = 20
+ 
+     obj.runOld()
+ 
+     t1 = time.time()
+-    print >>STDERR, "Ran in %d seconds." % (t1-t0)
++    print("Ran in %d seconds." % (t1-t0), file=STDERR)
+ 
+     obj.checkpoint(runName + ".chained.atac")
+ 
+@@ -594,7 +594,7 @@ def main(runName):
+ 
+ if __name__ == '__main__':
+     if (len(sys.argv) == 1):
+-        print >>sys.stderr, "usage: $sys.argv[0] file.atac"
++        print("usage: $sys.argv[0] file.atac", file=sys.stderr)
+         sys.exit(1)
+     if (sys.argv[1] == "justtestingifitworks"):
+         sys.exit(0)
+--- a/atac-driver/chainer/python/AtacFile.py
++++ b/atac-driver/chainer/python/AtacFile.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ # Looking in /usr/local/ir/bin on the Compaqs for the correct Python interpreter.
+ # export PYTHONPATH=${PYTHONPATH}:$WORK/cds/IR/COMPASS/src/AtacPipeline
+ 
+@@ -58,15 +58,15 @@ class AtacFile:
+         elif(linetype == 'M'):
+             fields = line.split()
+             if(fields[1] == 'r'):
+-                print >>self.runs, line
++                print(line, file=self.runs)
+             else:
+-                print >>self.matches, line
++                print(line, file=self.matches)
+             return
+         elif(line == ''):
+             pass
+         else:
+-            print >>sys.stderr, "The offending line:"
+-            print >>sys.stderr, line
++            print("The offending line:", file=sys.stderr)
++            print(line, file=sys.stderr)
+             assert(0)
+         # end if
+     # end def
+@@ -75,16 +75,16 @@ class AtacFile:
+         self.globals["modificationDate"] = time.asctime()
+         fp = open(filename,"w")
+         for line in self.metacommands:
+-            print >>fp, line
++            print(line, file=fp)
+         for line in self.comments:
+-            print >>fp, line
++            print(line, file=fp)
+         # Output the globals in lexigraphical order.
+         list = []
+         for key in self.globals:
+             list.append("/" + key + "=" + str(self.globals[key]))
+         list.sort()
+         for line in list:
+-            print >>fp, line
++            print(line, file=fp)
+         self.matches.seek(0)
+         for line in self.matches:
+             fp.write(line)
+--- a/atac-driver/chainer/python/IdxStore.py
++++ b/atac-driver/chainer/python/IdxStore.py
+@@ -12,7 +12,7 @@ def createIndexedFasta( prefix, nickname
+   # This is a class method (as opposed to an object method).
+   # This method creates an indexed FASTA file on disk.
+ 
+-  print >>sys.stderr, "Creating %s.idxStore" % (prefix)
++  print("Creating %s.idxStore" % (prefix), file=sys.stderr)
+ 
+   the_uid = None
+   defline = None
+@@ -45,7 +45,7 @@ def createIndexedFasta( prefix, nickname
+         cur_offset += seq_length + 1;
+         # remember the UNIX newline inserted by print.
+ 
+-        print >>IDXSTORE, the_uid, def_length, seq_length, def_offset, seq_offset
++        print(the_uid, def_length, seq_length, def_offset, seq_offset, file=IDXSTORE)
+       # end if
+ 
+       # Now process the new data.
+@@ -73,7 +73,7 @@ def createIndexedFasta( prefix, nickname
+     cur_offset += seq_length + 1;
+     # remember the UNIX newline inserted by print.
+ 
+-    print >>IDXSTORE, the_uid, def_length, seq_length, def_offset, seq_offset
++    print(the_uid, def_length, seq_length, def_offset, seq_offset, file=IDXSTORE)
+   # end if
+ 
+   FASTA.close()
+@@ -196,7 +196,7 @@ def convertIndexToUID (  x_prefix, y_pre
+             FM = MatchRecord.MatchRecord(line)
+             FM.x_scaf_uid = the_x_uid[FM.x_scaf_uid]
+             FM.y_scaf_uid = the_y_uid[FM.y_scaf_uid]
+-            print >>outfile, FM
++            print(FM, file=outfile)
+         # end if
+     # end for
+     outfile.finished()
+--- a/atac-driver/chainer/python/MatchRecord.py
++++ b/atac-driver/chainer/python/MatchRecord.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ 
+ import sys, os, copy, string, tempfile
+ 
+@@ -153,7 +153,7 @@ def convertBrianRecordFormat( inpfile, o
+     for line in inpfile:
+         lineCount += 1
+         if(lineCount % 100000 == 0):
+-            print >>sys.stderr, "lineCount=%d" % lineCount
++            print("lineCount=%d" % lineCount, file=sys.stderr)
+         FB = line.split()
+         orientation = (FB[0][1:]=='f')
+         FM = MatchRecord("M x . . . 0 0 0 . 0 0 0 0\n")
+@@ -169,9 +169,9 @@ def convertBrianRecordFormat( inpfile, o
+         FM.identifier    = ""
+         FM.extend        = {}
+         #FM.mismatches   = 0
+-        print >>outfile, FM
++        print(FM, file=outfile)
+     # end for
+-    print >>sys.stderr, "convertRecordFormat done: lineCount=%d" % lineCount
++    print("convertRecordFormat done: lineCount=%d" % lineCount, file=sys.stderr)
+     outfile.seek(0)
+     return
+ # end def
+--- a/atac-driver/chainer/python/MyFile.py
++++ b/atac-driver/chainer/python/MyFile.py
+@@ -1,5 +1,5 @@
+-#!/usr/bin/env python
+-import sys, os, copy, tempfile, cStringIO
++#!/usr/bin/python3
++import sys, os, copy, tempfile, io
+ 
+ # from __future__ import generators  # Necessary before Python 2.3
+ 
+@@ -27,8 +27,8 @@ class ListLikeFileIter:
+         self._fileIter = iter(self._fileptr.readline,"")
+     def __del__(self):
+         self._fileptr.close()
+-    def next(self):
+-        line = self._fileIter.next()
++    def __next__(self):
++        line = next(self._fileIter)
+         if line:
+             return line
+         else:
+@@ -37,7 +37,7 @@ class ListLikeFileIter:
+     def __getitem__(self,ii):
+         # For files, the list location ii is ignored.
+         # line = self._fileptr.readline()
+-        line = self._fileIter.next()
++        line = next(self._fileIter)
+         if line:
+             return line
+         else:
+@@ -50,14 +50,14 @@ class ListLikeFile:
+     def __init__(self):
+         #self._filename = tempfile.mktemp()
+         #self._fileptr = open(self._filename,"w")
+-        self._fileptr = cStringIO.StringIO()
++        self._fileptr = io.StringIO()
+         #self._list = []
+     def __del__(self):
+         self._fileptr.close()
+         #pass
+     def __iter__(self):
+         self._fileptr.flush()
+-        return iter(cStringIO.StringIO(self._fileptr.getvalue()))
++        return iter(io.StringIO(self._fileptr.getvalue()))
+         #return iter(self._fileptr)
+         #return ListLikeFileIter(self._filename)
+         return iter(self._list)
+@@ -69,34 +69,34 @@ class ListLikeFile:
+ 
+ def tester():
+     x = ListLikeFile()
+-    print >>x, 4
+-    print >>x, 5
++    print(4, file=x)
++    print(5, file=x)
+ 
+     xi = iter(x)
+-    print "test 1i"
+-    for i in xi: print i,
++    print("test 1i")
++    for i in xi: print(i, end=' ')
+ 
+-    print >>x, 6
+-    print >>x, 7
+-    print "test 2i"
+-    for i in xi: print i,
++    print(6, file=x)
++    print(7, file=x)
++    print("test 2i")
++    for i in xi: print(i, end=' ')
+ 
+     xj = iter(x)
+-    print "test 3j"
+-    for i in xj: print i,
++    print("test 3j")
++    for i in xj: print(i, end=' ')
+ 
+-    print >>x, 8
+-    print >>x, 9
++    print(8, file=x)
++    print(9, file=x)
+     
+-    print "test 3j"
+-    for i in xj: print i,
++    print("test 3j")
++    for i in xj: print(i, end=' ')
+ 
+-    print "test 3i"
+-    for i in xi: print i,
++    print("test 3i")
++    for i in xi: print(i, end=' ')
+ 
+     xk = iter(x)
+-    print "test 3k"
+-    for i in xk: print i,
++    print("test 3k")
++    for i in xk: print(i, end=' ')
+ 
+     x = None
+ 
+--- a/atac-driver/chainer/python/PerfectRuns.py
++++ b/atac-driver/chainer/python/PerfectRuns.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ # Looking in /usr/local/ir/bin on the Compaqs for the correct Python interpreter.
+ # export PYTHONPATH=${PYTHONPATH}:$WORK/cds/IR/COMPASS/src/AtacPipeline
+ 
+@@ -32,7 +32,7 @@ def createSignedEnumeration(inpfile):
+             srank = cvm(forwardX == forwardY, p, -p)
+             p += 1
+             FM.extend['srank'] = srank
+-            print >>outfile, FM
++            print(FM, file=outfile)
+         # end if
+     # end while
+     return outfile
+@@ -91,20 +91,20 @@ def findPerfectRuns ( inpfile, maxJump,
+                         sorted_by_y = (y_ls <= y_rs)
+ 
+                         if(not(sorted_by_x or sorted_by_y)):
+-                            print >>sys.stderr, "bad sorting in findPerfectRuns"
+-                            print >>sys.stderr, left
+-                            print >>sys.stderr, right
++                            print("bad sorting in findPerfectRuns", file=sys.stderr)
++                            print(left, file=sys.stderr)
++                            print(right, file=sys.stderr)
+                         assert(sorted_by_x or sorted_by_y)
+                         dovetail_in_x = (x_ls <= x_rs) and (x_le <= x_re)
+                         dovetail_in_y = (y_ls <= y_rs) and (y_ls <= y_re)
+                         if(sorted_by_x and not(dovetail_in_x)):
+-                            print >>sys.stderr, "contained in x in findPerfectRuns"
+-                            print >>sys.stderr, left
+-                            print >>sys.stderr, right
++                            print("contained in x in findPerfectRuns", file=sys.stderr)
++                            print(left, file=sys.stderr)
++                            print(right, file=sys.stderr)
+                         if(sorted_by_y and not(dovetail_in_y)):
+-                            print >>sys.stderr, "contained in y in findPerfectRuns"
+-                            print >>sys.stderr, left
+-                            print >>sys.stderr, right
++                            print("contained in y in findPerfectRuns", file=sys.stderr)
++                            print(left, file=sys.stderr)
++                            print(right, file=sys.stderr)
+                 # endif
+                 if(
+                     (left.x_scaf_uid != right.x_scaf_uid) or  # check first axis id
+@@ -117,7 +117,7 @@ def findPerfectRuns ( inpfile, maxJump,
+             # end if
+             lastpr = pr
+             right.runid = "%s%d" % (runIdPrefix,runid,)   # Assign the run id in the same slot as the signed rank.
+-            print >>outfile, right
++            print(right, file=outfile)
+             left = right
+         # end if
+     # end for
+@@ -127,22 +127,22 @@ def findPerfectRuns ( inpfile, maxJump,
+ def formPerfectRuns ( inpfile, firstSort, secondSort, maxJump, runIdPrefix ):
+     inpfile.seek(0)
+     step = 0
+-    print >>sys.stderr, 'formPerfectRuns step=' + str(step)
++    print('formPerfectRuns step=' + str(step), file=sys.stderr)
+     step += 1
+ 
+     tmpfile = MyFile.myfile()
+     firstSort( inpfile, tmpfile)
+ 
+-    print >>sys.stderr, 'formPerfectRuns step=' + str(step)
++    print('formPerfectRuns step=' + str(step), file=sys.stderr)
+     step += 1
+     outfile = createSignedEnumeration(tmpfile)
+ 
+-    print >>sys.stderr, 'formPerfectRuns step=' + str(step)
++    print('formPerfectRuns step=' + str(step), file=sys.stderr)
+     step += 1
+     tmpfile = MyFile.myfile()
+     secondSort( outfile, tmpfile)
+ 
+-    print >>sys.stderr, 'formPerfectRuns step=' + str(step)
++    print('formPerfectRuns step=' + str(step), file=sys.stderr)
+     step += 1
+     outfile = findPerfectRuns( tmpfile, maxJump, runIdPrefix)
+     
+@@ -161,8 +161,8 @@ def runsAsMatches(inpfile):
+             curF = MatchRecord.MatchRecord(line)
+             if ((lastF == None) or (curF.runid != lastF.runid)):
+                 if ((lastF != None) and (firstF.x_scaf_uid != lastF.x_scaf_uid)):
+-                    print >>sys.stderr, firstF
+-                    print >>sys.stderr, lastF
++                    print(firstF, file=sys.stderr)
++                    print(lastF, file=sys.stderr)
+                 # end if
+                 assert((lastF==None) or (firstF.x_scaf_uid == lastF.x_scaf_uid))
+                 assert((lastF==None) or (firstF.y_scaf_uid == lastF.y_scaf_uid))
+@@ -187,7 +187,7 @@ def runsAsMatches(inpfile):
+                     lastF.x_length = endX - startX
+                     lastF.y_length = endY - startY
+                     lastF.runFill = runFill
+-                    print >>outfile, lastF
++                    print(lastF, file=outfile)
+                 # end if
+                 firstF = curF
+                 runFill = 0
+@@ -218,14 +218,14 @@ def runsAsMatches(inpfile):
+         lastF.x_length = endX - startX
+         lastF.y_length = endY - startY
+         lastF.runFill = runFill
+-        print >>outfile, lastF
++        print(lastF, file=outfile)
+     # end if
+     return outfile
+ # end def
+ 
+ def main(inpname, outname, maxJump, runIdPrefix):
+ 
+-    print >>sys.stderr, "Beware /tmp!\n"
++    print("Beware /tmp!\n", file=sys.stderr)
+ 
+     inpfile = open(inpname)
+     tempdata1 = formPerfectRuns(inpfile,
+--- a/atac-driver/chainer/python/TrimMatchOverlaps.py
++++ b/atac-driver/chainer/python/TrimMatchOverlaps.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ 
+ import sys
+ import MyFile
+@@ -41,10 +41,10 @@ def coalesceMatches ( inpfile, outfile,
+             assert(py >= 0)
+             assert(ny >= 0)
+             if (not (not needs_to_share_diagonal or nx == ny)):
+-                print >>sys.stderr, 'Bombed on:'
+-                print >>sys.stderr, str(curF)
+-                print >>sys.stderr, 'needs_to_share_diagonal=' + str(needs_to_share_diagonal)
+-                print >>sys.stderr, 'nx=' + str(nx) + '  ny=' + str(ny)
++                print('Bombed on:', file=sys.stderr)
++                print(str(curF), file=sys.stderr)
++                print('needs_to_share_diagonal=' + str(needs_to_share_diagonal), file=sys.stderr)
++                print('nx=' + str(nx) + '  ny=' + str(ny), file=sys.stderr)
+             # end if
+             assert((hghHitPX == None or (not needs_to_share_diagonal) or nx == ny))
+             forward = (curF.x_orientation == curF.y_orientation)
+@@ -81,7 +81,7 @@ def coalesceMatches ( inpfile, outfile,
+                     firstF.y_start = lowHitPY
+                     firstF.x_length = hghHitPX - lowHitPX
+                     firstF.y_length = hghHitPY - lowHitPY
+-                    print >>outfile, firstF
++                    print(firstF, file=outfile)
+                 # end if
+                 firstF = curF
+                 lowHitPX = lowMerPX
+@@ -108,7 +108,7 @@ def coalesceMatches ( inpfile, outfile,
+         firstF.y_start = lowHitPY
+         firstF.x_length = hghHitPX - lowHitPX
+         firstF.y_length = hghHitPY - lowHitPY
+-        print >>outfile, firstF
++        print(firstF, file=outfile)
+ 
+     return
+ # end def
+@@ -132,7 +132,7 @@ def trimMatchOverlapsInX(inpfile,outfile
+         if(line[0] == 'M'):
+             right = MatchRecord.MatchRecord(line)
+             if( right.subtype != trim_subtype):
+-                print >>outfile, line,
++                print(line, end=' ', file=outfile)
+                 continue
+             if( left == None or
+                 #left.x_scaf_uid < right.x_scaf_uid):
+@@ -142,15 +142,15 @@ def trimMatchOverlapsInX(inpfile,outfile
+                 assert(left != None)
+                 assert(right != None)
+                 if(left.x_scaf_uid > right.x_scaf_uid):
+-                    print >>sys.stderr, "sequence ids out of x sorted order"
+-                    print >>sys.stderr, left
+-                    print >>sys.stderr, right
++                    print("sequence ids out of x sorted order", file=sys.stderr)
++                    print(left, file=sys.stderr)
++                    print(right, file=sys.stderr)
+                 assert(left.subtype == right.subtype)
+                 assert(left.x_scaf_uid == right.x_scaf_uid)
+                 if(not(left.x_start <= right.x_start)):
+-                    print >>sys.stderr, "trimMatchOverlapsInX: Woops not sorted anymore!"
+-                    print >>sys.stderr, left
+-                    print >>sys.stderr, right
++                    print("trimMatchOverlapsInX: Woops not sorted anymore!", file=sys.stderr)
++                    print(left, file=sys.stderr)
++                    print(right, file=sys.stderr)
+                     #assert(0)
+ 
+                 thisbgn = right.x_start
+@@ -177,16 +177,16 @@ def trimMatchOverlapsInX(inpfile,outfile
+                     contained += 1
+                     right = None # remove this match
+             if(right != None):
+-                print >>outfile, right
++                print(right, file=outfile)
+                 newpicket = right.x_start + right.x_length
+                 assert(picket < newpicket)
+                 picket = newpicket
+                 left = right
+         else:
+-            print >>outfile, line,
+-    print >>sys.stderr, "trimMatchOverlapsInX:\n",
+-    print >>sys.stderr, "#posgaps, #abuts, #overlaps, #contained, bp_trimmed= %d %d %d %d %d\n" \
+-          % (posgaps, abuts, overlaps, contained, trimmed, )
++            print(line, end=' ', file=outfile)
++    print("trimMatchOverlapsInX:\n", end=' ', file=sys.stderr)
++    print("#posgaps, #abuts, #overlaps, #contained, bp_trimmed= %d %d %d %d %d\n" \
++          % (posgaps, abuts, overlaps, contained, trimmed, ), file=sys.stderr)
+     return
+ 
+ def trimMatchOverlapsInY(inpfile,outfile, trim_subtype):
+@@ -208,7 +208,7 @@ def trimMatchOverlapsInY(inpfile,outfile
+         if(line[0] == 'M'):
+             right = MatchRecord.MatchRecord(line)
+             if( right.subtype != trim_subtype):
+-                print >>outfile, line,
++                print(line, end=' ', file=outfile)
+                 continue
+             if( left == None or
+                 #left.y_scaf_uid < right.y_scaf_uid):
+@@ -218,15 +218,15 @@ def trimMatchOverlapsInY(inpfile,outfile
+                 assert(left != None)
+                 assert(right != None)
+                 if(left.y_scaf_uid > right.y_scaf_uid):
+-                    print >>sys.stderr, "sequence ids out of y sorted order"
+-                    print >>sys.stderr, left
+-                    print >>sys.stderr, right
++                    print("sequence ids out of y sorted order", file=sys.stderr)
++                    print(left, file=sys.stderr)
++                    print(right, file=sys.stderr)
+                 assert(left.subtype == right.subtype)
+                 assert(left.y_scaf_uid == right.y_scaf_uid)
+                 if(not(left.y_start <= right.y_start)):
+-                    print >>sys.stderr, "trimMatchOverlapsInY: Woops not sorted anymore!"
+-                    print >>sys.stderr, left
+-                    print >>sys.stderr, right
++                    print("trimMatchOverlapsInY: Woops not sorted anymore!", file=sys.stderr)
++                    print(left, file=sys.stderr)
++                    print(right, file=sys.stderr)
+                     #assert(0)
+ 
+                 thisbgn = right.y_start
+@@ -253,16 +253,16 @@ def trimMatchOverlapsInY(inpfile,outfile
+                     contained += 1
+                     right = None # remove this match
+             if(right != None):
+-                print >>outfile, right
++                print(right, file=outfile)
+                 newpicket = right.y_start + right.y_length
+                 assert(picket < newpicket)
+                 picket = newpicket
+                 left = right
+         else:
+-            print >>outfile, line,
+-    print >>sys.stderr, "trimMatchOverlapsInY:\n",
+-    print >>sys.stderr, "#posgaps, #abuts, #overlaps, #contained, bp_trimmed= %d %d %d %d %d\n" \
+-          % (posgaps, abuts, overlaps, contained, trimmed, )
++            print(line, end=' ', file=outfile)
++    print("trimMatchOverlapsInY:\n", end=' ', file=sys.stderr)
++    print("#posgaps, #abuts, #overlaps, #contained, bp_trimmed= %d %d %d %d %d\n" \
++          % (posgaps, abuts, overlaps, contained, trimmed, ), file=sys.stderr)
+     return
+ 
+ 
+--- a/atac-driver/chainer/python/UniqueFilter.py
++++ b/atac-driver/chainer/python/UniqueFilter.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ 
+ import os, sys, time, tempfile
+ import MyFile
+@@ -19,7 +19,7 @@ def xorIntervals( inpname, outname):
+         rghtSide = min(newstart,rghtPicket)
+         if rghtSide > leftPicket:
+             # interval has positive length
+-            print >>outfile, leftPicket, rghtSide
++            print(leftPicket, rghtSide, file=outfile)
+         leftPicket = max(newstart,  min(rightPicket,newend))
+         rghtPicket = max(leftPicket,max(rightPicket,newend))
+ 
+@@ -35,10 +35,10 @@ def findUniformCoverageIntervals(inpfile
+         if(recordtype == "E"):
+             newposition = int(newposition)
+             newchange = int(newchange)
+-            if(newaxis != oldaxis and cov != 0): print >>sys.stderr, "Woops"
++            if(newaxis != oldaxis and cov != 0): print("Woops", file=sys.stderr)
+             len = newposition - oldposition
+             if(cov>0 and len>0):
+-                print >>outfile, "C", oldaxis, oldposition, len, cov;
++                print("C", oldaxis, oldposition, len, cov, file=outfile);
+             cov += newchange;
+             assert(cov >= 0)
+             oldaxis = newaxis; oldposition = newposition;
+@@ -65,18 +65,18 @@ def findCoverageIntervals( inpfile, outf
+                     axis = fields[8]
+                     bgn = int(fields[9])
+                     end = bgn+int(fields[10])
+-                print >>tmpfile3, "E", axis,bgn,1
+-                print >>tmpfile3, "E", axis,end,-1
++                print("E", axis,bgn,1, file=tmpfile3)
++                print("E", axis,end,-1, file=tmpfile3)
+     tmpfile3.close()
+     tmpname = tempfile.mktemp()
+     cmd = "sort -T . -k 1,1 -k 2,2 -k 3n -k 4nr  %s > %s" % (tmpfile3.name, tmpname)
+-    print >>sys.stderr, cmd
++    print(cmd, file=sys.stderr)
+     iret = os.system(cmd); assert(iret==0)
+-    print >>sys.stderr,"time elapsed is ", (time.time() - t0)
++    print("time elapsed is ", (time.time() - t0), file=sys.stderr)
+     tmpfile4 = open(tmpname)
+     t0 = time.time()
+     findUniformCoverageIntervals( tmpfile4, outfile)
+-    print >>sys.stderr,"time elapsed is ", (time.time() - t0)
++    print("time elapsed is ", (time.time() - t0), file=sys.stderr)
+     tmpfile4.close()
+     os.system("rm -f " + tmpname)
+     outfile.seek(0)
+@@ -111,7 +111,7 @@ def applyOneKeepMask( inpfile, outfile,
+     try:   # StopIteration exception from either iterator gets us out
+         while 1:
+             if(iline == None):
+-                iline = maskiter.next()
++                iline = next(maskiter)
+                 (subtype, qa, qs, ql, cov, ) = iline.split()
+                 assert(subtype=='C')
+                 cov= int(cov)
+@@ -123,10 +123,10 @@ def applyOneKeepMask( inpfile, outfile,
+                 qe = qs + ql
+ 
+             if(mline == None):
+-                mline = inpiter.next()
++                mline = next(inpiter)
+                 if(mline[0] != 'M'):
+                     # not a match record, so just pass it through
+-                    print >>outfile, mline,
++                    print(mline, end=' ', file=outfile)
+                     mline = None
+                     continue
+                 FM = MatchRecord.MatchRecord(mline)
+@@ -177,8 +177,8 @@ def applyOneKeepMask( inpfile, outfile,
+                 FT.x_length = trimmedLength
+                 FT.y_length = trimmedLength
+                 if debug:
+-                    print >>sys.stdout, "# trimmed "
+-                    print >>sys.stdout, FT
++                    print("# trimmed ", file=sys.stdout)
++                    print(FT, file=sys.stdout)
+ 
+                 # We must insure that the match identifier is still unique.
+                 if last_matchid == FM.matchid :
+@@ -194,7 +194,7 @@ def applyOneKeepMask( inpfile, outfile,
+                     else:
+                         FT.matchid = FT.matchid + "y" + str(subcount)
+                 
+-                print >>outfile, FT
++                print(FT, file=outfile)
+                 # we need to get a new one
+                 if(qe < me):
+                     iline = None
+@@ -205,7 +205,7 @@ def applyOneKeepMask( inpfile, outfile,
+         # If there are any left over non-match lines, then output them!
+         for mline in inpiter:
+             if(mline[0] != "M"):
+-                print >>outfile, mline,
++                print(mline, end=' ', file=outfile)
+ 
+ def applyBothKeepMasks( inpfile, outfile ):
+ 
+@@ -238,7 +238,7 @@ def applyBothKeepMasks( inpfile, outfile
+     findCoverageIntervals( inpfile, keepMaskFile, processFirstAxis)
+     if debug:
+         debugnum += 1; debugfile = open("debugfile.%d" % debugnum, "w")
+-        for line in keepMaskFile: print >>debugfile, line,
++        for line in keepMaskFile: print(line, end=' ', file=debugfile)
+             
+     MatchRecord.sortInXorderAP(tmpfile2,tmpfile3)
+     if debug:
+@@ -247,13 +247,13 @@ def applyBothKeepMasks( inpfile, outfile
+         #for line in tmpfile2: print >>debugfile, line,
+         tmpfile3.seek(0)
+         debugnum += 1; debugfile = open("debugfile.%d" % debugnum, "w")
+-        for line in tmpfile3: print >>debugfile, line,
++        for line in tmpfile3: print(line, end=' ', file=debugfile)
+         
+     applyOneKeepMask( tmpfile3, tmpfile4, keepMaskFile, processFirstAxis)
+     if debug:
+         tmpfile4.seek(0)
+         debugnum += 1; debugfile = open("debugfile.%d" % debugnum, "w")
+-        for line in tmpfile4: print >>debugfile, line,
++        for line in tmpfile4: print(line, end=' ', file=debugfile)
+         
+     # Apply the keepMask for the second axis.
+     # Make the sorted the keep mask intervals for the second axis.
+@@ -266,7 +266,7 @@ def applyBothKeepMasks( inpfile, outfile
+     findCoverageIntervals( inpfile, keepMaskFile, processFirstAxis)
+     if debug:
+         debugnum += 1; debugfile = open("debugfile.%d" % debugnum, "w")
+-        for line in keepMaskFile: print >>debugfile, line,
++        for line in keepMaskFile: print(line, end=' ', file=debugfile)
+ 
+ 
+     MatchRecord.sortInYorderAP(tmpfile2,tmpfile3)
+@@ -276,13 +276,13 @@ def applyBothKeepMasks( inpfile, outfile
+         #for line in tmpfile2: print >>debugfile, line,
+         tmpfile3.seek(0)
+         debugnum += 1; debugfile = open("debugfile.%d" % debugnum, "w")
+-        for line in tmpfile3: print >>debugfile, line,
++        for line in tmpfile3: print(line, end=' ', file=debugfile)
+ 
+     applyOneKeepMask( tmpfile3, tmpfile4, keepMaskFile, processFirstAxis)
+     if debug:
+         tmpfile4.seek(0)
+         debugnum += 1; debugfile = open("debugfile.%d" % debugnum, "w")
+-        for line in tmpfile4: print >>debugfile, line,
++        for line in tmpfile4: print(line, end=' ', file=debugfile)
+ 
+ 
+ def main( inpfile, outfile):
+--- a/atac-driver/chainer/python/dedashMatches.py
++++ b/atac-driver/chainer/python/dedashMatches.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ 
+ # dedashMatches.py /prod/IR02/synteny/mus-vs-rat/mouse_celera_R13_chr_20030210-vs-rat_celera_R1_chr_20030507-V3.atac.t20.l100.br.squeezed.filled.coalesced mus-vs-rat.out /prod/IR05/GENOMES/mouse_celera_R13_chr_20030210 /prod/IR05/GENOMES/rat_celera_R1_chr_20030507 MR13 RR1
+ 
+@@ -32,7 +32,7 @@ def subc():
+     suba()
+     it = iter(subb,None)
+     for y in it:
+-        print y
++        print(y)
+ 
+ def main( inpfile, outfile, xIdx, yIdx):
+     inpfile.seek(0)
+@@ -42,7 +42,7 @@ def main( inpfile, outfile, xIdx, yIdx):
+     for line in inpfile:
+         lineCount += 1
+         if((lineCount % 10000)==0):
+-            print >>sys.stderr, "lineCount=",lineCount," time=",time.time()-t0
++            print("lineCount=",lineCount," time=",time.time()-t0, file=sys.stderr)
+         if(line[0] == 'M'):
+             FM = MatchRecord.MatchRecord(line)
+             if(FM.subtype == 'g'):
+@@ -87,11 +87,11 @@ def main( inpfile, outfile, xIdx, yIdx):
+                             mismatches += 1
+                     FM.extend['mm'] = str(mismatches)
+                     FM.identifier = ""  # BEWARE
+-                    print >>outfile, FM
++                    print(FM, file=outfile)
+             else:
+-                print >>outfile, line,
++                print(line, end=' ', file=outfile)
+         else:
+-            print >>outfile, line,
++            print(line, end=' ', file=outfile)
+ 
+ 
+ def oldmain():    
+--- a/atac-driver/chainer/python/fillIntraRunGaps.py
++++ b/atac-driver/chainer/python/fillIntraRunGaps.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ 
+ import sys
+ import string
+@@ -9,7 +9,7 @@ import halign
+ #import shelve
+ 
+ # True=1
+-False=0
++# False=0
+ 
+ def analyzeGap(x,y,left,right,outfile,maxgap,erate,margin):
+     inter_run_gap_count = 0
+@@ -33,20 +33,20 @@ def analyzeGap(x,y,left,right,outfile,ma
+         sorted_by_y = (left.y_start <= right.y_start) and \
+                       (left.y_start+left.y_length <= right.y_start+right.y_length)
+         if(not(sorted_by_x or sorted_by_y)):
+-           print >>sys.stderr, "bad sorting in runs"
+-           print >>sys.stderr, left
+-           print >>sys.stderr, right
++           print("bad sorting in runs", file=sys.stderr)
++           print(left, file=sys.stderr)
++           print(right, file=sys.stderr)
+         assert(sorted_by_x or sorted_by_y)
+         # This concept of sorted allows neggaps but not containmant in both axes.
+ 
+         if(not((not left_forward) or (sorted_by_x and sorted_by_y))):
+-           print >>sys.stderr, "bad sorting in runs"
+-           print >>sys.stderr, left
+-           print >>sys.stderr, right
++           print("bad sorting in runs", file=sys.stderr)
++           print(left, file=sys.stderr)
++           print(right, file=sys.stderr)
+         if(not((left_forward) or (not(sorted_by_x and sorted_by_y)))):
+-           print >>sys.stderr, "bad sorting in runs"
+-           print >>sys.stderr, left
+-           print >>sys.stderr, right
++           print("bad sorting in runs", file=sys.stderr)
++           print(left, file=sys.stderr)
++           print(right, file=sys.stderr)
+         assert((not left_forward) or (sorted_by_x and sorted_by_y))
+         assert((left_forward) or (not(sorted_by_x and sorted_by_y)))
+ 
+@@ -104,10 +104,10 @@ def analyzeGap(x,y,left,right,outfile,ma
+             parent_y_length = y_len + 2*margin
+ 
+             if 0:
+-                print >>sys.stderr, "parent_x_start=%d" % parent_x_start
+-                print >>sys.stderr, "parent_y_start=%d" % parent_y_start
+-                print >>sys.stderr, "parent_x_length=%d" % parent_x_length
+-                print >>sys.stderr, "parent_y_length=%d" % parent_y_length
++                print("parent_x_start=%d" % parent_x_start, file=sys.stderr)
++                print("parent_y_start=%d" % parent_y_start, file=sys.stderr)
++                print("parent_x_length=%d" % parent_x_length, file=sys.stderr)
++                print("parent_y_length=%d" % parent_y_length, file=sys.stderr)
+ 
+             x_seq = ""
+             if(x_len > 0):
+@@ -123,13 +123,13 @@ def analyzeGap(x,y,left,right,outfile,ma
+             # end if
+ 
+             if 0:
+-                print >>outfile, "# STARTED localAlignerInterface.syntenicSegments"
+-                print >>outfile, "# left = %s" % str(left)
+-                print >>outfile, "# right= %s" % str(right)
+-                print >>sys.stderr, "x_seq="+x_seq
+-                print >>sys.stderr, "len(x_seq)=",len(x_seq)
+-                print >>sys.stderr, "y_seq="+y_seq
+-                print >>sys.stderr, "len(y_seq)=",len(y_seq)
++                print("# STARTED localAlignerInterface.syntenicSegments", file=outfile)
++                print("# left = %s" % str(left), file=outfile)
++                print("# right= %s" % str(right), file=outfile)
++                print("x_seq="+x_seq, file=sys.stderr)
++                print("len(x_seq)=",len(x_seq), file=sys.stderr)
++                print("y_seq="+y_seq, file=sys.stderr)
++                print("len(y_seq)=",len(y_seq), file=sys.stderr)
+                 outfile.flush()
+ 
+             try:
+@@ -156,34 +156,34 @@ def analyzeGap(x,y,left,right,outfile,ma
+                     assert(bgn1 >= 0)
+                     assert(bgn2 >= 0)
+                     if(not(bgn1 + len1 <= parent_x_length)):
+-                        print >>sys.stdout,"# warn(not(bgn1 + len1 <= parent_x_length))"
+-                        print >>sys.stdout,"# bgn1=%d len1=%d parent_x_length=%d" % (bgn1,len1,parent_x_length)
+-                        print >>sys.stdout,"# left = %s" % str(left)
+-                        print >>sys.stdout,"# right= %s" % str(right)
+-                        print >>sys.stdout,"# bgn1,bgn2,len1,len2=", bgn1,bgn2,len1,len2
++                        print("# warn(not(bgn1 + len1 <= parent_x_length))", file=sys.stdout)
++                        print("# bgn1=%d len1=%d parent_x_length=%d" % (bgn1,len1,parent_x_length), file=sys.stdout)
++                        print("# left = %s" % str(left), file=sys.stdout)
++                        print("# right= %s" % str(right), file=sys.stdout)
++                        print("# bgn1,bgn2,len1,len2=", bgn1,bgn2,len1,len2, file=sys.stdout)
+                         #print >>sys.stdout,"# xseq=%s" % x_seq[bgn1:bgn1+len1]
+                         #print >>sys.stdout,"# yseq=%s" % y_seq[bgn2:bgn2+len2]
+                         len1 = parent_x_length - bgn1
+-                        print >>sys.stdout, "# Change len1 = %d" % len1
++                        print("# Change len1 = %d" % len1, file=sys.stdout)
+                     if(not(bgn2 + len2 <= parent_y_length)):
+-                        print >>sys.stdout,"# warn(not(bgn2 + len2 <= parent_y_length))"
+-                        print >>sys.stdout,"# bgn2=%d len2=%d parent_y_length=%d" % (bgn2,len2,parent_y_length)
+-                        print >>sys.stdout,"# left = %s" % str(left)
+-                        print >>sys.stdout,"# right= %s" % str(right)
+-                        print >>sys.stdout,"# bgn1,bgn2,len1,len2=", bgn1,bgn2,len1,len2
++                        print("# warn(not(bgn2 + len2 <= parent_y_length))", file=sys.stdout)
++                        print("# bgn2=%d len2=%d parent_y_length=%d" % (bgn2,len2,parent_y_length), file=sys.stdout)
++                        print("# left = %s" % str(left), file=sys.stdout)
++                        print("# right= %s" % str(right), file=sys.stdout)
++                        print("# bgn1,bgn2,len1,len2=", bgn1,bgn2,len1,len2, file=sys.stdout)
+                         #print >>sys.stdout,"# xseq=%s" % x_seq[bgn1:bgn1+len1]
+                         #print >>sys.stdout,"# yseq=%s" % y_seq[bgn2:bgn2+len2]
+                         len2 = parent_y_length - bgn2
+-                        print >>sys.stdout,"# Change len2 = %d" % len2
++                        print("# Change len2 = %d" % len2, file=sys.stdout)
+                     if (len1 == 0):
+-                        print >>sys.stdout,"# warn(len1 == 0)"
+-                        print >>sys.stdout,"# bgn1,bgn2,len1,len2=", bgn1,bgn2,len1,len2
+-                        print >>sys.stdout,"# bgn1=%d len1=%d parent_x_length=%d" % (bgn1,len1,parent_x_length)
++                        print("# warn(len1 == 0)", file=sys.stdout)
++                        print("# bgn1,bgn2,len1,len2=", bgn1,bgn2,len1,len2, file=sys.stdout)
++                        print("# bgn1=%d len1=%d parent_x_length=%d" % (bgn1,len1,parent_x_length), file=sys.stdout)
+                         continue
+                     if (len2 == 0):
+-                        print >>sys.stdout,"# warn(len2 == 0)"
+-                        print >>sys.stdout,"# bgn1,bgn2,len1,len2=", bgn1,bgn2,len1,len2
+-                        print >>sys.stdout,"# bgn2=%d len2=%d parent_y_length=%d" % (bgn2,len2,parent_y_length)
++                        print("# warn(len2 == 0)", file=sys.stdout)
++                        print("# bgn1,bgn2,len1,len2=", bgn1,bgn2,len1,len2, file=sys.stdout)
++                        print("# bgn2=%d len2=%d parent_y_length=%d" % (bgn2,len2,parent_y_length), file=sys.stdout)
+                         continue
+                     assert(bgn1 >= 0)
+                     assert(bgn2 >= 0)
+@@ -218,11 +218,11 @@ def analyzeGap(x,y,left,right,outfile,ma
+                     #assert(bgn2+len2 <= parent_y_length)
+ 
+                     if 0:
+-                        print >>sys.stderr, "# x_seq=%s" % x_seq
+-                        print >>sys.stderr, "# y_seq=%s" % y_seq
+-                        print >>sys.stderr, "# bgn1,bgn2,len1,len2=", bgn1,bgn2,len1,len2
+-                        print >>sys.stderr, "# xseq=%s" % x_seq[bgn1:bgn1+len1]
+-                        print >>sys.stderr, "# yseq=%s" % y_seq[bgn2:bgn2+len2]
++                        print("# x_seq=%s" % x_seq, file=sys.stderr)
++                        print("# y_seq=%s" % y_seq, file=sys.stderr)
++                        print("# bgn1,bgn2,len1,len2=", bgn1,bgn2,len1,len2, file=sys.stderr)
++                        print("# xseq=%s" % x_seq[bgn1:bgn1+len1], file=sys.stderr)
++                        print("# yseq=%s" % y_seq[bgn2:bgn2+len2], file=sys.stderr)
+ 
+                     halign.halignStart(x_seq[bgn1:bgn1+len1], y_seq[bgn2:bgn2+len2])
+                     outfile.flush()
+@@ -246,20 +246,20 @@ def analyzeGap(x,y,left,right,outfile,ma
+                                 mismatches += 1
+                         FM.extend['mm'] = str(mismatches)
+                         #FM.identifier = ""  # BEWARE
+-                        print >>outfile, FM
++                        print(FM, file=outfile)
+ 
+                 # localAlignerInterface.free()
+                 # print >>outfile,"# FINISHED localAlignerInterface.syntenicSegments"
+             except RuntimeError:
+-                print >>outfile, "# NOTE syntenicSegments failed between these records"
+-                print >>outfile, "# STARTED localAlignerInterface.syntenicSegments"
+-                print >>outfile, "# left = %s" % str(left)
+-                print >>outfile, "# right= %s" % str(right)
+-                print >>sys.stderr, "NOTE syntenicSegments failed in fillIntraRunGaps for:"
+-                print >>sys.stderr, "x_seq="+x_seq
+-                print >>sys.stderr, "len(x_seq)=",len(x_seq)
+-                print >>sys.stderr, "y_seq="+y_seq
+-                print >>sys.stderr, "len(y_seq)=",len(y_seq)
++                print("# NOTE syntenicSegments failed between these records", file=outfile)
++                print("# STARTED localAlignerInterface.syntenicSegments", file=outfile)
++                print("# left = %s" % str(left), file=outfile)
++                print("# right= %s" % str(right), file=outfile)
++                print("NOTE syntenicSegments failed in fillIntraRunGaps for:", file=sys.stderr)
++                print("x_seq="+x_seq, file=sys.stderr)
++                print("len(x_seq)=",len(x_seq), file=sys.stderr)
++                print("y_seq="+y_seq, file=sys.stderr)
++                print("len(y_seq)=",len(y_seq), file=sys.stderr)
+         # end if
+ 
+     else:
+@@ -291,7 +291,7 @@ def mainLoop( inpfile, outfile, xIdx, yI
+     for line in inpfileIter:
+         if(line[0] == 'M'):
+             left = MatchRecord.MatchRecord(line)
+-            print >>outfile, left
++            print(left, file=outfile)
+             countLines += 1
+             break;
+ 
+@@ -311,7 +311,7 @@ def mainLoop( inpfile, outfile, xIdx, yI
+                 inter_run_gap_count_total += inter_run_gap_count
+ 
+                 # Output the record which was possibly trimmed.
+-                print >>outfile, right
++                print(right, file=outfile)
+                 countLines += 1
+                 left = right
+         # end if
+@@ -330,9 +330,9 @@ def main( inpname, outname):
+     assemblyFilePrefix1 = obj.globals['assemblyFilePrefix1']
+     assemblyFilePrefix2 = obj.globals['assemblyFilePrefix2']
+ 
+-    if(not obj.globals.has_key('fillIntraRunGapsErate')):
++    if('fillIntraRunGapsErate' not in obj.globals):
+         obj.globals['fillIntraRunGapsErate'] = 0.10
+-    if(not obj.globals.has_key('fillIntraRunGapsMaxGap')):
++    if('fillIntraRunGapsMaxGap' not in obj.globals):
+         obj.globals['fillIntraRunGapsMaxGap'] = 100000
+     fillIntraRunGapsErate = float(obj.globals['fillIntraRunGapsErate'])
+     fillIntraRunGapsMaxGap = int(obj.globals['fillIntraRunGapsMaxGap'])
+--- a/atac-driver/chainer/python/mkstats.py
++++ b/atac-driver/chainer/python/mkstats.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ # Must look in /usr/local/ir/bin on the Compaqs for the correct Python interpreter.
+ # export PYTHONPATH=${PYTHONPATH}:$WORK/cds/IR/COMPASS/src/AtacPipeline
+ 
+@@ -19,7 +19,7 @@ def main(glist):
+             pattern = re.compile(r"^M [gl] ")
+             for line in inpfile:
+                 if(pattern.search(line)):
+-                    print >>tmpfile, line,
++                    print(line, end=' ', file=tmpfile)
+             tmpfile.close()
+             os.system("celagram -c 7 -t 'gapped match lengths' %s" % (tmpname,))
+ 
+@@ -30,7 +30,7 @@ def main(glist):
+             pattern = re.compile(r"^M x ")
+             for line in inpfile:
+                 if(pattern.search(line)):
+-                    print >>tmpfile, line,
++                    print(line, end=' ', file=tmpfile)
+             tmpfile.close()
+             os.system("celagram -c 7 -t 'exact match lengths' %s" % (tmpname,))
+ 
+@@ -41,7 +41,7 @@ def main(glist):
+             pattern = re.compile(r"^M u ")
+             for line in inpfile:
+                 if(pattern.search(line)):
+-                    print >>tmpfile, line,
++                    print(line, end=' ', file=tmpfile)
+             tmpfile.close()
+             os.system("celagram -c 7 -t 'ungapped match lengths' %s" % (tmpname,))
+ 
+@@ -52,7 +52,7 @@ def main(glist):
+         pattern = re.compile(r"^M [xu] ")
+         for line in inpfile:
+             if(pattern.search(line)):
+-                print >>tmpfile, line,
++                print(line, end=' ', file=tmpfile)
+         tmpfile.close()
+         os.system("celagram -c 7 -t '%s ungapped match lengths' %s" % (inpname,tmpname))
+ 
+@@ -63,7 +63,7 @@ def main(glist):
+         pattern = re.compile(r"^M\s*r\s")
+         for line in inpfile:
+             if(pattern.search(line)):
+-                print >>tmpfile, line,
++                print(line, end=' ', file=tmpfile)
+         tmpfile.close()
+         os.system("celagram -c 7  -t '%s spans in 1st assembly' %s" % (inpname,tmpname))
+         os.system("celagram -c 11 -t '%s spans in 2nd assembly' %s" % (inpname,tmpname))
+--- a/atac-driver/chainer/python/squeezeIntraRunGaps.py
++++ b/atac-driver/chainer/python/squeezeIntraRunGaps.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ 
+ import sys
+ import string
+@@ -9,7 +9,7 @@ import IdxStore
+ #import shelve
+ 
+ # True=1
+-False=0
++# False=0
+ 
+         
+ theIsolatedSNPcount = 0
+@@ -52,30 +52,30 @@ def analyzeGap(x,y,left,right,outfile,ma
+         sorted_by_y = (left.y_start <= right.y_start)
+         dovetail_in_y = sorted_by_y and (left.y_start+left.y_length <= right.y_start+right.y_length)
+         if(not(sorted_by_x or sorted_by_y)):
+-           print >>sys.stderr, "bad sorting in runs"
+-           print >>sys.stderr, left
+-           print >>sys.stderr, right
++           print("bad sorting in runs", file=sys.stderr)
++           print(left, file=sys.stderr)
++           print(right, file=sys.stderr)
+         assert(sorted_by_x or sorted_by_y)
+         # This concept of sorted allows neggaps but not containmant in both axes.
+ 
+         if(sorted_by_x and not dovetail_in_x):
+-           print >>sys.stderr, "sorted_by_x and not dovetail_in_x"
+-           print >>sys.stderr, left
+-           print >>sys.stderr, right
++           print("sorted_by_x and not dovetail_in_x", file=sys.stderr)
++           print(left, file=sys.stderr)
++           print(right, file=sys.stderr)
+         
+         if(sorted_by_y and not dovetail_in_y):
+-           print >>sys.stderr, "sorted_by_y and not dovetail_in_y"
+-           print >>sys.stderr, left
+-           print >>sys.stderr, right
++           print("sorted_by_y and not dovetail_in_y", file=sys.stderr)
++           print(left, file=sys.stderr)
++           print(right, file=sys.stderr)
+         
+         if(not((not left_forward) or (sorted_by_x and sorted_by_y))):
+-           print >>sys.stderr, "bad sorting in runs"
+-           print >>sys.stderr, left
+-           print >>sys.stderr, right
++           print("bad sorting in runs", file=sys.stderr)
++           print(left, file=sys.stderr)
++           print(right, file=sys.stderr)
+         if(not((left_forward) or (not(sorted_by_x and sorted_by_y)))):
+-           print >>sys.stderr, "bad sorting in runs"
+-           print >>sys.stderr, left
+-           print >>sys.stderr, right
++           print("bad sorting in runs", file=sys.stderr)
++           print(left, file=sys.stderr)
++           print(right, file=sys.stderr)
+         assert((not left_forward) or (sorted_by_x and sorted_by_y))
+         assert((left_forward) or (not(sorted_by_x and sorted_by_y)))
+ 
+@@ -157,19 +157,19 @@ def analyzeGap(x,y,left,right,outfile,ma
+             sys.stderr.write("x string lengths mismatch asked=%d got=%d\n" % (x_len,len(x_substring)))
+             sys.stderr.write("x_uid= %s x_pos= %d x_len= %d y_uid= %s y_pos= %d y_len= %d\n" %
+                                        (left.x_scaf_uid,x_pos,x_len,left.y_scaf_uid,y_pos,y_len))
+-            print >>sys.stderr, "left match"
+-            print >>sys.stderr, left
+-            print >>sys.stderr, "right match"
+-            print >>sys.stderr, right
++            print("left match", file=sys.stderr)
++            print(left, file=sys.stderr)
++            print("right match", file=sys.stderr)
++            print(right, file=sys.stderr)
+         # end if
+         if(y_len > 0 and not(y_len == len(y_substring))):
+             sys.stderr.write("y string lengths mismatch asked=%d got=%d\n" % (y_len,len(y_substring)))
+             sys.stderr.write("x_uid= %s x_pos= %d x_len= %d y_uid= %s y_pos= %d y_len= %d\n" %
+                                        (left.x_scaf_uid,x_pos,x_len,left.y_scaf_uid,y_pos,y_len))
+-            print >>sys.stderr, "left match"
+-            print >>sys.stderr, left
+-            print >>sys.stderr, "right match"
+-            print >>sys.stderr, right
++            print("left match", file=sys.stderr)
++            print(left, file=sys.stderr)
++            print("right match", file=sys.stderr)
++            print(right, file=sys.stderr)
+         # end if
+         
+         assert(x_len < 0 or x_len == len(x_substring))
+@@ -357,7 +357,7 @@ def analyzeGap(x,y,left,right,outfile,ma
+                 # end if
+             # end if
+             # outfile.write(str(left_fill))
+-            print >>outfile, left_fill
++            print(left_fill, file=outfile)
+         # end if
+         if(rp>0):
+             right_fill = right.copy()
+@@ -386,7 +386,7 @@ def analyzeGap(x,y,left,right,outfile,ma
+                 # end if
+             # end if
+             #outfile.write(str(right_fill))
+-            print >>outfile, right_fill
++            print(right_fill, file=outfile)
+         # end if
+         
+         if(0): # Start gap composition diagnostics.
+@@ -447,7 +447,7 @@ def mainLoop( inpfile, outfile, xIdx, yI
+         if(line[0] == 'M'):
+             left = MatchRecord.MatchRecord(line)
+             # outfile.write(str(left))
+-            print >>outfile, left
++            print(left, file=outfile)
+             countLines += 1
+             break;
+ 
+@@ -470,7 +470,7 @@ def mainLoop( inpfile, outfile, xIdx, yI
+ 
+             # Output the record which was possibly trimmed.
+             #outfile.write(str(right))
+-            print >>outfile, right
++            print(right, file=outfile)
+             countLines += 1
+             left = right
+         # end if
+--- a/atac-driver/config.py
++++ b/atac-driver/config.py
+@@ -1,11 +1,11 @@
+-#!/usr/local/packages/python-2.7.3/bin/python2.7
++#!/usr/bin/python3
+ 
+ import sys
+ import os
+ import getopt
+ from distutils import sysconfig
+ 
+-print sysconfig.get_python_inc()
++print(sysconfig.get_python_inc())
+ 
+ #        flags = ['-I' + ,
+ #                 '-I' + sysconfig.get_python_inc(plat_specific=True)]
+--- a/configure.sh
++++ b/configure.sh
+@@ -80,14 +80,14 @@ fi
+ #  used by atac-driver/chainer only.
+ #
+ 
+-PYTHON=${PYTHON:-`which python`}
++PYTHON=${PYTHON:-`which python3`}
+ 
+ if [ ! -x $PYTHON ] ; then
+-  echo "WARNING:  Python program not found at '$PYTHON'.  Try setting environment variable PYTHON to the location of the python interpreter."
++  echo "WARNING:  Python3 program not found at '$PYTHON'.  Try setting environment variable PYTHON to the location of the python interpreter."
+   WITHOUT_ATAC="atac-driver/ seatac/"
+ else
+   echo "Python executable found in '$PYTHON'"
+-  CFLAGS_PYTHON=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_inc()"`
++  CFLAGS_PYTHON=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_inc())"`
+   
+   if [ -z "$CFLAGS_PYTHON" -o ! -d "$CFLAGS_PYTHON" ] ; then
+     echo "WARNING:  Python development environment not found."
+--- a/atac-driver/chainer/localalign/localAlignerInterfacemodule.C
++++ b/atac-driver/chainer/localalign/localAlignerInterfacemodule.C
+@@ -227,8 +227,17 @@ registration_table[] = {
+ };
+ 
+ 
++static struct PyModuleDef cModMethods =
++{
++    PyModuleDef_HEAD_INIT,
++    "localAlignerInterface",  /* name of module */
++    "",          /* module documentation, may be NULL */
++    -1,          /* size of per-interpreter state of the module, or -1 if the module keeps state in global variables. */
++    registration_table
++};
++
+ extern "C"
+ void initlocalAlignerInterface() {
+-  Py_InitModule("localAlignerInterface", registration_table);
++  PyModule_Create(&cModMethods);
+ }
+ 
+--- a/atac-driver/chainer/halign/halignmodule.C
++++ b/atac-driver/chainer/halign/halignmodule.C
+@@ -54,7 +54,16 @@ registration_table[] = {
+   {NULL, NULL, 0, NULL}
+ };
+ 
++static struct PyModuleDef cModMethods =
++{
++    PyModuleDef_HEAD_INIT,
++    "halign",    /* name of module */
++    "",          /* module documentation, may be NULL */
++    -1,          /* size of per-interpreter state of the module, or -1 if the module keeps state in global variables. */
++    registration_table
++};
++
+ extern "C" 
+ void inithalign(void) {
+-  Py_InitModule("halign", registration_table);
++  PyModule_Create(&cModMethods);
+ }


=====================================
debian/patches/series
=====================================
@@ -4,3 +4,4 @@ atac-readme.patch
 spelling.patch
 linux-cflags.patch
 fix_wrong_evaluation_order.patch
+2to3.patch


=====================================
debian/rules
=====================================
@@ -18,7 +18,7 @@ unusable:= tapper/ trie/
 
 # Note: Parallel build is not reliable
 %:
-	dh $@ --with python2
+	dh $@ --with python3
 
 override_dh_auto_build:
         # The Makefile apparently doesn't use regular LDFLAGS.


=====================================
debian/upstream/metadata
=====================================
@@ -1,19 +1,18 @@
-Name: kmer
 Reference:
- - Author: B. Walenz and L. Florea
-   Title: >
+- Author: B. Walenz and L. Florea
+  Title: >
     Sim4db and leaff: Utilities for fast batched spliced alignment and
     sequence indexing
-   Journal: Bioinformatics
-   Year: 2011
-   Volume: 27
-   Number: 13
-   Pages: 1869-1870
-   URL: http://bioinformatics.oxfordjournals.org/content/27/13/1869
-   PMID: 21551146
-   DOI: 10.1093/bioinformatics/btr285
- - Comment: For ATAC/A2Amapper
-   Author: >
+  Journal: Bioinformatics
+  Year: 2011
+  Volume: 27
+  Number: 13
+  Pages: 1869-1870
+  URL: http://bioinformatics.oxfordjournals.org/content/27/13/1869
+  PMID: 21551146
+  DOI: 10.1093/bioinformatics/btr285
+- Comment: For ATAC/A2Amapper
+  Author: >
     S. Istrail and G. G. Sutton and L. Florea and A. L. Halpern and
     C. M. Mobarry and R. Lippert and B. Walenz and H. Shatkay and
     I. Dew and J. R. Miller and M. J. Flanigan and N. J. Edwards and
@@ -23,23 +22,23 @@ Reference:
     S. A. Kravitz and L. Mouchard and K. Reinert and K. A. Remington
     and A. G. Clark and M. S. Waterman and E. E. Eichler and M. D. Adams
     and M. W. Hunkapiller and E. W. Myers and J. C. Venter
-   Title: >
+  Title: >
     Whole-genome shotgun assembly and comparison of human genome
     assemblies
-   Journal: PNAS
-   Year: 2004
-   Volume: 101
-   Number: 7
-   Pages: 1961-1921
-   URL: http://www.pnas.org/content/101/7/1916.abstract
-   PMID: 14769938
-   DOI: 10.1073/pnas.0307971100
+  Journal: PNAS
+  Year: 2004
+  Volume: 101
+  Number: 7
+  Pages: 1961-1921
+  URL: http://www.pnas.org/content/101/7/1916.abstract
+  PMID: 14769938
+  DOI: 10.1073/pnas.0307971100
 Registry:
- - Name: SciCrunch
-   Entry: SCR_015980
- - Name: OMICtools
-   Entry: OMICS_29044
- - Name: bio.tools
-   Entry: atac
- - Name: conda:bioconda
-   Entry: atac, meryl
+- Name: SciCrunch
+  Entry: SCR_015980
+- Name: OMICtools
+  Entry: OMICS_29044
+- Name: bio.tools
+  Entry: atac
+- Name: conda:bioconda
+  Entry: atac, meryl



View it on GitLab: https://salsa.debian.org/med-team/kmer/compare/28da9c73efff8dee32fbbaef1060177e4d5e5c07...cd6de6e90b30e0fc86f88afdfcc9b6350e05400a

-- 
View it on GitLab: https://salsa.debian.org/med-team/kmer/compare/28da9c73efff8dee32fbbaef1060177e4d5e5c07...cd6de6e90b30e0fc86f88afdfcc9b6350e05400a
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/20191219/ceac02ae/attachment-0001.html>


More information about the debian-med-commit mailing list