[Biopython] IMGT/HLA DB Access

David Winter djwinter at asu.edu
Tue Jan 28 22:00:53 UTC 2014


Hi Eyal,

The Entrez module is specifically for the NCBI's entrez databases (the
likes of the nucleotide, refseq and pubmed), and won't work for others.

If the mgt/hla database has an API (a quick search around the site doesn't
find one) it might be possible to write your own code to access the
database programatically, but I don't think there in anything in Biopython
that will help you with actually querying the database or fetching records
from it.

David


On Tue, Jan 28, 2014 at 11:42 AM, Eyal Arian <eyalarian at gmail.com> wrote:

> Hello,
> I would like to access data directly from the imgt/hla database into
> BioPython: http://www.ebi.ac.uk/cgi-bin/ipd/imgt/hla/align.cgi
>
> For example, the following doesn't work, but it may give you the idea of
> what I am trying to do:
> >>> import Bio
> >>> from Bio import Entrez
> >>> Entrez.email = "eyalarian at gmail.com"
> >>> handle = Entrez.esearch(db="x-imgt-hla", term="DPB1*01:01:01")
> >>> record = Entrez.read(handle)
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "Bio/Entrez/__init__.py", line 372, in read
> record = handler.read(handle)
> File "Bio/Entrez/Parser.py", line 187, in read
> self.parser.ParseFile(handle)
> File "Bio/Entrez/Parser.py", line 325, in endElementHandler
> raise RuntimeError(value)
> RuntimeError: Invalid db name specified: x-imgt-hla
>
> Thanks!
> E. Arian
> _______________________________________________
> Biopython mailing list  -  Biopython at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython
>



-- 
David Winter
Postdoctoral Research Associate
Center for Evolutionary Medicine and Informatics
The Biodesign Institute
Arizona State University

ph: +1 480 519 5113
w: www.david-winter.info
lab: http://cartwrig.ht/lab/
blog: sciblogs.co.nz/the-atavism



More information about the Biopython mailing list