Bio::Gonzales::Feat - a sequence feature
Bio::Gonzales::Feat->new( seq_id => 'chr01', source => 'glimmerhmm', type => 'exon', start => 324, end => 6342, strand => -1, attributes => { ID => [ 'exon01' ], Parent => [ 'gene01', 'gene02' ] }, );
Represents a sequence feature. The field attributes is not required to create an object of class Bio::Gonzales::Feat. This class is based on the Sequence Ontology GFF3 specification
attributes
Gets and sets the source attribute of the feature.
Gets and sets the type attribute of the feature.
Get or set the start coord of the feature.
The same syntax as $f-start>, only for the end coordianate.
$f-
Set or get the strand. The strand can be -1 (minus strand), 0 (strand unknown) or 1 (plus strand).
Gets or sets the phase.
Gets or sets the score.
Get or set the attributes of the feature. Structure:
{ ID => [ 'id01' ], Parent => [ 'parent1', 'parent2', ... ] ... }
Gives access to a general container for subfeature objects. Makes grouping easier, e.g. for BED output format. An example would be an 'mRNA'-object that has several exons as subfeatures.
The same as $f-subfeats>, only with parent relation. This function is completely unrelated to the $f-parent_id> function. $f-parent_id> only accesses the attributes, not the parentfeature container.
This is a synonym for $f-seq_id>.
The functions attr_first and first_attr retrieve the value of the first element of the given attribute. An example would be
attr_first
first_attr
my $id = $f->attr_first("ID"); # in case of multiple parents only the first entry/parent will be returned. my $parent = $f->attr_first("Parent");
Retrieve the value of the "ID" attribute. If a feature has multiple ids, a warning will be printed. Effectively a shortcut for $f-attributes->{ID}[0]>.
A shortcut for $f-attributes->{ID}>. Returns a list of IDs in list context, a reference to the ID list in scalar context.
A shortcut for $f-attributes->{Parent}>. Returns a list of parent IDs in list context, a reference to the parent ID list in scalar context.
A shortcut for $f-attributes->{Parent}[0]>. Gives a warning if multiple parent ids are present.
To add an attribute, call add_attr with either a hash of the form
add_attr
%attributes = ( ID => "mrna_01", Parent => "gene_01" );
or
%attributes = ( ID => "exon_01", Parent => [ "gene_01", "gene_02" ], );
Deletes all attributes in @attribute_names.
@attribute_names
Convert between numeric and character strand respresentation.
Clone the feature, deeply (incl. subfeatures and parentfeatures).
The length (end -start +1)
jw bargsten, <joachim.bargsten at wur.nl>
<joachim.bargsten at wur.nl>
To install Bio::Gonzales, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bio::Gonzales
CPAN shell
perl -MCPAN -e shell install Bio::Gonzales
For more information on module installation, please visit the detailed CPAN module installation guide.