Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progcheck report full paths #37

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion circlator/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class Error (Exception): pass

version = '1.0.0'
version = '1.0.1'

def syscall(cmd, allow_fail=False, verbose=False):
if verbose:
Expand Down
4 changes: 2 additions & 2 deletions circlator/external_progs.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ def make_and_check_prog(name, verbose=False, raise_error=True, filehandle=None):
return p

if verbose:
print('Using', name, 'version', p.version())
print('Using', name, 'version', p.version(), 'as', p.full_path)

if filehandle:
print('Using', name, 'version', p.version(), file=filehandle)
print('Using', name, 'version', p.version(), 'as', p.full_path, file=filehandle)

return p

Expand Down
3 changes: 2 additions & 1 deletion circlator/program.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def __init__(self, name, version_cmd, version_regex, environment_var=None):

self.version_cmd = version_cmd
self.version_regex = version_regex
self.full_path = shutil.which(self.path)


def in_path(self):
Expand All @@ -43,7 +44,7 @@ def version_at_least(self, min_version):
v = self.version()
if v is None:
return None
return LooseVersion(v) >= LooseVersion(min_version)
return LooseVersion(v) >= LooseVersion(min_version)


def exe(self):
Expand Down
4 changes: 2 additions & 2 deletions circlator/tasks/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def run():
options = parser.parse_args()

print_message('{:_^79}'.format(' Checking external programs '), options)
circlator.external_progs.check_all_progs(verbose=options.verbose)
circlator.external_progs.check_all_progs(verbose=options.verbose, raise_error=True)

files_to_check = [options.assembly, options.reads]
if options.b2r_only_contigs:
Expand Down Expand Up @@ -89,7 +89,7 @@ def run():

with open('00.info.txt', 'w') as f:
print(sys.argv[0], 'all', ' '.join(sys.argv[1:]), file=f)
circlator.external_progs.check_all_progs(filehandle=f)
circlator.external_progs.check_all_progs(filehandle=f, raise_error=True)

original_assembly_renamed = '00.input_assembly.fasta'
bam = '01.mapreads.bam'
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name='circlator',
version='1.0.0',
version='1.0.1',
description='circlator: a tool to circularise genome assemblies',
packages = find_packages(),
package_data={'circlator': ['data/*']},
Expand Down