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
51030e4f
Commit
51030e4f
authored
13 years ago
by
Tobias Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
add missing weight matrix test file
parent
61acb788
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/seq/alg/tests/test_weight_matrix.py
+45
-0
45 additions, 0 deletions
modules/seq/alg/tests/test_weight_matrix.py
with
45 additions
and
0 deletions
modules/seq/alg/tests/test_weight_matrix.py
0 → 100644
+
45
−
0
View file @
51030e4f
import
unittest
from
ost
import
*
from
ost
import
settings
from
ost
import
seq
class
TestWeightMatrix
(
unittest
.
TestCase
):
def
test_GetWeight
(
self
):
mat
=
seq
.
alg
.
BLOSUM62
self
.
assertEqual
(
mat
.
GetWeight
(
'
A
'
,
'
A
'
),
4
)
self
.
assertEqual
(
mat
.
GetWeight
(
'
A
'
,
'
B
'
),
-
2
)
self
.
assertEqual
(
mat
.
GetWeight
(
'
a
'
,
'
A
'
),
4
)
self
.
assertEqual
(
mat
.
GetWeight
(
'
A
'
,
'
b
'
),
-
2
)
self
.
assertEqual
(
mat
.
GetWeight
(
'
A
'
,
'
?
'
),
0
)
self
.
assertEqual
(
mat
.
GetWeight
(
'
E
'
,
'
?
'
),
0
)
self
.
assertEqual
(
mat
.
GetWeight
(
'
Y
'
,
'
?
'
),
0
)
self
.
assertEqual
(
mat
.
GetWeight
(
'
?
'
,
'
A
'
),
0
)
self
.
assertEqual
(
mat
.
GetWeight
(
'
?
'
,
'
E
'
),
0
)
self
.
assertEqual
(
mat
.
GetWeight
(
'
?
'
,
'
Y
'
),
0
)
self
.
assertEqual
(
mat
.
GetWeight
(
'
?
'
,
'
y
'
),
0
)
def
test_SetWeight
(
self
):
mat
=
seq
.
alg
.
BLOSUM62
self
.
assertEqual
(
mat
.
GetWeight
(
'
A
'
,
'
A
'
),
4
)
mat
.
SetWeight
(
'
A
'
,
'
A
'
,
-
1
)
self
.
assertEqual
(
mat
.
GetWeight
(
'
A
'
,
'
A
'
),
-
1
)
self
.
assertEqual
(
mat
.
GetWeight
(
'
A
'
,
'
B
'
),
-
2
)
mat
.
SetWeight
(
'
A
'
,
'
B
'
,
10
)
self
.
assertEqual
(
mat
.
GetWeight
(
'
A
'
,
'
B
'
),
10
)
self
.
assertEqual
(
mat
.
GetWeight
(
'
E
'
,
'
?
'
),
0
)
mat
.
SetWeight
(
'
E
'
,
'
?
'
,
10
)
self
.
assertEqual
(
mat
.
GetWeight
(
'
E
'
,
'
?
'
),
0
)
self
.
assertEqual
(
mat
.
GetWeight
(
'
?
'
,
'
E
'
),
0
)
mat
.
SetWeight
(
'
?
'
,
'
E
'
,
10
)
self
.
assertEqual
(
mat
.
GetWeight
(
'
?
'
,
'
E
'
),
0
)
if
__name__
==
"
__main__
"
:
try
:
unittest
.
main
()
except
Exception
,
e
:
print
e
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