`get_feature_by_name` not working after migrating to Bio::DB::SeqFeature::Store from a Bio::DB::GFF backend
Vivek Krishnakumar <vivekkrishnakumar <at> gmail.com>
2012-01-30 20:34:45 GMT
Hello,
I have the following code snippet which is supposed to retrieve a certain
gene "locus" feature from the backend database and use that to get the
'start' and 'end' coordinate of the feature based on the 'strand' on which
it is present.
my ($locus_obj, $gene_models) = get_annotation_db_features($locus,
$gff_dbh);
sub get_annotation_db_features {
my ($locus, $gff_dbh) = @_;
my ($locus_obj) = $gff_dbh->get_feature_by_name('Gene' => '$locus');
my ($end5, $end3) = $locus_obj->strand == 1
? ($locus_obj->start, $locus_obj->end)
: ($locus_obj->end, $locus_obj->start);
my $segment = $gff_dbh->segment($locus_obj->refseq, $end5, $end3);
my @gene_models =
$segment->features('processed_transcript:working_models', -attributes
=> { 'Gene' => $locus });
#will have to sort the gene models
return ($locus_obj, \@gene_models);
}
Also, here is a snippet of the GFF3 file that is used to populate the
backend database:
(Continue reading)