How to use pygr? worldbase doesn't return anything
1
1
Entering edit mode
10.5 years ago
Hugues ▴ 250

I installed pygr and its prerequisites.

Running:

>>> from pygr import worldbase
>>> dir(worldbase)
['0root', '0version']

Where it was supposed to return

['Bio']

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 • 2.7k views
ADD COMMENT
0
Entering edit mode

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 REPLY
3
Entering edit mode
10.5 years ago

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 COMMENT
0
Entering edit mode

I'll give it a try, thank you.

ADD REPLY

Login before adding your answer.

Traffic: 1547 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6