Question: How to use pygr? worldbase doesn't return anything
gravatar for Hugues
4.6 years ago by
Oslo, Norway
Hugues250 wrote:

I installed pygr and its prerequisites.


>>> from pygr import worldbase

>>> dir(worldbase)

['0root', '0version']

Where it was supposed to return


according to the documentation (root and version are empty).

Am I doing something wrong?

By the way, this package is five years old and nothing has been contributed to it since. Which leads me to wonder: is the worldbase database still maintained at UCLA?

For the curious, what I want to do next is:

hg17 = worldbase.Bio.Seq.Genome.HUMAN.hg17()

chr1 = hg17[’chr1’]

pygr python • 1.4k views
ADD COMMENTlink modified 4.6 years ago by Matt Shirley8.8k • written 4.6 years ago by Hugues250

The last pygr release is from Dec 2010, and the hg17 assembly is now very old (there have been hg18 and hg39 since then). Maybe it's all discontinued.

ADD REPLYlink written 4.6 years ago by Giovanni M Dall'Olio26k
gravatar for Matt Shirley
4.6 years ago by
Matt Shirley8.8k
Cambridge, MA
Matt Shirley8.8k wrote:

My experience is that pygr is not maintained anymore. I actually made Pyfaidx: Efficient, "Pythonic" Random Access To Fasta Files Using Samtools-Compatible Indexing as a pygr-compatible interface. You'll find that it works with more or less the same API as pygr, and if you find something that doesn't work the way you want it please tell me and I'll do my best to add it! To work with hg17, 18, or 19 you can just download a multifasta file and pass it to the `Fasta` class. From there you can do what you're attempting and use the reference like a dictionary.

ADD COMMENTlink written 4.6 years ago by Matt Shirley8.8k

I'll give it a try, thank you.

ADD REPLYlink written 4.6 years ago by Hugues250
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 690 users visited in the last hour