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.<br>

<br>dan.<br><br><br><br clear="all"><div><br clear="all"><div>Daniel S. T. Hughes M.Biochem (Hons; Oxford), Ph.D (Cambridge)<br>-------------------------------------------------------------------------------------<br><a href="mailto:dsth@cantab.net">dsth@cantab.net</a><br>

<a href="mailto:dsth@cpan.org">dsth@cpan.org</a></div>
</div>
<br><br><div class="gmail_quote">2013/1/15 Kieron Taylor <span dir="ltr"><<a href="mailto:ktaylor@ebi.ac.uk" target="_blank">ktaylor@ebi.ac.uk</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi Dan, this is trickier than you might like.<br>
<br>
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.<br>


<br>
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...<br>


<br>
In summary, tread lightly and verify your results before you unleash the script.<br>
<br>
Kieron<br>
<div><div class="h5"><br>
On 15 Jan 2013, at 11:36, Dan Bolser wrote:<br>
<br>
> I wrote a script to project features from contigs to chromosomes using<br>
> the transform method.<br>
><br>
> <a href="https://gist.github.com/4537997" target="_blank">https://gist.github.com/4537997</a><br>
><br>
><br>
> Once I have the projected feature, I try to update the database by<br>
> calling (line 73):<br>
><br>
> $ff->slice( $ffp->slice );<br>
><br>
><br>
> however, this doesn't update the database with the new feature coordinates.<br>
><br>
> Is there a method I need to call to update the feature in the database?<br>
><br>
><br>
> Cheers,<br>
> Dan.<br>
><br>
> _______________________________________________<br>
> Dev mailing list    <a href="mailto:Dev@ensembl.org">Dev@ensembl.org</a><br>
> Posting guidelines and subscribe/unsubscribe info: <a href="http://lists.ensembl.org/mailman/listinfo/dev" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
> Ensembl Blog: <a href="http://www.ensembl.info/" target="_blank">http://www.ensembl.info/</a><br>
<br>
</div></div>Kieron Taylor PhD.<br>
Ensembl Core software developer<br>
<br>
EMBL - European Bioinformatics Institute<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
_______________________________________________<br>
Dev mailing list    <a href="mailto:Dev@ensembl.org">Dev@ensembl.org</a><br>
Posting guidelines and subscribe/unsubscribe info: <a href="http://lists.ensembl.org/mailman/listinfo/dev" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
Ensembl Blog: <a href="http://www.ensembl.info/" target="_blank">http://www.ensembl.info/</a><br>
<br>
</div></div></blockquote></div><br>