[ensembl-dev] Variation set: fetch_all_by_Variation() outputting hash values

Gong, Henry Henry.Gong at ucsf.edu
Tue Jul 22 23:42:09 BST 2014

Hi Anja,

It looks like I had assumed that simply calling VariationSet would produce a name, similar to
my @vstates = @{$tva->variation_feature->get_all_validation_states()};
        "\t",join(",", @vstates); #evidence
Though I see now that an evidence value is qualitatively different from a variation set.
I don't intend on calling all the variations per set; my application is only looking at potentially hundreds (per transcript or per gene), but I'll consider using iterators to save a little memory.

I added your suggestion as
    foreach my $tva(@{$tvas}) {
        my @vsets = @{$vs_adaptor->fetch_all_by_Variation($tva->variation_feature->variation)};
        print $tva->variation_feature->display_id, "\t";
        foreach my $vs(@vsets) {
            my $set_name = $vs->name();
            print $set_name,",";
        print "\n";
and it does indeed work!

Henry Gong
Junior Specialist
UCSF Dept of Neuro Surgery
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20140722/677c68d3/attachment.html>

More information about the Dev mailing list