<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Arabic Typesetting";
        panose-1:3 2 4 2 4 4 6 3 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hello, <o:p></o:p></p>
<p class="MsoNormal">Im currently a developer at the Rat Genome database, Human and Molecular Genetics Center, MCW. I’ve currently been assigned a project wherein the PIs are referencing  Ensembl gene pages and gene sequence and variant information. The first
 step in my application pipeline is to get the sequence for the gene of interest and all the variation consequences within that genic region.
<o:p></o:p></p>
<p class="MsoNormal">For eg. Here:<o:p></o:p></p>
<p class="MsoNormal"><a href="http://www.ensembl.org/Homo_sapiens/Gene/Variation_Gene/Table?g=ENSG00000139618;r=13:32889611-32973805#ALL_tablePanel">http://www.ensembl.org/Homo_sapiens/Gene/Variation_Gene/Table?g=ENSG00000139618;r=13:32889611-32973805#ALL_tablePanel</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">now I have access to your MYSQL database for homo_sapiens_variation_72_37 and also have a database dump ( since we thought creating a local copy would make more sense) . im using the useastdb.ensembl.org port 5306.
<o:p></o:p></p>
<p class="MsoNormal">The problem arises when I try and simulate a query from the database that gives me the variants exactly like they are on the gene report page above.
<o:p></o:p></p>
<p class="MsoNormal">For the same gene using the homo_sapiens_variation_72_37 schema, I have the following test query:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>select vf.variation_name, vf.seq_region_id, vf.seq_region_start, vf.source_id, s.name, vf.minor_allele_freq, tv.feature_stable_id, tv.allele_string, tv.consequence_types 
<o:p></o:p></b></p>
<p class="MsoNormal"><b>from homo_sapiens_variation_72_37.variation_feature vf, homo_sapiens_variation_72_37.transcript_variation tv,
<o:p></o:p></b></p>
<p class="MsoNormal"><b>homo_sapiens_variation_72_37.source s<o:p></o:p></b></p>
<p class="MsoNormal"><b>WHERE <o:p></o:p></b></p>
<p class="MsoNormal"><b>s.source_id=vf.source_id and<o:p></o:p></b></p>
<p class="MsoNormal"><b>vf.seq_region_id=27513 and <o:p></o:p></b></p>
<p class="MsoNormal"><b>vf.seq_region_start>=32889611 and <o:p></o:p></b></p>
<p class="MsoNormal"><b>vf.seq_region_end<=32973805 and<o:p></o:p></b></p>
<p class="MsoNormal"><b>vf.variation_feature_id=tv.variation_feature_id and <o:p>
</o:p></b></p>
<p class="MsoNormal"><b>tv.feature_stable_id in (<o:p></o:p></b></p>
<p class="MsoNormal"><b>select t.stable_id from homo_sapiens_core_72_37.transcript t<o:p></o:p></b></p>
<p class="MsoNormal"><b>where t.gene_id=609208<o:p></o:p></b></p>
<p class="MsoNormal"><b>)<o:p></o:p></b></p>
<p class="MsoNormal"><b>order by tv.feature_stable_id;<o:p></o:p></b></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">where seq_region_id is Chr 13 and region start corresponds to the start of the variant.
<o:p></o:p></p>
<p class="MsoNormal">Even then my count of the data is only 13270 while the web page gives me their count as 13584.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The thing is that I need to get in touch with any developer at Ensembl who knows this stuff well and can point me in the direction creating the correct  query to get the same number of variation consequences as the webpage.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Please do let me know if you can help me with this, or if you know anyone who can help me out with this..
<o:p></o:p></p>
<p class="MsoNormal">Since this is just the first stage of the project, im looking for a bunch of solid examples wherein my query and the results on the webpage are spot-on correct.
<o:p></o:p></p>
<p class="MsoNormal">Hope you guys have a good rest of your summer!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:16.0pt;font-family:"Arabic Typesetting"">Pushkala Jayaraman<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:16.0pt;font-family:"Arabic Typesetting"">Programmer/Analyst - Rat Genome Database<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:16.0pt;font-family:"Arabic Typesetting"">Human and Molecular Genetics Center<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:16.0pt;font-family:"Arabic Typesetting"">Medical College of Wisconsin<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:16.0pt;font-family:"Arabic Typesetting"">414-955-2229<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:16.0pt;font-family:"Arabic Typesetting""><a href="http://rgd.mcw.edu"><span style="color:blue">http://rgd.mcw.edu</span></a><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>