prehensilecode / alphafold_singularity

Singularity recipe for AlphaFold
GNU General Public License v3.0
33 stars 12 forks source link

Error while running Alphafold in singularity #18

Closed Comp-era closed 1 year ago

Comp-era commented 1 year ago

Hi , I am encountering the following error while running alphafold in HPC while executing the script, below is the given log:

SLURM_JOB_GPUS=2 ALPHAFOLD_DIR= ALPHAFOLD_DATADIR= /home/skhatri/anaconda3/envs/alphafold_v_2.3.0/bin/python3: can't find 'main' module in '/lustre/skhatri/alphafold-2.2.4/alphafold-2.2.4/alphafold_singularity'

Can someone help with what would be causing the above error? Thanks in Advance

prehensilecode commented 1 year ago

Looks like this is a question for the AlphaFold team, since it looks like you have installed AlphaFold in a Conda environment. This repo only deals with the Singularity container for AlphaFold.

Comp-era commented 1 year ago

Hi, I am really thankful for above suggestion, which was rectified. I am facing one more issue, error : SLURM_JOB_GPUS=2 ALPHAFOLD_DIR=/lustre/skhatri/alphafold-2.2.4/alphafold-2.2.4 ALPHAFOLD_DATADIR=/home/skhatri/alphafold/alphafold-2.1.2/DOWNLOAD_DIR# Traceback (most recent call last): File "/lustre/skhatri/alphafold-2.2.4/alphafold-2.2.4/alphafold_singularity/run_singularity.py", line 34, in singularity_image= Client.load(os.path.join(os.environ['ALPHAFOLD_DIR'], 'alphafold.sif')) File "/home/skhatri/anaconda3/lib/python3.8/os.py", line 675, in getitem raise KeyError(key) from None KeyError: 'ALPHAFOLD_DIR' INFO: AlphaFold returned 1

Process goes and then terminates . I have set the path and also tried work around , singularity_image = Client.load(os.path.join(os.environ['/lustre/skhatri/alphafold-2.2.4/alphafold-2.2.4'], 'alphafold.sif')) can you please advice what might be going wrong.

prehensilecode commented 1 year ago

It is not finding the ALPHAFOLD_DIR environment variable. Try using export, e.g.

export ALPHAFOLD_DIR=/lustre/something/alphafold-2.2.4
...
Comp-era commented 1 year ago

Hi, Thanks that worked, but now I am facing another error,

I0104 12:27:58.068685 23255397881664 utils.py:40] Finished hmmbuild query in 0.403 seconds I0104 12:27:58.070574 23255397881664 hmmsearch.py:103] Launching sub-process ['/usr/bin/hmmsearch', '--noali', '--cpu', '8', '--F1', '0.1', '--F2', '0.1', '--F3', '0.1', '--incE', '100', '-E', '100', '--domE', '100', '--incdomE', '100', '-A', '/tmp/tmpfoop4tiy/output.sto', '/tmp/tmpfoop4tiy/query.hmm', '/mnt/pdb_seqres_database_path/pdb_seqres.txt'] I0104 12:27:58.324806 23255397881664 utils.py:36] Started hmmsearch (pdb_seqres.txt) query I0104 12:28:04.074958 23255397881664 utils.py:40] Finished hmmsearch (pdb_seqres.txt) query in 5.750 seconds I0104 12:28:04.332502 23255397881664 hhblits.py:128] Launching subprocess "/usr/bin/hhblits -i /tmp/tmppf04tu16.fasta -cpu 4 -oa3m /tmp/tmpoyyyx0h0/output.a3m -o /dev/null -n 3 -e 0.001 -maxseq 1000000 -realign_max 100000 -maxfilt 100000 -min_prefilter_hits 1000 -d /mnt/bfd_database_path/bfd_metaclust_clu_complete_id30_c90_final_seq.sorted_opt -d /mnt/uniclust30_database_path/uniclust30_2018_08" I0104 12:28:04.527661 23255397881664 utils.py:36] Started HHblits query I0104 12:28:04.641536 23255397881664 utils.py:40] Finished HHblits query in 0.113 seconds E0104 12:28:04.641754 23255397881664 hhblits.py:138] HHblits failed. HHblits stderr begin: E0104 12:28:04.641815 23255397881664 hhblits.py:142] HHblits stderr end Traceback (most recent call last): File "/app/alphafold/run_alphafold.py", line 422, in app.run(main) File "/opt/conda/lib/python3.7/site-packages/absl/app.py", line 312, in run _run_main(main, args) File "/opt/conda/lib/python3.7/site-packages/absl/app.py", line 258, in _run_main sys.exit(main(argv)) File "/app/alphafold/run_alphafold.py", line 406, in main random_seed=random_seed) File "/app/alphafold/run_alphafold.py", line 174, in predict_structure msa_output_dir=msa_output_dir) File "/app/alphafold/alphafold/data/pipeline_multimer.py", line 269, in process is_homomer_or_monomer=is_homomer_or_monomer) File "/app/alphafold/alphafold/data/pipeline_multimer.py", line 214, in _process_single_chain msa_output_dir=chain_msa_output_dir) File "/app/alphafold/alphafold/data/pipeline.py", line 220, in process use_precomputed_msas=self.use_precomputed_msas) File "/app/alphafold/alphafold/data/pipeline.py", line 96, in run_msa_tool result = msa_runner.query(input_fasta_path)[0] File "/app/alphafold/alphafold/data/tools/hhblits.py", line 144, in query stdout.decode('utf-8'), stderr[:500_000].decode('utf-8'))) RuntimeError: HHblits failed stdout:

stderr: INFO: AlphaFold returned 0

Kindly help me out , I am a novice to this

prehensilecode commented 1 year ago

That seems to be an error from HHblits. Please ask the hh-suite authors at https://github.com/soedinglab/hh-suite

prehensilecode commented 1 year ago

Please try the newly released version 2.3.1. You can download a pre-built image here: https://cloud.sylabs.io/library/prehensilecode/alphafold_singularity/alphafold