openvax / pyensembl

Python interface to access reference genome features (such as genes, transcripts, and exons) from Ensembl
Apache License 2.0
365 stars 66 forks source link

How to select mouse database? #250

Open zhoutianrui-tongji opened 3 years ago

zhoutianrui-tongji commented 3 years ago

I do "pyensembl install --release 102 --species mouse" .it works. but when i do this :

from pyensembl import EnsemblRelease data = EnsemblRelease(102,specise="mouse")

ValueError: Missing genome data file from ftp://ftp.ensembl.org/pub/release-102/gtf/homo_sapiens/Homo_sapiens.GRCh38.102.gtf.gz. Run pyensembl install --release 102 --species homo_sapiens

gabnasello commented 1 year ago

That's a bit late but for those facing the same issue, the species argument of the EnsemblRelease class requires an object of the class pyensembl.species.Species. Thus, just type:

from pyensembl import EnsemblRelease
from pyensembl.species import mouse

# release 107 uses mouse reference genome GRCm39
data = EnsemblRelease(107, species = mouse)