Bio::T...::Motif(3pm)
π Bio::T...::Motif(3pm) β bestie's guide to the Motif module π
okay so you're here for Bio::Tools::Motif and honestly? iconic choice. it's a Perl implementation of the Motif protein subcellular localization method, and we're gonna go through the whole thing together, no skips, no cap. π§β¨
β¨ NAME β¨
Bio::Tools::Motif β a whole Perl implementation of the Motif protein subcellular localization method. that's the vibe. that's the whole thing. π
πΈ SYNOPSIS πΈ
here's the whole flow, copy it, love it, run it:
use Bio::Tools::Motif;
# Load a previously trained model from a file.
$motif = new Bio::Tools::Motif(-database => 'motif-db.txt');
# Attempt to match on a Bio::Seq object.
@matches = $motif->match($seq);
print($seq->display_id . ": matched " . $_->motif_id . "\n") for(@matches);
# Save the database to a file.
$motif->save('motif-db.txt.new');
# Load a database from a file.
$motif->load('motif-db.txt.new');
# Add a new Bio::Tools::Motif::Pattern.
$motif->add_pattern($pattern);
literally load it, match it, save it, load it again, add a pattern. the full character arc. π
π¦ DESCRIPTION π¦
so Bio::Tools::Motif rolls with a selection of motifs that have been identified as typical of proteins that live at a specific subcellular localization. like, "these proteins hang out here, and these motifs are their little tell." π«Ά
you hand it a Bio::Seq object, it tries to match it against a database, and if it succeeds it hands you back one or more Bio::Tools::Motif::Match objects stuffed with the prediction information. that's the whole plot. main character energy fr fr. π
π CONSTRUCTOR π
$motif = new Bio::Tools::Motif(-database => 'motif-db.txt');
the Motif constructor accepts the name of an existing database file. that's it, that's the requirement β just point it at a database that already exists. π
π₯ METHODS π₯
π« match
@matches = $motif->match($seq);
the match method accepts a Bio::Seq object as an argument and returns an array of Bio::Tools::Motif::Match objects that matched the given sequence. so you give it a sequence, it gives you the glow-ups that hit. β¨
π« add_pattern
$motif->add_pattern($pattern)
the add_pattern method adds another Bio::Tools::Motif::Pattern method to the list of patterns used to match against sequences. more patterns, more chances, we love to see it. π
π« save
$motif->save('motif-db.txt.new');
saves the currently loaded database to the specified file. returns true on success, false on failure. so like, check the return value bestie, don't just assume. π
π« load
$motif->load('motif-db.txt.new');
loads an existing database from file. returns true on success, false on failure. same energy, same "please check the return value." π
okay and here's the tea on what the database actually is: it's a file containing a series of tab delimited fields. the fields, in order, are the motif ID, the localization site, the perl regular expression used to match the motif, and an optional comment field. four fields, one optional, that's the whole recipe. π
π AUTHOR π
Cory Spencer <cspencer@sfu.ca>
giving credit where credit is due, periodt. π
β SEE ALSO β
Bio::Tools::Motif::PatternBio::Tools::Motif::Match
go read those next, they're the supporting cast and they ate. π
π ACKNOWLEGEMENTS π
thanks go out to Fiona Brinkman, Jennifer Gardy and the other members of the Simon Fraser University Brinkman laboratory. absolute legends, we are obsessed. π«ΆπΈ
and that's the whole page bestie!! this was Bio::T...::Motif(3pm) from perl v5.34.0, dated 2022-02-06 β she's a little vintage but she's still slaying, no cap. go forth and localize some proteins. π
β¨π
π¦ where this page comes from
- ubuntu jammy: psortb 3.0.6+dfsg-2build2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms