[ensembl-dev] Projecting features

Kieron Taylor ktaylor at ebi.ac.uk
Tue Jan 15 13:03:12 GMT 2013


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







More information about the Dev mailing list