Bio::M...ProtPsm(3pm)
π Bio::M...ProtPsm(3pm) π
okay bestie, so this is Bio::M...ProtPsm(3pm), straight out of the User Contributed Perl Documentation collection. grab a snack, we're doing matrix stuff πΈ
β¨ NAME β¨
Bio::Matrix::PSM::ProtPsm β handle combination of site matricies
(yes, "matricies". that's how it's written. we don't fix it, we honor it π )
β¨ SYNOPSIS β¨
use Bio::Matrix::PSM::IO;
#To get a ProtPsm object from a file use the Psm parser:
my $psmIO = Bio::Matrix::PSM::IO->new(-format=>'psiblast', -file=>$file);
# Now go through all entities in the file with next_psm, which
# returns a Psm object see Bio::Matrix::PSM::IO for detailed
# documentation (matrix predictions or matrix sequence matches or
# both):
while (my $psm=$psmIO->next_psm) {
my %psm_header = $psm->header;
my $ic = $psm_header{IC};
my $sites = $psm_header{sites};
my $width = $psm_header{width};
my $score = $psm_header{e_val};
my $IUPAC = $psm->IUPAC;
my $instances = $psm->instances;
foreach my $instance (@{$instances}) {
my $id = $instance->primary_id;
#Do something with the id
}
}
β¨ DESCRIPTION β¨
so this class is here to handle a combination of site matrices and/or their matching sequence matches (we call those instances, slay). π¦
it inherits from Bio::Matrix::PSM::ProtMatrix, so literally all the methods from that class are yours to use, no cap. it can also hold an array of Bio::Matrix::PSM::InstanceSite objects β but you gotta go get those yourself through the Bio::Matrix::PSM::ProtPsm->instances method (peep below π). think of it as, to some extent, an expanded ProtMatrix β one that also carries data from analysis that deals with sequence matches of a particular matrix.
π DESIGN ISSUES π
okay so this is the part where the author is like "ngl this doesn't fully make sense to me" and we respect the honesty ππ
this does not make too much sense to them β they're mixing PSM with PSM sequence matches. even though the two are very closely related, they're not satisfied with how it's implemented here.
Heikki suggested different objects when you've got something like meme. but does that mean we have to write a whole different object for mast, meme, transfac, theiresias, etc.? the author thinks the best way is to return a SiteMatrix object + array of InstanceSite objects, and then mast will return undef for SiteMatrix and transfac will return undef for InstanceSite. probably they can't see some other design issues that might arise from that approach, but it seems more straightforward.
Hilmar does not like it because it's an exception from the general BioPerl rules π. should it be left as an option? also, the header rightfully belongs to the driver object and could be retrieved as hashes. the author doesn't think it can be done any other way, unless we want to create even one more object with very unclear content. π
β¨ FEEDBACK β¨
π Mailing Lists
user feedback is literally an integral part of the evolution of this and other Bioperl modules π«Ά send your comments and suggestions preferably to one of the Bioperl mailing lists. 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. there are many experienced and responsive experts who will be able to look at the problem and quickly address it π. if at all possible, please include a thorough description of the problem with code and data examples. receipts help, bestie.
π Reporting Bugs
report bugs to the Bioperl bug tracking system so we can keep track of the bugs and their resolution β¨ bug reports can be submitted via the web:
https://github.com/bioperl/bioperl-live/issues
π AUTHOR - James Thompson π
Email tex@biosysadmin.com
π DISCLAIMER π
This software is provided "as is" without warranty of any kind.
that's the whole disclaimer. no warranty, no promises, no nothing. iconic honestly.
π SEE ALSO π
ProtMatrix, meme, transfac, psiblast, InstanceSite
π APPENDIX π
π§ new
- Title:
new - Usage:
my $psm = Bio::Matrix::PSM::ProtPsm->new(
-pS => [ '0', '33', '0', '16', '1', '12', '11', '25' ],
-pF => [ '0', '0', '2', '0', '3', '0', '0', '0' ],
-pT => [ '0', '8', '7', '10', '1', '2', '7', '8' ],
-pN => [ '0', '0', '2', '13', '0', '36', '1', '4' ],
-pK => [ '0', '5', '0', '13', '1', '15', '0', '2' ],
-pY => [ '0', '0', '0', '0', '0', '0', '0', '0' ],
-pE => [ '0', '41', '1', '12', '0', '0', '0', '15' ],
-pV => [ '0', '3', '9', '0', '2', '0', '3', '1' ],
-pQ => [ '0', '0', '0', '15', '0', '4', '0', '3' ],
-pM => [ '100', '0', '66', '0', '2', '0', '0', '0' ],
-pC => [ '0', '0', '0', '0', '0', '0', '0', '0' ],
-pL => [ '0', '0', '8', '0', '25', '0', '4', '0' ],
-pA => [ '0', '10', '1', '9', '2', '0', '22', '16' ],
-pW => [ '0', '0', '0', '0', '0', '0', '0', '0' ],
-pP => [ '0', '0', '0', '0', '3', '1', '45', '0' ],
-pH => [ '0', '0', '0', '0', '0', '0', '1', '0' ],
-pD => [ '0', '0', '1', '7', '2', '2', '0', '22' ],
-pR => [ '0', '0', '0', '3', '0', '27', '0', '0' ],
-pI => [ '0', '0', '3', '0', '59', '1', '2', '3' ],
-pG => [ '0', '0', '0', '1', '0', '0', '4', '1' ],
-IC => $ic,
-sites => $istes,
-width => $width,
-e_val => $e_val,
-instances => $instances,
}
- Function: creates a brand new
Bio::Matrix::PSM::ProtPsmobject π - Throws: (nothing listed)
- Example: (nothing listed)
- Returns:
Bio::Matrix::PSM::Psmobject - Args: hash
π¦ instances
- Title:
instances - Usage:
my @instances=@{$psm->instances}; - Function: gets/sets the instances (
Bio::Matrix::PSM::InstanceSiteobjects) associated with the Psm object β¨ - Throws: (nothing listed)
- Example: (nothing listed)
- Returns: array reference (
Bio::Matrix::PSM::InstanceSiteobjects) - Args: array reference (
Bio::Matrix::PSM::InstanceSiteobjects)
π header
- Title:
header - Usage:
my %header=$psm->header;
my $ic=$psm->header('IC');
- Function: gets the general info that's common to most files dealing with PSM β stuff like information content (IC), score (e-value, etc.), number of sites (sites) and width. this list may expand, bestie π. the current list should live in
@Bio::Matrix::PSM::Psm::HEADER. and if you hand it an argument that isn't in@Bio::Matrix::PSM::meme::HEADER, it returns an epty list. (that's a typo in the source, we're keeping it, periodt.) - Throws: (nothing listed)
- Example: (nothing listed)
- Returns: hash or string
- Args: string (
IC,e_val...)
π matrix
- Title:
matrix - Usage:
my $matrix = $psm->matrix; - Function: gets/sets the SiteMatrix-related information π
- Throws: (nothing listed)
- Example: (nothing listed)
- Returns:
Bio::Matrix::PSM::SiteMatrixobjects - Args:
Bio::Matrix::PSM::SiteMatrixobjects
and that's the whole page, no notes π this was Bio::M...ProtPsm(3pm) from perl v5.32.1, dated 2021-08-15 β shoutout to the User Contributed Perl Documentation girlies, you ate πβ¨π«Ά
π¦ 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