openfold
openfold copied to clipboard
Command throw errors in scripts/flatten_roda.sh
I downloaded the roda pdb subdir, with the following command
aws s3 cp --no-sign-request 's3://openfold/pdb' ./pdb --recursive
Then, following the readme, I ran the scripts/flatten_roda.sh and it keep throwing errors:
ls: cannot access 'a3m': No such file or directory
ls: cannot access 'hhr': No such file or directory
./scripts/flatten_roda.sh: 32: [[: not found
./scripts/flatten_roda.sh: 34: [[: not found
./scripts/flatten_roda.sh: 34: [[: not found
After a quick check, it turned out to be a bug at L32, where the ls command in this line elif [[ -z $(ls "${subdir}")]]; then will fail since $subdir equal to a3m or hhr here, without prefix path.
https://github.com/aqlaboratory/openfold/blob/ef0c9face788001b1624b3b2dbfa951072841835/scripts/flatten_roda.sh#L26-L42
It turns out that you should modify Line 29 to:
if [[ ! -d "${CHAIN_DIR_PATH}/$subdir" ]]; then
and Line 32 to:
elif [[ -z $(ls "${CHAIN_DIR_PATH}/${subdir}") ]]; then