Bio::M...ProtPsm(3pm)

πŸ“¦
version 1.7.8 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’– 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::ProtPsm object πŸ’–
  • Throws: (nothing listed)
  • Example: (nothing listed)
  • Returns: Bio::Matrix::PSM::Psm object
  • Args: hash

πŸ¦‹ instances

  • Title: instances
  • Usage: my @instances=@{$psm->instances};
  • Function: gets/sets the instances (Bio::Matrix::PSM::InstanceSite objects) associated with the Psm object ✨
  • Throws: (nothing listed)
  • Example: (nothing listed)
  • Returns: array reference (Bio::Matrix::PSM::InstanceSite objects)
  • Args: array reference (Bio::Matrix::PSM::InstanceSite objects)
  • 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::SiteMatrix objects
  • Args: Bio::Matrix::PSM::SiteMatrix objects

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