Skip to content
Snippets Groups Projects
Commit 9882df54 authored by Vermaat's avatar Vermaat
Browse files

Fix importing transcript mappings from UCSC database

Fixes #9
parent 7c97ed0d
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,8 @@ Release date to be decided.
<https://git.lumc.nl/mutalyzer/mutalyzer/merge_requests/25>`_).
- Don't crash on mail errors in the batch scheduler (`GitLab#30
<https://git.lumc.nl/mutalyzer/mutalyzer/issues/30>`_).
- Fix importing transcript mappings from UCSC database (`GitLab#9
<https://git.lumc.nl/mutalyzer/mutalyzer/issues/9>`_).
Version 2.0.3
......
......@@ -789,17 +789,15 @@ class Converter(object) :
#Converter
# Todo: This seems broken at the moment.
# Todo: Correct handling of string encodings.
def import_from_ucsc_by_gene(assembly, gene):
"""
Import transcript mappings for a gene from the UCSC.
.. todo: Also report how much was added/updated.
"""
connection = MySQLdb.connect(user='genome',
host='genome-mysql.cse.ucsc.edu',
db=assembly.alias)
db=assembly.alias,
charset='utf8',
use_unicode=True)
query = """
SELECT DISTINCT
......@@ -811,7 +809,7 @@ def import_from_ucsc_by_gene(assembly, gene):
AND acc = mrnaAcc
AND name2 = %s
"""
parameters = gene
parameters = gene,
cursor = connection.cursor()
cursor.execute(query, parameters)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment