Bio::D...:memory(3pm)

πŸ“¦
version 1.7.4 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’– Bio::DB::GFF::Adaptor::memory πŸ’–

okay so bestie, gather round β€” this is the manual page for Bio::DB::GFF::Adaptor::memory, part of the User Contributed Perl Documentation, and it's literally the in-memory database adaptor for Bio::DB::GFF. Think of it as the little gremlin that holds your whole genome in RAM. It's giving fast but smol. ✨


🌸 NAME 🌸

Bio::DB::GFF::Adaptor::memory β€” a Bio::DB::GFF database adaptor for in-memory databases. That's it, that's the whole job description. πŸ’…


✨ SYNOPSIS ✨

Bestie you have two whole ways to do this. Pick your fighter:

Option one β€” the constructor does everything for you:

use Bio::DB::GFF;
my $db = Bio::DB::GFF->new(-adaptor=> 'memory',
                           -gff    => 'my_features.gff',
                           -fasta  => 'my_dna.fa'
                          );

or, option two β€” build it empty and load stuff in yourself:

my $db = Bio::DB::GFF->new(-adaptor=>'memory');
$db->load_gff_file('my_features.gff');
$db->load_fasta_file('my_dna.fa');

Also, if you wanna see the other methods, go look at Bio::DB::GFF. They're all inherited, she's the parent, respect her. πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

This adaptor implements an in-memory version of Bio::DB::GFF. What's it for? Storing and retrieving SHORT GFF files. Emphasis on SHORT, bestie, it says it in all caps for a reason. πŸ™ˆ

It inherits from Bio::DB::GFF, so all that parent energy comes along for free. πŸ’–


πŸŽ€ CONSTRUCTOR πŸŽ€

Use Bio::DB::GFF->new() to construct new instances of this class. There are three named arguments that are recommended β€” here's the lineup:

  • -adaptor β€” set it to "memory" and boom, you get an instance of this class. That's the whole vibe. ✨
  • -gff β€” reads the indicated file, or a directory of .gff files. πŸ“
  • -fasta β€” reads the indicated file, or a directory of fasta files. 🧚
  • -dir β€” points at a directory containing .gff and .fa files. πŸŽ€

Okay but listen β€” if you use the -dir option and the directory it points to is writable by the current process, then this library will create a FASTA file index that greatly diminishes the memory usage of this module. Lowkey a glow-up for your RAM. πŸ”₯

Alternatively β€” and this is the recommended path in CGI/mod_perl/fastCGI environments β€” you can make an empty in-memory object using just the -adaptor=>'memory' argument, and then call the load_gff_file() and load_fasta_file() methods to load GFF and/or sequence info.

Why though? Because those methods do not modify STDIN, unlike the constructor. No cap. If you're in a CGI-ish environment, that matters a LOT. 😭

πŸ’œ METHODS πŸ’œ

See Bio::DB::GFF for inherited methods. That's where the rest of the magic lives, bestie. ✨


πŸ’€ BUGS πŸ’€

none ;-)

Not a single one. She said what she said. πŸ˜ŒπŸ’…


🌈 SEE ALSO 🌈

  • Bio::DB::GFF
  • bioperl

Go read those, they're iconic. 🫢


πŸ‘‘ AUTHOR πŸ‘‘

Shuly Avraham <avraham@cshl.org>.

Copyright (c) 2002 Cold Spring Harbor Laboratory.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Slay, honestly. 🌸


🌟 _feature_by_name 🌟

  • Title β€” _feature_by_name
  • Usage β€” $db->get_features_by_name($name,$class,$callback)
  • Function β€” get a list of features by name and class
  • Returns β€” count of number of features retrieved
  • Args β€” name of feature, class of feature, and a callback
  • Status β€” protected πŸ”’

This method is used internally β€” it's not for you to poke at, bestie, it's private business. πŸ™ˆ The callback arguments are those used by make_feature().


And that's the whole page, mwah. This lil doc came to you from perl v5.30.0 and it was dated 2020-01-13 β€” so go forth and load your short GFF files in memory, main character. Periodt. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from