Skip to content

BacTermFinder must be run from the repository directory and the input cannot be in a different directory #1

@havranej

Description

@havranej

Hello!

I am currently testing BacTermFinder and I have encountered two inconvenient issues which do not output informative errors.

  1. When I run BacTermFinder from a directory different from the cloned repo, I get the following error:
python: can't open file '/home/jan/tmp/bactermfinder-test/iLearnPlus/util/FileProcessing.py': [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/home/jan/tmp/bactermfinder-test/BacTermFinder/genome_scan.py", line 225, in <module>
    files = os.listdir('output_sample')
  1. When I set my working directory to be in the repo directory, but try to specify input which is located elsewhere (such as ../sequence.fna with the output path being set to out), I get the following error:
Traceback (most recent call last):
  File "/home/jan/tmp/bactermfinder-test/BacTermFinder/genome_scan.py", line 202, in <module>
    df_slide.to_csv(output_file.split(".")[0] + f'_{genome_file}_sliding_windows.csv',
  File "/home/jan/anaconda3/envs/bactermfinder/lib/python3.9/site-packages/pandas/util/_decorators.py", line 211, in wrapper
    return func(*args, **kwargs)
  File "/home/jan/anaconda3/envs/bactermfinder/lib/python3.9/site-packages/pandas/core/generic.py", line 3721, in to_csv
    return DataFrameRenderer(formatter).to_csv(
  File "/home/jan/anaconda3/envs/bactermfinder/lib/python3.9/site-packages/pandas/util/_decorators.py", line 211, in wrapper
    return func(*args, **kwargs)
  File "/home/jan/anaconda3/envs/bactermfinder/lib/python3.9/site-packages/pandas/io/formats/format.py", line 1189, in to_csv
    csv_formatter.save()
  File "/home/jan/anaconda3/envs/bactermfinder/lib/python3.9/site-packages/pandas/io/formats/csvs.py", line 241, in save
    with get_handle(
  File "/home/jan/anaconda3/envs/bactermfinder/lib/python3.9/site-packages/pandas/io/common.py", line 735, in get_handle
    check_parent_directory(str(handle))
  File "/home/jan/anaconda3/envs/bactermfinder/lib/python3.9/site-packages/pandas/io/common.py", line 598, in check_parent_directory
    raise OSError(rf"Cannot save file into a non-existent directory: '{parent}'")
OSError: Cannot save file into a non-existent directory: 'out_..'

Would it be possible to address fix issues, please? They are very much limiting the practical usage of the tool

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions