<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi EnsEMBL devs,<br>
<br>
I'm working on a script that essentially outputs much of the variation page for a given transcript, with some tweaks and additions. Right now I'm working with API version 75, and I'm running into issues with the variation sets.<br>
<br>
Here's a script which reproduces the issue on my computer:<br>
#begin script<br>
use strict;<br>
use warnings;<br>
use Bio::EnsEMBL::Registry;<br>
<br>
my $registry = 'Bio::EnsEMBL::Registry';<br>
<br>
$registry->load_registry_from_db(<br>
    -host => 'ensembldb.ensembl.org',<br>
    -user => 'anonymous'<br>
);<br>
<br>
my $stable_id = "ENST00000392487"; #this is the stable_id of a human transcript, as an example<br>
my $transcript_adaptor = $registry->get_adaptor('homo_sapiens', 'core', 'transcript'); #get the adaptor to get the Transcript from the database<br>
my $transcript = $transcript_adaptor->fetch_by_stable_id($stable_id); #get the Transcript object<br>
my $tv_adaptor = $registry->get_adaptor('homo_sapiens', 'variation', 'transcriptvariation'); #get the adaptor to get TranscriptVariation objects<br>
my $vs_adaptor = $registry->get_adaptor('human', 'variation', 'variationset'); # get variation set adaptor<br>
my $tvs = $tv_adaptor->fetch_all_by_Transcripts([$transcript]); #get ALL effects of Variations in the Transcript<br>
<br>
foreach my $tv (@{$tvs}) {<br>
    my $tvas = $tv->get_all_alternate_TranscriptVariationAlleles(); #These alleles will be the lines of the output.<br>
<br>
    foreach my $tva(@{$tvas}) {<br>
        my @vsets = @{$vs_adaptor->fetch_all_by_Variation($tva->variation_feature->variation)};<br>
        print<br>
            $tva->variation_feature->display_id,"\t",join(",", @vsets),"\n"; #variation sets<br>
    }<br>
}<br>
#end script<br>
<br>
And here's a couple lines of the output:<br>
rs374450378    Bio::EnsEMBL::Variation::VariationSet=HASH(0x6022f7778)<br>
rs369428195    Bio::EnsEMBL::Variation::VariationSet=HASH(0x601f7e868)<br>
rs146522403    Bio::EnsEMBL::Variation::VariationSet=HASH(0x6022f7550),Bio::EnsEMBL::Variation::VariationSet=HASH(0x6022f7778),Bio::EnsEMBL::Variation::VariationSet=HASH(0x6022f75f8)<br>
<br>
So in other words, the problem seems to lie in the adaptor pm's interpretation of the data from the function $vsa->fetch_all_by_Variation(); the program seems to correctly output some hash value(s) based on a variation as a key. That's a guess based on the
 fact that the output depends on the variant.<br>
<br>
Would this be based on some issue with my syntax (which is based on the API tutorial), or with the pm itself? I'm new to perl, so I'm not really able to diagnose the pm.<br>
<br>
Thanks,<br>
Henry Gong<br>
Junior Specialist<br>
UCSF Dept of Neuro Surgery<br>
</div>
</body>
</html>