[ensembl-dev] Deleting DnaAlignFeatures? [SOLVED]
Dan Bolser
dbolser at ebi.ac.uk
Tue May 22 17:40:16 BST 2012
I found that calling "$dafa->remove( $daf )" does the job!
The 'remove' DnaAlignFeatureAdaptor method is inherited from
BaseFeatureAdaptor. I should have spotted it in the docs!
http://goo.gl/b8xG2 (thanks to Kevin Howe for pointing that out).
Cheers,
Dan.
On 16 May 2012 18:34, Dan Bolser <dbolser at ebi.ac.uk> wrote:
> Hi,
>
> How can I use a DnaAlignFeature adaptor and some DnaAlignFeatures
> retrieved from within it to delete those features from the database?
>
> Here is a snippet of code:
>
> $reg->load_registry_from_db(
> ...
> my $dafa = $reg->
> get_adaptor( $species, 'core', 'DnaAlignFeature' );
> ...
> my $dafs = $dafa->fetch_all_by_hit_name( $hit_name );
> my @best = sort { ... } @$dafs
>
> delete_dafs_somhow( @best[1:-1] )
> ...
>
>
>
> Cheers,
> Dan.
More information about the Dev
mailing list