Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mutalyzer
mutalyzer2
Commits
e2a2707f
Commit
e2a2707f
authored
Jun 23, 2016
by
Vermaat
Browse files
Fix typo in batch SNP converter
parent
f545acd9
Changes
2
Hide whitespace changes
Inline
Side-by-side
mutalyzer/Scheduler.py
View file @
e2a2707f
...
...
@@ -728,7 +728,7 @@ Mutalyzer batch scheduler""" % download_url)
descriptions
=
[]
else
:
try
:
descriptions
=
ncbi
.
rsid_to_descriptions
(
rs_i
d
)
descriptions
=
ncbi
.
rsid_to_descriptions
(
cm
d
)
except
ncbi
.
ServiceError
:
O
.
addMessage
(
__file__
,
4
,
'EENTREZ'
,
'An error occured while communicating with '
...
...
tests/test_scheduler.py
View file @
e2a2707f
...
...
@@ -69,6 +69,36 @@ def test_syntax_checker():
_batch_job_plain_text
(
variants
,
expected
,
'syntax-checker'
)
def
test_snp_converter
():
"""
Simple SNP converter batch job.
"""
snps
=
[
'rs9919552'
]
expected
=
[[
'rs9919552'
,
'|'
.
join
([
'NC_000011.9:g.111959625C>T'
,
'NG_012337.2:g.7055C>T'
,
'NG_033145.1:g.2898G>A'
,
'NM_001276503.1:c.169+928C>T'
,
'NM_001276504.1:c.87C>T'
,
'NM_001276506.1:c.204C>T'
,
'NM_003002.3:c.204C>T'
,
'NP_001263433.1:p.Ser29='
,
'NP_001263435.1:p.Ser68='
,
'NP_002993.1:p.Ser68='
,
'NR_077060.1:n.288C>T'
,
'NT_033899.8:g.15522041C>T'
])]]
# Patch Bio.Entrez.efetch to return dbSNP record for rs9919552.
def
mock_efetch
(
*
args
,
**
kwargs
):
path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
)),
'data'
,
'rs9919552.xml.bz2'
)
return
bz2
.
BZ2File
(
path
)
with
patch
.
object
(
Entrez
,
'efetch'
,
mock_efetch
):
_batch_job_plain_text
(
snps
,
expected
,
'snp-converter'
)
def
test_large_input
():
"""
Simple batch job with large input.
...
...
Write
Preview
Supports
Markdown
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