Bio::ClusterIO(3pm)
π Bio::ClusterIO π
okay bestie, so this is a page from the User Contributed Perl Documentation and it's all about Bio::ClusterIO β your girl for cluster formats π§¬β¨
β¨ NAME β¨
Bio::ClusterIO β Handler for Cluster Formats π
πΈ SYNOPSIS πΈ
#NB: This example is unigene specific
use Bio::ClusterIO;
$stream = Bio::ClusterIO->new('-file' => "Hs.data",
'-format' => "unigene");
# note: we quote -format to keep older perl's from complaining.
while ( my $in = $stream->next_cluster() ) {
print $in->unigene_id() . "\n";
while ( my $sequence = $in->next_seq() ) {
print $sequence->accession_number() . "\n";
}
}
# Parsing errors are printed to STDERR.
no cap, that comment is telling you the truth: parsing errors get printed to STDERR π
π¦ DESCRIPTION π¦
So ClusterIO links up with the ClusterIO format module and they read all kinds of cluster formats together β like NCBI UniGene and friends. it's giving dynamic duo energy fr fr π
π CONSTRUCTORS π
π Bio::ClusterIO->new()
$str = Bio::ClusterIO->new(-file => 'filename',
-format=>$format);
The new() class method is the one that makes you a brand new Bio::ClusterIO object β¨ and once you've got it, you can use it to pull out cluster objects or print them. new() is taking these parameters, bestie:
-fileβ a file path that's gonna be opened for reading π-formatβ you tell it the format of the file here. supported formats include:
unigene *.data UniGene build files.
dbsnp *.xml dbSNP XML files
If you don't specify a format but you do give a filename, the module will try to deduce it from the filename π and if that doesn't work out? it just assumes the main UniGene build format. lowkey forgiving, we love that π
The format name is case insensitive. 'UNIGENE', 'UniGene' and 'unigene' all work, and so do dbSNP, dbsnp, and DBSNP β yes bestie, all of them, periodt π
π OBJECT METHODS π
Detailed summaries are down below, but here's the main character lineup:
β $cluster = $str->next_cluster()
Grabs the next cluster from the stream. that's it, that's the job π«Ά
β TIEHANDLE(), READLINE(), PRINT()
okay so these ones are still hanging around in here because they were in the SeqIO module β feedback appreciated, fr fr. Over there they provide the tie interface. peep perltie if you want the whole lore π
π FEEDBACK π
π Mailing Lists
User feedback is, like, integral to how this and every other Bioperl module grows and evolves π± so send your comments and suggestions, preferably to one of the Bioperl mailing lists. your participation is much appreciated bestie!!
bioperl-l@bioperl.org - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
π©· Support
Please send usage questions and support issues to the mailing list:
bioperl-l@bioperl.org
β rather than sliding into the module maintainer's DMs directly π so many experienced and responsive experts will be able to look at your problem and fix it fast. and please include a thorough description of the problem with code and data examples if at all possible π―
π Reporting Bugs
Report bugs to the Bioperl bug tracking system so we can keep track of the bugs and their resolutions. Bug reports can be submitted via the web:
https://github.com/bioperl/bioperl-live/issues
π« AUTHOR - Andrew Macgregor π«
Email andrew@anatomy.otago.ac.nz π§
π APPENDIX π
the rest of this doc spills the details on each object method. heads up: internal methods usually start with a _ π
π₯ new
Title : new
Usage : Bio::ClusterIO->new(-file => $filename, -format => 'format')
Function: Returns a new cluster stream
Returns : A Bio::ClusterIO::Handler initialised with the appropriate format
Args : -file => $filename
-format => format
π₯ format
Title : format
Usage : $format = $stream->format()
Function: Get the cluster format
Returns : cluster format
Args : none
π₯ next_cluster
Title : next_cluster
Usage : $cluster = $stream->next_cluster()
Function: Reads the next cluster object from the stream and returns it.
Returns : a L<Bio::ClusterI> compliant object
Args : none
π₯ cluster_factory
Title : cluster_factory
Usage : $obj->cluster_factory($newval)
Function: Get/set the object factory to use for creating the cluster
objects.
Example :
Returns : a L<Bio::Factory::ObjectFactoryI> compliant object
Args : on set, new value (a L<Bio::Factory::ObjectFactoryI>
compliant object or undef, optional)
π₯ object_factory
Title : object_factory
Usage : $obj->object_factory($newval)
Function: This is an alias to cluster_factory with a more generic name.
Example :
Returns : a L<Bio::Factory::ObjectFactoryI> compliant object
Args : on set, new value (a L<Bio::Factory::ObjectFactoryI>
compliant object or undef, optional)
π₯ _load_format_module
Title : _load_format_module
Usage : *INTERNAL ClusterIO stuff*
Function: Loads up (like use) a module at run time on demand
Example :
Returns :
Args :
π₯ _guess_format
Title : _guess_format
Usage : $obj->_guess_format($filename)
Function: guess format based on file suffix
Example :
Returns : guessed format of filename (lower case)
Args :
Notes : formats that _filehandle() will guess include unigene and dbsnp
and that's a wrap, bestie!! π this whole page is running on perl v5.34.0 and it was dated 2022-03-27, so go forth and parse those clusters, you absolute icon ππ
π¦ where this page comes from
- debian bookworm: libbio-cluster-perl 1.7.3-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libbio-cluster-perl 1.7.3-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libbio-cluster-perl 1.7.3-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libbio-cluster-perl 1.7.3-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libbio-cluster-perl 1.7.3-6 Β· 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