[Bioperl-l] Re: Handling gff3 Target and Dbxref tags through
FeatureIO
Allen Day
allenday at ucla.edu
Wed Oct 20 18:47:41 EDT 2004
Dbxref tags - these can be added to the AnnotationCollection as
Bio::Annotation::DBLink objects. These are already being created, but due
to oversight on my part not attached. The code fragment below illustrates
this. Just add a few lines to add them to the Collection and voila!
#Handle Dbxref attributes
if($attr{Dbxref}){
foreach my $value (@{ $attr{Dbxref} }){
my $a = Bio::Annotation::DBLink->new();
my($db,$accession) = $value =~ /^(.+?):(.+)$/;
if(!$db or !$accession){ #dbxref malformed
$self->throw("Error in line:\n$feature_string\nDbxref value
'$value' did not conform to GFF3 specification");
}
$a->database($db);
$a->primary_id($accession);
}
}
Target tags - Bio::SeqFeature::Annotated needs to be able to have
Bio::LocatableSeq or Bio::Location::Simple attachments. Presumably you
can have multiple targets. Do something like create methods
add_location() and locations() methods.
-Allen
On Wed, 20 Oct 2004, Scott Cain wrote:
> Hi Allen,
>
> I am in fairly urgent need of the ability to handle Target and Dbxref
> tags in GFF3, as I need to add that ability to the chado GFF3 bulk
> loader. Can you give me some guidance on what I need to do?
>
> Thanks,
> Scott
>
>
More information about the Bioperl-l
mailing list