-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add --noextend option to CLI (related to #340)
This also runs a --noextend test set in the Makefile, and adds a test for command creation (but not output regression). The --noextend option appears to affect low coverage and identity scores quite significantly. NOTE: this is not in itself a fix for #340. That requires changes to how we write and parse nucmer output.
- Loading branch information
1 parent
80d60cb
commit 7272ff3
Showing
7 changed files
with
96 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
# (c) The James Hutton Institute 2013-2019 | ||
# (c) University of Strathclyde 2019-2020 | ||
# (c) University of Strathclyde 2019-2021 | ||
# Author: Leighton Pritchard | ||
# | ||
# Contact: [email protected] | ||
|
@@ -17,7 +17,7 @@ | |
# The MIT License | ||
# | ||
# Copyright (c) 2013-2019 The James Hutton Institute | ||
# Copyright (c) 2019-2020 University of Strathclyde | ||
# Copyright (c) 2019-2021 University of Strathclyde | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
|
@@ -143,6 +143,8 @@ | |
ANI method | ||
--maxmatch Override MUMmer settings and allow all matches in | ||
NUCmer | ||
--noextend Override MUMmer settings and do not extend seed | ||
alignments | ||
--nucmer_exe=NUCMER_EXE | ||
Path to NUCmer executable | ||
--blast_exe=BLAST_EXE | ||
|
@@ -353,6 +355,13 @@ def parse_cmdline(): | |
default=False, | ||
help="Override MUMmer to allow all NUCmer matches", | ||
) | ||
parser.add_argument( | ||
"--noextend", | ||
dest="noextend", | ||
action="store_true", | ||
default=False, | ||
help="Override MUMmer to extend seed alignments", | ||
) | ||
parser.add_argument( | ||
"--nucmer_exe", | ||
dest="nucmer_exe", | ||
|
@@ -535,6 +544,7 @@ def calculate_anim(infiles, org_lengths): | |
nucmer_exe=args.nucmer_exe, | ||
filter_exe=args.filter_exe, | ||
maxmatch=args.maxmatch, | ||
noextend=args.noextend, | ||
jobprefix=args.jobprefix, | ||
) | ||
if args.scheduler == "multiprocessing": | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# python package version | ||
# should match r"^__version__ = '(?P<version>[^']+)'$" for setup.py | ||
__version__ = "0.2.11" | ||
__version__ = "0.2.12-a" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# (c) The James Hutton Institute 2016-2019 | ||
# (c) University of Strathclyde 2019-2020 | ||
# (c) University of Strathclyde 2019-2021 | ||
# Author: Leighton Pritchard | ||
# | ||
# Contact: [email protected] | ||
|
@@ -16,7 +16,7 @@ | |
# The MIT License | ||
# | ||
# Copyright (c) 2016-2019 The James Hutton Institute | ||
# Copyright (c) 2019-2020 University of Strathclyde | ||
# Copyright (c) 2019-2021 University of Strathclyde | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,25 +12,24 @@ | |
print() statements will be caught by nosetests unless there is an | ||
error. They can also be recovered with the -s option. | ||
(c) The James Hutton Institute 2017 | ||
Author: Leighton Pritchard | ||
Contact: | ||
[email protected] | ||
Leighton Pritchard, | ||
Information and Computing Sciences, | ||
James Hutton Institute, | ||
Errol Road, | ||
Invergowrie, | ||
Dundee, | ||
DD6 9LH, | ||
Scotland, | ||
UK | ||
(c) The James Hutton Institute 2017-2019 | ||
(c) University of Strathclyde 2019-2021 | ||
# Author: Leighton Pritchard | ||
# | ||
# Contact: [email protected] | ||
# | ||
# Leighton Pritchard, | ||
# Strathclyde Institute for Pharmacy and Biomedical Sciences, | ||
# Cathedral Street, | ||
# Glasgow, | ||
# G4 0RE | ||
# Scotland, | ||
# UK | ||
The MIT License | ||
Copyright (c) 2017 The James Hutton Institute | ||
Copyright (c) 2017-2019 The James Hutton Institute | ||
Copyright (c) University of Strathclyde 2019-2021 | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
|
@@ -83,6 +82,14 @@ def setUp(self): | |
"file1.fna file2.fna", | ||
] | ||
) | ||
self.ntgtnoextend = " ".join( | ||
[ | ||
"nucmer --maxmatch --noextend -p", | ||
"tests/test_output/anim/nucmer_output/file1_vs_file2", | ||
"file1.fna file2.fna", | ||
] | ||
) | ||
|
||
self.ftgt = " ".join( | ||
[ | ||
"delta_filter_wrapper.py delta-filter -1", | ||
|
@@ -164,6 +171,13 @@ def test_maxmatch_cmd_generation(self): | |
) | ||
assert_equal(ncmd, self.ntgtmax) | ||
|
||
def test_noextend_cmd_generation(self): | ||
"""generate NUCmer command line with noextend.""" | ||
ncmd, fcmd = anim.construct_nucmer_cmdline( | ||
"file1.fna", "file2.fna", outdir=self.outdir, maxmatch=True, noextend=True | ||
) | ||
assert_equal(ncmd, self.ntgtnoextend) | ||
|
||
def test_multi_cmd_generation(self): | ||
"""generate multiple abstract NUCmer/delta-filter command-lines. | ||
|