[Bioperl-guts-l] [15008] bioperl-live/trunk: Fixes for the change to Bio::Annotation:: Comment that removed double quote overloading
Scott Cain
scain at dev.open-bio.org
Fri Nov 21 16:33:42 EST 2008
Revision: 15008
Author: scain
Date: 2008-11-21 16:33:42 -0500 (Fri, 21 Nov 2008)
Log Message:
-----------
Fixes for the change to Bio::Annotation::Comment that removed double quote overloading
Modified Paths:
--------------
bioperl-live/trunk/Bio/Tools/GFF.pm
bioperl-live/trunk/scripts/Bio-DB-GFF/genbank2gff3.PLS
Modified: bioperl-live/trunk/Bio/Tools/GFF.pm
===================================================================
--- bioperl-live/trunk/Bio/Tools/GFF.pm 2008-11-21 16:36:46 UTC (rev 15007)
+++ bioperl-live/trunk/Bio/Tools/GFF.pm 2008-11-21 21:33:42 UTC (rev 15008)
@@ -1035,6 +1035,9 @@
for my $value ( $feat->each_tag_value($tag) ) {
if( defined $value && length($value) ) {
#$value =~ tr/ /+/; #spaces are allowed now
+ if ( ref $value eq 'Bio::Annotation::Comment') {
+ $value = $value->text;
+ }
if ($value =~ /[^a-zA-Z0-9\,\;\=\.:\%\^\*\$\@\!\+\_\?\-]/) {
$value =~ s/\t/\\t/g; # substitute tab and newline
Modified: bioperl-live/trunk/scripts/Bio-DB-GFF/genbank2gff3.PLS
===================================================================
--- bioperl-live/trunk/scripts/Bio-DB-GFF/genbank2gff3.PLS 2008-11-21 16:36:46 UTC (rev 15007)
+++ bioperl-live/trunk/scripts/Bio-DB-GFF/genbank2gff3.PLS 2008-11-21 21:33:42 UTC (rev 15008)
@@ -670,7 +670,9 @@
'dblink' => 'Dbxref',
'product' => 'product',
'Reference' => 'reference',
- 'OntologyTerm' => 'Ontology_term', # stupid Cc_
+ 'OntologyTerm' => 'Ontology_term',
+ 'comment' => 'Note',
+ 'comment1' => 'Note',
# various map-type locations
# gene accession tag is named per source db !??
# 'Index terms' => keywords ??
@@ -696,7 +698,11 @@
foreach my $atag (sort keys %AnnotTagMap) {
my $gtag= $AnnotTagMap{$atag}; next unless($gtag);
- my @anno = map{ split( /[,;] */, "$_") if($_); } $seq->annotation->get_Annotations($atag);
+ my @anno = map{
+ ref $_
+ ? split( /[,;] */, $_->value)
+ : split( /[,;] */, "$_") if($_);
+ } $seq->annotation->get_Annotations($atag);
foreach(@anno) { $sf->add_tag_value( $gtag => $_ ); }
}
More information about the Bioperl-guts-l
mailing list