Bio::SeqFeature::Tools::TypeMapper - maps $seq_feature->primary_tag
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);
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.
You can specify your own mapping, either as a simple hash index, or by providing your own subroutines.
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.
bioperl-l@bioperl.org - General discussion http://bio.perl.org/MailList.html - About the mailing lists
report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via email or the web:
bioperl-bugs@bio.perl.org http://bugzilla.bioperl.org/
Email: cjm@fruitfly.org
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
Title : new Usage : $unflattener = Bio::SeqFeature::Tools::TypeMapper->new(); Function: constructor Example : Returns : a new Bio::SeqFeature::Tools::TypeMapper Args : see below
Title : typemap Usage : $obj->typemap($newval) Function: Example : Returns : value of typemap (a scalar) Args : on set, new value (a scalar or undef, optional)
Title : map_types Usage : Function: Example : Returns : Args :
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
!!!NOT COMPLETE!!!
To install Bio::Seq, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bio::Seq
CPAN shell
perl -MCPAN -e shell install Bio::Seq
For more information on module installation, please visit the detailed CPAN module installation guide.