macarthur-lab/leiden_sc — pull request #1 by andrewhill157 (2014-03-12 19:54:18+00:00)
Title: Added macarthur_core/lovd module to project.

This additional code within leiden_sc/ contains:

1) A set of classes in macarthur_core/lovd/leiden_database.py:

These classes allow a user to extract tables of data (mutations listed for a specific gene in the database) and other useful information from any Leiden Open Variation Database installation, such as http://www.dmd.nl/nmdb2/. Unfortunately, it has been necessary to do this by downloading the HTML for relevant pages on the database and parsing out the necessary data, as they do not have an easy way to access the data otherwise. Therefore, I have added an external dependency - beautifulsoup4 - for HTML parsing.

Basically, the usage for these classes goes like this:
```
leiden_url = 'http://www.dmd.nl/nmdb2/'
gene_id = 'ACTA1'

database = make_leiden_database(leiden_url)
database.set_gene_id(gene_id)
column_labels = leiden_database.get_table_headers()
table_entries = leiden_database.get_table_data()
...
```
Note that make_leiden_database acts as a factory method to generate the right subclass of LeidenDatabase for the detected version number.

2) A set of functions in macarthur_core/lovd/utilities.py:

These are general utility functions, some of which are used in leiden_database.py.