Bio::S...Mapper(3pm)
πΈ NAME πΈ
Bio::SeqFeature::Tools::TypeMapper β bestie, it maps $seq_feature->primary_tag. That's it, that's the whole job. And yes, this is the Bio::S...Mapper(3pm) page from the User Contributed Perl Documentation, in case you were wondering where you wandered into. π
β¨ SYNOPSIS β¨
okay so here's the vibe, straight up:
use Bio::SeqIO;
use Bio::SeqFeature::Tools::TypeMapper;
# first fetch a genbank SeqI object
$seqio =
Bio::SeqIO->new(-file=>'AE003644.gbk',
-format=>'GenBank');
$seq = $seqio->next_seq();
$tm = Bio::SeqFeature::Tools::TypeMapper->new;
# map all the types in the sequence
$tm->map_types(-seq=>$seq,
{CDS=>'ORF',
variation=>sub {
my $f = shift;
$f->length > 1 ?
'variation' : 'SNP'
},
});
# alternatively, use the hardcoded SO mapping
$tm->map_types_to_SO(-seq=>$seq);
literally iconic behavior: you can hand it a plain hash or a coderef and it just goes with it. π¦
π DESCRIPTION π
So this class is an object whose whole personality is mapping between types β like, say, the types hanging out in a genbank feature table, and the types specified over in the Sequence Ontology. Glow-up for your feature types. β¨
And you get to specify your own mapping, either as a simple hash index, or by providing your own subroutines. Your call, main character. π
π 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, fr fr. π«Ά
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 reponsive 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.
ngl, that's just good manners. give the experts the whole picture and they will eat. π
π 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@fruitfly.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::TypeMapper->new();
Function: constructor
Example :
Returns : a new Bio::SeqFeature::Tools::TypeMapper
Args : see below
π§ typemap
Title : typemap
Usage : $obj->typemap($newval)
Function:
Example :
Returns : value of typemap (a scalar)
Args : on set, new value (a scalar or undef, optional)
π§ map_types
Title : map_types
Usage :
Function:
Example :
Returns :
Args :
dgg: added -undefined => "region" option to produce all valid SO mappings.
π§ map_types_to_SO
Title : map_types_to_SO
Usage :
Function:
Example :
Returns :
Args :
hardcodes the genbank to SO mapping
Based on revision 1.22 of SO
Please see the actual code for the mappings
Taken from
<http://sequenceontology.org/resources/mapping/FT_SO.txt>
dgg: separated out FT_SO_map for caller changes. Update with:
open(FTSO,"curl -s http://sequenceontology.org/resources/mapping/FT_SO.txt|");
while(<FTSO>){
chomp; ($ft,$so,$sid,$ftdef,$sodef)= split"\t";
print " '$ft' => '$so',\n" if($ft && $so && $ftdef);
}
π§ get_relationship_type_by_parent_child
Title : get_relationship_type_by_parent_child
Usage : $type = $tm->get_relationship_type_by_parent_child($parent_sf, $child_sf);
Usage : $type = $tm->get_relationship_type_by_parent_child('mRNA', 'protein');
Function: given two features where the parent contains the child,
will determine what the relationship between them in
Example :
Returns :
Args : parent SeqFeature, child SeqFeature OR
parent type string, child type string OR
bioperl Seq::FeatureHolderI hierarchies are equivalent to unlabeled graphs (where parent nodes are the containers, and child nodes are the features being contained). For example, a feature of type mRNA can contain features of type exon.
Some external representations (eg chadoxml or chaosxml) require that the edges in the feature relationship graph are labeled. For example, the type between mRNA and exon would be part_of. Although it stretches the bioperl notion of containment, we could have a CDS contained by an mRNA (for example, the Bio::SeqFeature::Tools::Unflattener module takes genbank records and makes these kind of links. The relationship here would be produced_by
In chado speak, the child is the subject feature and the parent is the object feature
and that's the whole page, bestie!! this one is perl v5.32.1, dated 2021-08-15, and it lives at Bio::S...Mapper(3pm) π mwah, go map some types, you absolute legend πβ¨π¦
π¦ 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