Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
FastFold
Commits
42427a1c
Commit
42427a1c
authored
Apr 14, 2022
by
Shenggan
Browse files
add inference pipeline from openfold/alphafold
parent
b3b3b445
Changes
84
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
142 additions
and
3 deletions
+142
-3
scripts/download_uniclust30.sh
scripts/download_uniclust30.sh
+43
-0
scripts/download_uniprot.sh
scripts/download_uniprot.sh
+55
-0
scripts/download_uniref90.sh
scripts/download_uniref90.sh
+41
-0
setup.py
setup.py
+3
-3
No files found.
scripts/download_uniclust30.sh
0 → 100755
View file @
42427a1c
#!/bin/bash
#
# Copyright 2021 DeepMind Technologies Limited
#
# 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 the Uniclust30 database for AlphaFold.
#
# Usage: bash download_uniclust30.sh /path/to/download/directory
set
-e
if
[[
$#
-eq
0
]]
;
then
echo
"Error: download directory must be provided as an input argument."
exit
1
fi
if
!
command
-v
aria2c &> /dev/null
;
then
echo
"Error: aria2c could not be found. Please install aria2c (sudo apt install aria2)."
exit
1
fi
DOWNLOAD_DIR
=
"
$1
"
ROOT_DIR
=
"
${
DOWNLOAD_DIR
}
/uniclust30"
# Mirror of:
# http://wwwuser.gwdg.de/~compbiol/uniclust/2018_08/uniclust30_2018_08_hhsuite.tar.gz
SOURCE_URL
=
"https://storage.googleapis.com/alphafold-databases/casp14_versions/uniclust30_2018_08_hhsuite.tar.gz"
BASENAME
=
$(
basename
"
${
SOURCE_URL
}
"
)
mkdir
--parents
"
${
ROOT_DIR
}
"
aria2c
"
${
SOURCE_URL
}
"
--dir
=
"
${
ROOT_DIR
}
"
tar
--extract
--verbose
--file
=
"
${
ROOT_DIR
}
/
${
BASENAME
}
"
\
--directory
=
"
${
ROOT_DIR
}
"
rm
"
${
ROOT_DIR
}
/
${
BASENAME
}
"
scripts/download_uniprot.sh
0 → 100755
View file @
42427a1c
#!/bin/bash
#
# Copyright 2021 DeepMind Technologies Limited
#
# 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, unzips and merges the SwissProt and TrEMBL databases for
# AlphaFold-Multimer.
#
# Usage: bash download_uniprot.sh /path/to/download/directory
set
-e
if
[[
$#
-eq
0
]]
;
then
echo
"Error: download directory must be provided as an input argument."
exit
1
fi
if
!
command
-v
aria2c &> /dev/null
;
then
echo
"Error: aria2c could not be found. Please install aria2c (sudo apt install aria2)."
exit
1
fi
DOWNLOAD_DIR
=
"
$1
"
ROOT_DIR
=
"
${
DOWNLOAD_DIR
}
/uniprot"
TREMBL_SOURCE_URL
=
"ftp://ftp.ebi.ac.uk/pub/databases/uniprot/current_release/knowledgebase/complete/uniprot_trembl.fasta.gz"
TREMBL_BASENAME
=
$(
basename
"
${
TREMBL_SOURCE_URL
}
"
)
TREMBL_UNZIPPED_BASENAME
=
"
${
TREMBL_BASENAME
%.gz
}
"
SPROT_SOURCE_URL
=
"ftp://ftp.ebi.ac.uk/pub/databases/uniprot/current_release/knowledgebase/complete/uniprot_sprot.fasta.gz"
SPROT_BASENAME
=
$(
basename
"
${
SPROT_SOURCE_URL
}
"
)
SPROT_UNZIPPED_BASENAME
=
"
${
SPROT_BASENAME
%.gz
}
"
mkdir
--parents
"
${
ROOT_DIR
}
"
aria2c
"
${
TREMBL_SOURCE_URL
}
"
--dir
=
"
${
ROOT_DIR
}
"
aria2c
"
${
SPROT_SOURCE_URL
}
"
--dir
=
"
${
ROOT_DIR
}
"
pushd
"
${
ROOT_DIR
}
"
gunzip
"
${
ROOT_DIR
}
/
${
TREMBL_BASENAME
}
"
gunzip
"
${
ROOT_DIR
}
/
${
SPROT_BASENAME
}
"
# Concatenate TrEMBL and SwissProt, rename to uniprot and clean up.
cat
"
${
ROOT_DIR
}
/
${
SPROT_UNZIPPED_BASENAME
}
"
>>
"
${
ROOT_DIR
}
/
${
TREMBL_UNZIPPED_BASENAME
}
"
mv
"
${
ROOT_DIR
}
/
${
TREMBL_UNZIPPED_BASENAME
}
"
"
${
ROOT_DIR
}
/uniprot.fasta"
rm
"
${
ROOT_DIR
}
/
${
SPROT_UNZIPPED_BASENAME
}
"
popd
scripts/download_uniref90.sh
0 → 100755
View file @
42427a1c
#!/bin/bash
#
# Copyright 2021 DeepMind Technologies Limited
#
# 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 the UniRef90 database for AlphaFold.
#
# Usage: bash download_uniref90.sh /path/to/download/directory
set
-e
if
[[
$#
-eq
0
]]
;
then
echo
"Error: download directory must be provided as an input argument."
exit
1
fi
if
!
command
-v
aria2c &> /dev/null
;
then
echo
"Error: aria2c could not be found. Please install aria2c (sudo apt install aria2)."
exit
1
fi
DOWNLOAD_DIR
=
"
$1
"
ROOT_DIR
=
"
${
DOWNLOAD_DIR
}
/uniref90"
SOURCE_URL
=
"ftp://ftp.uniprot.org/pub/databases/uniprot/uniref/uniref90/uniref90.fasta.gz"
BASENAME
=
$(
basename
"
${
SOURCE_URL
}
"
)
mkdir
--parents
"
${
ROOT_DIR
}
"
aria2c
"
${
SOURCE_URL
}
"
--dir
=
"
${
ROOT_DIR
}
"
pushd
"
${
ROOT_DIR
}
"
gunzip
"
${
ROOT_DIR
}
/
${
BASENAME
}
"
popd
setup.py
View file @
42427a1c
...
...
@@ -93,10 +93,10 @@ else:
return
CUDAExtension
(
name
=
name
,
sources
=
[
os
.
path
.
join
(
'fastfold/model/kernel/cuda_native/csrc'
,
path
)
for
path
in
sources
os
.
path
.
join
(
'fastfold/model/
fastnn/
kernel/cuda_native/csrc'
,
path
)
for
path
in
sources
],
include_dirs
=
[
os
.
path
.
join
(
this_dir
,
'fastfold/model/kernel/cuda_native/csrc/include'
)
os
.
path
.
join
(
this_dir
,
'fastfold/model/
fastnn/
kernel/cuda_native/csrc/include'
)
],
extra_compile_args
=
{
'cxx'
:
[
'-O3'
]
+
version_dependent_macros
,
...
...
@@ -138,7 +138,7 @@ setup(
description
=
'Optimizing Protein Structure Prediction Model Training and Inference on GPU Clusters'
,
ext_modules
=
ext_modules
,
package_data
=
{
'fastfold'
:
[
'model/kernel/cuda_native/csrc/*'
]},
package_data
=
{
'fastfold'
:
[
'model/
fastnn/
kernel/cuda_native/csrc/*'
]},
cmdclass
=
{
'build_ext'
:
BuildExtension
}
if
ext_modules
else
{},
install_requires
=
[
'einops'
,
'colossalai'
],
)
Prev
1
2
3
4
5
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment