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
148afc98
Commit
148afc98
authored
Jun 13, 2022
by
Brian Loyal
Browse files
Update fasta code to account for multi-line seqs
parent
8057eb84
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
run_pretrained_openfold.py
run_pretrained_openfold.py
+10
-4
No files found.
run_pretrained_openfold.py
View file @
148afc98
...
@@ -309,10 +309,16 @@ def main(args):
...
@@ -309,10 +309,16 @@ def main(args):
for
fasta_file
in
os
.
listdir
(
args
.
fasta_dir
):
for
fasta_file
in
os
.
listdir
(
args
.
fasta_dir
):
with
open
(
os
.
path
.
join
(
args
.
fasta_dir
,
fasta_file
),
"r"
)
as
fp
:
with
open
(
os
.
path
.
join
(
args
.
fasta_dir
,
fasta_file
),
"r"
)
as
fp
:
data
=
fp
.
read
()
data
=
fp
.
read
()
tags
,
seqs
=
parse_fasta
(
data
)
tags
=
[]
# assert len(tags) == len(set(tags)), "All FASTA tags must be unique"
seqs
=
[]
for
prot
in
data
.
split
(
">"
)[
1
::]:
lines
=
prot
.
strip
().
split
(
"
\n
"
)
tags
.
append
(
lines
[
0
].
strip
().
split
()[
0
])
seqs
.
append
(
""
.
join
(
lines
[
1
:]))
assert
len
(
tags
)
==
len
(
set
(
tags
)),
"All FASTA tags must be unique"
tag
=
'-'
.
join
(
tags
)
tag
=
'-'
.
join
(
tags
)
output_name
=
f
'
{
tag
}
_
{
args
.
config_preset
}
'
output_name
=
f
'
{
tag
}
_
{
args
.
config_preset
}
'
...
...
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