1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
|
From: Michael R. Crusoe <michael.crusoe@gmail.com>
Subject: Upgrade from Python2 to Python 3
--- a/test/samline/bx_tag_test.py
+++ b/test/samline/bx_tag_test.py
@@ -1,4 +1,4 @@
-#!/opt/python-all/bin/python
+#!/usr/bin/python3
from sam import *
REF = "NC_011752.1"
@@ -7,7 +7,7 @@ CSRA1 = "X.CSRA"
def load( L ) :
R1 = bam_load( L, CSRA1, "--make-spots-with-secondary -E0 -Q0" )
- print "bam-load = %d"%( R1 )
+ print("bam-load = %d"%( R1 ))
def load_and_print( L ) :
load( L )
--- a/test/samline/ca_test.py
+++ b/test/samline/ca_test.py
@@ -1,4 +1,4 @@
-#!/bin/env python
+#!/usr/bin/python3
import sys, sam
def dump( acc, with_sec = False ) :
--- a/test/external/sra-pileup/check_skiplist.py
+++ b/test/external/sra-pileup/check_skiplist.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
import subprocess
import sys
--- a/test/external/sra-pileup/test_all_sam_dump_has_spotgroup.py
+++ b/test/external/sra-pileup/test_all_sam_dump_has_spotgroup.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
import sys, getopt, subprocess, multiprocessing
--- a/test/external/sra-pileup/test_diff_fastq_dump_vs_sam_dump.py
+++ b/test/external/sra-pileup/test_diff_fastq_dump_vs_sam_dump.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
import sys, getopt, subprocess, multiprocessing
--- a/test/tarballs/test-tarballs.sh
+++ b/test/tarballs/test-tarballs.sh
@@ -57,7 +57,7 @@ echo "Testing sra-tools tarballs, workin
case $(uname) in
Linux)
- python -mplatform | grep -q Ubuntu && OS=ubuntu64 || OS=centos_linux64
+ python3 -mplatform | grep -q Ubuntu && OS=ubuntu64 || OS=centos_linux64
TOOLS="${TOOLS} pacbio-load remote-fuser"
realpath() {
readlink -f $1
--- a/tools/external/fasterq-dump/fastq-diff.py
+++ b/tools/external/fasterq-dump/fastq-diff.py
@@ -1,10 +1,9 @@
-#! /usr/bin/env python
+#!/usr/bin/python3
import sys
import os
import stat
import datetime
-from itertools import izip
def perform( fn1, fn2 ) :
print( "comparing: " )
@@ -14,7 +13,7 @@ def perform( fn1, fn2 ) :
A = [ "", "", "", "" ]
B = [ "", "", "", "" ]
with open( fn1 ) as f1, open( fn2 ) as f2 :
- for L1, L2 in izip( f1, f2 ) :
+ for L1, L2 in zip( f1, f2 ) :
A[ ln ] = L1.strip()
B[ ln ] = L2.strip()
ln += 1
|