[ensembl-dev] Projecting features

Michael Paulini mh6 at sanger.ac.uk
Tue Jan 15 14:37:21 GMT 2013


Hi Dan,

have a look in ensembl-pipeline and and ensembl-analyis, there is some
utility code to change some properties of Database objects there (like
killing genes and having it cascade through associated things).

M

On 15/01/13 14:33, Dan Bolser wrote:
> Many thanks Daniel,
>
> Following through this example, I thought I had found my error, namely
> the update method needs to be called on the adaptor, not the feature
> object... Unfortunately, I now get more bugs, but I'll try to resolve
> them.
>
>
> Thanks all,
> Dan.
>
> On 15 January 2013 14:13, Daniel Barrell <db8 at sanger.ac.uk> wrote:
>> Hi Dan,
>>
>> You could look at the transform example in:
>>
>> /ensembl-analysis/scripts/genebuild/copy_genes.pl
>>
>> I've used this script in the past to transfer genes between coordinate
>> systems.
>>
>> Daniel
>>
>>
>>
>> On 15/01/13 13:54, Dan Bolser wrote:
>>> Have you got code examples?
>>>
>>> Currently I may just dump TSV for SQL UPDATE...
>>>
>>>
>>> On 15 January 2013 13:43, Andreas Kusalananda Kähäri<ak4 at sanger.ac.uk>
>>> wrote:
>>>> Hi,
>>>>
>>>> During the gene build process we regularly modify built models in bulk,
>>>> but never using update() AFAIK.  Instead the results of a pipeline step
>>>> is written to a new (empty) database.  The final database that we hand
>>>> over for the release is created by copying data from a few of these
>>>> result databases.  This way it's easy to go back to a previous step and
>>>> rerun from there with modified parameters/code.
>>>>
>>>> Cheers,
>>>> Andreas
>>>>
>>>>
>>>> On Tue, Jan 15, 2013 at 01:03:12PM +0000, Kieron Taylor wrote:
>>>>> 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/
>>>>>
>>>> --
>>>> Andreas Kusalananda Kähäri
>>>> Ensembl Gene Annotation Team
>>>>
>>>> Tap tap tap.
>>>>
>>>> _______________________________________________
>>>> 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/
>>> _______________________________________________
>>> 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/
>>
>>
>> _______________________________________________
>> 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/
> _______________________________________________
> 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/





More information about the Dev mailing list