Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command throw errors in scripts/flatten_roda.sh #412

Open
Minys233 opened this issue Feb 29, 2024 · 1 comment
Open

Command throw errors in scripts/flatten_roda.sh #412

Minys233 opened this issue Feb 29, 2024 · 1 comment

Comments

@Minys233
Copy link

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.

for chain_dir in $(ls "${RODA_DIR}"); do
CHAIN_DIR_PATH="${RODA_DIR}/${chain_dir}"
for subdir in $(ls "${CHAIN_DIR_PATH}"); do
if [[ ! -d "$subdir" ]]; then
echo "$subdir is not directory"
continue
elif [[ -z $(ls "${subdir}")]]; then
continue
elif [[ $subdir = "pdb" ]] || [[ $subdir = "cif" ]]; then
mv "${CHAIN_DIR_PATH}/${subdir}"/* "${DATA_DIR}"
else
CHAIN_ALIGNMENT_DIR="${ALIGNMENT_DIR}/${chain_dir}"
mkdir -p "${CHAIN_ALIGNMENT_DIR}"
mv "${CHAIN_DIR_PATH}/${subdir}"/* "${CHAIN_ALIGNMENT_DIR}"
fi
done
done

@Minys233
Copy link
Author

Minys233 commented Mar 1, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant