Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (3)
Use 2to3 to port from Python2 to Python3
· add5770f
Andreas Tille
authored
Dec 16, 2019
add5770f
Latest update also fixed autopkgtest issue
· 4cc33eb5
Andreas Tille
authored
Dec 16, 2019
4cc33eb5
Upload to unstable
· fa6e0cee
Andreas Tille
authored
Dec 16, 2019
fa6e0cee
Hide whitespace changes
Inline
Side-by-side
debian/changelog
View file @
fa6e0cee
minia (3.2.1+git20191130.5b131b9-2) unstable; urgency=medium
* Use 2to3 to port from Python2 to Python3
Closes: #943115
* Latest update also fixed autopkgtest issue
Closes: #939894
-- Andreas Tille <tille@debian.org> Mon, 16 Dec 2019 09:26:55 +0100
minia (3.2.1+git20191130.5b131b9-1) unstable; urgency=medium
[ Andreas Tille ]
...
...
debian/patches/2to3.patch
0 → 100644
View file @
fa6e0cee
Description: Use 2to3 to port from Python2 to Python3
Bug-Debian: https://bugs.debian.org/943115
Author: Andreas Tille <tille@debian.org>
Last-Update: Mon, 16 Dec 2019 09:21:08 +0100
--- a/scripts/convertToGFA.py
+++ b/scripts/convertToGFA.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
'''****************************************************************************
@@ -20,8 +20,8 @@
'''****************************************************************************
-* To run the program, pass three arguments with the python script on command line.
-* For example - python convertToGFA.py inputFileName outputFileName kmerSize
+* To run the program, pass three arguments with the python3 script on command line.
+* For example - python3 convertToGFA.py inputFileName outputFileName kmerSize
* Logic - It reads through the fasta file with all the unitigs information
* and link information and outputs it in the GFA format.
--- a/scripts/debug_1seq_tip_removal.py
+++ b/scripts/debug_1seq_tip_removal.py
@@ -16,7 +16,7 @@
for line in fasta:
seq = line.strip()
is_error = False
is_genome = False
- for i in xrange(len(seq)-k+1):
+ for i in range(len(seq)-k+1):
kmer = seq[i:i+k]
if kmer not in genome[0] and kmer not in genome[1]:
is_error = True
@@ -24,9 +24,9 @@
for line in fasta:
is_genome = True
if is_error and is_genome:
- print "mix of erroneous kmers and true genomic kmers inside the same assembled contig!!"
- print id
- print seq
+ print("mix of erroneous kmers and true genomic kmers inside the same assembled contig!!")
+ print(id)
+ print(seq)
exit(1)
else:
- print id,is_error,is_genome
+ print(id,is_error,is_genome)
--- a/scripts/duplicate_sequences_according_abundance.py
+++ b/scripts/duplicate_sequences_according_abundance.py
@@ -8,7 +8,7 @@
for line in fasta:
#print abundance
id=line
else:
- for i in xrange(int(abundance)):
- print id,
- print line,
+ for i in range(int(abundance)):
+ print(id, end=' ')
+ print(line, end=' ')
--- a/scripts/ilots_stats.py
+++ b/scripts/ilots_stats.py
@@ -37,4 +37,4 @@
for ctg in ctg_connect:
else:
nb_ilots += 1
-print "contigs input", nb_ctg/2, "connected", nb_connected, "ilots", nb_ilots
+print("contigs input", nb_ctg/2, "connected", nb_connected, "ilots", nb_ilots)
--- a/scripts/max_mem_usage_from_log.py
+++ b/scripts/max_mem_usage_from_log.py
@@ -10,4 +10,4 @@
for line in sys.stdin:
mem=int(s[i-1])
max_mem=max(mem,max_mem)
-print max_mem
+print(max_mem)
--- a/scripts/strip_bcalm_links.py
+++ b/scripts/strip_bcalm_links.py
@@ -3,11 +3,11 @@
file=sys.argv[1]
for line in open(file):
line=line.strip()
if not line.startswith(">"):
- print(line.strip())
+ print((line.strip()))
continue
if "L:" in line:
s = line.split("L:")
else:
s = [line.strip()]
- print(s[0])
+ print((s[0]))
--- a/test/compare_fasta.py
+++ b/test/compare_fasta.py
@@ -32,5 +32,5 @@
if len(s1) == len(s2) and len(s1) == 1:
else:
print("BAD: one sequence doesn't exactly match the other")
-print("NOT EQUAL: %d sequence(s) in %s not in %s" % (len(s1.difference(s2)), fasta1, fasta2))
+print(("NOT EQUAL: %d sequence(s) in %s not in %s" % (len(s1.difference(s2)), fasta1, fasta2)))
sys.exit(1)
--- a/test/simple_test.sh
+++ b/test/simple_test.sh
@@ -35,7 +35,7 @@
function test()
else
eval $bindir/minia $args
fi
- python compare_fasta.py "$file".solution.fa "$file".contigs.fa
+ python3 compare_fasta.py "$file".solution.fa "$file".contigs.fa
}
# Test One
debian/patches/link_libraries.patch
View file @
fa6e0cee
...
...
@@ -4,7 +4,7 @@ Description: Link against Debian packaged gatbcore
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7
2
,15 +7
2
,17 @@
@@ -7
4
,15 +7
4
,17 @@
cmake_policy(SET CMP0009 NEW) # fixes cm
include_directories (${PROGRAM_SOURCE_DIR})
file (GLOB_RECURSE ProjectFiles ${PROGRAM_SOURCE_DIR}/*)
...
...
debian/patches/no_install_to_wrong_dir.patch
View file @
fa6e0cee
...
...
@@ -4,7 +4,7 @@ Description: Failed to fix these install dirs, deactivate completely and use dh_
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12
7
,9 +12
7
,9 @@
@@ -12
9
,9 +12
9
,9 @@
SET (CPACK_SOURCE_IGNORE_FILES
)
# We copy the project binary to the 'bin' directory
...
...
debian/patches/series
View file @
fa6e0cee
...
...
@@ -3,3 +3,4 @@ link_libraries.patch
no_install_to_wrong_dir.patch
skip-rpath.patch
fix_path_in_tests.patch
2to3.patch
debian/patches/skip-rpath.patch
View file @
fa6e0cee
...
...
@@ -4,7 +4,7 @@ Description: Do not set rpath
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7
5
,6 +7
5
,7 @@
file (GLOB_RECURSE ProjectFiles ${PROG
@@ -7
7
,6 +7
7
,7 @@
file (GLOB_RECURSE ProjectFiles ${PROG
include(GNUInstallDirs)
LINK_DIRECTORIES( /usr/${CMAKE_INSTALL_LIBDIR}/hdf5/serial )
add_executable(${PROJECT_NAME} ${ProjectFiles})
...
...
@@ -12,7 +12,7 @@ Description: Do not set rpath
target_link_libraries(${PROJECT_NAME} gatbcore hdf5 )
# merci
@@ -8
2
,6 +8
3
,7 @@
set (MERCI_SOURCE_DIR ${PROJECT_SOURCE_D
@@ -8
4
,6 +8
5
,7 @@
set (MERCI_SOURCE_DIR ${PROJECT_SOURCE_D
include_directories (${MERCI_SOURCE_DIR})
file (GLOB_RECURSE MerciFiles ${MERCI_SOURCE_DIR}/*.cpp)
add_executable("merci" ${MerciFiles})
...
...
debian/patches/use_debian_packaged_gatb-core.patch
View file @
fa6e0cee
...
...
@@ -3,7 +3,7 @@ Last-Update: Mon, 21 Jan 2019 09:01:19 +0100
Description: Use cmake input file of Debian packaged gatb-core
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,20 +28,6 @@
@@ -28,20 +28,6 @@
IF (DEFINED JENKINS_TAG)
SET (gatb-tool-version ${JENKINS_TAG})
ENDIF()
...
...
@@ -24,7 +24,7 @@ Description: Use cmake input file of Debian packaged gatb-core
################################################################################
# Define cmake modules directory
################################################################################
@@ -66,7 +52,7 @@
@@ -66,7 +52,7 @@
SET (GATB_CORE_EXCLUDE_TESTS 1)
SET (GATB_CORE_EXCLUDE_EXAMPLES 1)
# GATB CORE
...
...
debian/tests/control
View file @
fa6e0cee
Tests: run-unit-test
Depends: @, samtools, python, bandage
Depends: @, samtools, python
3
, bandage
Restrictions: allow-stderr