[ensembl-dev] LRG information with API?

Will McLaren wm2 at ebi.ac.uk
Thu Jun 14 16:52:17 BST 2012


Hello Stef,

You can retrieve LRGs as gene objects using the Ensembl API. They are
mapped to their own coordinate system, with a predefined 5000bp of
"buffer" either side of the gene itself.

To get the mapping to the reference chromosome, you can use the
project method present on all features.

Here's some code that should get you started.

Cheers

Will McLaren
Ensembl Variation

========================

# connect to DB etc...

my $ga = Bio::EnsEMBL::Registry->get_adaptor("human","core","gene");
my $lrg = $ga->fetch_by_stable_id('LRG_1');

# by default the gene is attached to a slice in the LRG coordinate
system with 5000bp "buffer"
# hence seq_region_start comes back as '5001'
print "LRG_1 in LRG coord system:
".$lrg->seq_region_start."-".$lrg->seq_region_end."
(".$lrg->strand.")\n";

# map it to chromosome, returns a listref of projection segments
my $projection = $lrg->project("chromosome");

# if there are no insertions/deletions relative to the reference, this
will return one ProjectionSegment
foreach my $ps(@{$projection}) {
  my $to_slice = $ps->to_Slice;

  print "LRG_1 in chromosome coord system:
".$to_slice->start."-".$to_slice->end." (".$to_slice->strand.")\n";
}

On 14 June 2012 15:45, Stef van Lieshout <mailsvl at fastmail.fm> wrote:
> Is it possible within the API to retrieve LRG mappings/info (as seen in
> "External references" on a gene tab within the ensembl website)?
>
> Thanks,
> Stef
>
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> List admin (including subscribe/unsubscribe): http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/




More information about the Dev mailing list