.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Bio::SeqFeature::Tools::TypeMapper 3pm" .TH Bio::SeqFeature::Tools::TypeMapper 3pm "2021-08-15" "perl v5.32.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Bio::SeqFeature::Tools::TypeMapper \- maps $seq_feature\->primary_tag .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& use Bio::SeqIO; \& use Bio::SeqFeature::Tools::TypeMapper; \& \& # first fetch a genbank SeqI object \& $seqio = \& Bio::SeqIO\->new(\-file=>\*(AqAE003644.gbk\*(Aq, \& \-format=>\*(AqGenBank\*(Aq); \& $seq = $seqio\->next_seq(); \& \& $tm = Bio::SeqFeature::Tools::TypeMapper\->new; \& \& # map all the types in the sequence \& $tm\->map_types(\-seq=>$seq, \& {CDS=>\*(AqORF\*(Aq, \& variation=>sub { \& my $f = shift; \& $f\->length > 1 ? \& \*(Aqvariation\*(Aq : \*(AqSNP\*(Aq \& }, \& }); \& \& # alternatively, use the hardcoded SO mapping \& $tm\->map_types_to_SO(\-seq=>$seq); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This class implements an object for mapping between types; for example, the types in a genbank feature table, and the types specified in the Sequence Ontology. .PP You can specify your own mapping, either as a simple hash index, or by providing your own subroutines. .SH "FEEDBACK" .IX Header "FEEDBACK" .SS "Mailing Lists" .IX Subsection "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. .PP .Vb 2 \& bioperl\-l@bioperl.org \- General discussion \& http://bioperl.org/wiki/Mailing_lists \- About the mailing lists .Ve .SS "Support" .IX Subsection "Support" Please direct usage questions or support issues to the mailing list: .PP \&\fIbioperl\-l@bioperl.org\fR .PP 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. .SS "Reporting Bugs" .IX Subsection "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: .PP .Vb 1 \& https://github.com/bioperl/bioperl\-live/issues .Ve .SH "AUTHOR \- Chris Mungall" .IX Header "AUTHOR - Chris Mungall" Email: cjm@fruitfly.org .SH "APPENDIX" .IX Header "APPENDIX" The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ .SS "new" .IX Subsection "new" .Vb 6 \& Title : new \& Usage : $unflattener = Bio::SeqFeature::Tools::TypeMapper\->new(); \& Function: constructor \& Example : \& Returns : a new Bio::SeqFeature::Tools::TypeMapper \& Args : see below .Ve .SS "typemap" .IX Subsection "typemap" .Vb 6 \& Title : typemap \& Usage : $obj\->typemap($newval) \& Function: \& Example : \& Returns : value of typemap (a scalar) \& Args : on set, new value (a scalar or undef, optional) .Ve .SS "map_types" .IX Subsection "map_types" .Vb 6 \& Title : map_types \& Usage : \& Function: \& Example : \& Returns : \& Args : \& \& dgg: added \-undefined => "region" option to produce all valid SO mappings. .Ve .SS "map_types_to_SO" .IX Subsection "map_types_to_SO" .Vb 6 \& Title : map_types_to_SO \& Usage : \& Function: \& Example : \& Returns : \& Args : .Ve .PP hardcodes the genbank to \s-1SO\s0 mapping .PP Based on revision 1.22 of \s-1SO\s0 .PP Please see the actual code for the mappings .PP Taken from .PP .PP dgg: separated out FT_SO_map for caller changes. Update with: .PP .Vb 5 \& open(FTSO,"curl \-s http://sequenceontology.org/resources/mapping/FT_SO.txt|"); \& while(){ \& chomp; ($ft,$so,$sid,$ftdef,$sodef)= split"\et"; \& print " \*(Aq$ft\*(Aq => \*(Aq$so\*(Aq,\en" if($ft && $so && $ftdef); \& } .Ve .SS "get_relationship_type_by_parent_child" .IX Subsection "get_relationship_type_by_parent_child" .Vb 9 \& 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(\*(AqmRNA\*(Aq, \*(Aqprotein\*(Aq); \& 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 .Ve .PP 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. .PP 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 \fBpart_of\fR. Although it stretches the bioperl notion of containment, we could have a \s-1CDS\s0 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 \&\fBproduced_by\fR .PP In chado speak, the child is the \fBsubject\fR feature and the parent is the \fBobject\fR feature