TFBS::...nsensus(3pm)
TFBS::...nsensus(3pm)
okay so bestie, real quick before we dive in: this is a page from the User Contributed Perl Documentation, and the manual name up top is literally TFBS::...nsensus(3pm) π
so that's the one we're reading. Keep that in your pocket.
β¨ NAME β¨
TFBS::Word β IUPAC DNA consensus word-based pattern class
and yes, the actual NAME line in the original has =head1 DESCRIPTION glued onto the end of it with zero shame π pod podding, we love to see it.
π¦ DESCRIPTION π¦
TFBS::Word is a base class, okay? It's giving "universal constructor that my subclasses call" energy β those subclasses are the TFBS::Matrix::* crew. On top of that it brings word pattern manipulation methods that don't care what flavour of word you're working with.
It is not meant to be instantiated itself, bestie. It's a base class. Do not come for it directly. Respect the hierarchy π«Ά
π£ FEEDBACK π£
Got a bug? Got a comment? Got feelings? Please send bug reports and other comments to the author. That's the whole vibe.
π AUTHOR - Boris Lenhard π
Boris Lenhard <Boris.Lenhard@cgb.ki.se>
π APPENDIX π
The rest of this documentation details each of the object methods. Internal methods are preceded with an underscore. (iykyk, that leading _ is your little secret-handshake signifier β¨)
πΌ new
- Title:
new - Usage:
my $pwm = TFBS::Matrix::PWM->new(%args) - Function: constructor for the
TFBS::Matrix::PWMobject - Returns: a new
TFBS::Matrix::PWMobject - Args: you must specify the
-wordargument:
# you must specify the -word argument:
-word, # a strig consisting of letters in
# IUPAC degenerate DNA alphabet
# (any of ACGTSWKMPYBDHVN)
#######
-name, # string, OPTIONAL
-ID, # string, OPTIONAL
-class, # string, OPTIONAL
-tags # a hash reference reference, OPTIONAL
so -word is the only mandatory one β it's a string built out of the IUPAC degenerate DNA alphabet, and the letters you're allowed are exactly ACGTSWKMPYBDHVN πΈ (yes the original says "strig", yes we're leaving it, it's iconic and also not our business π)
then you've got your optionals: -name, -ID, -class, and -tags, which is a hash reference reference π β that's the manpage's words, not mine, and everything there is a string, OPTIONAL except the hash ref. The ####### divider? Also theirs. Cute.
π search_seq
- Title:
search_seq - Usage:
my $siteset = $pwm->search_seq(%args) - Function: scans a nucleotide sequence with the pattern represented by the PWM
- Returns: a
TFBS::SiteSetobject - Args: you must specify either one of the following three:
-file, # the name od a fasta file (single sequence)
#or
-seqobj # a Bio::Seq object
# (more accurately, a Bio::PrimarySeqobject or a
# subclass thereof)
#or
-seqstring # a string containing the sequence
-max_mismatches, # number of allowed positions in the site that do
# not match the consensus
# OPTIONAL: default 0
so you pick one of -file (the name of a fasta file, and it's a single sequence bestie, don't get cute), or -seqobj (a Bio::Seq object β more accurately a Bio::PrimarySeqobject or a subclass of it), or -seqstring (just a plain old string holding the sequence). one of the three. pick one. π
and then -max_mismatches is the number of allowed positions in the site that do not match the consensus. It's OPTIONAL with a default of 0 β so by default every position has to match, periodt.
π search_aln
- Title:
search_aln - Usage:
my $site_pair_set = $pwm->search_aln(%args) - Function: scans a pairwise alignment of nucleotide sequences with the pattern represented by the word. So here's the tea: it reports only those hits that
- are present in equivalent positions of both sequences, and
- exceed a specified threshold score in both, AND
- are found in regions of the alignment above the specified conservation cutoff value
- Returns: a
TFBS::SitePairSetobject - Args: you must specify either one of the following three:
-file, # the name of the alignment file in Clustal
format
#or
-alignobj # a Bio::SimpleAlign object
# (more accurately, a Bio::PrimarySeqobject or a
# subclass thereof)
#or
-alignstring # a multi-line string containing the alignment
# in clustal format
#############
-max_mismatches, # number of allowed positions in the site that do
# not match the consensus
# OPTIONAL: default 0
-window, # size of the sliding window (inn nucleotides)
# for calculating local conservation in the
# alignment
# OPTIONAL: default 50
-cutoff # conservation cutoff (%) for including the
# region in the results of the pattern search
# OPTIONAL: default "70%"
so again, pick one: -file (the name of the alignment file in Clustal format), or -alignobj (a Bio::SimpleAlign object β more accurately a Bio::PrimarySeqobject or a subclass thereof, same deal as before), or -alignstring (a multi-line string containing the alignment, in clustal format).
then the optionals:
-max_mismatchesβ number of allowed positions in the site that do not match the consensus. OPTIONAL, default0. same as above, no slips allowed unless you say so.-windowβ size of the sliding window, in nucleotides, for calculating local conservation in the alignment. OPTIONAL, default50. (the original says "inn nucleotides", and honestly? inn. we're keeping inn π§)-cutoffβ conservation cutoff, in percent, for including the region in the results of the pattern search. OPTIONAL, default"70%"β yes with the quotes, that's how it's written, don't @ me.
heads up supernatural beings: only regions above that conservation cutoff even get to play, and the hit has to clear the score in both sequences at equivalent positions. it's not a vibe check, it's a whole audit π
π and then... the mystery trio
okay so the page just ends with these three method names listed, and that is all it says about them:
to_PWMvalidate_wordlength
no title, no usage, no function, no returns, no args. just... names. floating. main character energy with zero backstory π that's the entire documentation for them, bestie, and I refuse to invent anything on their behalf. what you see is what you get.
and that's the whole page, no cap. every option, every default, every typo, every #or, all of it. π«Ά
written by Boris Lenhard <Boris.Lenhard@cgb.ki.se>, shipping as part of perl v5.42.3 with a date stamp of 2026-08-21, filed under TFBS::...nsensus(3pm) π go forth and build consensus, queen πβ¨
π¦ 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