Skip to content

Adding "report" directory creation to tandemmapper.py#4

Open
lucblassel wants to merge 1 commit into
ablab:masterfrom
lucblassel:master
Open

Adding "report" directory creation to tandemmapper.py#4
lucblassel wants to merge 1 commit into
ablab:masterfrom
lucblassel:master

Conversation

@lucblassel

Copy link
Copy Markdown

When running tandemmapper.py on its own without running tandemquast.py the execution will crash with the following error:

Traceback (most recent call last):
  File "./tandemmapper.py", line 80, in <module>
    main()
  File "/usr/local/Caskroom/miniconda/base/envs/tandemNew/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/Caskroom/miniconda/base/envs/tandemNew/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/Caskroom/miniconda/base/envs/tandemNew/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/Caskroom/miniconda/base/envs/tandemNew/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "./tandemmapper.py", line 72, in main
    make_alignments.do(assemblies, reads_fname, reads_real_coords, out_dir, threads, no_reuse, no_nucl_alignment)
  File "/Users/lucblassel/gitPulls/TandemTools/scripts/make_alignments.py", line 208, in do
    make_plotly_noise(assemblies, all_data, out_dir)
  File "/Users/lucblassel/gitPulls/TandemTools/scripts/reporting.py", line 130, in make_plotly_noise
    with open(bed_fname, "w") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/lucblassel/gitPulls/TandemTools/tandemRes/report/kmers_dist_diff.bed'

This is because bed_fname is <out_dir>/report/kmers_dist_diff.bed in scripts/reporting.py

However, the <out_dir>/report subdirectory is never created in tandemmapper.py but it is created in tandemquast.py

This PR aims to fix this problem by adding the creation of the <out_dir>/report subdirectory if it does not already exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant