aqlaboratory / openfold

Trainable, memory-efficient, and GPU-friendly PyTorch reproduction of AlphaFold 2
Apache License 2.0
2.84k stars 550 forks source link

issue in prep_mmseqs_dbs.sh #32

Closed jacknicoludis closed 2 years ago

jacknicoludis commented 2 years ago

I noticed a small bug in the prep_mmseqs_dbs.sh. This script fails due to the lack of the mmseqs_dbs directory. I made a branch to try to make a pull request but I got an error saying permission was denied. I also updated the readme to fix the instruction for running this script (download_mmseqs_databases.sh -> download_mmseqs_dbs.sh, prep_mmseqs_databases.sh -> prep_mmseqs_dbs.sh). Here are the changed I propose to prep_mmseqs_dbs.sh:

#!/bin/bash
#
# Copyright 2021 AlQuraishi Laboratory 
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Downloads and unzips all required data for AlphaFold.
#
# Usage: bash download_all_data.sh /path/to/download/directory
set -e

DOWNLOAD_DIR="$1"
ROOT_DIR="${DOWNLOAD_DIR}/mmseqs_dbs"

mkdir --parents "${ROOT_DIR}"

for f in $(ls ${DOWNLOAD_DIR}/*.tar.gz)
do
  tar --extract --verbose --file="${f}" \
      --directory="${ROOT_DIR}"
  rm "${f}"
  BASENAME="$(basename {f%%.*})"
  DB_NAME="${BASENAME}_db"
  OLD_PWD=$(pwd)
  cd "${ROOT_DIR}"
  mmseqs tsv2exprofiledb "${BASENAME}" "${DB_NAME}"
  mmseqs createindex "${DB_NAME}" "${DOWNLOAD_DIR}/tmp/"
  cd "${OLD_PWD}"
done
jacknicoludis commented 2 years ago

I also got an Invalid Command error fortsv2exprofiledb. I think this is because openfold expects the latest version of mmseqs that is compiled from source (https://github.com/soedinglab/MMseqs2/wiki#compile-from-source-under-linux). Can you make this more clear in the instructions? Thanks!

gahdritz commented 2 years ago

Yes, you're right. MMseqs2 needs to be compiled from source.

Fixed in 71fabe1 and de91f01.

I'm surprised to hear you had issues making a PR---we've had a couple of other external PRs, and we haven't changed any permissions since then. I'll keep an eye out for others with similar issues.