Bio::S...e::Lite(3pm)
NAME β¨
okay so this is the Bio::S...e::Lite(3pm) page from User Contributed Perl Documentation β yes, the manual name is also Bio::S...e::Lite(3pm) because why not π
.
Bio::SeqFeature::Lite β Lightweight Bio::SeqFeatureI class, bestie.
SYNOPSIS π¦
# create a simple feature with no internal structure
$f = Bio::SeqFeature::Lite->new(-start => 1000,
-stop => 2000,
-type => 'transcript',
-name => 'alpha-1 antitrypsin',
-desc => 'an enzyme inhibitor',
);
# create a feature composed of multiple segments, all of type "similarity"
$f = Bio::SeqFeature::Lite->new(-segments => [[1000,1100],[1500,1550],[1800,2000]],
-name => 'ABC-3',
-type => 'gapped_alignment',
-subtype => 'similarity');
# build up a gene exon by exon
$e1 = Bio::SeqFeature::Lite->new(-start=>1,-stop=>100,-type=>'exon');
$e2 = Bio::SeqFeature::Lite->new(-start=>150,-stop=>200,-type=>'exon');
$e3 = Bio::SeqFeature::Lite->new(-start=>300,-stop=>500,-type=>'exon');
$f = Bio::SeqFeature::Lite->new(-segments=>[$e1,$e2,$e3],-type=>'gene');
DESCRIPTION π
This is a simple Bio::SeqFeatureI-compliant object that is compatible with Bio::Graphics::Panel. With it you can create lightweight feature objects for drawing. No cap, it's giving "tiny but mighty" β¨.
All methods are as described in Bio::SeqFeatureI with the following additions:
The new() Constructor π
$feature = Bio::SeqFeature::Lite->new(@args);
This method creates a new feature object. You can create a simple feature that contains no subfeatures, or a hierarchically nested object.
Arguments are as follows:
-seq_idβ the reference sequence-startβ the start position of the feature-endβ the stop position of the feature-stopβ an alias forend-nameβ the feature name (returned byseqname())-typeβ the feature type (returned byprimary_tag())-primary_tagβ the same as-type-sourceβ the source tag-scoreβ the feature score (for GFF compatibility)-descβ a description of the feature-segmentsβ a list of subfeatures (see below)-subtypeβ the type to use when creating subfeatures-strandβ the strand of the feature (one of-1,0or+1)-phaseβ the phase of the feature (0..2)-seqβ a dna or protein sequence string to attach to feature-idβ an alias for-name-seqnameβ an alias for-name-display_idβ an alias for-name-display_nameβ an alias for-name(do you get the idea the API has changed?)-primary_idβ unique database ID-urlβ a URL to link to when rendered withBio::Graphics-attributesβ a hashref of tag value attributes, in which the key is the tag and the value is an array reference of values-factoryβ a reference to a feature factory, used for compatibility with more obscure parts ofBio::DB::GFF
The subfeatures passed in -segments may be an array of Bio::SeqFeature::Lite objects, or an array of [$start,$stop] pairs. Each pair should be a two-element array reference. In the latter case, the feature type passed in -subtype will be used when creating the subfeatures.
If no feature type is passed, then it defaults to "feature".
Non-SeqFeatureI methods π§
A number of new methods are provided for compatibility with Ace::Sequence, which has a slightly different API from SeqFeatureI:
url()β Get/set the URL that the graphical rendering of this feature will link to.add_segment(@segments)β Add one or more segments (a subfeature). Segments can either be Feature objects, or[start,stop]arrays, as in the-segmentsargument tonew(). The feature endpoints are automatically adjusted.segments()β An alias forsub_SeqFeature().get_SeqFeatures()β Alias forsub_SeqFeature()get_all_SeqFeatures()β Alias forsub_SeqFeature()merged_segments()β Another alias forsub_SeqFeature().stop()β An alias forend().name()β An alias forseqname().exons()β An alias forsub_SeqFeature()(you don't want to know why!)
display_name π
Title: display_name
Usage: $id = $obj->display_name or $obj->display_name($newid);
Function: Gets or sets the display id, also known as the common name of the Seq object.
The semantics of this is that it is the most likely string to be used as an identifier of the sequence, and likely to have "human" readability. The id is equivalent to the LOCUS field of the GenBank/EMBL databanks and the ID field of the Swissprot/sptrembl database. In fasta format, the >(\S+) is presumed to be the id, though some people overload the id to embed other information. Bioperl does not use any embedded information in the ID field, and people are encouraged to use other mechanisms (accession field for example, or extending the sequence object) to solve this.
Notice that $seq->id() maps to this function, mainly for legacy/convenience issues.
Returns: A string
Args: None or a new id
accession_number πΈ
Title: accession_number
Usage: $unique_biological_key = $obj->accession_number;
Function: Returns the unique biological id for a sequence, commonly called the accession_number. For sequences from established databases, the implementors should try to use the correct accession number. Notice that primary_id() provides the unique id for the implementation, allowing multiple objects to have the same accession number in a particular implementation.
For sequences with no accession number, this method should return "unknown".
Returns: A string
Args: None
alphabet π
Title: alphabet
Usage: if( $obj->alphabet eq 'dna' ) { /Do Something/ }
Function: Returns the type of sequence being one of 'dna', 'rna' or 'protein'. This is case sensitive.
This is not called <type> because this would cause upgrade problems from the 0.5 and earlier Seq objects.
Returns: a string either 'dna','rna','protein'. NB - the object must make a call of the type - if there is no type specified it has to guess.
Args: none
Status: Virtual
desc β¨
Title: desc
Usage: $seqobj->desc($string) or $seqobj->desc()
Function: Sets or gets the description of the sequence
Example: (it's literally blank, iconic π)
Returns: The description
Args: The description or none
location π¦
Title: location
Usage: my $location = $seqfeature->location()
Function: returns a location object suitable for identifying location of feature on sequence or parent feature
Returns: Bio::LocationI object
Args: none
location_string π
Title: location_string
Usage: my $string = $seqfeature->location_string()
Function: Returns a location string in a format recognized by gbrowse
Returns: a string
Args: none
This is a convenience function used by the generic genome browser. It returns the location of the feature and its subfeatures in the compact form "start1..end1,start2..end2,...". Use $seqfeature->location()->toFTString() to obtain a standard GenBank/EMBL location representation.
clone π§
Title: clone
Usage: my $feature = $seqfeature->clone
Function: Create a deep copy of the feature
Returns: A copy of the feature
Args: none
refseq π
Title: refseq
Usage: $ref = $s->refseq([$newseq] [,$newseqclass])
Function: get/set reference sequence
Returns: current reference sequence
Args: new reference sequence and class (optional)
Status: Public
This method will get or set the reference sequence. Called with no arguments, it returns the current reference sequence. Called with any Bio::SeqFeatureI object that provides the seq_id(), start(), end() and strand() methods.
The method will generate an exception if you attempt to set the reference sequence to a sequence that has a different seq_id from the current feature.
SEE ALSO π
Bio::Graphics::Feature
AUTHOR π
Lincoln Stein <lstein@cshl.edu>.
Copyright (c) 2006 Cold Spring Harbor Laboratory
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See DISCLAIMER.txt for disclaimers of warranty.
k bye bestie, this was perl v5.32.1 on 2021-08-15, from Bio::S...e::Lite(3pm) πβ¨
π¦ 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