From 16d8a7210f22d233cead250d863f37203ba7eca0 Mon Sep 17 00:00:00 2001 From: nds Date: Thu, 12 Feb 2015 10:59:23 +0000 Subject: [PATCH] Added --nosimplify toggle to nucmer command --- pymummer/nucmer.py | 5 +++++ pymummer/tests/nucmer_test.py | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pymummer/nucmer.py b/pymummer/nucmer.py index 67bd7fb..79c1b1b 100644 --- a/pymummer/nucmer.py +++ b/pymummer/nucmer.py @@ -19,6 +19,7 @@ def __init__( breaklen=None, coords_header=True, maxmatch=False, + simplify=True, show_snps=False, snps_header=True, verbose=False, @@ -31,6 +32,7 @@ def __init__( self.breaklen = breaklen self.coords_header = coords_header self.maxmatch = maxmatch + self.simplify = simplify self.show_snps = show_snps self.snps_header = snps_header self.verbose = verbose @@ -46,6 +48,9 @@ def _nucmer_command(self, ref, qry, outprefix): if self.maxmatch: command += ' --maxmatch' + + if not self.simplify: + command += ' --nosimplify' return command + ' ' + ref + ' ' + qry diff --git a/pymummer/tests/nucmer_test.py b/pymummer/tests/nucmer_test.py index c962b3d..8ba072a 100644 --- a/pymummer/tests/nucmer_test.py +++ b/pymummer/tests/nucmer_test.py @@ -13,7 +13,8 @@ def test_nucmer_command(self): tests = [ [nucmer.Runner('ref', 'qry', 'outfile'), 'nucmer -p pre ref qry'], [nucmer.Runner('ref', 'qry', 'outfile', breaklen=42), 'nucmer -p pre -b 42 ref qry'], - [nucmer.Runner('ref', 'qry', 'outfile', maxmatch=True), 'nucmer -p pre --maxmatch ref qry'] + [nucmer.Runner('ref', 'qry', 'outfile', maxmatch=True), 'nucmer -p pre --maxmatch ref qry'], + [nucmer.Runner('ref', 'qry', 'outfile', simplify=False), 'nucmer -p pre --nosimplify ref qry'] ] for l in tests: