Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mutalyzer
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD 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
Mirrors
mutalyzer
Commits
57c55d0f
Commit
57c55d0f
authored
10 years ago
by
Jeroen F.J. Laros
Committed by
Vermaat
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
PEP8.
parent
64001702
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_describe.py
+47
-30
47 additions, 30 deletions
tests/test_describe.py
with
47 additions
and
30 deletions
tests/test_describe.py
+
47
−
30
View file @
57c55d0f
...
@@ -18,12 +18,11 @@ class TestDescribe(MutalyzerTest):
...
@@ -18,12 +18,11 @@ class TestDescribe(MutalyzerTest):
"""
"""
Test the mutalyzer.describe module.
Test the mutalyzer.describe module.
"""
"""
def
_single_variant
(
self
,
sample
,
expected
):
def
_single_variant
(
self
,
sample
,
expected
):
"""
"""
General single variant test.
General single variant test.
"""
"""
reference
=
"
ACGTCGATTCGCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
"
reference
=
'
ACGTCGATTCGCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
'
result
=
describe
.
describe_dna
(
reference
,
sample
)
result
=
describe
.
describe_dna
(
reference
,
sample
)
assert
result
[
0
].
type
==
expected
[
0
]
assert
result
[
0
].
type
==
expected
[
0
]
...
@@ -35,6 +34,7 @@ class TestDescribe(MutalyzerTest):
...
@@ -35,6 +34,7 @@ class TestDescribe(MutalyzerTest):
assert
result
[
0
].
inserted
[
0
].
sequence
==
expected
[
6
]
assert
result
[
0
].
inserted
[
0
].
sequence
==
expected
[
6
]
assert
unicode
(
result
[
0
])
==
expected
[
7
]
assert
unicode
(
result
[
0
])
==
expected
[
7
]
def
test1
(
self
):
def
test1
(
self
):
"""
"""
Test 1.
Test 1.
...
@@ -44,6 +44,7 @@ class TestDescribe(MutalyzerTest):
...
@@ -44,6 +44,7 @@ class TestDescribe(MutalyzerTest):
'
ATGATTTGATCAGATACATGTGATACCGGTAGTTAGGACAA
'
)
'
ATGATTTGATCAGATACATGTGATACCGGTAGTTAGGACAA
'
)
assert
unicode
(
result
)
==
'
[5_6insTT;17del;26A>C;35dup]
'
assert
unicode
(
result
)
==
'
[5_6insTT;17del;26A>C;35dup]
'
def
test2
(
self
):
def
test2
(
self
):
"""
"""
Test 2.
Test 2.
...
@@ -53,6 +54,7 @@ class TestDescribe(MutalyzerTest):
...
@@ -53,6 +54,7 @@ class TestDescribe(MutalyzerTest):
'
TAAGCACCAGGAGTCCATGAAGAAGCTGGATCCTCCCATGGAATCCCCTACTCTACTGTG
'
)
'
TAAGCACCAGGAGTCCATGAAGAAGCTGGATCCTCCCATGGAATCCCCTACTCTACTGTG
'
)
assert
unicode
(
result
)
==
'
[26A>C;30C>A;35G>C]
'
assert
unicode
(
result
)
==
'
[26A>C;30C>A;35G>C]
'
def
test3
(
self
):
def
test3
(
self
):
"""
"""
Test 3.
Test 3.
...
@@ -62,6 +64,7 @@ class TestDescribe(MutalyzerTest):
...
@@ -62,6 +64,7 @@ class TestDescribe(MutalyzerTest):
'
TAAGCACCAGGAGTCCATGAAGAAGCCATGTCCTGCCATGGAATCCCCTACTCTA
'
)
'
TAAGCACCAGGAGTCCATGAAGAAGCCATGTCCTGCCATGGAATCCCCTACTCTA
'
)
assert
unicode
(
result
)
==
'
[26_29inv;30C>G]
'
assert
unicode
(
result
)
==
'
[26_29inv;30C>G]
'
def
test4
(
self
):
def
test4
(
self
):
"""
"""
Test 4.
Test 4.
...
@@ -71,100 +74,114 @@ class TestDescribe(MutalyzerTest):
...
@@ -71,100 +74,114 @@ class TestDescribe(MutalyzerTest):
'
TAAGCACCAGGAGTCCATGAAGAAGCCATGTCCTGCCATGAATCCCCTACTCTA
'
)
'
TAAGCACCAGGAGTCCATGAAGAAGCCATGTCCTGCCATGAATCCCCTACTCTA
'
)
assert
unicode
(
result
)
==
'
[26_29inv;30C>G;41del]
'
assert
unicode
(
result
)
==
'
[26_29inv;30C>G;41del]
'
def
test5
(
self
):
def
test5
(
self
):
"""
"""
Test 5.
Test 5.
"""
"""
self
.
_single_variant
(
"
ACGTCGATTCGCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
"
,
self
.
_single_variant
(
'
ACGTCGATTCGCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
'
,
(
"
none
"
,
0
,
0
,
0
,
0
,
""
,
""
,
"
=
"
))
(
'
none
'
,
0
,
0
,
0
,
0
,
''
,
''
,
'
=
'
))
def
test6
(
self
):
def
test6
(
self
):
"""
"""
Test 6.
Test 6.
"""
"""
self
.
_single_variant
(
"
ACGTCGGTTCGCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
"
,
self
.
_single_variant
(
'
ACGTCGGTTCGCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
'
,
(
"
subst
"
,
7
,
7
,
7
,
7
,
"
A
"
,
"
G
"
,
"
7A>G
"
))
(
'
subst
'
,
7
,
7
,
7
,
7
,
'
A
'
,
'
G
'
,
'
7A>G
'
))
def
test7
(
self
):
def
test7
(
self
):
"""
"""
Test 7.
Test 7.
"""
"""
self
.
_single_variant
(
"
ACGTCGTTCGCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
"
,
self
.
_single_variant
(
'
ACGTCGTTCGCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
'
,
(
"
del
"
,
7
,
7
,
6
,
7
,
"
A
"
,
""
,
"
7del
"
))
(
'
del
'
,
7
,
7
,
6
,
7
,
'
A
'
,
''
,
'
7del
'
))
def
test8
(
self
):
def
test8
(
self
):
"""
"""
Test 8.
Test 8.
"""
"""
self
.
_single_variant
(
"
ACGTCGTCGCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
"
,
self
.
_single_variant
(
'
ACGTCGTCGCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
'
,
(
"
del
"
,
7
,
8
,
6
,
7
,
"
AT
"
,
""
,
"
7_8del
"
))
(
'
del
'
,
7
,
8
,
6
,
7
,
'
AT
'
,
''
,
'
7_8del
'
))
def
test9
(
self
):
def
test9
(
self
):
"""
"""
Test 9.
Test 9.
"""
"""
self
.
_single_variant
(
"
ACGTCGCATTCGCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
"
,
self
.
_single_variant
(
'
ACGTCGCATTCGCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
'
,
(
"
ins
"
,
6
,
7
,
7
,
7
,
""
,
"
C
"
,
"
6_7insC
"
))
(
'
ins
'
,
6
,
7
,
7
,
7
,
''
,
'
C
'
,
'
6_7insC
'
))
def
test10
(
self
):
def
test10
(
self
):
"""
"""
Test 10.
Test 10.
"""
"""
self
.
_single_variant
(
"
ACGTCGCCATTCGCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
"
,
self
.
_single_variant
(
'
ACGTCGCCATTCGCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
'
,
(
"
ins
"
,
6
,
7
,
7
,
8
,
""
,
"
CC
"
,
"
6_7insCC
"
))
(
'
ins
'
,
6
,
7
,
7
,
8
,
''
,
'
CC
'
,
'
6_7insCC
'
))
def
test11
(
self
):
def
test11
(
self
):
"""
"""
Test 11.
Test 11.
"""
"""
self
.
_single_variant
(
"
ACGTCGAATTCGCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
"
,
self
.
_single_variant
(
'
ACGTCGAATTCGCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
'
,
(
"
dup
"
,
7
,
7
,
8
,
8
,
""
,
"
A
"
,
"
7dup
"
))
(
'
dup
'
,
7
,
7
,
8
,
8
,
''
,
'
A
'
,
'
7dup
'
))
def
test12
(
self
):
def
test12
(
self
):
"""
"""
Test 12.
Test 12.
"""
"""
self
.
_single_variant
(
"
ACGTCGAGATTCGCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
"
,
self
.
_single_variant
(
'
ACGTCGAGATTCGCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
'
,
(
"
dup
"
,
6
,
7
,
8
,
9
,
""
,
"
GA
"
,
"
6_7dup
"
))
(
'
dup
'
,
6
,
7
,
8
,
9
,
''
,
'
GA
'
,
'
6_7dup
'
))
def
test13
(
self
):
def
test13
(
self
):
"""
"""
Test 13.
Test 13.
"""
"""
self
.
_single_variant
(
"
ACGTCGACGATTCGCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
"
,
self
.
_single_variant
(
'
ACGTCGACGATTCGCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
'
,
(
"
dup
"
,
5
,
7
,
8
,
10
,
""
,
"
CGA
"
,
"
5_7dup
"
))
(
'
dup
'
,
5
,
7
,
8
,
10
,
''
,
'
CGA
'
,
'
5_7dup
'
))
def
test14
(
self
):
def
test14
(
self
):
"""
"""
Test 14.
Test 14.
"""
"""
self
.
_single_variant
(
"
ACGTCGCGAATCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
"
,
self
.
_single_variant
(
'
ACGTCGCGAATCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
'
,
(
"
inv
"
,
7
,
11
,
7
,
11
,
"
ATTCG
"
,
"
CGAAT
"
,
"
7_11inv
"
))
(
'
inv
'
,
7
,
11
,
7
,
11
,
'
ATTCG
'
,
'
CGAAT
'
,
'
7_11inv
'
))
def
test15
(
self
):
def
test15
(
self
):
"""
"""
Test 15.
Test 15.
"""
"""
self
.
_single_variant
(
"
ACGTCGCCTTCGCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
"
,
self
.
_single_variant
(
'
ACGTCGCCTTCGCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
'
,
(
"
delins
"
,
7
,
7
,
7
,
8
,
"
A
"
,
"
CC
"
,
"
7delinsCC
"
))
(
'
delins
'
,
7
,
7
,
7
,
8
,
'
A
'
,
'
CC
'
,
'
7delinsCC
'
))
def
test16
(
self
):
def
test16
(
self
):
"""
"""
Test 16.
Test 16.
"""
"""
self
.
_single_variant
(
"
ACGTCGATTCGCTAGCTTCGTTTTGATAGATAGAGATATAGAGAT
"
,
self
.
_single_variant
(
'
ACGTCGATTCGCTAGCTTCGTTTTGATAGATAGAGATATAGAGAT
'
,
(
"
delins
"
,
21
,
23
,
21
,
24
,
"
GGG
"
,
"
TTTT
"
,
"
21_23delinsTTTT
"
))
(
'
delins
'
,
21
,
23
,
21
,
24
,
'
GGG
'
,
'
TTTT
'
,
'
21_23delinsTTTT
'
))
def
test17
(
self
):
def
test17
(
self
):
"""
"""
Test 17.
Test 17.
"""
"""
self
.
_single_variant
(
"
ACGTCTCTTCGCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
"
,
self
.
_single_variant
(
'
ACGTCTCTTCGCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
'
,
(
"
inv
"
,
6
,
7
,
6
,
7
,
"
GA
"
,
"
TC
"
,
"
6_7inv
"
))
(
'
inv
'
,
6
,
7
,
6
,
7
,
'
GA
'
,
'
TC
'
,
'
6_7inv
'
))
def
test18
(
self
):
def
test18
(
self
):
"""
"""
Test 18.
Test 18.
"""
"""
self
.
_single_variant
(
"
ACGTCGTCTCGCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
"
,
self
.
_single_variant
(
'
ACGTCGTCTCGCTAGCTTCGGGGGATAGATAGAGATATAGAGAT
'
,
(
"
delins
"
,
7
,
8
,
7
,
8
,
"
AT
"
,
"
TC
"
,
"
7_8delinsTC
"
))
(
'
delins
'
,
7
,
8
,
7
,
8
,
'
AT
'
,
'
TC
'
,
'
7_8delinsTC
'
))
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