Bio::A...ndexer(3pm)
π 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 retrievedExample:my $hash = $indexer->fetch(10); # get Entrez Gene #10Function:fetch the data for the given Entrez Gene id.Returns:aBio::Seqobject produced byBio::SeqIO::entrezgeneNotes:one needs to haveBio::SeqIO::entrezgeneinstalled 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 retrievedExample:my $hash = $indexer->fetch_hash(10); # get Entrez Gene #10Function:fetch a hash produced byBio::ASN1::EntrezGenefor the given Entrez Gene id.Returns:a data structure containing all data items from the Entrez Gene record.Notes:alternative tofetch()
π INTERNAL METHODS π
these are the backstage-pass methods, fr fr β _version, _type_stamp, _index_file, _file_format, and _file_handle π
π _file_handle
Title:_file_handleUsage:$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 filehandleArgs:INTNotes: this function is copied fromBio::Index::Abstract. Once that module changes file handle code like I do below to fit perl5.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> π
π COPYRIGHT π
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 perlv5.38.2, dated2024-03-04, from theBio::A...ndexer(3pm)manual π β¨ go forth and index some genomes, you absolute icon π§¬π
π¦ where this page comes from
- debian trixie: libbio-asn1-entrezgene-perl 1.730-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libbio-asn1-entrezgene-perl 1.730-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libbio-asn1-entrezgene-perl 1.730-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libbio-asn1-entrezgene-perl 1.730-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms