[ensembl-dev] variation allele population name
Will McLaren
wm2 at ebi.ac.uk
Thu Nov 4 15:59:33 GMT 2010
Hi Will,
The methods look like this:
=head2 fetch_all_HapMap_populations
Example : @populations = @{$pop_adaptor->fetch_all_HapMap_populations();
Description : Gets all populations from the HapMap project (human only!)
ReturnType : listref of Bio::EnsEMBL::Variation::Population objects
Exceptions : none
Caller : general
Status : At Risk
=cut
sub fetch_all_HapMap_Populations{
my $self = shift;
return $self->generic_fetch(qq{ s.name like 'cshl-hapmap%' });
}
=head2 fetch_all_1KG_populations
Example : @populations = @{$pop_adaptor->fetch_all_1KG_populations();
Description : Gets all populations from the 1000 genomes project
(human only!)
ReturnType : listref of Bio::EnsEMBL::Variation::Population objects
Exceptions : none
Caller : general
Status : At Risk
=cut
sub fetch_all_1KG_Populations{
my $self = shift;
return $self->generic_fetch(qq{ s.name like '1000GENOMES%' });
}
So yes for the moment they are hard-coded - though we may also
consider adding some sort of "key population" flag to the sample table
that could be reused for other species.
There is already something similar, in the method
fetch_all_LD_Populations, which uses the sample table's display
column.
Cheers,
Will
On 4 November 2010 15:21, Will Spooner <whs at eaglegenomics.com> wrote:
>
> On 4 Nov 2010, at 15:01, Will McLaren wrote:
>
>> Hello,
>>
>> You can get all the populations via a population adaptor:
>>
>> my $pa = Bio::EnsEMBL::Registry->get_adaptor("human", "variation",
>> "population");
>> my @all_populations = @{$pa->fetch_all()};
>>
>> This will give you a very long list however, as we import all
>> populations from dbSNP and also have additional populations
>> representing tissue types from the COSMIC somatic mutation database.
>>
>> Release 60 of Ensembl (due next week) will include two additional
>> methods that you may find interesting:
>>
>> $pa->fetch_all_1KG_Populations
>> $pa->fetch_all_HapMap_Populations
>>
>> (1KG = 1000 genomes)
>
> Hi Will,
>
> Are you hard-coding human-specific studies into the Ensembl API, or will this be done with some sort of autoloaded method? I can imagine that EnsemblGenomes/Gramene would like something similar for Arabidopsis 1001 genomes and 2010 studies.
>
> Thanks,
>
> Will
>
>
>
>
More information about the Dev
mailing list