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
43116de0
Commit
43116de0
authored
Dec 19, 2021
by
Gustaf Ahdritz
Browse files
Add default CPU count to AlignmentRunner
parent
edffead3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
openfold/data/data_pipeline.py
openfold/data/data_pipeline.py
+7
-2
No files found.
openfold/data/data_pipeline.py
View file @
43116de0
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
import
os
import
os
import
datetime
import
datetime
from
multiprocessing
import
cpu_count
from
typing
import
Mapping
,
Optional
,
Sequence
,
Any
from
typing
import
Mapping
,
Optional
,
Sequence
,
Any
import
numpy
as
np
import
numpy
as
np
...
@@ -128,6 +129,7 @@ def _aatype_to_str_sequence(aatype):
...
@@ -128,6 +129,7 @@ def _aatype_to_str_sequence(aatype):
for
i
in
range
(
len
(
aatype
))
for
i
in
range
(
len
(
aatype
))
])
])
def
make_protein_features
(
def
make_protein_features
(
protein_object
:
protein
.
Protein
,
protein_object
:
protein
.
Protein
,
description
:
str
,
description
:
str
,
...
@@ -216,7 +218,6 @@ def make_msa_features(
...
@@ -216,7 +218,6 @@ def make_msa_features(
class
AlignmentRunner
:
class
AlignmentRunner
:
"""Runs alignment tools and saves the results"""
"""Runs alignment tools and saves the results"""
def
__init__
(
def
__init__
(
self
,
self
,
jackhmmer_binary_path
:
Optional
[
str
]
=
None
,
jackhmmer_binary_path
:
Optional
[
str
]
=
None
,
...
@@ -259,7 +260,8 @@ class AlignmentRunner:
...
@@ -259,7 +260,8 @@ class AlignmentRunner:
Whether to search the BFD database alone with jackhmmer or
Whether to search the BFD database alone with jackhmmer or
in conjunction with uniclust30 with hhblits.
in conjunction with uniclust30 with hhblits.
no_cpus:
no_cpus:
The number of CPUs available for alignment
The number of CPUs available for alignment. By default, all
CPUs are used.
uniref_max_hits:
uniref_max_hits:
Max number of uniref hits
Max number of uniref hits
mgnify_max_hits:
mgnify_max_hits:
...
@@ -306,6 +308,9 @@ class AlignmentRunner:
...
@@ -306,6 +308,9 @@ class AlignmentRunner:
self
.
mgnify_max_hits
=
mgnify_max_hits
self
.
mgnify_max_hits
=
mgnify_max_hits
self
.
use_small_bfd
=
use_small_bfd
self
.
use_small_bfd
=
use_small_bfd
if
(
no_cpus
is
None
):
no_cpus
=
cpu_count
()
self
.
jackhmmer_uniref90_runner
=
None
self
.
jackhmmer_uniref90_runner
=
None
if
(
jackhmmer_binary_path
is
not
None
and
if
(
jackhmmer_binary_path
is
not
None
and
uniref90_database_path
is
not
None
uniref90_database_path
is
not
None
...
...
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