.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Bio::Matrix::PSM::PsmI 3pm" .TH Bio::Matrix::PSM::PsmI 3pm "2021-08-15" "perl v5.32.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Bio::Matrix::PSM::PsmI \- abstract interface to handler of site matricies .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Bio::Matrix::PSM::IO; \& \& # To get a Psm object from a file use the Psm parser: \& my $psmIO = Bio::Matrix::PSM::IO\->new(\-format=>\*(Aqmeme\*(Aq, \-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 \& } \& } \& \& # or create from memmory: \& my $psm= Bio::Matrix::PSM::Psm\->new( \-pA=>\e@pA,\-pC=>\e@pC,\-pG=>\e@pG,\-pT=>\e@pT, \& \-id=>$id, \& \-instances=>$instances, \-e_val=>$e_val, \& \-IC=>$ic, \-width=>$width, \-sites=>$sites) \& \& # where pA through pG are the respective frequencies of the matrix (see also \& # Bio::Matrix::PSM::SiteMatrix), and everything else is self\-explenatory, \& # except for \& #\-instances (reference to an array of Bio::Matrix::PSM::InstanceSite objects) \& # which is documented below. .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Supposed to handle a combination of site matrices and/or their corresponding sequence matches (instances). This object inherits from Bio::Matrix::PSM::SiteMatrix, so you can use the respective methods. It may hold also an array of Bio::Matrix::PSM::InstanceSite object, but you will have to retrieve these through Bio::Matrix::PSM::Psm\->instances method (see below). To some extent this is an expanded SiteMatrix object, holding data from analysis that also deal with sequence matches of a particular matrix. .SS "\s-1DESIGN ISSUES\s0" .IX Subsection "DESIGN ISSUES" This design is a bit of a compromise, so it might be a temporary solution I am mixing \s-1PSM\s0 with \s-1PSM\s0 sequence matches Though they are very closely related, I am not satisfied by the way this is implemented here. Heikki suggested different objects when one has something like meme But does this mean we have to write a different objects for mast, meme, transfac, theiresias, etc.? To me the best way is to return SiteMatrix object + arrray of InstanceSite objects and then mast will return undef for SiteMatrix and transfac will return undef for InstanceSite. Probably I cannot see some other design issues that might arise from such approach, but it seems more straightforward. Hilmar does not like this because it is an exception from the general BioPerl rules Should I leave this as an option? Also the header rightfully belongs the driver object, and could be retrieved as hashes. I do not think it can be done any other way, unless we want to create even one more object with very unclear content. .SH "SEE ALSO" .IX Header "SEE ALSO" Bio::Matrix::PSM::SiteMatrix, Bio::Matrix::PSM::IO::meme, Bio::Matrix::PSM::IO::transfac, Bio::Matrix::PSM::InstanceSite .SH "FEEDBACK" .IX Header "FEEDBACK" .SS "Mailing Lists" .IX Subsection "Mailing Lists" User feedback is 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. .PP .Vb 2 \& bioperl\-l@bioperl.org \- General discussion \& http://bioperl.org/wiki/Mailing_lists \- About the mailing lists .Ve .SS "Support" .IX Subsection "Support" Please direct usage questions or support issues to the mailing list: .PP \&\fIbioperl\-l@bioperl.org\fR .PP 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. .SS "Reporting Bugs" .IX Subsection "Reporting Bugs" Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web: .PP .Vb 1 \& https://github.com/bioperl/bioperl\-live/issues .Ve .SH "AUTHOR \- Stefan Kirov" .IX Header "AUTHOR - Stefan Kirov" Email skirov@utk.edu .SH "DISCLAIMER" .IX Header "DISCLAIMER" This software is provided \*(L"as is\*(R" without warranty of any kind. .SH "APPENDIX" .IX Header "APPENDIX" .SS "new" .IX Subsection "new" .Vb 12 \& Title : new \& Usage : my $psm= Bio::Matrix::PSM::Psm\->new( \-pA=>\e@pA,\-pC=>\e@pC,\-pG=>\e@pG, \& \-pT=>\e@pT,\-id=>$id, \& \-instances=>$instances, \& \-e_val=>$e_val, \& \-IC=>$ic, \-width=>$width, \& \-sites=>$sites) \& Function: Creates a new Bio::Matrix::PSM::Psm object \& Throws : \& Example : \& Returns : Bio::Matrix::PSM::Psm object \& Args : hash .Ve .SS "instances" .IX Subsection "instances" .Vb 8 \& Title : instances \& Usage : my @instances=@{$psm\->instances}; \& Function: Gets/sets the instances (Bio::Matrix::PSM::InstanceSite objects) \& associated with the Psm object \& Throws : \& Example : \& Returns : array reference (Bio::Matrix::PSM::InstanceSite objects) \& Args : array reference (Bio::Matrix::PSM::InstanceSite objects) .Ve .SS "matrix" .IX Subsection "matrix" .Vb 7 \& Title : matrix \& Usage : my $matrix=$psm\->matrix; \& Function: Gets/sets the SiteMatrix related information \& Throws : \& Example : \& Returns : Bio::Matrix::PSM::SiteMatrix objects \& Args : Bio::Matrix::PSM::SiteMatrix objects .Ve .SS "header" .IX Subsection "header" .Vb 10 \& Title : header \& Usage : my %header=$psm\->header; \& my $ic=$psm\->header(\*(AqIC\*(Aq); \& Function: Gets the general information, common for most files, dealing \& with PSM such as information content (IC), score (e\-value, \& etc.), number of sites (sites) and width. This list may \& expand. The current list should be in \& @Bio::Matrix::PSM::Psm::HEADER. Returns undef if an argument \& is supplied that is not in @Bio::Matrix::PSM::meme::HEADER. \& Throws : \& Example : \& Returns : hash or string \& Args : string (IC, e_val...) .Ve