BGSU-RNA / fr3d-python

Python implementation of the FR3D software for searching and annotating RNA 3D structures
15 stars 10 forks source link

Possible missing file #32

Open cgoliver opened 1 year ago

cgoliver commented 1 year ago

Thank you for this great tool, it's something that has been on my wishlist for a long time.

Running the pairwise interaction script with just the --help argument throws a missing file exception:

❯ python NA_pairwise_interactions.py --help
mapping.py is unable to load mappings for modified nucleotides.
This can happen after installing with 'python setup.py install' with no known fix.
Instead, from the directory where setup.py is, use 'python -m pip install .'
Error message: [Errno 2] No such file or directory: '/Users/carlosoliver/Projects/fr3d-python/.venv/lib/python3.10/site-packages/fr3d/data/atom_mappings_refined.txt'
Traceback (most recent call last):
  File "/Users/carlosoliver/Projects/fr3d-python/fr3d/classifiers/NA_pairwise_interactions.py", line 54, in <module>
    from fr3d.classifiers.hydrogen_bonds import load_ideal_basepair_hydrogen_bonds
  File "/Users/carlosoliver/Projects/fr3d-python/.venv/lib/python3.10/site-packages/fr3d/classifiers/hydrogen_bonds.py", line 6, in <module>
    from fr3d.data.mapping import modified_base_atom_list,parent_atom_to_modified,modified_atom_to_parent,modified_base_to_parent
ImportError: cannot import name 'modified_base_atom_list' from 'fr3d.data.mapping' (/Users/carlosoliver/Projects/fr3d-python/.venv/lib/python3.10/site-packages/fr3d/data/mapping.py)

I checked in the data/ folder and these are the only two files:

❯ ls ../data/atom_mappings
atom_mappings.txt         atom_mappings_manual.txt

But the script is looking for atom_mappings_refined.txt

Thanks again, Carlos

cgoliver commented 1 year ago

P.S. It seems like atom_mappings.txt was updated and so changing

33 filename = os.path.join(current_path,"atom_mappings_refined.txt")

to

33 filename = os.path.join(current_path,"atom_mappings.txt")

in fr3d/data/mapping.py

seems to fix it as long as the two files are indeed equivalent.