Hi Chris,<div><br></div><div>It's not entirely clear to me exactly what kind of annotations you're after but for human, we have grouped these variations together into a variation set called 'Clinical/LSDB variations from dbSNP' and you can retrieve these via the VariationSet module. You can for example get phenotype annotation data when available for these variations via the VariationAnnotation module. I've included a short sample script below:</div>
<div><br></div><div><font class="Apple-style-span" face="'courier new', monospace">use </font><span class="Apple-style-span" style="font-family: 'courier new', monospace; ">Bio::EnsEMBL::Registry;</span></div>
<meta charset="utf-8"><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace">my $reg = "Bio::EnsEMBL::Registry";</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">$reg->load_registry_from_db("<a href="http://ensembldb.ensembl.org">ensembldb.ensembl.org</a>", 5306, "anonymous");</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace"># Get a VariationSetAdaptor and the LSDB set</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">my $vsa = $reg->get_adaptor("human","variation","variationset");</font></div><div><font class="Apple-style-span" face="'courier new', monospace">my $vs = $vsa->fetch_by_name("Clinical/LSDB variations from dbSNP");</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace"># Get a VariationAnnotationAdaptor</font></div><div>
<font class="Apple-style-span" face="'courier new', monospace">my $vaa = $reg->get_adaptor("human","variation","variationannotation");</font></div><div><font class="Apple-style-span" face="'courier new', monospace"><br>
</font></div><div><font class="Apple-style-span" face="'courier new', monospace"># Get an iterator for the variations in this set</font></div><div><font class="Apple-style-span" face="'courier new', monospace">my $it = $vs->get_Variation_Iterator();</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace"># Iterate over the variations and get annotations if available</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">my $v;</font></div><div><font class="Apple-style-span" face="'courier new', monospace">my $vas;</font></div><div><font class="Apple-style-span" face="'courier new', monospace">my $count = 0;</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">while ($it->has_next()) {</font></div><div><font class="Apple-style-span" face="'courier new', monospace">  $v = $it->next();</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">  $vas = $vaa->fetch_all_by_Variation($v);</font></div><div><font class="Apple-style-span" face="'courier new', monospace">  print $v->name() . " has " . (scalar(@{$vas}) ? "" : "no ") . "phenotype annotations\n";</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">  foreach my $va (@{$vas}) {</font></div><div><font class="Apple-style-span" face="'courier new', monospace">    print "\t" . join("\t",($va->source_name(),$va->phenotype_description())) . "\n";</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">  }</font></div><div><font class="Apple-style-span" face="'courier new', monospace">  $count++;</font></div><div><font class="Apple-style-span" face="'courier new', monospace">  last if ($count > 100);</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">}</font></div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">Hope this helps</font></div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif">/Pontus</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace">  </font></div>
<div><br></div><div><br><br><div class="gmail_quote">2011/3/2  <span dir="ltr"><<a href="mailto:cj5@sanger.ac.uk">cj5@sanger.ac.uk</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
Could anybody please advise how the Variations API might be use to<br>
retrieve the Clinical/LSDB Submissions annotation for a SNP, as available<br>
on the dbSNP website?<br>
Thanks<br>
Chris<br>
<br>
<br>
<br>
_______________________________________________<br>
Dev mailing list<br>
<a href="mailto:Dev@ensembl.org">Dev@ensembl.org</a><br>
<a href="http://lists.ensembl.org/mailman/listinfo/dev" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
</blockquote></div><br></div>