vaquerizaslab / fanc

FAN-C: Framework for the ANalysis of C-like data
GNU General Public License v3.0
104 stars 14 forks source link

Issue with installation #182

Open rlowe-altoslabs opened 6 months ago

rlowe-altoslabs commented 6 months ago

Looks like you may need to pin BioPython or update the imports. On a new environment I installed fanc with lead to Biopython being installed with version 1.83 where GC has changed to gc_fraction (since 1.80). Running fanc with this installed leads to

File "/usr/local/lib/python3.8/dist-packages/fanc/architecture/compartments.py", line 11, in <module>
    from Bio.SeqUtils import GC as calculate_gc_content
ImportError: cannot import name 'GC' from 'Bio.SeqUtils' (/usr/local/lib/python3.8/dist-packages/Bio/SeqUtils/__init__.py)

For now installing via the following solves the issue.

pip install biopython==1.80 fanc
kaukrise commented 6 months ago

Thank you for bringing this to my attention, can you please test this version?

fanc-0.9.28.tar.gz

Could not get myself to completely abandon Biopython < 1.8.0, so I put a catch block around the import. Tested this myself on Python 3.12.2, fresh venv.

rlowe-altoslabs commented 6 months ago

Yeah works, thanks for the speedy response.