[Bioperl-l] Handling discontiguous feature locations in Bio::DB::SeqFeature::Store -- proposed patch to Bio::Graphics::FeatureBase

Cook, Malcolm MEC at stowers-institute.org
Thu Apr 26 16:48:45 UTC 2007


Lincoln, et al,

I find that the gff3_string for Bio::DB::SeqFeature objects retreived
from a Bio::DB::SeqFeature::Store that were initially created with
-seqments (i.e. whose location was discontiguous) does not display any
other attributes in column 9 than "Name".

What do you think of the following patch to Bio::Graphics::FeatureBase,
whose effect is to "contrive to return (duplicated) common group values"
(which otherwise get lost when "collapsing" "homogenous" parent/child
features) 

Another approach would be to copy the attributes from the parent to the
children when the -seqments are first created.

Another approach would be to use Bio::SeqFeature::Generic  as the db's
-seqfeature_class and save with -location being a Bio::Location::Split,
but this was wrougth with other problems.

Any other suggestions?  Do you want me to commit this patch?

Cheers,

Malcolm
 
Patch follows:




Index: FeatureBase.pm
===================================================================
RCS file:
/home/repository/bioperl/bioperl-live/Bio/Graphics/FeatureBase.pm,v
retrieving revision 1.29
diff -c -r1.29 FeatureBase.pm
*** FeatureBase.pm	16 Apr 2007 19:55:33 -0000	1.29
--- FeatureBase.pm	26 Apr 2007 16:30:23 -0000
***************
*** 581,587 ****
      foreach (@children) { 
        s/Parent=/ID=/g; 
      } # replace Parent tag with ID
!     return join "\n", at children;
    }
  
    return join("\n",$p, at children);
--- 581,589 ----
      foreach (@children) { 
        s/Parent=/ID=/g; 
      } # replace Parent tag with ID
!     #return join "\n", at children;
!     # Instead of above, additionally, contrive to return (duplicated)
common group values
!     return(join("$group\n", at children) . $group);
    }
  
    return join("\n",$p, at children);




More information about the Bioperl-l mailing list