<div dir="ltr">Hi G,<div><br></div><div>1. You can check if the slice the VariationFeature falls on is a reference slice:</div><div><br></div><div>while(my $vf = shift@{$vfeatures}) {</div><div>  next unless $vf->slice->is_reference();</div><div>  <span style="font-size:13px">print $vf->seq_region_name(), "\t", $vf->seq_region_start(), "\n";</span></div><div><span style="font-size:13px">}</span></div><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px">2. You need to understand a little the difference between how Ensembl and VCF store coordinates for unbalanced substitutions (e.g. insertions or deletions). See </span><a href="http://www.ensembl.org/info/docs/tools/vep/vep_formats.html#vcf">http://www.ensembl.org/info/docs/tools/vep/vep_formats.html#vcf</a></div><div><br></div><div>So typically you should be able to get the VCF position by subtracting 1 from the seq_region_start() as this accounts for the additional base included in the VCF representation.</div><div><br></div><div>HTH</div><div><br></div><div>Will McLaren</div><div>Ensembl Variation</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 17 December 2014 at 18:03, Genomeo Dev <span dir="ltr"><<a href="mailto:genomeodev@gmail.com" target="_blank">genomeodev@gmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>*Using Ensembl 75 VM*</div><div><br></div><div>I am trying to retrieve coordinates and sequence regions for some variants using variant IDs:</div><div><div><br></div><div><div><span style="white-space:pre-wrap">       </span>my $var = $var_adaptor->fetch_by_name('rs7904594');</div><div><span style="white-space:pre-wrap">   </span>my $vfeatures = $var->get_all_VariationFeatures();</div><div><span style="white-space:pre-wrap">    </span>while (my $vf = shift @{$vfeatures}){</div><div><span style="white-space:pre-wrap">                    </span>print $vf->seq_region_name(), "\t", $vf->seq_region_start(), "\n";</div><div><span style="white-space:pre-wrap">     </span>}<br></div><div><br></div><div><u>Questions:</u></div><div><u><br></u></div><div>1. Is there a way I can choose to print main chromosomes only excluding patches?</div><div>2. I want to use the position information in a VCF. seq_region_start only works for SNPs. How can I make use of that for indels?</div><div><br></div><div>Thanks!</div><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><div><div dir="ltr">G.</div></div>
</font></span></div></div></div>
<br>_______________________________________________<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" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
Ensembl Blog: <a href="http://www.ensembl.info/" target="_blank">http://www.ensembl.info/</a><br>
<br></blockquote></div></div>