<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">hi Laurent <div>Thanks for this -</div><div>I want all SNP associated with a phenotype,not one in particular,  I used diabetes as an example .</div><div>is fetch_all the one to use?</div><table class="memname" style="font-family: 'Lucida Grande', Verdana, Geneva, Arial, sans-serif; font-size: 12px; color: black; white-space: nowrap; font-weight: bold; margin-left: 6px; position: static; z-index: auto; "><tbody><tr style="vertical-align: top;"><td class="memname" style="font-size: 1em; text-align: left; border: 0px; color: rgb(51, 51, 51); margin-left: 6px; ">public List Bio::EnsEMBL::Variation::DBSQL::PhenotypeFeatureAdaptor::fetch_all<br><br></td></tr></tbody></table>Another question, how do you get the SNPs IDs associated with those phenotypes?<div>Thanks</div><div>Nathalie</div><div><br><div><div>On 9 Oct 2014, at 11:44, Laurent Gil <<a href="mailto:lgil@ebi.ac.uk">lgil@ebi.ac.uk</a>> wrote:</div><div><div><br class="Apple-interchange-newline"><blockquote type="cite">
  
    <meta content="text/html; charset=windows-1252" http-equiv="Content-Type">
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Nathalie,<br>
      <br>
      The database schema is not easy to decipher. We built the
      following documentation to help to understand the tables/columns:<br>
      <a href="http://www.ensembl.org/info/docs/api/variation/variation_schema.html">http://www.ensembl.org/info/docs/api/variation/variation_schema.html</a><br>
      At the moment, the variation_attrib table is only used by our
      colleagues in Ensembl Genomes, so you don't need to use this table
      to link the variations to the phenotype.<br>
      <br>
      However, I warmly recommand to use the Variation API: there is a
      method in the PhenotypeFeatureAdaptor object to retrieve all the
      data associated with a phenotype: "
      <meta http-equiv="content-type" content="text/html;
        charset=windows-1252">
      <a class="el" href="http://www.ensembl.org/info/docs/Doxygen/variation-api/classBio_1_1EnsEMBL_1_1Variation_1_1DBSQL_1_1PhenotypeFeatureAdaptor.html#a5692dfaa03010ea9eec3e4a279421496">fetch_all_by_phenotype_description_source_name</a>"
      (the source name parameter is optional). And from the
      PhenotypeFeature objects, you can retrieve the variations.<br>
      <br>
      Best regards,<br>
      <pre class="moz-signature" cols="72">Laurent</pre>
      On 09/10/2014 11:27, Nathalie Conte wrote:<br>
    </div>
    <blockquote cite="mid:20141009102718.2CAB9132A89_4366306B@hx-mx2.ebi.ac.uk" type="cite">
      <pre wrap="">HI, 
I am trying to build a sql query in order to select all SNPs (germline and somatic, ie rs1223) associated with a phenotype.(ie diabetes) using sql command.
I started building a sql query connecting different tables in homo_sapiens_variation_77_38 database in order to connect the variation table (variation_id, rs1223)and the phenotype table where the description of the phenotype is (ie diabetes).
Looking at the schema <a class="moz-txt-link-freetext" href="http://www.ensembl.org/info/docs/api/variation/variation-database-schema.pdf">http://www.ensembl.org/info/docs/api/variation/variation-database-schema.pdf</a> , I am linking variation table through variation, variation_attrib, phenotype_feature_attrib, feanotype_feature, and phenotype.
It seems that variation_attri table is empty, so I cannot link the data
mysql -<a href="http://hensembldb.ensembl.org">hensembldb.ensembl.org</a> -uanonymous -e"SELECT * FROM  variation_attrib   LIMIT 10;" homo_sapiens_variation_77_38 command will return no  result.
Could you please help me forward suggestion another path to link variation.variation_id to phenotype.description, or suggest directly a sql command?
Thanks in advance
Nathalie


_______________________________________________
Dev mailing list    <a class="moz-txt-link-abbreviated" href="mailto:Dev@ensembl.org">Dev@ensembl.org</a>
Posting guidelines and subscribe/unsubscribe info: <a class="moz-txt-link-freetext" href="http://lists.ensembl.org/mailman/listinfo/dev">http://lists.ensembl.org/mailman/listinfo/dev</a>
Ensembl Blog: <a class="moz-txt-link-freetext" href="http://www.ensembl.info/">http://www.ensembl.info/</a>
</pre>
    </blockquote>
    <br>
  </div>

_______________________________________________<br>Dev mailing list    <a href="mailto:Dev@ensembl.org">Dev@ensembl.org</a><br>Posting guidelines and subscribe/unsubscribe info: <a href="http://lists.ensembl.org/mailman/listinfo/dev">http://lists.ensembl.org/mailman/listinfo/dev</a><br>Ensembl Blog: <a href="http://www.ensembl.info/">http://www.ensembl.info/</a><br></blockquote></div><br></div></div></div></body></html>