1Stone::GB_Sequence(3) User Contributed Perl DocumentationStone::GB_Sequence(3)
2
3
4
6 Stone::GB_Sequence - Specialized Access to GenBank Records
7
9 use Boulder::Genbank; # No need to use Stone::GB_Sequence directly
10 $gb = Boulder::Genbank->newFh qw(M57939 M28274 L36028);
11
12 while ($entry = <$gb>) {
13 print "Entry's length is ",$entry->length,"\n";
14 @cds = $entry->match_features(-type=>'CDS');
15 @exons = $entry->match_features(-type=>'Exon',-start=>100,-end=>300);
16 }
17 }
18
20 Stone::GB_Sequence provides several specialized access methods to the
21 various fields in a GenBank flat file record. You can return the
22 sequence as a Bio::Seq object, or query the sequence for features that
23 match positional or descriptional criteria that you provide.
24
26 This class is not intended to be created directly, but via a Boul‐
27 der::Genbank stream.
28
30 In addition to the standard Stone methods and accessors, the following
31 methods are provided. In the synopses, the variable $entry refers to a
32 previously-created Stone::GB_Sequence object.
33
34 $length = $entry->length
35
36 Get the length of the sequence.
37
38 $start = $entry->start
39
40 Get the start position of the sequence, currently always "1".
41
42 $end = $entry->end
43
44 Get the end position of the sequence, currently always the same as the
45 length.
46
47 @feature_list = $entry->features(-pos=>[50,450],-type=>['CDS','Exon'])
48
49 features() will search the entry feature list for those features that
50 meet certain criteria. The criteria are specified using the -pos
51 and/or -type argument names, as shown below.
52
53 -pos
54 Provide a position or range of positions which the feature must
55 overlap. A single position is specified in this way:
56
57 -pos => 1500; # feature must overlap postion 1500
58
59 or a range of positions in this way:
60
61 -pos => [1000,1500]; # 1000 to 1500 inclusive
62
63 If no criteria are provided, then features() returns all the fea‐
64 tures, and is equivalent to calling the Features() accessor.
65
66 -type, -types
67 Filter the list of features by type or a set of types. Matches are
68 case-insensitive, so "exon", "Exon" and "EXON" are all equivalent.
69 You may call with a single type as in:
70
71 -type => 'Exon'
72
73 or with a list of types, as in
74
75 -types => ['Exon','CDS']
76
77 The names "-type" and "-types" can be used interchangeably.
78
79 $seqObj = $entry->bioSeq;
80
81 Returns a Bio::Seq object from the Bioperl project. Dies with an error
82 message unless the Bio::Seq module is installed.
83
85 Lincoln D. Stein <lstein@cshl.org>.
86
88 Copyright 1997-1999, Cold Spring Harbor Laboratory, Cold Spring Harbor
89 NY. This module can be used and distributed on the same terms as Perl
90 itself.
91
93 Boulder, <Boulder:Genbank>, Stone
94
95
96
97perl v5.8.8 2000-06-08 Stone::GB_Sequence(3)