Bio::A...ndexer(3pm)

πŸ“¦
version 1.730 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Bio::ASN1::EntrezGene::Indexer πŸ’–

okay bestie, gather round, because this is the Bio::ASN1::EntrezGene::Indexer page from the User Contributed Perl Documentation, and it literally indexes NCBI Sequence files. it's giving bioinformatics main character energy and i am obsessed 🧬✨


✨ NAME ✨

Bio::ASN1::EntrezGene::Indexer β€” indexes NCBI Sequence files. yeah. that's the whole job description and she eats every time πŸ’…


🌸 VERSION 🌸

version 1.73 β€” this is the version, no cap πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

okay so here's the whole vibe, and honestly the way it's this short?? iconic:

  use Bio::ASN1::EntrezGene::Indexer;

  # creating & using the index is just a few lines
  my $inx = Bio::ASN1::EntrezGene::Indexer->new(
    -filename => 'entrezgene.idx',
    -write_flag => 'WRITE'); # needed for make_index call, but if opening
                             # existing index file, don't set write flag!
  $inx->make_index('Homo_sapiens', 'Mus_musculus', 'Rattus_norvegicus');
  my $seq = $inx->fetch(10); # Bio::Seq obj for Entrez Gene #10
  # alternatively, if one prefers just a data structure instead of objects
  $seq = $inx->fetch_hash(10); # a hash produced by Bio::ASN1::EntrezGene
                            # that contains all data in the Entrez Gene record

  # note that in case you wonder, you can get the files 'Homo_sapiens'
  # from NCBI Entrez Gene ftp download, DATA/ASN/Mammalia directory

like, creating and using the index is literally a few lines, bestie 🫢 and yes, if you were wondering where those files come from β€” you can grab the files like 'Homo_sapiens' from the NCBI Entrez Gene ftp download, in the DATA/ASN/Mammalia directory. iykyk πŸ’œ


πŸŽ€ DESCRIPTION πŸŽ€

so Bio::ASN1::EntrezGene::Indexer is a Perl indexer for NCBI Entrez Gene genome databases πŸ’–. it takes an ASN.1-formatted Entrez Gene record and stores the file position for each record, in a way that's compliant with Bioperl standard β€” and in fact, plot twist, it's a subclass of Bioperl's index objects πŸ‘‘

now here's the important bit: this module does not parse the record, because it needs to run fast and only grab the gene ids. speed is the vibe. so if you want to actually parse a record, use Bio::ASN1::EntrezGene, or even better, use Bio::SeqIO with format 'entrezgene' ✨

and the flex? it takes this module (version 1.07) 21 seconds to index the human genome Entrez Gene file (Apr. 5/2005 download) on one 2.4 GHz Intel Xeon processor. 21 seconds. on 2005 hardware. we stan a speed demon πŸ”₯


πŸ’… METHODS πŸ’…

🌟 fetch

  • Parameters: $geneid β€” the id for the Entrez Gene record to be retrieved
  • Example: my $hash = $indexer->fetch(10); # get Entrez Gene #10
  • Function: fetch the data for the given Entrez Gene id.
  • Returns: a Bio::Seq object produced by Bio::SeqIO::entrezgene
  • Notes: one needs to have Bio::SeqIO::entrezgene installed before calling this function!
⚠️ bestie, read that Notes line again β€” Bio::SeqIO::entrezgene has to be installed before you call this, or it's not gonna go well 😭

🌟 fetch_hash

  • Parameters: $geneid β€” the id for the Entrez Gene record to be retrieved
  • Example: my $hash = $indexer->fetch_hash(10); # get Entrez Gene #10
  • Function: fetch a hash produced by Bio::ASN1::EntrezGene for the given Entrez Gene id.
  • Returns: a data structure containing all data items from the Entrez Gene record.
  • Notes: alternative to fetch()

πŸ™ˆ INTERNAL METHODS πŸ™ˆ

these are the backstage-pass methods, fr fr β€” _version, _type_stamp, _index_file, _file_format, and _file_handle πŸ’€

πŸ“ _file_handle

  • Title : _file_handle
  • Usage : $fh = $index->_file_handle( INT )
  • Function: returns an open filehandle for the file index INT. On opening a new filehandle it caches it in the @{$index->_filehandle} array. If the requested filehandle is already open, it simply returns it from the array.
  • Example : $fist_file_indexed = $index->_file_handle( 0 );
  • Returns : ref to a filehandle
  • Args : INT
  • Notes : this function is copied from Bio::Index::Abstract. Once that module changes file handle code like I do below to fit perl 5.005_03, this sub would be removed from this module

🌈 PREREQUISITE 🌈

you're gonna need Bio::ASN1::EntrezGene, plus a Bioperl version that contains Stefan Kirov's entrezgene.pm, and all the dependencies therein. no skipping steps bestie πŸ’œ


⭐ INSTALLATION ⭐

same as Bio::ASN1::EntrezGene. that's it, that's the section ✨


🧚 SEE ALSO 🧚

for details on the various parsers i generated for Entrez Gene, plus example scripts that use/benchmark the modules, please see <http://sourceforge.net/projects/egparser/>. those other parsers etc. are included in the V1.05 download πŸ‘‘


πŸ‘‘ CITATION πŸ‘‘

if you're gonna cite this, here's the whole thing, character for character:

Liu, Mingyi, and Andrei Grigoriev. "Fast parsers for Entrez Gene." Bioinformatics 21, no. 14 (2005): 3189-3190.


πŸ’œ OPERATION SYSTEMS SUPPORTED πŸ’œ

any OS that Perl & Bioperl run on. so like… all of them, basically, slay 🌍


🫢 FEEDBACK 🫢

πŸ’Œ Mailing lists

user feedback is an integral part of the evolution of this and other Bioperl modules πŸ’–. send your comments and suggestions preferably to the Bioperl mailing list. your participation is much appreciated, like genuinely πŸ™

  bioperl-l@bioperl.org              - General discussion
  http://bioperl.org/Support.html    - About the mailing lists

πŸ’Œ Support

please direct usage questions or support issues to the mailing list:

bioperl-l@bioperl.org

rather than to the module maintainer directly. many experienced and reponsive experts will be able look at the problem and quickly address it πŸ‘‘. please include a thorough description of the problem with code and data examples if at all possible β€” the more receipts the better, bestie 🧾

πŸ’Œ Reporting bugs

report bugs to the Bioperl bug tracking system to help us keep track of the bugs and their resolution πŸ›. bug reports can be submitted via the web:

  https://github.com/bioperl/bio-asn1-entrezgene/issues

🌸 AUTHOR 🌸

Dr. Mingyi Liu <mingyiliu@gmail.com> πŸ’–


this software is copyright (c) 2005 by Mingyi Liu, 2005 by GPC Biotech AG, and 2005 by Altana Research Institute.

this software is available under the same terms as the perl 5 programming language system itself.


and that's the whole page, bestie! this was perl v5.38.2, dated 2024-03-04, from the Bio::A...ndexer(3pm) manual πŸ’…βœ¨ go forth and index some genomes, you absolute icon πŸ§¬πŸ‘‘
πŸ“¦ where this page comes from