gravatar for francisco.abad

2 hours ago by

Hi community,

I am trying to retrieve the highest population MAF value for a variant in Ensembl by using the Perl API. Although I see this value on the web browser (see figure), I am not able to retrieve it from the Perl API.
Ensembl screenshot

After some research about how this data is accessed from the web site, I have developed the following function, which receives a TranscriptVariation object and is part of a larger script:

sub get_highest_population_maf {
    my $tv = shift;
    my $transcript = $tv->transcript;
    my $vf = $tv->variation_feature;
    my $max_alleles = $vf->get_all_highest_frequency_minor_Alleles;
    my $highest_population_maf = undef;
    if($max_alleles && @$max_alleles) {
        $highest_population_maf = $max_alleles->[0]->frequency;
    return $highest_population_maf;

The idea is to obtain the highest population MAF value that you can see in the web portal, however, the line $vf->get_all_highest_frequency_minor_Alleles always return an empty list although this value is visible on the web.

I am using the goat specie, and I am initializing the database adapters as follows:

# Registry configuration
my $registry = 'Bio::EnsEMBL::Registry';
    -host => '',
    -user => 'anonymous',

my $taxonomic_code = "capra_hircus";
my $transcript_adaptor = $registry->get_adaptor( $taxonomic_code, 'core', 'transcript' );
my $slice_adaptor = $registry->get_adaptor( $taxonomic_code, 'Core', 'Slice' );
my $trv_adaptor = $registry->get_adaptor( $taxonomic_code, 'variation', 'transcriptvariation' );
my $vf_adaptor = $registry->get_adaptor( $taxonomic_code, 'variation', 'variationfeature' );

Anybody see something wrong in my approach?

Thanks in advance.
Best wishes,
Francisco Abad.

Source link