ml-struct-bio/cryodrgn

TypeError in analyze_landscape

Closed this issue · 2 comments

Hi, I ran cryodrgn analyze_landscape and encountered TypeError where the argument affinity is not recognized. I was wondering if this is due to AgglomerativeClustering changed the argument affinity to metric? I was abit confused when I read the documentation for AgglomerativeClustering, please forgive me if I mixed up affinity with metric.

I attached below the last few lines of the reported error for reference:

File "/spshared/apps/miniconda3/envs/cryodrgn/lib/python3.9/site-packages/cryodrgn/commands/analyze_landscape.py", line 318, in analyze_volumes
cluster = AgglomerativeClustering(
TypeError: init() got an unexpected keyword argument 'affinity'

The command used:
cryodrgn analyze_landscape cryodrgn.200_1/ -o /mnt/NAS/CJ/cryodrgn_20230531/analyze2_landscape 24 --skip-vol -M 10 --linkage average

additional context
I was able to run it up to clustering. That is why I skipped the volumes in this command.

This should have been addressed in #344; please see #345, and double-check the version of cryoDRGN you have installed.

Also, please remember that it is considered good practice — and a common courtesy — to check closed issues before creating a new one!

Thank you very much for your help. I will keep this in mind and check more thoroughly next time.