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
OpenFold
Commits
a44bbebb
Commit
a44bbebb
authored
Aug 01, 2022
by
Gustaf Ahdritz
Browse files
Add argument check to CAMEO script
parent
b18026fd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
scripts/download_cameo.py
scripts/download_cameo.py
+6
-0
No files found.
scripts/download_cameo.py
View file @
a44bbebb
...
...
@@ -3,6 +3,7 @@
import
argparse
import
json
import
os
import
re
import
requests
from
openfold.data
import
mmcif_parsing
...
...
@@ -73,6 +74,7 @@ def main(args):
with
open
(
os
.
path
.
join
(
data_dir_path
,
cif_filename
),
"w"
)
as
fp
:
fp
.
write
(
pdb_file
)
if
__name__
==
'__main__'
:
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
...
...
@@ -95,4 +97,8 @@ if __name__ == '__main__':
if
(
args
.
period
not
in
VALID_PERIODS
):
raise
ValueError
(
f
"Invalid period. Choose from
{
VALID_PERIODS
}
"
)
date_regex
=
re
.
compile
(
"^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
)
if
(
not
date_regex
.
match
(
args
.
end_date
)):
raise
ValueError
(
f
"Invalid end_date:
{
args
.
end_date
}
. Use YYYY-MM-DD format"
)
main
(
args
)
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