NAME

DAS::GUS::Segment::Feature -- a relative segment identified by a feature type

SYNOPSIS

See DAS::GUS.

DESCRIPTION

DAS::GUS::Segment::Feature is a stretch of sequence that corresponding to a single annotation in a GUS database.

It inherits from Bio::SeqFeatureI and so has the familiar start(), stop(), primary_tag() and location() methods (it implements Bio::LocationI too)

API

The remainder of this document describes the public and private methods implemented by this module.

AUTHOR

Name: Haiming Wang Email: hwang@uga.edu

new

Title	: new
Usage	: $f = DAS::GUS::Segment::Feature->new(@args);
Function: create a new feature object
Returns	: new DAS::GUS::Segment::Feature object
Args	: see below
Status	: Internal

This method is called by DAS::GUS::Segment to create a new feature using information obtained from the GUS database.

The 12 arguments are positional:

$factory	a DAS::GUS adaptor object
$parent		the parent feature object (if it exists)
$srcseq		the source sequence
$start		start of this feature
$stop		stop of this feature
$type		this feature's type (gene, arm, exon, etc)
$score		the feature's score
$strand		this feature's strand (relative to the source sequence,
			which has its own strandness!)
$phase		this feature's phase (often with respect to the previous
			feature in a group of related features)
$group		this feature's group information ??
$atts		feature's attributes in $tag=$value format, use ? as delimiter
$uniquename this feature's internal unique database name ??
$feature_id	the feature's feature_id

This is called when creating a feature from scratch. It does not have an inherited coordinate system.

feature_id

Title	: feature_id
Usage	: $obj->feature_id($newval)
Function: holds feature_id
Returns	: value of feature_id (a scalar)
Args	: on set, new value (a scalar or undef, optional)

group

Title	: group
Usage	: $group = $f->group([$new_group]);
Function: Returns a feature name -- this is here to maintain backward
		  compatibility with GFF and gbrowse.
Returns	: value of group (a scalar)
Args	: 

srcfeature_id

Title	: srcfeature_id
Usage	: $obj->srcfeature_id($newval)
Function:
Returns	: value of srcfeature_id (a scalar)
Args	:

strand

Title	: strand
Usage	: $obj->strand()
Function: Returns the strand of the feature. Unlike the other methods,
		  the strand cannont be changed once the object is 
		  createed (due to coordinate considerations).
Returns	: -1, 0 or 1 ???
Args	:

SeqFeatureI methods

DAS::GUS::Segment::Feature implements the Bio::SeqFeatureI interface. Methods described below, Bio::SeqFeatureI for more details.

attach_seq()

Title	: attach_seq
Usage	: $sf->attch_seq($seq)
Function: Attaches a Bio::Seq object to this feature. This Bio::Seq
		  object is for the *entire* sequence: ie from 1 to 10000
Returns	: TURE on success
Args	: a Bio::PrimarySeqI compliant object

display_name()

Title	: display_name
Function: aliased to uniquename() for Bio::SeqFeatureI compatibility

entire_seq()

Title	: entire_seq
Usage	: $whole_seq = $sf->entire_seq()
Function: gives the entire sequence that this seqfeature is attached to
Returns	: a Bio::PrimarySeqI compliant object, or undef is there is no
		  sequence attached
Args	: none

get_all_tags()

Title	: get_all_tags
Function: aliased to all_tags() for Bio::SeqFeatureI compatibility

get_SeqFeatures()

Title	: get_SeqFeatures
Function: aliased to sub_SeqFeature() for Bio::SeqFeatureI compatibility

get_tag_values()

Title	: get_tag_values
Usage	:
Function:
Returns	:
Args	:

get_tagset_values()

Title	: get_tagset_values
Usage	:
Function:
Returns	:
Args	:

gff_string()

Title	: gff_string
Usage	: $string = $feature->gff_string
Function: return GFF3 representation of feature
Returns	: a string
Args	: none
Status  : Public

has_tag()

Title	: has_tag
Usage	:
Function:
Returns	:
Args	:

primary_tag()

Title	: primary_tag
Usage	:
Function: aliased to type() for Bio::SeqFeatureI compatibility
Returns	:
Args	:

seq_id()

Title	: seq_id
Usage	: $obj->seq_id($newval)
Function:
Returns	: value of seq_id (a scalar)
Args	:

source_tag()

Title	: source_tag
Usage	:
Function: aliased to source() for Bio::SeqFeatureI compatibility
Returns	:
Args	:

other get/setters

abs_strand()

Title	: abs_strand
Usage	: $obj->abs_strand($newval)
Function: aliased to strand() for backward compatibility
Returns	:
Args	:

class()

Title	: class 
Usage	:
Function: aliased to type() for backward compatibility
Returns	:
Args	:

db_id()

Title	: db_id
Usage	:
Function: aliased to uniquename() for backward compatibility
Returns	:
Args	:

factory()

Title	: factory
Usage	: $obj->factory($newval)
Function: 
Returns	: value of factory (a scalar)
Args	:

id()

Title	: id
Usage	:
Function:
Returns	:
Args	:

info()

Title	: info
Usage	:
Function:
Returns	:
Args	:

length()

Title	: length
Usage	: $obj->length()
Function: convenience for end - start + 1
Returns	: length of feature in basepairs
Args	: none

method()

Title	: method
Usage	:
Function:
Returns	:
Args	:

name

Title	: name
Usage	:
Function:
Returns	:
Args	:

parent()

Title	: parent
Usage	: $obj->parent($newval)
Function:
Returns	:
Args	:

score()

Title	: score
Usage	: $obj->score($newval)
Function:
Returns	:
Args	:

Other methods

all_tags()

Title	: all_tags
Usage	:
Function:
Returns	:
Args	:

source()

Title	: source
Usage	: $source = $f->source([$newsource])
Function: get or set the feature source
Returns	: a string
Args	: a new source (optional)
Status	: Public

segments()

Title	: segments
Function: aliased to sub_SeqFeature() for compatibility

subfeatures

Title	: subfeatures
Usage	: $obj->subfeatures($newval)
Function: returns a list of subfeatures
Returns	: value of subfeatures (a scalar)

sub_SeqFeature()

Title	: sub_SeqFeature
Usage	: @feat = $feature->sub_SeqFeature([$type])
Function: get subfeatures
Returns	: a list of DAS::GUS::Segment::Feature objects
Args	: a feature method (optional)
Status	: Public

This method returns a list of any subfeatures that belong to the main feature. For those features that contain heterogeneous subfeatures, you can retrieve a subset of the subfeatures by providing a method name to filter on.

This method may also be called as segments() or get_SeqFeatures().

add_subfeature()

Title	: add_subfeature
Usage	: $feature->add_subfeature($feature)
Function: This method adds a new subfeature to the object.
		  It is used internally by aggreagators, but is
		  available for public use as well.
Returns	: nothing
Args	: a DAS::GUS::Segment::Feature object
Status	: Public

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

clone()

Title	: clone
Usage	: $feature = $f->clone
Function: make a copy of the feature
		  This method returns a copy of the feature.
Returns	: a new DAS::GUS::Segment::Feature object
Args	: none
Status	: Public

sub_types()

Title	: sub_types
Usage	: @methods = $feature->sub_types
Function: get methods of all sub_seqfeatures
Returns	: a list of method name
Args	: none
Status	: Public

For those features that contain subfeatures, this method will return a unique list of method names of thoese subfeatures, suitable for use with sub_SeqFeature()

Autogenerated Methods

Title	: AUTOLOAD
Usage	: @subfeat = $feature->Method
Function: Return subfeatures using autogenerated methods
Returns	: a list of DAS::GUS::Segment::Feature objects
Args	: none
Status	: Public

Any method that begins with an initial capital letter will be passed to AUTOLOAD and treated as a call to sub_SeqFeature with the method name used as the method argument. For instance, this call:

@exons = $feature->Exon;

is equivalent to this call:

@exons = $feature->sub_SeqFeature('exon');

adjust_bounds()

Title   : adjust_bounds
Usage   : $feature->adjust_bounds
Function: adjust the bounds of a feature
Returns : ($start,$stop,$strand)
Args    : none
Status  : Public

This method adjusts the boundaries of the feature to enclose all its subfeatures. It returns the new start, stop and strand of the enclosing feature.

sort_features()

Title   : sort_features
Usage   : $feature->sort_features
Function: sort features
Returns : nothing
Args    : none
Status  : Public

This method sorts subfeatures in ascending order by their start position. For reverse strand features, it sorts subfeatures in descending order. After this is called sub_SeqFeature will return the features in order.

This method is called internally by merged_segments().

asString()

Title   : asString
Usage   : $string = $feature->asString
Function: return human-readabled representation of feature
Returns : a string
Args    : none
Status  : Public

This method returns a human-readable representation of the feature and is called by the overloaded "" operator.

attributes

Title	  : attributes
Usage	  : @attributes = $feature->attributes($name)
Function: get the "attributes" on a particular feature
Returns : an array of string
Args	  : feature ID
Status  : Public

Two attributes have special meaning: "Note" is for backward compatibility and is used for unstructured text remarks. "Alias" is considered as a synonym for the feature name.

@gene_names = $feature->attributes('Gene');
@aliases    = $feature->attributes('Alias');

If no name is provided, then attributes() returns a flattened hash, of attributes=>value pairs. This lets you do:

%attributes = $db->attributes;

notes

Title   : notes
Usage   : @notes = $feature->notes
Function: get the "notes" on a particular feature
Returns : an array of string
Args	 : feature ID
Status  : Public

aliases

Title   : aliases
Usage	 : @aliases = $feature->aliaes
Function: get the "aliases" on a particular feature
Returns : an array of string
Args	 : feature ID
Status  : Public

This method will return a list of attributes of type 'Alias'.