NAME
Bio::SeqFeature::FeaturePair - hold pair feature information e.g. blast hits
SYNOPSIS
my $feat = Bio::SeqFeature::FeaturePair->new(-feature1 => $f1,-feature2 => $f2,);# Bio::SeqFeatureI methods can be usedmy $start = $feat->start;my $end = $feat->end;# Bio::FeaturePair methods can be usedmy $hstart = $feat->hstart;my $hend = $feat->hend;my $feature1 = $feat->feature1; # returns feature1 object
DESCRIPTION
A sequence feature object where the feature is itself a feature on another sequence - e.g. a blast hit where residues 1-40 of a protein sequence SW:HBA_HUMAN has hit to bases 100 - 220 on a genomic sequence HS120G22. The genomic sequence coordinates are used to create one sequence feature $f1 and the protein coordinates are used to create feature $f2. A FeaturePair object can then be made
my $fp = Bio::SeqFeature::FeaturePair->new(-feature1 => $f1, # genomic-feature2 => $f2, # protein);
This object can be used as a standard Bio::SeqFeatureI in which case
my $gstart = $fp->start # returns start coord on feature1 - genomic seq.my $gend = $fp->end # returns end coord on feature1.
In general standard Bio::SeqFeatureI method calls return information in feature1.
Data in the feature 2 object are generally obtained using the standard methods prefixed by h (for hit!)
my $pstart = $fp->hstart # returns start coord on feature2 = protein seq.my $pend = $fp->hend # returns end coord on feature2.
If you wish to swap feature1 and feature2 around :
$feat->invert
so...
$feat->start # etc. returns data in $feature2 object
No sub_SeqFeatures or tags can be stored in this object directly. Any features or tags are expected to be stored in the contained objects feature1, and feature2.
CONTACT
Ewan Birney <[email protected]>
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
new
Title : newUsage :Function: Constructor for this module. Accepts the following parameters:-feature1 Bio::SeqFeatureI-compliant object-feature2 Bio::SeqFeatureI-compliant object-feature_factory Bio::Factory::ObjectFactoryI compliantobject to be used when feature1 and/or feature2are accessed without explicitly set before. Thisis mostly useful for derived classes who want toset their preferred class for feature objects.Example :Returns :Args : see above
feature1
Title : feature1Usage : $f = $featpair->feature1$featpair->feature1($feature)Function: Get/set for the query featureReturns : Bio::SeqFeatureIArgs : Bio::SeqFeatureI
feature2
Title : feature2Usage : $f = $featpair->feature2$featpair->feature2($feature)Function: Get/set for the hit featureReturns : Bio::SeqFeatureIArgs : Bio::SeqFeatureI
start
Title : startUsage : $start = $featpair->start$featpair->start(20)Function: Get/set on the start coordinate of feature1Returns : integerArgs : [optional] beginning of feature
end
Title : endUsage : $end = $featpair->end$featpair->end($end)Function: get/set on the end coordinate of feature1Returns : integerArgs : [optional] ending point of feature
strand
Title : strandUsage : $strand = $feat->strand()$feat->strand($strand)Function: get/set on strand information, being 1,-1 or 0Returns : -1,1 or 0Args : [optional] strand information to set
location
Title : locationUsage : $location = $featpair->location$featpair->location($location)Function: Get/set location object (using feature1)Returns : Bio::LocationI objectArgs : [optional] LocationI to store
score
Title : scoreUsage : $score = $feat->score()$feat->score($score)Function: get/set on score informationReturns : floatArgs : none if get, the new value if set
frame
Title : frameUsage : $frame = $feat->frame()$feat->frame($frame)Function: get/set on frame informationReturns : 0,1,2Args : none if get, the new value if set
primary_tag
Title : primary_tagUsage : $ptag = $featpair->primary_tagFunction: get/set on the primary_tag of feature1Returns : 0,1,2Args : none if get, the new value if set
source_tag
Title : source_tagUsage : $tag = $feat->source_tag()$feat->source_tag('genscan');Function: Returns the source tag for a feature,eg, 'genscan'Returns : a stringArgs : none
seqname
Title : seqnameUsage : $obj->seq_id($newval)Function: There are many cases when you make a feature that youdo know the sequence name, but do not know its actualsequence. This is an attribute such that you can storethe seqname.This attribute should *not* be used in GFF dumping, asthat should come from the collection in which the seqfeature was found.Returns : value of seqnameArgs : newvalue (optional)
hseqname
Title : hseqnameUsage : $featpair->hseqname($newval)Function: Get/set method for the name offeature2.Returns : value of $feature2->seq_idArgs : newvalue (optional)
hstart
Title : hstartUsage : $start = $featpair->hstart$featpair->hstart(20)Function: Get/set on the start coordinate of feature2Returns : integerArgs : none
hend
Title : hendUsage : $end = $featpair->hend$featpair->hend($end)Function: get/set on the end coordinate of feature2Returns : integerArgs : none
hstrand
Title : hstrandUsage : $strand = $feat->strand()$feat->strand($strand)Function: get/set on strand information, being 1,-1 or 0Returns : -1,1 or 0Args : none
hscore
Title : hscoreUsage : $score = $feat->score()$feat->score($score)Function: get/set on score informationReturns : floatArgs : none if get, the new value if set
hframe
Title : hframeUsage : $frame = $feat->frame()$feat->frame($frame)Function: get/set on frame informationReturns : 0,1,2Args : none if get, the new value if set
hprimary_tag
Title : hprimary_tagUsage : $ptag = $featpair->hprimary_tagFunction: Get/set on the primary_tag of feature2Returns : 0,1,2Args : none if get, the new value if set
hsource_tag
Title : hsource_tagUsage : $tag = $feat->hsource_tag()$feat->source_tag('genscan');Function: Returns the source tag for a feature,eg, 'genscan'Returns : a stringArgs : none
invert
Title : invertUsage : $tag = $feat->invertFunction: Swaps feature1 and feature2 aroundReturns : NothingArgs : none
feature_factory
Title : feature_factoryUsage : $obj->feature_factory($newval)Function: Get/set the feature object factory for this feature pair.The feature object factory will be used to create a featureobject if feature1() or feature2() is called in get modewithout having been set before.The default is an instance of Bio::Factory::ObjectFactoryand hence allows the type to be changed dynamically at anytime.Example :Returns : The feature object factory in use (aBio::Factory::ObjectFactoryI compliant object)Args : on set, a Bio::Factory::ObjectFactoryI compliant object