[ensembl-dev] list of chromosomes in an organism

simon andrews (BI) simon.andrews at bbsrc.ac.uk
Fri Nov 12 14:52:31 GMT 2010


On 12 Nov 2010, at 14:36, Andrea Edwards wrote:

> hi
> 
> how do you get the list of chromosomes in an organism via the perl api?

We use:

my @chr_slices = @{$db_adapter -> get_adaptor('slice') -> fetch_all('chromosome',undef,0,1)};

You can then call $chr_slices[0]->seq_region_name() on each of the chr slices to get the actual name.

Simon.





More information about the Dev mailing list