Bio::T...::Motif(3pm)

πŸ“¦
version 3.0.6 Β· 4 versions
, in ubuntu jammy

πŸ’– 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::Pattern
  • Bio::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