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

Lincoln Stein lstein at cshl.edu
Fri Apr 27 17:44:59 UTC 2007


Hi Malcom,

This is absolutely ok and you can go ahead and commit. Thanks for figuring
this out!

Lincoln

On 4/26/07, Cook, Malcolm <MEC at stowers-institute.org> wrote:
>
> 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);
>



-- 
Lincoln D. Stein
Cold Spring Harbor Laboratory
1 Bungtown Road
Cold Spring Harbor, NY 11724
(516) 367-8380 (voice)
(516) 367-8389 (fax)
FOR URGENT MESSAGES & SCHEDULING,
PLEASE CONTACT MY ASSISTANT,
SANDRA MICHELSEN, AT michelse at cshl.edu



More information about the Bioperl-l mailing list