<div dir="ltr">Hi Nathan, thanks for your reply! <br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 20, 2015 at 1:32 AM, njohnson <span dir="ltr"><<a href="mailto:njohnson@ebi.ac.uk" target="_blank">njohnson@ebi.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">HI WIlliam<br>
See below for comments.<br>
Nathan Johnson<br>
Schema documentation can be found here:<br>
        <a href="http://www.ensembl.org/info/docs/api/funcgen/index.html" target="_blank">http://www.ensembl.org/info/docs/api/funcgen/index.html</a></blockquote><div> </div><div> </div><div>Yes I found this png for Funcgen (which is missing Core-like tables), and I found five pngs for Core (<a href="http://uswest.ensembl.org/info/docs/api/core/core_schema.html">http://uswest.ensembl.org/info/docs/api/core/core_schema.html</a>).</div><div><br></div><div>However, I couldn't find a png that linked the two databases (Core and Funcgen) together.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Correct,  the funcgen xrefs which are associated with the rattus_norvegicus_core_Transcript external_db record with db_release 78_5. The xref.dbprimary_acc in this case will be the transcript stable ID.<br>><br>
> Thus to connect the two top-level databases this leads to a rather odd-looking WHERE clause:<br>
><br>
> "WHERE rattus_norvegicus_funcgen_78_5.xref.dbprimary_acc = rattus_norvegicus_core_78_5.transcript.stable_id"<br>
><br>
><br>
You’re pretty much spot on there, that is the standard way to connect between two DBs on the same server, although you’re missing the join to external_db as described above.<br>Nath<br></blockquote><div><br></div><div><br></div><div>What I think you're saying is in addition to using the join or <i>WHERE</i> clause above, I should also be sure to add a <i>WHERE</i> clause restricting the query to Ensembl version_78.5 as thus:  "WHERE rattus_norvegicus_funcgen_78_5.xref.external_db_id = 2234"</div><div><br></div><div>However I don't feel I understand your instruction to do a<i> JOIN</i> to "external_db". The Core schema doesn't indicate that this takes me anywhere, except to unmapped objects (<a href="http://uswest.ensembl.org/info/docs/api/core/xrefs_core.pdf">http://uswest.ensembl.org/info/docs/api/core/xrefs_core.pdf</a>). Also, rattus_norvegicus_core_78_5.transcript has no column with the word or phrase "external" or "external_db". </div><div><br></div><div>Do you mean I should take the "external_db_id" column from the respective "external_db" tables and <i>JOIN </i>rattus_norvegicus_funcgen_78_5.external_db to rattus_norvegicus_core_78_5.external_db ?  I looked at these identifiers individually and this particular  <i>JOIN</i> doesn't make sense:  the identifiers do not match up.</div><div> </div><div>rattus_norvegicus_funcgen_78_5.external_db.db_name = "rattus_norvegicus_core_Transcript" AND  rattus_norvegicus_funcgen_78_5.external_db.db_release = "78_5" results in a single row "external_db_id" of <u>2234</u> (rattus_norvegicus_funcgen_78_5.external_db.external_db_id).</div><div><br></div><div>OTOH rattus_norvegicus_core_78_5.external_db.db_name = "Ens_Rn_transcript" gives a single row "external_db_id" of <u>50685</u> (rattus_norvegicus_core_78_5.external_db.external_db_id).</div><div><br></div><div>I guess the question I'm trying to answer is--if I can't do a reasonable <i>JOIN</i> from Funcgen to Core, how to get Ontology information out of Funcgen? Currently the rattus_norvegicus_funcgen_78_5.ontology_xref table is unpopulated, while the same table in Core has 288,664 rows. </div><div><br></div><div>Either way, without a schema delineating a key relationship between Core and Funcgen I don't feel that going forward these queries can be relied upon in the future.<br></div><div><br></div><div>Thanks, Bill.</div><div><br></div></div></div></div>