TFBS::Matrix(3pm)
π NAME π
TFBS::Matrix β bestie, it's the base class for matrix patterns, and it's holding all the methods that literally every one of them shares π«Ά
β¨ DESCRIPTION β¨
okay so TFBS::Matrix is a base class. What does that mean fr fr? It's the blueprint. It's giving main character energy but it does not get instantiated itself, okay? No solo debut for this one π
What it actually is: a universal constructor that its subclasses (TFBS::Matrix::*) call whenever they need to be born, plus a whole lil collection of matrix manipulation methods that don't care what type of matrix you handed them. Type-independent. Universal. Iconic.
Not meant to be instantiated itself. So don't try it, bestie, that's not her role πΈ
π£ FEEDBACK π£
Found a bug? Got thoughts? Comments? Not me gatekeeping feedback β please send bug reports and other comments to the author <3
π AUTHOR - Boris Lenhard π
Boris Lenhard <Boris.Lenhard@cgb.ki.se>
Modified by Eivind Valen eivind.valen@gmail.com β¨
π APPENDIX π
The rest of the documentation details each of the object methods. Heads up: internal methods are preceded with an underscore β iykyk, those are the behind-the-scenes girlies π
π§ matrix
- Title:
matrix - Usage:
my $matrix = $pwm->matrix();
$pwm->matrix( [ [12, 3, 0, 0, 4, 0],
[ 0, 0, 0,11, 7, 0],
[ 0, 9,12, 0, 0, 0],
[ 0, 0, 0, 1, 1,12]
]);
- Function: it's the get/set for the matrix data β grab it or set it, your call π
- Returns: a reference to a 2D array of integers (PFM) or floats (ICM, PWM)
- Args: none for a get; for a set you can pass a four line string, a reference to 2D array, or a 2D piddle
π¦ pdl_matrix
- Title:
pdl_matrix - Usage:
my $pdl = $pwm->pdl_matrix(); - Function: access the PDL matrix used to store the actual matrix data, directly β no middleman, no filter π«Ά
- Returns: a PDL object, aka a piddle</piddle>
- Args: none
π revcom
- Title:
revcom - Usage:
my $revcom_pfm = $pfm->revcom(); - Function: create a matrix pattern object which is the reverse complement of the current one β flip it and reverse it π₯
- Returns: a
TFBS::Matrix::*object of the same type as the one the method acted upon - Args: none
π rawprint
- Title:
rawprint - Usage:
my $rawstring = $pfm->rawprint); - Function: convert matrix data to a simple, tab-separated format
- Returns: a four-line string of tab-separated integers or floats
- Args: none
π prettyprint
- Title:
prettyprint - Usage:
my $prettystring = $pfm->prettyprint(); - Function: convert matrix data to a human-readable string format β the glow-up version β¨
- Returns: a four-line string with nucleotides and aligned numbers
- Args: none
β STAMPprint
- Title:
STAMPprint - Usage:
my $STAMPstring = $pfm->STAMPprint(); - Function: convert the matrix to a STAMP readable format
- Returns: a string of the matrix in a TRANSFAC like format for STAMP
- Args: none
π length
- Title:
length - Usage:
my $pattern_length = $pfm->length; - Function: gets the pattern length in nucleotides β that's the number of columns in the matrix, bestie
- Returns: an integer
- Args: none
π randomize_columns
- Title:
randomize_columns - Usage:
$pfm->randomize_columns(); - Function: randomizes the columns of a matrix, in place β yes, it messes with the original, that's the whole point π
- Returns: nothing
- Args: none
okay bestie that's the whole page, no cap π this was TFBS::Matrix(3pm) from the User Contributed Perl Documentation, sitting pretty at perl v5.42.3 and dated 2026-08-21. slay, go forth and matrix πΈπ
π¦ where this page comes from
- ubuntu stonking: libtfbs-perl 0.7.1+ds-6build1 Β· Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms