RasmussenLab / taxconverter

Unifies the presentation of taxonomic classifiers output
MIT License
1 stars 0 forks source link

some incorrect paths #1

Open willboulton opened 8 months ago

willboulton commented 8 months ago

Thanks for this great tool - I am hoping to run taxvamb on my data so it is great to have this tool to convert my centrifuge annotations.

On my system, I got the following path errors after running taxconverter centrifuge -i <my input> -o <my output>:

2024-03-11 16:08:46.665 | INFO     | taxconverter.__main__:ncbi_lineage:45 - Loading NCBI lineage
Traceback (most recent call last):
  File "/my/university/system/.conda/envs/anvio/bin/taxconverter", line 33, in <module>
    sys.exit(load_entry_point('taxconverter', 'console_scripts', 'taxconverter')())
  File "/my/university/system/software/taxconverter/taxconverter/__main__.py", line 171, in main
    df_result = centrifuge_data(args.input)
  File "/my/university/system/software/taxconverter/taxconverter/__main__.py", line 38, in wrapper
    df = func(*args, **kwargs)
  File "/my/university/system/software/taxconverter/taxconverter/__main__.py", line 80, in centrifuge_data
    df_ncbi = ncbi_lineage()
  File "/my/university/system/software/taxconverter/taxconverter/__main__.py", line 46, in ncbi_lineage
    df_ncbi = pd.read_csv(NCBI_LINEAGE, quoting=csv.QUOTE_NONE)

It was solved by changing NCBI_LINEAGE and METABULI_LINEAGE to:

NCBI_LINEAGE = os.path.join(parentdir, 'data/ncbi_lineage.csv')
METABULI_LINEAGE = os.path.join(parentdir, 'data/metabuli_lineage.csv')

I also had an issue with unzipping the lineage.zip file on my university system. Neither gunzip / gzip -d / unzip worked, though my solution was to unzip it on my mac (which worked) and then copy the data over. This might be just a be a me problem though. I can submit this as a separate issue if you think it would be helpful, though it is very minor and might just need a clearer installation note in the readme, if anything.

Thanks again, Will

sgalkina commented 1 month ago

Hi Will!

It's been an awfully long time since you left the issue! I apologize for missing it.

Thank you for your interest and testing the tool, I've added your code fix. The tool is slightly updated since we've updated the file formats in TaxVAMB (the preprint should finally drop in a few days).

I'll look into the zipping thing later.

Best, Svetlana