TFBS::...RANSFAC(3pm)

✨ NAME ✨

okay bestie, gather round πŸ’– β€” TFBS::DB::LocalTRANSFAC is the interface to a local transfac database position frequency matrices setup, straight out of the matrix.dat file. That's the whole vibe. πŸ“

This page lives in the User Contributed Perl Documentation, and yeah, the manual page name is a little eaten by the dots (TFBS::...RANSFAC), but we know who she is. πŸ’…

-------------------------------- NOTICE ---------------------------------- The TRANSFAC database is free for non-commercial use. For commercial use the TRANSFAC databases and programs have to be licensed. Please read the DISCLAIMER at http://transfac.gbf.de/TRANSFAC/disclaimer.htm. -------------------------------------------------------------------------

real talk, that notice is not a joke β€” free for non-commercial, and if you're doing commercial stuff you have to license the TRANSFAC databases and programs. Go read the DISCLAIMER, fr fr. πŸ™ˆ


🌸 SYNOPSIS 🌸

  • creating a database object by connecting to TRANSFAC data
my $db = TFBS::DB::LocalTRANSFAC->connect(-localdir => '/home/someusr');

localdir is the location of the matrix.dat TRANSFAC datafile πŸ—‚οΈ

  • retrieving a TFBS::Matrix::* object from the database
# retrieving a PFM by ID
my $pfm = $db->get_Matrix_by_ID('V$CEBPA_01','PFM');

#retrieving a PWM by TRANSFAC accession number
my $pwm = $db->get_Matrix_by_acc('M00116', 'PWM');

See how she did both?? One by ID, one by accession number, and neither of them is even trying. πŸ‘‘


πŸ’œ DESCRIPTION πŸ’œ

TFBS::DB::LocalTRANSFAC is a read only database interface β€” so like, look but don't touch, bestie β€” that fetches TRANSFAC matrix data from a local TRANSFAC install (matrix.dat). 🧚

πŸŽ€ connect

  • Title β€” connect
  • Usage β€” my $db = TFBS::DB::TRANSFAC->connect(%args);
  • Function β€” Creates a TRANSFAC database connection object, which can be used to retrieve matrices from a locally installed TRANSFAC database
  • Returns β€” a TFBS::DB::TRANSFAC object
  • Args β€”
-localdir    # REQUIRED: the directory of the matrix.dat TRANSFAC
             # datafile.  matrix.dat must have read access.
-accept_conditions # OPTIONAL: by setting this to a true
                   # value, you confirm that you
                   # have read and accepted the terms
                   # of use of TRANSFAC at
                   # http://transfac.gbf.de/TRANSFAC/disclaimer.htm;
                   # this also suppresses the annoying
                   # message that is printed to STDERR
                   # upon invoking the method

So quick rundown on those args πŸ’–

  • -localdir β€” REQUIRED, no cap. It's the directory of the matrix.dat TRANSFAC datafile. And heads up: matrix.dat must have read access, or she cannot serve. 😭
  • -accept_conditions β€” OPTIONAL. Set it to a true value and boom, you're confirming that you have read and accepted the terms of use of TRANSFAC at http://transfac.gbf.de/TRANSFAC/disclaimer.htm. Bonus: it also suppresses the annoying message that gets printed to STDERR when the method is invoked. iconic little two-for-one. ✨

πŸ¦‹ get_Matrix_by_acc

  • Title β€” get_Matrix_by_acc
  • Usage β€” my $pfm = $db->get_Matrix_by_acc('V$CREB_01', 'PFM');
  • Function β€” fetches matrix data under the given TRANSFAC accession number from database and returns a TFBS::Matrix::* object
  • Returns β€” a TFBS::Matrix::* object; the exact type of the object depending on the second argument (allowed values are 'PFM', 'ICM', and 'PWM'); returns undef if matrix with the given ID is not found
  • Args β€” (Matrix_ID, Matrix_type)
    • Matrix_ID is a string; Matrix_type is one of the following: 'PFM' (raw position frequency matrix), 'ICM' (information content matrix) or 'PWM' (position weight matrix)
    • If Matrix_type is omitted, a PFM is retrieved by default.

ngl the "returns undef if matrix with the given ID is not found" bit is the part you're gonna want to actually check for, bestie β€” she will not yell at you, she'll just hand you undef and let you figure it out. πŸ’€

🌈 get_Matrix_by_ID

  • Title β€” get_Matrix_by_ID
  • Usage β€” my $pfm = $db->get_Matrix_by_ID('V$CREB_01', 'PFM');
  • Function β€” fetches matrix data under the given TRANSFAC ID from the database and returns a TFBS::Matrix::* object
  • Returns β€” a TFBS::Matrix::* object; the exact type of the object depending on the second argument (allowed values are 'PFM', 'ICM', and 'PWM'); returns undef if matrix with the given ID is not found
  • Args β€” (Matrix_ID, Matrix_type)
    • Matrix_ID is a string; Matrix_type is one of the following: 'PFM' (raw position frequency matrix), 'ICM' (information content matrix) or 'PWM' (position weight matrix)
    • If Matrix_type is omitted, a PFM is retrieved by default.

Same energy as get_Matrix_by_acc, just keyed on the TRANSFAC ID instead of the accession number. Two doors, same room, both slay. πŸšͺ✨


and that's the page!! you ate 🫢 this whole thing came to you from perl v5.42.3, dated 2026-08-21 β€” so go forth, connect, and pull those matrices. periodt. πŸ’…πŸŽ€

πŸ“¦ where this page comes from