Last active
October 17, 2020 10:32
-
-
Save TianyiShi2001/46fcc143b104cd47c7c768f958da2555 to your computer and use it in GitHub Desktop.
Sync all PDB files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# setting up directories | |
mkdir pdb && cd pdb && mkdir zipped unzipped && cd zipped | |
# download all compressed PDB files (this takes a long time!) | |
wget ftp://ftp.wwpdb.org/pub/pdb/data/structures/all/pdb/* | |
# unzip all PDB files | |
cd .. && find . -name "*.gz" | xargs -I{} -n1 bash -c ' | |
src={}; dst=unzipped/${basename ${src%*.gz}} | |
[ -f $dst ] && echo "skip" || (gzcat -cv $src > $dst)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd zipped && wget -N ftp://ftp.wwpdb.org/pub/pdb/data/structures/all/pdb/* | |
cd .. && find . -name "*.gz" | xargs -I{} -n1 bash -c ' | |
src={}; dst=unzipped/${basename ${src%*.gz}} | |
[ -f $dst ] && echo "skip" || (gzcat -cv $src > $dst)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://tianyishi2001.github.io/ox/bioinformatics/download-and-sync-with-the-entire-pdb-database.html