[Bioperl-l] inferring exon features in
SeqFeature::Tools::Unflattener
Cook, Malcolm
MEC at Stowers-Institute.org
Mon Feb 23 14:56:36 EST 2004
Dear Chris and fellow Bioperlers,
I have made the following patch on my local version of this module in
order to provide values for the seq_id and the /locus_tag and /gene tags
of inferred exons.
Please advise if this is in the spirit of the module, and whether this
patch can be incorporated in the live version.
Thanks!
Malcolm Cook
Database Applications Manager, Bioinformatics
Stowers Institute for Medical Research
(816) 926-4449
Index: Unflattener.pm
===================================================================
RCS file:
/home/repository/bioperl/bioperl-live/Bio/SeqFeature/Tools/Unflattener.p
m,v
retrieving revision 1.19
diff -c -r1.19 Unflattener.pm
*** Unflattener.pm 2003/12/16 22:31:16 1.19
--- Unflattener.pm 2004/02/23 19:45:32
***************
*** 2408,2413 ****
--- 2408,2424 ----
-primary_tag=>'exon');
my $locstr = 'exon::'.$self->_locstr($subsf);
+ ## Provide seq_id to new feature:
+ $subsf->seq_id($sf->seq_id);
+ ## Transfer /locus_tag and /gene tag values to inferred
+ ## features. TODO: Perhaps? this should not be done
+ ## indiscriminantly but rather by virtue of the setting
+ ## of group_tag.
+ foreach my $tag (grep /gene|locus_tag/, $sf->get_all_tags) {
+ my @vals = $sf->get_tag_values($tag);
+ $subsf->add_tag_value($tag, @vals);
+ }
+
# re-use feature if type and location the same
if ($loc_h{$locstr}) {
$subsf = $loc_h{$locstr};
More information about the Bioperl-l
mailing list