<div dir="ltr"><div><div style="font-family:arial,sans-serif;font-size:13px">I am using the the latest release of the human genome, homo_sapiens_core_76_38.</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">I am trying to map exons to their corresponding dna sequence. I'm running a local instance of the sql tables to make things faster. My approach was to take the seq_region_id in the exon table and use that to find the sequence in the dna table. . The <a href="http://www.ensembl.org/info/docs/api/core/core_schema.html" target="_blank">schema</a> online seems to suggest that I can use the seq_region_id to do this but I am not getting any results back from my sql queries.</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">I've verified what the schema says, that the seq_region table has a 1-1 mapping to the dna table by comparing counts between the two with the following queries.</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">SELECT COUNT(*) FROM seq_region INNER JOIN dna ON seq_region.seq_region_id=dna.seq_region_id;<br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><span style="font-family:arial,sans-serif;font-size:13px">SELECT COUNT(*) FROM dna;</span><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">This was to be expected, however when I try to do a join between the exon table and dna table, I get a count of 0</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">SELECT COUNT(*) FROM exon INNER JOIN dna ON exon.seq_region_id=dna.seq_region_id;<br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">which tells me the seq_region_id is not a 1-1 mapping. I am able to use <a href="http://www.ensembl.org/biomart/martview/96b01e4e2043c838fc28f0969c5914a6?VIRTUALSCHEMANAME=default&ATTRIBUTES=hsapiens_gene_ensembl.default.sequences.ensembl_gene_id%7Chsapiens_gene_ensembl.default.sequences.ensembl_transcript_id%7Chsapiens_gene_ensembl.default.sequences.gene_exon%7Chsapiens_gene_ensembl.default.sequences.ensembl_exon_id&FILTERS=hsapiens_gene_ensembl.default.filters.source.%22ensembl%22&VISIBLEPANEL=resultspanel" target="_blank">biomart</a> (this is a sample query) to get the exon-to-sequence mapping but I would like a more automated approach. Can someone explain how biomart is able to do it? It's possible I am interpreting the schema wrong. How does seq_region_id in the exon table get mapped to seq_region_id in the dna table? I appreciate any help.</div></div><div><br></div><br clear="all"><div>Josh Bradley<br>Graduate Student<br>University of Maryland - College Park<br></div>
</div>