.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" 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 .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Bio::Graphics::Feature 3pm" .TH Bio::Graphics::Feature 3pm "2019-11-25" "perl v5.30.0" "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::Graphics::Feature \- A simple feature object for use with Bio::Graphics::Panel .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Bio::Graphics::Feature; \& \& # create a simple feature with no internal structure \& $f = Bio::Graphics::Feature\->new(\-start => 1000, \& \-stop => 2000, \& \-type => \*(Aqtranscript\*(Aq, \& \-name => \*(Aqalpha\-1 antitrypsin\*(Aq, \& \-desc => \*(Aqan enzyme inhibitor\*(Aq, \& ); \& \& # create a feature composed of multiple segments, all of type "similarity" \& $f = Bio::Graphics::Feature\->new(\-segments => [[1000,1100],[1500,1550],[1800,2000]], \& \-name => \*(AqABC\-3\*(Aq, \& \-type => \*(Aqgapped_alignment\*(Aq, \& \-subtype => \*(Aqsimilarity\*(Aq); \& \& # build up a gene exon by exon \& $e1 = Bio::Graphics::Feature\->new(\-start=>1,\-stop=>100,\-type=>\*(Aqexon\*(Aq); \& $e2 = Bio::Graphics::Feature\->new(\-start=>150,\-stop=>200,\-type=>\*(Aqexon\*(Aq); \& $e3 = Bio::Graphics::Feature\->new(\-start=>300,\-stop=>500,\-type=>\*(Aqexon\*(Aq); \& $f = Bio::Graphics::Feature\->new(\-segments=>[$e1,$e2,$e3],\-type=>\*(Aqgene\*(Aq); .Ve .SH "DESCRIPTION" .IX Header "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. .PP All methods are as described in Bio::SeqFeatureI with the following additions: .SS "The \fBnew()\fP Constructor" .IX Subsection "The new() Constructor" .Vb 1 \& $feature = Bio::Graphics::Feature\->new(@args); .Ve .PP This method creates a new feature object. You can create a simple feature that contains no subfeatures, or a hierarchically nested object. .PP Arguments are as follows: .PP .Vb 10 \& \-seq_id the reference sequence \& \-start the start position of the feature \& \-end the stop position of the feature \& \-stop an alias for end \& \-name the feature name (returned by seqname()) \& \-type the feature type (returned by primary_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, 0 or +1) \& \-phase the phase of the feature (0..2) \& \-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 with Bio::Graphics \& \-configurator an object (like a Bio::Graphics::FeatureFile) that knows how \& to configure the graphical representation of the object based \& on its type. \& \-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 of Bio::DB::GFF .Ve .PP The subfeatures passed in \-segments may be an array of Bio::Graphics::Feature 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. .PP If no feature type is passed, then it defaults to \*(L"feature\*(R". .SS "Non-SeqFeatureI methods" .IX Subsection "Non-SeqFeatureI methods" A number of new methods are provided for compatibility with Ace::Sequence, which has a slightly different \s-1API\s0 from SeqFeatureI: .IP "\fBattributes()\fR" 4 .IX Item "attributes()" An alternative interface to get_tag_values. Pass the name of an attribute to get the value(s) of that attribute: .Sp .Vb 1 \& $expression_level = $gene\->attributes(\*(Aqexpression\*(Aq); .Ve .Sp Call \fBattributes()\fR without any arguments to get a hash of all attributes: .Sp .Vb 1 \& %attributes = $gene\->attributes; .Ve .IP "\fBurl()\fR" 4 .IX Item "url()" Get/set the \s-1URL\s0 that the graphical rendering of this feature will link to. .IP "add_segment(@segments)" 4 .IX Item "add_segment(@segments)" Add one or more segments (a subfeature). Segments can either be Feature objects, or [start,stop] arrays, as in the \-segments argument to \fBnew()\fR. The feature endpoints are automatically adjusted. .ie n .IP "my @features = get_SeqFeatures('type1','type2','type3'...)" 4 .el .IP "my \f(CW@features\fR = get_SeqFeatures('type1','type2','type3'...)" 4 .IX Item "my @features = get_SeqFeatures('type1','type2','type3'...)" Get the subfeatures of this feature. If an optional list of types is provided, then only returns subfeatures with the indicated primary_tag. (This is an extension of the Bio::SeqFeatureI interface). .ie n .IP "$feature\->add_hit($hit)" 4 .el .IP "\f(CW$feature\fR\->add_hit($hit)" 4 .IX Item "$feature->add_hit($hit)" For nucleotide alignments, add a feature that is a \*(L"hit\*(R" on the feature. .ie n .IP "$hit = $feature\->hit" 4 .el .IP "\f(CW$hit\fR = \f(CW$feature\fR\->hit" 4 .IX Item "$hit = $feature->hit" Return the hit. .IP "\fBsegments()\fR" 4 .IX Item "segments()" An alias for \fBget_SeqFeatures()\fR. .IP "\fBget_all_SeqFeatures()\fR" 4 .IX Item "get_all_SeqFeatures()" Alias for \fBget_SeqFeatures()\fR .IP "\fBmerged_segments()\fR" 4 .IX Item "merged_segments()" Another alias for \fBsub_SeqFeature()\fR. .IP "\fBstop()\fR" 4 .IX Item "stop()" An alias for \fBend()\fR. .IP "\fBname()\fR" 4 .IX Item "name()" An alias for \fBseqname()\fR. .IP "\fBexons()\fR" 4 .IX Item "exons()" An alias for \fBsub_SeqFeature()\fR (you don't want to know why!) .IP "\fBconfigurator()\fR" 4 .IX Item "configurator()" Get/set the configurator that knows how to adjust the graphical representation of this feature based on its type. Currently the only configurator that will work is Bio::Graphics::FeatureFile. .SS "factory" .IX Subsection "factory" .Vb 6 \& Title : factory \& Usage : $factory = $obj\->factory([$new_factory]) \& Function: Returns the feature factory from which this feature was generated. \& Mostly for compatibility with weird dependencies in gbrowse. \& Returns : A feature factory \& Args : None .Ve .SS "display_name" .IX Subsection "display_name" .Vb 4 \& 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 >(\eS+) 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 .Ve .SS "accession_number" .IX Subsection "accession_number" .Vb 8 \& 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 .Ve .SS "alphabet" .IX Subsection "alphabet" .Vb 4 \& Title : alphabet \& Usage : if( $obj\->alphabet eq \*(Aqdna\*(Aq ) { /Do Something/ } \& Function: Returns the type of sequence being one of \& \*(Aqdna\*(Aq, \*(Aqrna\*(Aq or \*(Aqprotein\*(Aq. This is case sensitive. \& \& This is not called because this would cause \& upgrade problems from the 0.5 and earlier Seq objects. \& \& Returns : a string either \*(Aqdna\*(Aq,\*(Aqrna\*(Aq,\*(Aqprotein\*(Aq. NB \- the object must \& make a call of the type \- if there is no type specified it \& has to guess. \& Args : none \& Status : Virtual .Ve .SS "desc" .IX Subsection "desc" .Vb 6 \& Title : desc \& Usage : $seqobj\->desc($string) or $seqobj\->desc() \& Function: Sets or gets the description of the sequence \& Example : \& Returns : The description \& Args : The description or none .Ve .SS "location" .IX Subsection "location" .Vb 6 \& 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 .Ve .SS "location_string" .IX Subsection "location_string" .Vb 5 \& 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 .Ve .PP 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 \*(L"start1..end1,start2..end2,...\*(R". Use \&\f(CW$seqfeature\fR\->\fBlocation()\fR\->\fBtoFTString()\fR to obtain a standard GenBank/EMBL location representation. .SS "configurator" .IX Subsection "configurator" .Vb 5 \& Title : configurator \& Usage : my $configurator = $seqfeature\->configurator([$new_configurator]) \& Function: Get/set an object that provides configuration information for this feature \& Returns : configurator object \& Args : new configurator object (optional) .Ve .PP A configurator object provides hints to the Bio::Graphics::Feature as to how to display itself on a canvas. Currently this stores the Bio::Graphics::FeatureFile and descendents. .SS "url" .IX Subsection "url" .Vb 5 \& Title : url \& Usage : my $url = $seqfeature\->url([$new_url]) \& Function: Get/set the URL associated with this feature \& Returns : a URL string \& Args : new URL (optional) .Ve .PP Features link to URLs when displayed as a clickable image map. This field holds that information. .SS "make_link" .IX Subsection "make_link" .Vb 5 \& Title : make_link \& Usage : my $url = $seqfeature\->make_link() \& Function: Create a URL for the feature \& Returns : a URL string \& Args : none .Ve .PP This method will invoke the configurator in order to turn the feature into a link. Used by Bio::Graphics::Panel to create imagemaps. .SH "SEE ALSO" .IX Header "SEE ALSO" Bio::Graphics::Panel,Bio::Graphics::Glyph, Bio::Graphics::FeatureBase \s-1GD\s0 .SH "AUTHOR" .IX Header "AUTHOR" Lincoln Stein . .PP Copyright (c) 2001 Cold Spring Harbor Laboratory .PP This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See \s-1DISCLAIMER\s0.txt for disclaimers of warranty.