Stone:...quence(3pm)

πŸ“¦
version 1.30 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

🌸 Stone::GB_Sequence β€” Specialized Access to GenBank Records 🌸

okay bestie, welcome to the Stone::GB_Sequence page πŸ’– this is a bit of the User Contributed Perl Documentation, so you know it's the community-crafted goodness ✨


✨ NAME ✨

Stone::GB_Sequence β€” Specialized Access to GenBank Records 🧬


πŸ¦‹ SYNOPSIS πŸ¦‹

use Boulder::Genbank;  # No need to use Stone::GB_Sequence directly
$gb = Boulder::Genbank->newFh qw(M57939 M28274 L36028);

while ($entry = <$gb>) {
  print "Entry's length is ",$entry->length,"\n";
  @cds   = $entry->match_features(-type=>'CDS');
  @exons = $entry->match_features(-type=>'Exon',-start=>100,-end=>300);
}
}

(and yes the extra } is literally in there, no cap, we're keeping it exactly as the source says πŸ™ˆ)


πŸ’… DESCRIPTION πŸ’…

So Stone::GB_Sequence is the glow-up for GenBank flat file records β€” it hands you a bunch of specialized access methods for all the various fields in a record 🌈

You can pull the sequence out as a Bio::Seq object, or you can interrogate the sequence for features that match positional or descriptional criteria that you provide. it's giving ✨custom query energy✨ fr fr


πŸŽ€ CONSTRUCTORS πŸŽ€

not me making this class directly… don't do that bestie 😭

This class is not intended to be created directly β€” you get to it via a Boulder::Genbank stream instead, iykyk 🫢


πŸ‘‘ METHODS πŸ‘‘

On top of the standard Stone methods and accessors, you also get all of these cuties πŸ’– In every synopsis below, the variable $entry is a previously-created Stone::GB_Sequence object β€” got it? periodt.

⭐ $length = $entry->length

Gives you the length of the sequence. that's it, that's the whole vibe πŸ“

⭐ $start = $entry->start

Gives you the start position of the sequence. currently this is always "1" β€” iconic, consistent, never changing πŸ’…

⭐ $end = $entry->end

Gives you the end position of the sequence. currently it's always the same as the length. matching energy, we love to see it ✨

🌸 @feature_list = $entry->features(-pos=>[50,450],-type=>['CDS','Exon'])

features() will search the entry's feature list for the features that meet certain criteria πŸ•΅οΈβ™€οΈ You specify those criteria with the -pos and/or -type argument names, like so:

πŸ¦‹ -pos

Give a position, or a range of positions, that the feature must overlap. A single position goes like this:

-pos => 1500;         # feature must overlap postion 1500

(yes, postion β€” that typo is the original's, and we are nothing if not faithful πŸ™ˆ)

or a range of positions goes like this:

-pos => [1000,1500];  # 1000 to 1500 inclusive

and if you provide no criteria at all, then features() just returns every single feature β€” which is equivalent to calling the Features() accessor. easy πŸ’…

πŸ¦‹ -type, -types

Filter that feature list by one type, or by a whole set of types 🌈 Matches are case-insensitive, so "exon", "Exon" and "EXON" are all equivalent. she does not care about your capitalization bestie πŸ’–

Call it with a single type like this:

-type => 'Exon'

or with a list of types, like this:

-types => ['Exon','CDS']

The names -type and -types can be used interchangeably β€” same girl, different font πŸŽ€

⭐ $seqObj = $entry->bioSeq;

Returns a Bio::Seq object from the Bioperl project 🧬

⚠️ heads up: it dies with an error message unless the Bio::Seq module is installed. no module, no vibes 😭

πŸ’œ AUTHOR πŸ’œ

Lincoln D. Stein <lstein@cshl.org>. thank you king πŸ‘‘


Copyright 1997-1999, Cold Spring Harbor Laboratory, Cold Spring Harbor NY. This module can be used and distributed on the same terms as Perl itself. slay πŸ’…


🫢 SEE ALSO 🫢

  • Boulder
  • <Boulder:Genbank>
  • Stone

and that's the whole page bestie!! this one's from perl v5.34.0, dated 2022-06-08 β€” go forth and query those features, you absolute main character πŸ§šπŸ’–βœ¨

πŸ“¦ where this page comes from