Bio::A...ndexer(3pm)
π Bio::ASN1::Sequence::Indexer β the manual page, but make it cute
okay bestie so this is Bio::A...ndexer(3pm) from the User Contributed Perl Documentation, and honestly? it's giving useful. let's get into it π
β¨ NAME β¨
Bio::ASN1::Sequence::Indexer β it indexes NCBI Sequence files. that's it, that's the whole job, and it does it fast πβοΈπ¨
π VERSION π
version 1.73 β iconic, vintage, still slaying
πΈ SYNOPSIS πΈ
use Bio::ASN1::Sequence::Indexer;
# creating & using the index is just a few lines
my $inx = Bio::ASN1::Sequence::Indexer->new(
-filename => 'seq.idx',
-write_flag => 'WRITE'); # needed for make_index call, but if opening
# existing index file, don't set write flag!
$inx->make_index('seq1.asn', 'seq2.asn');
my $seq = $inx->fetch('AF093062'); # Bio::Seq obj for Sequence (doesn't work yet)
# alternatively, if one prefers just a data structure instead of objects
$seq = $inx->fetch_hash('AF093062'); # a hash produced by Bio::ASN1::Sequence
# that contains all data in the Sequence record
β οΈ bestie read that comment again:-write_flag => 'WRITE'is needed for themake_indexcall, but if you're opening an existing index file, don't set the write flag. no cap, this one trips people up π
π¦ DESCRIPTION π¦
Bio::ASN1::Sequence::Indexer is a Perl Indexer for NCBI Sequence genome databases. it processes an ASN.1-formatted Sequence record and stores the file position for each record in a way that's compliant with Bioperl standard β and fr fr, it's literally a subclass of Bioperl's index objects. main character energy π
now listen: this module does not parse the record, because it needs to run fast and grab only the gene ids. so if you actually want parsing, go use Bio::ASN1::Sequence. different girl, different job πβοΈ
and like its sibling Bio::ASN1::Sequence, this module is best thought of as a beta version β it works, but it is not fully tested. she's doing her best, okay π
π METHODS π
π fetch
- Parameters:
$geneidβ id for the Sequence record to be retrieved - Example:
my $hash = $indexer->fetch(10); # get Sequence #10 - Function: fetch the data for the given Sequence id.
- Returns: A
Bio::Seqobject produced byBio::SeqIO::sequence - Notes:
Bio::SeqIO::sequencedoes not exist and probably won't exist for a while! So callfetch_hashinstead π
not me reading "does not exist and probably won't exist for a while" β the honesty is unmatched ngl
π fetch_hash
- Parameters:
$seqidβ id for the Sequence record to be retrieved - Example:
my $hash = $indexer->fetch_hash('AF093062'); - Function: fetch a hash produced by
Bio::ASN1::Sequencefor given id - Returns: A data structure containing all data items from the Sequence record.
- Notes: Alternative to
fetch()β¨
π INTERNAL METHODS π
these are the behind-the-scenes girlies (iykyk), not the ones you're supposed to call yourself, but here they all are because we keep every detail in this house:
_version_type_stamp_index_file_file_format_file_handle
and then _file_handle gets its own lil writeup:
- 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 perl5.005_03, this sub would be removed from this module.
π«Ά yes we kept the typo $fist_file_indexed. it's part of the lore now. we don't edit the code, bestie, we preserve it.
π§ PREREQUISITE π§
Bio::ASN1::Sequence, Bioperl, and all dependencies therein. the whole friend group has to show up π«
β INSTALLATION β
Same as Bio::ASN1::EntrezGene. literally just do that. slay π
π SEE ALSO π
Please check out perldoc for Bio::ASN1::EntrezGene for more info. she's got the range π
π CITATION π
Liu, Mingyi, and Andrei Grigoriev. "Fast parsers for Entrez Gene." Bioinformatics 21, no. 14 (2005): 3189-3190.
cite your sources bestie, it's the bare minimum and also academia is watching π₯
π» OPERATION SYSTEMS SUPPORTED π»
Any OS that Perl & Bioperl run on. so basically, wherever your faves already live π
π£ 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. π₯Ή
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. π
yes, "reponsive" is spelled like that in the original. we keep it. it's canon π
π 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> β legend behavior, honestly π«Ά
βοΈ 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 rendered by perl v5.38.2 on 2024-03-04, so shoutout to that exact perl doing the most for us. bye pookie, go index something π¦β¨
π¦ 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