We have a local EnsEMBL MySQL database containing annotated mosquito genomes.
The PyCogent cookbook states **Here** that you can access/query data from a local MySQL EnsEMBL database via the cogent.db.ensembl.HostAccount
module. **Here** is the source code for PyCogent's ensembl-api.
But I cannot access the data as the functions assume a priori that I know the exact names of species (string) whose genomes I am trying to query... After hours of searching online, I would greatly appreciate if somebody could tell me how I can list the names of species (that PyCogent would understand) so that I can finally query the local database for the genome data.
This code shows my problem, note the commenting:
Release = 73
from cogent.db.ensembl import HostAccount, Genome
acc = HostAccount('localhost', 'username1', 'password1') # login details to MySQL server
genome = Genome(Species='?????',Release=73,account=acc) # Where can I find the available Species list so I can replace the '?????'
Presumably it recognizes things listed in
_species_common_map
here.Edit: It does in fact, at least from a cursory read through the code. If you're familiar with SQL you should also be able to just browse through the tables.
@dpryan79 when I run the "Species" module.. it just lists all species available in the public database - not the local. I was told the whole point of these APIs was to avoid complex MySQL querying due to the complexity of EnsEMBL schema
I know nothing about PyCogent, but the things listed there are the species recognized. If you're customized the local database instance, then presumably you would have tracked what you did.
That gave me a lead to work out how, thank you very much
cross posted on SO: http://stackoverflow.com/questions/21241834