pombase / canto

The PomBase community curation tool
https://curation.pombase.org
Other
19 stars 7 forks source link

Read FlyBase gene details directly from Chado #1800

Closed kimrutherford closed 5 years ago

kimrutherford commented 5 years ago

Storing the FlyBase genes in the Canto database is useful for testing, but longer term we should read the details from Chado.

I'm hoping this will work without code changes. I'm downloading a copy of the FlyBase Chado database now for testing.

kimrutherford commented 5 years ago

Hi @gm119 and @vmt25.

Are the taxon IDs are stored in FlyBase's Chado somewhere? I checked the organismprop table and couldn't see them.

gm119 commented 5 years ago

Hi Kim,

they are stored in organism_dbxref, and the dbxref in the dbxref table will be from the db with the name 'NCBITaxon'

I have an sql query that shows how its linked if you know the genus and species, which hopefully explains what I mean properly (but let me know if my explanation isn't clear !)

SELECT dbx.accession FROM organism o, dbxref dbx, organism_dbxref od, db db WHERE o.organism_id = od.organism_id AND dbx.dbxref_id = od.dbxref_id AND od.is_current = 't' AND dbx.db_id = db.db_id AND db.name = 'NCBITaxon' AND genus='Drosophila' AND species='melanogaster';

this gives:

accession

7227 (1 row)

kimrutherford commented 5 years ago

Thanks Gillian. That makes sense. I'll work on changing the Canto code to match.

kimrutherford commented 5 years ago

I'm hoping this will work without code changes.

It did need some small code changes but it's done now. I tested using the FlyBase external Chado server. It was a bit slow from NZ but it worked.

The changes are still on a separate branch but I plan to merge the changes into the main Canto code soon, after a bit more testing.

These lines needs to be added to canto_deploy.yaml to get Canto to read from Chado. I'll also update the Canto documentation tomorrow.

Model::ChadoModel:
  connect_info:
    - "dbi:Pg:dbname=flybase; host=chado.flybase.org"
    - flybase
    - flybase
  schema_class: Canto::ChadoDB

chado:
  taxon_id_lookup_strategy: dbxref
  ignore_case_in_gene_query: 0

implementation_classes:
  gene_adaptor: Canto::Chado::GeneLookup
  go_adaptor: Canto::Track::OntologyLookup
  ontology_adaptor: Canto::Track::OntologyLookup

86022808cbf85d4a4432343 5ccc87872f70706061efb82fc

kimrutherford commented 5 years ago

The changes are still on a separate branch but I plan to merge the changes into the main Canto code soon, after a bit more testing.

It's merged now.