Summary | Included libraries | Package variables | Synopsis | Description | General documentation | Methods |
WebCvs | Raw content |
# Open up a feature database somehow...
$db = Bio::DasI->new(@args);
@segments = $db->segment(-name => 'NT_29921.4', -start => 1, -end => 1000000); # segments are Bio::Das::SegmentI - compliant objects # fetch a list of features @features = $db->features(-type=>['type1','type2','type3']); # invoke a callback over features $db->features(-type=>['type1','type2','type3'], -callback => sub { ... } ); $stream = $db->get_seq_stream(-type=>['type1','type2','type3']); while (my $feature = $stream->next_seq) { # each feature is a Bio::SeqFeatureI-compliant object } # get all feature types @types = $db->types; # count types %types = $db->types(-enumerate=>1); @feature = $db->get_feature_by_name($class=>$name); @feature = $db->get_feature_by_target($target_name); @feature = $db->get_feature_by_attribute($att1=>$value1,$att2=>$value2); $feature = $db->get_feature_by_id($id); $error = $db->error;
features | Description | Code |
get_feature_by_attribute | Description | Code |
get_feature_by_id | Description | Code |
get_feature_by_name | Description | Code |
get_feature_by_target | Description | Code |
get_feature_stream | No description | Code |
get_seq_stream | Description | Code |
new | Description | Code |
refclass | Description | Code |
search_notes | Description | Code |
segment | Description | Code |
types | Description | Code |
features | code | next | Top |
Title : featuresThis routine will retrieve features in the database regardless of position. It can be used to return all features, or a subset based on their type Arguments are -option=>value pairs as follows: -types List of feature types to return. Argument is an arrayThe -attributes argument is a hashref containing one or more attributes to match against: -attributes => { Gene => 'abc-1',Attribute matching is simple exact string matching, and multiple attributes are ANDed together. See Bio::DB::ConstraintsI for a more sophisticated take on this. If one provides a callback, it will be invoked on each feature in turn. If the callback returns a false value, iteration will be interrupted. When a callback is provided, the method returns undef. |
get_feature_by_attribute | code | prev | next | Top |
Title : get_feature_by_attributeThis method can be used to fetch a set of features from the database. Attributes are a list of name=>value pairs. They will be logically ANDed together. If an attribute value is an array reference, the list of values in the array is treated as an alternative set of values to be ORed together. |
get_feature_by_id | code | prev | next | Top |
Title : get_feature_by_idIf the database provides unique feature IDs, this can be used to retrieve a single feature from the database. If not overridden, this interface calls get_feature_by_name() and returns the first element. |
get_feature_by_name | code | prev | next | Top |
Title : get_feature_by_nameThis method can be used to fetch named feature(s) from the database. The -class and -name arguments have the same meaning as in segment(), and the method also accepts the following short-cut forms: 1) one argument: the argument is treated as the feature nameThis method may return zero, one, or several Bio::SeqFeatureI objects. The implementor may allow the name to contain wildcards, in which case standard C-shell glob semantics are expected. |
get_feature_by_target | code | prev | next | Top |
Title : get_feature_by_targetThis method can be used to fetch a named feature from the database based on its similarity hit. The arguments are the same as get_feature_by_name(). If this is not implemented, the interface defaults to using get_feature_by_name(). |
get_seq_stream | code | prev | next | Top |
Title : get_seq_streamThis routine takes the same arguments as features(), but returns a Bio::SeqIO::Stream-compliant object. Use it like this: $stream = $db->get_seq_stream('exon');NOTE: In the interface this method is aliased to get_feature_stream(), as the name is more descriptive. |
new | code | prev | next | Top |
Title : newThe new() method creates a new object. The argument list is either a single argument consisting of a connection string, or the following list of -name=>value arguments: Argument DescriptionImplementors of DasI may add other arguments. |
refclass | code | prev | next | Top |
Title : refclassFor data sources which use namespaces to distinguish reference sequence accessions, this returns the default namespace (or "class") to use. This interface defines a default of "Accession". |
search_notes | code | prev | next | Top |
Title : search_notesThis routine performs a full-text search on feature attributes (which attributes depend on implementation) and returns a list of [$name,$description,$score], where $name is the feature ID, $description is a human-readable description such as a locus line, and $score is the match strength. Since this is a decidedly non-standard thing to do (but the generic genome browser uses it), the default method returns an empty list. You do not have to implement it. |
segment | code | prev | next | Top |
Title : segmentThis method generates a Bio::Das::SegmentI object (see Bio::Das::SegmentI). The segment can be used to find overlapping features and the raw sequence. When making the segment() call, you specify the ID of a sequence landmark (e.g. an accession number, a clone or contig), and a positional range relative to the landmark. If no range is specified, then the entire region spanned by the landmark is used to generate the segment. Arguments are -option=>value pairs as follows: -name ID of the landmark sequence.The return value is a list of Bio::Das::SegmentI objects. If the method is called in a scalar context and there are no more than one segments that satisfy the request, then it is allowed to return the segment. Otherwise, the method must throw a "multiple segment exception". |
types | code | prev | next | Top |
Title : typesThis routine returns a list of feature types known to the database. It is also possible to find out how many times each feature occurs. Arguments are -option=>value pairs as follows: -enumerate if true, count the featuresThe returned value will be a list of Bio::Das::FeatureTypeI objects (see Bio::Das::FeatureTypeI. If -enumerate is true, then the function returns a hash (not a hash reference) in which the keys are the stringified versions of Bio::Das::FeatureTypeI and the values are the number of times each feature appears in the database. |
features | description | prev | next | Top |
shift->throw_not_implemented}
get_feature_by_attribute | description | prev | next | Top |
shift->throw_not_implemented();}
get_feature_by_id | description | prev | next | Top |
(shift->get_feature_by_name(@_))[0];}
get_feature_by_name | description | prev | next | Top |
shift->throw_not_implemented();}
get_feature_by_target | description | prev | next | Top |
shift->get_feature_by_name(@_);}
get_feature_stream | description | prev | next | Top |
shift->get_seq_stream(@_)}
get_seq_stream | description | prev | next | Top |
shift->throw_not_implemented}
new | description | prev | next | Top |
shift->throw_not_implemented}
refclass | description | prev | next | Top |
"Accession"
}search_notes | description | prev | next | Top |
return
}segment | description | prev | next | Top |
shift->throw_not_implemented}
types | description | prev | next | Top |
shift->throw_not_implemented;}
FEEDBACK | Top |
Mailing Lists | Top |
bioperl-l@bio.perl.org
Reporting Bugs | Top |
bioperl-bugs@bio.perl.org
http://bugzilla.bioperl.org/
AUTHOR - Lincoln Stein | Top |
APPENDIX | Top |