[med-svn] [python-pymummer] 01/03: New upstream version 0.9.0
Sascha Steinbiss
satta at debian.org
Tue Oct 18 18:42:22 UTC 2016
This is an automated email from the git hooks/post-receive script.
satta pushed a commit to branch master
in repository python-pymummer.
commit c6b9f34475790ecee538629bba7a2c2b501b4a77
Author: Sascha Steinbiss <satta at debian.org>
Date: Tue Oct 18 18:36:22 2016 +0000
New upstream version 0.9.0
---
pymummer/nucmer.py | 17 +++++++++++------
pymummer/tests/nucmer_test.py | 5 +++--
setup.py | 2 +-
3 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/pymummer/nucmer.py b/pymummer/nucmer.py
index a802ab0..1593678 100644
--- a/pymummer/nucmer.py
+++ b/pymummer/nucmer.py
@@ -20,6 +20,7 @@ class Runner:
coords_header=True,
diagdiff=None,
maxmatch=False,
+ mincluster=None,
simplify=True,
show_snps=False,
snps_header=True,
@@ -35,12 +36,13 @@ class Runner:
self.diagdiff = diagdiff
self.coords_header = coords_header
self.maxmatch = maxmatch
+ self.mincluster = mincluster
self.simplify = simplify
self.show_snps = show_snps
self.snps_header = snps_header
self.verbose = verbose
self.use_promer = promer
-
+
def _nucmer_command(self, ref, qry, outprefix):
@@ -49,7 +51,7 @@ class Runner:
command = 'promer'
else:
command = 'nucmer'
-
+
command += ' -p ' + outprefix
if self.breaklen is not None:
@@ -60,7 +62,10 @@ class Runner:
if self.maxmatch:
command += ' --maxmatch'
-
+
+ if self.mincluster is not None:
+ command += ' -c ' + str(self.mincluster)
+
if not self.simplify and not self.use_promer:
command += ' --nosimplify'
@@ -79,7 +84,7 @@ class Runner:
command += ' -l ' + str(self.min_length)
return command + ' ' + infile + ' > ' + outfile
-
+
def _show_coords_command(self, infile, outfile):
'''Construct show-coords command'''
@@ -109,7 +114,7 @@ class Runner:
if self.show_snps:
print(self._show_snps_command('p.delta.filter', outfile + '.snps'), file=f)
pyfastaq.utils.close(f)
-
+
def run(self):
'''
@@ -125,7 +130,7 @@ class Runner:
original_dir = os.getcwd()
os.chdir(tmpdir)
script = 'run_nucmer.sh'
- self._write_script(script, ref, qry, outfile)
+ self._write_script(script, ref, qry, outfile)
syscall.run('bash ' + script, verbose=self.verbose)
os.chdir(original_dir)
shutil.rmtree(tmpdir)
diff --git a/pymummer/tests/nucmer_test.py b/pymummer/tests/nucmer_test.py
index 8962a55..14d89a0 100644
--- a/pymummer/tests/nucmer_test.py
+++ b/pymummer/tests/nucmer_test.py
@@ -16,6 +16,7 @@ class TestRunner(unittest.TestCase):
[nucmer.Runner('ref', 'qry', 'outfile', diagdiff=11), 'nucmer -p pre -D 11 ref qry'],
[nucmer.Runner('ref', 'qry', 'outfile', diagdiff=11, promer=True), 'promer -p pre ref qry'],
[nucmer.Runner('ref', 'qry', 'outfile', maxmatch=True), 'nucmer -p pre --maxmatch ref qry'],
+ [nucmer.Runner('ref', 'qry', 'outfile', mincluster=42), 'nucmer -p pre -c 42 ref qry'],
[nucmer.Runner('ref', 'qry', 'outfile', simplify=False), 'nucmer -p pre --nosimplify ref qry'],
[nucmer.Runner('ref', 'qry', 'outfile', promer=True), 'promer -p pre ref qry'],
[nucmer.Runner('ref', 'qry', 'outfile', promer=True, breaklen=42), 'promer -p pre -b 42 ref qry'],
@@ -37,7 +38,7 @@ class TestRunner(unittest.TestCase):
for l in tests:
self.assertEqual(l[0]._delta_filter_command('infile', 'outfile'), l[1])
-
+
def test_show_coords_command(self):
'''test _show_coords_command'''
@@ -93,5 +94,5 @@ class TestRunner(unittest.TestCase):
self.assertTrue(filecmp.cmp(tmp_out + '.snps', expected + '.snps', shallow=False))
os.unlink(tmp_out)
os.unlink(tmp_out + '.snps')
-
+
diff --git a/setup.py b/setup.py
index 2778e8d..a779298 100644
--- a/setup.py
+++ b/setup.py
@@ -26,7 +26,7 @@ if not found_all_progs:
setup(
name='pymummer',
- version='0.8.1',
+ version='0.9.0',
description='Wrapper for MUMmer',
packages = find_packages(),
author='Martin Hunt, Nishadi De Silva',
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-pymummer.git
More information about the debian-med-commit
mailing list