DAS::GUS::Segment - DAS-style access to a GUS database
# Get a Bio::Das::SegmentI object from a DAS::GUS database $segment = $das->segment( -name => 'Landmark', -start => $start, -stop => $stop );
Name: Haiming Wang Email: hwang@uga.edu
Title : new Usage : $segment = $db->segment(-name => 'AAEL01000015', -start => $start, -stop => $stop ); Function: Create a segment object Returns : a new DAS::GUS::Segment object Args : see below
This method creates a new DAS::GUS::Segment object accoring to a segment name, such as contig 'AAEL0100015'. Generally this is called automatically by the DAS::GUS module.
There are five positional arguments:
$factory a DAS::GUS adaptor to use for database access $start start of the desired segment relative to source sequence $stop stop of the desired segment relative to source sequence $srcfeature_id ID of the source sequence $class type of the sequence, i.e. chromosome, contig $name name of the segment $atts attributes of the segment
Title : name Usage : $segname = $seg->name(); Function : Return the name of the segment Returns : see avove Args : none Status : public
Title : class Usage : $obj->class($newval) Function: Return the segment class Returns : value of class (a scalar) Args : on set, new value (a scalar or undef, optional)
Title : attributes Usage : $obj->attributes($newval) Function: Return the segment attributes Returns : attributes string for gff3 dump Args :
Title : seq_id Usage : $ref = $s->seq_id Function: return the ID of the landmark, aliased to name() for backward compatibility Return : a string Args : none Status : public
Title : start Usage : $s->start Function: start of segment Returns : integer Args : none Status : Public
Title : low Usage : $s->low Function: start of segment; Alias of start for backward compatibility Returns : integer Args : none Status : Public
Title : end Usage : $s->end Function: end of segment; Returns : integer Args : none Status : Public
Title : high Usage : $s->high Function: end of segment; Alias of end for backward compatibility. Returns : integer Args : none Status : Public
Title : stop Usage : $s->stop Function: end of segment; Alias of end for backward compatibility. Returns : integer Args : none Status : Public
Title : length Usage : $s->length Function: length of segment; Returns : integer Args : none Status : Public
Title : features Usage : @features = $s->features(@args) Function: get features that overlap this segment Returns : a list of Bio::SeqFeatureI objects Args : see below Status : public
This method will find all features that intersect the segment in a variety of ways and returns a list of Bio::SeqFeatureI objects. The feature locations will use coordinates relative to the reference sequence in effect at the time that features() was called.
The returned list can be limited to certain types, attributes or range intersection modes. Types of range intersection are one of:
"overlaps" the default "contains" return features completely contained within the segment "contained_in" retunr features that completely contain the segment
Two types of argument lists are accepts. In the positional argument form, the arguments are treated as a list of feature types. In the named parameter form, the arguments are a series of -name=>value pairs.
Argument Description ------------------------------------- -types An array reference to type names in the format "method:source" -attributes A hashref containing a set of attributes to match -rangetype One of "overlaps", "contains", or "contained_in". -iterator Return an iterator across the features. -callback A callback to invoke on each feature
The -attributes argument is a hashref containing one or more attributes to match against:
-attributes => { Gene => 'abc-1', Note => 'confirmed' }
Attribute matching is simple string matching, and multiple attributes are ANDed together. More complex filtering can be performed using the -callback option (see below)
If -iterator is true, then the method returns an object reference that implements the next_seq() method. Each call to next_seq() returns a new Bio::SeqFeatureI object.
If -callback is passed a code reference, the code reference will be invoked on each feture returned. The code will be passed two arguments consisting of the current feature and the segment object itself, and must return a true value. If the code returns a false value, feature retrieval will be aborted.
-callback and -iterator are mutually exclusive options. If -iterator is defined, then -callback is ignored.
Title : _getUniqueTypes Usage : $segment->_getUniqueTypes() Function: filter out the duplicate types and return an array of unique feature types in 'type_source' format Returns : an array of feature types Args : array ref Status : Private
For example, in the config file
[Gene] feature = gene:Genbank
[BLASTX] feature = match:WU_BLASTX
_getUniqeTypes will subsitute ':' with '_' and return [ gene_Genbank, match_WU_BLASTX ], the latter can be used to find the corresponding element in SQL xml files.
Title : get_all_SeqFeature, get_SeqFeatures, top_SeqFeatures, all_SeqFeatures Usage : $s->get_all_SeqFeature() Function: get the sequence string fro this segment Several aliases of features() for backword compatibility Returns : a string Args : none Status : Public
Title : seq Usage : $s->seq Function: get the sequence string for this segment Returns : a string Args : none Status : Public
Title : secondary_structure_encodings Usage : $s->secondary_structure_encodings Function: get the secondary structure prediction scores for segment Returns : hash ref { secondary_structure_type => string of 0-9 one digit per base } Args : none Status : Public
Title : factory Usage : $factory = $s->factory Function: return the segment factory Returns : a Bio::DasI object Args : see below Status : Public
This method returns a Bio::DasI object that can be used to fetch more segments. This is typically the Bio::DasI object from which the segments was originally generated.
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)
Title : alphabet Usage : $obj->alphabet($newval) Function: Returns : scalar 'dna' Args : on set, new value ( a scalar or undef, optional ) Status : Public
Title : display_id, display_name, accession_number, desc Usage : $s->display_name() Function: Alias of name() Several aliases for name; it may be that these could do something better than just giving back the name. Returns : string Args : none Status : Public
Title : get_feature_stream Usage : Function: Returns : Args : Status :
Title : clone Usage : $copy = $s->clone Function: make a copy of this segment Returns : a Bio::DB::GFF::Segment object Args : none Status : Public
Title : sourceseq Usage : $obj->sourceseq($newval) Function: get feature name according to a feature_id Returns : value of sourceseq(a scalar) Args : on set, new value ( a scalar or undef, optional ) Status : Public
Title : abs_ref Usage : $obj->abs_ref() Function: Alisas of sourceseq Alias of sourceseq for backward compatibility Returns : value of sourceseq ( a scalar ) Args : none Status : Public
Title : abs_start Usage : $obj->abs_start() Function: Alias of start Returns : value of start ( a scalar ) Args : none Status : Public
Title : abs_end Usage : $obj->abs_end() Function: Alias of end Returns : value of end ( a scalar ) Args : none Status : Public
Title : asString Usage : $s->asString Function: human-readable string for segment Returns a human-readable string representing this sequence. Format is: sourceseq:start,stop Returns : a string Args : none Status : Public
To install CGI::Toggle, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CGI::Toggle
CPAN shell
perl -MCPAN -e shell install CGI::Toggle
For more information on module installation, please visit the detailed CPAN module installation guide.