[BioSQL-l] removing features from a sequence

Amit Indap indapa at gmail.com
Mon Oct 3 13:59:27 EDT 2005


Hi,

I was trying to remove features for sequences stored in my BioSQL
database. Once I run the code snippet below to remove sequence
features, I tested to see if the features really had been removed by
running a script that reterieves seq features from bioentries.
Unfortunately, the features are still there. I'm still learning my
around the Bio::DB API

Here is my code to attempts to remove sequence features:

foreach  (@accs) {

    my $acc = $_;
    my $adp = $dbadp->get_object_adaptor("Bio::SeqI");

    my $seq = Bio::Seq->new(-accession_number => $acc,
			    -namespace => $namespace
			    );


    my $dbseq = $adp->find_by_unique_key($seq);
    warn $acc, "  not found in database $namespace" unless  $dbseq;

    $dbseq->remove_SeqFeatures(); # remove seqfeatures

    $dbseq->commit();
    print LOG "removed all seq features for $acc\n";
}



--
Amit Indap
http://www.bscb.cornell.edu/Homepages/Amit_Indap/



More information about the BioSQL-l mailing list