Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
1b7f6ea2
Commit
1b7f6ea2
authored
7 years ago
by
Gerardo Tauriello
Browse files
Options
Downloads
Patches
Plain Diff
SCHWED-2638: fixed/cleaned-up dssp-locate-check in unit tests
parent
1bd92b74
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/mol/alg/tests/test_accessibility.py
+6
-11
6 additions, 11 deletions
modules/mol/alg/tests/test_accessibility.py
modules/mol/alg/tests/test_sec_struct.py
+6
-8
6 additions, 8 deletions
modules/mol/alg/tests/test_sec_struct.py
with
12 additions
and
19 deletions
modules/mol/alg/tests/test_accessibility.py
+
6
−
11
View file @
1b7f6ea2
...
@@ -111,19 +111,14 @@ class TestAccessibility(unittest.TestCase):
...
@@ -111,19 +111,14 @@ class TestAccessibility(unittest.TestCase):
def
testAccDSSP
(
self
):
def
testAccDSSP
(
self
):
dssp_path
=
None
# only relevant if dssp there
try
:
try
:
dssp_path
=
settings
.
Locate
(
"
dssp
"
)
# same check used in dssp binding
dssp_path
=
settings
.
Locate
([
'
dsspcmbi
'
,
'
dssp
'
,
'
mkdssp
'
],
env_name
=
'
DSSP_EXECUTABLE
'
)
except
:
except
:
try
:
dssp_path
=
settings
.
locate
(
"
mkdssp
"
)
except
:
pass
pass
if
dssp_path
==
None
:
print
"
Could not find DSSP, could not compare Accessibility function...
"
print
"
Could not find DSSP, could not compare Accessibility function...
"
return
# we assume oligo mode to be working as it is tested in
# we assume oligo mode to be working as it is tested in
# testAccNACCESS. So we only test the single residue
# testAccNACCESS. So we only test the single residue
...
@@ -133,7 +128,7 @@ class TestAccessibility(unittest.TestCase):
...
@@ -133,7 +128,7 @@ class TestAccessibility(unittest.TestCase):
ent_one
=
ent_one
.
Select
(
"
peptide=true
"
)
ent_one
=
ent_one
.
Select
(
"
peptide=true
"
)
ent_two
=
ent_two
.
Select
(
"
peptide=true
"
)
ent_two
=
ent_two
.
Select
(
"
peptide=true
"
)
dssp
.
AssignDSSP
(
ent_one
,
extract_burial_status
=
True
,
dssp_bin
=
dssp_path
)
dssp
.
AssignDSSP
(
ent_one
,
extract_burial_status
=
True
,
dssp_bin
=
dssp_path
)
mol
.
alg
.
Accessibility
(
ent_two
,
algorithm
=
mol
.
alg
.
AccessibilityAlgorithm
.
DSSP
)
mol
.
alg
.
Accessibility
(
ent_two
,
algorithm
=
mol
.
alg
.
AccessibilityAlgorithm
.
DSSP
)
for
a
,
b
in
zip
(
ent_one
.
residues
,
ent_two
.
residues
):
for
a
,
b
in
zip
(
ent_one
.
residues
,
ent_two
.
residues
):
...
...
This diff is collapsed.
Click to expand it.
modules/mol/alg/tests/test_sec_struct.py
+
6
−
8
View file @
1b7f6ea2
...
@@ -9,20 +9,18 @@ class TestSecStruct(unittest.TestCase):
...
@@ -9,20 +9,18 @@ class TestSecStruct(unittest.TestCase):
def
testSecStruct
(
self
):
def
testSecStruct
(
self
):
# unit test only makes sense, when a dssp binary is around
# unit test only makes sense, when a dssp binary is around
dssp_path
=
None
try
:
try
:
dssp_path
=
settings
.
Locate
(
"
dssp
"
)
# same check used in dssp binding
dssp_path
=
settings
.
Locate
([
'
dsspcmbi
'
,
'
dssp
'
,
'
mkdssp
'
],
env_name
=
'
DSSP_EXECUTABLE
'
)
except
:
except
:
try
:
print
"
Could not find DSSP, could not compare sec struct assignment...
"
dssp_path
=
settings
.
Locate
(
"
mkdssp
"
)
return
except
:
print
"
Could not find dssp, could not compare sec struct assignment...
"
return
dssp_ent
=
io
.
LoadPDB
(
os
.
path
.
join
(
"
testfiles
"
,
"
1a0s.pdb
"
))
dssp_ent
=
io
.
LoadPDB
(
os
.
path
.
join
(
"
testfiles
"
,
"
1a0s.pdb
"
))
ost_ent
=
io
.
LoadPDB
(
os
.
path
.
join
(
"
testfiles
"
,
"
1a0s.pdb
"
))
ost_ent
=
io
.
LoadPDB
(
os
.
path
.
join
(
"
testfiles
"
,
"
1a0s.pdb
"
))
dssp
.
AssignDSSP
(
dssp_ent
,
dssp_bin
=
dssp_path
)
dssp
.
AssignDSSP
(
dssp_ent
,
dssp_bin
=
dssp_path
)
mol
.
alg
.
AssignSecStruct
(
ost_ent
)
mol
.
alg
.
AssignSecStruct
(
ost_ent
)
for
a
,
b
in
zip
(
dssp_ent
.
residues
,
ost_ent
.
residues
):
for
a
,
b
in
zip
(
dssp_ent
.
residues
,
ost_ent
.
residues
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment