[ensembl-dev] Deleting DnaAlignFeatures?

Dan Bolser dbolser at ebi.ac.uk
Wed May 16 18:38:18 BST 2012


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] )

Sorry, I meant to say "@best[1..$#best]" obviously ;-)


> ...
>
>
>
> Cheers,
> Dan.




More information about the Dev mailing list