google-deepmind / alphafold3

AlphaFold 3 inference pipeline.
Other
5.14k stars 578 forks source link

FYI: python3 (3.6/3.8) from RHEL8 is not happy with fetch_databases.py #3

Closed truatpasteurdotfr closed 2 weeks ago

truatpasteurdotfr commented 2 weeks ago

just for your information, just use any newer(?) version...

[tru@maestro-submit alphafold3]$ python3 --version
Python 3.6.8
[tru@maestro-submit alphafold3]$ which python3
/usr/bin/python3
[tru@maestro-submit alphafold3]$ python3 fetch_databases.py --download_destination=/tmp/toto
Traceback (most recent call last):
  File "fetch_databases.py", line 84, in <module>
    def main(argv: Sequence[str] = ('',)) -> None:
TypeError: 'ABCMeta' object is not subscriptable

Failing versions, ymmv:

[tru@maestro-submit alphafold3]$ rpm -qf /usr/bin/python3.?
python36-3.6.8-38.module+el8.5.0+12207+5c5719bc.x86_64
python38-3.8.16-1.module+el8.8.0+18967+20d359ae.1.x86_64
Augustin-Zidek commented 2 weeks ago

Thanks for reporting. I will investigate making this script compatible with older Python versions -- especially if it is just the type annotation.

That being said, the script is quite simple. You could achieve what it does by running something like this (note that I haven't tested this):

DL_ROOT=https://storage.googleapis.com/alphafold-databases/v3.0

wget -qO - ${DL_ROOT}/pdb_2022_09_28_mmcif_files.tar.zst | tar -I zstd -xf - &

for NAME in mgy_clusters_2022_05.fa \
            bfd-first_non_consensus_sequences.fasta \
            uniref90_2022_05.fa uniprot_all_2021_04.fa \
            rnacentral_active_seq_id_90_cov_80_linclust.fasta \
            pdb_seqres_2022_09_28.fasta \
            rfam_14_9_clust_seq_id_90_cov_80_rep_seq.fasta \
            nt_rna_2023_02_23_clust_seq_id_90_cov_80_rep_seq.fasta
do
  wget -qO - "${DL_ROOT}/${NAME}.zst" | zstd --decompress > "${NAME}" &
done
wait
Augustin-Zidek commented 2 weeks ago

Fixed in https://github.com/google-deepmind/alphafold3/commit/e2afc41e6028502904aa457892fbcb839436f819, thank you for reporting.

The script should now be compatible with Python 3.6+.