-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
To reproduce:
- Clone taxconverter, commit 9050fef
- Create a virtual environment with
uv venv taxconverter -p 3.11
- Install taxonverter with
uv pip install ~/code/taxconverter
(nb. with local path to the repo) - Run:
taxconverter centrifuge -i centrifuge_predictions.tsv -o taxout_newtaxc.tsv
You get:
Traceback (most recent call last):
File "/home/jakni/Downloads/metab/taxconverter/bin/taxconverter", line 10, in <module>
sys.exit(main())
^^^^^^
File "/home/jakni/Downloads/metab/taxconverter/lib/python3.11/site-packages/taxconverter/__main__.py", line 439, in main
centrifuge_data(args.input)
File "/home/jakni/Downloads/metab/taxconverter/lib/python3.11/site-packages/taxconverter/__main__.py", line 265, in wrapper
df = func(*arguments, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jakni/Downloads/metab/taxconverter/lib/python3.11/site-packages/taxconverter/__main__.py", line 340, in centrifuge_data
map_ncbi = ncbi_lineage()
^^^^^^^^^^^^^^
File "/home/jakni/Downloads/metab/taxconverter/lib/python3.11/site-packages/taxconverter/__main__.py", line 68, in ncbi_lineage
df_ncbi = pd.read_csv(NCBI_LINEAGE, quoting=csv.QUOTE_NONE, sep='\t')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jakni/Downloads/metab/taxconverter/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 912, in read_csv
return _read(filepath_or_buffer, kwds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jakni/Downloads/metab/taxconverter/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 577, in _read
parser = TextFileReader(filepath_or_buffer, **kwds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jakni/Downloads/metab/taxconverter/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 1407, in __init__
self._engine = self._make_engine(f, self.engine)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jakni/Downloads/metab/taxconverter/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 1661, in _make_engine
self.handles = get_handle(
^^^^^^^^^^^
File "/home/jakni/Downloads/metab/taxconverter/lib/python3.11/site-packages/pandas/io/common.py", line 859, in get_handle
handle = open(
^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/jakni/Downloads/metab/taxconverter/lib/python3.11/site-packages/data/clades.tsv'
The problem is that installing taxconverter may move the source code to a new location, where data/clades.tsv
does not follow.
To solve this, you can use a MANIFEST.in, similar to what Vamb does with its kernel.npz
data file
Metadata
Metadata
Assignees
Labels
No labels