<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style>
<!--
@font-face
        {font-family:PMingLiU}
@font-face
        {font-family:PMingLiU}
@font-face
        {font-family:Calibri}
@font-face
        {font-family:PMingLiU}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
span.EmailStyle17
        {font-family:"Calibri","sans-serif";
        color:windowtext}
.MsoChpDefault
        {font-family:"Calibri","sans-serif"}
@page WordSection1
        {margin:1.0in 1.25in 1.0in 1.25in}
div.WordSection1
        {}
-->
</style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">STAR consortium’s website is down, and I have to download a bit of their genotyped SNPs to my system. However, the following code yielded no SNPs at all:</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">my $rat_slice_adaptor=$registry->get_adaptor('rat','core','Slice');</p>
<p class="MsoNormal">my $var_fea_adaptor=$registry->get_adaptor('rat','variation','variationfeature');</p>
<p class="MsoNormal">my $pop_adaptor=$registry->get_adaptor('rat','variation','population');</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">my $rat_17=$rat_slice_adaptor->fetch_by_region('chromosome','17');</p>
<p class="MsoNormal">my $pop_code=$pop_adaptor->fetch_by_name('STAR:mdc/cng'); </p>
<p class="MsoNormal">my @rat_17_star_gtype;</p>
<p class="MsoNormal">if ($pop_code){@rat_17_star_gtype=@{$var_fea_adaptor->fetch_all_by_Slice_Population($rat_17,$pop_code)}};</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">print “No of SNPs: “,scalar(@rat_17_star_gtype);</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">The only other way I can think of to get this dataset is the following highly inefficient code:</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">my $rat_slice_adaptor=$registry->get_adaptor('rat','core','Slice');</p>
<p class="MsoNormal">my $var_fea_adaptor=$registry->get_adaptor('rat','variation','variationfeature');</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">my $rat_17=$rat_slice_adaptor->fetch_by_region('chromosome','17');</p>
<p class="MsoNormal">my @genotyped_vars=@{$var_fea_adaptor->fetch_all_genotyped_by_Slice($rat_17)};</p>
<p class="MsoNormal">my @rat_17_star_gtype;</p>
<p class="MsoNormal">foreach $single_var(@genotyped_vars){</p>
<p class="MsoNormal">my @sources=@{$single_var->get_all_sources()};</p>
<p class="MsoNormal">foreach my $source (@sources){</p>
<p class="MsoNormal">if ($source eq ‘ENSEMBL:STAR/gtype’){</p>
<p class="MsoNormal">push (@rat_17_star_gtype, $single_var );</p>
<p class="MsoNormal">last;}</p>
<p class="MsoNormal">}</p>
<p class="MsoNormal">}</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Are there a slightly more efficient way to do this?</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Cheers,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">John MC Ma</p>
<p class="MsoNormal">Graduate Assistant</p>
<p class="MsoNormal">Department of Pharmacology</p>
<p class="MsoNormal">The University of Iowa</p>
<p class="MsoNormal">Iowa City, IA, USA</p>
</div>
<br>
<br>
<hr>
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any
 retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
<hr>
</body>
</html>