Bio::S...eNamer(3pm)
β¨ Bio::S...eNamer(3pm) β aka Bio::SeqFeature::Tools::FeatureNamer β¨
okay bestie, welcome to the perl docs, manual section 3pm π this one's a Bioperl module and it's lowkey iconic.
πΈ NAME πΈ
Bio::SeqFeature::Tools::FeatureNamer β generates unique persistent names for features. periodt.
π¦ SYNOPSIS π¦
use Bio::SeqIO;
use Bio::SeqFeature::Tools::FeatureNamer;
# first fetch a genbank SeqI object
$seqio =
Bio::SeqIO->new(-file=>'AE003644.gbk',
-format=>'GenBank');
$seq = $seqio->next_seq();
$namer = Bio::SeqFeature::Tools::FeatureNamer->new;
my @features = $seq->get_SeqFeatures;
foreach my $feature (@features) {
$namer->name_feature($feature) unless $feature->display_name;
}
like. look at her go π«Ά
π DESCRIPTION π
So this is a little helper class whose whole job is providing names for SeqFeatures. it's giving sidekick energy and honestly? we love her for it.
The Bio::SeqFeatureI class hands you a display_name method, right? but the thing is β typically the display_name is not set when you're parsing formats such as genbank π instead, properties like label, product or gene get set, and they get set in a somewhat inconsistent manner. it's a mess. it's not her fault. it's the format's fault.
Plus β and this is the part that really matters β when you're generating subfeatures (think: exons that are subfeatures of a transcript feature), it's often desirable to name these subfeatures before you either export to another format or report back to the user. nobody wants an anonymous exon, fr fr.
So the whole point of this module: help give uniform display_names to features and their subfeatures. slay.
π TODO π
ngl, currently the naming policy is hardcoded. π
It may be desirable to allow plugging in variations on naming policies; this could be done either by:
- subclassing,
- anonymous subroutines (closures), or
- parameterization.
Contact the author if you feel you have need for a different naming policy. she's listening π
π FEEDBACK π
π Mailing Lists π
User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing lists. Your participation is much appreciated, bestie, no cap.
bioperl-l@bioperl.org - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
π«Ά Support π«Ά
Please direct usage questions or support issues to the mailing list:
bioperl-l@bioperl.org
rather than to the module maintainer directly. Many experienced and responsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible β the more deets the better, iykyk.
π Reporting Bugs π
report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web:
https://github.com/bioperl/bioperl-live/issues
π AUTHOR - Chris Mungall π
Email: cjm AT fruitfly DOT org
π§ APPENDIX π§
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _.
β new β
- Title:
new - Usage:
$unflattener = Bio::SeqFeature::Tools::FeatureNamer->new(); - Function: constructor
- Example:
- Returns: a new
Bio::SeqFeature::Tools::FeatureNamer - Args: see below
β name_feature β
- Title:
name_feature - Usage:
$namer->name_feature($sf); - Function: sets
display_name - Example:
- Returns:
- Args:
L<Bio::SeqFeatureI>
This method calls generate_feature_name() and uses the returned value to set the display_name of the feature. cute, simple, effective π
β name_contained_features β
- Title:
name_contained_features - Usage:
$namer->name_contained_features($sf); - Function: sets
display_namefor all features contained bysf - Example:
- Returns:
- Args:
L<Bio::SeqFeatureI>
iterates through all subfeatures of a certain feature (using get_all_SeqFeatures) and names each subfeatures, based on the generated name for the holder feature π¦
A subfeature is named by concatenating the generated name of the container feature with the type and a number.
For example, if the containing feature is a gene with display name dpp, subfeatures will be named dpp-mRNA-1 dpp-mRNA2 dpp-exon1 dpp-exon2 etc.
(not me noticing the original says dpp-mRNA-1 then dpp-mRNA2 β we keep it exactly as written bestie, facts are facts β¨)
β generate_feature_name β
- Title:
generate_feature_name - Usage:
$name = $namer->generate_feature_name($sf); - Function: derives a sensible human readable name for a
$sf - Example:
- Returns:
str - Args:
L<Bio::SeqFeatureI>
returns a generated name (but does not actually set display_name). it's giving "i'll tell you the name but i won't commit to it" π
If display_name is already set, the method will return this.
Otherwise, the name will depend on the property, in this exact priority order:
labelproductgenelocus_tag
(in order of priority) π
okay so that's the whole page, every flag, every method, every example β nothing skipped, nothing invented. main character documentation energy only.
and that's a wrap, bestie π this was perl v5.32.1, dated 2021-08-15, and it's filed under Bio::S...eNamer(3pm). go name some features. you got this. πβ¨π¦
π¦ where this page comes from
- debian bookworm: libbio-perl-perl 1.7.8-1 Β· Perl
- debian trixie: libbio-perl-perl 1.7.8-1 Β· Perl
- ubuntu jammy: libbio-perl-perl 1.7.8-1 Β· Perl
- ubuntu noble: libbio-perl-perl 1.7.8-1 Β· Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms