legaultmarc / gepyto

Python module providing reusable utility functions for human genomics.
Other
7 stars 2 forks source link

Genome build #4

Open legaultmarc opened 9 years ago

legaultmarc commented 9 years ago

As the codebase slowly grows, it becomes more important to make sure we have a standard and robust way to handle different genome builds.

I am currently worried about lines like this one:

    elif build == "GRCh38":
            url = ("http://rest.ensembl.org/variation/homo_sapiens/{snp}"
                   "?content-type=application/json")

which assume that the default is GRCh38. This is true, for now, but when it changes it will be very hard to maintain. I think that such default URLs should be centralized in the respective db module. A general rule should be that no hard coded URLs should be found anywhere but the db package.

Also, testing of the functionality on different builds is not thorough at this point (it is fairly inexistent actually). This should also be fixed...

legaultmarc commented 9 years ago

Started transitioning all the Ensembl REST API requests by using the db.ensembl.get_url_prefix function.