Bio::Matrix::IO(3pm)
π Bio::Matrix::IO β a factory for Matrix parsing π
okay bestie, so you found yourself a Bio::Matrix::IO manpage (that's the 3pm one, perl module docs, we love that for us) and you're like "what is this". Don't worry. I got you. This is the whole thing, no skips, no cap. π«Ά
β¨ SYNOPSIS β¨
use Bio::Matrix::IO;
my $parser = Bio::Matrix::IO->new(-format => 'scoring',
-file => 'BLOSUMN50');
my $matrix = $parser->next_matrix;
that's literally the whole vibe. make a parser, ask it for a matrix, slay. π
πΈ DESCRIPTION πΈ
So this is a general factory framework for writing parsers for Matricies. Yes, that's a whole framework just for making matrix parsers β it's giving infrastructure, it's giving "someone had to do it". π₯
It includes parsing output from distance output like PHYLIP's ProtDist. And lowkey the plan is that once their Matrix objects get written, it should be possible to fit parsers for PWM and PSSMs in here too. Future goals, bestie, we're manifesting them. π¦
π FEEDBACK π
Mailing Lists π
User feedback is an integral part of the evolution of this and other Bioperl modules. So like, your opinion genuinely matters here β send your comments and suggestions preferably to the Bioperl mailing list. Your participation is much appreciated, fr fr. π
bioperl-l@bioperl.org - General discussion
http://bioperl.org/wiki/Mailing_lists - 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. Bestie, I know, sliding into the maintainer's DMs feels faster, but there are many experienced and reponsive experts on the list who will be able look at the problem and quickly address it. So go where the experts are. π
And please include a thorough description of the problem with code and data examples if at all possible. The more detail the better β that's the difference between "helped instantly" and "three days of back and forth". β
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/bioperl-live/issues
no gatekeeping, just report it. π
π AUTHOR - Jason Stajich π
Email jason-at-bioperl-dot-org
π APPENDIX π
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _. (iykyk β if it starts with an underscore, it's private business, don't be nosy. π)
new
Title : new
Usage : my $obj = Bio::Matrix::IO->new();
Function: Builds a new Bio::Matrix::IO object
Returns : an instance of Bio::Matrix::IO
Args :
builds you a fresh, brand-new Bio::Matrix::IO object. main character energy, obviously. β¨
newFh
Title : newFh
Usage : $fh = Bio::Matrix::IO->newFh(-file=>$filename,-format=>'Format')
Function: does a new() followed by an fh()
Example : $fh = Bio::Matrix::IO->newFh(-file=>$filename,-format=>'Format')
$matrix = <$fh>; # read a matrix object
print $fh $matrix; # write a matrix object
Returns : filehandle tied to the Bio::SeqIO::Fh class
Args :
it does a new() and then an fh() β two steps, one call, efficiency queen. π§
fh
Title : fh
Usage : $obj->fh
Function: Get a filehandle type access to the matrix parser
Example : $fh = $obj->fh; # make a tied filehandle
$matrix = <$fh>; # read a matrix object
print $fh $matrix; # write a matrix object
Returns : filehandle tied to Bio::Matrix::IO class
Args : none
gives you filehandle-style access to the matrix parser. read a matrix with < $fh >, write one with print $fh $matrix. so clean, so tidy. π
format
Title : format
Usage : $format = $obj->format()
Function: Get the matrix format
Returns : matrix format
Args : none
just hands you the matrix format. that's it. that's the method. iconic behavior honestly. π
next_matrix
Title : next_matrix
Usage : my $matrix = $matixio->next_matrix;
Function: Parse the next matrix from the data stream
Returns : L<Bio::Matrix::MatrixI> type object or undef when finished
Args : none
parses the next matrix off the data stream. you get a L<Bio::Matrix::MatrixI> type object back β or undef when it's all done. when you hit that undef, that's your cue to stop asking. periodt. π
write_matrix
Title : write_matrix
Usage : $io->write_matrix($matrix)
Function: Writes a matrix out to the data stream
Returns : none
Args : Array of Bio::Matrix::MatrixI object
- note that not all matricies can be converted to
each format, beware with mixing matrix types and output formats
writes a matrix out to the data stream. returns nothing, it just does the thing. π
β οΈ heads up bestie: not all matricies can be converted to each format. so beware with mixing matrix types and output formats. that's a real "you were warned" moment, don't come crying to me. π
_load_format_module
Title : _load_format_module
Usage : *INTERNAL Matrix::IO stuff*
Function: Loads up (like use) a module at run time on demand
internal Matrix::IO stuff β it loads up (like use) a module at run time on demand. dynamic, mysterious, does not want to be perceived. π
_guess_format
Title : _guess_format
Usage : $obj->_guess_format($filename)
Returns : guessed format of filename (lower case)
Args : filename
takes a filename and returns the guessed format of that filename, in lower case. it's a detective. a lowercase detective. π
that's the whole page, bestie β every flag, every method, every word. you're basically a Bioperl expert now. go forth and parse. π
signing off with love: this was Bio::Matrix::IO(3pm) from the User Contributed Perl Documentation, version perl v5.32.1, dated 2021-08-15. mwah. π
π¦ where this page comes from
- debian bookworm: libbio-perl-perl 1.7.8-1 Β· Perl
- debian trixie: libbio-perl-perl 1.7.8-1 Β· Perl
- ubuntu jammy: libbio-perl-perl 1.7.8-1 Β· Perl
- ubuntu noble: libbio-perl-perl 1.7.8-1 Β· Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms