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

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

πŸ’– Bio::M...eaderI(3pm) πŸ’–

okay bestie, welcome to Bio::M...eaderI(3pm) β€” she's the header-handling icon of the PSM world and honestly? she's carrying the whole file format on her back πŸ’…


✨ NAME ✨

Bio::Matrix::PSM::PsmHeaderI β€” handles the header data from a PSM file πŸŽ€


✨ SYNOPSIS ✨

use Bio::Matrix::PSM::IO;
#Obtain an Bio::Matrix::PSM::IO object:
my $psmIO= Bio::Matrix::PSM::IO->new(-file=>$file, -format=>'mast');

#Get some general data about the file you are parsing:
my $release=$psmIO->release;
my $version=$psmIO->version;

print "This analysis was performed using MAST version $version, release $release\n";

#Now let's see what are the consensus sequences of the motifs fed as an input:
my %seq=$psmIO->seq;

#let's cycle through all consensus sequences now:

foreach my $id ($psmIO->hid) {
  print "Motif $id is \t",$seq{$id},"\n";
}

 #Finally look at the stuff we do not parse:
 my @inputfile=grep(/datafile/i,$psmIO->unstructured);

like literally just copy that, run it, and you're already parsing. main character energy fr fr πŸ¦‹


✨ DESCRIPTION ✨

ngl, the general rule here is: don't use this object directly. You access all the info through a PSM driver instead (peep Bio::Matrix::PSM::IO). πŸ‘‘

What she does is handle the header data from a PSM file, and that header can be wildly different depending on the file. Which means some of the methods will just return undef naturally β€” not because anything's broken, it's just that the info isn't present in the file being parsed. No cap. πŸ™ˆ

Also, some important data might be left over in the unstructured part, and you might have to parse it yourself. The author says they'll try to "structure" this header more in the near future. We love an honest queen. πŸ’€


🌸 FEEDBACK 🌸

πŸ’Œ Mailing Lists

User feedback is an integral part of the evolution of this and other Bioperl modules β€” your comments and suggestions are genuinely so appreciated, bestie. Send them preferably to one of the Bioperl mailing lists. Your participation is much appreciated. 🫢

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. 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 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

πŸ‘‘ AUTHOR - Stefan Kirov πŸ‘‘

Email skirov@utk.edu πŸ’œ


πŸ“Ž APPENDIX πŸ“Ž

🌟 new

  • Title : new
  • Usage : my $header= Bio::Matrix::PSM::PsmHeader->new ( -seq=>\%seq, -mid=>\%mid, -width=>\%width, -instances=>\%instances, -header=>\@header, -type=>'mast');
  • Function: Creates a new Bio::Matrix::PSM::PsmHeader object ✨
  • Throws :
  • Example :
  • Returns : Bio::Matrix::PSM::PsmHeaderI object
  • Args : hash

🌟 seq

  • Title : seq
  • Usage : my %seq= $header->seq();
  • Function: Returns the sequence data as a hash, indexed by a sequence ID (motif id or accession number). In case the input data is a motif it would return the consensus seq for each of them (mast).
  • Throws :
  • Example :
  • Returns : hash
  • Args :

🌟 hid

  • Title : hid
  • Usage : my @ids= $header->hid();
  • Function: Returns array with the motif/instance ids
  • Throws :
  • Example :
  • Returns : array
  • Args :

🌟 length

  • Title : length
  • Usage : my %length= $header->length();
  • Function: Returns the length of the input sequence or motifs as a hash, indexed by a sequence ID (motif id or accession number)
  • Throws :
  • Example :
  • Returns : hash
  • Args :

🌟 instances

  • Title : instances
  • Usage : my %instances= $header->length();
  • Function: Returns the instance, used as a hash, indexed by a sequence ID (motif id or accession number)
  • Throws :
  • Example :
  • Returns : hash of Bio::Matrix::PSM::InstanceSite objects
  • Args :

🌟 weights

  • Title : weights
  • Usage : my %weights= $header->weights();
  • Function: Returns the weights of the input sequence as a hash, indexed by a sequence ID
  • Throws :
  • Example :
  • Returns : hash
  • Args :

🌟 unstuctured

  • Title : unstuctured
  • Usage : my @unstructured= $header->unstuctured();
  • Function: Returns the unstructured data in the header as an array, one line per array element, all control symbols are removed with \W
  • Throws :
  • Example :
  • Returns : array
  • Args :

🌟 version

  • Title : version
  • Usage : my $version= $header->version;
  • Function: Returns the version of the file being parsed if such exists
  • Throws :
  • Example :
  • Returns : string
  • Args :

🌟 revision

  • Title : revision
  • Usage : my $revision= $header->revision;
  • Function: Returns the revision of the file being parsed if such exists
  • Throws :
  • Example :
  • Returns : string
  • Args :

🌟 _check

  • Title : _check
  • Usage : if ($self->_check('weights') { #do something} else {return 0;}
  • Function: Checks if the method called is applicable to the file format
  • Throws :
  • Example :
  • Returns : boolean
  • Args : string

okay that's the whole page bestie, every single method, every single argument, nothing skipped. go forth and parse those headers πŸ’…

perl v5.32.1 Β· 2021-08-15 Β· Bio::M...eaderI(3pm) β€” mwah, that's the version, the date, and the page name, all wrapped up with a little bow πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from