[ensembl-dev] Projecting features

Daniel Hughes dsth at ebi.ac.uk
Tue Jan 15 13:11:49 GMT 2013


Also be v. careful if doing it for hierarchical features such as genes. as
the order in which you modify elements can cause serious problems! it's
actually fairly easy to do (i've had to do it a number of times) but not
via the API.

dan.




Daniel S. T. Hughes M.Biochem (Hons; Oxford), Ph.D (Cambridge)
-------------------------------------------------------------------------------------
dsth at cantab.net
dsth at cpan.org


2013/1/15 Kieron Taylor <ktaylor at ebi.ac.uk>

> Hi Dan, this is trickier than you might like.
>
> In general, database changes are made in response to ->store() or
> ->update() methods on adaptors. update() calls may not change every aspect
> of the object. I suspect update() will not have the desired effect on all
> Features, but you should investigate this yourself.
>
> The problem with using store is the issue of storing the same Feature
> again, but with new coordinates. This will probably trigger parts of the
> code that prevent the storing of the same Feature twice, or else give you
> two copies with slight differences. You may need to resort to ->remove(),
> and the internal db identifiers will change...
>
> In summary, tread lightly and verify your results before you unleash the
> script.
>
> Kieron
>
> On 15 Jan 2013, at 11:36, Dan Bolser wrote:
>
> > I wrote a script to project features from contigs to chromosomes using
> > the transform method.
> >
> > https://gist.github.com/4537997
> >
> >
> > Once I have the projected feature, I try to update the database by
> > calling (line 73):
> >
> > $ff->slice( $ffp->slice );
> >
> >
> > however, this doesn't update the database with the new feature
> coordinates.
> >
> > Is there a method I need to call to update the feature in the database?
> >
> >
> > Cheers,
> > Dan.
> >
> > _______________________________________________
> > 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/
>
> Kieron Taylor PhD.
> Ensembl Core software developer
>
> EMBL - European Bioinformatics Institute
>
>
>
>
> _______________________________________________
> 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/20130115/17248407/attachment.html>


More information about the Dev mailing list