NAME

Bio::DB::Das::Chado::Segment::Feature

SYNOPSIS

See Bio::DB::Das::Chado.

DESCRIPTION

Not yet written

API

new

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

This method is called by Bio::DB::Das::Chado::Segment to create a new feature using information obtained from the chado database.

The 11 arguments are positional:

$factory      a Bio::DB::Das::Chado adaptor object (or descendent)
$parent       the parent feature object (if it exists)
$srcseq       the source sequence
$start        start of this feature
$stop         stop of this feature
$type         a Bio::DB::GFF::Typename (containing a method and source)
$score        the feature's score
$strand       this feature's strand (relative to the source
              sequence, which has its own strandedness!)
$phase        this feature's phase (often with respect to the 
              previous feature in a group of related features)
$group        this feature's featureloc.locgroup (NOT a GFF holdover)
$uniquename   this feature's internal unique database
                   name (feature.uniquename)
$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 and featureloc accessors

Methods below are accessors for data that is drawn directly from the Chado database and can be considered "primary" accessors for this class.

feature_id()

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

Implemented in Bio::DB::Das::Chado::Segment

organism

Usage
$obj->organism()        #get existing value
$obj->organism($newval) #set new value
Function
Returns

value of organism (a scalar)

Arguments

new value of organism (to set)

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    : on set, new value (a scalar or undef, optional)

srcfeature_id()

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

strand()

Title   : strand
Usage   : $obj->strand()
Function: Returns the strand of the feature.  Unlike the other
          methods, the strand cannot be changed once the object is
          created (due to coordinate considerations).
          corresponds to featureloc.strand
Returns : -1, 0, or 1
Args    : on set, new value (a scalar or undef, optional)

phase

Usage
$obj->phase()        #get existing value
$obj->phase($newval) #set new value
Function
Returns

value of phase (a scalar)

Arguments

new value of phase (to set)

type()

Title   : type
Usage   : $obj->type($newval)
Function: holds a Bio::DB::GFF::Typename object
Returns : returns a Bio::DB::GFF::Typename object
Args    : on set, new value

uniquename()

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

is_analysis()

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

SeqFeatureI methods

Bio::DB::Das::Chado::Segment::Feature implements the Bio::SeqFeatureI interface. Methods described below, see Bio:SeqFeatureI for more details.

attach_seq()

Title   : attach_seq
Usage   : $sf->attach_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
Example :
Returns : TRUE 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
Example :
Returns : a Bio::PrimarySeqI compliant object, or undef if 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   : $feature->get_tag_values
Function: Returns values associated with a particular tag
Returns : A list of values
Args    : A string (the name of the tag)

get_tagset_values()

Title   : get_tagset_values
Usage   :
Function: ???
Returns :
Args    :

gff_string()

Title   : gff_string
Usage   :
Function: ???
Returns :
Args    :

has_tag()

Title   : has_tag
Usage   :
Function: ???
Returns :
Args    :

primary_tag()

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

seq()

Title   : seq
Usage   :
Function: ???
Returns :
Args    :

seq_id()

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

Bio::RangeI methods

Bio::SeqFeatureI in turn ISA Bio::RangeI. Bio::RangeI interface methods described below, Bio::RangeI for details.

end()

Title   : end
Function: inherited, L<Bio::DB::Das::Chado::Segment>

start()

Title   : start
Function: inherited, L<Bio::DB::Das::Chado::Segment>

strand()

Title   : strand
Function: inherited, L<Bio::DB::Das::Chado::Segment>

other get/setters

abs_strand()

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

class()

Title   : class
Function: aliased to method()for backward compatibility

db_id()

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

factory()

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

id()

Title   : id
Function: aliased to uniquename() for backward compatibility

info()

Title   : info
Function: aliased to uniquename() for backward compatibility
          with broken generic glyphs primarily

length()

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

method()

Title   : method
Usage   : $obj->method
Function: returns a Feature's method (SOFA type)
Returns : the Features SOFA type
Args    : none

name()

Title   : name
Function: aliased to group for backward compatibility

parent()

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

score()

Title   : score
Usage   : $obj->score($newval)
Function: holds the (alignment?) feature's score
Returns : value of score (a scalar)
Args    : on set, new value (a scalar or undef, optional)

target()

Title   : target
Usage   : $feature->target
Function: returns a Bio::DB::Das::Chado::Segment that corresponds
          to the target of a similarity pair
Returns : a Bio::DB::Das::Chado::Segment object
Args    : none

Other methods

all_tags()

Title   : all_tags
Usage   :
Function: ???
Returns :
Args    :

source()

Title   : source
Usage   : $f->source();
Function: caches and returns the source from a GFF file, this is stored
          in dbxref with a db of 'GFF_Source'
Returns : See above
Args    : none

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)
FIXME THIS SHOULD RETURN A LIST OR AN ARRAY AND BE DOCUMENTED AS SUCH
NOT RETURN AN ARRAYREF OR HASHREF.  FOR ADDING/SETTING ELEMENTS WE
NEED ADD_ AND SET_ METHODS
Args    : on set, new value (a scalar or undef, optional)

sub_SeqFeature()

Title   : sub_SeqFeature
Usage   : @feat = $feature->sub_SeqFeature([$type])
Function: 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 an array of types to filter on.

          For AcePerl compatibility, this method may also
          be called as segments().
Returns : a list of Bio::DB::Das::Chado::Segment::Feature objects
Args    : a feature method (optional)
Status  : Public
Argh...! DONT DROP THE PROTEIN FEATURE
dgg: polypeptide or protein is a most important feature, don't drop it!

This is the part of a gene that has lots of attached critical info:
protein ID, translation, GO terms, Dbxrefs to other proteins)
While this exclusion fixes a display bug, e.g. Glyph/processed_transcript 
it is much less problematic to patch the glyph displayers.

elsif ( 0 && $inferCDS) {
  #just remove polypeptide features
  my @ok_feats = grep {$_->type->method ne 'polypeptide'} @features;
  warn @ok_feats if DEBUG;
  return @ok_feats;
}

_do_the_inferring

Usage
$obj->_do_the_inferring(@features)
Function

Takes a list of polypeptide and exon features and infers CDS and UTR features from them.

Returns

A list of CDS and UTR features

Arguments

A list of polypeptide and exon features

Caveats

This function will break with polycistronic genes, as there will be more than one polypeptide per set of exons, and this function assumes that there is only one.

_calc_phases

Title   : _calc_phases
Usage   : $feature->_calc_phases(@exons)
Function: calculstes phases for exons without phases 
Returns : a list of exon feature objects with phases
Args    : a list of sorted (by transcription order) exons
Status  : private

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

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 aggregators, but is
          available for public use as well.
Returns : nothing
Args    : a Bio::DB::Das::Chado::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
Returns : a new Bio::DB::Das::Chado::Segment::Feature object
Args    : none
Status  : Public

This method returns a copy of the feature.

sub_types()

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

For those features that contain subfeatures, this method will return a unique list of method names of those 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 Bio::DB::Das::Chado::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.

synonyms()

Title   : synonyms
Usage   : @synonyms = $feature->synonyms
Function: return a list of synonyms for a feature
Returns : a list of strings
Args    : none
Status  : Public

Looks in the synonym table to collect all synonyms of a feature.

cmap_link()

Title   : cmap_link
Usage   : $link = $feature->cmap_link
Function: returns a URL link to the corresponding feature in cmap
Returns : a string
Args    : none
Status  : Public

Returns a link to a cmap installation (which is assumed to be on the same host as gbrowse). In addition to the cmap tables being present in chado, this method also assumes the presence of a link table called feature_to_cmap. See the cmap documentation for more information.

This function is intended primarily to be used in gbrowse conf files. For example:

link       = sub {my $self = shift; return $self->cmap_link();}

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 1122:

'=item' outside of any '=over'

Around line 1143:

You forgot a '=back' before '=head2'