Commit e2a2707f authored by Vermaat's avatar Vermaat
Browse files

Fix typo in batch SNP converter

parent f545acd9
......@@ -728,7 +728,7 @@ Mutalyzer batch scheduler""" % download_url)
descriptions = []
else:
try:
descriptions = ncbi.rsid_to_descriptions(rs_id)
descriptions = ncbi.rsid_to_descriptions(cmd)
except ncbi.ServiceError:
O.addMessage(__file__, 4, 'EENTREZ',
'An error occured while communicating with '
......
......@@ -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.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment