TFBS::Site(3pm)
π TFBS::Site β bestie edition π
okay so welcome to TFBS::Site(3pm), the Perl manual page you're gonna actually enjoy reading for once. grab a boba, sit down, let's get into it π§β¨
β¨ NAME β¨
TFBS::Site β it's a nucleotide sequence feature object, and what it represents is a (possibly putative) transcription factor binding site. yes really. that's the whole vibe. π§¬π
πΈ SYNOPSIS πΈ
here's the moment you've been waiting for, the code, untouched, iconic, no notes:
# manual creation of site object;
# for details, see documentation of Bio::SeqFeature::Generic;
my $site = TFBS::Site
(-start => $start_pos, # integer
-end => $end_pos, # integer
-score => $score, # float
-source => "TFBS", # string
-primary => "TF binding site", # primary tag
-strand => $strand, # -1, 0 or 1
-seqobj => $seqobj, # a Bio::Seq object whose sequence
# contains the site
-pattern => $pattern_obj # usu. TFBS::Matrix:PWM obj.
-);
# Searching sequence with a pattern (PWM) and retrieving individual sites:
#
# The following objects should be defined for this example:
# $pwm - a TFBS::Matrix::PWM object
# $seqobj - a Bio::Seq object
# Consult the documentation for the above modules if you do not know
# how to create them.
# Scanning sequence with $pwm returns a TFBS::SiteSet object:
my $site_set = $pwm->search_seq(-seqobj => $seqobj,
-threshold => "80%");
# To retrieve individual sites from $site_set, create an iterator obj:
my $site_iterator = $site_set->Iterator(-sort_by => "score");
while (my $site = $site_iterator->next()) {
# do something with $site
}
like, look at that. beautiful. no cap. π
π¦ DESCRIPTION π¦
so a TFBS::Site object is literally just holding data for a transcription factor binding site on a nucleotide sequence β could be predicted, could be real, doesn't matter, it's holding it. what data? start, end, strand, score, tags, plus references to the sequence object and the pattern object it's vibing with. π¦
and the best part: TFBS::Site is a subclass of Bio::SeqFeature::Generic, which means it inherited all of that module's methods. main character energy honestly. π
on top of all that, it also has its own pattern() method β that's the accessor for the pattern object hanging out with the site object. π
π¬ FEEDBACK π¬
got a bug? got thoughts? got feelings? send bug reports and other comments to the author. they wanna hear it, fr fr.
π AUTHOR - Boris Lenhard π
Boris Lenhard <Boris.Lenhard@cgb.ki.se>
π APPENDIX π
everything else you need to know about the object methods lives right here. and heads up: internal methods are preceded with an underscore, so if you see a _ bestie, that's a private one, mind ya business π
also, reminder, because it matters: TFBS::Site is a class that extends Bio::SeqFeature::Generic. so for other available methods, please go consult the Bio::SeqFeature::Generic documentation. i'm not gatekeeping, i'm just telling you where the rest of the lore is πβ¨
π§ new
- Title β
new - Usage β
my $site = TFBS::Site->new(%args) - Function β constructor for the
TFBS::Siteobject. it makes the thing. β¨ - Returns β a
TFBS::Siteobject - Args β
-start, β integer-end, β integer-strand, β-1,0or1-score, β float-source, β string (method used to detect it)-primary, β string (primary tag)-seqobj, β aBio::Seqobject-patternβ a pattern object, usu.TFBS::Matrix::PWM
π pattern
- Title β
pattern - Usage β
my $pattern = $site->pattern(); # gets the pattern
$site->pattern($pwm); # sets the pattern to $pwm
- Function β gets/sets the pattern object associated with the site
- Returns β pattern object, here a
TFBS::Matrix::PWMobject - Args β pattern object (optional, for setting the pattern only)
π rel_score
- Title β
rel_score - Usage β
my $percent_score = $site->rel_score() * 100; # gets the pattern - Function β gets the relative score (between
0.0to1.0) with respect of the score range of the associated pattern (matrix) - Returns β floating point number between
0and1, orundefif pattern not defined - Args β none
π₯ GFF
- Title β
GFF - Usage β
print $site->GFF();
print $site->GFF($gff_formatter)
- Function β returns a "standard" GFF string β the
"generic"gff_stringmethod is left untouched for possible customizations - Returns β a string (NOT newline terminated! ) π€
- Args β a
$gff_formatterfunction reference (optional)
πΈ the inherited ones πΈ
location start end length score frame sub_SeqFeature add_sub_SeqFeature flush_sub_SeqFeature primary_tag source_tag has_tag add_tag_value each_tag_value all_tags remove_tag attach_seq seq entire_seq seq_id annotation gff_format gff_string
all of the above methods are inherited from Bio::SeqFeature::Generic. please see Bio::SeqFeature::Generic for details on their usage β that's where the full tea is at βπ«Ά
and that's the page!! this was TFBS::Site from perl v5.42.3, dated 2026-08-21, and it's literally the TFBS::Site(3pm) manpage, xoxo, go write some bomb Perl πππ¦ periodt β¨
π¦ 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