scholl-lab / plasmicheck

Detect and quantify plasmid DNA contamination in sequencing data
MIT License
0 stars 0 forks source link

Bug: `FileNotFoundError` when loading `config.json` after installing the package via `pip install .` #73

Closed berntpopp closed 3 months ago

berntpopp commented 3 months ago

Description: After installing the package using the pip install . method as described in the README, the config.json file is not found when the tool is executed. The error occurs because the config.json file is not included in the installation process, leading to a FileNotFoundError.

Steps to Reproduce:

  1. Clone the repository.
  2. Install the package using pip install ..
  3. Run the tool using plasmicheck <command>.

Expected Behavior: The tool should successfully load the config.json file and execute the pipeline without errors.

Actual Behavior: The tool throws a FileNotFoundError indicating that config.json is missing.

Error Message: FileNotFoundError: [Errno 2] No such file or directory: '/path/to/env/lib/python3.x/site-packages/plasmicheck/config.json'

Possible Fix:

  1. Ensure config.json is included in the package by adding it to the MANIFEST.in file.
  2. Update setup.py to include the necessary files using include_package_data=True.
  3. Use pkg_resources to access config.json after installation.

This bug needs to be fixed to ensure proper loading of configuration files after package installation.