[ensembl-dev] Get chromosome gene summaries automatically

mag mr6 at ebi.ac.uk
Thu Oct 2 15:15:28 BST 2014


Hi Fengyuan,

If you are familiar with the perl API, the statistics are stored as 
attributes on the slice.
You can fetch it with the following code:

    my $slice_adaptor = $registry->get_adaptor('human', 'core', 'Slice');
    my $chrom = $slice_adaptor->fetch_by_region('chromosome', '1');
    my $attribs = $chrom->get_all_Attributes();

    foreach my $attrib (@$attribs) {
       print $attrib->name  . ": " . $attrib->value . "\n";
    }


Hope that helps,
Magali

On 02/10/2014 14:43, Fengyuan Hu wrote:
> Dear devs,
>
> Is there a way to get chromosome gene summary information by a script 
> rather than looking at the webpage, e.g. 
> http://www.ensembl.org/Homo_sapiens/Location/Chromosome?r=1:88112229-88576529
>
> Best wishes,
> Fengyuan
>
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> Posting guidelines and subscribe/unsubscribe info: 
> http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20141002/57b8741d/attachment.html>


More information about the Dev mailing list