[med-svn] [libtfbs-perl] 02/08: New upstream version 0.7.1
Charles Plessy
plessy at moszumanska.debian.org
Sat Oct 21 02:48:16 UTC 2017
This is an automated email from the git hooks/post-receive script.
plessy pushed a commit to branch master
in repository libtfbs-perl.
commit 16bdbb09c5c24642ed122d88237f5a4430d8d9d1
Author: Charles Plessy <plessy at debian.org>
Date: Sat Oct 21 10:56:39 2017 +0900
New upstream version 0.7.1
---
Changes | 1 +
License | 2 +
MYMETA.json | 39 +
MYMETA.yml | 21 +
Makefile | 1161 ++++++++++++++++++++
Makefile.old | 1156 +++++++++++++++++++
README | 154 ---
README.md | 117 ++
TFBS/DB/JASPAR.pm | 8 +-
TFBS/DB/JASPAR2.pm | 2 +-
TFBS/DB/JASPAR4.pm | 4 +-
TFBS/DB/JASPAR5.pm | 2 +-
TFBS/DB/JASPAR6.pm | 2 +-
TFBS/DB/{JASPAR.pm => JASPAR7.pm} | 0
TFBS/DB/LocalTRANSFAC.pm | 2 +-
TFBS/DB/TRANSFAC.pm | 2 +-
TFBS/Matrix/Alignment.pm | 6 +-
TFBS/Matrix/ICM.pm | 2 +-
TFBS/Matrix/PWM.pm | 4 +-
TFBS/Matrix/_Alignment.pm | 2 +-
TFBS/MatrixSet.pm | 8 +-
TFBS/PatternGen.pm | 2 +-
TFBS/PatternGen/Elph.pm | 2 +-
TFBS/PatternGen/Gibbs.pm | 2 +-
TFBS/PatternGen/MEME.pm | 2 +-
TFBS/PatternGenI.pm | 2 +-
TFBS/Run/ConservationProfileGenerator.pm | 4 +-
TFBS/_Iterator/_MatrixSetIterator.pm | 54 +-
TFBS/_Iterator/_SiteSetIterator.pm | 14 +-
blib/arch/.exists | 0
blib/arch/auto/TFBS/.exists | 0
blib/arch/auto/TFBS/Ext/pwmsearch/.exists | 0
blib/arch/auto/TFBS/Ext/pwmsearch/pwmsearch.bs | 0
blib/arch/auto/TFBS/Ext/pwmsearch/pwmsearch.bundle | Bin 0 -> 50652 bytes
blib/bin/.exists | 0
blib/lib/.exists | 0
blib/lib/TFBS/DB.pm | 24 +
blib/lib/TFBS/DB/FlatFileDir.pm | 498 +++++++++
{TFBS => blib/lib/TFBS}/DB/JASPAR2.pm | 2 +-
{TFBS => blib/lib/TFBS}/DB/JASPAR4.pm | 10 +-
{TFBS => blib/lib/TFBS}/DB/LocalTRANSFAC.pm | 2 +-
{TFBS => blib/lib/TFBS}/DB/TRANSFAC.pm | 4 +-
blib/lib/TFBS/Ext/.exists | 0
blib/lib/TFBS/Ext/pwmsearch.pm | 161 +++
blib/lib/TFBS/Matrix.pm | 338 ++++++
{TFBS => blib/lib/TFBS}/Matrix/ICM.pm | 486 ++------
blib/lib/TFBS/Matrix/PFM.pm | 613 +++++++++++
{TFBS => blib/lib/TFBS}/Matrix/PWM.pm | 4 +-
{TFBS => blib/lib/TFBS}/Matrix/_Alignment.pm | 2 +-
{TFBS => blib/lib/TFBS}/MatrixSet.pm | 375 +------
{TFBS => blib/lib/TFBS}/PatternGen.pm | 4 +-
blib/lib/TFBS/PatternGen/AnnSpec.pm | 213 ++++
blib/lib/TFBS/PatternGen/AnnSpec/Motif.pm | 61 +
{TFBS => blib/lib/TFBS}/PatternGen/Elph.pm | 2 +-
blib/lib/TFBS/PatternGen/Elph/Motif.pm | 63 ++
{TFBS => blib/lib/TFBS}/PatternGen/Gibbs.pm | 2 +-
blib/lib/TFBS/PatternGen/Gibbs/Motif.pm | 102 ++
{TFBS => blib/lib/TFBS}/PatternGen/MEME.pm | 2 +-
blib/lib/TFBS/PatternGen/MEME/Motif.pm | 63 ++
blib/lib/TFBS/PatternGen/Motif/Matrix.pm | 50 +
blib/lib/TFBS/PatternGen/Motif/Word.pm | 21 +
blib/lib/TFBS/PatternGen/SimplePFM.pm | 125 +++
blib/lib/TFBS/PatternGen/YMF.pm | 193 ++++
blib/lib/TFBS/PatternGen/YMF/Motif.pm | 64 ++
{TFBS => blib/lib/TFBS}/PatternGenI.pm | 2 +-
blib/lib/TFBS/PatternI.pm | 163 +++
blib/lib/TFBS/Site.pm | 317 ++++++
blib/lib/TFBS/SitePair.pm | 80 ++
blib/lib/TFBS/SitePairSet.pm | 270 +++++
blib/lib/TFBS/SiteSet.pm | 266 +++++
blib/lib/TFBS/Tools/SetOperations.pm | 226 ++++
blib/lib/TFBS/Word.pm | 132 +++
blib/lib/TFBS/Word/Consensus.pm | 263 +++++
blib/lib/TFBS/_Iterator.pm | 71 ++
.../lib/TFBS}/_Iterator/_MatrixSetIterator.pm | 0
.../lib/TFBS}/_Iterator/_SiteSetIterator.pm | 0
blib/lib/auto/TFBS/.exists | 0
blib/lib/auto/TFBS/Ext/pwmsearch/.exists | 0
blib/lib/pwm_search.h | 129 +++
blib/lib/pwm_searchPFF.c | 785 +++++++++++++
blib/man1/.exists | 0
blib/man3/.exists | 0
blib/man3/TFBS::DB::FlatFileDir.3pm | 299 +++++
blib/man3/TFBS::DB::JASPAR2.3pm | 476 ++++++++
blib/man3/TFBS::DB::JASPAR4.3pm | 392 +++++++
blib/man3/TFBS::DB::LocalTRANSFAC.3pm | 221 ++++
blib/man3/TFBS::DB::TRANSFAC.3pm | 232 ++++
blib/man3/TFBS::Ext::pwmsearch.3pm | 155 +++
blib/man3/TFBS::Matrix.3pm | 214 ++++
blib/man3/TFBS::Matrix::ICM.3pm | 350 ++++++
blib/man3/TFBS::Matrix::PFM.3pm | 413 +++++++
blib/man3/TFBS::Matrix::PWM.3pm | 370 +++++++
blib/man3/TFBS::MatrixSet.3pm | 298 +++++
blib/man3/TFBS::PatternGen.3pm | 175 +++
blib/man3/TFBS::PatternGen::AnnSpec.3pm | 185 ++++
blib/man3/TFBS::PatternGen::AnnSpec::Motif.3pm | 153 +++
blib/man3/TFBS::PatternGen::Elph.3pm | 190 ++++
blib/man3/TFBS::PatternGen::Elph::Motif.3pm | 152 +++
blib/man3/TFBS::PatternGen::Gibbs.3pm | 191 ++++
blib/man3/TFBS::PatternGen::Gibbs::Motif.3pm | 169 +++
blib/man3/TFBS::PatternGen::MEME.3pm | 188 ++++
blib/man3/TFBS::PatternGen::MEME::Motif.3pm | 152 +++
blib/man3/TFBS::PatternGen::SimplePFM.3pm | 180 +++
blib/man3/TFBS::PatternGen::YMF.3pm | 188 ++++
blib/man3/TFBS::PatternGen::YMF::Motif.3pm | 152 +++
blib/man3/TFBS::PatternI.3pm | 206 ++++
blib/man3/TFBS::Site.3pm | 284 +++++
blib/man3/TFBS::SitePair.3pm | 162 +++
blib/man3/TFBS::SitePairSet.3pm | 241 ++++
blib/man3/TFBS::SiteSet.3pm | 232 ++++
blib/man3/TFBS::Word.3pm | 161 +++
blib/man3/TFBS::Word::Consensus.3pm | 233 ++++
blib/script/.exists | 0
pm_to_blib | 0
pod2htmd.tmp | 52 -
115 files changed, 14988 insertions(+), 1043 deletions(-)
diff --git a/Changes b/Changes
index c1d732c..9c7c760 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,4 @@
+
Changes in 0.3.1:
================
* Available as two distributions
diff --git a/License b/License
new file mode 100644
index 0000000..651d9fa
--- /dev/null
+++ b/License
@@ -0,0 +1,2 @@
+TFBS is distributed under the Mozilla Public License Version 2.0 (MPL-2.0).
+A copy of MPL-2.0 is available from https://www.mozilla.org/en-US/MPL/2.0/.
diff --git a/MYMETA.json b/MYMETA.json
new file mode 100644
index 0000000..c0f0675
--- /dev/null
+++ b/MYMETA.json
@@ -0,0 +1,39 @@
+{
+ "abstract" : "unknown",
+ "author" : [
+ "unknown"
+ ],
+ "dynamic_config" : 0,
+ "generated_by" : "ExtUtils::MakeMaker version 6.74, CPAN::Meta::Converter version 2.132140",
+ "license" : [
+ "unknown"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : "2"
+ },
+ "name" : "TFBS",
+ "no_index" : {
+ "directory" : [
+ "t",
+ "inc"
+ ]
+ },
+ "prereqs" : {
+ "build" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "0"
+ }
+ },
+ "configure" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "0"
+ }
+ },
+ "runtime" : {
+ "requires" : {}
+ }
+ },
+ "release_status" : "stable",
+ "version" : "v0.5.0"
+}
diff --git a/MYMETA.yml b/MYMETA.yml
new file mode 100644
index 0000000..b6f91bb
--- /dev/null
+++ b/MYMETA.yml
@@ -0,0 +1,21 @@
+---
+abstract: unknown
+author:
+ - unknown
+build_requires:
+ ExtUtils::MakeMaker: 0
+configure_requires:
+ ExtUtils::MakeMaker: 0
+dynamic_config: 0
+generated_by: 'ExtUtils::MakeMaker version 6.74, CPAN::Meta::Converter version 2.132140'
+license: unknown
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
+name: TFBS
+no_index:
+ directory:
+ - t
+ - inc
+requires: {}
+version: v0.5.0
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..2e5a768
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,1161 @@
+# This Makefile is for the TFBS extension to perl.
+#
+# It was generated automatically by MakeMaker version
+# 6.74 (Revision: 67400) from the contents of
+# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
+#
+# ANY CHANGES MADE HERE WILL BE LOST!
+#
+# MakeMaker ARGV: ()
+#
+
+# MakeMaker Parameters:
+
+# BUILD_REQUIRES => { }
+# CONFIGURE_REQUIRES => { }
+# DISTNAME => q[TFBS]
+# NAME => q[TFBS]
+# PREREQ_PM => { }
+# TEST_REQUIRES => { }
+# VERSION => q[0.5.0]
+# dist => { DIST_DEFAULT=>q[all tardist], COMPRESS=>q[gzip -9f], SUFFIX=>q[.gz] }
+
+# --- MakeMaker post_initialize section:
+
+
+# --- MakeMaker const_config section:
+
+# These definitions are from config.sh (via /System/Library/Perl/5.12/darwin-thread-multi-2level/Config.pm).
+# They may have been overridden via Makefile.PL or on the command line.
+AR = ar
+CC = clang
+CCCDLFLAGS =
+CCDLFLAGS =
+DLEXT = bundle
+DLSRC = dl_dlopen.xs
+EXE_EXT =
+FULL_AR = /usr/bin/ar
+LD = clang -mmacosx-version-min=10.8
+LDDLFLAGS = -arch i386 -arch x86_64 -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector
+LDFLAGS = -arch i386 -arch x86_64 -fstack-protector -L/usr/local/lib
+LIBC =
+LIB_EXT = .a
+OBJ_EXT = .o
+OSNAME = darwin
+OSVERS = 12.0
+RANLIB = /usr/bin/ar s
+SITELIBEXP = /Library/Perl/5.12
+SITEARCHEXP = /Library/Perl/5.12/darwin-thread-multi-2level
+SO = dylib
+VENDORARCHEXP = /Network/Library/Perl/5.12/darwin-thread-multi-2level
+VENDORLIBEXP = /Network/Library/Perl/5.12
+
+
+# --- MakeMaker constants section:
+AR_STATIC_ARGS = cr
+DIRFILESEP = /
+DFSEP = $(DIRFILESEP)
+NAME = TFBS
+NAME_SYM = TFBS
+VERSION = 0.5.0
+VERSION_MACRO = VERSION
+VERSION_SYM = 0_5_0
+DEFINE_VERSION = -D$(VERSION_MACRO)=\"$(VERSION)\"
+XS_VERSION = 0.5.0
+XS_VERSION_MACRO = XS_VERSION
+XS_DEFINE_VERSION = -D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\"
+INST_ARCHLIB = blib/arch
+INST_SCRIPT = blib/script
+INST_BIN = blib/bin
+INST_LIB = blib/lib
+INST_MAN1DIR = blib/man1
+INST_MAN3DIR = blib/man3
+MAN1EXT = 1
+MAN3EXT = 3pm
+INSTALLDIRS = site
+DESTDIR =
+PREFIX = $(SITEPREFIX)
+PERLPREFIX = /
+SITEPREFIX = /usr/local
+VENDORPREFIX = /usr/local
+INSTALLPRIVLIB = /Library/Perl/Updates/5.12.4
+DESTINSTALLPRIVLIB = $(DESTDIR)$(INSTALLPRIVLIB)
+INSTALLSITELIB = /Library/Perl/5.12
+DESTINSTALLSITELIB = $(DESTDIR)$(INSTALLSITELIB)
+INSTALLVENDORLIB = /Network/Library/Perl/5.12
+DESTINSTALLVENDORLIB = $(DESTDIR)$(INSTALLVENDORLIB)
+INSTALLARCHLIB = /Library/Perl/Updates/5.12.4/darwin-thread-multi-2level
+DESTINSTALLARCHLIB = $(DESTDIR)$(INSTALLARCHLIB)
+INSTALLSITEARCH = /Library/Perl/5.12/darwin-thread-multi-2level
+DESTINSTALLSITEARCH = $(DESTDIR)$(INSTALLSITEARCH)
+INSTALLVENDORARCH = /Network/Library/Perl/5.12/darwin-thread-multi-2level
+DESTINSTALLVENDORARCH = $(DESTDIR)$(INSTALLVENDORARCH)
+INSTALLBIN = /usr/bin
+DESTINSTALLBIN = $(DESTDIR)$(INSTALLBIN)
+INSTALLSITEBIN = /usr/local/bin
+DESTINSTALLSITEBIN = $(DESTDIR)$(INSTALLSITEBIN)
+INSTALLVENDORBIN = /usr/local/bin
+DESTINSTALLVENDORBIN = $(DESTDIR)$(INSTALLVENDORBIN)
+INSTALLSCRIPT = /usr/bin
+DESTINSTALLSCRIPT = $(DESTDIR)$(INSTALLSCRIPT)
+INSTALLSITESCRIPT = /usr/local/bin
+DESTINSTALLSITESCRIPT = $(DESTDIR)$(INSTALLSITESCRIPT)
+INSTALLVENDORSCRIPT = /usr/local/bin
+DESTINSTALLVENDORSCRIPT = $(DESTDIR)$(INSTALLVENDORSCRIPT)
+INSTALLMAN1DIR = /usr/share/man/man1
+DESTINSTALLMAN1DIR = $(DESTDIR)$(INSTALLMAN1DIR)
+INSTALLSITEMAN1DIR = /usr/local/share/man/man1
+DESTINSTALLSITEMAN1DIR = $(DESTDIR)$(INSTALLSITEMAN1DIR)
+INSTALLVENDORMAN1DIR = /usr/local/share/man/man1
+DESTINSTALLVENDORMAN1DIR = $(DESTDIR)$(INSTALLVENDORMAN1DIR)
+INSTALLMAN3DIR = /usr/share/man/man3
+DESTINSTALLMAN3DIR = $(DESTDIR)$(INSTALLMAN3DIR)
+INSTALLSITEMAN3DIR = /usr/local/share/man/man3
+DESTINSTALLSITEMAN3DIR = $(DESTDIR)$(INSTALLSITEMAN3DIR)
+INSTALLVENDORMAN3DIR = /usr/local/share/man/man3
+DESTINSTALLVENDORMAN3DIR = $(DESTDIR)$(INSTALLVENDORMAN3DIR)
+PERL_LIB = /System/Library/Perl/5.12
+PERL_ARCHLIB = /System/Library/Perl/5.12/darwin-thread-multi-2level
+LIBPERL_A = libperl.a
+FIRST_MAKEFILE = Makefile
+MAKEFILE_OLD = Makefile.old
+MAKE_APERL_FILE = Makefile.aperl
+PERLMAINCC = $(CC)
+PERL_INC = /System/Library/Perl/5.12/darwin-thread-multi-2level/CORE
+PERL = /usr/bin/perl
+FULLPERL = /usr/bin/perl
+ABSPERL = $(PERL)
+PERLRUN = $(PERL)
+FULLPERLRUN = $(FULLPERL)
+ABSPERLRUN = $(ABSPERL)
+PERLRUNINST = $(PERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
+FULLPERLRUNINST = $(FULLPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
+ABSPERLRUNINST = $(ABSPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
+PERL_CORE = 0
+PERM_DIR = 755
+PERM_RW = 644
+PERM_RWX = 755
+
+MAKEMAKER = /Library/Perl/5.12/ExtUtils/MakeMaker.pm
+MM_VERSION = 6.74
+MM_REVISION = 67400
+
+# FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle).
+# BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle)
+# PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar)
+# DLBASE = Basename part of dynamic library. May be just equal BASEEXT.
+MAKE = make
+FULLEXT = TFBS
+BASEEXT = TFBS
+PARENT_NAME =
+DLBASE = $(BASEEXT)
+VERSION_FROM =
+OBJECT =
+LDFROM = $(OBJECT)
+LINKTYPE = dynamic
+BOOTDEP =
+
+# Handy lists of source code files:
+XS_FILES =
+C_FILES =
+O_FILES =
+H_FILES =
+MAN1PODS =
+MAN3PODS = TFBS/DB/FlatFileDir.pm \
+ TFBS/DB/JASPAR2.pm \
+ TFBS/DB/JASPAR4.pm \
+ TFBS/DB/LocalTRANSFAC.pm \
+ TFBS/DB/TRANSFAC.pm \
+ TFBS/Matrix.pm \
+ TFBS/Matrix/ICM.pm \
+ TFBS/Matrix/PFM.pm \
+ TFBS/Matrix/PWM.pm \
+ TFBS/MatrixSet.pm \
+ TFBS/PatternGen.pm \
+ TFBS/PatternGen/AnnSpec.pm \
+ TFBS/PatternGen/AnnSpec/Motif.pm \
+ TFBS/PatternGen/Elph.pm \
+ TFBS/PatternGen/Elph/Motif.pm \
+ TFBS/PatternGen/Gibbs.pm \
+ TFBS/PatternGen/Gibbs/Motif.pm \
+ TFBS/PatternGen/MEME.pm \
+ TFBS/PatternGen/MEME/Motif.pm \
+ TFBS/PatternGen/SimplePFM.pm \
+ TFBS/PatternGen/YMF.pm \
+ TFBS/PatternGen/YMF/Motif.pm \
+ TFBS/PatternI.pm \
+ TFBS/Site.pm \
+ TFBS/SitePair.pm \
+ TFBS/SitePairSet.pm \
+ TFBS/SiteSet.pm \
+ TFBS/Word.pm \
+ TFBS/Word/Consensus.pm
+
+# Where is the Config information that we are using/depend on
+CONFIGDEP = $(PERL_ARCHLIB)$(DFSEP)Config.pm $(PERL_INC)$(DFSEP)config.h
+
+# Where to build things
+INST_LIBDIR = $(INST_LIB)
+INST_ARCHLIBDIR = $(INST_ARCHLIB)
+
+INST_AUTODIR = $(INST_LIB)/auto/$(FULLEXT)
+INST_ARCHAUTODIR = $(INST_ARCHLIB)/auto/$(FULLEXT)
+
+INST_STATIC =
+INST_DYNAMIC =
+INST_BOOT =
+
+# Extra linker info
+EXPORT_LIST =
+PERL_ARCHIVE =
+PERL_ARCHIVE_AFTER =
+
+
+TO_INST_PM = TFBS/DB.pm \
+ TFBS/DB/FlatFileDir.pm \
+ TFBS/DB/JASPAR2.pm \
+ TFBS/DB/JASPAR4.pm \
+ TFBS/DB/LocalTRANSFAC.pm \
+ TFBS/DB/TRANSFAC.pm \
+ TFBS/Matrix.pm \
+ TFBS/Matrix/ICM.pm \
+ TFBS/Matrix/PFM.pm \
+ TFBS/Matrix/PWM.pm \
+ TFBS/Matrix/_Alignment.pm \
+ TFBS/MatrixSet.pm \
+ TFBS/PatternGen.pm \
+ TFBS/PatternGen/AnnSpec.pm \
+ TFBS/PatternGen/AnnSpec/Motif.pm \
+ TFBS/PatternGen/Elph.pm \
+ TFBS/PatternGen/Elph/Motif.pm \
+ TFBS/PatternGen/Gibbs.pm \
+ TFBS/PatternGen/Gibbs/Motif.pm \
+ TFBS/PatternGen/MEME.pm \
+ TFBS/PatternGen/MEME/Motif.pm \
+ TFBS/PatternGen/Motif/Matrix.pm \
+ TFBS/PatternGen/Motif/Word.pm \
+ TFBS/PatternGen/SimplePFM.pm \
+ TFBS/PatternGen/YMF.pm \
+ TFBS/PatternGen/YMF/Motif.pm \
+ TFBS/PatternGenI.pm \
+ TFBS/PatternI.pm \
+ TFBS/Site.pm \
+ TFBS/SitePair.pm \
+ TFBS/SitePairSet.pm \
+ TFBS/SiteSet.pm \
+ TFBS/Tools/SetOperations.pm \
+ TFBS/Word.pm \
+ TFBS/Word/Consensus.pm \
+ TFBS/_Iterator.pm \
+ TFBS/_Iterator/_MatrixSetIterator.pm \
+ TFBS/_Iterator/_SiteSetIterator.pm
+
+PM_TO_BLIB = TFBS/PatternGen/YMF.pm \
+ $(INST_LIB)/TFBS/PatternGen/YMF.pm \
+ TFBS/DB/TRANSFAC.pm \
+ $(INST_LIB)/TFBS/DB/TRANSFAC.pm \
+ TFBS/DB.pm \
+ $(INST_LIB)/TFBS/DB.pm \
+ TFBS/DB/LocalTRANSFAC.pm \
+ $(INST_LIB)/TFBS/DB/LocalTRANSFAC.pm \
+ TFBS/PatternGen/MEME.pm \
+ $(INST_LIB)/TFBS/PatternGen/MEME.pm \
+ TFBS/PatternGen/Gibbs.pm \
+ $(INST_LIB)/TFBS/PatternGen/Gibbs.pm \
+ TFBS/PatternGen/Elph.pm \
+ $(INST_LIB)/TFBS/PatternGen/Elph.pm \
+ TFBS/DB/JASPAR4.pm \
+ $(INST_LIB)/TFBS/DB/JASPAR4.pm \
+ TFBS/PatternGenI.pm \
+ $(INST_LIB)/TFBS/PatternGenI.pm \
+ TFBS/Matrix/ICM.pm \
+ $(INST_LIB)/TFBS/Matrix/ICM.pm \
+ TFBS/PatternGen/YMF/Motif.pm \
+ $(INST_LIB)/TFBS/PatternGen/YMF/Motif.pm \
+ TFBS/SitePairSet.pm \
+ $(INST_LIB)/TFBS/SitePairSet.pm \
+ TFBS/PatternGen/Elph/Motif.pm \
+ $(INST_LIB)/TFBS/PatternGen/Elph/Motif.pm \
+ TFBS/Site.pm \
+ $(INST_LIB)/TFBS/Site.pm \
+ TFBS/_Iterator/_MatrixSetIterator.pm \
+ $(INST_LIB)/TFBS/_Iterator/_MatrixSetIterator.pm \
+ TFBS/Tools/SetOperations.pm \
+ $(INST_LIB)/TFBS/Tools/SetOperations.pm \
+ TFBS/Matrix/PFM.pm \
+ $(INST_LIB)/TFBS/Matrix/PFM.pm \
+ TFBS/PatternI.pm \
+ $(INST_LIB)/TFBS/PatternI.pm \
+ TFBS/Word/Consensus.pm \
+ $(INST_LIB)/TFBS/Word/Consensus.pm \
+ TFBS/PatternGen/Gibbs/Motif.pm \
+ $(INST_LIB)/TFBS/PatternGen/Gibbs/Motif.pm \
+ TFBS/SiteSet.pm \
+ $(INST_LIB)/TFBS/SiteSet.pm \
+ TFBS/Matrix/_Alignment.pm \
+ $(INST_LIB)/TFBS/Matrix/_Alignment.pm \
+ TFBS/PatternGen/AnnSpec.pm \
+ $(INST_LIB)/TFBS/PatternGen/AnnSpec.pm \
+ TFBS/PatternGen/Motif/Word.pm \
+ $(INST_LIB)/TFBS/PatternGen/Motif/Word.pm \
+ TFBS/SitePair.pm \
+ $(INST_LIB)/TFBS/SitePair.pm \
+ TFBS/_Iterator/_SiteSetIterator.pm \
+ $(INST_LIB)/TFBS/_Iterator/_SiteSetIterator.pm \
+ TFBS/_Iterator.pm \
+ $(INST_LIB)/TFBS/_Iterator.pm \
+ TFBS/PatternGen/MEME/Motif.pm \
+ $(INST_LIB)/TFBS/PatternGen/MEME/Motif.pm \
+ TFBS/DB/FlatFileDir.pm \
+ $(INST_LIB)/TFBS/DB/FlatFileDir.pm \
+ TFBS/PatternGen.pm \
+ $(INST_LIB)/TFBS/PatternGen.pm \
+ TFBS/MatrixSet.pm \
+ $(INST_LIB)/TFBS/MatrixSet.pm \
+ TFBS/PatternGen/SimplePFM.pm \
+ $(INST_LIB)/TFBS/PatternGen/SimplePFM.pm \
+ TFBS/Word.pm \
+ $(INST_LIB)/TFBS/Word.pm \
+ TFBS/DB/JASPAR2.pm \
+ $(INST_LIB)/TFBS/DB/JASPAR2.pm \
+ TFBS/Matrix.pm \
+ $(INST_LIB)/TFBS/Matrix.pm \
+ TFBS/PatternGen/AnnSpec/Motif.pm \
+ $(INST_LIB)/TFBS/PatternGen/AnnSpec/Motif.pm \
+ TFBS/PatternGen/Motif/Matrix.pm \
+ $(INST_LIB)/TFBS/PatternGen/Motif/Matrix.pm \
+ TFBS/Matrix/PWM.pm \
+ $(INST_LIB)/TFBS/Matrix/PWM.pm
+
+
+# --- MakeMaker platform_constants section:
+MM_Unix_VERSION = 6.74
+PERL_MALLOC_DEF = -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc
+
+
+# --- MakeMaker tool_autosplit section:
+# Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto
+AUTOSPLITFILE = $(ABSPERLRUN) -e 'use AutoSplit; autosplit($$$$ARGV[0], $$$$ARGV[1], 0, 1, 1)' --
+
+
+
+# --- MakeMaker tool_xsubpp section:
+
+XSUBPPDIR = /System/Library/Perl/5.12/ExtUtils
+XSUBPP = $(XSUBPPDIR)$(DFSEP)xsubpp
+XSUBPPRUN = $(PERLRUN) $(XSUBPP)
+XSPROTOARG =
+XSUBPPDEPS = /System/Library/Perl/5.12/ExtUtils/typemap $(XSUBPP)
+XSUBPPARGS = -typemap /System/Library/Perl/5.12/ExtUtils/typemap
+XSUBPP_EXTRA_ARGS =
+
+
+# --- MakeMaker tools_other section:
+SHELL = /bin/sh
+CHMOD = chmod
+CP = cp
+MV = mv
+NOOP = $(TRUE)
+NOECHO = @
+RM_F = rm -f
+RM_RF = rm -rf
+TEST_F = test -f
+TOUCH = touch
+UMASK_NULL = umask 0
+DEV_NULL = > /dev/null 2>&1
+MKPATH = $(ABSPERLRUN) -MExtUtils::Command -e 'mkpath' --
+EQUALIZE_TIMESTAMP = $(ABSPERLRUN) -MExtUtils::Command -e 'eqtime' --
+FALSE = false
+TRUE = true
+ECHO = echo
+ECHO_N = echo -n
+UNINST = 0
+VERBINST = 0
+MOD_INSTALL = $(ABSPERLRUN) -MExtUtils::Install -e 'install([ from_to => {@ARGV}, verbose => '\''$(VERBINST)'\'', uninstall_shadows => '\''$(UNINST)'\'', dir_mode => '\''$(PERM_DIR)'\'' ]);' --
+DOC_INSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'perllocal_install' --
+UNINSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'uninstall' --
+WARN_IF_OLD_PACKLIST = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'warn_if_old_packlist' --
+MACROSTART =
+MACROEND =
+USEMAKEFILE = -f
+FIXIN = $(ABSPERLRUN) -MExtUtils::MY -e 'MY->fixin(shift)' --
+
+
+# --- MakeMaker makemakerdflt section:
+makemakerdflt : all
+ $(NOECHO) $(NOOP)
+
+
+# --- MakeMaker dist section:
+TAR = COPY_EXTENDED_ATTRIBUTES_DISABLE=1 COPYFILE_DISABLE=1 tar
+TARFLAGS = cvf
+ZIP = zip
+ZIPFLAGS = -r
+COMPRESS = gzip -9f
+SUFFIX = .gz
+SHAR = shar
+PREOP = $(NOECHO) $(NOOP)
+POSTOP = $(NOECHO) $(NOOP)
+TO_UNIX = $(NOECHO) $(NOOP)
+CI = ci -u
+RCS_LABEL = rcs -Nv$(VERSION_SYM): -q
+DIST_CP = best
+DIST_DEFAULT = all tardist
+DISTNAME = TFBS
+DISTVNAME = TFBS-0.5.0
+
+
+# --- MakeMaker macro section:
+
+
+# --- MakeMaker depend section:
+
+
+# --- MakeMaker cflags section:
+
+CCFLAGS = -arch i386 -arch x86_64 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -I/usr/local/include
+OPTIMIZE = -Os
+PERLTYPE =
+MPOLLUTE =
+
+
+# --- MakeMaker const_loadlibs section:
+
+# TFBS might depend on some other libraries:
+# See ExtUtils::Liblist for details
+#
+
+
+# --- MakeMaker const_cccmd section:
+CCCMD = $(CC) -c $(PASTHRU_INC) $(INC) \
+ $(CCFLAGS) $(OPTIMIZE) \
+ $(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION) \
+ $(XS_DEFINE_VERSION)
+
+# --- MakeMaker post_constants section:
+
+
+# --- MakeMaker pasthru section:
+
+PASTHRU = LIBPERL_A="$(LIBPERL_A)"\
+ LINKTYPE="$(LINKTYPE)"\
+ OPTIMIZE="$(OPTIMIZE)"\
+ PREFIX="$(PREFIX)"
+
+
+# --- MakeMaker special_targets section:
+.SUFFIXES : .xs .c .C .cpp .i .s .cxx .cc $(OBJ_EXT)
+
+.PHONY: all config static dynamic test linkext manifest blibdirs clean realclean disttest distdir
+
+
+
+# --- MakeMaker c_o section:
+
+.c.i:
+ clang -E -c $(PASTHRU_INC) $(INC) \
+ $(CCFLAGS) $(OPTIMIZE) \
+ $(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION) \
+ $(XS_DEFINE_VERSION) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c > $*.i
+
+.c.s:
+ $(CCCMD) -S $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c
+
+.c$(OBJ_EXT):
+ $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c
+
+.cpp$(OBJ_EXT):
+ $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cpp
+
+.cxx$(OBJ_EXT):
+ $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cxx
+
+.cc$(OBJ_EXT):
+ $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cc
+
+.C$(OBJ_EXT):
+ $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.C
+
+
+# --- MakeMaker xs_c section:
+
+.xs.c:
+ $(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) $(XSUBPP_EXTRA_ARGS) $*.xs > $*.xsc && $(MV) $*.xsc $*.c
+
+
+# --- MakeMaker xs_o section:
+
+.xs$(OBJ_EXT):
+ $(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.xsc && $(MV) $*.xsc $*.c
+ $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c
+
+
+# --- MakeMaker top_targets section:
+all :: pure_all manifypods
+ $(NOECHO) $(NOOP)
+
+
+pure_all :: config pm_to_blib subdirs linkext
+ $(NOECHO) $(NOOP)
+
+subdirs :: $(MYEXTLIB)
+ $(NOECHO) $(NOOP)
+
+config :: $(FIRST_MAKEFILE) blibdirs
+ $(NOECHO) $(NOOP)
+
+help :
+ perldoc ExtUtils::MakeMaker
+
+
+# --- MakeMaker blibdirs section:
+blibdirs : $(INST_LIBDIR)$(DFSEP).exists $(INST_ARCHLIB)$(DFSEP).exists $(INST_AUTODIR)$(DFSEP).exists $(INST_ARCHAUTODIR)$(DFSEP).exists $(INST_BIN)$(DFSEP).exists $(INST_SCRIPT)$(DFSEP).exists $(INST_MAN1DIR)$(DFSEP).exists $(INST_MAN3DIR)$(DFSEP).exists
+ $(NOECHO) $(NOOP)
+
+# Backwards compat with 6.18 through 6.25
+blibdirs.ts : blibdirs
+ $(NOECHO) $(NOOP)
+
+$(INST_LIBDIR)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_LIBDIR)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_LIBDIR)
+ $(NOECHO) $(TOUCH) $(INST_LIBDIR)$(DFSEP).exists
+
+$(INST_ARCHLIB)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_ARCHLIB)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHLIB)
+ $(NOECHO) $(TOUCH) $(INST_ARCHLIB)$(DFSEP).exists
+
+$(INST_AUTODIR)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_AUTODIR)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_AUTODIR)
+ $(NOECHO) $(TOUCH) $(INST_AUTODIR)$(DFSEP).exists
+
+$(INST_ARCHAUTODIR)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHAUTODIR)
+ $(NOECHO) $(TOUCH) $(INST_ARCHAUTODIR)$(DFSEP).exists
+
+$(INST_BIN)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_BIN)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_BIN)
+ $(NOECHO) $(TOUCH) $(INST_BIN)$(DFSEP).exists
+
+$(INST_SCRIPT)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_SCRIPT)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_SCRIPT)
+ $(NOECHO) $(TOUCH) $(INST_SCRIPT)$(DFSEP).exists
+
+$(INST_MAN1DIR)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_MAN1DIR)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN1DIR)
+ $(NOECHO) $(TOUCH) $(INST_MAN1DIR)$(DFSEP).exists
+
+$(INST_MAN3DIR)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_MAN3DIR)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN3DIR)
+ $(NOECHO) $(TOUCH) $(INST_MAN3DIR)$(DFSEP).exists
+
+
+
+# --- MakeMaker linkext section:
+
+linkext :: $(LINKTYPE)
+ $(NOECHO) $(NOOP)
+
+
+# --- MakeMaker dlsyms section:
+
+
+# --- MakeMaker dynamic section:
+
+dynamic :: $(FIRST_MAKEFILE) $(INST_DYNAMIC) $(INST_BOOT)
+ $(NOECHO) $(NOOP)
+
+
+# --- MakeMaker dynamic_bs section:
+
+BOOTSTRAP =
+
+
+# --- MakeMaker dynamic_lib section:
+
+
+# --- MakeMaker static section:
+
+## $(INST_PM) has been moved to the all: target.
+## It remains here for awhile to allow for old usage: "make static"
+static :: $(FIRST_MAKEFILE) $(INST_STATIC)
+ $(NOECHO) $(NOOP)
+
+
+# --- MakeMaker static_lib section:
+
+
+# --- MakeMaker manifypods section:
+
+POD2MAN_EXE = $(PERLRUN) "-MExtUtils::Command::MM" -e pod2man "--"
+POD2MAN = $(POD2MAN_EXE)
+
+
+manifypods : pure_all \
+ TFBS/Matrix/PFM.pm \
+ TFBS/PatternI.pm \
+ TFBS/PatternGen/YMF.pm \
+ TFBS/DB/TRANSFAC.pm \
+ TFBS/PatternGen/Gibbs/Motif.pm \
+ TFBS/Word/Consensus.pm \
+ TFBS/SiteSet.pm \
+ TFBS/DB/LocalTRANSFAC.pm \
+ TFBS/PatternGen/AnnSpec.pm \
+ TFBS/PatternGen/Gibbs.pm \
+ TFBS/PatternGen/MEME.pm \
+ TFBS/SitePair.pm \
+ TFBS/PatternGen/Elph.pm \
+ TFBS/DB/FlatFileDir.pm \
+ TFBS/PatternGen/MEME/Motif.pm \
+ TFBS/DB/JASPAR4.pm \
+ TFBS/PatternGen.pm \
+ TFBS/MatrixSet.pm \
+ TFBS/PatternGen/SimplePFM.pm \
+ TFBS/Matrix/ICM.pm \
+ TFBS/Word.pm \
+ TFBS/SitePairSet.pm \
+ TFBS/PatternGen/YMF/Motif.pm \
+ TFBS/DB/JASPAR2.pm \
+ TFBS/Matrix.pm \
+ TFBS/PatternGen/Elph/Motif.pm \
+ TFBS/PatternGen/AnnSpec/Motif.pm \
+ TFBS/Site.pm \
+ TFBS/Matrix/PWM.pm
+ $(NOECHO) $(POD2MAN) --section=3 --perm_rw=$(PERM_RW) \
+ TFBS/Matrix/PFM.pm $(INST_MAN3DIR)/TFBS::Matrix::PFM.$(MAN3EXT) \
+ TFBS/PatternI.pm $(INST_MAN3DIR)/TFBS::PatternI.$(MAN3EXT) \
+ TFBS/PatternGen/YMF.pm $(INST_MAN3DIR)/TFBS::PatternGen::YMF.$(MAN3EXT) \
+ TFBS/DB/TRANSFAC.pm $(INST_MAN3DIR)/TFBS::DB::TRANSFAC.$(MAN3EXT) \
+ TFBS/PatternGen/Gibbs/Motif.pm $(INST_MAN3DIR)/TFBS::PatternGen::Gibbs::Motif.$(MAN3EXT) \
+ TFBS/Word/Consensus.pm $(INST_MAN3DIR)/TFBS::Word::Consensus.$(MAN3EXT) \
+ TFBS/SiteSet.pm $(INST_MAN3DIR)/TFBS::SiteSet.$(MAN3EXT) \
+ TFBS/DB/LocalTRANSFAC.pm $(INST_MAN3DIR)/TFBS::DB::LocalTRANSFAC.$(MAN3EXT) \
+ TFBS/PatternGen/AnnSpec.pm $(INST_MAN3DIR)/TFBS::PatternGen::AnnSpec.$(MAN3EXT) \
+ TFBS/PatternGen/Gibbs.pm $(INST_MAN3DIR)/TFBS::PatternGen::Gibbs.$(MAN3EXT) \
+ TFBS/PatternGen/MEME.pm $(INST_MAN3DIR)/TFBS::PatternGen::MEME.$(MAN3EXT) \
+ TFBS/SitePair.pm $(INST_MAN3DIR)/TFBS::SitePair.$(MAN3EXT) \
+ TFBS/PatternGen/Elph.pm $(INST_MAN3DIR)/TFBS::PatternGen::Elph.$(MAN3EXT) \
+ TFBS/DB/FlatFileDir.pm $(INST_MAN3DIR)/TFBS::DB::FlatFileDir.$(MAN3EXT) \
+ TFBS/PatternGen/MEME/Motif.pm $(INST_MAN3DIR)/TFBS::PatternGen::MEME::Motif.$(MAN3EXT) \
+ TFBS/DB/JASPAR4.pm $(INST_MAN3DIR)/TFBS::DB::JASPAR4.$(MAN3EXT) \
+ TFBS/PatternGen.pm $(INST_MAN3DIR)/TFBS::PatternGen.$(MAN3EXT) \
+ TFBS/MatrixSet.pm $(INST_MAN3DIR)/TFBS::MatrixSet.$(MAN3EXT) \
+ TFBS/PatternGen/SimplePFM.pm $(INST_MAN3DIR)/TFBS::PatternGen::SimplePFM.$(MAN3EXT) \
+ TFBS/Matrix/ICM.pm $(INST_MAN3DIR)/TFBS::Matrix::ICM.$(MAN3EXT) \
+ TFBS/Word.pm $(INST_MAN3DIR)/TFBS::Word.$(MAN3EXT) \
+ TFBS/SitePairSet.pm $(INST_MAN3DIR)/TFBS::SitePairSet.$(MAN3EXT) \
+ TFBS/PatternGen/YMF/Motif.pm $(INST_MAN3DIR)/TFBS::PatternGen::YMF::Motif.$(MAN3EXT) \
+ TFBS/DB/JASPAR2.pm $(INST_MAN3DIR)/TFBS::DB::JASPAR2.$(MAN3EXT) \
+ TFBS/Matrix.pm $(INST_MAN3DIR)/TFBS::Matrix.$(MAN3EXT) \
+ TFBS/PatternGen/Elph/Motif.pm $(INST_MAN3DIR)/TFBS::PatternGen::Elph::Motif.$(MAN3EXT) \
+ TFBS/PatternGen/AnnSpec/Motif.pm $(INST_MAN3DIR)/TFBS::PatternGen::AnnSpec::Motif.$(MAN3EXT) \
+ TFBS/Site.pm $(INST_MAN3DIR)/TFBS::Site.$(MAN3EXT) \
+ TFBS/Matrix/PWM.pm $(INST_MAN3DIR)/TFBS::Matrix::PWM.$(MAN3EXT)
+
+
+
+
+# --- MakeMaker processPL section:
+
+
+# --- MakeMaker installbin section:
+
+
+# --- MakeMaker subdirs section:
+
+# The default clean, realclean and test targets in this Makefile
+# have automatically been given entries for each subdir.
+
+
+subdirs ::
+ $(NOECHO) cd Ext && $(MAKE) $(USEMAKEFILE) $(FIRST_MAKEFILE) all $(PASTHRU)
+
+
+# --- MakeMaker clean_subdirs section:
+clean_subdirs :
+ $(ABSPERLRUN) -e 'exit 0 unless chdir '\''Ext'\''; system '\''$(MAKE) clean'\'' if -f '\''$(FIRST_MAKEFILE)'\'';' --
+
+
+# --- MakeMaker clean section:
+
+# Delete temporary files but do not touch installed files. We don't delete
+# the Makefile here so a later make realclean still has a makefile to use.
+
+clean :: clean_subdirs
+ - $(RM_F) \
+ *$(LIB_EXT) core \
+ core.[0-9] $(INST_ARCHAUTODIR)/extralibs.all \
+ core.[0-9][0-9] $(BASEEXT).bso \
+ pm_to_blib.ts MYMETA.json \
+ core.[0-9][0-9][0-9][0-9] MYMETA.yml \
+ $(BASEEXT).x $(BOOTSTRAP) \
+ perl$(EXE_EXT) tmon.out \
+ *$(OBJ_EXT) pm_to_blib \
+ $(INST_ARCHAUTODIR)/extralibs.ld blibdirs.ts \
+ core.[0-9][0-9][0-9][0-9][0-9] *perl.core \
+ core.*perl.*.? $(MAKE_APERL_FILE) \
+ $(BASEEXT).def perl \
+ core.[0-9][0-9][0-9] mon.out \
+ lib$(BASEEXT).def perl.exe \
+ perlmain.c so_locations \
+ $(BASEEXT).exp
+ - $(RM_RF) \
+ blib
+ $(NOECHO) $(RM_F) $(MAKEFILE_OLD)
+ - $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) $(DEV_NULL)
+
+
+# --- MakeMaker realclean_subdirs section:
+realclean_subdirs :
+ - $(ABSPERLRUN) -e 'chdir '\''Ext'\''; system '\''$(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) realclean'\'' if -f '\''$(MAKEFILE_OLD)'\'';' --
+ - $(ABSPERLRUN) -e 'chdir '\''Ext'\''; system '\''$(MAKE) $(USEMAKEFILE) $(FIRST_MAKEFILE) realclean'\'' if -f '\''$(FIRST_MAKEFILE)'\'';' --
+
+
+# --- MakeMaker realclean section:
+# Delete temporary files (via clean) and also delete dist files
+realclean purge :: clean realclean_subdirs
+ - $(RM_F) \
+ $(MAKEFILE_OLD) $(FIRST_MAKEFILE)
+ - $(RM_RF) \
+ $(DISTVNAME)
+
+
+# --- MakeMaker metafile section:
+metafile : create_distdir
+ $(NOECHO) $(ECHO) Generating META.yml
+ $(NOECHO) $(ECHO) '---' > META_new.yml
+ $(NOECHO) $(ECHO) 'abstract: unknown' >> META_new.yml
+ $(NOECHO) $(ECHO) 'author:' >> META_new.yml
+ $(NOECHO) $(ECHO) ' - unknown' >> META_new.yml
+ $(NOECHO) $(ECHO) 'build_requires:' >> META_new.yml
+ $(NOECHO) $(ECHO) ' ExtUtils::MakeMaker: 0' >> META_new.yml
+ $(NOECHO) $(ECHO) 'configure_requires:' >> META_new.yml
+ $(NOECHO) $(ECHO) ' ExtUtils::MakeMaker: 0' >> META_new.yml
+ $(NOECHO) $(ECHO) 'dynamic_config: 1' >> META_new.yml
+ $(NOECHO) $(ECHO) 'generated_by: '\''ExtUtils::MakeMaker version 6.74, CPAN::Meta::Converter version 2.132140'\''' >> META_new.yml
+ $(NOECHO) $(ECHO) 'license: unknown' >> META_new.yml
+ $(NOECHO) $(ECHO) 'meta-spec:' >> META_new.yml
+ $(NOECHO) $(ECHO) ' url: http://module-build.sourceforge.net/META-spec-v1.4.html' >> META_new.yml
+ $(NOECHO) $(ECHO) ' version: 1.4' >> META_new.yml
+ $(NOECHO) $(ECHO) 'name: TFBS' >> META_new.yml
+ $(NOECHO) $(ECHO) 'no_index:' >> META_new.yml
+ $(NOECHO) $(ECHO) ' directory:' >> META_new.yml
+ $(NOECHO) $(ECHO) ' - t' >> META_new.yml
+ $(NOECHO) $(ECHO) ' - inc' >> META_new.yml
+ $(NOECHO) $(ECHO) 'requires: {}' >> META_new.yml
+ $(NOECHO) $(ECHO) 'version: v0.5.0' >> META_new.yml
+ -$(NOECHO) $(MV) META_new.yml $(DISTVNAME)/META.yml
+ $(NOECHO) $(ECHO) Generating META.json
+ $(NOECHO) $(ECHO) '{' > META_new.json
+ $(NOECHO) $(ECHO) ' "abstract" : "unknown",' >> META_new.json
+ $(NOECHO) $(ECHO) ' "author" : [' >> META_new.json
+ $(NOECHO) $(ECHO) ' "unknown"' >> META_new.json
+ $(NOECHO) $(ECHO) ' ],' >> META_new.json
+ $(NOECHO) $(ECHO) ' "dynamic_config" : 1,' >> META_new.json
+ $(NOECHO) $(ECHO) ' "generated_by" : "ExtUtils::MakeMaker version 6.74, CPAN::Meta::Converter version 2.132140",' >> META_new.json
+ $(NOECHO) $(ECHO) ' "license" : [' >> META_new.json
+ $(NOECHO) $(ECHO) ' "unknown"' >> META_new.json
+ $(NOECHO) $(ECHO) ' ],' >> META_new.json
+ $(NOECHO) $(ECHO) ' "meta-spec" : {' >> META_new.json
+ $(NOECHO) $(ECHO) ' "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",' >> META_new.json
+ $(NOECHO) $(ECHO) ' "version" : "2"' >> META_new.json
+ $(NOECHO) $(ECHO) ' },' >> META_new.json
+ $(NOECHO) $(ECHO) ' "name" : "TFBS",' >> META_new.json
+ $(NOECHO) $(ECHO) ' "no_index" : {' >> META_new.json
+ $(NOECHO) $(ECHO) ' "directory" : [' >> META_new.json
+ $(NOECHO) $(ECHO) ' "t",' >> META_new.json
+ $(NOECHO) $(ECHO) ' "inc"' >> META_new.json
+ $(NOECHO) $(ECHO) ' ]' >> META_new.json
+ $(NOECHO) $(ECHO) ' },' >> META_new.json
+ $(NOECHO) $(ECHO) ' "prereqs" : {' >> META_new.json
+ $(NOECHO) $(ECHO) ' "build" : {' >> META_new.json
+ $(NOECHO) $(ECHO) ' "requires" : {' >> META_new.json
+ $(NOECHO) $(ECHO) ' "ExtUtils::MakeMaker" : "0"' >> META_new.json
+ $(NOECHO) $(ECHO) ' }' >> META_new.json
+ $(NOECHO) $(ECHO) ' },' >> META_new.json
+ $(NOECHO) $(ECHO) ' "configure" : {' >> META_new.json
+ $(NOECHO) $(ECHO) ' "requires" : {' >> META_new.json
+ $(NOECHO) $(ECHO) ' "ExtUtils::MakeMaker" : "0"' >> META_new.json
+ $(NOECHO) $(ECHO) ' }' >> META_new.json
+ $(NOECHO) $(ECHO) ' },' >> META_new.json
+ $(NOECHO) $(ECHO) ' "runtime" : {' >> META_new.json
+ $(NOECHO) $(ECHO) ' "requires" : {}' >> META_new.json
+ $(NOECHO) $(ECHO) ' }' >> META_new.json
+ $(NOECHO) $(ECHO) ' },' >> META_new.json
+ $(NOECHO) $(ECHO) ' "release_status" : "stable",' >> META_new.json
+ $(NOECHO) $(ECHO) ' "version" : "v0.5.0"' >> META_new.json
+ $(NOECHO) $(ECHO) '}' >> META_new.json
+ -$(NOECHO) $(MV) META_new.json $(DISTVNAME)/META.json
+
+
+# --- MakeMaker signature section:
+signature :
+ cpansign -s
+
+
+# --- MakeMaker dist_basics section:
+distclean :: realclean distcheck
+ $(NOECHO) $(NOOP)
+
+distcheck :
+ $(PERLRUN) "-MExtUtils::Manifest=fullcheck" -e fullcheck
+
+skipcheck :
+ $(PERLRUN) "-MExtUtils::Manifest=skipcheck" -e skipcheck
+
+manifest :
+ $(PERLRUN) "-MExtUtils::Manifest=mkmanifest" -e mkmanifest
+
+veryclean : realclean
+ $(RM_F) *~ */*~ *.orig */*.orig *.bak */*.bak *.old */*.old
+
+
+
+# --- MakeMaker dist_core section:
+
+dist : $(DIST_DEFAULT) $(FIRST_MAKEFILE)
+ $(NOECHO) $(ABSPERLRUN) -l -e 'print '\''Warning: Makefile possibly out of date with $(VERSION_FROM)'\''' \
+ -e ' if -e '\''$(VERSION_FROM)'\'' and -M '\''$(VERSION_FROM)'\'' < -M '\''$(FIRST_MAKEFILE)'\'';' --
+
+tardist : $(DISTVNAME).tar$(SUFFIX)
+ $(NOECHO) $(NOOP)
+
+uutardist : $(DISTVNAME).tar$(SUFFIX)
+ uuencode $(DISTVNAME).tar$(SUFFIX) $(DISTVNAME).tar$(SUFFIX) > $(DISTVNAME).tar$(SUFFIX)_uu
+ $(NOECHO) $(ECHO) 'Created $(DISTVNAME).tar$(SUFFIX)_uu'
+
+$(DISTVNAME).tar$(SUFFIX) : distdir
+ $(PREOP)
+ $(TO_UNIX)
+ $(TAR) $(TARFLAGS) $(DISTVNAME).tar $(DISTVNAME)
+ $(RM_RF) $(DISTVNAME)
+ $(COMPRESS) $(DISTVNAME).tar
+ $(NOECHO) $(ECHO) 'Created $(DISTVNAME).tar$(SUFFIX)'
+ $(POSTOP)
+
+zipdist : $(DISTVNAME).zip
+ $(NOECHO) $(NOOP)
+
+$(DISTVNAME).zip : distdir
+ $(PREOP)
+ $(ZIP) $(ZIPFLAGS) $(DISTVNAME).zip $(DISTVNAME)
+ $(RM_RF) $(DISTVNAME)
+ $(NOECHO) $(ECHO) 'Created $(DISTVNAME).zip'
+ $(POSTOP)
+
+shdist : distdir
+ $(PREOP)
+ $(SHAR) $(DISTVNAME) > $(DISTVNAME).shar
+ $(RM_RF) $(DISTVNAME)
+ $(NOECHO) $(ECHO) 'Created $(DISTVNAME).shar'
+ $(POSTOP)
+
+
+# --- MakeMaker distdir section:
+create_distdir :
+ $(RM_RF) $(DISTVNAME)
+ $(PERLRUN) "-MExtUtils::Manifest=manicopy,maniread" \
+ -e "manicopy(maniread(),'$(DISTVNAME)', '$(DIST_CP)');"
+
+distdir : create_distdir distmeta
+ $(NOECHO) $(NOOP)
+
+
+
+# --- MakeMaker dist_test section:
+disttest : distdir
+ cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL
+ cd $(DISTVNAME) && $(MAKE) $(PASTHRU)
+ cd $(DISTVNAME) && $(MAKE) test $(PASTHRU)
+
+
+
+# --- MakeMaker dist_ci section:
+
+ci :
+ $(PERLRUN) "-MExtUtils::Manifest=maniread" \
+ -e "@all = keys %{ maniread() };" \
+ -e "print(qq{Executing $(CI) @all\n}); system(qq{$(CI) @all});" \
+ -e "print(qq{Executing $(RCS_LABEL) ...\n}); system(qq{$(RCS_LABEL) @all});"
+
+
+# --- MakeMaker distmeta section:
+distmeta : create_distdir metafile
+ $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'exit unless -e q{META.yml};' \
+ -e 'eval { maniadd({q{META.yml} => q{Module YAML meta-data (added by MakeMaker)}}) }' \
+ -e ' or print "Could not add META.yml to MANIFEST: $$$${'\''@'\''}\n"' --
+ $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'exit unless -f q{META.json};' \
+ -e 'eval { maniadd({q{META.json} => q{Module JSON meta-data (added by MakeMaker)}}) }' \
+ -e ' or print "Could not add META.json to MANIFEST: $$$${'\''@'\''}\n"' --
+
+
+
+# --- MakeMaker distsignature section:
+distsignature : create_distdir
+ $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{SIGNATURE} => q{Public-key signature (added by MakeMaker)}}) }' \
+ -e ' or print "Could not add SIGNATURE to MANIFEST: $$$${'\''@'\''}\n"' --
+ $(NOECHO) cd $(DISTVNAME) && $(TOUCH) SIGNATURE
+ cd $(DISTVNAME) && cpansign -s
+
+
+
+# --- MakeMaker install section:
+
+install :: pure_install doc_install
+ $(NOECHO) $(NOOP)
+
+install_perl :: pure_perl_install doc_perl_install
+ $(NOECHO) $(NOOP)
+
+install_site :: pure_site_install doc_site_install
+ $(NOECHO) $(NOOP)
+
+install_vendor :: pure_vendor_install doc_vendor_install
+ $(NOECHO) $(NOOP)
+
+pure_install :: pure_$(INSTALLDIRS)_install
+ $(NOECHO) $(NOOP)
+
+doc_install :: doc_$(INSTALLDIRS)_install
+ $(NOECHO) $(NOOP)
+
+pure__install : pure_site_install
+ $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
+
+doc__install : doc_site_install
+ $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
+
+pure_perl_install :: all
+ $(NOECHO) $(MOD_INSTALL) \
+ read $(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist \
+ write $(DESTINSTALLARCHLIB)/auto/$(FULLEXT)/.packlist \
+ $(INST_LIB) $(DESTINSTALLPRIVLIB) \
+ $(INST_ARCHLIB) $(DESTINSTALLARCHLIB) \
+ $(INST_BIN) $(DESTINSTALLBIN) \
+ $(INST_SCRIPT) $(DESTINSTALLSCRIPT) \
+ $(INST_MAN1DIR) $(DESTINSTALLMAN1DIR) \
+ $(INST_MAN3DIR) $(DESTINSTALLMAN3DIR)
+ $(NOECHO) $(WARN_IF_OLD_PACKLIST) \
+ $(SITEARCHEXP)/auto/$(FULLEXT)
+
+
+pure_site_install :: all
+ $(NOECHO) $(MOD_INSTALL) \
+ read $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist \
+ write $(DESTINSTALLSITEARCH)/auto/$(FULLEXT)/.packlist \
+ $(INST_LIB) $(DESTINSTALLSITELIB) \
+ $(INST_ARCHLIB) $(DESTINSTALLSITEARCH) \
+ $(INST_BIN) $(DESTINSTALLSITEBIN) \
+ $(INST_SCRIPT) $(DESTINSTALLSITESCRIPT) \
+ $(INST_MAN1DIR) $(DESTINSTALLSITEMAN1DIR) \
+ $(INST_MAN3DIR) $(DESTINSTALLSITEMAN3DIR)
+ $(NOECHO) $(WARN_IF_OLD_PACKLIST) \
+ $(PERL_ARCHLIB)/auto/$(FULLEXT)
+
+pure_vendor_install :: all
+ $(NOECHO) $(MOD_INSTALL) \
+ read $(VENDORARCHEXP)/auto/$(FULLEXT)/.packlist \
+ write $(DESTINSTALLVENDORARCH)/auto/$(FULLEXT)/.packlist \
+ $(INST_LIB) $(DESTINSTALLVENDORLIB) \
+ $(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) \
+ $(INST_BIN) $(DESTINSTALLVENDORBIN) \
+ $(INST_SCRIPT) $(DESTINSTALLVENDORSCRIPT) \
+ $(INST_MAN1DIR) $(DESTINSTALLVENDORMAN1DIR) \
+ $(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR)
+
+doc_perl_install :: all
+ $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
+ -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
+ -$(NOECHO) $(DOC_INSTALL) \
+ "Module" "$(NAME)" \
+ "installed into" "$(INSTALLPRIVLIB)" \
+ LINKTYPE "$(LINKTYPE)" \
+ VERSION "$(VERSION)" \
+ EXE_FILES "$(EXE_FILES)" \
+ >> $(DESTINSTALLARCHLIB)/perllocal.pod
+
+doc_site_install :: all
+ $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
+ -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
+ -$(NOECHO) $(DOC_INSTALL) \
+ "Module" "$(NAME)" \
+ "installed into" "$(INSTALLSITELIB)" \
+ LINKTYPE "$(LINKTYPE)" \
+ VERSION "$(VERSION)" \
+ EXE_FILES "$(EXE_FILES)" \
+ >> $(DESTINSTALLARCHLIB)/perllocal.pod
+
+doc_vendor_install :: all
+ $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
+ -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
+ -$(NOECHO) $(DOC_INSTALL) \
+ "Module" "$(NAME)" \
+ "installed into" "$(INSTALLVENDORLIB)" \
+ LINKTYPE "$(LINKTYPE)" \
+ VERSION "$(VERSION)" \
+ EXE_FILES "$(EXE_FILES)" \
+ >> $(DESTINSTALLARCHLIB)/perllocal.pod
+
+
+uninstall :: uninstall_from_$(INSTALLDIRS)dirs
+ $(NOECHO) $(NOOP)
+
+uninstall_from_perldirs ::
+ $(NOECHO) $(UNINSTALL) $(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist
+
+uninstall_from_sitedirs ::
+ $(NOECHO) $(UNINSTALL) $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist
+
+uninstall_from_vendordirs ::
+ $(NOECHO) $(UNINSTALL) $(VENDORARCHEXP)/auto/$(FULLEXT)/.packlist
+
+
+# --- MakeMaker force section:
+# Phony target to force checking subdirectories.
+FORCE :
+ $(NOECHO) $(NOOP)
+
+
+# --- MakeMaker perldepend section:
+
+
+# --- MakeMaker makefile section:
+# We take a very conservative approach here, but it's worth it.
+# We move Makefile to Makefile.old here to avoid gnu make looping.
+$(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP)
+ $(NOECHO) $(ECHO) "Makefile out-of-date with respect to $?"
+ $(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makefile..."
+ -$(NOECHO) $(RM_F) $(MAKEFILE_OLD)
+ -$(NOECHO) $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD)
+ - $(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) clean $(DEV_NULL)
+ $(PERLRUN) Makefile.PL
+ $(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <=="
+ $(NOECHO) $(ECHO) "==> Please rerun the $(MAKE) command. <=="
+ $(FALSE)
+
+
+
+# --- MakeMaker staticmake section:
+
+# --- MakeMaker makeaperl section ---
+MAP_TARGET = perl
+FULLPERL = /usr/bin/perl
+
+$(MAP_TARGET) :: static $(MAKE_APERL_FILE)
+ $(MAKE) $(USEMAKEFILE) $(MAKE_APERL_FILE) $@
+
+$(MAKE_APERL_FILE) : $(FIRST_MAKEFILE) pm_to_blib
+ $(NOECHO) $(ECHO) Writing \"$(MAKE_APERL_FILE)\" for this $(MAP_TARGET)
+ $(NOECHO) $(PERLRUNINST) \
+ Makefile.PL DIR=Ext \
+ MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \
+ MAKEAPERL=1 NORECURS=1 CCCDLFLAGS=
+
+
+# --- MakeMaker test section:
+
+TEST_VERBOSE=0
+TEST_TYPE=test_$(LINKTYPE)
+TEST_FILE = test.pl
+TEST_FILES = t/*.t
+TESTDB_SW = -d
+
+testdb :: testdb_$(LINKTYPE)
+
+test :: $(TEST_TYPE) subdirs-test
+
+subdirs-test ::
+ $(NOECHO) $(NOOP)
+
+subdirs-test ::
+ $(NOECHO) cd Ext && $(MAKE) test $(PASTHRU)
+
+
+test_dynamic :: pure_all
+ PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES)
+
+testdb_dynamic :: pure_all
+ PERL_DL_NONLAZY=1 $(FULLPERLRUN) $(TESTDB_SW) "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE)
+
+test_ : test_dynamic
+
+test_static :: pure_all $(MAP_TARGET)
+ PERL_DL_NONLAZY=1 ./$(MAP_TARGET) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES)
+
+testdb_static :: pure_all $(MAP_TARGET)
+ PERL_DL_NONLAZY=1 ./$(MAP_TARGET) $(TESTDB_SW) "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE)
+
+
+
+# --- MakeMaker ppd section:
+# Creates a PPD (Perl Package Description) for a binary distribution.
+ppd :
+ $(NOECHO) $(ECHO) '<SOFTPKG NAME="$(DISTNAME)" VERSION="$(VERSION)">' > $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) ' <ABSTRACT></ABSTRACT>' >> $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) ' <AUTHOR></AUTHOR>' >> $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) ' <IMPLEMENTATION>' >> $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) ' <ARCHITECTURE NAME="darwin-thread-multi-2level-5.12" />' >> $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) ' <CODEBASE HREF="" />' >> $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) ' </IMPLEMENTATION>' >> $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) '</SOFTPKG>' >> $(DISTNAME).ppd
+
+
+# --- MakeMaker pm_to_blib section:
+
+pm_to_blib : $(FIRST_MAKEFILE) $(TO_INST_PM)
+ $(NOECHO) $(ABSPERLRUN) -MExtUtils::Install -e 'pm_to_blib({@ARGV}, '\''$(INST_LIB)/auto'\'', q[$(PM_FILTER)], '\''$(PERM_DIR)'\'')' -- \
+ TFBS/PatternGen/YMF.pm $(INST_LIB)/TFBS/PatternGen/YMF.pm \
+ TFBS/DB/TRANSFAC.pm $(INST_LIB)/TFBS/DB/TRANSFAC.pm \
+ TFBS/DB.pm $(INST_LIB)/TFBS/DB.pm \
+ TFBS/DB/LocalTRANSFAC.pm $(INST_LIB)/TFBS/DB/LocalTRANSFAC.pm \
+ TFBS/PatternGen/MEME.pm $(INST_LIB)/TFBS/PatternGen/MEME.pm \
+ TFBS/PatternGen/Gibbs.pm $(INST_LIB)/TFBS/PatternGen/Gibbs.pm \
+ TFBS/PatternGen/Elph.pm $(INST_LIB)/TFBS/PatternGen/Elph.pm \
+ TFBS/DB/JASPAR4.pm $(INST_LIB)/TFBS/DB/JASPAR4.pm \
+ TFBS/PatternGenI.pm $(INST_LIB)/TFBS/PatternGenI.pm \
+ TFBS/Matrix/ICM.pm $(INST_LIB)/TFBS/Matrix/ICM.pm \
+ TFBS/PatternGen/YMF/Motif.pm $(INST_LIB)/TFBS/PatternGen/YMF/Motif.pm \
+ TFBS/SitePairSet.pm $(INST_LIB)/TFBS/SitePairSet.pm \
+ TFBS/PatternGen/Elph/Motif.pm $(INST_LIB)/TFBS/PatternGen/Elph/Motif.pm \
+ TFBS/Site.pm $(INST_LIB)/TFBS/Site.pm \
+ TFBS/_Iterator/_MatrixSetIterator.pm $(INST_LIB)/TFBS/_Iterator/_MatrixSetIterator.pm \
+ TFBS/Tools/SetOperations.pm $(INST_LIB)/TFBS/Tools/SetOperations.pm \
+ TFBS/Matrix/PFM.pm $(INST_LIB)/TFBS/Matrix/PFM.pm \
+ TFBS/PatternI.pm $(INST_LIB)/TFBS/PatternI.pm \
+ TFBS/Word/Consensus.pm $(INST_LIB)/TFBS/Word/Consensus.pm \
+ TFBS/PatternGen/Gibbs/Motif.pm $(INST_LIB)/TFBS/PatternGen/Gibbs/Motif.pm \
+ TFBS/SiteSet.pm $(INST_LIB)/TFBS/SiteSet.pm \
+ TFBS/Matrix/_Alignment.pm $(INST_LIB)/TFBS/Matrix/_Alignment.pm \
+ TFBS/PatternGen/AnnSpec.pm $(INST_LIB)/TFBS/PatternGen/AnnSpec.pm \
+ TFBS/PatternGen/Motif/Word.pm $(INST_LIB)/TFBS/PatternGen/Motif/Word.pm \
+ TFBS/SitePair.pm $(INST_LIB)/TFBS/SitePair.pm \
+ TFBS/_Iterator/_SiteSetIterator.pm $(INST_LIB)/TFBS/_Iterator/_SiteSetIterator.pm \
+ TFBS/_Iterator.pm $(INST_LIB)/TFBS/_Iterator.pm \
+ TFBS/PatternGen/MEME/Motif.pm $(INST_LIB)/TFBS/PatternGen/MEME/Motif.pm \
+ TFBS/DB/FlatFileDir.pm $(INST_LIB)/TFBS/DB/FlatFileDir.pm \
+ TFBS/PatternGen.pm $(INST_LIB)/TFBS/PatternGen.pm \
+ TFBS/MatrixSet.pm $(INST_LIB)/TFBS/MatrixSet.pm \
+ TFBS/PatternGen/SimplePFM.pm $(INST_LIB)/TFBS/PatternGen/SimplePFM.pm \
+ TFBS/Word.pm $(INST_LIB)/TFBS/Word.pm \
+ TFBS/DB/JASPAR2.pm $(INST_LIB)/TFBS/DB/JASPAR2.pm \
+ TFBS/Matrix.pm $(INST_LIB)/TFBS/Matrix.pm \
+ TFBS/PatternGen/AnnSpec/Motif.pm $(INST_LIB)/TFBS/PatternGen/AnnSpec/Motif.pm \
+ TFBS/PatternGen/Motif/Matrix.pm $(INST_LIB)/TFBS/PatternGen/Motif/Matrix.pm \
+ TFBS/Matrix/PWM.pm $(INST_LIB)/TFBS/Matrix/PWM.pm
+ $(NOECHO) $(TOUCH) pm_to_blib
+
+
+# --- MakeMaker selfdocument section:
+
+
+# --- MakeMaker postamble section:
+
+
+# End.
diff --git a/Makefile.old b/Makefile.old
new file mode 100644
index 0000000..525ef31
--- /dev/null
+++ b/Makefile.old
@@ -0,0 +1,1156 @@
+# This Makefile is for the TFBS extension to perl.
+#
+# It was generated automatically by MakeMaker version
+# 6.68 (Revision: 66800) from the contents of
+# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
+#
+# ANY CHANGES MADE HERE WILL BE LOST!
+#
+# MakeMaker ARGV: ()
+#
+
+# MakeMaker Parameters:
+
+# BUILD_REQUIRES => { }
+# CONFIGURE_REQUIRES => { }
+# DISTNAME => q[TFBS]
+# NAME => q[TFBS]
+# PREREQ_PM => { }
+# TEST_REQUIRES => { }
+# VERSION => q[0.5.0]
+# dist => { DIST_DEFAULT=>q[all tardist], COMPRESS=>q[gzip -9f], SUFFIX=>q[.gz] }
+
+# --- MakeMaker post_initialize section:
+
+
+# --- MakeMaker const_config section:
+
+# These definitions are from config.sh (via /usr/local/Cellar/perl/5.14.3/lib/5.14.3/darwin-2level/Config.pm).
+# They may have been overridden via Makefile.PL or on the command line.
+AR = ar
+CC = cc
+CCCDLFLAGS =
+CCDLFLAGS =
+DLEXT = bundle
+DLSRC = dl_dlopen.xs
+EXE_EXT =
+FULL_AR = /usr/bin/ar
+LD = env MACOSX_DEPLOYMENT_TARGET=10.3 cc
+LDDLFLAGS = -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector
+LDFLAGS = -fstack-protector -L/usr/local/lib
+LIBC =
+LIB_EXT = .a
+OBJ_EXT = .o
+OSNAME = darwin
+OSVERS = 12.2.1
+RANLIB = ranlib
+SITELIBEXP = /usr/local/Cellar/perl/5.14.3/lib/site_perl/5.14.3
+SITEARCHEXP = /usr/local/Cellar/perl/5.14.3/lib/site_perl/5.14.3/darwin-2level
+SO = dylib
+VENDORARCHEXP =
+VENDORLIBEXP =
+
+
+# --- MakeMaker constants section:
+AR_STATIC_ARGS = cr
+DIRFILESEP = /
+DFSEP = $(DIRFILESEP)
+NAME = TFBS
+NAME_SYM = TFBS
+VERSION = 0.5.0
+VERSION_MACRO = VERSION
+VERSION_SYM = 0_5_0
+DEFINE_VERSION = -D$(VERSION_MACRO)=\"$(VERSION)\"
+XS_VERSION = 0.5.0
+XS_VERSION_MACRO = XS_VERSION
+XS_DEFINE_VERSION = -D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\"
+INST_ARCHLIB = blib/arch
+INST_SCRIPT = blib/script
+INST_BIN = blib/bin
+INST_LIB = blib/lib
+INST_MAN1DIR = blib/man1
+INST_MAN3DIR = blib/man3
+MAN1EXT = 1
+MAN3EXT = 3
+INSTALLDIRS = site
+DESTDIR =
+PREFIX = $(SITEPREFIX)
+PERLPREFIX = /usr/local/Cellar/perl/5.14.3
+SITEPREFIX = /usr/local/Cellar/perl/5.14.3
+VENDORPREFIX =
+INSTALLPRIVLIB = /usr/local/Cellar/perl/5.14.3/lib/5.14.3
+DESTINSTALLPRIVLIB = $(DESTDIR)$(INSTALLPRIVLIB)
+INSTALLSITELIB = /usr/local/Cellar/perl/5.14.3/lib/site_perl/5.14.3
+DESTINSTALLSITELIB = $(DESTDIR)$(INSTALLSITELIB)
+INSTALLVENDORLIB =
+DESTINSTALLVENDORLIB = $(DESTDIR)$(INSTALLVENDORLIB)
+INSTALLARCHLIB = /usr/local/Cellar/perl/5.14.3/lib/5.14.3/darwin-2level
+DESTINSTALLARCHLIB = $(DESTDIR)$(INSTALLARCHLIB)
+INSTALLSITEARCH = /usr/local/Cellar/perl/5.14.3/lib/site_perl/5.14.3/darwin-2level
+DESTINSTALLSITEARCH = $(DESTDIR)$(INSTALLSITEARCH)
+INSTALLVENDORARCH =
+DESTINSTALLVENDORARCH = $(DESTDIR)$(INSTALLVENDORARCH)
+INSTALLBIN = /usr/local/Cellar/perl/5.14.3/bin
+DESTINSTALLBIN = $(DESTDIR)$(INSTALLBIN)
+INSTALLSITEBIN = /usr/local/Cellar/perl/5.14.3/bin
+DESTINSTALLSITEBIN = $(DESTDIR)$(INSTALLSITEBIN)
+INSTALLVENDORBIN =
+DESTINSTALLVENDORBIN = $(DESTDIR)$(INSTALLVENDORBIN)
+INSTALLSCRIPT = /usr/local/Cellar/perl/5.14.3/bin
+DESTINSTALLSCRIPT = $(DESTDIR)$(INSTALLSCRIPT)
+INSTALLSITESCRIPT = /usr/local/Cellar/perl/5.14.3/bin
+DESTINSTALLSITESCRIPT = $(DESTDIR)$(INSTALLSITESCRIPT)
+INSTALLVENDORSCRIPT =
+DESTINSTALLVENDORSCRIPT = $(DESTDIR)$(INSTALLVENDORSCRIPT)
+INSTALLMAN1DIR = /usr/local/Cellar/perl/5.14.3/share/man/man1
+DESTINSTALLMAN1DIR = $(DESTDIR)$(INSTALLMAN1DIR)
+INSTALLSITEMAN1DIR = /usr/local/Cellar/perl/5.14.3/share/man/man1
+DESTINSTALLSITEMAN1DIR = $(DESTDIR)$(INSTALLSITEMAN1DIR)
+INSTALLVENDORMAN1DIR =
+DESTINSTALLVENDORMAN1DIR = $(DESTDIR)$(INSTALLVENDORMAN1DIR)
+INSTALLMAN3DIR = /usr/local/Cellar/perl/5.14.3/share/man/man3
+DESTINSTALLMAN3DIR = $(DESTDIR)$(INSTALLMAN3DIR)
+INSTALLSITEMAN3DIR = /usr/local/Cellar/perl/5.14.3/share/man/man3
+DESTINSTALLSITEMAN3DIR = $(DESTDIR)$(INSTALLSITEMAN3DIR)
+INSTALLVENDORMAN3DIR =
+DESTINSTALLVENDORMAN3DIR = $(DESTDIR)$(INSTALLVENDORMAN3DIR)
+PERL_LIB = /usr/local/Cellar/perl/5.14.3/lib/5.14.3
+PERL_ARCHLIB = /usr/local/Cellar/perl/5.14.3/lib/5.14.3/darwin-2level
+LIBPERL_A = libperl.a
+FIRST_MAKEFILE = Makefile
+MAKEFILE_OLD = Makefile.old
+MAKE_APERL_FILE = Makefile.aperl
+PERLMAINCC = $(CC)
+PERL_INC = /usr/local/Cellar/perl/5.14.3/lib/5.14.3/darwin-2level/CORE
+PERL = /usr/local/bin/perl
+FULLPERL = /usr/local/bin/perl
+ABSPERL = $(PERL)
+PERLRUN = $(PERL)
+FULLPERLRUN = $(FULLPERL)
+ABSPERLRUN = $(ABSPERL)
+PERLRUNINST = $(PERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
+FULLPERLRUNINST = $(FULLPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
+ABSPERLRUNINST = $(ABSPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
+PERL_CORE = 0
+PERM_DIR = 755
+PERM_RW = 644
+PERM_RWX = 755
+
+MAKEMAKER = /usr/local/Cellar/perl/5.14.3/lib/5.14.3/ExtUtils/MakeMaker.pm
+MM_VERSION = 6.68
+MM_REVISION = 66800
+
+# FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle).
+# BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle)
+# PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar)
+# DLBASE = Basename part of dynamic library. May be just equal BASEEXT.
+MAKE = make
+FULLEXT = TFBS
+BASEEXT = TFBS
+PARENT_NAME =
+DLBASE = $(BASEEXT)
+VERSION_FROM =
+OBJECT =
+LDFROM = $(OBJECT)
+LINKTYPE = dynamic
+BOOTDEP =
+
+# Handy lists of source code files:
+XS_FILES =
+C_FILES =
+O_FILES =
+H_FILES =
+MAN1PODS =
+MAN3PODS = TFBS/DB/FlatFileDir.pm \
+ TFBS/DB/JASPAR2.pm \
+ TFBS/DB/JASPAR4.pm \
+ TFBS/DB/LocalTRANSFAC.pm \
+ TFBS/DB/TRANSFAC.pm \
+ TFBS/Matrix.pm \
+ TFBS/Matrix/ICM.pm \
+ TFBS/Matrix/PFM.pm \
+ TFBS/Matrix/PWM.pm \
+ TFBS/MatrixSet.pm \
+ TFBS/PatternGen.pm \
+ TFBS/PatternGen/AnnSpec.pm \
+ TFBS/PatternGen/AnnSpec/Motif.pm \
+ TFBS/PatternGen/Elph.pm \
+ TFBS/PatternGen/Elph/Motif.pm \
+ TFBS/PatternGen/Gibbs.pm \
+ TFBS/PatternGen/Gibbs/Motif.pm \
+ TFBS/PatternGen/MEME.pm \
+ TFBS/PatternGen/MEME/Motif.pm \
+ TFBS/PatternGen/SimplePFM.pm \
+ TFBS/PatternGen/YMF.pm \
+ TFBS/PatternGen/YMF/Motif.pm \
+ TFBS/PatternI.pm \
+ TFBS/Site.pm \
+ TFBS/SitePair.pm \
+ TFBS/SitePairSet.pm \
+ TFBS/SiteSet.pm \
+ TFBS/Word.pm \
+ TFBS/Word/Consensus.pm
+
+# Where is the Config information that we are using/depend on
+CONFIGDEP = $(PERL_ARCHLIB)$(DFSEP)Config.pm $(PERL_INC)$(DFSEP)config.h
+
+# Where to build things
+INST_LIBDIR = $(INST_LIB)
+INST_ARCHLIBDIR = $(INST_ARCHLIB)
+
+INST_AUTODIR = $(INST_LIB)/auto/$(FULLEXT)
+INST_ARCHAUTODIR = $(INST_ARCHLIB)/auto/$(FULLEXT)
+
+INST_STATIC =
+INST_DYNAMIC =
+INST_BOOT =
+
+# Extra linker info
+EXPORT_LIST =
+PERL_ARCHIVE =
+PERL_ARCHIVE_AFTER =
+
+
+TO_INST_PM = TFBS/DB.pm \
+ TFBS/DB/FlatFileDir.pm \
+ TFBS/DB/JASPAR2.pm \
+ TFBS/DB/JASPAR4.pm \
+ TFBS/DB/LocalTRANSFAC.pm \
+ TFBS/DB/TRANSFAC.pm \
+ TFBS/Matrix.pm \
+ TFBS/Matrix/ICM.pm \
+ TFBS/Matrix/PFM.pm \
+ TFBS/Matrix/PWM.pm \
+ TFBS/Matrix/_Alignment.pm \
+ TFBS/MatrixSet.pm \
+ TFBS/PatternGen.pm \
+ TFBS/PatternGen/AnnSpec.pm \
+ TFBS/PatternGen/AnnSpec/Motif.pm \
+ TFBS/PatternGen/Elph.pm \
+ TFBS/PatternGen/Elph/Motif.pm \
+ TFBS/PatternGen/Gibbs.pm \
+ TFBS/PatternGen/Gibbs/Motif.pm \
+ TFBS/PatternGen/MEME.pm \
+ TFBS/PatternGen/MEME/Motif.pm \
+ TFBS/PatternGen/Motif/Matrix.pm \
+ TFBS/PatternGen/Motif/Word.pm \
+ TFBS/PatternGen/SimplePFM.pm \
+ TFBS/PatternGen/YMF.pm \
+ TFBS/PatternGen/YMF/Motif.pm \
+ TFBS/PatternGenI.pm \
+ TFBS/PatternI.pm \
+ TFBS/Site.pm \
+ TFBS/SitePair.pm \
+ TFBS/SitePairSet.pm \
+ TFBS/SiteSet.pm \
+ TFBS/Tools/SetOperations.pm \
+ TFBS/Word.pm \
+ TFBS/Word/Consensus.pm \
+ TFBS/_Iterator.pm \
+ TFBS/_Iterator/_MatrixSetIterator.pm \
+ TFBS/_Iterator/_SiteSetIterator.pm
+
+PM_TO_BLIB = TFBS/PatternGen/YMF.pm \
+ $(INST_LIB)/TFBS/PatternGen/YMF.pm \
+ TFBS/DB/TRANSFAC.pm \
+ $(INST_LIB)/TFBS/DB/TRANSFAC.pm \
+ TFBS/DB.pm \
+ $(INST_LIB)/TFBS/DB.pm \
+ TFBS/DB/LocalTRANSFAC.pm \
+ $(INST_LIB)/TFBS/DB/LocalTRANSFAC.pm \
+ TFBS/PatternGen/MEME.pm \
+ $(INST_LIB)/TFBS/PatternGen/MEME.pm \
+ TFBS/PatternGen/Gibbs.pm \
+ $(INST_LIB)/TFBS/PatternGen/Gibbs.pm \
+ TFBS/PatternGen/Elph.pm \
+ $(INST_LIB)/TFBS/PatternGen/Elph.pm \
+ TFBS/DB/JASPAR4.pm \
+ $(INST_LIB)/TFBS/DB/JASPAR4.pm \
+ TFBS/PatternGenI.pm \
+ $(INST_LIB)/TFBS/PatternGenI.pm \
+ TFBS/Matrix/ICM.pm \
+ $(INST_LIB)/TFBS/Matrix/ICM.pm \
+ TFBS/PatternGen/YMF/Motif.pm \
+ $(INST_LIB)/TFBS/PatternGen/YMF/Motif.pm \
+ TFBS/SitePairSet.pm \
+ $(INST_LIB)/TFBS/SitePairSet.pm \
+ TFBS/PatternGen/Elph/Motif.pm \
+ $(INST_LIB)/TFBS/PatternGen/Elph/Motif.pm \
+ TFBS/Site.pm \
+ $(INST_LIB)/TFBS/Site.pm \
+ TFBS/_Iterator/_MatrixSetIterator.pm \
+ $(INST_LIB)/TFBS/_Iterator/_MatrixSetIterator.pm \
+ TFBS/Tools/SetOperations.pm \
+ $(INST_LIB)/TFBS/Tools/SetOperations.pm \
+ TFBS/Matrix/PFM.pm \
+ $(INST_LIB)/TFBS/Matrix/PFM.pm \
+ TFBS/PatternI.pm \
+ $(INST_LIB)/TFBS/PatternI.pm \
+ TFBS/Word/Consensus.pm \
+ $(INST_LIB)/TFBS/Word/Consensus.pm \
+ TFBS/PatternGen/Gibbs/Motif.pm \
+ $(INST_LIB)/TFBS/PatternGen/Gibbs/Motif.pm \
+ TFBS/SiteSet.pm \
+ $(INST_LIB)/TFBS/SiteSet.pm \
+ TFBS/Matrix/_Alignment.pm \
+ $(INST_LIB)/TFBS/Matrix/_Alignment.pm \
+ TFBS/PatternGen/AnnSpec.pm \
+ $(INST_LIB)/TFBS/PatternGen/AnnSpec.pm \
+ TFBS/PatternGen/Motif/Word.pm \
+ $(INST_LIB)/TFBS/PatternGen/Motif/Word.pm \
+ TFBS/SitePair.pm \
+ $(INST_LIB)/TFBS/SitePair.pm \
+ TFBS/_Iterator/_SiteSetIterator.pm \
+ $(INST_LIB)/TFBS/_Iterator/_SiteSetIterator.pm \
+ TFBS/_Iterator.pm \
+ $(INST_LIB)/TFBS/_Iterator.pm \
+ TFBS/PatternGen/MEME/Motif.pm \
+ $(INST_LIB)/TFBS/PatternGen/MEME/Motif.pm \
+ TFBS/DB/FlatFileDir.pm \
+ $(INST_LIB)/TFBS/DB/FlatFileDir.pm \
+ TFBS/PatternGen.pm \
+ $(INST_LIB)/TFBS/PatternGen.pm \
+ TFBS/MatrixSet.pm \
+ $(INST_LIB)/TFBS/MatrixSet.pm \
+ TFBS/PatternGen/SimplePFM.pm \
+ $(INST_LIB)/TFBS/PatternGen/SimplePFM.pm \
+ TFBS/Word.pm \
+ $(INST_LIB)/TFBS/Word.pm \
+ TFBS/DB/JASPAR2.pm \
+ $(INST_LIB)/TFBS/DB/JASPAR2.pm \
+ TFBS/Matrix.pm \
+ $(INST_LIB)/TFBS/Matrix.pm \
+ TFBS/PatternGen/AnnSpec/Motif.pm \
+ $(INST_LIB)/TFBS/PatternGen/AnnSpec/Motif.pm \
+ TFBS/PatternGen/Motif/Matrix.pm \
+ $(INST_LIB)/TFBS/PatternGen/Motif/Matrix.pm \
+ TFBS/Matrix/PWM.pm \
+ $(INST_LIB)/TFBS/Matrix/PWM.pm
+
+
+# --- MakeMaker platform_constants section:
+MM_Unix_VERSION = 6.68
+PERL_MALLOC_DEF = -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc
+
+
+# --- MakeMaker tool_autosplit section:
+# Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto
+AUTOSPLITFILE = $(ABSPERLRUN) -e 'use AutoSplit; autosplit($$$$ARGV[0], $$$$ARGV[1], 0, 1, 1)' --
+
+
+
+# --- MakeMaker tool_xsubpp section:
+
+XSUBPPDIR = /usr/local/Cellar/perl/5.14.3/lib/5.14.3/ExtUtils
+XSUBPP = $(XSUBPPDIR)$(DFSEP)xsubpp
+XSUBPPRUN = $(PERLRUN) $(XSUBPP)
+XSPROTOARG =
+XSUBPPDEPS = /usr/local/Cellar/perl/5.14.3/lib/5.14.3/ExtUtils/typemap $(XSUBPP)
+XSUBPPARGS = -typemap /usr/local/Cellar/perl/5.14.3/lib/5.14.3/ExtUtils/typemap
+XSUBPP_EXTRA_ARGS =
+
+
+# --- MakeMaker tools_other section:
+SHELL = /bin/sh
+CHMOD = chmod
+CP = cp
+MV = mv
+NOOP = $(TRUE)
+NOECHO = @
+RM_F = rm -f
+RM_RF = rm -rf
+TEST_F = test -f
+TOUCH = touch
+UMASK_NULL = umask 0
+DEV_NULL = > /dev/null 2>&1
+MKPATH = $(ABSPERLRUN) -MExtUtils::Command -e 'mkpath' --
+EQUALIZE_TIMESTAMP = $(ABSPERLRUN) -MExtUtils::Command -e 'eqtime' --
+FALSE = false
+TRUE = true
+ECHO = echo
+ECHO_N = echo -n
+UNINST = 0
+VERBINST = 0
+MOD_INSTALL = $(ABSPERLRUN) -MExtUtils::Install -e 'install([ from_to => {@ARGV}, verbose => '\''$(VERBINST)'\'', uninstall_shadows => '\''$(UNINST)'\'', dir_mode => '\''$(PERM_DIR)'\'' ]);' --
+DOC_INSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'perllocal_install' --
+UNINSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'uninstall' --
+WARN_IF_OLD_PACKLIST = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'warn_if_old_packlist' --
+MACROSTART =
+MACROEND =
+USEMAKEFILE = -f
+FIXIN = $(ABSPERLRUN) -MExtUtils::MY -e 'MY->fixin(shift)' --
+
+
+# --- MakeMaker makemakerdflt section:
+makemakerdflt : all
+ $(NOECHO) $(NOOP)
+
+
+# --- MakeMaker dist section:
+TAR = COPY_EXTENDED_ATTRIBUTES_DISABLE=1 COPYFILE_DISABLE=1 tar
+TARFLAGS = cvf
+ZIP = zip
+ZIPFLAGS = -r
+COMPRESS = gzip -9f
+SUFFIX = .gz
+SHAR = shar
+PREOP = $(NOECHO) $(NOOP)
+POSTOP = $(NOECHO) $(NOOP)
+TO_UNIX = $(NOECHO) $(NOOP)
+CI = ci -u
+RCS_LABEL = rcs -Nv$(VERSION_SYM): -q
+DIST_CP = best
+DIST_DEFAULT = all tardist
+DISTNAME = TFBS
+DISTVNAME = TFBS-0.5.0
+
+
+# --- MakeMaker macro section:
+
+
+# --- MakeMaker depend section:
+
+
+# --- MakeMaker cflags section:
+
+CCFLAGS = -fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
+OPTIMIZE = -O3
+PERLTYPE =
+MPOLLUTE =
+
+
+# --- MakeMaker const_loadlibs section:
+
+# TFBS might depend on some other libraries:
+# See ExtUtils::Liblist for details
+#
+
+
+# --- MakeMaker const_cccmd section:
+CCCMD = $(CC) -c $(PASTHRU_INC) $(INC) \
+ $(CCFLAGS) $(OPTIMIZE) \
+ $(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION) \
+ $(XS_DEFINE_VERSION)
+
+# --- MakeMaker post_constants section:
+
+
+# --- MakeMaker pasthru section:
+
+PASTHRU = LIBPERL_A="$(LIBPERL_A)"\
+ LINKTYPE="$(LINKTYPE)"\
+ OPTIMIZE="$(OPTIMIZE)"\
+ PREFIX="$(PREFIX)"
+
+
+# --- MakeMaker special_targets section:
+.SUFFIXES : .xs .c .C .cpp .i .s .cxx .cc $(OBJ_EXT)
+
+.PHONY: all config static dynamic test linkext manifest blibdirs clean realclean disttest distdir
+
+
+
+# --- MakeMaker c_o section:
+
+.c.i:
+ cc -E -c $(PASTHRU_INC) $(INC) \
+ $(CCFLAGS) $(OPTIMIZE) \
+ $(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION) \
+ $(XS_DEFINE_VERSION) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c > $*.i
+
+.c.s:
+ $(CCCMD) -S $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c
+
+.c$(OBJ_EXT):
+ $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c
+
+.cpp$(OBJ_EXT):
+ $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cpp
+
+.cxx$(OBJ_EXT):
+ $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cxx
+
+.cc$(OBJ_EXT):
+ $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cc
+
+.C$(OBJ_EXT):
+ $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.C
+
+
+# --- MakeMaker xs_c section:
+
+.xs.c:
+ $(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) $(XSUBPP_EXTRA_ARGS) $*.xs > $*.xsc && $(MV) $*.xsc $*.c
+
+
+# --- MakeMaker xs_o section:
+
+.xs$(OBJ_EXT):
+ $(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.xsc && $(MV) $*.xsc $*.c
+ $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c
+
+
+# --- MakeMaker top_targets section:
+all :: pure_all manifypods
+ $(NOECHO) $(NOOP)
+
+
+pure_all :: config pm_to_blib subdirs linkext
+ $(NOECHO) $(NOOP)
+
+subdirs :: $(MYEXTLIB)
+ $(NOECHO) $(NOOP)
+
+config :: $(FIRST_MAKEFILE) blibdirs
+ $(NOECHO) $(NOOP)
+
+help :
+ perldoc ExtUtils::MakeMaker
+
+
+# --- MakeMaker blibdirs section:
+blibdirs : $(INST_LIBDIR)$(DFSEP).exists $(INST_ARCHLIB)$(DFSEP).exists $(INST_AUTODIR)$(DFSEP).exists $(INST_ARCHAUTODIR)$(DFSEP).exists $(INST_BIN)$(DFSEP).exists $(INST_SCRIPT)$(DFSEP).exists $(INST_MAN1DIR)$(DFSEP).exists $(INST_MAN3DIR)$(DFSEP).exists
+ $(NOECHO) $(NOOP)
+
+# Backwards compat with 6.18 through 6.25
+blibdirs.ts : blibdirs
+ $(NOECHO) $(NOOP)
+
+$(INST_LIBDIR)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_LIBDIR)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_LIBDIR)
+ $(NOECHO) $(TOUCH) $(INST_LIBDIR)$(DFSEP).exists
+
+$(INST_ARCHLIB)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_ARCHLIB)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHLIB)
+ $(NOECHO) $(TOUCH) $(INST_ARCHLIB)$(DFSEP).exists
+
+$(INST_AUTODIR)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_AUTODIR)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_AUTODIR)
+ $(NOECHO) $(TOUCH) $(INST_AUTODIR)$(DFSEP).exists
+
+$(INST_ARCHAUTODIR)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHAUTODIR)
+ $(NOECHO) $(TOUCH) $(INST_ARCHAUTODIR)$(DFSEP).exists
+
+$(INST_BIN)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_BIN)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_BIN)
+ $(NOECHO) $(TOUCH) $(INST_BIN)$(DFSEP).exists
+
+$(INST_SCRIPT)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_SCRIPT)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_SCRIPT)
+ $(NOECHO) $(TOUCH) $(INST_SCRIPT)$(DFSEP).exists
+
+$(INST_MAN1DIR)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_MAN1DIR)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN1DIR)
+ $(NOECHO) $(TOUCH) $(INST_MAN1DIR)$(DFSEP).exists
+
+$(INST_MAN3DIR)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_MAN3DIR)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN3DIR)
+ $(NOECHO) $(TOUCH) $(INST_MAN3DIR)$(DFSEP).exists
+
+
+
+# --- MakeMaker linkext section:
+
+linkext :: $(LINKTYPE)
+ $(NOECHO) $(NOOP)
+
+
+# --- MakeMaker dlsyms section:
+
+
+# --- MakeMaker dynamic section:
+
+dynamic :: $(FIRST_MAKEFILE) $(INST_DYNAMIC) $(INST_BOOT)
+ $(NOECHO) $(NOOP)
+
+
+# --- MakeMaker dynamic_bs section:
+
+BOOTSTRAP =
+
+
+# --- MakeMaker dynamic_lib section:
+
+
+# --- MakeMaker static section:
+
+## $(INST_PM) has been moved to the all: target.
+## It remains here for awhile to allow for old usage: "make static"
+static :: $(FIRST_MAKEFILE) $(INST_STATIC)
+ $(NOECHO) $(NOOP)
+
+
+# --- MakeMaker static_lib section:
+
+
+# --- MakeMaker manifypods section:
+
+POD2MAN_EXE = $(PERLRUN) "-MExtUtils::Command::MM" -e pod2man "--"
+POD2MAN = $(POD2MAN_EXE)
+
+
+manifypods : pure_all \
+ TFBS/Matrix/PFM.pm \
+ TFBS/PatternI.pm \
+ TFBS/PatternGen/YMF.pm \
+ TFBS/DB/TRANSFAC.pm \
+ TFBS/PatternGen/Gibbs/Motif.pm \
+ TFBS/Word/Consensus.pm \
+ TFBS/SiteSet.pm \
+ TFBS/DB/LocalTRANSFAC.pm \
+ TFBS/PatternGen/AnnSpec.pm \
+ TFBS/PatternGen/Gibbs.pm \
+ TFBS/PatternGen/MEME.pm \
+ TFBS/SitePair.pm \
+ TFBS/PatternGen/Elph.pm \
+ TFBS/DB/FlatFileDir.pm \
+ TFBS/PatternGen/MEME/Motif.pm \
+ TFBS/DB/JASPAR4.pm \
+ TFBS/PatternGen.pm \
+ TFBS/MatrixSet.pm \
+ TFBS/PatternGen/SimplePFM.pm \
+ TFBS/Matrix/ICM.pm \
+ TFBS/Word.pm \
+ TFBS/SitePairSet.pm \
+ TFBS/PatternGen/YMF/Motif.pm \
+ TFBS/DB/JASPAR2.pm \
+ TFBS/Matrix.pm \
+ TFBS/PatternGen/Elph/Motif.pm \
+ TFBS/PatternGen/AnnSpec/Motif.pm \
+ TFBS/Site.pm \
+ TFBS/Matrix/PWM.pm
+ $(NOECHO) $(POD2MAN) --section=3 --perm_rw=$(PERM_RW) \
+ TFBS/Matrix/PFM.pm $(INST_MAN3DIR)/TFBS::Matrix::PFM.$(MAN3EXT) \
+ TFBS/PatternI.pm $(INST_MAN3DIR)/TFBS::PatternI.$(MAN3EXT) \
+ TFBS/PatternGen/YMF.pm $(INST_MAN3DIR)/TFBS::PatternGen::YMF.$(MAN3EXT) \
+ TFBS/DB/TRANSFAC.pm $(INST_MAN3DIR)/TFBS::DB::TRANSFAC.$(MAN3EXT) \
+ TFBS/PatternGen/Gibbs/Motif.pm $(INST_MAN3DIR)/TFBS::PatternGen::Gibbs::Motif.$(MAN3EXT) \
+ TFBS/Word/Consensus.pm $(INST_MAN3DIR)/TFBS::Word::Consensus.$(MAN3EXT) \
+ TFBS/SiteSet.pm $(INST_MAN3DIR)/TFBS::SiteSet.$(MAN3EXT) \
+ TFBS/DB/LocalTRANSFAC.pm $(INST_MAN3DIR)/TFBS::DB::LocalTRANSFAC.$(MAN3EXT) \
+ TFBS/PatternGen/AnnSpec.pm $(INST_MAN3DIR)/TFBS::PatternGen::AnnSpec.$(MAN3EXT) \
+ TFBS/PatternGen/Gibbs.pm $(INST_MAN3DIR)/TFBS::PatternGen::Gibbs.$(MAN3EXT) \
+ TFBS/PatternGen/MEME.pm $(INST_MAN3DIR)/TFBS::PatternGen::MEME.$(MAN3EXT) \
+ TFBS/SitePair.pm $(INST_MAN3DIR)/TFBS::SitePair.$(MAN3EXT) \
+ TFBS/PatternGen/Elph.pm $(INST_MAN3DIR)/TFBS::PatternGen::Elph.$(MAN3EXT) \
+ TFBS/DB/FlatFileDir.pm $(INST_MAN3DIR)/TFBS::DB::FlatFileDir.$(MAN3EXT) \
+ TFBS/PatternGen/MEME/Motif.pm $(INST_MAN3DIR)/TFBS::PatternGen::MEME::Motif.$(MAN3EXT) \
+ TFBS/DB/JASPAR4.pm $(INST_MAN3DIR)/TFBS::DB::JASPAR4.$(MAN3EXT) \
+ TFBS/PatternGen.pm $(INST_MAN3DIR)/TFBS::PatternGen.$(MAN3EXT) \
+ TFBS/MatrixSet.pm $(INST_MAN3DIR)/TFBS::MatrixSet.$(MAN3EXT) \
+ TFBS/PatternGen/SimplePFM.pm $(INST_MAN3DIR)/TFBS::PatternGen::SimplePFM.$(MAN3EXT) \
+ TFBS/Matrix/ICM.pm $(INST_MAN3DIR)/TFBS::Matrix::ICM.$(MAN3EXT) \
+ TFBS/Word.pm $(INST_MAN3DIR)/TFBS::Word.$(MAN3EXT) \
+ TFBS/SitePairSet.pm $(INST_MAN3DIR)/TFBS::SitePairSet.$(MAN3EXT) \
+ TFBS/PatternGen/YMF/Motif.pm $(INST_MAN3DIR)/TFBS::PatternGen::YMF::Motif.$(MAN3EXT) \
+ TFBS/DB/JASPAR2.pm $(INST_MAN3DIR)/TFBS::DB::JASPAR2.$(MAN3EXT) \
+ TFBS/Matrix.pm $(INST_MAN3DIR)/TFBS::Matrix.$(MAN3EXT) \
+ TFBS/PatternGen/Elph/Motif.pm $(INST_MAN3DIR)/TFBS::PatternGen::Elph::Motif.$(MAN3EXT) \
+ TFBS/PatternGen/AnnSpec/Motif.pm $(INST_MAN3DIR)/TFBS::PatternGen::AnnSpec::Motif.$(MAN3EXT) \
+ TFBS/Site.pm $(INST_MAN3DIR)/TFBS::Site.$(MAN3EXT) \
+ TFBS/Matrix/PWM.pm $(INST_MAN3DIR)/TFBS::Matrix::PWM.$(MAN3EXT)
+
+
+
+
+# --- MakeMaker processPL section:
+
+
+# --- MakeMaker installbin section:
+
+
+# --- MakeMaker subdirs section:
+
+# The default clean, realclean and test targets in this Makefile
+# have automatically been given entries for each subdir.
+
+
+subdirs ::
+ $(NOECHO) cd Ext && $(MAKE) $(USEMAKEFILE) $(FIRST_MAKEFILE) all $(PASTHRU)
+
+
+# --- MakeMaker clean_subdirs section:
+clean_subdirs :
+ $(ABSPERLRUN) -e 'chdir '\''Ext'\''; system '\''$(MAKE) clean'\'' if -f '\''$(FIRST_MAKEFILE)'\'';' --
+
+
+# --- MakeMaker clean section:
+
+# Delete temporary files but do not touch installed files. We don't delete
+# the Makefile here so a later make realclean still has a makefile to use.
+
+clean :: clean_subdirs
+ - $(RM_F) \
+ *$(LIB_EXT) core \
+ core.[0-9] $(INST_ARCHAUTODIR)/extralibs.all \
+ core.[0-9][0-9] $(BASEEXT).bso \
+ pm_to_blib.ts MYMETA.json \
+ core.[0-9][0-9][0-9][0-9] MYMETA.yml \
+ $(BASEEXT).x $(BOOTSTRAP) \
+ perl$(EXE_EXT) tmon.out \
+ *$(OBJ_EXT) pm_to_blib \
+ $(INST_ARCHAUTODIR)/extralibs.ld blibdirs.ts \
+ core.[0-9][0-9][0-9][0-9][0-9] *perl.core \
+ core.*perl.*.? $(MAKE_APERL_FILE) \
+ $(BASEEXT).def perl \
+ core.[0-9][0-9][0-9] mon.out \
+ lib$(BASEEXT).def perl.exe \
+ perlmain.c so_locations \
+ $(BASEEXT).exp
+ - $(RM_RF) \
+ blib
+ - $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) $(DEV_NULL)
+
+
+# --- MakeMaker realclean_subdirs section:
+realclean_subdirs :
+ - $(ABSPERLRUN) -e 'chdir '\''Ext'\''; system '\''$(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) realclean'\'' if -f '\''$(MAKEFILE_OLD)'\'';' --
+ - $(ABSPERLRUN) -e 'chdir '\''Ext'\''; system '\''$(MAKE) $(USEMAKEFILE) $(FIRST_MAKEFILE) realclean'\'' if -f '\''$(FIRST_MAKEFILE)'\'';' --
+
+
+# --- MakeMaker realclean section:
+# Delete temporary files (via clean) and also delete dist files
+realclean purge :: clean realclean_subdirs
+ - $(RM_F) \
+ $(MAKEFILE_OLD) $(FIRST_MAKEFILE)
+ - $(RM_RF) \
+ $(DISTVNAME)
+
+
+# --- MakeMaker metafile section:
+metafile : create_distdir
+ $(NOECHO) $(ECHO) Generating META.yml
+ $(NOECHO) $(ECHO) '---' > META_new.yml
+ $(NOECHO) $(ECHO) 'abstract: unknown' >> META_new.yml
+ $(NOECHO) $(ECHO) 'author:' >> META_new.yml
+ $(NOECHO) $(ECHO) ' - unknown' >> META_new.yml
+ $(NOECHO) $(ECHO) 'build_requires:' >> META_new.yml
+ $(NOECHO) $(ECHO) ' ExtUtils::MakeMaker: 0' >> META_new.yml
+ $(NOECHO) $(ECHO) 'configure_requires:' >> META_new.yml
+ $(NOECHO) $(ECHO) ' ExtUtils::MakeMaker: 0' >> META_new.yml
+ $(NOECHO) $(ECHO) 'dynamic_config: 1' >> META_new.yml
+ $(NOECHO) $(ECHO) 'generated_by: '\''ExtUtils::MakeMaker version 6.68, CPAN::Meta::Converter version 2.112621'\''' >> META_new.yml
+ $(NOECHO) $(ECHO) 'license: unknown' >> META_new.yml
+ $(NOECHO) $(ECHO) 'meta-spec:' >> META_new.yml
+ $(NOECHO) $(ECHO) ' url: http://module-build.sourceforge.net/META-spec-v1.4.html' >> META_new.yml
+ $(NOECHO) $(ECHO) ' version: 1.4' >> META_new.yml
+ $(NOECHO) $(ECHO) 'name: TFBS' >> META_new.yml
+ $(NOECHO) $(ECHO) 'no_index:' >> META_new.yml
+ $(NOECHO) $(ECHO) ' directory:' >> META_new.yml
+ $(NOECHO) $(ECHO) ' - t' >> META_new.yml
+ $(NOECHO) $(ECHO) ' - inc' >> META_new.yml
+ $(NOECHO) $(ECHO) 'requires: {}' >> META_new.yml
+ $(NOECHO) $(ECHO) 'version: v0.5.0' >> META_new.yml
+ -$(NOECHO) $(MV) META_new.yml $(DISTVNAME)/META.yml
+ $(NOECHO) $(ECHO) Generating META.json
+ $(NOECHO) $(ECHO) '{' > META_new.json
+ $(NOECHO) $(ECHO) ' "abstract" : "unknown",' >> META_new.json
+ $(NOECHO) $(ECHO) ' "author" : [' >> META_new.json
+ $(NOECHO) $(ECHO) ' "unknown"' >> META_new.json
+ $(NOECHO) $(ECHO) ' ],' >> META_new.json
+ $(NOECHO) $(ECHO) ' "dynamic_config" : 1,' >> META_new.json
+ $(NOECHO) $(ECHO) ' "generated_by" : "ExtUtils::MakeMaker version 6.68, CPAN::Meta::Converter version 2.112621",' >> META_new.json
+ $(NOECHO) $(ECHO) ' "license" : [' >> META_new.json
+ $(NOECHO) $(ECHO) ' "unknown"' >> META_new.json
+ $(NOECHO) $(ECHO) ' ],' >> META_new.json
+ $(NOECHO) $(ECHO) ' "meta-spec" : {' >> META_new.json
+ $(NOECHO) $(ECHO) ' "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",' >> META_new.json
+ $(NOECHO) $(ECHO) ' "version" : "2"' >> META_new.json
+ $(NOECHO) $(ECHO) ' },' >> META_new.json
+ $(NOECHO) $(ECHO) ' "name" : "TFBS",' >> META_new.json
+ $(NOECHO) $(ECHO) ' "no_index" : {' >> META_new.json
+ $(NOECHO) $(ECHO) ' "directory" : [' >> META_new.json
+ $(NOECHO) $(ECHO) ' "t",' >> META_new.json
+ $(NOECHO) $(ECHO) ' "inc"' >> META_new.json
+ $(NOECHO) $(ECHO) ' ]' >> META_new.json
+ $(NOECHO) $(ECHO) ' },' >> META_new.json
+ $(NOECHO) $(ECHO) ' "prereqs" : {' >> META_new.json
+ $(NOECHO) $(ECHO) ' "build" : {' >> META_new.json
+ $(NOECHO) $(ECHO) ' "requires" : {' >> META_new.json
+ $(NOECHO) $(ECHO) ' "ExtUtils::MakeMaker" : 0' >> META_new.json
+ $(NOECHO) $(ECHO) ' }' >> META_new.json
+ $(NOECHO) $(ECHO) ' },' >> META_new.json
+ $(NOECHO) $(ECHO) ' "configure" : {' >> META_new.json
+ $(NOECHO) $(ECHO) ' "requires" : {' >> META_new.json
+ $(NOECHO) $(ECHO) ' "ExtUtils::MakeMaker" : 0' >> META_new.json
+ $(NOECHO) $(ECHO) ' }' >> META_new.json
+ $(NOECHO) $(ECHO) ' },' >> META_new.json
+ $(NOECHO) $(ECHO) ' "runtime" : {' >> META_new.json
+ $(NOECHO) $(ECHO) ' "requires" : {}' >> META_new.json
+ $(NOECHO) $(ECHO) ' }' >> META_new.json
+ $(NOECHO) $(ECHO) ' },' >> META_new.json
+ $(NOECHO) $(ECHO) ' "release_status" : "stable",' >> META_new.json
+ $(NOECHO) $(ECHO) ' "version" : "v0.5.0"' >> META_new.json
+ $(NOECHO) $(ECHO) '}' >> META_new.json
+ -$(NOECHO) $(MV) META_new.json $(DISTVNAME)/META.json
+
+
+# --- MakeMaker signature section:
+signature :
+ cpansign -s
+
+
+# --- MakeMaker dist_basics section:
+distclean :: realclean distcheck
+ $(NOECHO) $(NOOP)
+
+distcheck :
+ $(PERLRUN) "-MExtUtils::Manifest=fullcheck" -e fullcheck
+
+skipcheck :
+ $(PERLRUN) "-MExtUtils::Manifest=skipcheck" -e skipcheck
+
+manifest :
+ $(PERLRUN) "-MExtUtils::Manifest=mkmanifest" -e mkmanifest
+
+veryclean : realclean
+ $(RM_F) *~ */*~ *.orig */*.orig *.bak */*.bak *.old */*.old
+
+
+
+# --- MakeMaker dist_core section:
+
+dist : $(DIST_DEFAULT) $(FIRST_MAKEFILE)
+ $(NOECHO) $(ABSPERLRUN) -l -e 'print '\''Warning: Makefile possibly out of date with $(VERSION_FROM)'\''' \
+ -e ' if -e '\''$(VERSION_FROM)'\'' and -M '\''$(VERSION_FROM)'\'' < -M '\''$(FIRST_MAKEFILE)'\'';' --
+
+tardist : $(DISTVNAME).tar$(SUFFIX)
+ $(NOECHO) $(NOOP)
+
+uutardist : $(DISTVNAME).tar$(SUFFIX)
+ uuencode $(DISTVNAME).tar$(SUFFIX) $(DISTVNAME).tar$(SUFFIX) > $(DISTVNAME).tar$(SUFFIX)_uu
+
+$(DISTVNAME).tar$(SUFFIX) : distdir
+ $(PREOP)
+ $(TO_UNIX)
+ $(TAR) $(TARFLAGS) $(DISTVNAME).tar $(DISTVNAME)
+ $(RM_RF) $(DISTVNAME)
+ $(COMPRESS) $(DISTVNAME).tar
+ $(POSTOP)
+
+zipdist : $(DISTVNAME).zip
+ $(NOECHO) $(NOOP)
+
+$(DISTVNAME).zip : distdir
+ $(PREOP)
+ $(ZIP) $(ZIPFLAGS) $(DISTVNAME).zip $(DISTVNAME)
+ $(RM_RF) $(DISTVNAME)
+ $(POSTOP)
+
+shdist : distdir
+ $(PREOP)
+ $(SHAR) $(DISTVNAME) > $(DISTVNAME).shar
+ $(RM_RF) $(DISTVNAME)
+ $(POSTOP)
+
+
+# --- MakeMaker distdir section:
+create_distdir :
+ $(RM_RF) $(DISTVNAME)
+ $(PERLRUN) "-MExtUtils::Manifest=manicopy,maniread" \
+ -e "manicopy(maniread(),'$(DISTVNAME)', '$(DIST_CP)');"
+
+distdir : create_distdir distmeta
+ $(NOECHO) $(NOOP)
+
+
+
+# --- MakeMaker dist_test section:
+disttest : distdir
+ cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL
+ cd $(DISTVNAME) && $(MAKE) $(PASTHRU)
+ cd $(DISTVNAME) && $(MAKE) test $(PASTHRU)
+
+
+
+# --- MakeMaker dist_ci section:
+
+ci :
+ $(PERLRUN) "-MExtUtils::Manifest=maniread" \
+ -e "@all = keys %{ maniread() };" \
+ -e "print(qq{Executing $(CI) @all\n}); system(qq{$(CI) @all});" \
+ -e "print(qq{Executing $(RCS_LABEL) ...\n}); system(qq{$(RCS_LABEL) @all});"
+
+
+# --- MakeMaker distmeta section:
+distmeta : create_distdir metafile
+ $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'exit unless -e q{META.yml};' \
+ -e 'eval { maniadd({q{META.yml} => q{Module YAML meta-data (added by MakeMaker)}}) }' \
+ -e ' or print "Could not add META.yml to MANIFEST: $$$${'\''@'\''}\n"' --
+ $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'exit unless -f q{META.json};' \
+ -e 'eval { maniadd({q{META.json} => q{Module JSON meta-data (added by MakeMaker)}}) }' \
+ -e ' or print "Could not add META.json to MANIFEST: $$$${'\''@'\''}\n"' --
+
+
+
+# --- MakeMaker distsignature section:
+distsignature : create_distdir
+ $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{SIGNATURE} => q{Public-key signature (added by MakeMaker)}}) } ' \
+ -e ' or print "Could not add SIGNATURE to MANIFEST: $$$${'\''@'\''}\n"' --
+ $(NOECHO) cd $(DISTVNAME) && $(TOUCH) SIGNATURE
+ cd $(DISTVNAME) && cpansign -s
+
+
+
+# --- MakeMaker install section:
+
+install :: pure_install doc_install
+ $(NOECHO) $(NOOP)
+
+install_perl :: pure_perl_install doc_perl_install
+ $(NOECHO) $(NOOP)
+
+install_site :: pure_site_install doc_site_install
+ $(NOECHO) $(NOOP)
+
+install_vendor :: pure_vendor_install doc_vendor_install
+ $(NOECHO) $(NOOP)
+
+pure_install :: pure_$(INSTALLDIRS)_install
+ $(NOECHO) $(NOOP)
+
+doc_install :: doc_$(INSTALLDIRS)_install
+ $(NOECHO) $(NOOP)
+
+pure__install : pure_site_install
+ $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
+
+doc__install : doc_site_install
+ $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
+
+pure_perl_install :: all
+ $(NOECHO) $(MOD_INSTALL) \
+ read $(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist \
+ write $(DESTINSTALLARCHLIB)/auto/$(FULLEXT)/.packlist \
+ $(INST_LIB) $(DESTINSTALLPRIVLIB) \
+ $(INST_ARCHLIB) $(DESTINSTALLARCHLIB) \
+ $(INST_BIN) $(DESTINSTALLBIN) \
+ $(INST_SCRIPT) $(DESTINSTALLSCRIPT) \
+ $(INST_MAN1DIR) $(DESTINSTALLMAN1DIR) \
+ $(INST_MAN3DIR) $(DESTINSTALLMAN3DIR)
+ $(NOECHO) $(WARN_IF_OLD_PACKLIST) \
+ $(SITEARCHEXP)/auto/$(FULLEXT)
+
+
+pure_site_install :: all
+ $(NOECHO) $(MOD_INSTALL) \
+ read $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist \
+ write $(DESTINSTALLSITEARCH)/auto/$(FULLEXT)/.packlist \
+ $(INST_LIB) $(DESTINSTALLSITELIB) \
+ $(INST_ARCHLIB) $(DESTINSTALLSITEARCH) \
+ $(INST_BIN) $(DESTINSTALLSITEBIN) \
+ $(INST_SCRIPT) $(DESTINSTALLSITESCRIPT) \
+ $(INST_MAN1DIR) $(DESTINSTALLSITEMAN1DIR) \
+ $(INST_MAN3DIR) $(DESTINSTALLSITEMAN3DIR)
+ $(NOECHO) $(WARN_IF_OLD_PACKLIST) \
+ $(PERL_ARCHLIB)/auto/$(FULLEXT)
+
+pure_vendor_install :: all
+ $(NOECHO) $(MOD_INSTALL) \
+ read $(VENDORARCHEXP)/auto/$(FULLEXT)/.packlist \
+ write $(DESTINSTALLVENDORARCH)/auto/$(FULLEXT)/.packlist \
+ $(INST_LIB) $(DESTINSTALLVENDORLIB) \
+ $(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) \
+ $(INST_BIN) $(DESTINSTALLVENDORBIN) \
+ $(INST_SCRIPT) $(DESTINSTALLVENDORSCRIPT) \
+ $(INST_MAN1DIR) $(DESTINSTALLVENDORMAN1DIR) \
+ $(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR)
+
+doc_perl_install :: all
+ $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
+ -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
+ -$(NOECHO) $(DOC_INSTALL) \
+ "Module" "$(NAME)" \
+ "installed into" "$(INSTALLPRIVLIB)" \
+ LINKTYPE "$(LINKTYPE)" \
+ VERSION "$(VERSION)" \
+ EXE_FILES "$(EXE_FILES)" \
+ >> $(DESTINSTALLARCHLIB)/perllocal.pod
+
+doc_site_install :: all
+ $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
+ -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
+ -$(NOECHO) $(DOC_INSTALL) \
+ "Module" "$(NAME)" \
+ "installed into" "$(INSTALLSITELIB)" \
+ LINKTYPE "$(LINKTYPE)" \
+ VERSION "$(VERSION)" \
+ EXE_FILES "$(EXE_FILES)" \
+ >> $(DESTINSTALLARCHLIB)/perllocal.pod
+
+doc_vendor_install :: all
+ $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
+ -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
+ -$(NOECHO) $(DOC_INSTALL) \
+ "Module" "$(NAME)" \
+ "installed into" "$(INSTALLVENDORLIB)" \
+ LINKTYPE "$(LINKTYPE)" \
+ VERSION "$(VERSION)" \
+ EXE_FILES "$(EXE_FILES)" \
+ >> $(DESTINSTALLARCHLIB)/perllocal.pod
+
+
+uninstall :: uninstall_from_$(INSTALLDIRS)dirs
+ $(NOECHO) $(NOOP)
+
+uninstall_from_perldirs ::
+ $(NOECHO) $(UNINSTALL) $(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist
+
+uninstall_from_sitedirs ::
+ $(NOECHO) $(UNINSTALL) $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist
+
+uninstall_from_vendordirs ::
+ $(NOECHO) $(UNINSTALL) $(VENDORARCHEXP)/auto/$(FULLEXT)/.packlist
+
+
+# --- MakeMaker force section:
+# Phony target to force checking subdirectories.
+FORCE :
+ $(NOECHO) $(NOOP)
+
+
+# --- MakeMaker perldepend section:
+
+
+# --- MakeMaker makefile section:
+# We take a very conservative approach here, but it's worth it.
+# We move Makefile to Makefile.old here to avoid gnu make looping.
+$(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP)
+ $(NOECHO) $(ECHO) "Makefile out-of-date with respect to $?"
+ $(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makefile..."
+ -$(NOECHO) $(RM_F) $(MAKEFILE_OLD)
+ -$(NOECHO) $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD)
+ - $(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) clean $(DEV_NULL)
+ $(PERLRUN) Makefile.PL
+ $(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <=="
+ $(NOECHO) $(ECHO) "==> Please rerun the $(MAKE) command. <=="
+ $(FALSE)
+
+
+
+# --- MakeMaker staticmake section:
+
+# --- MakeMaker makeaperl section ---
+MAP_TARGET = perl
+FULLPERL = /usr/local/bin/perl
+
+$(MAP_TARGET) :: static $(MAKE_APERL_FILE)
+ $(MAKE) $(USEMAKEFILE) $(MAKE_APERL_FILE) $@
+
+$(MAKE_APERL_FILE) : $(FIRST_MAKEFILE) pm_to_blib
+ $(NOECHO) $(ECHO) Writing \"$(MAKE_APERL_FILE)\" for this $(MAP_TARGET)
+ $(NOECHO) $(PERLRUNINST) \
+ Makefile.PL DIR=Ext \
+ MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \
+ MAKEAPERL=1 NORECURS=1 CCCDLFLAGS=
+
+
+# --- MakeMaker test section:
+
+TEST_VERBOSE=0
+TEST_TYPE=test_$(LINKTYPE)
+TEST_FILE = test.pl
+TEST_FILES = t/*.t
+TESTDB_SW = -d
+
+testdb :: testdb_$(LINKTYPE)
+
+test :: $(TEST_TYPE) subdirs-test
+
+subdirs-test ::
+ $(NOECHO) $(NOOP)
+
+subdirs-test ::
+ $(NOECHO) cd Ext && $(MAKE) test $(PASTHRU)
+
+
+test_dynamic :: pure_all
+ PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES)
+
+testdb_dynamic :: pure_all
+ PERL_DL_NONLAZY=1 $(FULLPERLRUN) $(TESTDB_SW) "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE)
+
+test_ : test_dynamic
+
+test_static :: pure_all $(MAP_TARGET)
+ PERL_DL_NONLAZY=1 ./$(MAP_TARGET) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES)
+
+testdb_static :: pure_all $(MAP_TARGET)
+ PERL_DL_NONLAZY=1 ./$(MAP_TARGET) $(TESTDB_SW) "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE)
+
+
+
+# --- MakeMaker ppd section:
+# Creates a PPD (Perl Package Description) for a binary distribution.
+ppd :
+ $(NOECHO) $(ECHO) '<SOFTPKG NAME="$(DISTNAME)" VERSION="$(VERSION)">' > $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) ' <ABSTRACT></ABSTRACT>' >> $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) ' <AUTHOR></AUTHOR>' >> $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) ' <IMPLEMENTATION>' >> $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) ' <ARCHITECTURE NAME="darwin-2level-5.14" />' >> $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) ' <CODEBASE HREF="" />' >> $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) ' </IMPLEMENTATION>' >> $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) '</SOFTPKG>' >> $(DISTNAME).ppd
+
+
+# --- MakeMaker pm_to_blib section:
+
+pm_to_blib : $(FIRST_MAKEFILE) $(TO_INST_PM)
+ $(NOECHO) $(ABSPERLRUN) -MExtUtils::Install -e 'pm_to_blib({@ARGV}, '\''$(INST_LIB)/auto'\'', q[$(PM_FILTER)], '\''$(PERM_DIR)'\'')' -- \
+ TFBS/PatternGen/YMF.pm $(INST_LIB)/TFBS/PatternGen/YMF.pm \
+ TFBS/DB/TRANSFAC.pm $(INST_LIB)/TFBS/DB/TRANSFAC.pm \
+ TFBS/DB.pm $(INST_LIB)/TFBS/DB.pm \
+ TFBS/DB/LocalTRANSFAC.pm $(INST_LIB)/TFBS/DB/LocalTRANSFAC.pm \
+ TFBS/PatternGen/MEME.pm $(INST_LIB)/TFBS/PatternGen/MEME.pm \
+ TFBS/PatternGen/Gibbs.pm $(INST_LIB)/TFBS/PatternGen/Gibbs.pm \
+ TFBS/PatternGen/Elph.pm $(INST_LIB)/TFBS/PatternGen/Elph.pm \
+ TFBS/DB/JASPAR4.pm $(INST_LIB)/TFBS/DB/JASPAR4.pm \
+ TFBS/PatternGenI.pm $(INST_LIB)/TFBS/PatternGenI.pm \
+ TFBS/Matrix/ICM.pm $(INST_LIB)/TFBS/Matrix/ICM.pm \
+ TFBS/PatternGen/YMF/Motif.pm $(INST_LIB)/TFBS/PatternGen/YMF/Motif.pm \
+ TFBS/SitePairSet.pm $(INST_LIB)/TFBS/SitePairSet.pm \
+ TFBS/PatternGen/Elph/Motif.pm $(INST_LIB)/TFBS/PatternGen/Elph/Motif.pm \
+ TFBS/Site.pm $(INST_LIB)/TFBS/Site.pm \
+ TFBS/_Iterator/_MatrixSetIterator.pm $(INST_LIB)/TFBS/_Iterator/_MatrixSetIterator.pm \
+ TFBS/Tools/SetOperations.pm $(INST_LIB)/TFBS/Tools/SetOperations.pm \
+ TFBS/Matrix/PFM.pm $(INST_LIB)/TFBS/Matrix/PFM.pm \
+ TFBS/PatternI.pm $(INST_LIB)/TFBS/PatternI.pm \
+ TFBS/Word/Consensus.pm $(INST_LIB)/TFBS/Word/Consensus.pm \
+ TFBS/PatternGen/Gibbs/Motif.pm $(INST_LIB)/TFBS/PatternGen/Gibbs/Motif.pm \
+ TFBS/SiteSet.pm $(INST_LIB)/TFBS/SiteSet.pm \
+ TFBS/Matrix/_Alignment.pm $(INST_LIB)/TFBS/Matrix/_Alignment.pm \
+ TFBS/PatternGen/AnnSpec.pm $(INST_LIB)/TFBS/PatternGen/AnnSpec.pm \
+ TFBS/PatternGen/Motif/Word.pm $(INST_LIB)/TFBS/PatternGen/Motif/Word.pm \
+ TFBS/SitePair.pm $(INST_LIB)/TFBS/SitePair.pm \
+ TFBS/_Iterator/_SiteSetIterator.pm $(INST_LIB)/TFBS/_Iterator/_SiteSetIterator.pm \
+ TFBS/_Iterator.pm $(INST_LIB)/TFBS/_Iterator.pm \
+ TFBS/PatternGen/MEME/Motif.pm $(INST_LIB)/TFBS/PatternGen/MEME/Motif.pm \
+ TFBS/DB/FlatFileDir.pm $(INST_LIB)/TFBS/DB/FlatFileDir.pm \
+ TFBS/PatternGen.pm $(INST_LIB)/TFBS/PatternGen.pm \
+ TFBS/MatrixSet.pm $(INST_LIB)/TFBS/MatrixSet.pm \
+ TFBS/PatternGen/SimplePFM.pm $(INST_LIB)/TFBS/PatternGen/SimplePFM.pm \
+ TFBS/Word.pm $(INST_LIB)/TFBS/Word.pm \
+ TFBS/DB/JASPAR2.pm $(INST_LIB)/TFBS/DB/JASPAR2.pm \
+ TFBS/Matrix.pm $(INST_LIB)/TFBS/Matrix.pm \
+ TFBS/PatternGen/AnnSpec/Motif.pm $(INST_LIB)/TFBS/PatternGen/AnnSpec/Motif.pm \
+ TFBS/PatternGen/Motif/Matrix.pm $(INST_LIB)/TFBS/PatternGen/Motif/Matrix.pm \
+ TFBS/Matrix/PWM.pm $(INST_LIB)/TFBS/Matrix/PWM.pm
+ $(NOECHO) $(TOUCH) pm_to_blib
+
+
+# --- MakeMaker selfdocument section:
+
+
+# --- MakeMaker postamble section:
+
+
+# End.
diff --git a/README b/README
deleted file mode 100644
index bfbf9bc..0000000
--- a/README
+++ /dev/null
@@ -1,154 +0,0 @@
-This is the README file for TFBS modules distribution,
-Version 0.3.0
-
-
-*NOTE*
-
- Much of this README file has been copypasted and adapted from
- bioperl distrubution README file. Sorry, guys, but you've done such
- a great job that I just could not ignore it :)
-
-
-o About TFBS
-
- TFBS is a computational framework for transcription factor binding site
- analysis. It can also be used for analysis involving other DNA paterns
- representable by matrices, e.g. splice sites.
-
-
-o Contact info
-
- Author: Boris.Lenhard at cgb.ki.se
-
- TFBS website : http://forkhead.cgb.ki.se
-
- Bug reports : contact author
-
- Please send bug reports, in particular about documentation which you
- think is unclear or problems in installation. The author is also
- interested in suggestions on directions in which TFBS functionality
- should be expanded.
-
-
-o System requirements
-
- - Tested only on Linux/i686, Tru64 Unix, Solaris
- - perl 5.005_03 or later.
- - ANSI C or Gnu C compiler for XS extensions
- - bioperl 0.7.*
- (use the TFBS-0.3.0.DEV distribution with bioperl 0.9.*)
- - Additional perl module and application dependencies listed at
- http://forkhead.cgb.ki.se/TFBS/
-
-
-
-o Documentation
-
- The modules have a reasovably complete POD documentation.
- After instalation, type e.g.
-
- perldoc TFBS::Matrix::ICM
-
- to display the documentation for a particular module.
-
- POD documentation for all modules, as well as additional
- information can be accessed from TFBS web page at
- http://forkhead.cgb.ki.se/TFBS/ .
-
- A limited amount of example code, can also be found in the
- examples/ directory. The current collection includes scripts for
- demonstrational purposes. The explanations an be found in the source
- code of individual scripts.
-
-
-o Releases
-
-
- The 0.9.x developer series releases are intended to be quick
- releases off the main trunk to provided FTPable code that has been
- test that it will compile and all tests pass reasonably. In the
- future all odd numbered point releases will be developer releases and
- even point releases will be stable releases.
-
-
-o Installation
-
-
- The TFBS modules are distributed as a tar file in standard perl
- CPAN distribution form. This means that installation is very
- simple. Once you have unpacked the tar distribution there is a
- directory called TFBS-xx/, which is where this file is. Move into
- that directory and
- issue the following commands:
-
- perl Makefile.PL # makes a system-specific makefile
- make # makes the distribution
- make test # runs the test code
- make install # [may need root access for system install.
- # See below for how to get around this.]
-
- This should build, test and install the distribution cleanly on your
- system, provided that all prerequisite modules have been installed.
- Running perl Makefile.PL will ask you for a MySQL server write access
- details if you want to test TFBS::DB::JASPAR2 module. You can safely
- choose not to do the test by answering "no" tho the first questions.
-
- To install you need write permission in the perl5/site_perl/ source area.
- Quite often this will require you (or someone else) becoming root,
- so you will want to talk to your systems manager if you don't
- have the necessary access.
-
- It is possible to install the package outside of the standard Perl5
- location. See below for details.
-
-
- INSTALLING TFBS IN A PERSONAL OR PRIVATE MODULE AREA
-
- If you lack permission to install perl modules into the
- standard site_perl/ system area you can configure TFBS to
- install itself anywhere you choose. Ideally this would
- be a personal perl directory or standard place where you
- plan to put all your 'local' or personal perl modules.
-
- Note: you _must_ have write permission to this area.
-
- Simply pass a parameter to perl as it builds your system
- specific makefile.
-
- Example:
-
- perl Makefile.PL PREFIX=/home/borisl/perllib
- make
- make test
- make install
-
- This will cause perl to install the TFBS modules in:
- /home/borisl/perllib/lib/perl5/site_perl/
-
- And the man pages will go in:
- /home/dag/My_Perl_Modules/lib/perl5/man/
-
- To specify a directory besides lib/perl5/site_perl,
- or if there are still permission problems, include
- an INSTALLSITELIB directive along with the PREFIX:
-
- perl Makefile.PL PREFIX=/home/borisl/perl INSTALLSITELIB=/home/borisl/perl/lib
-
- See below for how to use modules that are not installed in the
- standard Perl5 location.
-
-
-
- USING MODULES NOT INSTALLED IN THE STANDARD PERL LOCATION
-
- You can explicitly tell perl where to look for modules by using the
- lib module which comes standard with perl.
-
- Example:
-
- #!/usr/bin/perl -w
-
- use lib "/home/borisl/perllib/";
- use TFBS::PatternGen::Gibbs;
-
- # etc...
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..b37e3ea
--- /dev/null
+++ b/README.md
@@ -0,0 +1,117 @@
+# This is the README file for TFBS modules distribution, Version 0.7.1
+
+
+**NOTE**
+TFBS perl module is no longer under active development.
+All the functionality can be found in [TFBSTools](http://bioconductor.org/packages/TFBSTools/) Bioconductor package.
+Users are highly encouraged to switch to TFBSTools.
+
+## About TFBS
+TFBS is a computational framework for transcription factor binding site
+analysis. It can also be used for analysis involving other DNA paterns
+representable by matrices, e.g. splice sites.
+
+
+## Contact info
+Author: b.lenhard at imperial.ac.uk
+
+TFBS website: http://tfbs.genereg.net/
+
+Bug reports: https://github.com/ComputationalRegulatoryGenomicsICL/TFBS/issues
+
+Please send bug reports, in particular about documentation which you
+think is unclear or problems in installation.
+The author is also interested in suggestions on directions in which TFBS functionality should be expanded.
+
+## System requirements
+* Tested on Linux/i686, Mac OS 10.12.3
+* perl 5.10.0 or later
+* ANSI C or Gnu C compiler for XS extensions
+* bioperl 1.0 or later
+* Additional perl module and application dependencies listed at http://tfbs.genereg.net/
+
+## Documentation
+
+The modules have a reasovably complete POD documentation. After instalation, type e.g.
+
+```sh
+perldoc TFBS::Matrix::ICM
+```
+
+to display the documentation for a particular module.
+
+POD documentation for all modules, as well as additional information can be accessed from TFBS web page at
+http://tfbs.genereg.net/POD/.
+
+A limited amount of example code, can also be found in the `examples/` directory.
+The current collection includes scripts for demonstrational purposes.
+The explanations an be found in the source code of individual scripts.
+
+## Installation
+The TFBS modules are distributed as a tar file in standard perl CPAN distribution form.
+This means that installation is very simple.
+Once you have unpacked the tar distribution there is a directory called TFBS-xx/, which is where this file is.
+Move into that directory and issue the following commands:
+
+```sh
+perl Makefile.PL # makes a system-specific makefile
+make # makes the distribution
+make test # runs the test code
+make install # [may need root access for system install. See below for how to get around this.]
+```
+
+This should build, test and install the distribution cleanly on your system,
+provided that all prerequisite modules have been installed.
+Running perl Makefile.PL will ask you for a MySQL server write access
+details if you want to test TFBS::DB::JASPAR7 module.
+You can safely choose not to do the test by answering "no" tho the first questions.
+
+To install you need write permission in the `perl5/site_perl/` source area.
+Quite often this will require you (or someone else) becoming root,
+so you will want to talk to your systems manager if you don't have the necessary access.
+
+It is possible to install the package outside of the standard Perl5 location. See below for details.
+
+### INSTALLING TFBS IN A PERSONAL OR PRIVATE MODULE AREA
+
+If you lack permission to install perl modules into the standard `site_perl/` system area you can configure TFBS to
+install itself anywhere you choose.
+Ideally this would be a personal perl directory or standard place where you plan to put all your 'local' or personal perl modules.
+
+*Note*: you _must_ have write permission to this area.
+
+Simply pass a parameter to perl as it builds your system specific makefile.
+
+Example:
+
+```sh
+perl Makefile.PL PREFIX=/home/borisl/perllib
+make
+make test
+make install
+```
+
+This will cause perl to install the TFBS modules in: `/home/borisl/perllib/lib/perl5/site_perl/`
+
+And the man pages will go in: `/home/dag/My_Perl_Modules/lib/perl5/man/`
+
+To specify a directory besides `lib/perl5/site_perl`, or if there are still permission problems,
+include an **INSTALLSITELIB** directive along with the PREFIX:
+
+```sh
+perl Makefile.PL PREFIX=/home/borisl/perl INSTALLSITELIB=/home/borisl/perl/lib
+```
+
+See below for how to use modules that are not installed in the standard Perl5 location.
+
+### USING MODULES NOT INSTALLED IN THE STANDARD PERL LOCATION
+You can explicitly tell perl where to look for modules by using the lib module which comes standard with perl.
+
+Example:
+
+```sh
+#!/usr/bin/perl -w
+use lib "/home/borisl/perllib/";
+use TFBS::PatternGen::Gibbs;
+# etc...
+```
diff --git a/TFBS/DB/JASPAR.pm b/TFBS/DB/JASPAR.pm
index f21a16c..3542361 100644
--- a/TFBS/DB/JASPAR.pm
+++ b/TFBS/DB/JASPAR.pm
@@ -1260,7 +1260,7 @@ sub _get_Matrix_by_int_id { #done
my @tax_ids;
while (my ($res) = $sth->fetchrow_array()) {
my @res_v = split(/,/, $res);
- my @res_v2 = grep(s/^\s*(.*)\s*$/\1/g, @res_v);
+ my @res_v2 = grep(s/^\s*(.*)\s*$/$1/g, @res_v);
push(@tax_ids, @res_v2);
}
@@ -1274,7 +1274,7 @@ sub _get_Matrix_by_int_id { #done
my @accs;
while (my ($res) = $sth->fetchrow_array()) {
my @res_v = split(/,/, $res);
- my @res_v2 = grep(s/^\s*(.*)\s*$/\1/g, @res_v);
+ my @res_v2 = grep(s/^\s*(.*)\s*$/$1/g, @res_v);
push(@accs, @res_v2);
}
@@ -1317,7 +1317,7 @@ sub _get_Matrix_by_int_id { #done
$vals = [];
if ($tag ~~ @key_to_split) {
my @val_v = split(/,/, $val);
- my @val_v2 = grep(s/^\s*(.*)\s*$/\1/g, @val_v);
+ my @val_v2 = grep(s/^\s*(.*)\s*$/$1/g, @val_v);
#push(@$vals, @val_v2);
#$tags{$tag} = $vals;
push @{$tags{$tag}}, @val_v2;
@@ -1642,8 +1642,6 @@ sub _get_TFFM_internal_id {
sub _get_TFFM_by_int_id { #done
my ($self, $int_id) = @_;
- my $tffm;
-
my $sth = $self->dbh->prepare(
qq! SELECT BASE_ID, VERSION, MATRIX_BASE_ID, MATRIX_VERSION, NAME,
LOG_P_1ST_ORDER, LOG_P_DETAILED, EXPERIMENT_NAME FROM TFFM
diff --git a/TFBS/DB/JASPAR2.pm b/TFBS/DB/JASPAR2.pm
index e2988e7..f3fe305 100755
--- a/TFBS/DB/JASPAR2.pm
+++ b/TFBS/DB/JASPAR2.pm
@@ -458,7 +458,7 @@ gives a set of PWMs whose (structural clas is 'TRP_CLUSTER' OR
OR 'Mus musculus').
The -min_ic filter is applied after the query in the sense that the
-matrices profiles with total infromation content less than specified
+matrices profiles with total information content less than specified
are not included in the set.
=cut
diff --git a/TFBS/DB/JASPAR4.pm b/TFBS/DB/JASPAR4.pm
index 426452d..57549e3 100755
--- a/TFBS/DB/JASPAR4.pm
+++ b/TFBS/DB/JASPAR4.pm
@@ -409,7 +409,7 @@ sub get_Matrix_by_name {
database storage, any tag can be used for information retrieval.
Additionally, arguments as 'name' and 'class' can be used (even though
they are not tags.
- As with get_Matrix methods, it is important to realize taht any matrix
+ As with get_Matrix methods, it is important to realize that any matrix
format can be stored in the database: the TFBS::MatrixSet might therefore
consist of PFMs, ICMs and PWMS, depending on how matrices are stored,
@@ -445,7 +445,7 @@ gives a set of TFBS::Matrix::PFM objects (given that the matrix models are store
from is 'Homo sapiens'OR 'Mus musculus').
The -min_ic filter is applied after the query in the sense that the
-matrices profiles with total infromation content less than specified
+matrices profiles with total information content less than specified
are not included in the set.
=cut
diff --git a/TFBS/DB/JASPAR5.pm b/TFBS/DB/JASPAR5.pm
index 17ef20a..3c7fcd6 100644
--- a/TFBS/DB/JASPAR5.pm
+++ b/TFBS/DB/JASPAR5.pm
@@ -923,7 +923,7 @@ sub _get_Matrix_by_int_id
# get the matrix as a string
my $matrixstring = $self->_get_matrixstring($int_id) || return undef;
- #get remaining data in teh matrix table: name, collection
+ #get remaining data in the matrix table: name, collection
my $sth=$self->dbh->prepare(qq!SELECT BASE_ID,VERSION, COLLECTION,NAME FROM MATRIX WHERE ID="$int_id"!);
$sth->execute();
my ($base_ID, $version,$collection,$name)=$sth->fetchrow_array();
diff --git a/TFBS/DB/JASPAR6.pm b/TFBS/DB/JASPAR6.pm
index d8eedee..bccce71 100755
--- a/TFBS/DB/JASPAR6.pm
+++ b/TFBS/DB/JASPAR6.pm
@@ -934,7 +934,7 @@ sub _get_Matrix_by_int_id
# get the matrix as a string
my $matrixstring = $self->_get_matrixstring($int_id) || return undef;
- #get remaining data in teh matrix table: name, collection
+ #get remaining data in the matrix table: name, collection
my $sth=$self->dbh->prepare(qq!SELECT BASE_ID,VERSION, COLLECTION,NAME FROM MATRIX WHERE ID="$int_id"!);
$sth->execute();
my ($base_ID, $version,$collection,$name)=$sth->fetchrow_array();
diff --git a/TFBS/DB/JASPAR.pm b/TFBS/DB/JASPAR7.pm
similarity index 100%
copy from TFBS/DB/JASPAR.pm
copy to TFBS/DB/JASPAR7.pm
diff --git a/TFBS/DB/LocalTRANSFAC.pm b/TFBS/DB/LocalTRANSFAC.pm
index 5333f3e..7c048fc 100755
--- a/TFBS/DB/LocalTRANSFAC.pm
+++ b/TFBS/DB/LocalTRANSFAC.pm
@@ -70,7 +70,7 @@ use TFBS::Matrix::PFM;
# have read and accepted the terms
# of use of TRANSFAC at
# http://transfac.gbf.de/TRANSFAC/disclaimer.htm;
- # this also supresses the annoying
+ # this also suppresses the annoying
# message that is printed to STDERR
# upon invoking the method
diff --git a/TFBS/DB/TRANSFAC.pm b/TFBS/DB/TRANSFAC.pm
index c347ba0..ac50ee8 100755
--- a/TFBS/DB/TRANSFAC.pm
+++ b/TFBS/DB/TRANSFAC.pm
@@ -69,7 +69,7 @@ use LWP::Simple qw($ua get);
# have read and accepted the terms
# of use of TRANSFAC at
# http://transfac.gbf.de/TRANSFAC/disclaimer.htm;
- # this also supresses the annoying
+ # this also suppresses the annoying
# message that is printed to STDERR
# upon invoking the method
diff --git a/TFBS/Matrix/Alignment.pm b/TFBS/Matrix/Alignment.pm
index 1d85fc0..76ac716 100755
--- a/TFBS/Matrix/Alignment.pm
+++ b/TFBS/Matrix/Alignment.pm
@@ -182,7 +182,9 @@ sub new {
}
}
$self->{'_align_string'}= $string ."\n". $string2;
-
+
+ unlink $file2;
+ unlink $file1;
return $self;
}
@@ -239,7 +241,7 @@ sub new {
Title : alignment
Usage : my $alignment_string = $alignmentobject->alignment();
Function: access a string describing the alignment
- Returns : an string, where each number refers to a position in repective PFM.
+ Returns : an string, where each number refers to a position in respective PFM.
Position numbering is according to orientation: ie if the second profile is
reversed, position 1 corresponds to the last position in the input profile.
Gaps are denoted as - .
diff --git a/TFBS/Matrix/ICM.pm b/TFBS/Matrix/ICM.pm
index 107502d..3d9e80c 100755
--- a/TFBS/Matrix/ICM.pm
+++ b/TFBS/Matrix/ICM.pm
@@ -98,7 +98,7 @@ following information content matrix:
G:[0.00 0.89 2.00 0.00 0.00 0.00]
T:[0.00 0.00 0.00 0.13 0.06 2.00]
-which contains the "weights" associated with the occurence of each
+which contains the "weights" associated with the occurrence of each
nucleotide at the given position in a pattern.
A TFBS::Matrix::PWM object is equipped with methods to search nucleotide
diff --git a/TFBS/Matrix/PWM.pm b/TFBS/Matrix/PWM.pm
index 4d56b7a..cde15cc 100755
--- a/TFBS/Matrix/PWM.pm
+++ b/TFBS/Matrix/PWM.pm
@@ -100,7 +100,7 @@ following position weight matrix:
G:[-1.57 1.85 -2.57 -1.34 -1.57 1.14]
T:[ 0.31 -3.16 -2.57 1.76 0.24 -0.83]
-which contains the "weights" associated with the occurence of each
+which contains the "weights" associated with the occurrence of each
nucleotide at the given position in a pattern.
A TFBS::Matrix::PWM object is equipped with methods to search nucleotide
@@ -530,7 +530,7 @@ sub _to_seqobj {
#return $format;
#}
else {
- $self->throw ("Wrong parametes passed to search method: ".%args);
+ $self->throw ("Wrong parameters passed to search method: ".%args);
}
}
diff --git a/TFBS/Matrix/_Alignment.pm b/TFBS/Matrix/_Alignment.pm
index 155e64e..7dd5fb4 100755
--- a/TFBS/Matrix/_Alignment.pm
+++ b/TFBS/Matrix/_Alignment.pm
@@ -201,7 +201,7 @@ sub _calculate_conservation {
# at this point, the graph values are shifted $WINDOW/2 to the right
# i.e. the score at a certain position is the score of the window
- # UPSTREAM of it: To fix it, we shoud discard the first $WINDOW/2 scores:
+ # UPSTREAM of it: To fix it, we should discard the first $WINDOW/2 scores:
#$self->conservation1 ([]);
foreach my $pos (@graph[int($WINDOW/2)..$#graph]) {
push @CONSERVATION, 100*$pos/$WINDOW;
diff --git a/TFBS/MatrixSet.pm b/TFBS/MatrixSet.pm
index dc6f16c..3d73b35 100755
--- a/TFBS/MatrixSet.pm
+++ b/TFBS/MatrixSet.pm
@@ -79,7 +79,7 @@ use constant FALSE => 0;
# Hash of accepted options and their arguments for the program
# STAMP. Reference to empty list means the option take no arguments
-# This test for legal arguments is maybe superflous and can
+# This test for legal arguments is maybe superfluous and can
# potentially be removed.
my %stamp_opt = (
-tf => [],
@@ -597,7 +597,7 @@ sub _to_seqobj {
#return $format;
#}
else {
- $self->throw ("Wrong parametes passed to search method: ".%args);
+ $self->throw ("Wrong parameters passed to search method: ".%args);
}
@@ -769,7 +769,7 @@ sub _build_cluster {
Args : Many:
-stampdir Directory where stamp is located. Not necessary if it is in the PATH.
-tempdir Directory to put temporary files. Defaults to "/tmp"
- -noclean 1 to clean up temporary files, 0 otherwise
+ -noclean 0 to clean up temporary files, 1 otherwise
-tree Method for constructing tree (UPGMA/SOTA). Def:UPGMA
=cut
@@ -825,7 +825,7 @@ sub cluster {
Args : Many
-stampdir Directory where stamp is located. Not necessary if it is in the PATH.
-tempdir Directory to put temporary files. Defaults to "/tmp"
- -noclean 1 to clean up temporary files, 0 otherwise
+ -noclean 0 to clean up temporary files, 1 otherwise
-align Alignment method
=cut
diff --git a/TFBS/PatternGen.pm b/TFBS/PatternGen.pm
index 1474416..b2969c9 100755
--- a/TFBS/PatternGen.pm
+++ b/TFBS/PatternGen.pm
@@ -14,7 +14,7 @@ TFBS::PatternGen - a base class for pattern generators
=head1 DESCRIPTION
-TFBS::PatternGen is a base classs providing methods common to all pattern generating
+TFBS::PatternGen is a base class providing methods common to all pattern generating
modules. It is meant to be inherited by a concrete pattern generator, which must have its own
constructor.
diff --git a/TFBS/PatternGen/Elph.pm b/TFBS/PatternGen/Elph.pm
index e5005cb..3a3804f 100755
--- a/TFBS/PatternGen/Elph.pm
+++ b/TFBS/PatternGen/Elph.pm
@@ -66,7 +66,7 @@ use Bio::SeqIO;
Other arguments are:
-binary # a fully qualified path to Gibbs executable
# OPTIONAL: default 'Gibbs'
- -nr_hits # a presumed number of pattern occurences in the
+ -nr_hits # a presumed number of pattern occurrences in the
# sequence set: it can be a single integer, e.g.
# -nr_hits => 24 , or a reference to an array of
# integers, e.g -nr_hits => [12, 24, 36]
diff --git a/TFBS/PatternGen/Gibbs.pm b/TFBS/PatternGen/Gibbs.pm
index 80bc178..bac02dc 100755
--- a/TFBS/PatternGen/Gibbs.pm
+++ b/TFBS/PatternGen/Gibbs.pm
@@ -67,7 +67,7 @@ use Bio::SeqIO;
Other arguments are:
-binary # a fully qualified path to Gibbs executable
# OPTIONAL: default 'Gibbs'
- -nr_hits # a presumed number of pattern occurences in the
+ -nr_hits # a presumed number of pattern occurrences in the
# sequence set: it can be a single integer, e.g.
# -nr_hits => 24 , or a reference to an array of
# integers, e.g -nr_hits => [12, 24, 36]
diff --git a/TFBS/PatternGen/MEME.pm b/TFBS/PatternGen/MEME.pm
index 530d943..fecc7a8 100755
--- a/TFBS/PatternGen/MEME.pm
+++ b/TFBS/PatternGen/MEME.pm
@@ -174,7 +174,7 @@ sub _parse_raw_matrix{
my @array=split("\n",$string);
foreach my $line(@array){
my $nr=0;
- my $strand=1;#if revcomp is not selected teh strand is always 1
+ my $strand=1;#if revcomp is not selected the strand is always 1
next if $line=~/^-/;
next if $line=~/P-value\s+Site/;
my (@properties)=split(/\s+/,$line);
diff --git a/TFBS/PatternGenI.pm b/TFBS/PatternGenI.pm
index 2456f4f..9164ec9 100755
--- a/TFBS/PatternGenI.pm
+++ b/TFBS/PatternGenI.pm
@@ -19,7 +19,7 @@ sub _abstractDeath {
my $package = ref $self;
my $caller = (caller())[1];
- confess "Abstract method '$caller' defined in interface TFBS::PatternGenI not implemented by pacakge $package";
+ confess "Abstract method '$caller' defined in interface TFBS::PatternGenI not implemented by package $package";
}
diff --git a/TFBS/Run/ConservationProfileGenerator.pm b/TFBS/Run/ConservationProfileGenerator.pm
index eca4ef1..76e493a 100755
--- a/TFBS/Run/ConservationProfileGenerator.pm
+++ b/TFBS/Run/ConservationProfileGenerator.pm
@@ -103,7 +103,7 @@ sub _run_simple {
# at this point, the graph values are shifted $window_size/2 to the right
# i.e. the score at a certain position is the score of the window
- # UPSTREAM of it: To fix it, we shoud discard the first $window_size/2 scores:
+ # UPSTREAM of it: To fix it, we should discard the first $window_size/2 scores:
#$self->conservation1 ([]);
foreach my $match_point ( @graph[ int( $window_size / 2 ) .. $#graph ] ) {
push @CONSERVATION, $match_point / $window_size;
@@ -126,7 +126,7 @@ sub _run_simple {
sub _run_Malins {
shift->throw(
- "Not implemeted, sorry. Pick another method for the time being");
+ "Not implemented, sorry. Pick another method for the time being");
}
sub _run_align_cons {
diff --git a/TFBS/_Iterator/_MatrixSetIterator.pm b/TFBS/_Iterator/_MatrixSetIterator.pm
index 901651e..bf528bb 100755
--- a/TFBS/_Iterator/_MatrixSetIterator.pm
+++ b/TFBS/_Iterator/_MatrixSetIterator.pm
@@ -8,40 +8,48 @@ use TFBS::_Iterator;
@ISA = qw(TFBS::_Iterator);
+#
+# Changed name field sorts to case insensitive which results in a more
+# intuitive name sort order, at least for the JASPAR Web site
+# DJA 2015/09/16
+#
sub _sort {
my ($self, $sort_by) = @_;
- $sort_by or $sort_by = $self->{_sort_by} or $sort_by = 'name';
+ $sort_by or $sort_by = $self->{_sort_by} or $sort_by = 'name';
# we can sort by name, start, end, score
my %sort_fn =
- (class => sub { $a->class() cmp $b->class()
- ||
- $a->name() cmp $b->name()
- ||
- $a->ID() cmp $b->ID()
- },
+ (class => sub {
+ $a->class() cmp $b->class()
+ || uc $a->name() cmp uc $b->name()
+ || $a->ID() cmp $b->ID()
+ },
- id => sub { $a->ID() cmp $b->ID()
- },
- ID => sub { $a->ID() cmp $b->ID()
- },
+ id => sub {
+ $a->ID() cmp $b->ID()
+ },
+ ID => sub {
+ $a->ID() cmp $b->ID()
+ },
- name => sub { $a->name() cmp $b->name() ||
- $a->class() cmp $b->class() ||
- $a->ID() cmp $b->ID()
- },
+ name => sub {
+ uc $a->name() cmp uc $b->name()
+ || $a->class() cmp $b->class()
+ || $a->ID() cmp $b->ID()
+ },
- species => sub { $a->tag('species') cmp $b->tag('species') ||
- $a->class() cmp $b->class() ||
- $a->ID() cmp $b->ID()
- },
+ species => sub {
+ $a->tag('species') cmp $b->tag('species')
+ || $a->class() cmp $b->class()
+ || $a->ID() cmp $b->ID()
+ },
- total_ic => sub { $b->total_ic() <=> $a->total_ic()
- ||
- $a->name() cmp $b->name()
- }
+ total_ic => sub {
+ $b->total_ic() <=> $a->total_ic()
+ || uc $a->name() cmp uc $b->name()
+ }
);
if (defined (my $sort_function = $sort_fn{lc $sort_by})) {
diff --git a/TFBS/_Iterator/_SiteSetIterator.pm b/TFBS/_Iterator/_SiteSetIterator.pm
index fdf3026..ab53e28 100755
--- a/TFBS/_Iterator/_SiteSetIterator.pm
+++ b/TFBS/_Iterator/_SiteSetIterator.pm
@@ -7,7 +7,11 @@ use TFBS::_Iterator;
@ISA = qw(TFBS::_Iterator);
-
+#
+# Changed name field sorts to case insensitive which results in a more
+# intuitive name sort order.
+# DJA 2015/09/16
+#
sub _sort {
my ($self, $sort_by) = @_;
$sort_by or $sort_by = $self->{_sort_by} or $sort_by = 'name';
@@ -15,11 +19,11 @@ sub _sort {
# we can sort by name, start, end, score
my %sort_fn =
(start => sub { $a->start() <=> $b->start()
- || $a->pattern->name() cmp $b->pattern->name()
+ || uc $a->pattern->name() cmp uc $b->pattern->name()
|| $a->strand() <=> $b->strand()
},
end => sub { $a->end() <=> $b->end()
- || $a->pattern->name() cmp $b->pattern->name()
+ || uc $a->pattern->name() cmp uc $b->pattern->name()
|| $a->strand() <=> $b->strand()
},
ID => sub { $a->pattern->ID() cmp $b->pattern->ID()
@@ -27,13 +31,13 @@ sub _sort {
|| $a->end() <=> $b->end()
|| $a->strand() <=> $b->strand()
},
- name => sub { $a->pattern->name() cmp $b->pattern->name()
+ name => sub { uc $a->pattern->name() cmp uc $b->pattern->name()
|| $a->start() <=> $b->start()
|| $a->end() <=> $b->end()
|| $a->strand() <=> $b->strand()
},
score => sub { $b->score() <=> $a->score()
- || $a->pattern->name() cmp $b->pattern->name()
+ || uc $a->pattern->name() cmp uc $b->pattern->name()
|| $a->strand() <=> $b->strand()
}
);
diff --git a/blib/arch/.exists b/blib/arch/.exists
new file mode 100644
index 0000000..e69de29
diff --git a/blib/arch/auto/TFBS/.exists b/blib/arch/auto/TFBS/.exists
new file mode 100644
index 0000000..e69de29
diff --git a/blib/arch/auto/TFBS/Ext/pwmsearch/.exists b/blib/arch/auto/TFBS/Ext/pwmsearch/.exists
new file mode 100644
index 0000000..e69de29
diff --git a/blib/arch/auto/TFBS/Ext/pwmsearch/pwmsearch.bs b/blib/arch/auto/TFBS/Ext/pwmsearch/pwmsearch.bs
new file mode 100644
index 0000000..e69de29
diff --git a/blib/arch/auto/TFBS/Ext/pwmsearch/pwmsearch.bundle b/blib/arch/auto/TFBS/Ext/pwmsearch/pwmsearch.bundle
new file mode 100755
index 0000000..17789ef
Binary files /dev/null and b/blib/arch/auto/TFBS/Ext/pwmsearch/pwmsearch.bundle differ
diff --git a/blib/bin/.exists b/blib/bin/.exists
new file mode 100644
index 0000000..e69de29
diff --git a/blib/lib/.exists b/blib/lib/.exists
new file mode 100644
index 0000000..e69de29
diff --git a/blib/lib/TFBS/DB.pm b/blib/lib/TFBS/DB.pm
new file mode 100644
index 0000000..fd35d40
--- /dev/null
+++ b/blib/lib/TFBS/DB.pm
@@ -0,0 +1,24 @@
+# This package should hold interface and common database manipulation
+# methods, if we decide there are any
+
+package TFBS::DB;
+
+use vars qw(@ISA);
+use strict;
+use Bio::Root::Root;
+use TFBS::Matrix;
+ at ISA = qw(Bio::Root::Root);
+
+sub new {
+
+}
+
+sub get_MatrixSet {
+
+}
+
+
+sub get_Matrix_by_ID {
+
+}
+ # not finished (apparently)
diff --git a/blib/lib/TFBS/DB/FlatFileDir.pm b/blib/lib/TFBS/DB/FlatFileDir.pm
new file mode 100644
index 0000000..8a6edd7
--- /dev/null
+++ b/blib/lib/TFBS/DB/FlatFileDir.pm
@@ -0,0 +1,498 @@
+# TFBS module for TFBS::DB::FlatFileDir
+#
+# Copyright Boris Lenhard
+#
+# You may distribute this module under the same terms as perl itself
+#
+
+# POD
+
+=head1 NAME
+
+TFBS::DB::FlatFileDir - interface to a database of pattern matrices
+stored as a collection of flat files in a dedicated directory
+
+
+=head1 SYNOPSIS
+
+=over 4
+
+=item * creating a database object by connecting to the existing directory
+
+ my $db = TFBS::DB::FlatFileDir->connect("/home/boris/MatrixDir");
+
+=item * retrieving a TFBS::Matrix::* object from the database
+
+ # retrieving a PFM by ID
+ my $pfm = $db->get_Matrix_by_ID('M00079','PFM');
+
+ #retrieving a PWM by name
+ my $pwm = $db->get_Matrix_by_name('NF-kappaB', 'PWM');
+
+=item * retrieving a set of matrices as a TFBS::MatrixSet object according to various criteria
+
+ # retrieving a set of PWMs from a list of IDs:
+ my @IDlist = ('M0019', 'M0045', 'M0073', 'M0101');
+ my $matrixset = $db->get_MatrixSet(-IDs => \@IDlist,
+ -matrixtype => "PWM");
+
+ # retrieving a set of ICMs from a list of names:
+ my @namelist = ('p50', 'p53', 'HNF-1'. 'GATA-1', 'GATA-2', 'GATA-3');
+ my $matrixset = $db->get_MatrixSet(-names => \@namelist,
+ -matrixtype => "ICM");
+
+ # retrieving a set of all PFMs in the database
+ my $matrixset = $db->get_MatrixSet(-matrixtype => "PFM");
+
+=item * creating a new FlatFileDir database in a new directory:
+
+ my $db = TFBS::DB::JASPAR2->create("/home/boris/NewMatrixDir");
+
+=item * storing a matrix in the database:
+
+ #let $pfm is a TFBS::Matrix::PFM object
+ $db->store_Matrix($pfm);
+
+
+
+=back
+
+=head1 DESCRIPTION
+
+TFBS::DB::FlatFileDir is a read/write database interface module that
+retrieves and stores TFBS::Matrix::* and TFBS::MatrixSet
+objects in a set of flat files in a dedicated directory. It has a
+very simple structure and can be easily set up manually if desired.
+
+
+=head1 FEEDBACK
+
+Please send bug reports and other comments to the author.
+
+=head1 AUTHOR - Boris Lenhard
+
+Boris Lenhard E<lt>Boris.Lenhard at cgb.ki.seE<gt>
+
+=head1 APPENDIX
+
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+
+=cut
+
+
+# The code begins HERE:
+
+
+
+package TFBS::DB::FlatFileDir;
+
+use vars qw(@ISA);
+use strict;
+use Bio::Root::Root;
+use TFBS::Matrix::PFM;
+use TFBS::Matrix::ICM;
+use TFBS::Matrix::PWM;
+use TFBS::MatrixSet;
+
+ at ISA = qw(TFBS::DB Bio::Root::Root);
+
+=head2 new
+
+ Title : new
+ Usage : my $db = TFBS::DB::FlatFileDir->new(%args);
+ Function: the formal constructor for the TFBS::DB::FlatFileDir object;
+ most users will not use it - they will use specialized
+ I<connect> or I<create> constructors to create a
+ database object
+ Returns : a TFBS::DB::FlatFileDir object
+ Args : -dir # the directory containing flat files
+
+=cut
+
+
+sub new {
+ my $caller = shift;
+ my $self = bless {_item => {},
+ _idlist_of_name=>{} ,
+ _idlist_of_class=>{}
+ },
+ ref ($caller) || $caller;
+ if (-d $_[0]) {
+ $self->{dir} = $_[0];
+ }
+ elsif ($_[0] eq '-dir' and -d $_[1]) {
+ $self->{dir} = $_[1];
+ }
+ else {
+ $self->throw("Error initializing FlatFileDir database dir: ",
+ ($_[1] or $_[0] or "No directory parameter passed."));
+ }
+ $self->_load_db_index();
+ return $self;
+}
+
+
+=head2 connect
+
+ Title : connect
+ Usage : my $db = TFBS::DB::FlatFileDir->connect($directory);
+ Function: Creates a database object that retrieves TFBS::Matrix::*
+ object data from or stores it in an existing directory
+ Returns : a TFBS::DB::FlatFileDir object
+ Args : ($directory)
+ The name of the directory (possibly with fully qualified
+ path).
+
+=cut
+
+sub connect {
+ my ($caller, $dir) = @_;
+ $caller->new(-dir=>$dir);
+}
+
+
+=head2 create
+
+ Title : create
+ Usage : my $newdb = TFBS::DB::FlatFileDir->create($new_directory);
+ Function: connects to the database server, creates a new directory,
+ sets up a FlatFileDir database and returns a database
+ object that interfaces the database
+ Returns : a TFBS::DB::FlatFileDir object
+ Args : ($new_directory)
+ The name of the directory to create
+ (possibly with fully qualified path).
+
+=cut
+
+sub create {
+ my ($caller, $dir) = @_;
+ if (-d $dir) { die ("Directory $dir exists") ; }
+ mkdir ($dir) or die("Error creating directory $dir, stopped");
+ open FILE, ">$dir/matrix_list.txt"
+ or die ("Error creating matrix_list.txt");
+ close FILE;
+ $caller->new(-dir=>$dir);
+}
+
+=head2 get_Matrix_by_ID
+
+ Title : get_Matrix_by_ID
+ Usage : my $pfm = $db->get_Matrix_by_ID('M00034', 'PFM');
+ Function: fetches matrix data under the given 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 PWM is retrieved by default.
+
+=cut
+
+sub get_Matrix_by_ID {
+ my ($self, $ID, $mt) = @_;
+ $self->throw("No ID passed to get_Matrix_by_ID.") unless defined $ID;
+ $mt = defined $mt ? $self->_check_matrixtype($mt) : "PWM";
+ my $matrixobj;
+ {
+ no strict 'refs';
+ my $working_mt = $mt = uc $mt;
+ my $matrixstring = $self->_read_file($ID,$mt)
+ # if no desired $mt, is there a PFM?
+ || $self->_read_file($ID,$working_mt="PFM")
+ || return undef;
+
+ eval("\$matrixobj= TFBS::Matrix::$working_mt->new".'
+ ( -ID => $ID,
+ -name => $self->{_item}->{$ID}->{name} || "",
+ -class => $self->{_item}->{$ID}->{class}|| "",
+ -matrix=> $matrixstring,
+ -tags=> $self->{_item}->{$ID}->{tags}
+
+ );'.
+ "if (\$working_mt ne \$mt) {\$matrixobj = \$matrixobj->to_$mt;}");
+ if ($@) {$self->throw($@); }
+ }
+ # print "MATRIXOBJ: $matrixobj\n";
+ return $matrixobj;
+
+}
+
+=head2 get_Matrix_by_name
+
+ Title : get_Matrix_by_name
+ Usage : my $pfm = $db->get_Matrix_by_name('HNF-1', 'PWM');
+ Function: fetches matrix data under the given name 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')
+ Args : (Matrix_name, Matrix_type)
+ Matrix_name 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 PWM is retrieved by default.
+ Warning : According to the current JASPAR2 data model, name is
+ not necessarily a unique identifier. In the case where
+ there are several matrices with the same name in the
+ database, the function fetches the first one and prints
+ a warning on STDERR. You have been warned.
+
+=cut
+
+sub get_Matrix_by_name {
+ my ($self, $name, $mt) = @_;
+ my $ID=$self->{_idlist_of_name}->{$name}->[0]
+ or return undef;
+ if ((my $L= scalar @{ $self->{_idlist_of_name}->{$name} }) > 1) {
+ $self->warn("There are $L matrices with name '$name'");
+ }
+ return $self->get_Matrix_by_ID($ID, $mt);
+}
+
+sub get_matrix {
+ # an obsolete method - kept for the time being for backward compatibility
+
+ my ($self, %args) = @_;
+ my $DIR = $self->{dir};
+ my $ID;
+ # retrieval from .pwm files in a directory
+ my $mt = ($self->_get_matrixtype_from_args(%args)
+ or $self->throw("No -matrixtype provided."));
+
+ if ($args{-ID}) {
+ $ID = $args{-ID};
+ }
+ elsif (my $name = $args{-name}) {
+ $ID=$self->{_idlist_of_name}->{$name}->[0]
+ or $self->warn("No matrix with name $name found.");
+ if ((my $L= scalar @{ $self->{_idlist_of_name}->{$name} }) > 1) {
+ $self->warn("There are $L matrices with name '$name'");
+ }
+ }
+ else {
+ $self->throw("No -ID or -name passed to ".ref($self));
+ }
+
+ my $matrixobj;
+ {
+ no strict 'refs';
+ my $ucmt = uc $mt;
+ my $matrixstring =`cat $DIR/$ID.$mt`;
+
+ eval("\$matrixobj= TFBS::Matrix::$ucmt->new".'
+ ( -ID => $ID,
+ -name => $self->{_item}->{$ID}->{name},
+ -class => $self->{_item}->{$ID}->{class},
+ -matrix=> $matrixstring # FIXME - temporary
+ );');
+ if ($@) {$self->throw($@); }
+ }
+ # print "MATRIXOBJ: $matrixobj\n";
+ return $matrixobj;
+}
+
+=head2 store_Matrix
+
+ Title : store_Matrix
+ Usage : $db->store_Matrix($matrixobj);
+ Function: Stores the contents of a TFBS::Matrix::DB object in the database
+ Returns : 0 on success; $@ contents on failure
+ (this is too C-like and may change in future versions)
+ Args : ($matrixobj) # a TFBS::Matrix::* object
+
+=cut
+
+
+sub store_Matrix {
+ my ($self, $matrixobj) = @_;
+ my ($mt) = ($matrixobj =~ /TFBS::Matrix::(\w+)/)
+ or $self->throw("Wrong type of object passed to store_Matrix.");
+ if (defined $self->{_item}->{$matrixobj->ID()}) {
+ $self->throw("ID ".$matrixobj->ID()." exists in the database.");
+ }
+ else {
+ my $matrixfile = $self->{dir}."/".$matrixobj->ID().".".lc($mt);
+ open FILE, ">$matrixfile"
+ or $self->throw("Could not write file $matrixfile.");
+ print FILE $matrixobj->rawprint;
+ close FILE;
+ my $ic = ($mt eq "ICM") ? $matrixobj->total_ic :
+ ($mt eq "PFM") ? $matrixobj->to_ICM->total_ic : "";
+ $self->{_item}->{$matrixobj->ID()} = { 'name' => $matrixobj->name || "",
+ 'ic' => $ic,
+ 'class'=> $matrixobj->class || "" };
+
+ my %tags= $matrixobj->all_tags();
+ foreach my $named_tag (keys %tags){
+ $self->{_item}->{$matrixobj->ID()}{'tag'}{$named_tag}=$tags{$named_tag};
+ # print $named_tag , " ", $self->{_item}->{$matrixobj->ID()}{'tag'}{$named_tag}, "\n";
+
+ }
+
+ $self->_update_db_index();
+ }
+ return 0;
+
+}
+
+=head2 delete_Matrix_having_ID
+
+ Title : delete_Matrix_having_ID
+ Usage : $db->delete_Matrix_with_ID('M00045');
+ Function: Deletes the matrix having the given ID from the database
+ Returns : 0 on success; $@ contents on failure
+ (this is too C-like and may change in future versions)
+ Args : (ID)
+ A string
+ Comment : Yeah, yeah, 'delete_Matrix_having_ID' is a stupid name
+ for a method, but at least it should be obviuos what it does.
+
+=cut
+
+
+sub delete_Matrix_having_ID {
+ my ($self, $ID) = @_;
+ my $DIR = $self->{dir};
+ unlink <$DIR/$ID.*>;
+ delete $self->{_item}->{$ID};
+ $self->_update_db_index();
+}
+
+
+sub _update_db_index {
+ my $self = shift;
+ rename $self->{dir}."/matrix_list.txt", $self->{dir}."/~matrix_list.txt";
+ open FILE, ">".$self->{dir}."/matrix_list.txt";
+ foreach my $ID ( keys %{$self->{_item}} ) {
+ print FILE join("\t", $ID,
+ $self->{_item}->{$ID}->{ic},
+ $self->{_item}->{$ID}->{name},
+ $self->{_item}->{$ID}->{class}
+ )."\t";
+# add tagged annotation
+# my %tag = $self->{_item}->{$ID}->{'all_tags'};
+ foreach my $name(sort keys %{$self->{'_item'}->{$ID}{'tag'}}){
+
+ print FILE "; ", $name, " \"", $self->{'_item'}->{$ID}{'tag'}{$name}, "\"\ ";
+
+ }
+
+
+
+
+
+print FILE "\n";
+
+
+
+ }
+ close FILE;
+}
+
+sub _load_db_index {
+ my ($self, $field, $value) = @_;
+ my $DIR = $self->{dir};
+ open (MATRIXLIST, "$DIR/matrix_list.txt")
+ or $self->throw("Could not read matrix list $DIR/matrix_list.txt");
+ while (my $line = <MATRIXLIST>) {
+ chomp $line;
+ my ($ID, $ic, $name, $class) = split /\s+/, $line ;
+ if ($ID =~ /(\w+)\.(\w+)$/) {
+ $ID = $1;
+ }
+
+ defined($self->{_item}->{$ID})
+ and $self->warn("Duplicate entries for ID $ID");
+ $self->{_item}->{$ID} = {name=>$name, ic=>$ic, class=>$class};
+ push @{ $self->{_idlist_of_name}->{$name} }, $ID;
+ push @{ $self->{_idlist_of_class}->{$class} }, $ID;
+ # annoatation
+
+ my @anno= split(/\s?;\s?/, $line);
+ my %tags;
+ shift @anno;
+ foreach (@anno){
+ my ($name, $val)=split(/\s?\"/, $_);
+ # print "$name $val\n";
+ $self->{_item}->{$ID}->{'tags'}->{$name}=$val;
+
+ }
+
+
+
+ }
+ close MATRIXLIST;
+ return scalar keys %{ $self->{_item} }; # false if list empty
+}
+
+
+sub get_MatrixSet {
+ my ($self, %args) = @_;
+ my $DIR = $self->{db};
+ my $arrayref;
+ my $mt = $self->_check_matrixtype($args{-matrixtype})
+ || $self->throw("No matrix type provided.");
+ delete $args{'-matrixtype'};
+ my ($field, $value) = %args;
+ unless (defined $field) {
+ $field="-IDs";
+ $arrayref = [ keys %{ $self->{_item}} ];
+ }
+ my @IDlist;
+ if ($field eq "-IDs") {
+ @IDlist = @$arrayref;
+ }
+ elsif ($field eq "-names") {
+ foreach (@$arrayref) {
+ push @IDlist, @{ $self->{_idlist_of_name}->{$_} };
+ }
+ }
+ elsif ($field eq "-classes") {
+ foreach (@$arrayref) {
+ push @IDlist, @{ $self->{_idlist_of_class}->{$_} };
+ }
+ }
+ else {
+ $self->throw("Unknown matrixset selector: $field.");
+ }
+ my $matrixset = TFBS::MatrixSet->new();
+ foreach my $ID(@IDlist) {
+ $matrixset->add_matrix($self->get_Matrix_by_ID($ID, $mt));
+ }
+ close MATRIXLIST;
+ return $matrixset;
+}
+
+
+sub _check_matrixtype {
+ my ($self, $mt) = @_;
+ $mt = uc $mt;
+ return undef unless $mt;
+ unless ( $mt eq "PFM"
+ or $mt eq "ICM"
+ or $mt eq "PWM") {
+ $self->throw("Unsupported matrix type: ".$mt);
+ }
+
+ return $mt;
+}
+
+sub _read_file {
+ my ($self, $id, $mt) = @_;
+ local $/ = undef;
+ open FILE, $self->{dir}."/$id.".lc($mt) or return undef;
+ my $matrixstring = <FILE>; #slurp;
+ close FILE;
+ return $matrixstring;
+}
+
+1;
diff --git a/TFBS/DB/JASPAR2.pm b/blib/lib/TFBS/DB/JASPAR2.pm
old mode 100755
new mode 100644
similarity index 99%
copy from TFBS/DB/JASPAR2.pm
copy to blib/lib/TFBS/DB/JASPAR2.pm
index e2988e7..f3fe305
--- a/TFBS/DB/JASPAR2.pm
+++ b/blib/lib/TFBS/DB/JASPAR2.pm
@@ -458,7 +458,7 @@ gives a set of PWMs whose (structural clas is 'TRP_CLUSTER' OR
OR 'Mus musculus').
The -min_ic filter is applied after the query in the sense that the
-matrices profiles with total infromation content less than specified
+matrices profiles with total information content less than specified
are not included in the set.
=cut
diff --git a/TFBS/DB/JASPAR4.pm b/blib/lib/TFBS/DB/JASPAR4.pm
old mode 100755
new mode 100644
similarity index 99%
copy from TFBS/DB/JASPAR4.pm
copy to blib/lib/TFBS/DB/JASPAR4.pm
index 426452d..f997f7c
--- a/TFBS/DB/JASPAR4.pm
+++ b/blib/lib/TFBS/DB/JASPAR4.pm
@@ -409,7 +409,7 @@ sub get_Matrix_by_name {
database storage, any tag can be used for information retrieval.
Additionally, arguments as 'name' and 'class' can be used (even though
they are not tags.
- As with get_Matrix methods, it is important to realize taht any matrix
+ As with get_Matrix methods, it is important to realize that any matrix
format can be stored in the database: the TFBS::MatrixSet might therefore
consist of PFMs, ICMs and PWMS, depending on how matrices are stored,
@@ -445,7 +445,7 @@ gives a set of TFBS::Matrix::PFM objects (given that the matrix models are store
from is 'Homo sapiens'OR 'Mus musculus').
The -min_ic filter is applied after the query in the sense that the
-matrices profiles with total infromation content less than specified
+matrices profiles with total information content less than specified
are not included in the set.
=cut
@@ -678,7 +678,7 @@ sub _create_tables {
ID VARCHAR (16) DEFAULT '' NOT NULL,
row VARCHAR(1) NOT NULL,
col TINYINT(3) UNSIGNED NOT NULL,
- val FLOAT,
+ val float(7,4),
PRIMARY KEY (ID, row, col)
)
!,
@@ -692,8 +692,8 @@ sub _create_tables {
q!
CREATE TABLE MATRIX_ANNOTATION(
ID VARCHAR (16) DEFAULT '' NOT NULL,
- tag VARCHAR(255) DEFAULT '' NOT NULL,
- val TEXT,
+ tag VARCHAR(255)DEFAULT '' NOT NULL,
+ val varchar(255) DEFAULT '',
PRIMARY KEY (ID, tag)
)
!,
diff --git a/TFBS/DB/LocalTRANSFAC.pm b/blib/lib/TFBS/DB/LocalTRANSFAC.pm
old mode 100755
new mode 100644
similarity index 99%
copy from TFBS/DB/LocalTRANSFAC.pm
copy to blib/lib/TFBS/DB/LocalTRANSFAC.pm
index 5333f3e..7c048fc
--- a/TFBS/DB/LocalTRANSFAC.pm
+++ b/blib/lib/TFBS/DB/LocalTRANSFAC.pm
@@ -70,7 +70,7 @@ use TFBS::Matrix::PFM;
# have read and accepted the terms
# of use of TRANSFAC at
# http://transfac.gbf.de/TRANSFAC/disclaimer.htm;
- # this also supresses the annoying
+ # this also suppresses the annoying
# message that is printed to STDERR
# upon invoking the method
diff --git a/TFBS/DB/TRANSFAC.pm b/blib/lib/TFBS/DB/TRANSFAC.pm
old mode 100755
new mode 100644
similarity index 98%
copy from TFBS/DB/TRANSFAC.pm
copy to blib/lib/TFBS/DB/TRANSFAC.pm
index c347ba0..1c0b59f
--- a/TFBS/DB/TRANSFAC.pm
+++ b/blib/lib/TFBS/DB/TRANSFAC.pm
@@ -69,7 +69,7 @@ use LWP::Simple qw($ua get);
# have read and accepted the terms
# of use of TRANSFAC at
# http://transfac.gbf.de/TRANSFAC/disclaimer.htm;
- # this also supresses the annoying
+ # this also suppresses the annoying
# message that is printed to STDERR
# upon invoking the method
@@ -198,7 +198,7 @@ sub _get_Matrix_by_URL {
$ID = $1;
}
- elsif ($line =~ /AccNo\/Logo<\/td><td>([^<]+)</) {
+ elsif ($line =~ /AccNo<\/td><td>([^<]+)</) {
$acc = $1;
}
elsif ($line =~ /\d+\.\d+\s+(\d+\.\d+)\s+(\d+\.{0,1}\d*)\s+(\d+\.{0,1}\d*)\s+(\d+\.{0,1}\d*)\s+(\d+\.{0,1}\d*)/) {
diff --git a/blib/lib/TFBS/Ext/.exists b/blib/lib/TFBS/Ext/.exists
new file mode 100644
index 0000000..e69de29
diff --git a/blib/lib/TFBS/Ext/pwmsearch.pm b/blib/lib/TFBS/Ext/pwmsearch.pm
new file mode 100644
index 0000000..9caea49
--- /dev/null
+++ b/blib/lib/TFBS/Ext/pwmsearch.pm
@@ -0,0 +1,161 @@
+package TFBS::Ext::pwmsearch;
+
+require 5.005_62;
+use strict;
+use warnings;
+use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);
+use Bio::SeqIO;
+use File::Temp qw (:POSIX);
+
+require Exporter;
+require DynaLoader;
+
+our @ISA = qw(Exporter DynaLoader);
+
+# Items to export into callers namespace by default. Note: do not export
+# names by default without a very good reason. Use EXPORT_OK instead.
+# Do not simply export all your public functions/methods/constants.
+
+# This allows declaration use TFBS::Ext::pwmsearch ':all';
+# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
+# will save memory.
+%EXPORT_TAGS = ( 'all' => [ qw(
+
+) ] );
+
+ at EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
+
+ at EXPORT = qw(
+
+);
+$VERSION = '0.2';
+
+bootstrap TFBS::Ext::pwmsearch $VERSION;
+
+# Preloaded methods go here.
+
+sub pwmsearch {
+ my ($matrixobj, $seqobj, $threshold, $start, $end) = @_;
+ $start = 1 if !defined($start);
+ $end = $seqobj->length if !defined($end);
+ my $matrixfile = tmpnam();
+ open (MATRIX, ">$matrixfile") or die ("Error opening temporary file.");
+ print MATRIX $matrixobj->rawprint();
+ close MATRIX;
+
+ my $outfile = tmpnam();
+
+ # pwm_search is confused by long descriptions - we delete desc temporarily:
+
+ my $save_desc = $seqobj->desc();
+ $seqobj->desc("");
+
+ my $seqfile;
+ if ($seqobj->{_fastafile}) {
+ $seqfile = $seqobj->{_fastafile};
+ }
+ else {
+ $seqfile = tmpnam();
+ my $outstream = Bio::SeqIO->new(-file=>">$seqfile", -format=>"fasta");
+ $outstream->write_seq(Bio::Seq->new(-seq =>$seqobj->subseq($start, $end),
+ -id =>$seqobj->id));
+ $outstream->close();
+ }
+
+ $seqobj->desc($save_desc);
+
+ # calculate threshold
+
+ if ($threshold) {
+ if ($threshold =~ /(.+)%/) {
+ # percentage
+ $threshold = $matrixobj->{min_score} +
+ ($matrixobj->{max_score} - $matrixobj->{min_score})* $1/100;
+ }
+ else {
+ # absolute value
+ # $threshold = $args{-threshold};
+ }
+ }
+ else {
+ # no threshold given
+ $threshold = $matrixobj->{min_score} -1;
+ }
+
+ search_xs($matrixfile, $seqfile,
+ $threshold, $matrixobj->name()."",
+ $matrixobj->{'class'}."", $outfile);
+
+ unlink $seqfile unless $seqobj->{'_fastafile'};
+ unlink $matrixfile;
+
+ my $hitlist = TFBS::SiteSet->new();
+ my ($TFname, $TFclass) = ($matrixobj->{name}, $matrixobj->{class});
+
+
+ my $save_delim = $/; # bugfix submitted
+ local $/ = "\n"; # by Michal Lapidot
+
+ open (OUTFILE, $outfile)
+ or die("Could not read temporary outfile");
+ while (my $line = <OUTFILE>) {
+ # print STDERR $line;
+ chomp $line;
+ $line =~ s/^\s+//;
+ $line =~ s/ *\t */\t/g;
+ my ($seq_id, $factor, $class, $strand, $score, $pos, $siteseq) =
+ (split /\t/, $line)[0, 2, 3, 4, 5, 7, 9];
+ my $num_strand = ($strand eq "-")? "-1" : "1";
+ my $site = TFBS::Site->new ( -seq_id => $seqobj->display_id()."",
+ -seqobj => $seqobj,
+ -strand => $num_strand."",
+ -pattern => $matrixobj,
+ -siteseq => $siteseq."",
+ -score => $score."",
+ -start => $pos +$start -1,
+ -end => $pos +$start
+ +length($siteseq) -2
+ );
+ $hitlist->add_site($site);
+ }
+ close OUTFILE;
+ $/ = $save_delim;
+ unlink $outfile;
+ return $hitlist;
+}
+
+
+1;
+__END__
+
+=head1 NAME
+
+TFBS::Ext::pwmsearch - Perl extension for scanning a DNA sequence object with a position weight matrix
+
+=head1 SYNOPSIS
+
+ use TFBS::Ext::pwmsearch;
+ pwmsearch
+
+=head1 DESCRIPTION
+
+Stub documentation for TFBS::Ext::pwmsearch, created by h2xs. It looks like the
+author of the extension was negligent enough to leave the stub
+unedited.
+
+Blah blah blah.
+
+=head2 EXPORT
+
+None by default.
+
+
+=head1 AUTHOR
+
+A. U. Thor, a.u.thor at a.galaxy.far.far.away
+
+=head1 SEE ALSO
+
+perl(1).
+
+=cut
diff --git a/blib/lib/TFBS/Matrix.pm b/blib/lib/TFBS/Matrix.pm
new file mode 100644
index 0000000..f7d7e71
--- /dev/null
+++ b/blib/lib/TFBS/Matrix.pm
@@ -0,0 +1,338 @@
+# TFBS module for TFBS::Matrix
+#
+# Copyright Boris Lenhard
+#
+# You may distribute this module under the same terms as perl itself
+#
+
+# POD
+
+=head1 NAME
+
+TFBS::Matrix - base class for matrix patterns, containing methods common
+to all
+
+=head1 DESCRIPTION
+
+TFBS::Matrix is a base class consisting of universal constructor called by
+its subclasses (TFBS::Matrix::*), and matrix manipulation methods that are
+independent of the matrix type. It is not meant to be instantiated itself.
+
+=head1 FEEDBACK
+
+Please send bug reports and other comments to the author.
+
+=head1 AUTHOR - Boris Lenhard
+
+Boris Lenhard E<lt>Boris.Lenhard at cgb.ki.seE<gt>
+
+=head1 APPENDIX
+
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+
+=cut
+
+
+
+# The code begins HERE:
+
+package TFBS::Matrix;
+use vars '@ISA';
+
+use PDL; # this dependency has to be eliminated in the future versions
+use TFBS::PatternI;
+
+use strict;
+
+ at ISA = qw(TFBS::PatternI);
+
+sub new {
+ my $class = shift;
+ my %args = @_;
+ my $self = bless {}, ref($class) || $class;
+
+ # first figure out how it was called
+ # we need (-dbh and (-ID or -name) for fetching it from a database
+ # or -matrix for direct matrix input
+
+ if (defined $args{'-matrix'}) {
+ $self->set_matrix($args{'-matrix'});
+ }
+ elsif (defined $args{'-matrixstring'}) {
+ $self->set_matrix($args{'-matrixstring'});
+ }
+ elsif (defined $args{-matrixfile}) {
+ my $matrixstring;
+ open (FILE, $args{-matrixfile})
+ or $self->throw("Could not open $args{-matrixfile}");
+ {
+ local $/ = undef;
+ $matrixstring = <FILE>;
+ }
+ $self->set_matrix($matrixstring);
+ }
+ else {
+ $self->throw("No matrix or db object provided.");
+ }
+
+ # Set the object data.
+ # Parameters specified in constructor call override those
+ # fetched from the database.
+
+ $self->{'ID'} = ($args{-ID} or
+ $self->{ID} or
+ "Unknown");
+ $self->{'name'} = ($args{-name} or
+ $self->{name} or
+ "Unknown");
+ $self->{'class'} = ($args{-class} or
+ $self->{class} or
+ "Unknown");
+ $self->{'strand'} = ($args{-strand} or
+ $self->{strand} or
+ "+");
+ $self->{'bg_probabilities'} =
+ ($args{'-bg_probabilities'} || {A => 0.25,
+ C => 0.25,
+ G => 0.25,
+ T => 0.25});
+
+ $self->{'tags'} = $args{-tags} ? ((ref($args{-tags}) eq "HASH") ? $args{-tags} : {} ) :{};
+ return $self;
+}
+
+
+
+=head2 matrix
+
+ Title : matrix
+ Usage : my $matrix = $pwm->matrix();
+ $pwm->matrix( [ [12, 3, 0, 0, 4, 0],
+ [ 0, 0, 0,11, 7, 0],
+ [ 0, 9,12, 0, 0, 0],
+ [ 0, 0, 0, 1, 1,12]
+ ]);
+
+ Function: get/set for the matrix data
+ Returns : a reference to 2D array of integers(PFM) or floats (ICM, PWM)
+ Args : none for get;
+ a four line string, reference to 2D array, or a 2D piddle for set
+
+=cut
+
+
+sub matrix {
+ my ($self, $matrixdata) = @_;
+ $self->set_matrix($matrixdata) if $matrixdata;
+ return $self->{'matrix'};
+}
+
+=head2 pdl_matrix
+
+ Title : pdl_matrix
+ Usage : my $pdl = $pwm->pdl_matrix();
+ Function: access the PDL matrix used to store the actual
+ matrix data directly
+ Returns : a PDL object, aka a piddle
+ Args : none
+
+=cut
+
+sub pdl_matrix {
+ pdl $_[0]->{'matrix'};
+}
+
+sub set_matrix {
+ my ($self, $matrixdata) = @_;
+
+ # The input matrix (specified as -array=> in the constructir call
+ # can either be
+ # * a 2D regular perl array with 4 rows,
+ # * a piddle (FIXME - check for 4 rows), or
+ # * a four-line string of numbers
+
+ # print STDERR "MATRIX>>>".$matrixdata;
+ if (ref($matrixdata) eq "ARRAY"
+ and ref($matrixdata->[0]) eq "ARRAY"
+ and scalar(@{$matrixdata}) == 4)
+ {
+ # it is a perl array
+ $self->{'matrix'} = $matrixdata;
+ }
+ elsif (ref($matrixdata) eq "PDL")
+ {
+ # it's a piddle
+ $self->{matrix} = _pdl_to_matrixref($matrixdata);
+ }
+ elsif (!ref($matrixdata))
+ #and (scalar split "\n",$matrixdata) == 4)
+ {
+ # it's a string then
+ $self->{matrix} = $self->_matrix_from_string($matrixdata);
+ }
+ else {
+ $self->throw("Wrong data type/format for -matrix.\n".
+ "Acceptable formats are Array of Arrays (4 rows),\n".
+ "PDL Array, (4 rows),\n".
+ "or plain string (4 lines).");
+ }
+ # $self->_set_min_max_score();
+ return 1;
+
+}
+
+sub _matrix_from_string {
+ my ($self, $matrixstring) = @_;
+ my @array = ();
+ foreach ((split "\n", $matrixstring)[0..3]) {
+ s/^\s+//;
+ s/\s+$//;
+ push @array, [split];
+ }
+ return \@array;
+}
+
+sub _set_min_max_score {
+ my ($self) = @_;
+ my $transpose = $self->pdl_matrix->xchg(0,1);
+ $self->{min_score} = sum(minimum $transpose);
+ $self->{max_score} = sum(maximum $transpose);
+}
+
+sub _load {
+ my ($self, $field, $value) = @_;
+ if (substr(ref($self->{db}),0,5) eq "DBI::") {
+ # database retrieval
+ }
+ elsif (-d $self->{dbh}) {
+ # retrieval from .pwm files in a directory
+ $self->_lookup_in_matrixlist($field, $value)
+ or do {
+ warn ("Matrix with $field=>$value not found.");
+ return undef;
+ };
+ my $ID = $self->{ID};
+ my $DIR = $self->{dbh};
+ $self->set_matrix(scalar `cat $DIR/$ID.pwm`); # FIXME - temporary
+
+ }
+ else {
+ $self->throw("-dbh is not a valid database handle or a directory.");
+ }
+}
+
+
+=head2 revcom
+
+ Title : revcom
+ Usage : my $revcom_pfm = $pfm->revcom();
+ Function: create a matrix pattern object which is reverse complement
+ of the current one
+ Returns : a TFBS::Matrix::* object of the same type as the one
+ the method acted upon
+ Args : none
+
+=cut
+
+sub revcom {
+ my ($self) = @_;
+ my $revcom_matrix =
+ $self->new(-matrix => $self->pdl_matrix->slice('-1:0,-1:0'),
+ # the above line rotates the original matrix 180 deg,
+ -ID => ($self->{ID} or ""),
+ -name => ($self->{name} or ""),
+ -class => ($self->{class} or ""),
+ -strand => ($self->{strand} and $self->{strand} eq "-") ? "+" : "-",
+ -tags => ($self->{tags} or {}) );
+ return $revcom_matrix;
+}
+
+
+=head2 rawprint
+
+ Title : rawprint
+ Usage : my $rawstring = $pfm->rawprint);
+ Function: convert matrix data to a simple tab-separated format
+ Returns : a four-line string of tab-separated integers or floats
+ Args : none
+
+=cut
+
+
+sub rawprint {
+ my $self = shift;
+ my $pwmstring = sprintf ( $self->pdl_matrix );
+ $pwmstring =~ s/\[|\]//g; # lose []
+ $pwmstring =~ s/\n /\n/g; # lose leading spaces
+ my @pwmlines = split("\n", $pwmstring); # f
+ $pwmstring = join ("\n", @pwmlines[2..5])."\n";
+ return $pwmstring;
+}
+
+=head2 prettyprint
+
+ Title : prettyprint
+ Usage : my $prettystring = $pfm->prettyprint();
+ Function: convert matrix data to a human-readable string format
+ Returns : a four-line string with nucleotides and aligned numbers
+ Args : none
+
+=cut
+
+sub prettyprint {
+ my $self = shift;
+ my $pwmstring = sprintf ( $self->pdl_matrix );
+ $pwmstring =~ s/\[|\]//g; # lose []
+ $pwmstring =~ s/\n /\n/g; # lose leading spaces
+ my @pwmlines = split("\n", $pwmstring); #
+ @pwmlines = ("A [$pwmlines[2] ]",
+ "C [$pwmlines[3] ]",
+ "G [$pwmlines[4] ]",
+ "T [$pwmlines[5] ]");
+ $pwmstring = join ("\n", @pwmlines)."\n";
+ return $pwmstring;
+}
+
+=head2 length
+
+ Title : length
+ Usage : my $pattern_length = $pfm->length;
+ Function: gets the pattern length in nucleotides
+ (i.e. number of columns in the matrix)
+ Returns : an integer
+ Args : none
+
+=cut
+
+sub length {
+ my $self = shift;
+ return $self->pdl_matrix->getdim(0);
+}
+
+sub _pdl_to_matrixref {
+ my ($matrixdata) = @_;
+ unless ($matrixdata->isa("PDL")) {
+ die "A non-PDL object passed to _pdl_to_matrixref";
+ }
+ my @list = list $matrixdata;
+ my @array;
+ my $matrix_width = scalar(@list) / 4;
+ for (0..3) {
+ push @array, [splice(@list, 0, $matrix_width)];
+ }
+ return \@array;
+}
+
+
+sub DESTROY {
+ # nothing
+}
+
+
+
+1;
+
+
+
+
diff --git a/TFBS/Matrix/ICM.pm b/blib/lib/TFBS/Matrix/ICM.pm
old mode 100755
new mode 100644
similarity index 59%
copy from TFBS/Matrix/ICM.pm
copy to blib/lib/TFBS/Matrix/ICM.pm
index 107502d..61a19a9
--- a/TFBS/Matrix/ICM.pm
+++ b/blib/lib/TFBS/Matrix/ICM.pm
@@ -98,7 +98,7 @@ following information content matrix:
G:[0.00 0.89 2.00 0.00 0.00 0.00]
T:[0.00 0.00 0.00 0.13 0.06 2.00]
-which contains the "weights" associated with the occurence of each
+which contains the "weights" associated with the occurrence of each
nucleotide at the given position in a pattern.
A TFBS::Matrix::PWM object is equipped with methods to search nucleotide
@@ -132,13 +132,7 @@ use strict;
use Bio::Root::Root;
use Bio::SeqIO;
use TFBS::Matrix;
-BEGIN {
- # this will not fail if the modules are nit available
- # but only if the user tries to actually draw a logo
- eval "use SVG";
- eval "use GD";
-
-};
+#use GD;
use File::Temp qw/:POSIX/;
@ISA = qw(TFBS::Matrix Bio::Root::Root);
@@ -214,8 +208,6 @@ sub to_PWM {
# OPTIONAL: default 600
-ysize # height of the image in pixels
# OPTIONAL: default 5/8 of -x_size
- -startpos # start position in the logo for x axis
- # OPTIONAL: default is 1
-margin # size of image margins in pixels
# OPTIONAL: default 15% of -y_size
-full_scale # the maximum value on the y-axis, in bits
@@ -239,8 +231,7 @@ sub draw_logo {
-graph_title=> "",
-x_title => "",
-y_title => "",
- -startpos => 1,
- @_);
+ @_);
# Other parameters that can be specified:
# -ysize -line_width -margin
# do not have a fixed default value
@@ -248,11 +239,11 @@ sub draw_logo {
# draw postscript logo if asked for
if ($args{'-ps'} || $args{'-pdf'}){
- return _draw_ps_logo($self, %args);
- }
- if ($args{'-svg'} || $args{'-SVG'}){
- return _draw_svg_logo($self, %args);
+ return _draw_ps_logo($self, @_);
}
+
+ require GD;
+
my ($xsize,$FULL_SCALE, $x_title, $y_title)
= @args{qw(-xsize -full_scale -x_title y_title)} ;
@@ -317,113 +308,97 @@ sub draw_logo {
# vertical axis (IC 1 and 2)
my $ic_1 = ($ysize - 2* $margin) / $FULL_SCALE;
foreach my $i (1..$FULL_SCALE) {
- $image->filledRectangle($margin-3*$line_width,
- $ysize-$margin - $i*$ic_1,
- $margin-1,
- $ysize-$margin+$line_width - $i*$ic_1,
- $black);
- $image->string($font,
- $margin-5*$line_width - $font->width,
- $ysize - $margin - $i*$ic_1 - $font->height()/2,
- $i,
+ $image->filledRectangle($margin-3*$line_width,
+ $ysize-$margin - $i*$ic_1,
+ $margin-1,
+ $ysize-$margin+$line_width - $i*$ic_1,
+ $black);
+ $image->string($font,
+ $margin-5*$line_width - $font->width,
+ $ysize - $margin - $i*$ic_1 - $font->height()/2,
+ $i,
$black);
}
# DRAW HORIZONTAL TICKS AND LABELS, AND THE LOGO ITSELF
# define function refs as hash elements
- my %draw_letter = ( A => \&_png_draw_A,
- C => \&_png_draw_C,
- G => \&_png_draw_G,
- T => \&_png_draw_T );
+ my %draw_letter = ( A => \&draw_A,
+ C => \&draw_C,
+ G => \&draw_G,
+ T => \&draw_T );
my $horiz_step = ($xsize -2*$margin) / $motif_size;
-
- #this is to avoid clutter on X axis:
- my $longest_label_length = length("$motif_size");
- if (length ($args{-startpos}) > $longest_label_length) {
- $longest_label_length = length ($args{-startpos});
- }
- if (length ($args{-startpos}+$motif_size) > $longest_label_length) {
- $longest_label_length = length ($args{-startpos}+$motif_size);
- }
- my $draw_every_nth_label = int($longest_label_length*$font->width+2) / $horiz_step + 1;
foreach my $i (0..$motif_size) {
- $image->filledRectangle($margin + $i*$horiz_step,
- $ysize-$margin+1,
- $margin + $i*$horiz_step+ $line_width,
- $ysize-$margin+3*$line_width,
- $black);
- last if $i==$motif_size;
-
- # get the $i-th column of matrix
- my %ic;
- ($ic{A}, $ic{C}, $ic{G}, $ic{T}) = list $self->pdl_matrix->slice($i);
-
- # sort nucleotides by increasing information content
- my @draw_order = sort {$ic{$a}<=>$ic{$b}} qw(A C G T);
-
- # draw logo column
- my $xlettersize = $horiz_step /1.1;
- my $ybottom = $ysize - $margin;
- foreach my $base (@draw_order) {
- my $ylettersize = int($ic{$base}*$ic_1 +0.5);
- next if $ylettersize ==0;
-
- # draw letter
- $draw_letter{$base}->($image,
- $margin + $i*$horiz_step,
- $ybottom - $ylettersize,
- $xlettersize, $ylettersize, $white);
- $ybottom = $ybottom - $ylettersize-1;
- }
+ $image->filledRectangle($margin + $i*$horiz_step,
+ $ysize-$margin+1,
+ $margin + $i*$horiz_step+ $line_width,
+ $ysize-$margin+3*$line_width,
+ $black);
+ last if $i==$motif_size;
+
+ # get the $i-th column of matrix
+ my %ic;
+ ($ic{A}, $ic{C}, $ic{G}, $ic{T}) = list $self->pdl_matrix->slice($i);
+
+ # sort nucleotides by increasing information content
+ my @draw_order = sort {$ic{$a}<=>$ic{$b}} qw(A C G T);
+
+ # draw logo column
+ my $xlettersize = $horiz_step /1.1;
+ my $ybottom = $ysize - $margin;
+ foreach my $base (@draw_order) {
+ my $ylettersize = int($ic{$base}*$ic_1 +0.5);
+ next if $ylettersize ==0;
+
+ # draw letter
+ $draw_letter{$base}->($image,
+ $margin + $i*$horiz_step,
+ $ybottom - $ylettersize,
+ $xlettersize, $ylettersize, $white);
+ $ybottom = $ybottom - $ylettersize-1;
+ }
+
+ if ($args{'-error_bars'} and ref($args{'-error_bars'}) eq "ARRAY") {
+ my $sd_pix = int($args{'-error_bars'}->[$i]*$ic_1);
+ my $yt = $ybottom - $sd_pix+1;
+ my $yb = $ybottom + $sd_pix-1;
+ my $xpos = $margin + ($i+0.45)*$horiz_step;
+ my $half_width;
- if ($args{'-error_bars'} and ref($args{'-error_bars'}) eq "ARRAY") {
- my $sd_pix = int($args{'-error_bars'}->[$i]*$ic_1);
- my $yt = $ybottom - $sd_pix+1;
- my $yb = $ybottom + $sd_pix-1;
- my $xpos = $margin + ($i+0.45)*$horiz_step;
- my $half_width;
-
- if ($yb > $ysize-$margin+$line_width) {
- $yb = $ysize-$margin+$line_width
- }
- else {
- $image->line($xpos - $xlettersize/8, $yb,
- $xpos + $xlettersize/8, $yb,
- $black);
- }
-
- $image->line($xpos, $yt, $xpos, $yb, $black);
- $image->line($xpos - 1 , $ybottom, $xpos+1, $ybottom, $black);
- $image->line($xpos - $xlettersize/8, $yt,
- $xpos + $xlettersize/8, $yt,
- $black);
-
-
+ if ($yb > $ysize-$margin+$line_width) {
+ $yb = $ysize-$margin+$line_width
}
+ else {
+ $image->line($xpos - $xlettersize/8, $yb,
+ $xpos + $xlettersize/8, $yb,
+ $black);
+ }
+
+ $image->line($xpos, $yt, $xpos, $yb, $black);
+ $image->line($xpos - 1 , $ybottom, $xpos+1, $ybottom, $black);
+ $image->line($xpos - $xlettersize/8, $yt,
+ $xpos + $xlettersize/8, $yt,
+ $black);
+
+
+ }
- # print position number on x axis (The if condition is for avoiding clutter)
- my $xlabel = $i+ $args{-startpos};
- if ($args{-startpos}<0 and $xlabel>=0) {
- $xlabel ++;
- }
- if ($xlabel % $draw_every_nth_label == 0) {
- $image->string($font,
- $margin + ($i+0.5)*$horiz_step - $font->width()/2,
- $ysize - $margin +5*$line_width,
- $xlabel,
- $black);
- }
+ # print position number on x axis
+ $image->string($font,
+ $margin + ($i+0.5)*$horiz_step - $font->width()/2,
+ $ysize - $margin +5*$line_width,
+ $i+1,
+ $black);
}
# print $args{-file};
if ($args{-file}) {
- open (PNGFILE, ">".$args{-file})
- or $self->throw("Could not write to ".$args{-file});
- print PNGFILE $image->png;
- close PNGFILE;
+ open (PNGFILE, ">".$args{-file})
+ or $self->throw("Could not write to ".$args{-file});
+ print PNGFILE $image->png;
+ close PNGFILE;
}
return $image;
}
@@ -527,7 +502,7 @@ gsave\n";
$out.=" (1) show\n grestore\n" ;
$out.="newpath\n ". ($x-10)." ". ($y+$ysize )." moveto\n". "$x ". ($y+$ysize) ." lineto\n stroke\n";
$out.="newpath\n ". ($x-10)." ". ($y+$max_ysize )." moveto\n". "$x ". ($y+$max_ysize) ." lineto\n stroke\n";
- $out.= "gsave\n/Times-Bold findfont $color{black} [$font 0 0 $font 0 0] makefont setfont\n".($x-20). " ".( $y+$ysize)." moveto\n";
+ $out.= "gsave\n/Times-Bold findfont $color{black} [$font 0 0 $font 0 0] makefont setfont\n".($x-20). " ".( $y+$ysize)." moveto\n";
$out.=" (2) show\n grestore\n" ;
$out.="newpath\n $x $y moveto\n". ($x). " ".($y+$max_ysize) ." lineto\n stroke\n";
$out.="newpath\n $x $y moveto\n". ($x+$xsize). " ".($y) ." lineto\n stroke\n";
@@ -601,231 +576,6 @@ gsave\n";
return $out;
}
-=head2 _draw_svg_logo
-
-
-=cut
-
-sub _draw_svg_logo {
- my $self = shift;
- my %args = (-xsize => 800,
- -full_scale => 2.25,
- -graph_title=> "",
- -x_title => "",
- -y_title => "",
- @_);
-
- my $max_ysize= $args{'-ysize'} ||int 5* $args{'-xsize'}/8;
- my ($xsize,$FULL_SCALE, $x_title, $y_title)
- = @args{qw(-xsize -full_scale -x_title y_title)} ;
-
- my $PER_PIXEL_LINE = 200;
-
- # calculate other parameters if not specified
-
- my $ysize = ($args{-ysize} or $xsize/1.6);
- my $line_width = ($args{-line_width} or $ysize/$PER_PIXEL_LINE);
- # remark (the line above): 1.6 is a standard screen x:y ratio
- my $margin = ($args{-margin} or $ysize*0.15);
-
-
-
- my $image = SVG->new(width=>$xsize, height=>$ysize);
- my $white = 'rgb(255,255,255)';
- my $black = 'rgb(0,0,0)';
- my $motif_size = $self->pdl_matrix->getdim(0);
- my $fontsize = int ($ysize/25);
- my $title_font = {width=>$fontsize*1.5, height=>$fontsize*1.5};
- my $font = {width=>$fontsize, height=>$fontsize};
-
- # WRITE LABELS AND TITLE
-
- # graph title
- $image->text(id=>"Title",
- 'font-size'=>$title_font->{width},
- x => $xsize/2,
- y => 0.6*$margin,
- 'text-anchor'=>'middle'
- )->cdata($args{-graph_title});
- # x title
-
- $image->text(id=>"X_title",
- 'font-size'=>$font->{width},
- x => $xsize/2,
- y => $ysize -0.3*$margin,
- 'text-anchor'=>'middle'
- )->cdata($args{-x_title});
-
- # y title
-
- my $g = $image->group;
- $g->text(id=>"Y_title",
- 'font-size'=>$font->{width},
- x => 0 ,
- 'text-anchor'=>'middle',
- y => 0,
- transform => 'rotate(-90) translate(-'.($ysize/2).','.($margin/2).')')->cdata($args{-y_title});
-
-
- # DRAW AXES
-
- # vertical: (top left to bottom right)
- $image->rectangle(id => "y_axis",
- style => {
- #stroke => $black,
- fill => $black
- },
- x => $margin-$line_width,
- y => $margin,
- width => $line_width,
- height => $ysize -2*$margin
- );
- #$image->filledRectangle($margin-$line_width, $margin-$line_width,
- # $margin-1, $ysize-$margin+$line_width, #
- # $black);
- # horizontal: (ditto)
- $image->rectangle(id => "x_axis",
- style => {
- #stroke => $black,
- fill => $black
- },
- x => $margin-$line_width,
- y => $ysize-$margin,
- width => $xsize-2*$margin+$line_width,
- height => $line_width
- );
- #$image->filledRectangle($margin-$line_width, $ysize-$margin+1,
- # $xsize-$margin+$line_width,$ysize-$margin+$line_width,
- # $black);
-
- # DRAW VERTICAL TICKS AND LABELS
-
- # vertical axis (IC 1 and 2)
- my $ic_1 = ($ysize - 2* $margin) / $FULL_SCALE;
- foreach my $i (1..$FULL_SCALE) {
- $image->rectangle(x => $margin-3*$line_width,
- y => $ysize-$margin - $i*$ic_1,
- width => 3*$line_width,
- height => $line_width
- );
- $image->text(x => $margin-5*$line_width - $font->{width},
- y => $ysize - $margin - $i*$ic_1 +$font->{height}/2,
- 'font-size'=>$font->{width},
- 'text-anchor'=>"right"
- )->cdata($i);
-
- }
-
- # DRAW HORIZONTAL TICKS AND LABELS, AND THE LOGO ITSELF
-
- # define function refs as hash elements
-
- my %draw_letter = ( A => \&_svg_draw_A,
- C => \&_svg_draw_C,
- G => \&_svg_draw_G,
- T => \&_svg_draw_T );
-
- my $horiz_step = ($xsize -2*$margin) / $motif_size;
-
- #this is to avoid clutter on X axis:
-
- my $longest_label_length = length("$motif_size");
- if (length ($args{-startpos}) > $longest_label_length) {
- $longest_label_length = length ($args{-startpos});
- }
- if (length ($args{-startpos}+$motif_size) > $longest_label_length) {
- $longest_label_length = length ($args{-startpos}+$motif_size);
- }
- my $draw_every_nth_label = int(($longest_label_length+0.25)*$font->{width}) / $horiz_step + 1;
-
- foreach my $i (0..$motif_size) {
- my $height = 3*$line_width;
- if ($i and $i==$args{-startpos}*-1){
- $height = 5*$line_width;
- }
- $image->rectangle(x => $margin + $i*$horiz_step -$line_width/2,
- y => $ysize-$margin,
- width => $line_width,
- height => $height
- );
- last if $i==$motif_size;
-
- # get the $i-th column of matrix
- my %ic;
- ($ic{A}, $ic{C}, $ic{G}, $ic{T}) = list $self->pdl_matrix->slice($i);
-
- # sort nucleotides by increasing information content
- my @draw_order = sort {$ic{$a}<=>$ic{$b}} qw(A C G T);
-
- # draw logo column
- my $xlettersize = $horiz_step*0.95;
- my $ybottom = $ysize - $margin;
- foreach my $base (@draw_order) {
- my $ylettersize = $ic{$base}*$ic_1;
- next if $ylettersize ==0;
-
- # draw letter
- $draw_letter{$base}->($image,
- $margin + $i*$horiz_step + 0.025* $horiz_step,
- $ybottom - $ylettersize,
- $xlettersize, $ylettersize, $white);
- $ybottom = $ybottom - $ylettersize;
- }
-
- if ($args{'-error_bars'} and ref($args{'-error_bars'}) eq "ARRAY") {
- my $sd_pix = int($args{'-error_bars'}->[$i]*$ic_1);
- my $yt = $ybottom - $sd_pix+1;
- my $yb = $ybottom + $sd_pix-1;
- my $xpos = $margin + ($i+0.5)*$horiz_step;
- my $half_width;
-
- if ($yb > $ysize-$margin+$line_width) {
- $yb = $ysize-$margin+$line_width
- }
- else {
- $image->line(x1=>$xpos - $xlettersize/8, y1=> $yb,
- x2=> $xpos + $xlettersize/8, y2=>$yb, stroke=>$black,
- 'stroke-width'=>$line_width);
- }
-
- $image->line(x1=>$xpos, y1=>$yt, x2=>$xpos, y2=>$yb, stroke=>$black,
- 'stroke-width'=>$line_width);
- $image->line(x1=>$xpos - $line_width , y1=>$ybottom, x2=>$xpos+$line_width, y2=>$ybottom, stroke=>$black,
- 'stroke-width'=>$line_width);
- $image->line(x1=>$xpos - $xlettersize/8, y1=>$yt,
- x2=>$xpos + $xlettersize/8, y2=>$yt, stroke=>$black,
- 'stroke-width'=>$line_width);
-
-
- }
-
- # print position number on x axis
- my $xlabel = $i+ $args{-startpos};
- if ($args{-startpos}<0 and $xlabel>=0) {
- $xlabel ++;
- }
- if ($xlabel % $draw_every_nth_label == 0) {
- $image->text(x => $margin + ($i+0.5)*$horiz_step - $font->{width}/2,
- y => $ysize - $margin +5*$line_width + $font->{width}/2,
- 'font-size'=>$font->{width},
- 'text-anchor'=>"bottom"
-
- )->cdata($xlabel);
- }
- }
-
- # print to $args{-file};
- if ($args{-file}) {
- open (SVGFILE, ">".$args{-file})
- or $self->throw("Could not write to ".$args{-file});
- my $xml = $image->xmlify;
- $xml =~ s/\s+<\/text/<\/text/gs;
- print SVGFILE $xml;
- close SVGFILE;
- }
- return $image;
-
-}
=head2 name
@@ -872,7 +622,7 @@ sub DESTROY {
# letter drawing routines
-sub _png_draw_A {
+sub draw_A {
my ($im, $x, $y, $xsize, $ysize, $white) = @_;
my $green = $im->colorAllocate(0,255,0);
@@ -896,7 +646,7 @@ sub _png_draw_A {
return 1;
}
-sub _png_draw_C {
+sub draw_C {
my ($im, $x, $y, $xsize, $ysize, $white) = @_;
my $blue = $im->colorAllocate(0,0,255);
$im->arc($x+$xsize*0.54, $y+$ysize/2,1.08*$xsize,$ysize,0,360,$blue);
@@ -923,7 +673,7 @@ sub _png_draw_C {
return 1;
}
-sub _png_draw_G {
+sub draw_G {
my ($im, $x, $y, $xsize, $ysize, $white) = @_;
my $yellow = $im->colorAllocate(200,200,0);
$im->arc($x+$xsize*0.54, $y+$ysize/2,1.08*$xsize,$ysize,0,360,$yellow);
@@ -956,7 +706,7 @@ sub _png_draw_G {
return 1;
}
-sub _png_draw_T {
+sub draw_T {
my ($im, $x, $y, $xsize, $ysize, $white) = @_;
my $red = $im->colorAllocate(255,0,0);
@@ -964,69 +714,7 @@ sub _png_draw_T {
$im->filledRectangle($x+0.42*$xsize, $y, $x+0.58*$xsize, $y+$ysize, $red);
return 1;
}
-
-
-
-sub _svg_draw_A {
-
- my ($im, $x, $y, $xsize, $ysize) = @_;
- $im->polygon( points => [$x, $y+$ysize, $x+$xsize*.42, $y, $x+$xsize*.58, $y, $x+$xsize, $y+$ysize,
- $x+0.85*$xsize, $y+$ysize, $x+0.725*$xsize, $y+0.75*$ysize, $x+0.275*$xsize, $y+0.75*$ysize,
- $x+0.15*$xsize, $y+$ysize, $x, $y+$ysize],
- fill => 'rgb(0,255,0)'
- );
- $im->polygon( points => [$x+$xsize*.5, $y+0.2*$ysize, $x+$xsize*.34, $y+0.6*$ysize, $x+$xsize*.64, $y+0.6*$ysize ],
- fill => 'rgb(255,255,255)');
- return 1;
-}
-
-
-sub _svg_draw_C {
- my ($im, $x, $y, $xsize, $ysize) = @_;
- $im->ellipse(cx=>$x+$xsize*0.54, cy=>$y+$ysize/2, rx=>$xsize*0.54, ry=>$ysize/2,
- fill => 'rgb(0,0,255)');
- $im->ellipse( cx=>$x+$xsize*0.53, cy=>$y+$ysize/2, rx=>$xsize*0.375, ry=>$ysize*0.375,
- fill => 'rgb(255,255,255)');
- $im->rectangle(x=>$x+$xsize/2, y=>$y+$ysize/4,
- width =>$xsize*0.6, height =>$ysize/2,
- fill=> 'rgb(255,255,255)');
- return 1;
-}
-
-sub _svg_draw_G {
- my ($im, $x, $y, $xsize, $ysize, $white) = @_;
- $im->ellipse(cx => $x+$xsize*0.54, cy => $y+$ysize/2,
- rx => 0.54*$xsize, ry => $ysize/2,
- fill => 'rgb(200,200,0)');
- $im->ellipse(cx => $x+$xsize*0.53, cy => $y+$ysize/2,
- rx => 0.375*$xsize, ry => 0.375*$ysize,
- fill => 'rgb(255,255,255)');
-
- $im->rectangle(x=>$x+$xsize/2, y=>$y+$ysize/4,
- width =>$xsize*0.6, height =>$ysize/2,
- fill=> 'rgb(255,255,255)');
- $im->rectangle(x=>$x+0.80*$xsize, y=>$y+$ysize/2,
- width =>$xsize*0.208, height =>$ysize/4,
- fill=> 'rgb(200,200,0)');
- $im->rectangle(x=>$x+0.6*$xsize, y=>$y+$ysize/2,
- width =>$xsize*0.408, height =>$ysize/8,
- fill=> 'rgb(200,200,0)');
-
- return 1;
-}
-
-sub _svg_draw_T {
-
- my ($im, $x, $y, $xsize, $ysize, $white) = @_;
- $im->polygon (points =>[$x, $y, $x+$xsize, $y, $x+$xsize, $y+0.16*$ysize,
- $x+0.58*$xsize, $y+0.16*$ysize, $x+0.58*$xsize, $y+$ysize,
- $x+0.42*$xsize, $y+$ysize, $x+0.42*$xsize, $y+0.16*$ysize,
- $x, $y+0.16*$ysize],
- fill => 'rgb(255,0,0)');
- return 1;
-}
-
-
+
1;
diff --git a/blib/lib/TFBS/Matrix/PFM.pm b/blib/lib/TFBS/Matrix/PFM.pm
new file mode 100644
index 0000000..23eaa6c
--- /dev/null
+++ b/blib/lib/TFBS/Matrix/PFM.pm
@@ -0,0 +1,613 @@
+# TFBS module for TFBS::Matrix::PFM
+#
+# Copyright Boris Lenhard
+#
+# You may distribute this module under the same terms as perl itself
+#
+
+# POD
+
+=head1 NAME
+
+TFBS::Matrix::PFM - class for raw position frequency matrix patterns
+
+
+=head1 SYNOPSIS
+
+=over 4
+
+=item * creating a TFBS::Matrix::PFM object manually:
+
+
+ my $matrixref = [ [ 12, 3, 0, 0, 4, 0 ],
+ [ 0, 0, 0, 11, 7, 0 ],
+ [ 0, 9, 12, 0, 0, 0 ],
+ [ 0, 0, 0, 1, 1, 12 ]
+ ];
+ my $pfm = TFBS::Matrix::PFM->new(-matrix => $matrixref,
+ -name => "MyProfile",
+ -ID => "M0001"
+ );
+ # or
+
+ my $matrixstring =
+ "12 3 0 0 4 0\n0 0 0 11 7 0\n0 9 12 0 0 0\n0 0 0 1 1 12";
+
+ my $pfm = TFBS::Matrix::PFM->new(-matrixstring => $matrixstring,
+ -name => "MyProfile",
+ -ID => "M0001"
+ );
+
+
+=item * retrieving a TFBS::Matix::PFM object from a database:
+
+(See documentation of individual TFBS::DB::* modules to learn
+how to connect to different types of pattern databases and
+retrieve TFBS::Matrix::* objects from them.)
+
+ my $db_obj = TFBS::DB::JASPAR2->new
+ (-connect => ["dbi:mysql:JASPAR2:myhost",
+ "myusername", "mypassword"]);
+ my $pfm = $db_obj->get_Matrix_by_ID("M0001", "PFM");
+ # or
+ my $pfm = $db_obj->get_Matrix_by_name("MyProfile", "PFM");
+
+
+=item * retrieving list of individual TFBS::Matrix::PFM objects
+from a TFBS::MatrixSet object
+
+(See the L<TFBS::MatrixSet> to learn how to create
+objects for storage and manipulation of multiple matrices.)
+
+ my @pfm_list = $matrixset->all_patterns(-sort_by=>"name");
+
+
+=item * convert a raw frequency matrix to other matrix types:
+
+ my $pwm = $pfm->to_PWM(); # convert to position weight matrix
+ my $icm = $icm->to_ICM(); # convert to information con
+
+=back
+
+=head1 DESCRIPTION
+
+TFBS::Matrix::PFM is a class whose instances are objects representing
+raw position frequency matrices (PFMs). A PFM is derived from N
+nucleotide patterns of fixed size, e.g. the set of sequences
+
+ AGGCCT
+ AAGCCT
+ AGGCAT
+ AAGCCT
+ AAGCCT
+ AGGCAT
+ AGGCCT
+ AGGCAT
+ AGGTTT
+ AGGCAT
+ AGGCCT
+ AGGCCT
+
+
+will give the matrix:
+
+ A:[ 12 3 0 0 4 0 ]
+ C:[ 0 0 0 11 7 0 ]
+ G:[ 0 9 12 0 0 0 ]
+ T:[ 0 0 0 1 1 12 ]
+
+which contains the count of each nucleotide at each position in the
+sequence. (If you have a set of sequences as above and want to
+create a TFBS::Matrix::PFM object out of them, have a look at
+TFBS::PatternGen::SimplePFM module.)
+
+PFMs are easily converted to other types of matrices, namely
+information content matrices and position weight matrices. A
+TFBS::Matrix::PFM object has the methods to_ICM and to_PWM which
+do just that, returning a TFBS::Matrix::ICM and TFBS::Matrix::PWM
+objects, respectively.
+
+=head1 FEEDBACK
+
+Please send bug reports and other comments to the author.
+
+=head1 AUTHOR - Boris Lenhard
+
+Boris Lenhard E<lt>Boris.Lenhard at cgb.ki.seE<gt>
+
+=head1 APPENDIX
+
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+
+=cut
+
+
+# The code begins HERE:
+
+package TFBS::Matrix::PFM;
+
+use vars '@ISA';
+use PDL;
+use strict;
+use Bio::Root::Root;
+use Bio::SeqIO;
+use TFBS::Matrix;
+use TFBS::Matrix::ICM;
+use TFBS::Matrix::PWM;
+use File::Temp qw/:POSIX/;
+ at ISA = qw(TFBS::Matrix Bio::Root::Root);
+
+use constant EXACT_SCHNEIDER_MAX => 30;
+
+
+#######################################################
+# PUBLIC METHODS
+#######################################################
+
+=head2 new
+
+ Title : new
+ Usage : my $pfm = TFBS::Matrix::PFM->new(%args)
+ Function: constructor for the TFBS::Matrix::PFM object
+ Returns : a new TFBS::Matrix::PFM object
+ Args : # you must specify either one of the following three:
+
+ -matrix, # reference to an array of arrays of integers
+ #or
+ -matrixstring,# a string containing four lines
+ # of tab- or space-delimited integers
+ #or
+ -matrixfile, # the name of a file containing four lines
+ # of tab- or space-delimited integers
+ #######
+
+ -name, # string, OPTIONAL
+ -ID, # string, OPTIONAL
+ -class, # string, OPTIONAL
+ -tags # an array reference, OPTIONAL
+Warnings : Warns if the matrix provided has columns with different
+ sums. Columns with different sums contradict the usual
+ origin of matrix data and, unless you are absolutely sure
+ that column sums _should_ be different, it would be wise to
+ check your matrices.
+
+=cut
+
+sub new {
+ my ($class, %args) = @_;
+ my $matrix = TFBS::Matrix->new(%args, -matrixtype=>"PFM");
+ my $self = bless $matrix, ref($class) || $class;
+ $self->_check_column_sums();
+ return $self;
+}
+
+=head2 column_sum
+
+ Title : column_sum
+ Usage : my $nr_sequences = $pfm->column_sum()
+ Function: calculates the sum of elements of one column
+ (the first one by default) which normally equals the
+ number of sequences used to derive the PFM.
+ Returns : the sum of elements of one column (an integer)
+ Args : columnn number (starting from 1), OPTIONAL - you DO NOT
+ need to specify it unless you are dealing with a matrix
+
+=cut
+
+sub column_sum {
+ my ($self, $column) = (@_,1);
+ return $self->pdl_matrix->slice($column-1)->sum;
+
+}
+
+=head2 to_PWM
+
+ Title : to_PWM
+ Usage : my $pwm = $pfm->to_PWM()
+ Function: converts a raw frequency matrix (a TFBS::Matrix::PFM object)
+ to position weight matrix. At present it assumes uniform
+ background distribution of nucleotide frequencies.
+ Returns : a new TFBS::Matrix::PWM object
+ Args : none; in the future releases, it should be able to accept
+ a user defined background probability of the four
+ nucleotides
+
+=cut
+
+sub to_PWM {
+ my ($self, %args) = @_;
+ my $bg = ($args{'-bg_probabilities' } || $self->{'bg_probabilities'});
+ my $bg_pdl =
+ transpose pdl ($bg->{'A'}, $bg->{'C'}, $bg->{'G'}, $bg->{'T'});
+ my $nseqs = $self->pdl_matrix->sum / $self->length;
+ my $q_pdl = ($self->pdl_matrix +$bg_pdl*sqrt($nseqs))
+ /
+ ($nseqs + sqrt($nseqs));
+ my $pwm_pdl = log2(4*$q_pdl);
+
+ my $PWM = TFBS::Matrix::PWM->new
+ ( (map {("-$_", $self->{$_}) } keys %$self),
+ # do not want tags to point to the same arrayref as in $self:
+ -tags => \%{ $self->{'tags'}},
+ -bg_probabilities => \%{ $self->{'bg_probabilities'}},
+ -matrix => $pwm_pdl
+ );
+ return $PWM;
+
+}
+
+
+=head2 to_ICM
+
+ Title : to_ICM
+ Usage : my $icm = $pfm->to_ICM()
+ Function: converts a raw frequency matrix (a TFBS::Matrix::PFM object)
+ to information content matrix. At present it assumes uniform
+ background distribution of nucleotide frequencies.
+ Returns : a new TFBS::Matrix::ICM object
+ Args : -small_sample_correction # undef (default), 'schneider' or 'pseudocounts'
+
+How a PFM is converted to ICM:
+
+For a PFM element PFM[i,k], the probability without
+pseudocounts is estimated to be simply
+
+ p[i,k] = PFM[i,k] / Z
+
+where
+- Z equals the column sum of the matrix i.e. the number of motifs used
+to construct the PFM.
+- i is the column index (position in the motif)
+- k is the row index (a letter in the alphacer, here k is one of
+(A,C,G,T)
+
+Here is how one normally calculates the pseudocount-corrected positional
+probability p'[i,j]:
+
+ p'[i,k] = (PFM[i,k] + 0.25*sqrt(Z)) / (Z + sqrt(Z))
+
+0.25 is for the flat distribution of nucleotides, and sqrt(Z) is the
+recommended pseudocount weight. In the general case,
+
+ p'[i,k] = (PFM[i,k] + q[k]*B) / (Z + B)
+
+where q[k] is the background distribution of the letter (nucleotide) k,
+and B an arbitrary pseudocount value or expression (for no pseudocounts
+B=0).
+
+For a given position i, the deviation from random distribution in bits
+is calculated as (Baldi and Brunak eq. 1.9 (2ed) or 1.8 (1ed)):
+
+- for an arbitrary alphabet of A letters:
+
+ D[i] = log2(A) + sum_for_all_k(p[i,k]*log2(p[i,k]))
+
+- special case for nucleotides (A=4)
+
+ D[i] = 2 + sum_for_all_k(p[i,k]*log2(p[i,k]))
+
+D[i] equals the information content of the position i in the motif. To
+calculate the entire ICM, you have to calculate the contrubution of each
+nucleotide at a position i to D[i], i.e.
+
+ICM[i,k] = p'[i,k] * D[i]
+
+
+=cut
+
+sub to_ICM {
+ my ($self, %args) = @_;
+ my $bg = ($args{'-bg_probabilities' } || $self->{'bg_probabilities'});
+
+
+
+ # compute ICM
+
+ my $bg_pdl =
+ transpose pdl ($bg->{'A'}, $bg->{'C'}, $bg->{'G'}, $bg->{'T'});
+ my $Z_pdl = $self->pdl_matrix->xchg(0,1)->sumover;
+
+ # pseudocount calculation
+
+ my $B = 0;
+ if (lc($args{'-small_sample_correction'} or "") eq "pseudocounts") {
+
+ $B = sqrt($Z_pdl);
+ }
+ else {
+ $B = 0; # do not add pseudocounts
+ }
+
+
+ my $p_pdl = ($self->pdl_matrix +$bg_pdl*$B)/ ($Z_pdl + $B);
+ my $plog_pdl = $p_pdl*log2($p_pdl);
+ $plog_pdl = $plog_pdl->badmask(0);
+ my $D_pdl = 2 + $plog_pdl->xchg(0,1)->sumover;
+ my $ic_pdl = $p_pdl * $D_pdl;
+
+
+ # apply Schneider correction if requested
+
+ if (lc($args{'-small_sample_correction'} or "") eq "schneider") {
+ my $columnsum_pdl = $ic_pdl->transpose->sumover;
+ my $corrected_columnsum_pdl =
+ $columnsum_pdl
+ + _schneider_correction ($self->pdl_matrix, $bg_pdl);
+ $ic_pdl *= $corrected_columnsum_pdl/$columnsum_pdl;
+ }
+
+ # construct and return an ICM object
+
+ my $ICM = TFBS::Matrix::ICM->new
+ ( (map {("-$_" => $self->{$_})} keys %$self),
+ -tags => \%{ $self->{'tags'}},
+ -bg_probabilities => \%{ $self->{'bg_probabilities'}},
+ -matrix => $ic_pdl
+ );
+ return $ICM;
+
+}
+
+
+=head2 draw_logo
+
+ Title : draw_logo
+ Usage : my $gd_image = $pfm->draw_logo()
+ Function: draws a sequence logo; similar to the
+ method in TFBS::Matrix::ICM, but can automatically calculate
+ error bars for drawing
+ Returns : a GD image object (see documentation of GD module)
+ Args : many; PFM-specific options are:
+ -small_sample_correction # One of
+ # "Schneider" (uses correction
+ # described by Schneider et al.
+ # (Schneider t et al. (1986) J.Biol.Chem.
+ # "pseudocounts" - standard pseudocount
+ # correction, more suitable for
+ # PFMs with large r column sums
+ # If the parameter is ommited, small
+ # sample correction is not applied
+
+ -draw_error_bars # if true, adds error bars to each position
+ # in the logo. To calculate the error bars,
+ # it uses the -small_sample_connection
+ # argument if explicitly set,
+ # or "Schneider" by default
+For other args, see draw_logo entry in TFBS::Matrix::ICM documentation
+
+=cut
+
+sub draw_logo {
+ my ($self, %args) = @_;
+ if ($args{'-draw_error_bars'}) {
+ $args{'-small_sample_correction'} ||= "Schneider"; # default Schneider
+
+ my $pdl_no_correction =
+ $self->to_ICM()
+ ->pdl_matrix->transpose->sumover;
+ my $pdl_with_correction =
+ $self->to_ICM(-small_sample_correction
+ => $args{'-small_sample_correction'})
+ ->pdl_matrix->transpose->sumover;
+
+ $args{'-error_bars'} =
+ [list ($pdl_no_correction - $pdl_with_correction)];
+
+ }
+ $self->to_ICM(%args)->draw_logo(%args);
+}
+
+
+=head2 add_PFM
+
+ Title : add_PFM
+ Usage : $pfm->add_PFM($another_pfm)
+ Function: adds the values of $pnother_pfm matrix to $pfm
+ Returns : reference to the updated $pfm object
+ Args : a TFBS::Matrix::PFM object
+
+=cut
+
+
+sub add_PFM {
+ my ($self, $pfm) = @_;
+ $pfm->isa("TFBS::Matrix::PFM")
+ or $self->throw("Wrong or no argument passed to add_PFM");
+ my $sum = $self->pdl_matrix + $pfm->pdl_matrix;
+ $self->set_matrix($sum);
+ return $self;
+}
+
+
+
+=head2 name
+
+=head2 ID
+
+=head2 class
+
+=head2 matrix
+
+=head2 length
+
+=head2 revcom
+
+=head2 rawprint
+
+=head2 prettyprint
+
+The above methods are common to all matrix objects. Please consult
+L<TFBS::Matrix> to find out how to use them.
+
+=cut
+
+###############################################
+# PRIVATE METHODS
+###############################################
+
+sub _check_column_sums {
+ my ($self) = @_;
+ my $pdl = $self->pdl_matrix->sever();
+ my $rowsums = $pdl->xchg(0,1)->sumover();
+ if ($rowsums->where($rowsums != $rowsums->slice(0))->getdim(0) > 0) {
+ $self->warn("PFM for ".$self->{ID}." has unequal column sums");
+ }
+}
+
+sub DESTROY {
+ # does nothing
+}
+
+###############################################
+# UTILITY FUNCTIONS
+###############################################
+
+sub log2 { log($_[0]) / log(2); }
+
+
+sub _schneider_correction {
+ my ($pdl, $bg_pdl) = @_;
+ my $Hg = -sum ($bg_pdl*log2($bg_pdl));
+ my (@Hnbs, %saved_Hnb);
+ my $is_flat = _is_bg_flat(list $bg_pdl);
+
+ my @factorials = (1);
+ if (min($pdl->transpose->sumover) <= EXACT_SCHNEIDER_MAX) {
+ foreach my $i (1..max($pdl->transpose->sumover)) {
+ $factorials[$i] =$factorials[$i-1] * $i;
+ }
+ }
+ my @column_sums = list $pdl->transpose->sumover;
+ foreach my $colsum (@column_sums) {
+ if (defined($saved_Hnb{$colsum})) {
+ push @Hnbs, $saved_Hnb{$colsum};
+ }
+ else {
+ my $Hnb;
+ if ($colsum <= EXACT_SCHNEIDER_MAX) {
+ if ($is_flat) {
+ $Hnb = _schneider_Hnb_precomputed($colsum);
+ }
+ else {
+ $Hnb = _schneider_Hnb_exact($colsum, $bg_pdl,
+ \@factorials);
+ }
+ }
+ else {
+ $Hnb = _schneider_Hnb_approx($colsum, $Hg);
+
+ }
+ $saved_Hnb{$colsum} = $Hnb;
+ push @Hnbs, $Hnb;
+ }
+ }
+ return -$Hg + pdl(@Hnbs);
+
+}
+
+
+sub _schneider_Hnb_exact {
+ my ($n, $bg_pdl, $rFactorial) = @_;
+
+ my $is_flat = _is_bg_flat(list $bg_pdl);
+ return 0 if $n==1;
+# my @fctrl = (1);
+# foreach my $i (1..max($pdl->transpose->sumover)) {
+# $rFactorial->[$i] =$rFactorial->[$i-1] * $i;
+# }
+# my @colsum = list $pdl->transpose->sumover;
+ my ($na, $nc, $ng, $nt) = ($n, 0,0,0);
+# my $n = $colsum[0];
+ my $E_Hnb=0;
+ while (1) {
+ my $ns_pdl = pdl [$na, $nc, $ng, $nt];
+ my $Pnb = ($rFactorial->[$n]
+ /
+ ($rFactorial->[$na]
+ *$rFactorial->[$nc]
+ *$rFactorial->[$ng]
+ *$rFactorial->[$nt])
+ )*prod($bg_pdl->transpose**pdl($na, $nc, $ng, $nt));
+ my $Hnb = -1 * sum(($ns_pdl/$n)*log2($ns_pdl/$n)->badmask(0));
+ $E_Hnb += $Pnb*$Hnb;
+
+
+ if ($nt) {
+ if ($ng) { $ng--; $nt++, }
+ elsif ($nc) { $nc--; $ng = $nt+1; $nt = 0; }
+ elsif ($na) { $na--; $nc = $nt+1; $nt = 0; }
+ else { last; }
+ }
+ else {
+ if ($ng) { $ng--; $nt++, }
+ elsif ($nc) { $nc--; $ng++; }
+ else { $na--; $nc++; $nt = 0; }
+ }
+ }
+ return $E_Hnb;
+}
+
+
+
+sub _schneider_Hnb_approx {
+ my ($colsum, $Hg) = @_;
+ return $Hg -3/(2*log(2)*$colsum);
+
+}
+
+
+
+sub _schneider_Hnb_precomputed {
+ my $i = shift;
+ if ($i<1 or $i>30) {
+ die "Precomputed params only available for colsums 1 to 30)";
+ }
+ my @precomputed =
+ (
+ 0, # 1
+ 0.75, # 2
+ 1.11090234442608, # 3
+ 1.32398964833609, # 4
+ 1.46290503577084, # 5
+ 1.55922640783176, # 6
+ 1.62900374746751, # 7
+ 1.68128673969433, # 8
+ 1.7215504663901, # 9
+ 1.75328193031842, # 10
+ 1.77879136615189, # 11
+ 1.79965855531179, # 12
+ 1.81699248819687, # 13
+ 1.8315892710679, # 14
+ 1.84403166371213, # 15
+ 1.85475371994775, # 16
+ 1.86408383599326, # 17
+ 1.87227404728809, # 18
+ 1.87952034817826, # 19
+ 1.88597702438913, # 20
+ 1.89176691659196, # 21
+ 1.89698887214968, # 22
+ 1.90172322434865, # 23
+ 1.90603586889234, # 24
+ 1.90998133028897, # 25
+ 1.91360509239859, # 26
+ 1.91694538711761, # 27
+ 1.92003457997914, # 28
+ 1.92290025302018, # 29
+ 1.92556605820924, # 30
+ );
+ return $precomputed[$i-1];
+}
+
+
+sub _is_bg_flat {
+ my @bg = @_;
+ my $ref = shift;
+ foreach my $other (@bg) {
+ return 0 unless $ref==$other;
+ }
+ return 1;
+}
+
+
+1;
diff --git a/TFBS/Matrix/PWM.pm b/blib/lib/TFBS/Matrix/PWM.pm
old mode 100755
new mode 100644
similarity index 99%
copy from TFBS/Matrix/PWM.pm
copy to blib/lib/TFBS/Matrix/PWM.pm
index 4d56b7a..cde15cc
--- a/TFBS/Matrix/PWM.pm
+++ b/blib/lib/TFBS/Matrix/PWM.pm
@@ -100,7 +100,7 @@ following position weight matrix:
G:[-1.57 1.85 -2.57 -1.34 -1.57 1.14]
T:[ 0.31 -3.16 -2.57 1.76 0.24 -0.83]
-which contains the "weights" associated with the occurence of each
+which contains the "weights" associated with the occurrence of each
nucleotide at the given position in a pattern.
A TFBS::Matrix::PWM object is equipped with methods to search nucleotide
@@ -530,7 +530,7 @@ sub _to_seqobj {
#return $format;
#}
else {
- $self->throw ("Wrong parametes passed to search method: ".%args);
+ $self->throw ("Wrong parameters passed to search method: ".%args);
}
}
diff --git a/TFBS/Matrix/_Alignment.pm b/blib/lib/TFBS/Matrix/_Alignment.pm
old mode 100755
new mode 100644
similarity index 99%
copy from TFBS/Matrix/_Alignment.pm
copy to blib/lib/TFBS/Matrix/_Alignment.pm
index 155e64e..7dd5fb4
--- a/TFBS/Matrix/_Alignment.pm
+++ b/blib/lib/TFBS/Matrix/_Alignment.pm
@@ -201,7 +201,7 @@ sub _calculate_conservation {
# at this point, the graph values are shifted $WINDOW/2 to the right
# i.e. the score at a certain position is the score of the window
- # UPSTREAM of it: To fix it, we shoud discard the first $WINDOW/2 scores:
+ # UPSTREAM of it: To fix it, we should discard the first $WINDOW/2 scores:
#$self->conservation1 ([]);
foreach my $pos (@graph[int($WINDOW/2)..$#graph]) {
push @CONSERVATION, 100*$pos/$WINDOW;
diff --git a/TFBS/MatrixSet.pm b/blib/lib/TFBS/MatrixSet.pm
old mode 100755
new mode 100644
similarity index 59%
copy from TFBS/MatrixSet.pm
copy to blib/lib/TFBS/MatrixSet.pm
index dc6f16c..9ae628f
--- a/TFBS/MatrixSet.pm
+++ b/blib/lib/TFBS/MatrixSet.pm
@@ -42,7 +42,6 @@ Please send bug reports and other comments to the author.
=head1 AUTHOR - Boris Lenhard
Boris Lenhard E<lt>Boris.Lenhard at cgb.ki.seE<gt>
-Modified by Eivind Valen eivind.valen at gmail.com
=head1 APPENDIX
@@ -62,7 +61,6 @@ use PDL;
use Bio::Seq;
use Bio::SeqIO;
use Bio::Root::Root;
-use Bio::TreeIO;
use File::Temp qw/:POSIX/;
use TFBS::Matrix;
@@ -71,44 +69,9 @@ use TFBS::SiteSet;
use strict;
-use constant TRUE => 1;
-use constant FALSE => 0;
-
@ISA = qw(Bio::Root::Root);
-# Hash of accepted options and their arguments for the program
-# STAMP. Reference to empty list means the option take no arguments
-# This test for legal arguments is maybe superflous and can
-# potentially be removed.
-my %stamp_opt = (
- -tf => [],
- -sd => [],
- -cc => [ "PCC", "ALLR", "ALLR_LL", "CS", "KL", "SSD" ],
- -align => [ "NW", "SW", "SWA", "SWU" ],
- -go => [],
- -ge => [],
- -out => [],
- -overlapalign => [],
- -nooverlapalign => [],
- -extendedoverlap => [],
- -printpairwise => [],
- -tree => [ "UPGMA", "SOTA" ],
- -ch => [],
- -ma => [ "PPA", "IR" ],
- -match => [],
- -matchtop => [],
- -prot => [],
- -genrand => [],
- -genscores => [],
- -stampdir => [],
- -tempdir => [],
- -noclean => []
- );
-
-
-
-
=head2 new
=cut
@@ -122,39 +85,6 @@ sub new {
}
-=head2 new2
-
-=cut
-
-
-sub new2 {
- my $class = shift;
- my %args = @_;
- my $self = bless {}, ref($class) || $class;
-
- if (defined $args{'-matrices'}) {
- $self->add_matrix( @{$args{'-matrices'}} ) if @{$args{'-matrices'}};
- }
-
- if (defined $args{'-matrixfile'}) {
- my @matrices;
-
- open (FILE, $args{-matrixfile})
- or $self->throw("Could not open $args{-matrixfile}");
-
- while (<FILE>) {
- /^\s*$/ && next;
- if (/^>/) {
-
- }
- }
- close(FILE);
-
-
- }
-
- return $self;
-}
=head2 add_matrix
@@ -178,11 +108,6 @@ sub add_matrix {
}
-sub add_Matrix {
- my $self = shift;
- return $self->add_matrix(@_);
-}
-
=head2 add_matrix_set
@@ -230,8 +155,6 @@ sub next {
return undef;
}
}
-
-
=head2 search_seq
Title : search_seq
@@ -259,6 +182,7 @@ sub next {
=cut
+
sub search_seq {
my ($self, %args) = @_;
$self->_search(%args);
@@ -375,6 +299,7 @@ sub size {
=cut
+
sub Iterator {
my ($self, %args) = @_;
@@ -385,54 +310,6 @@ sub Iterator {
}
-
-=head2 randomize_columns
-
- Title : randomize_columns
- Usage : $matrixset->randomize_columns();
- Function: Randomizes the columns between all the matrices in the set (in place).
- Returns : nothing
- Args : none
-
-=cut
-
-
-sub randomize_columns {
- my $self = shift;
- my (@lengths, @concat);
- my ($length, $i) = (-1, 0);
-
- # Concatenate to one big matrix
- for my $matrix (@{$self->{matrix_list}}) {
- $length += $matrix->length();
- push @lengths, $matrix->length();
- push @{$concat[$_]}, @{${$matrix->matrix()}[$_]} for (0..3);
- }
-
- # Schwartzian transform to get random permutation
- map { ( undef, $concat[0][$i], $concat[1][$i], $concat[2][$i], $concat[3][$i] ) = @$_; $i++; }
- sort { $a->[0] <=> $b->[0] }
- map { [ rand(), $concat[0][$_], $concat[1][$_], $concat[2][$_], $concat[3][$_] ] } ( 0 .. $length );
-
- # Split it up again
- my $start = 0;
- for my $matrix (@{$self->{matrix_list}}) {
- my $length = shift(@lengths);
- my $end = $start + $length - 1;
-
- $matrix->matrix( [
- [ @{$concat[0]}[$start..$end] ],
- [ @{$concat[1]}[$start..$end] ],
- [ @{$concat[2]}[$start..$end] ],
- [ @{$concat[3]}[$start..$end] ]
- ]
- );
- $start += $length;
- }
-
-}
-
-
sub _search {
my ($self, %args) = @_;
@@ -597,7 +474,7 @@ sub _to_seqobj {
#return $format;
#}
else {
- $self->throw ("Wrong parametes passed to search method: ".%args);
+ $self->throw ("Wrong parameters passed to search method: ".%args);
}
@@ -605,248 +482,20 @@ sub _to_seqobj {
}
+sub add_Matrix {
+ my ($self, @matrixlist) = @_;
+ foreach (@matrixlist) {
+ ref($_) =~ /TFBS::Matrix::/
+ or $self->throw("Attempted to add an element ".
+ "that is not a TFBS::Matrix object.");
+ push @{$self->{matrix_list}}, $_;
+ push @{$self->{_iterator_list}}, $_;
-
-
-=head2 remove_Matrix_by_ID
-
- Title : remove_Matrix_by_ID
- Usage : $matrixset->remove_Matrix_by_ID($id);
- Function: Removes a matrix from the set
- Returns : Nothing
- Args : None
-
-=cut
-
-sub remove_Matrix_by_ID {
- my ($self, $id) = @_;
-
- my @list = grep { $_->ID() ne $id } @{$self->{matrix_list}};
- $self->{matrix_list} = \@list;
-}
-
-my $error;
-
-
-sub _check_opt {
- my ($self, $opt, $arg, $list) = @_;
-
- # Invalid argument
- if (not defined($list)) {
- $error = "Invalid argument: $opt\n";
- return FALSE;
- }
-
- # Valid flag or switch.
- return TRUE if (not scalar(@$list));
-
-
- # Valid switch, check the argument
- for (@$list) {
- return TRUE if ($arg eq $_) ;
- }
-
- # Valid switch, invalid argument
- $error = "$arg is invalid argument to $opt";
- return FALSE;
-}
-
-
-sub _find_optimal {
- my ($self, $output) = @_;
- my ($optimal, $score_best, $in) = (undef, undef, 0);
-
- for (@$output) {
- if (/NumClust/) {
- $in = 1;
- next;
- }
-
- last if (/Tree Built/);
-
- if ($in) {
- my (undef, $clusters, $score) = split(/\t/);
-
- if ((not defined($score_best)) || $score < $score_best) {
- $score_best = $score;
- $optimal = $clusters;
- }
- }
- }
-
- return $optimal;
-}
-
-
-sub _run_STAMP {
- my ($self, %args) = @_;
- my $fh;
-
- for (keys(%args)) {
- die $error unless ($self->_check_opt($_, $args{$_}, $stamp_opt{$_}));
- }
-
- # Write matrices to temporary file
- if (not exists($args{-tf})) {
- $fh = new File::Temp( TEMPLATE => 'STAMP-XXXXX',
- DIR => $args{-tempdir} || '/tmp',
- SUFFIX => '.set');
-
- print $fh $_->STAMPprint() for (@{$self->{matrix_list}});
- $args{-tf} = $fh->filename();
- }
- # Set some default options
- $args{-tree} ||= "UPGMA";
- $args{-ma} ||= "IR";
- $args{-cc} ||= "PCC";
- $args{-align} ||= "SWU";
-
-
- # Make sure we find all files
- my $path;
- if ($args{-stampdir}) {
- $path = $args{-stampdir};
- die "Could not find STAMP at $path\n" if (not -e "$path/STAMP");
- } else {
- $path = (grep {-e "$_/STAMP"} split(/:+/, $ENV{PATH}))[0];
- $path || die "Could not find STAMP in path\n";
- }
-
- $args{-sd} ||= $path."/ScoreDists/JaspRand_".$args{-cc}."_".$args{-align}.".scores";
- die "No score distribution file found or not readable at '$args{-sd}'.\n Use -sd.\n" unless (-r $args{-sd});
-
- # Execute STAMP
- my $args = "";
- $args .= "$_ $args{$_} " for (keys(%args));
- my @output = `$path/STAMP -ch $args -out $fh`;
-
- # Get tree
- my $treeio = new Bio::TreeIO(-format => 'newick', -file => $fh->filename().".tree");
- my $tree = $treeio->next_tree;
-
- # Get FBP
- my $fbp = TFBS::Matrix::PFM->new(-matrixfile => $fh->filename()."FBP.txt");
- $fbp->{'filename'} = $fh->filename()."FBP.txt";
-
- print STDERR "::: $fbp->{'filename'} \n";
-
- if (not $args{-noclean}) {
- my $deleted = unlink($fh->filename()."FBP.txt", $fh->filename().".tree");
- warn("Couldn't remove temporary files") if ($deleted != 2);
- }
-
- return ($fh, \@output, $tree, $fbp);
-}
-
-
-
-sub _build_cluster {
- my ($self, $cluster, $node) = @_;
-
- if ($node->is_Leaf()) {
- for (@{$self->{matrix_list}}) {
- if ($_->ID() eq $node->id()) {
- $cluster->add_matrix($_);
- return;
- }
- }
- } else {
- $self->_build_cluster($cluster, $_) for ($node->each_Descendent());
- }
-}
-
-
-
-
-=head2 cluster
-
- Title : cluster
- Usage : $matrixset->cluster(%args)
- Function: Clusters the matrices in the set
- Returns : The root node of the hierachical clustering tree.
- An integer specifying the optimal number of clusters.
- An array of TFBS::MatrixSets, one for each cluster.
- Args : Many:
- -stampdir Directory where stamp is located. Not necessary if it is in the PATH.
- -tempdir Directory to put temporary files. Defaults to "/tmp"
- -noclean 1 to clean up temporary files, 0 otherwise
- -tree Method for constructing tree (UPGMA/SOTA). Def:UPGMA
-
-=cut
-
-sub cluster {
- my ($self, %args) = @_;
-
- if ($self->size() <= 1) {
- warn("Can't cluster MatrixSet of size less than 2");
- return;
- }
-
- my ($fh, $output, $tree, $fbp) = $self->_run_STAMP(%args);
-
- # Find optimal cluster number
- my $optimal = $args{-optimal} || $self->_find_optimal($output);
- my $root = $tree->get_root_node();
-
- my @nodes = ($root);
- my @leaves;
-
- # Descend the tree until the optimal cluster number is reached
- while (scalar(@nodes) && (scalar(@nodes) + scalar(@leaves)) < $optimal) {
- my $node = pop @nodes;
-
- if ($node->is_Leaf()) {
- push @leaves, $node;
- } else {
- @nodes = sort {$a->height() <=> $b->height()} (@nodes, $node->each_Descendent());
- }
- }
-
- # Build the clusters
- my @clusters;
- for (@leaves, @nodes) {
- my $cluster = $self->new();
- $self->_build_cluster($cluster, $_);
- push @clusters, $cluster;
- }
-
-
- return ($tree, $optimal, \@clusters);
-}
-
-
-
-=head2 fbp
-
- Title : fbp
- Usage : $matrixset->fbp(%args);
- Function: Creates a familial binding profile (FBP) for the set
- Returns : A familial binding profile represented as a TFBS::Matrix::PFM
- Args : Many
- -stampdir Directory where stamp is located. Not necessary if it is in the PATH.
- -tempdir Directory to put temporary files. Defaults to "/tmp"
- -noclean 1 to clean up temporary files, 0 otherwise
- -align Alignment method
-=cut
-
-sub fbp {
- my ($self, %args) = @_;
- if ($self->size() == 0) {
- warn("Can't create FBP for MatrixSet of size 0");
- return;
- } elsif ($self->size() == 1) {
- return @{$self->{'matrix_list'}}[0];
}
-
- my ($fh, $output, $tree, $fbp) = $self->_run_STAMP(%args);
-
- return $fbp;
+ return 1;
}
-
1;
-
-
diff --git a/TFBS/PatternGen.pm b/blib/lib/TFBS/PatternGen.pm
old mode 100755
new mode 100644
similarity index 97%
copy from TFBS/PatternGen.pm
copy to blib/lib/TFBS/PatternGen.pm
index 1474416..83331af
--- a/TFBS/PatternGen.pm
+++ b/blib/lib/TFBS/PatternGen.pm
@@ -14,7 +14,7 @@ TFBS::PatternGen - a base class for pattern generators
=head1 DESCRIPTION
-TFBS::PatternGen is a base classs providing methods common to all pattern generating
+TFBS::PatternGen is a base class providing methods common to all pattern generating
modules. It is meant to be inherited by a concrete pattern generator, which must have its own
constructor.
@@ -178,7 +178,7 @@ sub _motifs_to_patterns {
sub _validate_seq {
# a utility function
my $sequence = uc $_[0];
- $sequence=~ s/[ACGTN]//g;
+ $sequence=~ s/[ACGT]//g;
return ($sequence eq "" ? 1 : 0);
}
diff --git a/blib/lib/TFBS/PatternGen/AnnSpec.pm b/blib/lib/TFBS/PatternGen/AnnSpec.pm
new file mode 100644
index 0000000..f97b209
--- /dev/null
+++ b/blib/lib/TFBS/PatternGen/AnnSpec.pm
@@ -0,0 +1,213 @@
+
+# TFBS module for TFBS::PatternGen::AnnSpec
+#
+# Copyright Wynand Alkema
+#
+# You may distribute this module under the same terms as perl itself
+#
+
+# POD
+
+=head1 NAME
+
+TFBS::PatternGen::AnnSpec - a pattern factory that uses the AnnSpec program
+
+=head1 SYNOPSIS
+
+ my $patterngen =
+ TFBS::PatternGen::AnnSpec->new(-seq_file=>'sequences.fa',
+ -binary => 'ann-spec '
+
+
+ my $pfm = $patterngen->pattern(); # $pfm is now a TFBS::Matrix::PFM object
+
+
+=head1 DESCRIPTION
+
+TFBS::PatternGen::AnnSpec builds position frequency matrices
+using an external program AnnSpec (Workman, C. and Stormo, G.D. (2000) ANN-Spec: A method for discovering transcription factor binding sites with improved specificity. Proc. Pacific Symposium on Biocomputing 2000).
+
+=head1 FEEDBACK
+
+Please send bug reports and other comments to the author.
+
+=head1 AUTHOR - Wynand Alkema
+
+Wynand Alkema E<lt>Wynand.Alkema at cgb.ki.seE<gt>
+
+=cut
+
+package TFBS::PatternGen::AnnSpec;
+use vars qw(@ISA);
+use strict;
+
+
+# Object preamble - inherits from TFBS::PatternGen;
+
+use TFBS::PatternGen;
+use TFBS::PatternGen::AnnSpec::Motif;
+use File::Temp qw(:POSIX);
+use Bio::Seq;
+use Bio::SeqIO;
+
+ at ISA = qw(TFBS::PatternGen);
+
+=head2 new
+
+ Title : new
+ Usage : my $pattrengen = TFBS::PatternGen::AnnSpec->new(%args);
+ Function: the constructor for the TFBS::PatternGen::AnnSpec object
+ Returns : a TFBS::PatternGen::AnnSpec object
+ Args : This method takes named arguments;
+ you must specify one of the following three
+ -seq_list # a reference to an array of strings
+ # and/or Bio::Seq objects
+ # or
+ -seq_stream # A Bio::SeqIO object
+ # or
+ -seq_file # the name of the fasta file containing
+ # all the sequences
+ Other arguments are:
+ -binary # a fully qualified path to the 'meme' executable
+ # OPTIONAL: default 'ann-spec'
+ -additional_params # a string containing additional
+ # command-line switches for the
+ # ann-spec program
+
+=cut
+
+sub new {
+ my ($caller, %args) = @_;
+ my $self = bless {}, ref($caller) || $caller;
+ $self->{'filename'} =$args{'-seq_file'};
+
+ $self->{'additional_params'} =
+ ($args{'-additional_params'}
+ ? (ref($args{'-additional_params'})
+ ? join(' ', @{$args{'-additional_params'}})
+ : $args{'-additional_params'})
+ : "" );
+ $self->{'binary'} = $args{'-binary'} || 'ann-spec';
+ $self->_create_seq_set(%args) or die ('Error creating sequence set');
+ $self->_run_AnnSpec() or $self->throw("Error running AnnSpec.");
+ return $self;
+}
+
+
+=head2 pattern
+
+=head2 all_patterns
+
+=head2 patternSet
+
+The three methods listed above are used for the retrieval of patterns,
+and are common to all TFBS::PatternGen::* classes. Please
+see L<TFBS::PatternGen> for details.
+
+=cut
+
+sub _run_AnnSpec{
+ my ($self)=shift;
+ my $tmp_file = tmpnam();
+ my $outstream = Bio::SeqIO->new(-file=>">$tmp_file", -format=>"fasta");
+ foreach my $seqobj (@{ $self->{'seq_set'} } ) {
+ $outstream->write_seq($seqobj);
+ }
+ $outstream->close();
+ my $command_line =
+ $self->{'binary'}." ".
+ "-p ".$tmp_file." ".
+# $self->{'motif_length_string'}." ".
+# $self->{'nr_hits_string'}." ".
+ $self->{'additional_params'}.
+"";
+ # print STDERR "$command_line\n";
+ my $resultstring = `$command_line`;
+ # print STDERR $resultstring;
+ $self->_parse_AnnSpec_output($resultstring,$command_line);
+ unlink $tmp_file;
+ return 1
+}
+
+sub _parse_AnnSpec_output{
+ my ($self,$resultstring,$command_line)=@_;
+ if ($resultstring eq''){
+# warn "Error running AnnSpec\nNo patterns produced";
+ $self->throw ("Error running AnnSpec using command:\n $command_line");
+ return;
+ }
+ my ($consensus,$matrix)=$self->_parse_raw_matrix($resultstring);
+ my ($score,$sites)=$self->_parse_sites($resultstring);
+ my $motif =TFBS::PatternGen::AnnSpec::Motif->new
+ (
+ #-length => $length."",
+ # -bg_probabilities => [split /\s+/, $raw_bp],
+ -tags => {consensus => $consensus,
+ score=>$score},
+
+ -nr_hits => 1,
+ -sites=>$sites,
+ -matrix => $matrix
+ );
+ push @{ $self->{'motifs'} }, $motif;
+ return
+}
+
+sub _parse_sites{
+ my ($self,$string)=@_;
+# print $raw_motif;
+ my @hits;
+ my ($sites)=$string=~/STR BEST_SITES\n(.*)STR ave\(S\)/s;
+ my ($average)=$string=~/STR ave\(S\)\s+(\d*\.*\d*)/;
+ my ($score)=$string=~/STR ln\(ave\(sum\(exp\(S\)\)\)\)\s+(\d*\.*\d*)/;
+ # print STDERR $score,"\n";
+ my @sites=split/\n/,$sites;
+ shift @sites;
+# print "@sites\n";
+ foreach my $site (@sites){
+ my @site_array=split(/\s+/,$site);
+# print "$site_array[3]\n";
+# print "$site_array[5]\n";
+ my ($seq_id)=$site_array[5]=~/>(.*)/;
+ my $strand=1;
+ $strand=-1 if $site_array[3]=~/\'/;#MEans we have a pattern in the reverse strand
+ my ($start)=$site_array[3]=~/(\d+)/;
+ my $site = Bio::SeqFeature::Generic->new ( -start => $start,
+ -end => $start+(length$site_array[4])-1,
+ -strand => $strand,
+ -source => 'AnnSpec',
+ -score => $site_array[2],
+ );
+#
+ foreach my $seq(@{$self->{'seq_set'}}){
+ if ($seq->id eq $seq_id){
+ $site->attach_seq ($seq);
+ }
+ }
+ push (@hits,$site);
+ }
+ return $score,\@hits;
+
+}
+
+sub _parse_raw_matrix{
+ my ($self,$string)=@_;
+ my ($matrix)=$string=~/ALR ALIGNMENT_MATRIX.*ALR\s+-+(.*)ALR CONSENSUS/s;
+ my ($consensus)=$string=~/ALR CONSENSUS (.*)\n/;
+
+ #print $consensus;
+
+ my @matrix=split("\n",$matrix);
+ shift @matrix;
+ my @pfm;
+ foreach my $row(@matrix){
+ # print $row;
+ my @row=split /\s+/, $row;
+ push @pfm, [@row[2..scalar at row-1]];
+ }
+ return $consensus, \@pfm;
+
+}
+
+
+1;
diff --git a/blib/lib/TFBS/PatternGen/AnnSpec/Motif.pm b/blib/lib/TFBS/PatternGen/AnnSpec/Motif.pm
new file mode 100644
index 0000000..923f9ac
--- /dev/null
+++ b/blib/lib/TFBS/PatternGen/AnnSpec/Motif.pm
@@ -0,0 +1,61 @@
+# TFBS module for TFBS::PatternGen::AnnSpec::Motif
+#
+# Copyright Boris Lenhard and Wynand Alkema
+#
+# You may distribute this module under the same terms as perl itself
+#
+
+# POD
+
+
+# POD
+
+=head1 NAME
+
+TFBS::PatternGen::AnnSpec::Motif - class for unprocessed motifs and associated
+numerical scores created by the Gibbs program
+
+
+=head1 SYNOPSIS
+
+=head1 DESCRIPTION
+
+TFBS::PatternGen::AnnSpec::Motif is used to store and manipulate unprocessed
+motifs and associated numerical scores created by the AnnSpec program. You do not
+normally want to create a TFBS::PatternGen::AnnSpec::Motif yourself. They are created
+by running TFBS::PatternGen::AnnSpec
+
+=head1 FEEDBACK
+
+Please send bug reports and other comments to the author.
+
+=head1 AUTHOR - Boris Lenhard and Wynand Alkema
+
+Boris Lenhard E<lt>Boris.Lenhard at cgb.ki.seE<gt>
+Wynand Alkema E<lt>Wynand.Alkema at cgb.ki.seE<gt>
+
+=head1 APPENDIX
+
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+
+=cut
+
+
+
+# the code begins here:
+
+package TFBS::PatternGen::AnnSpec::Motif;
+use vars qw(@ISA);
+use strict;
+
+use TFBS::Matrix::PFM;
+use TFBS::PatternGen::Motif::Matrix;
+ at ISA = qw(TFBS::PatternGen::Motif::Matrix);
+
+
+
+
+
+
+
diff --git a/TFBS/PatternGen/Elph.pm b/blib/lib/TFBS/PatternGen/Elph.pm
old mode 100755
new mode 100644
similarity index 99%
copy from TFBS/PatternGen/Elph.pm
copy to blib/lib/TFBS/PatternGen/Elph.pm
index e5005cb..3a3804f
--- a/TFBS/PatternGen/Elph.pm
+++ b/blib/lib/TFBS/PatternGen/Elph.pm
@@ -66,7 +66,7 @@ use Bio::SeqIO;
Other arguments are:
-binary # a fully qualified path to Gibbs executable
# OPTIONAL: default 'Gibbs'
- -nr_hits # a presumed number of pattern occurences in the
+ -nr_hits # a presumed number of pattern occurrences in the
# sequence set: it can be a single integer, e.g.
# -nr_hits => 24 , or a reference to an array of
# integers, e.g -nr_hits => [12, 24, 36]
diff --git a/blib/lib/TFBS/PatternGen/Elph/Motif.pm b/blib/lib/TFBS/PatternGen/Elph/Motif.pm
new file mode 100644
index 0000000..4627758
--- /dev/null
+++ b/blib/lib/TFBS/PatternGen/Elph/Motif.pm
@@ -0,0 +1,63 @@
+# TFBS module for TFBS::PatternGen::AnnSpec::Motif
+#
+# Copyright Boris Lenhard and Wynand Alkema
+#
+# You may distribute this module under the same terms as perl itself
+#
+
+# POD
+
+
+# POD
+
+=head1 NAME
+
+TFBS::PatternGen::AnnSpec::Motif - class for unprocessed motifs and associated
+numerical scores created by the Gibbs program
+
+
+=head1 SYNOPSIS
+
+=head1 DESCRIPTION
+
+TFBS::PatternGen::MEME::Motif is used to store and manipulate unprocessed
+motifs and associated numerical scores created by the meme program. You do not
+normally want to create a TFBS::PatternGen::MEME::Motif yourself. They are created
+by running TFBS::PatternGen::MEME
+
+=head1 FEEDBACK
+
+Please send bug reports and other comments to the author.
+
+=head1 AUTHOR - Wynand Alkema
+
+
+Wynand Alkema E<lt>Wynand.Alkema at cgb.ki.seE<gt>
+
+=head1 APPENDIX
+
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+
+=cut
+
+
+
+# the code begins here:
+
+package TFBS::PatternGen::Elph::Motif;
+use vars qw(@ISA);
+use strict;
+
+use TFBS::Matrix::PFM;
+use TFBS::PatternGen::Motif::Matrix;
+ at ISA = qw(TFBS::PatternGen::Motif::Matrix);
+
+
+
+
+
+
+
+
+
diff --git a/TFBS/PatternGen/Gibbs.pm b/blib/lib/TFBS/PatternGen/Gibbs.pm
old mode 100755
new mode 100644
similarity index 99%
copy from TFBS/PatternGen/Gibbs.pm
copy to blib/lib/TFBS/PatternGen/Gibbs.pm
index 80bc178..bac02dc
--- a/TFBS/PatternGen/Gibbs.pm
+++ b/blib/lib/TFBS/PatternGen/Gibbs.pm
@@ -67,7 +67,7 @@ use Bio::SeqIO;
Other arguments are:
-binary # a fully qualified path to Gibbs executable
# OPTIONAL: default 'Gibbs'
- -nr_hits # a presumed number of pattern occurences in the
+ -nr_hits # a presumed number of pattern occurrences in the
# sequence set: it can be a single integer, e.g.
# -nr_hits => 24 , or a reference to an array of
# integers, e.g -nr_hits => [12, 24, 36]
diff --git a/blib/lib/TFBS/PatternGen/Gibbs/Motif.pm b/blib/lib/TFBS/PatternGen/Gibbs/Motif.pm
new file mode 100644
index 0000000..d7a859c
--- /dev/null
+++ b/blib/lib/TFBS/PatternGen/Gibbs/Motif.pm
@@ -0,0 +1,102 @@
+# TFBS module for TFBS::PatternGen::Gibbs::Motif
+#
+# Copyright Boris Lenhard and Wynand Alkema
+#
+# You may distribute this module under the same terms as perl itself
+#
+
+# POD
+
+
+# POD
+
+=head1 NAME
+
+TFBS::PatternGen::Gibbs::Motif - class for unprocessed motifs and associated
+numerical scores created by the Gibbs program
+
+
+=head1 SYNOPSIS
+
+=head1 DESCRIPTION
+
+TFBS::PatternGen::Gibbs::Motif is used to store and manipulate unprocessed
+motifs and associated numerical scores created by the Gibbs program. You do not
+normally want to create a TFBS::PatternGen::Gibbs::Motif yourself. They are created
+by running TFBS::PatternGen::Gibbs
+
+=head1 FEEDBACK
+
+Please send bug reports and other comments to the author.
+
+=head1 AUTHOR - Boris Lenhard and Wynand Alkema
+
+Boris Lenhard E<lt>Boris.Lenhard at cgb.ki.seE<gt>
+Wynand Alkema E<lt>Wynand.Alkema at cgb.ki.seE<gt>
+
+=head1 APPENDIX
+
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+
+=cut
+
+
+
+# the code begins here:
+
+package TFBS::PatternGen::Gibbs::Motif;
+use vars qw(@ISA);
+use strict;
+
+use TFBS::Matrix::PFM;
+use TFBS::PatternGen::Motif::Matrix;
+ at ISA = qw(TFBS::PatternGen::Motif::Matrix);
+
+
+
+=head2 MAP
+
+ Title : MAP
+ Usage : my $map_score = $motif->MAP;
+ Function: returns MAP score for the detected motif
+ (This is a backward compatibility method. For consistency,
+ you should use $motif->tag('MAP_score') instead
+ Returns : float (a scalar)
+ Args : none
+
+=head2 Other methods
+
+TFBS::PatterGen::Motif::Gibbs inherits from TFBS::PatternGen::Motif,
+which inherits from TFBS::Matrix. Please consult the documentation of those modules
+for additional available methods.
+
+
+=cut
+
+sub MAP{
+ my ($self) = @_;
+ return $self->tag("MAP_score");
+}
+
+
+
+sub _calculate_PFM {
+ my $self = shift;
+ unless ($self->{'nr_hits'}) {
+ $self->throw(ref($self).
+ " objects must be created with a (nonzero)".
+ " -nr_hits parameter in constructor"
+ );
+ }
+ my @PFM;
+ foreach my $rowref ( @{$self->{'matrix'}} ) {
+ my @PFMrow;
+ foreach my $element (@$rowref) {
+ push @PFMrow, int($self->{'nr_hits'}*$element/100 + 0.5);
+ }
+ push @PFM, [@PFMrow];
+ }
+ return \@PFM;
+}
+
diff --git a/TFBS/PatternGen/MEME.pm b/blib/lib/TFBS/PatternGen/MEME.pm
old mode 100755
new mode 100644
similarity index 98%
copy from TFBS/PatternGen/MEME.pm
copy to blib/lib/TFBS/PatternGen/MEME.pm
index 530d943..fecc7a8
--- a/TFBS/PatternGen/MEME.pm
+++ b/blib/lib/TFBS/PatternGen/MEME.pm
@@ -174,7 +174,7 @@ sub _parse_raw_matrix{
my @array=split("\n",$string);
foreach my $line(@array){
my $nr=0;
- my $strand=1;#if revcomp is not selected teh strand is always 1
+ my $strand=1;#if revcomp is not selected the strand is always 1
next if $line=~/^-/;
next if $line=~/P-value\s+Site/;
my (@properties)=split(/\s+/,$line);
diff --git a/blib/lib/TFBS/PatternGen/MEME/Motif.pm b/blib/lib/TFBS/PatternGen/MEME/Motif.pm
new file mode 100644
index 0000000..0c327c1
--- /dev/null
+++ b/blib/lib/TFBS/PatternGen/MEME/Motif.pm
@@ -0,0 +1,63 @@
+# TFBS module for TFBS::PatternGen::AnnSpec::Motif
+#
+# Copyright Boris Lenhard and Wynand Alkema
+#
+# You may distribute this module under the same terms as perl itself
+#
+
+# POD
+
+
+# POD
+
+=head1 NAME
+
+TFBS::PatternGen::AnnSpec::Motif - class for unprocessed motifs and associated
+numerical scores created by the Gibbs program
+
+
+=head1 SYNOPSIS
+
+=head1 DESCRIPTION
+
+TFBS::PatternGen::MEME::Motif is used to store and manipulate unprocessed
+motifs and associated numerical scores created by the meme program. You do not
+normally want to create a TFBS::PatternGen::MEME::Motif yourself. They are created
+by running TFBS::PatternGen::MEME
+
+=head1 FEEDBACK
+
+Please send bug reports and other comments to the author.
+
+=head1 AUTHOR - Wynand Alkema
+
+
+Wynand Alkema E<lt>Wynand.Alkema at cgb.ki.seE<gt>
+
+=head1 APPENDIX
+
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+
+=cut
+
+
+
+# the code begins here:
+
+package TFBS::PatternGen::MEME::Motif;
+use vars qw(@ISA);
+use strict;
+
+use TFBS::Matrix::PFM;
+use TFBS::PatternGen::Motif::Matrix;
+ at ISA = qw(TFBS::PatternGen::Motif::Matrix);
+
+
+
+
+
+
+
+
+
diff --git a/blib/lib/TFBS/PatternGen/Motif/Matrix.pm b/blib/lib/TFBS/PatternGen/Motif/Matrix.pm
new file mode 100644
index 0000000..968fa70
--- /dev/null
+++ b/blib/lib/TFBS/PatternGen/Motif/Matrix.pm
@@ -0,0 +1,50 @@
+package TFBS::PatternGen::Motif::Matrix;
+use vars qw(@ISA);
+use strict;
+
+use TFBS::Matrix;
+use TFBS::Matrix::PFM;
+
+ at ISA = qw(TFBS::Matrix);
+
+sub new {
+ my ($caller, %args) = @_;
+ #my $matrix = TFBS::Matrix->new(%args, -matrixtype=>"PFM");
+ #my $self = bless $matrix, ref($caller) || $caller;
+ my $self = $caller->SUPER::new(%args, -matrixtype=>"PFM");
+ $self->{'length'} = $args{'-length'} || scalar @{$self->{'matrix'}->[0]};
+ $self->{'nr_hits'} = ($args{'-nr_hits'} || undef);
+ # || $self->throw("No -nr_hits provided.");
+ # Why was nr_hits required ?? (Boris)
+ $self->{'sites'}=$args{'-sites'};
+ # $self->{'tags'} = ($args{'-tags'} || {});
+ return $self;
+}
+
+sub PFM {
+ my ($self, %args) = @_;
+ return TFBS::Matrix::PFM->new (-name => "unknown",
+ -ID => "unknown",
+ -class=> "unknown",
+ -tags => { %{$self->{'tags'} } },
+ %args,
+ -matrix => $self->_calculate_PFM()
+ );
+}
+
+sub pattern {
+ my ($self, %args ) = @_;
+ $self->PFM(%args);
+}
+
+
+sub _calculate_PFM { # simplest case: matrix already IS PFM
+ my $self = shift;
+ return [@{$self->{'matrix'}}];
+}
+
+sub get_sites{
+ return @{$_[0]->{'sites'}};
+}
+
+1;
diff --git a/blib/lib/TFBS/PatternGen/Motif/Word.pm b/blib/lib/TFBS/PatternGen/Motif/Word.pm
new file mode 100644
index 0000000..cad8918
--- /dev/null
+++ b/blib/lib/TFBS/PatternGen/Motif/Word.pm
@@ -0,0 +1,21 @@
+package TFBS::PatternGen::Motif::Word;
+
+use vars qw(@ISA);
+use strict;
+use TFBS::Word::Consensus;
+
+ at ISA = qw(TFBS::Word::Consensus);
+
+sub new {
+ my ($caller, %args) = @_;
+
+
+ my $word = TFBS::Word::Consensus->new(%args);
+ my $self = bless $word, ref($caller) || $caller;
+ return $self;
+}
+sub pattern {
+ return $_;
+}
+
+1;
diff --git a/blib/lib/TFBS/PatternGen/SimplePFM.pm b/blib/lib/TFBS/PatternGen/SimplePFM.pm
new file mode 100644
index 0000000..b6613fb
--- /dev/null
+++ b/blib/lib/TFBS/PatternGen/SimplePFM.pm
@@ -0,0 +1,125 @@
+# TFBS module for TFBS::PatternGen::SimplePFM
+#
+# Copyright Boris Lenhard
+#
+# You may distribute this module under the same terms as perl itself
+#
+
+# POD
+
+=head1 NAME
+
+TFBS::PatternGen::SimplePFM - a simple position frequency matrix factory
+
+=head1 SYNOPSIS
+
+ my @sequences = qw( AAGCCT AGGCAT AAGCCT
+ AAGCCT AGGCAT AGGCCT
+ AGGCAT AGGTTT AGGCAT
+ AGGCCT AGGCCT );
+ my $patterngen =
+ TFBS::PatternGen::SimplePFM->new(-seq_list=>\@sequences);
+
+ my $pfm = $patterngen->pattern(); # $pfm is now a TFBS::Matrix::PFM object
+
+=head1 DESCRIPTION
+
+TFBS::PatternGen::SimplePFM generates a position frequency matrix from a set
+of nucleotide sequences of equal length, The sequences can be passed either
+as strings, as Bio::Seq objects or as a fasta file.
+
+This pattern generator always creates only one pattern from a given set
+of sequences.
+
+=cut
+
+package TFBS::PatternGen::SimplePFM;
+use vars qw(@ISA);
+use strict;
+
+# Object preamble - inherits from TFBS::PatternGenI;
+use TFBS::PatternGen;
+use TFBS::PatternGen::Motif::Matrix;
+
+ at ISA = qw(TFBS::PatternGen);
+
+
+=head2 new
+
+ Title : new
+ Usage : my $db = TFBS::PatternGen::SimplePFM->new(%args);
+ Function: the constructor for the TFBS::PatternGen::SimplePFM
+ object
+ Returns : a TFBS::PatternGen::SimplePFM obkect
+ Args : This method takes named arguments;
+ you must specify one of the following
+ -seq_list # a reference to an array of strings
+ # and/or Bio::Seq objects
+ # or
+ -seq_stream # A Bio::SeqIO object
+ # or
+ -seq_file # the name of the fasta file containing
+ # all the sequences
+
+=cut
+
+
+sub new {
+ my ($caller, %args) = @_;
+ my $self = bless {}, ref($caller) || $caller;
+ $self->_create_seq_set(%args) or die ('Error creating sequence set');
+ $self->_check_seqs_for_uniform_length();
+ $self->{'motifs'} = [$self->_create_motif()];
+ return $self;
+}
+
+=head2 pattern
+
+=head2 all_patterns
+
+=head2 patternSet
+
+The three above methods are used fro the retrieval of patterns,
+and are common to all TFBS::PatternGen::* classes. Please
+see L<TFBS::PatternGen> for details.
+
+=cut
+
+sub _create_motif {
+ my $self = shift;
+ my $length = $self->{'seq_set'}->[-1]->length();
+ # initialize the matrix
+ my $matrixref = [];
+ for my $i (0..3) {
+ for my $j (0..$length-1) {
+ $matrixref->[$i][$j] = 0;
+ }
+ }
+ #fill the matrix
+ my @base = qw(A C G T);
+ foreach my $seqobj ( @{ $self->{seq_set} } ) {
+ for my $i (0..3) {
+ my $seqstring = $seqobj->seq;
+ my @seqbase = split "", uc $seqstring;
+ for my $j (0..$length-1) {
+ $matrixref->[$i][$j] += ($base[$i] eq $seqbase[$j])?1:0;
+ }
+ }
+
+ }
+ my $nrhits =0; for my $i (0..3) {$nrhits += $matrixref->[$i][0];}
+ my $motif =
+ TFBS::PatternGen::Motif::Matrix->new(-matrix => $matrixref,
+ -nr_hits=> $nrhits);
+ return $motif;
+}
+
+sub _validate_seq {
+ # a utility function
+ my ($sequence)=@_;
+ $sequence=~ s/[ACGT]//g;
+ return ($sequence eq "" ? 1 : 0);
+}
+
+
+1;
\ No newline at end of file
diff --git a/blib/lib/TFBS/PatternGen/YMF.pm b/blib/lib/TFBS/PatternGen/YMF.pm
new file mode 100644
index 0000000..c30087e
--- /dev/null
+++ b/blib/lib/TFBS/PatternGen/YMF.pm
@@ -0,0 +1,193 @@
+
+# TFBS module for TFBS::PatternGen::YMF
+#
+# Copyright Wynand Alkema
+#
+# You may distribute this module under the same terms as perl itself
+#
+
+# POD
+
+=head1 NAME
+
+TFBS::PatternGen::MEME - a pattern factory that uses the MEME program
+
+=head1 SYNOPSIS
+
+ my $patterngen =
+ TFBS::PatternGen::MEME->new(-seq_file=>'sequences.fa',
+ -binary => 'meme'
+
+
+ my $pfm = $patterngen->pattern(); # $pfm is now a TFBS::Matrix::PFM object
+
+=head1 DESCRIPTION
+
+TFBS::PatternGen::MEME builds position frequency matrices
+using an external program MEME written by Bailey and Elkan.
+For information and source code of MEME see
+
+http://www.sdsc.edu/MEME
+
+
+=head1 FEEDBACK
+
+Please send bug reports and other comments to the author.
+
+=head1 AUTHOR - Wynand Alkema
+
+
+Wynand Alkema E<lt>Wynand.Alkema at cgb.ki.seE<gt>
+
+=cut
+
+package TFBS::PatternGen::YMF;
+use vars qw(@ISA);
+use strict;
+
+
+# Object preamble - inherits from TFBS::PatternGen;
+
+use TFBS::PatternGen;
+use TFBS::PatternGen::YMF::Motif;
+use File::Temp qw(:POSIX);
+use Bio::Seq;
+use Bio::SeqIO;
+use File::Temp qw/ tempfile tempdir /;
+ at ISA = qw(TFBS::PatternGen);
+
+=head2 new
+
+ Title : new
+ Usage : my $patterngen = TFBS::PatternGen::YMF->new(%args);
+ Function: the constructor for the TFBS::PatternGen::MEME object
+ Returns : a TFBS::PatternGen::MEME object
+ Args : This method takes named arguments;
+ you must specify one of the following three
+ -seq_list # a reference to an array of strings
+ # and/or Bio::Seq objects
+ # or
+ -seq_stream # A Bio::SeqIO object
+ # or
+ -seq_file # the name of the fasta file containing
+ # all the sequences
+ Other arguments are:
+ -binary # a fully qualified path to the 'meme' executable
+ # OPTIONAL: default 'meme'
+ -additional_params # a string containing additional
+ # command-line switches for the
+ # meme program
+
+=cut
+
+sub new {
+ my ($caller, %args) = @_;
+ my $self = bless {}, ref($caller) || $caller;
+
+ $self->{'width'}=$args{'-length_oligo'};
+ $self->{'path_org'}=$args{'-pathoforganismtables'};
+ $self->{'len_region'}=$args{'-length_region'};
+ $self->{'config_file'}=$args{'-config_file'}||$args{'-stats_path'}."/stats.config";
+ #The latter is the example configfile that comes with the installation of YMF
+
+
+ $self->{'abs_stats_path'} = $args{'-abs_stats_path'} ;
+ #This is the directory where the executable and the results file is
+ #generated by the program are located
+
+ $self->_create_seq_set(%args) or die ('Error creating sequence set');
+
+ $self->_run_stats() or $self->throw("Error running stats.");
+ return $self;
+}
+
+=head2 pattern
+
+=head2 all_patterns
+
+=head2 patternSet
+
+The three methods listed above are used for the retrieval of patterns,
+and are common to all TFBS::PatternGen::* classes. Please
+see L<TFBS::PatternGen> for details.
+
+=cut
+
+sub _run_stats{
+ my ($self)=shift;
+ my $tmp_file = tmpnam();
+ my $dumpfile = tmpnam();
+ my $outstream = Bio::SeqIO->new(-file=>">$tmp_file", -format=>"fasta");
+ foreach my $seqobj (@{ $self->{'seq_set'} } ) {
+ $outstream->write_seq($seqobj);
+ }
+ $outstream->close();
+ my $dir = tempdir();
+ #print $dir;
+ #change directory to directory where the program is located
+ #system 'cd $dir.w;';
+# my $command="cd $dir;";
+# print $command;
+# system $command;
+# `$command`;
+# system 'ls -ltr';
+
+ my $command_line =
+ $self->{'abs_stats_path'}."/stats ".
+ # "stats ".
+ $self->{'config_file'}." ".
+ $self->{'len_region'}." ".
+ $self->{'width'}." ".
+ $self->{'path_org'}." ".
+ "-sort ".#sorts on z-score
+ $tmp_file
+ ." >$dumpfile"
+ ;
+# print STDERR "cd $dir;$command_line\n";
+ my $resultstring = `cd $dir;$command_line`;
+ # print STDERR $resultstring;
+
+ $self->_parse_stats_output($resultstring,$command_line,$dumpfile,$dir);
+ unlink $tmp_file;
+ #unlink $dumpfile;
+ return 1
+}
+
+
+
+#
+sub _parse_stats_output{
+ my ($self,$resultstring,$command_line,$dumpfile,$temp_dir)=@_;
+ open DUMP,$dumpfile;
+ while(<DUMP>){
+ if ((/(^Error.*)/) or /(.*Aborting.*)/){
+# warn "Error running AnnSpec\nNo patterns produced";
+ print "YMF Error message: \"$1\"\n";
+ unlink $dumpfile;
+ $self->throw ("Error running YMF using command:\n $command_line");
+ return;
+ }
+ }
+ unlink $dumpfile;
+ open RES,"$temp_dir/results";
+ my $skip=<RES>;
+ while (<RES>){
+ my ($word,$occ,$z_score,$expect,$var)=split;
+ #print $word;
+ my $motif =TFBS::PatternGen::YMF::Motif->new
+ (-word=>$word,
+ -tags => {z_score=>$z_score,
+ 'occurences'=>$occ,
+ 'expectation value'=>$expect,
+ 'variance'=>$var}
+ );
+ push @{ $self->{'motifs'} }, $motif;
+ }
+ my $command="rm -r $temp_dir";
+ #print $command;
+ `$command`;# or die "could not unlink $!";
+# return
+}
+#
+
+1;
\ No newline at end of file
diff --git a/blib/lib/TFBS/PatternGen/YMF/Motif.pm b/blib/lib/TFBS/PatternGen/YMF/Motif.pm
new file mode 100644
index 0000000..ccf3d5a
--- /dev/null
+++ b/blib/lib/TFBS/PatternGen/YMF/Motif.pm
@@ -0,0 +1,64 @@
+# TFBS module for TFBS::PatternGen::YMF::Motif
+#
+# Copyright Boris Lenhard and Wynand Alkema
+#
+# You may distribute this module under the same terms as perl itself
+#
+
+# POD
+
+
+# POD
+
+=head1 NAME
+
+TFBS::PatternGen::YMF::Motif - class for unprocessed motifs and associated
+numerical scores created by the YMF program
+
+
+=head1 SYNOPSIS
+
+=head1 DESCRIPTION
+
+TFBS::PatternGen::YMF::Motif is used to store and manipulate unprocessed
+motifs and associated numerical scores created by the ymf program. You do not
+normally want to create a TFBS::PatternGen::YMF::Motif yourself. They are created
+by running TFBS::PatternGen::YMF
+
+=head1 FEEDBACK
+
+Please send bug reports and other comments to the author.
+
+=head1 AUTHOR - Wynand Alkema
+
+
+Wynand Alkema E<lt>Wynand.Alkema at cgb.ki.seE<gt>
+
+=head1 APPENDIX
+
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+
+=cut
+
+
+
+# the code begins here:
+
+package TFBS::PatternGen::YMF::Motif;
+use vars qw(@ISA);
+use strict;
+
+#use TFBS::Word;
+#use TFBS::Word::Consensus;
+use TFBS::PatternGen::Motif::Word;
+ at ISA = qw(TFBS::PatternGen::Motif::Word);
+
+
+1;
+
+
+
+
+
+
diff --git a/TFBS/PatternGenI.pm b/blib/lib/TFBS/PatternGenI.pm
old mode 100755
new mode 100644
similarity index 89%
copy from TFBS/PatternGenI.pm
copy to blib/lib/TFBS/PatternGenI.pm
index 2456f4f..9164ec9
--- a/TFBS/PatternGenI.pm
+++ b/blib/lib/TFBS/PatternGenI.pm
@@ -19,7 +19,7 @@ sub _abstractDeath {
my $package = ref $self;
my $caller = (caller())[1];
- confess "Abstract method '$caller' defined in interface TFBS::PatternGenI not implemented by pacakge $package";
+ confess "Abstract method '$caller' defined in interface TFBS::PatternGenI not implemented by package $package";
}
diff --git a/blib/lib/TFBS/PatternI.pm b/blib/lib/TFBS/PatternI.pm
new file mode 100644
index 0000000..c77ed96
--- /dev/null
+++ b/blib/lib/TFBS/PatternI.pm
@@ -0,0 +1,163 @@
+# TFBS module for TFBS::PatternI
+#
+# Copyright Boris Lenhard
+#
+# You may distribute this module under the same terms as perl itself
+#
+
+# POD
+
+=head1 NAME
+
+TFBS::PatternI - interface definition for all pattern objects (currently
+includes matrices and word (consensus and regular expressions )
+
+=head1 DESCRIPTION
+
+TFBS::PatternI is a draft class that should contain general interface for matrix and other (future) pattern objects. It is not defined and not used yet, as I need to ponder over certain unresolved issues in general pattern definition. User feedback is more than welcome.
+
+=head1 FEEDBACK
+
+Please send bug reports and other comments to the author.
+
+=head1 AUTHOR - Boris Lenhard
+
+Boris Lenhard E<lt>Boris.Lenhard at cgb.ki.seE<gt>
+
+=head1 APPENDIX
+
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+
+=cut
+
+# The code begins here:
+
+
+# The code begins HERE:
+
+package TFBS::PatternI;
+use vars '@ISA';
+
+use Bio::Root::Root;
+
+use strict;
+
+ at ISA = qw(Bio::Root::Root);
+
+#sub new {
+
+#}
+
+=head2 ID
+
+ Title : ID
+ Usage : my $ID = $icm->ID()
+ $pfm->ID('M00119');
+ Function: Get/set on the ID of the pattern (unique in a DB or a set)
+ Returns : pattern ID (a string)
+ Args : none for get, string for set
+
+=cut
+
+sub ID {
+ my ($self, $ID) = @_;
+ $self->{'ID'} = $ID if $ID;
+ return $self->{'ID'};
+}
+
+
+=head2 name
+
+ Title : name
+ Usage : my $name = $pwm->name()
+ $pfm->name('PPARgamma');
+ Function: Get/set on the name of the pattern
+ Returns : pattern name (a string)
+ Args : none for get, string for set
+
+=cut
+
+sub name {
+ my ($self, $name) = @_;
+ $self->{'name'} = $name if $name;
+ return $self->{'name'};
+}
+
+
+=head2 class
+
+ Title : class
+ Usage : my $class = $pwm->class()
+ $pfm->class('forkhead');
+ Function: Get/set on the structural class of the pattern
+ Returns : class name (a string)
+ Args : none for get, string for set
+
+=cut
+
+
+sub class {
+ my ($self, $class) = @_;
+ $self->{'class'} = $class if $class;
+ return $self->{'class'};
+}
+
+=head2 tag
+
+ Title : tag
+ Usage : my $acc = $pwm->tag('acc')
+ $pfm->tag(source => "Gibbs");
+ Function: Get/set on the structural class of the pattern
+ Returns : tag value (a scalar/reference)
+ Args : tag name (string) for get,
+ tag name (string) and value (any scalar/reference) for set
+
+=cut
+
+sub tag {
+ my $self = shift;
+ my $tag = shift || return;
+ if (scalar @_) {
+ $self->{'tags'}->{$tag} =shift;
+ }
+ return $self->{'tags'}->{$tag};
+}
+
+
+=head2 all_tags
+
+ Title : all_tags
+ Usage : my %tag = $pfm->all_tags();
+ Function: get a hash of all tags for a matrix
+ Returns : a hash of all tag values keyed by tag name
+ Args : none
+
+=cut
+
+sub all_tags {
+ return %{$_[0]->{'tags'}};
+}
+
+
+
+
+=head2 delete_tag
+
+ Title : delete_tag
+ Usage : $pfm->delete_tag('score');
+ Function: get a hash of all tags for a matrix
+ Returns : nothing
+ Args : a string (tag name)
+
+=cut
+
+
+sub delete_tag {
+ my ($self, $tag) = @_;
+ delete $self->{'tags'}->{$tag};
+}
+
+
+
+1;
diff --git a/blib/lib/TFBS/Site.pm b/blib/lib/TFBS/Site.pm
new file mode 100644
index 0000000..d9bd2af
--- /dev/null
+++ b/blib/lib/TFBS/Site.pm
@@ -0,0 +1,317 @@
+# TFBS module for TFBS::Site
+#
+# Copyright Boris Lenhard
+#
+# You may distribute this module under the same terms as perl itself
+#
+
+# POD
+
+=head1 NAME
+
+TFBS::Site - a nucleotide sequence feature object representing (possibly putative) transcription factor binding site.
+
+=head1 SYNOPSIS
+
+ # 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
+ }
+
+
+
+=head1 DESCRIPTION
+
+TFBS::Site object holds data for a (possibly predicted) transcription factor binding site on a nucleotide sequence (start, end, strand, score, tags, as well as references to the corresponding sequence and pattern objects). TFBS::Site is a subclass of Bio::SeqFeature::Generic and has acces to all of its method. Additionally, it contains the pattern() method, an accessor for pattern object associated with the site object.
+
+=head1 FEEDBACK
+
+Please send bug reports and other comments to the author.
+
+=head1 AUTHOR - Boris Lenhard
+
+Boris Lenhard E<lt>Boris.Lenhard at cgb.ki.seE<gt>
+
+=head1 APPENDIX
+
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+
+TFBS::Site is a class that extends Bio::SeqFeature::Generic. Please consult Bio::SeqFeature::Generic documentation for other available methods.
+
+=cut
+
+
+# The code begins HERE:
+
+
+package TFBS::Site;
+
+use vars qw(@ISA);
+use strict;
+
+use Bio::SeqFeature::Generic;
+ at ISA = qw(Bio::SeqFeature::Generic);
+
+=head2 new
+
+ Title : new
+ Usage : my $site = TFBS::Site->new(%args)
+ Function: constructor for the TFBS::Site object
+ Returns : TFBS::Site object
+ Args : -start, # integer
+ -end, # integer
+ -strand, # -1, 0 or 1
+ -score, # float
+ -source, # string (method used to detect it)
+ -primary, # string (primary tag)
+ -seqobj, # a Bio::Seq object
+ -pattern # a pattern object, usu. TFBS::Matrix::PWM
+
+=cut
+
+
+sub new {
+ my $class = shift;
+ my %args = (-seq_id => undef,
+ -siteseq => undef,
+ -seqobj => undef,
+ -strand => "0",
+ -source => "TFBS",
+ -primary => "TF binding site",
+ -pattern => undef,
+ -score => undef,
+ -start => undef,
+ -end => undef,
+ -frame => 0,
+ @_);
+ my $obj = Bio::SeqFeature::Generic->new(%args);
+ my $self = bless $obj, ref($class) || $class;
+ if ($args{-seqobj}) {
+ $self->attach_seq($args{-seqobj}) ;
+ $self->add_tag_value('sequence', $self->seq->seq);
+ }
+ # this is only for GFF printing really, and will be moved there soon
+
+ if (defined $args{'-pattern'}) {
+ $self->pattern($args{'-pattern'});
+ $self->add_tag_value('TF' => $self->pattern->name());
+ $self->add_tag_value('class' => $self->pattern->class)
+ if $self->pattern->class;
+ }
+
+
+ return $self;
+}
+
+
+
+=head2 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 TFBS::Matrix::PWM object
+ Args : pattern object (optional, for setting the pattern only)
+
+=cut
+
+
+sub pattern {
+ my ($self, $pattern) = @_;
+ if (defined $pattern) {
+ $self->{'pattern'} = $pattern;
+ }
+ return $self->{'pattern'};
+}
+
+
+=head2 rel_score
+
+ Title : rel_score
+ Usage : my $percent_score = $site->rel_score() * 100; # gets the pattern
+ Function: gets relative score (between 0.0 to 1.0) with respect of the score
+ range of the associated pattern (matrix)
+ Returns : floating point number between 0 and 1,
+ or undef if pattern not defined
+ Args : none
+
+=cut
+
+
+sub rel_score {
+ my ($self) = @_;
+ return undef unless $self->pattern();
+ return ($self->score - $self->pattern->min_score)/
+ ($self->pattern->max_score - $self->pattern->min_score);
+}
+
+=head2 GFF
+
+ Title : GFF
+ Usage : print $site->GFF();
+ : print $site->GFF($gff_formatter)
+ Function: returns a "standard" GFF string - the "generic" gff_string
+ method is left untouched for possible customizations
+ Returns : a string (NOT newline terminated! )
+ Args : a $gff_formatter function reference (optional)
+
+=cut
+
+
+
+sub GFF {
+ # due to popular demand, GFF is again a legal method, this time
+ # not requiring GFF modules
+
+ return $_[0]->gff_string($_[1]);
+}
+
+
+=head2 location
+
+=head2 start
+
+=head2 end
+
+=head2 length
+
+=head2 score
+
+=head2 frame
+
+=head2 sub_SeqFeature
+
+=head2 add_sub_SeqFeature
+
+=head2 flush_sub_SeqFeature
+
+=head2 primary_tag
+
+=head2 source_tag
+
+=head2 has_tag
+
+=head2 add_tag_value
+
+=head2 each_tag_value
+
+=head2 all_tags
+
+=head2 remove_tag
+
+=head2 attach_seq
+
+=head2 seq
+
+=head2 entire_seq
+
+=head2 seq_id
+
+=head2 annotation
+
+=head2 gff_format
+
+=head2 gff_string
+
+The above methods are inherited from Bio::SeqFeature::Generic.
+Please see L<Bio::SeqFeature::Generic> for details on their usage.
+
+=cut
+
+##################################################################
+# BACKWARD COMPATIBILITY METHODS
+
+sub Matrix {
+ my ($self, %args) = @_;
+ $self->pattern(%args);
+}
+
+sub seqobj {
+
+}
+
+sub siteseq {
+ $_[0]->seq->seq();
+}
+
+sub site_length {
+ my ($self) = @_;
+ $self->warn("site_length method is present for backward compatibility only. In new code please use the length() method");
+ return $self->length();
+}
+
+
+sub old_GFF {
+ eval "require GFF::GeneFeature;";
+ if ($@) { print STDERR "Failed to load GFF modules, stopped"; return; }
+ my ($self, %tags) =@_;
+ $self->warn("GFF method is for backward compatibility only, and its use in new code is not recommended. Please use Bio::SeqFeature::Generic gff methods if possible.");
+ my $GFFgf = GFF::GeneFeature->new(2);
+
+ $GFFgf->seqname ( $self->seqname() or "Unknown" );
+ $GFFgf->source ("TFBS");
+ $GFFgf->feature ("TFBS");
+ $GFFgf->start ($self->start());
+ $GFFgf->end ($self->end());
+ $GFFgf->score ($self->score());
+ $GFFgf->strand (("-",".","+")[$self->strand()+1]);
+ # $GFFgf->strand ($self->strand());
+
+ %tags = (TF => $self->pattern->{name},
+ class => $self->pattern->{class},
+ sequence => $self->seq->seq(),
+ %tags);
+ while (my ($tag, $value) = each %tags) {
+ my @values;
+ if (ref($value) eq "ARRAY") {
+ @values = @$value;
+ }
+ else {
+ @values = ($value);
+ }
+ $GFFgf->attribute($tag, @values);
+ }
+ return $GFFgf;
+}
+
+
+1;
+
+
+
+
+
diff --git a/blib/lib/TFBS/SitePair.pm b/blib/lib/TFBS/SitePair.pm
new file mode 100644
index 0000000..ead45ec
--- /dev/null
+++ b/blib/lib/TFBS/SitePair.pm
@@ -0,0 +1,80 @@
+package TFBS::SitePair;
+
+use vars qw(@ISA);
+use strict;
+
+use Bio::SeqFeature::FeaturePair;
+ at ISA = qw(Bio::SeqFeature::FeaturePair);
+
+# 'new' used to be inherited, but we need it now
+
+sub new {
+ my ($caller, $site1, $site2) = @_;
+ if ($Bio::Root::Root::VERSION < 1.4) {
+ return $caller->SUPER::new($site1, $site2);
+ }
+ else {
+ return $caller->SUPER::new(-feature1 => $site1,
+ -feature2 => $site2);
+ }
+}
+
+
+=head2 pattern
+
+ Title : pattern
+ Usage : my $pattern = $sitepair->pattern(); # gets the pattern
+ # sets the pattern to $pwm
+ Function: gets the pattern object associated with the site pair
+ Returns : pattern object, here TFBS::Matrix::PWM object
+ Args : none (get-only method)
+
+=cut
+
+
+sub pattern {
+ $_[0]->feature1->pattern();
+}
+
+
+=head2 GFF
+
+ Title : GFF
+ Usage : print $site->GFF();
+ : print $site->GFF($gff_formatter)
+ Function: returns a "standard" multiline GFF string
+ Returns : a string (multiline, newline terminated)
+ Args : a $gff_formatter function reference (optional)
+
+=cut
+
+
+sub GFF {
+ return join "\n", $_[0]->site1->GFF, $_[0]->site2->GFF;
+}
+
+
+=head2 site1
+=head2 site2
+
+ Title : site1
+ site2
+ Usage : my $site1 = $sitepair->site1();
+
+ Function: Returns individual TFBS::Site objects, from the site pair
+ Returns : a TFBS::Site
+ Args : none
+
+=cut
+
+
+sub site1 {
+ $_[0]->feature1();
+}
+
+sub site2 {
+ $_[0]->feature2();
+}
+
+
+
diff --git a/blib/lib/TFBS/SitePairSet.pm b/blib/lib/TFBS/SitePairSet.pm
new file mode 100644
index 0000000..4975fd4
--- /dev/null
+++ b/blib/lib/TFBS/SitePairSet.pm
@@ -0,0 +1,270 @@
+# TFBS module for TFBS::SitePairSet
+#
+# Copyright Boris Lenhard
+#
+# You may distribute this module under the same terms as perl itself
+#
+
+# POD
+
+=head1 NAME
+
+TFBS::SitePairSet - a set of TFBS::SitePair objects
+
+=head1 SYNOPSIS
+
+ my $site_pair_set = TFBS::SitePairSet->new(@list_of_site_pair_objects);
+
+ # add a TFBS::SitePair object to set:
+
+ $site_pair_set->add_site_pair($site_pair_obj);
+
+ # append another TFBS::SitePairSet contents:
+
+ $site_pair_set->add_site_pair_set($site_pair_obj);
+
+ # create an iterator:
+
+ my $it = $site_pair_set->Iterator(-sort_by => 'start');
+
+
+
+=head1 DESCRIPTION
+
+TFBS::SitePairSet is an aggregate class that contains a collection
+of TFBS::SitePair objects. It can be created anew and filled with
+TFBS::Site::Pair object. It is also returned by search_aln() method call
+of TFBS::PatternI subclasses (e.g. TFBS::Matrix::PWM).
+
+=head1 FEEDBACK
+
+Please send bug reports and other comments to the author.
+
+=head1 AUTHOR - Boris Lenhard
+
+Boris Lenhard E<lt>Boris.Lenhard at cgb.ki.seE<gt>
+
+=head1 APPENDIX
+
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+
+=cut
+
+
+# The code begins HERE:
+
+
+package TFBS::SitePairSet;
+use vars qw(@ISA $AUTOLOAD);
+use strict;
+
+use TFBS::SitePair;
+use TFBS::_Iterator::_SiteSetIterator;
+ at ISA = qw(Bio::Root::Root);
+
+
+
+sub new {
+
+
+ my ($class, @data) = @_;
+ my $self = bless {}, ref($class) || $class;
+ $self->{_site_array_ref} = [];
+ @data = @{$class->{_site_array_ref}} if !@data && ref($class);
+ $self->add_site_pair(@data);
+ return $self;
+}
+
+=head2 size
+
+ Title : size
+ Usage : my $size = $sitepairset->size()
+ Function: returns a number of TFBS::SitePair objects contained in the set
+ Returns : a scalar (integer)
+ Args : none
+
+=cut
+
+sub size {
+ scalar @{ $_[0]->{_site_array_ref} };
+}
+
+
+=head2 add_site_pair
+
+ Title : add_site_pair
+ Usage : $sitepairset->add_site_pair($site_pair_object)
+ $sitepairset->add_site_pair(@list_of_site_pair_objects)
+ Function: adds TFBS::SitePair objects to an existing TFBS::SitePairSet object
+ Returns : $sitepairset object (usually ignored)
+ Args : A list of TFBS::SitePair objects to add
+
+=cut
+
+
+sub add_site_pair {
+ my ($self, @site_list) = @_;
+ foreach my $site (@site_list) {
+ $site->isa("TFBS::SitePair")
+ or $self->throw("Attempted to add an element ".
+ "of a wrong type.");
+ push @{$self->{_site_array_ref}}, $site;
+ }
+ return 1;
+}
+
+
+
+=head2 add_site_pair_set
+
+ Title : add_site_pair_set
+ Usage : $sitepairset->add_site_pair_set($site_pair_set_object)
+ $sitepairset->add_site_pair(@list_of_site_pair_set_objects)
+ Function: adds the contents of other TFBS::SitePairSet objects
+ to an existing TFBS::SitePairSet object
+ Returns : $sitepairset object (usually ignored)
+ Args : A list of TFBS::SitePairSet objects whose contents should be
+ added to $sitepairset
+
+=cut
+
+
+sub add_site_pair_set {
+ my ($self, @sitesets) = @_;
+ foreach my $siteset (@sitesets) {
+ $siteset->isa("TFBS::SitePairSet")
+ or $self->throw("Attempted to add an element ".
+ "that is not a TFBS::SiteSet object.");
+ push @{$self->{_site_array_ref}},
+ @{ $siteset->{_site_array_ref} };
+ }
+ return $self;
+}
+
+
+=head2 Iterator
+
+ Title : Iterator
+ Usage : my $it = $sitepairset->Iterator(-sort_by=>'start');
+ while (my $site_pair = $it->next()) { #...
+ Function: Returns an iterator object, used to iterate thorugh elements
+ (TFBS::SitePair objects)
+ Returns : a TFBS::_Iterator object
+ Args : -sort_by # optional - currently it accepts
+ # (default sort order in parenthetse)
+ # 'name' (pattern name, alphabetically)
+ # 'ID' (pattern/matrix ID, alphabetically)
+ # 'start' (site start in sequence,
+ # numerically,increasing order)
+ # 'end' (site end in sequence,
+ # numerically, increasing order)
+ # 'score' (1st site in pair,
+ # numerically, decreasing order)
+ -reverse # optional - reverses the default sorting order if true
+
+=cut
+
+
+sub Iterator {
+ my ($self, %args) = @_;
+ return TFBS::_Iterator::_SiteSetIterator->new($self->{_site_array_ref},
+ $args{'-sort_by'},
+ $args{'-reverse'}
+ );
+}
+
+
+
+=head2 set1
+
+=head2 set2
+
+ Title : set1
+ set2
+ Usage : my $siteset1 = $sitepairset->set1();
+ : my $siteset2 = $sitepairset->set2()
+ Function: Returns individual TFBS::SiteSet objects, from the site set pair
+ Returns : A TFBS::SiteSet object
+ Args : none
+
+=cut
+
+
+sub set1 {
+ $_[0]->_get_set(1);
+}
+
+sub set2 {
+ $_[0]->_get_set(2);
+}
+
+
+=head2 GFF
+
+ Title : GFF
+ Usage : print $site->GFF();
+ : print $site->GFF($gff_formatter)
+ Function: returns a "standard" multiline GFF string
+ Returns : a string (multiline, newline terminated)
+ Args : a $gff_formatter function reference (optional)
+
+=cut
+
+
+sub GFF {
+ my ($self, %args) = @_;
+ my $iterator = $self->Iterator(-sort_by=>'start');
+ my $gff_string = "";
+ while (my $sitepair = $iterator->next()) {
+ $gff_string .= $sitepair->GFF(%args)."\n";
+ }
+
+ return $gff_string;
+}
+
+##############################################################
+# PRIVATE AND AUTOMATIC METHODS
+##############################################################
+
+sub _get_set {
+ my ($self, $set_nr) = @_;
+ my $feature = "feature$set_nr";
+ my $it = $self->Iterator();
+ my $siteset = TFBS::SiteSet->new();
+ no strict 'refs';
+ while (my $site_pair = $it->next()) {
+ eval "$siteset->add_site(\$site_pair->$feature())";
+ }
+ return $siteset;
+}
+
+
+sub AUTOLOAD {
+ my ($self) = @_;
+ my %discontinued = (sort => 1,
+ sort_by_name => 1,
+ sort_reversed => 1,
+ reverse => 1,
+ next_site => 1,
+ reset => 1
+ );
+ $AUTOLOAD =~ /.+::(\w+)/;
+ if ($discontinued{$1}) {
+ $self->_no_more($1);
+ }
+ else {
+ $self->throw("$1: no such method");
+ }
+}
+
+sub _no_more {
+ $_[0]->throw("Method '$_[1]' is no longer available in ".
+ ref($_[0]).". Use the 'Iterator' method instead.");
+}
+
+1;
+
+
+
+
diff --git a/blib/lib/TFBS/SiteSet.pm b/blib/lib/TFBS/SiteSet.pm
new file mode 100644
index 0000000..666ba4b
--- /dev/null
+++ b/blib/lib/TFBS/SiteSet.pm
@@ -0,0 +1,266 @@
+# TFBS module for TFBS::SiteSet
+#
+# Copyright Boris Lenhard
+#
+# You may distribute this module under the same terms as perl itself
+#
+
+# POD
+
+=head1 NAME
+
+TFBS::SiteSet - a set of TFBS::Site objects
+
+=head1 SYNOPSIS
+
+ my $site_set = TFBS::SiteSet->new(@list_of_site_objects);
+
+ # add a TFBS::Site object to set:
+
+ $site_set->add_site($site_obj);
+
+ # append another TFBS::SiteSet contents:
+
+ $site_pair_set->add_site_set($site_obj);
+
+ # create an iterator:
+
+ my $it = $site_set->Iterator(-sort_by => 'start');
+
+
+
+=head1 DESCRIPTION
+
+TFBS::SiteSet is an aggregate class that contains a collection
+of TFBS::Site objects. It can be created anew and filled with
+TFBS::Site object. It is also returned by search_seq() method call
+of some TFBS::PatternI subclasses (e.g. TFBS::Matrix::PWM).
+
+=head1 FEEDBACK
+
+Please send bug reports and other comments to the author.
+
+=head1 AUTHOR - Boris Lenhard
+
+Boris Lenhard E<lt>Boris.Lenhard at cgb.ki.seE<gt>
+
+=head1 APPENDIX
+
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+
+=cut
+
+
+
+# The code begins HERE:
+
+
+package TFBS::SiteSet;
+
+use vars qw(@ISA $AUTOLOAD);
+use TFBS::Site;
+use TFBS::_Iterator::_SiteSetIterator;
+use strict;
+ at ISA = qw(Bio::Root::Root);
+
+sub new {
+ my ($class, @data) = @_;
+ my $self = bless {}, ref($class) || $class;
+ $self->{_site_array_ref} = [];
+ @data = @{$class->{site_list}} if !@data && ref($class);
+ $self->add_site(@data);
+ return $self;
+}
+
+
+
+=head2 add_site
+
+ Title : add_site
+ Usage : $siteset->add_site($site_object)
+ $siteset->add_site(@list_of_site_objects)
+ Function: adds TFBS::Site objects to an existing TFBS::SiteSet object
+ Returns : $sitepair object (usually ignored)
+ Args : A list of TFBS::Site objects to add
+
+=cut
+
+
+
+sub add_site {
+ my ($self, @site_list) = @_;
+ foreach my $site (@site_list) {
+ ref($site) =~ /TFBS::Site*/
+ or $self->throw("Attempted to add an element ".
+ "of a wrong type.");
+ push @{$self->{_site_array_ref}}, $site;
+ }
+ return 1;
+}
+
+
+=head2 add_site_set
+
+ Title : add_site_set
+ Usage : $siteset->add_site_set($site_set_object)
+ $siteset->add_site(@list_of_site_set_objects)
+ Function: adds the contents of other TFBS::SiteSet objects
+ to an existing TFBS::SiteSet object
+ Returns : $siteset object (usually ignored)
+ Args : A list of TFBS::SiteSet objects whose contents should be
+ added to $siteset
+
+=cut
+
+
+sub add_siteset {
+ my ($self, @sitesets) = @_;
+ foreach my $siteset (@sitesets) {
+ ref($siteset) =~ /TFBS::Site.*Set/
+ or $self->throw("Attempted to add an element ".
+ "that is not a TFBS::SiteSet object.");
+ push @{$self->{_site_array_ref}},
+ @{ $siteset->{_site_array_ref} };
+ }
+ return $self;
+}
+
+
+=head2 size
+
+ Title : size
+ Usage : my $size = $siteset->size()
+ Function: returns a number of TFBS::Site objects contained in the set
+ Returns : a scalar (integer)
+ Args : none
+
+=cut
+
+
+
+sub size {
+ scalar @{ $_[0]->{_site_array_ref} };
+}
+
+
+
+=head2 Iterator
+
+ Title : Iterator
+ Usage : my $siteset_iterator =
+ $siteset->Iterator(-sort_by =>'start');
+ while (my $site = $siteset_iterator->next) {
+ # do whatever you want with individual matrix objects
+ }
+ Function: Returns an iterator object that can be used to go through
+ all members of the set (TFBS::Site objects)
+ Returns : an iterator object (currently undocumentened in TFBS -
+ but understands the 'next' method)
+ Args : -sort_by # optional - currently it accepts
+ # (default sort order in parenthetse)
+ # 'name' (pattern name, alphabetically)
+ # 'ID' (pattern/matrix ID, alphabetically)
+ # 'start' (site start in sequence,
+ # numerically,increasing order)
+ # 'end' (site end in sequence,
+ # numerically, increasing order)
+ # 'score' (numerically, decreasing order)
+
+ -reverse # optional - reverses the default sorting order if true
+
+=cut
+
+
+
+sub Iterator {
+
+ my ($self, %args) = @_;
+ return TFBS::_Iterator::_SiteSetIterator->new($self->{_site_array_ref},
+ $args{'-sort_by'},
+ $args{'-reverse'}
+ );
+}
+
+
+sub all_sites {
+ my ($self,%args) = @_;
+ return @{$self->{_site_array_ref}} if @{$self->{_site_array_ref}};
+
+}
+
+
+=head2 GFF
+
+ Title : GFF
+ Usage : print $siteset->GFF();
+ : print $siteset->GFF($gff_formatter)
+ Function: returns a "standard" multiline GFF string
+ Returns : a string (multiline, newline terminated)
+ Args : a $gff_formatter function reference (optional)
+
+=cut
+
+
+sub GFF {
+ my ($self, %args) = @_;
+ my $site_iterator = $self->Iterator(-sort_by=>'start');
+ my $gff_string = "";
+ while (my $site = $site_iterator->next()) {
+ $gff_string .= $site->GFF(%args)."\n";
+ }
+
+ return $gff_string;
+}
+
+
+
+########################################################
+# OBSOLETE METHODS
+########################################################
+
+sub old_GFF {
+ eval "require GFF::GeneFeatureSet;";
+ if ($@) { print STDERR "Failed to load GFF modules, stopped"; return; }
+ my ($self) = @_;
+ my $site_iterator = $self->Iterator(-sort_by=>'start');
+ my $GFFset = GFF::GeneFeatureSet->new(2);
+ while (my $site = $site_iterator->next()) {
+ $GFFset->addGeneFeature($site->GFF());
+ }
+ return $GFFset;
+}
+
+
+
+##############################################################
+# PRIVATE AND AUTOMATIC METHODS
+##############################################################
+
+
+
+sub AUTOLOAD {
+ my ($self) = @_;
+ my %discontinued = (sort => 1,
+ sort_by_name => 1,
+ sort_reversed => 1,
+ reverse => 1,
+ next_site => 1,
+ reset => 1
+ );
+ $AUTOLOAD =~ /.+::(\w+)/;
+ if ($discontinued{$1}) {
+ $self->_no_more($1);
+ }
+ else {
+ $self->throw("$1: no such method");
+ }
+}
+
+sub _no_more {
+ $_[0]->throw("Method '$_[1]' is no longer available in ".
+ ref($_[0]).". Use the 'Iterator' method instead.");
+}
+
+1;
+
diff --git a/blib/lib/TFBS/Tools/SetOperations.pm b/blib/lib/TFBS/Tools/SetOperations.pm
new file mode 100644
index 0000000..777244e
--- /dev/null
+++ b/blib/lib/TFBS/Tools/SetOperations.pm
@@ -0,0 +1,226 @@
+package TFBS::Tools::SetOperations;
+use strict;
+
+use Bio::Root::Root;
+use vars qw'@ISA';
+ at ISA = qw'Bio::Root::Root';
+
+
+sub new {
+ my ($caller, @args) = @_;
+ my $self = bless {}, ref $caller || $caller;
+ my ($index_by, $strict, $output_type, $pairs) =
+ $self->_rearrange([qw'INDEX_BY STRICT OUTPUT_TYPE PAIRS'], @args);
+ $self->index_by($index_by);
+ $self->strict($strict);
+ $self->output_type($output_type);
+ $self->pairs($pairs);
+ return $self;
+}
+
+
+sub union {
+ my ($self, @sets) = @_;
+ my %union_index =
+ map {$self->_index($_)} $self->_sets_to_arrayrefs(@sets);
+ $self->_output(\%union_index);
+}
+
+
+sub intersection {
+ my ($self, @sets) = @_;
+
+ my @set_arrayrefs = $self->_sets_to_arrayrefs(@sets);
+ #this would be faster, but we might want to retain the exact objects
+ # that were present in
+ #my @set_arrayrefs = sort {@$a <=> @$b} $self->_sets_to_arrayrefs(@sets);
+
+ my %intersection_index = $self->_index(shift @set_arrayrefs);
+ foreach my $set_arrayref (@set_arrayrefs) {
+ my %curr_set_index = $self->_index($set_arrayref);
+ my @help_array = %curr_set_index;
+
+ foreach my $key (keys %intersection_index) {
+
+ if (!exists $curr_set_index{$key}) {
+ delete $intersection_index{$key} ;
+ }
+ }
+ }
+ $self->_output(\%intersection_index);
+}
+
+
+sub difference {
+ # pairs only for now
+ my ($self, @sets) = @_;
+ my ($set1, $set2) = $self->_sets_to_arrayrefs(@sets);
+ if (!defined $set2) {
+ $self->throw ("'difference' needs exactly two sets as arguments");
+ }
+ my %diff_index1 = $self->_index($set1);
+ my %diff_index2 = $self->_index($set2);
+ foreach my $key (keys %diff_index1) {
+ if (exists $diff_index2{$key}) {
+ delete $diff_index1{$key};
+ delete $diff_index2{$key};
+ }
+ }
+ wantarray ? ($self->_output(\%diff_index1), $self->_output(\%diff_index2))
+ : $self->_output(\%diff_index1);
+}
+
+
+sub index_by {
+ my $self = shift;
+
+ # By default, we are dealing with Bio::SeqFeatureI objects
+ my @DEFAULTS = qw(primary_tag source_tag start end score strand);
+ if (@_) {
+ if(!defined $_[0]) {
+ $self->{_index_by} = \@DEFAULTS;
+ }
+ elsif (ref($_[0]) eq "ARRAY") {
+ $self->{_index_by} = $_[0];
+ }
+ else {
+ $self->{_index_by} = [@_];
+ }
+ }
+ return @{$self->{_index_by}};
+}
+
+
+sub strict {
+ my $self = shift;
+ if (@_) {
+ if ($self->{_strict} = shift) {
+ $self->{_index_fn} = \&_index_strict;
+ }
+ else {
+ $self->{_index_fn} = \&_index_by_annotation;
+ }
+ }
+ return $self->{_strict};
+}
+
+
+sub output_type {
+ my $self = shift;
+ if (@_) {
+ unless ($self->{_output_type} = shift) {
+ $self->{_output_type} = "arrayref"
+ }
+ }
+ return $self->{_output_type};
+}
+
+sub pairs {
+ my $self = shift;
+ if (@_) {
+ if ($self->{_pairs} = shift and !$self->strict) {
+ $self->{_index_fn} = \&_index_by_pair_annotation;
+ }
+ }
+ return $self->{_pairs};
+}
+
+sub _index {
+ my ($self) = @_;
+ $self->{_index_fn}->(@_);
+}
+
+
+sub _index_strict {
+ my ($self, $set_arrayref) = @_;
+ my %index_hash = (map {$_, $_} @$set_arrayref);
+ return %index_hash;
+}
+
+
+sub _index_by_pair_annotation {
+ my ($self, $set_arrayref) = @_;
+ my %index_hash;
+ foreach my $member (@$set_arrayref) {
+ my @index_elements = ($self->_get_index_elements($member->feature1),
+ $self->_get_index_elements($member->feature2));
+ $index_hash{join("::", @index_elements)} = $member;
+ }
+ return %index_hash;
+}
+
+
+sub _index_by_annotation {
+ my ($self, $set_arrayref) = @_;
+ my %index_hash;
+ foreach my $member (@$set_arrayref) {
+ my @index_elements = $self->_get_index_elements($member);
+ $index_hash{join("::", @index_elements)} = $member;
+ }
+ return %index_hash;
+}
+
+sub _get_index_elements {
+ my ($self, $set_member) = @_;
+ my @index_elements;
+ foreach my $method ($self->index_by) {
+ if (ref($method) eq 'CODE') {
+ push @index_elements, $method->($set_member);
+ }
+ else {
+ eval { push @index_elements, $set_member->$method; };
+ if ($@) {
+ $self->throw(sprintf("Could not use '%s' for indexing a %s object. The original error was:\n",
+ $method, ref($set_member)).$@)
+ }
+ }
+ }
+ return @index_elements;
+}
+
+
+sub _sets_to_arrayrefs {
+ my ($self, @sets) = @_;
+ my @set_arrayrefs;
+ foreach my $set (@sets) {
+ if (ref($set) eq "ARRAY") {
+ push @set_arrayrefs, $set;
+ }
+ elsif(ref($set) and $set->can("Iterator")) {
+ my @set_elements;
+ my $it = $set->Iterator;
+ while (my $set_el = $it->next) { push @set_elements, $set_el }
+ push @set_arrayrefs, \@set_elements;
+ }
+ else {
+ $self->throw("Set must be an aray reference or have an ".
+ "Iterator method. Got ".(ref($set or $set)). "instead.");
+ }
+ }
+ return @set_arrayrefs;
+}
+
+sub _output {
+ my ($self, $hashref) = @_;
+ if ($self->output_type eq "arrayref") {
+ return [values %$hashref];
+ }
+ elsif ($self->output_type eq "array") {
+ return %$hashref;
+ }
+ elsif ($self->output_type eq "matrix_set") {
+ my $setobj = TFBS::MatrixSet->new;
+ $setobj->add_Matrix(values %$hashref);
+ return $setobj;
+ }
+ elsif ($self->output_type eq "site_set") {
+ my $setobj = TFBS::SiteSet->new;
+ $setobj->add_site(values %$hashref);
+ return $setobj;
+ }
+ else {
+ $self->throw($self->output_type." is not a supported output type");
+ }
+
+}
+1;
diff --git a/blib/lib/TFBS/Word.pm b/blib/lib/TFBS/Word.pm
new file mode 100644
index 0000000..8f337c2
--- /dev/null
+++ b/blib/lib/TFBS/Word.pm
@@ -0,0 +1,132 @@
+# TFBS module for TFBS::Word
+#
+# Copyright Boris Lenhard
+#
+# You may distribute this module under the same terms as perl itself
+#
+
+# POD
+
+=head1 NAME
+
+TFBS::Word - base class for word-based patterns
+
+=head1 DESCRIPTION
+
+TFBS::Word is a base class consisting of universal constructor called by
+its subclasses (TFBS::Matrix::*), and word pattern manipulation methods that
+are independent of the word type. It is not meant to be instantiated itself.
+
+=head1 FEEDBACK
+
+Please send bug reports and other comments to the author.
+
+=head1 AUTHOR - Boris Lenhard
+
+Boris Lenhard E<lt>Boris.Lenhard at cgb.ki.seE<gt>
+
+=head1 APPENDIX
+
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+
+=cut
+
+
+
+# The code begins HERE:
+
+package TFBS::Word;
+use vars '@ISA';
+
+use TFBS::PatternI;
+
+use strict;
+
+ at ISA = qw(TFBS::PatternI);
+
+=head2 new
+
+=cut
+
+sub new {
+ my ($caller, @args) = @_;
+ my $self = $caller->SUPER::new(@args);
+ my ($id, $name, $class, $word, $tagref) = $self->_rearrange([qw(ID NAME CLASS
+ WORD TAGS)], @args);
+
+ if (defined $word) { $self->word($word); }
+ else { $self->throw("Need a -word argument"); }
+ $self->name($name);
+ $self->ID($id);
+ $self->{'tags'} = ($tagref or {});
+
+ return $self;
+
+}
+
+
+=head2 word
+
+=cut
+
+sub word {
+ my ($self, @args) = @_;
+ if(scalar(@args) == 0) {
+ return $self->{'word'};
+ }
+ my ($word) = @args;
+
+ if (defined $word and ! $self->validate_word($word)) {
+ $self->throw("Trying to set the word to an invalid value: $word");
+
+ }
+ else {
+ return $self->{'word'} = $word;
+ }
+}
+
+
+
+=head2 validate_word
+
+Required in all subclasses
+
+=cut
+
+
+sub validate_word {
+ shift->throw("Error: method 'validate_word' not implemented");
+}
+
+=head2 length
+
+=cut
+
+sub length {
+ # wird length does not have to be defined, but its subroutine does
+ shift->throw("Error: method 'length' not implemented");
+
+}
+
+
+=head2 search_seq
+
+=cut
+
+sub search_seq {
+ shift->throw("Error: method search_seq not implemented");
+
+}
+
+
+=head2 search_aln
+
+=cut
+
+sub search_aln {
+ shift->throw("Error: method search_aln not implemented");
+}
+
+
+1;
\ No newline at end of file
diff --git a/blib/lib/TFBS/Word/Consensus.pm b/blib/lib/TFBS/Word/Consensus.pm
new file mode 100644
index 0000000..5fde76e
--- /dev/null
+++ b/blib/lib/TFBS/Word/Consensus.pm
@@ -0,0 +1,263 @@
+# TFBS module for TFBS::Word::Consensus
+#
+# Copyright Boris Lenhard
+#
+# You may distribute this module under the same terms as perl itself
+#
+
+# POD
+
+=head1 NAME
+
+TFBS::Word - IUPAC DNA consensus word-based pattern class
+=head1 DESCRIPTION
+
+TFBS::Word is a base class consisting of universal constructor called by
+its subclasses (TFBS::Matrix::*), and word pattern manipulation methods that
+are independent of the word type. It is not meant to be instantiated itself.
+
+=head1 FEEDBACK
+
+Please send bug reports and other comments to the author.
+
+=head1 AUTHOR - Boris Lenhard
+
+Boris Lenhard E<lt>Boris.Lenhard at cgb.ki.seE<gt>
+
+=head1 APPENDIX
+
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+
+=cut
+
+package TFBS::Word::Consensus;
+
+use vars '@ISA';
+
+use TFBS::Word;
+use TFBS::Matrix::PWM;
+
+use strict;
+
+ at ISA = qw(TFBS::Word);
+
+
+=head2 new
+
+ Title : new
+ Usage : my $pwm = TFBS::Matrix::PWM->new(%args)
+ Function: constructor for the TFBS::Matrix::PWM object
+ Returns : a new TFBS::Matrix::PWM object
+ Args : # 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
+
+=cut
+
+# "new" is inherited from TFBS::Word
+
+=head2 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::SiteSet object
+ 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
+
+=cut
+
+
+sub search_seq {
+ my ($self, @args) = @_;
+ my ($max_mismatch) = $self->_rearrange([qw(MAX_MISMATCHES)], @args) or 0;
+ $max_mismatch = 0 unless defined $max_mismatch;
+ my $pwm = $self->to_PWM;
+ my $siteset = $pwm->search_seq(@args,
+ -threshold => $self->length - $max_mismatch);
+ $self->_replace_patterns_in_siteset($siteset);
+ return $siteset;
+}
+
+
+=head2 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: 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::SitePairSet object
+ 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%"
+
+=cut
+
+
+
+
+sub search_aln {
+ my ($self, @args) = @_;
+ my ($max_mismatch) = $self->_rearrange([qw(MAX_MISMATCHES)], @args) or 0;
+ $max_mismatch = 0 unless defined $max_mismatch;
+ my $pwm = $self->to_PWM;
+ my $sitepairset = $pwm->search_aln(@args,
+ -threshold => $self->length - $max_mismatch);
+ $self->_replace_patterns_in_sitepairset($sitepairset);
+ return $sitepairset;
+
+}
+
+=head2 to_PWM
+
+=cut
+
+sub to_PWM {
+ my ($self, @args) = @_;
+ my $pwm = TFBS::Matrix::PWM->new(-ID => $self->ID,
+ -name => $self->name,
+ -class => $self->class,
+ -matrix => _consensus2matrixref($self->word),
+ -tags => {$self->all_tags}
+ );
+ return $pwm;
+}
+
+=head2 validate_word
+
+=cut
+
+
+sub validate_word {
+ my ($self, $word) = @_;
+ $word =~ s/[ACGTSWKMRYBDHVN]//gi;
+ return ($word eq "");
+}
+
+=head2 length
+
+=cut
+
+
+sub length {
+ return length $_[0]->word;
+}
+
+
+
+# private methods
+
+
+sub _replace_patterns_in_siteset {
+ my ($self, $siteset) = @_;
+ my $iter = $siteset->Iterator;
+ while (my $site = $iter->next) {
+ $site->pattern($self);
+ }
+}
+
+
+
+sub _replace_patterns_in_sitepairset {
+ my ($self, $sitepairset) = @_;
+ my $iter = $sitepairset->Iterator;
+ while (my $sitepair = $iter->next) {
+ $sitepair->feature1->pattern($self);
+ $sitepair->feature2->pattern($self);
+ }
+
+}
+
+# utility functions
+
+sub _consensus2matrixref {
+ my ($word) = @_;
+ my %iupac = ( T => [0,0,0,1],
+ G => [0,0,1,0],
+ K => [0,0,1,1],
+ C => [0,1,0,0],
+ Y => [0,1,0,1],
+ S => [0,1,1,0],
+ B => [0,1,1,1],
+ A => [1,0,0,0],
+ W => [1,0,0,1],
+ R => [1,0,1,0],
+ D => [1,0,1,1],
+ M => [1,1,0,0],
+ H => [1,1,0,1],
+ V => [1,1,1,0],
+ N => [1,1,1,1]
+ );
+ my @vert_array;
+ foreach my $letter (split '', $word) {
+ push @vert_array,
+ ($iupac{uc($letter)}
+ or croak ("$letter is not a legal IUPAC DNA character"));
+ }
+ return _transpose_arrayref(\@vert_array);
+
+}
+
+
+
+sub _transpose_arrayref {
+ my $vert_arrayref = shift;
+ my $maxcol = scalar(@$vert_arrayref) - 1;
+ my @horiz_array;
+ foreach my $row (0..3) {
+ push @horiz_array, [ map { $vert_arrayref->[$_][$row] } 0..$maxcol ];
+
+ }
+ return \@horiz_array;
+}
+
+
+
+1;
diff --git a/blib/lib/TFBS/_Iterator.pm b/blib/lib/TFBS/_Iterator.pm
new file mode 100644
index 0000000..c604b1d
--- /dev/null
+++ b/blib/lib/TFBS/_Iterator.pm
@@ -0,0 +1,71 @@
+package TFBS::_Iterator;
+
+use vars '@ISA';
+use strict;
+use Carp;
+ at ISA = qw(Bio::Root::Root);
+
+#############################################################
+# PUBLIC METHODS
+#############################################################
+
+sub new {
+ my ($caller, $arrayref, $sort_by, $reverse) = @_;
+ my $class = ref $caller || $caller;
+ my $self;
+ if ($arrayref) {
+ $self = bless { _orig_array_ref => [ @$arrayref ],
+ _iterator_array_ref => [ @$arrayref ],
+ _sort_by => ($sort_by || undef),
+ _reverse => ($reverse || 0)
+ },
+ $class;
+ }
+ else {
+ croak("No valid array ref for Iterator of ".
+ (ref($class) || $class)." provided:");
+ }
+
+ $self->_sort() if $sort_by;
+ $self->_reverse() if $reverse;
+
+ return $self;
+}
+
+
+
+sub current {
+
+}
+
+sub reset {
+ my ($self) = @_;
+ @{$self->{_iterator_array_ref}} = @{$self->{_orig_array_ref}};
+ $self->_sort() if $self->{'_sort_by'};
+ $self->_reverse() if $self->{'reverse'};
+ return $self;
+}
+
+sub next {
+ my $self = shift;
+ return shift @{$self->{_iterator_array_ref}};
+}
+#################################################################
+# PRIVATE METHODS
+#################################################################
+
+sub _sort {
+ my ($self, $sort_by) = @_;
+ $self->throw("Generic iterator cannot sort ".ref($self).
+ " object by '$sort_by'.");
+}
+
+sub _reverse {
+ my $self = shift;
+ $self->{'_iterator_array_ref'} =
+ [ reverse @{ $self->{'_iterator_array_ref'} } ];
+}
+
+
+
+
diff --git a/TFBS/_Iterator/_MatrixSetIterator.pm b/blib/lib/TFBS/_Iterator/_MatrixSetIterator.pm
old mode 100755
new mode 100644
similarity index 100%
copy from TFBS/_Iterator/_MatrixSetIterator.pm
copy to blib/lib/TFBS/_Iterator/_MatrixSetIterator.pm
diff --git a/TFBS/_Iterator/_SiteSetIterator.pm b/blib/lib/TFBS/_Iterator/_SiteSetIterator.pm
old mode 100755
new mode 100644
similarity index 100%
copy from TFBS/_Iterator/_SiteSetIterator.pm
copy to blib/lib/TFBS/_Iterator/_SiteSetIterator.pm
diff --git a/blib/lib/auto/TFBS/.exists b/blib/lib/auto/TFBS/.exists
new file mode 100644
index 0000000..e69de29
diff --git a/blib/lib/auto/TFBS/Ext/pwmsearch/.exists b/blib/lib/auto/TFBS/Ext/pwmsearch/.exists
new file mode 100644
index 0000000..e69de29
diff --git a/blib/lib/pwm_search.h b/blib/lib/pwm_search.h
new file mode 100644
index 0000000..0c6b662
--- /dev/null
+++ b/blib/lib/pwm_search.h
@@ -0,0 +1,129 @@
+/*---------------------------------------------------------------
+ * INCLUDES
+ *---------------------------------------------------------------*/
+#include <stdio.h>
+#include <math.h>
+
+/*---------------------------------------------------------------
+ * DECLARATIONS
+ *---------------------------------------------------------------*/
+/*
+extern double atof();
+extern double log2();
+extern double sqrt();
+extern FILE *fopen();
+*/
+void err_log(), err_show();
+
+/*---------------------------------------------------------------
+ * DEFINES
+ *---------------------------------------------------------------*/
+#define __DEBUG__ 0 /* put debug messages on */
+#define FNAMELEN 1000 /* max allowed length of file name */
+#define MAX_LINE 200
+#define MAXCOUNTS 1000 /* max number of counts in count matrix */
+#define MAXERR 100 /* max number of errors that err_log can handle */
+#define MAXHITS 1000
+#define SEQLEN 1000000 /* max sequence length allowed */
+#define SEQNAMELEN MAX_LINE /* max allowed sequence name length */
+
+/*---------------------------------------------------------------
+ * GLOBALS
+ *---------------------------------------------------------------*/
+static char PANIC[] = "err_log function failure";
+
+static char *__ERR__[MAXERR];
+
+static int NUM_ERRS=0;
+
+static char SQCOMP[] = /* calculate base on complementary strand */
+ { /* ASCII chars; IUPAC conventions */
+ /* Control characters unchanged */
+ '\000','\001','\002','\003','\004','\005','\006','\007',
+ '\010','\011','\012','\013','\014','\015','\016','\017',
+ '\020','\021','\022','\023','\024','\025','\026','\027',
+ '\030','\031','\032','\033','\034','\035','\036','\037',
+ /* Punctuation and digits unchanged */
+ '\040','\041','\042','\043','\044','\045','\046','\047',
+ '\050','\051','\052','\053','\054','\055','\056','\057',
+ '\060','\061','\062','\063','\064','\065','\066','\067',
+ '\070','\071','\072','\073','\074','\075','\076','\077',
+ /* Capitals go to capitals */
+ '\100', 'T', 'V', 'G', 'H', '?', '?', 'C', /* @,A-G */
+ 'D', '?', '?', 'M', '?', 'K', 'N', '?', /* H-O */
+ '?', '?', 'Y', 'S', 'A', '?', 'B', 'W', /* P-W */
+ '?', 'R', '?','\133','\134','\135','\136','\137', /* X-Z,etc */
+ /* Lower case goes to lower case */
+ '\140', 't', 'v', 'g', 'h', '?', '?', 'c',
+ 'd', '?', '?', 'm', '?', 'k', 'n', '?',
+ '?', '?', 'y', 's', 'a', '?', 'b', 'w',
+ '?', 'r', '?','\173','\174','\175','\176','\177'
+ };
+
+static int TRANS[] = /* translate characters to numbers */
+ { /* A=0; C=1; G=2; T=3; other = 4 */
+ /* Control characters */
+ 4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4,
+ /* Punctuation and digits */
+ 4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4,
+ /* Capitals */
+ 4,0,4,1,4,4,4,2, /* @,A-G */
+ 4,4,4,4,4,4,4,4, /* H-O */
+ 4,4,4,4,3,3,4,4, /* P-W */
+ 4,4,4,4,4,4,4,4, /* X-Z,etc */
+ /* Lower case */
+ 4,0,4,1,4,4,4,2, /* @,A-G */
+ 4,4,4,4,4,4,4,4, /* H-O */
+ 4,4,4,4,3,3,4,4, /* P-W */
+ 4,4,4,4,4,4,4,4 /* X-Z,etc */
+ };
+
+
+/*---------------------------------------------------------------
+ * STRUCTURE DEFINITIONS
+ *---------------------------------------------------------------*/
+/* ARGUMENTS -- Structure to contain shared arguments */
+struct arguments
+{
+ char counts_file[FNAMELEN+1]; /* file name, count matrix */
+ char mask_file[FNAMELEN+1]; /* file name, masked seq output,
+ "" means none. */
+ char seq_file[FNAMELEN+1]; /* file name, sequences */
+ char name[FNAMELEN+1]; /* TF name */
+ char class[FNAMELEN+1]; /* TF structural class */
+ int print_all; /* print scores of all hits */
+ long best_base; /* base for best score on sequence */
+ int best_only; /* only show best score on each
+ sequence */
+ double best_score; /* best score on this sequence */
+ int best_strand; /* strand for best score on sequence */
+ double max_score; /* max score possible (implied
+ from pwm) */
+ double min_score; /* min score possible (implied
+ from pwm) */
+ double threshold; /* print stuff with log score >
+ max_possible - threshold */
+ int width; /* pattern width (implied from
+ number of counts) */
+};
+
+/* HIT - location and score of a site scoring above threshold */
+struct HIT
+{
+ long base; /* location */
+ int strand; /* 0 forward, 1 complement */
+ double score; /* score */
+};
+
+
+
+
+
+
+
diff --git a/blib/lib/pwm_searchPFF.c b/blib/lib/pwm_searchPFF.c
new file mode 100644
index 0000000..fff55f5
--- /dev/null
+++ b/blib/lib/pwm_searchPFF.c
@@ -0,0 +1,785 @@
+/*--------------------------------------------------------------------
+ * BUGS or limitations
+ * mask option not yet implemented.
+ *
+ * Extensions/revisions worth considering
+ * pwm_calc that calculates pwm scores for every position; pipe to
+ * selection programs that pull what I want.
+ *------------------------------------------------------------------*/
+/*--------------------------------------------------------------------
+ * This version is a quick and dirty modification of Wyeth Wasserman's
+ * standalone pwm_searchPFF program.
+ *
+ * Boris Lenhard, August 2001
+ *
+ * Read pwm matrix
+ * Figure maximum and minimum possible scores
+ * Read sequences (fasta format) one at a time, and for each:
+ * Window through the sequence and complement
+ *
+ * Find all occurrences of pattern with
+ * matrix score > threshold
+ *
+ * If -a flag is set just print all the values, otherwise:
+ *
+ * If -b flag is not set,
+ * For each find, show seq name, location, find, score
+ * otherwise
+ * just show the best hit for this sequence
+ * If "-m" option is set, write out all input sequences to
+ * filename given, with finds replaced by 'n's.
+ *
+ * Exit: 0 for success, -1 otherwise.
+ *------------------------------------------------------------------*/
+#include "pwm_search.h"
+
+int do_search(char* matrixfile,
+ char* seqfile,
+ float threshold,
+ char* tfname,
+ char* tfclass,
+ char* outfile)
+ /*was: main
+ int argc;
+ char **argv;*/
+{
+ double pwm[2*MAXCOUNTS]; /* for pwm matrix */
+ /* do own indexing; 5*pos + nt */
+ int exitval = -1; /* exit value from main */
+ struct arguments args; /* command line args */
+ FILE *fp; /* for sequence input file */
+ FILE *outfp;
+ NUM_ERRS = 0;
+ if (__DEBUG__) fprintf(stderr, "%s %s %f %s %s %s\n", matrixfile, seqfile, threshold, tfname, tfclass, outfile);
+ if ( __DEBUG__ )
+ announce("+++\nEntering main.\n+++\n");
+
+ /* Parse command line arguments */
+ /*if ( get_cmd_args(argc,argv,&args) )
+ {
+ err_log(
+ "Usage: pwm_searchPFF pwm_file seq_file threshold [-a][-b]|[-m mask_file] [-n TFname] [-c TFclass]\n"
+ );
+ }*/
+
+ strcpy(args.counts_file, matrixfile);
+ strcpy(args.seq_file, seqfile);
+ args.threshold = threshold;
+ strcpy(args.name, tfname);
+ strcpy(args.class, tfclass);
+ args.print_all = 0;
+ args.best_only= 0;
+ /* Read in the pwm; calculate max/min score */
+ //else
+ if ( get_matrix(&args,pwm) )
+ {
+ err_log("MAIN: get_matrix failed.");
+ }
+
+ /* Open the sequence file */
+ else if ( (fp=fopen(args.seq_file,"r")) == NULL )
+ {
+ err_log("MAIN: open_seq_file failed.");
+ }
+ else if ( (outfp=fopen(outfile,"w")) == NULL )
+ {
+ err_log("MAIN: open_outfile failed.");
+ }
+
+ /* Loop on sequences */
+ else if ( loop_on_seqs(&args,pwm,fp,outfp) )
+ {
+ err_log("MAIN: loop_on_seqs failed.");
+ }
+
+ /* Normal completion */
+ else
+ {
+ exitval = 0;
+ }
+
+ /* Clean up and close out */
+ err_show();
+ fclose(fp);
+ fclose(outfp);
+ if ( __DEBUG__ )
+ announce("+++\nLeaving main.\n+++\n");
+
+ return(exitval);
+}
+
+/*--------------------------------------------------------------------
+ * Announce
+ *
+ * Print a debugging message
+ *
+ * Returns 0
+ *------------------------------------------------------------------*/
+int
+announce(msg)
+char *msg;
+{
+ int retval = 0;
+
+ fprintf(stderr,msg);
+
+ return(retval);
+}
+
+/*--------------------------------------------------------------------
+ * BEST_SAVE - Save the best score so far
+ *
+ * Called by do_seq
+ *
+ * Returns: 0
+ *------------------------------------------------------------------*/
+int best_save(struct arguments* pargs, long base, int strand, double score)
+ //struct arguments *pargs; /* args from command line */
+ //long base; /* base where score occurs */
+ //int strand; /* strand where score occurs */
+ //double score; /* score of hit to save */
+{
+ if ( pargs->best_base < 0 || score > pargs->best_score )
+ {
+ pargs->best_base = base;
+ pargs->best_score = score;
+ pargs->best_strand = strand;
+ }
+
+ return(0);
+}
+
+/*--------------------------------------------------------------------
+ * BEST_PULL - Copy back the best score saved
+ *
+ * Called by do_seq
+ *
+ * Returns: 0
+ *------------------------------------------------------------------*/
+best_pull(pargs,pbase,pstrand,pscore)
+struct arguments *pargs; /* args from command line */
+long *pbase; /* base where score occurs */
+int *pstrand; /* strand where score occurs */
+double *pscore; /* score of hit to pull back */
+{
+ *pbase = pargs->best_base;
+ if ( pargs->best_base >= 0 )
+ {
+ *pscore = pargs->best_score;
+ *pstrand = pargs->best_strand;
+ }
+ return(0);
+}
+
+/*--------------------------------------------------------------------
+ * DO_SEQ - Search through the given sequence with the given matrix
+ *
+ * Called by loop_on_seqs
+ *
+ * Returns: 0 for success, -1 for failure.
+ *------------------------------------------------------------------*/
+int
+do_seq(pargs,pwm,seqid,seq,outfp)
+struct arguments *pargs; /* args from command line */
+double *pwm; /* pwm from get_matrix */
+char *seqid; /* id of sequence to work on */
+char *seq; /* the sequence to work on */
+FILE *outfp;
+{
+ double backward_score;
+ double forward_score;
+ double score;
+ long base;
+ int done = 0;
+ int nt;
+ int pos;
+ int retval = 0;
+ int strand;
+ long l;
+ long nhit=0L;
+ struct HIT hits[MAXHITS];
+
+ if ( __DEBUG__ )
+ announce("+++\nEntering do_seq.\n+++\n");
+
+ /* first make sure sequence is long enough */
+ for ( base=0; base < pargs->width; ++base )
+ {
+ if ( seq[base] == '\0' )
+ done = 1;
+ }
+
+ /* loop on windows */
+ pargs->best_base = -1;
+ for ( base=0; !retval && !done && seq[base+pargs->width-1]; ++base )
+ {
+ forward_score = 0.0;
+ backward_score = 0.0;
+ for ( pos=0; pos<pargs->width; ++pos )
+ {
+ nt = TRANS[seq[base+pos]];
+ forward_score += pwm[5*pos + nt];
+ nt = ( nt==4 ) ? 4 : 3-nt;
+ backward_score += pwm[5*(pargs->width - pos -1) + nt];
+ }
+ if ( forward_score > pargs->threshold )
+ {
+ if ( pargs->print_all )
+ {
+ if ( save_hit(base,0,forward_score,hits,&nhit) )
+ {
+ err_log("DO_SEQ: save_hit failed");
+ retval = -1;
+ }
+ }
+ else if ( pargs->best_only )
+ {
+ best_save(pargs,base,0,forward_score);
+ }
+ else if ( output(pargs,seqid,base,seq,0,forward_score,outfp) )
+ {
+ err_log("DO_SEQ: output failed");
+ retval = -1;
+ }
+ }
+ if ( backward_score > pargs->threshold )
+ {
+ if ( pargs->print_all )
+ {
+ if ( save_hit(base,1,backward_score,hits,&nhit) )
+ {
+ err_log("DO_SEQ: save_hit failed");
+ retval = -1;
+ }
+ }
+ else if ( pargs->best_only )
+ {
+ best_save(pargs,base,1,backward_score);
+ }
+ else if ( output(pargs,seqid,base,seq,1,backward_score, outfp) )
+ {
+ err_log("DO_SEQ: output failed");
+ retval = -1;
+ }
+ }
+
+ }
+
+ if ( pargs->print_all )
+ {
+ for ( l=0; l<nhit; ++l )
+ printf("%ld %.3f\n",1+hits[l].base,hits[l].score);
+/*
+ printf("# forward strand hits\n\n");
+ for ( l=0; l<nhit; ++l )
+ {
+ if ( hits[l].strand == 0 )
+ printf("%ld %.3f\n",1+hits[l].base,hits[l].score);
+ }
+ printf("\n# comp strand hits\n\n");
+ for ( l=0; l<nhit; ++l )
+ {
+ if ( hits[l].strand == 1 )
+ printf("%ld %.3f\n",1+hits[l].base,hits[l].score);
+ }
+*/
+ }
+
+ else
+ {
+ best_pull(pargs,&base,&strand,&score);
+ if ( base>=0 )
+ {
+ if ( output(pargs,seqid,base,seq,strand,score,outfp) )
+ {
+ err_log("DO_SEQ: output failed");
+ retval = -1;
+ }
+ }
+ }
+
+ if ( __DEBUG__ )
+ announce("+++\nLeaving do_seq.\n+++\n");
+
+ return(retval);
+
+}
+
+/***********************************************************************
+ * ERR_LOG and ERR_SHOW
+ *
+ * A pair of functions for saving up and then printing error messages.
+ * err_log stores away an error message each time it is called. When
+ * err_show is called it prints all the messages saved up so far.
+ *
+ * Neither function returns a value
+ **********************************************************************/
+void
+err_log(msg)
+char *msg;
+{
+ if ( __DEBUG__ )
+ announce("+++\nEntering err_log\n+++\n");
+
+ NUM_ERRS++;
+ if ( (__ERR__[NUM_ERRS-1] = (char *) malloc( 1+strlen(msg) ) ) == NULL )
+ __ERR__[NUM_ERRS - 1] = PANIC;
+ else
+ strcpy( __ERR__[NUM_ERRS - 1],msg );
+
+ if ( __DEBUG__ )
+ announce("+++\nLeaving err_log\n+++\n");
+ return;
+}
+
+void
+err_show()
+{
+ int err_num;
+ for ( err_num=0; err_num<NUM_ERRS; ++err_num )
+ fprintf(stderr,"%s\n",__ERR__[err_num]);
+ return;
+}
+
+/*--------------------------------------------------------------------
+ * GET_CMD_ARGS - Parse execute line, fill arg structure.
+ *
+ * Called by main.
+ *
+ * Returns: 0 for success, -1 for failure.
+ *------------------------------------------------------------------*/
+int get_cmd_args(argc,argv,pargs)
+int argc; /* argc as passed to main */
+char **argv; /* argv as passed to main */
+struct arguments *pargs; /* args from command line */
+{
+ int retval = 0;
+ int arg_count = 4;
+
+ if ( __DEBUG__ )
+ announce("+++\nEntering get_cmd_args\n+++\n");
+
+ /* See if we got at least three arguments */
+ if ( argc < 4 )
+ { retval = -1;
+ err_log("GET_CMD_ARGS: Too few arguments.");
+ }
+
+ /* Get the arguments */
+ else
+ { strcpy(pargs->counts_file,argv[1]);
+ strcpy(pargs->seq_file,argv[2]);
+ pargs->threshold = atof(argv[3]);
+ pargs->best_only = 0;
+ pargs->print_all = 0;
+ pargs->mask_file[0] = '\0';
+ while (arg_count < argc)
+ {
+ if ( argv[arg_count][0]=='-' && argv[arg_count][1]=='b' )
+ {
+ pargs->best_only = 1;
+ arg_count++;
+ }
+ else if ( argv[arg_count][0]=='-' && argv[arg_count][1]=='a' )
+ {
+ pargs->print_all = 1;
+ arg_count++;
+ }
+ else if ( arg_count<argc-1 &&
+ argv[arg_count][0]=='-' && argv[arg_count][1]=='m' &&
+ argv[arg_count+1][0]!='\0'
+ )
+ {
+ strcpy(pargs->mask_file,argv[arg_count+1]);
+ arg_count = arg_count+2;
+ }
+ else if ( arg_count<argc-1 &&
+ argv[arg_count][0]=='-' && argv[arg_count][1]=='n' &&
+ argv[arg_count+1][0]!='\0'
+ )
+ {
+ strcpy(pargs->name,argv[arg_count+1]);
+ arg_count = arg_count+2;
+ }
+ else if ( arg_count<argc-1 &&
+ argv[arg_count][0]=='-' && argv[arg_count][1]=='c' &&
+ argv[arg_count+1][0]!='\0'
+ )
+ {
+ strcpy(pargs->class,argv[arg_count+1]);
+ arg_count = arg_count+2;
+ }
+ else
+ {
+ arg_count++;
+ }
+ }
+ }
+ if ( __DEBUG__ )
+ announce("+++\nLeaving get_cmd_args\n+++\n");
+ return( retval );
+}
+
+/*--------------------------------------------------------------------
+ * GET_MATRIX - Read in pwm.
+ *
+ * Called by main.
+ *
+ * Returns: 0 for success, -1 for failure.
+ *------------------------------------------------------------------*/
+int
+get_matrix(struct arguments* pargs, double* pwm)
+ /* struct arguments *pargs; args from command line
+ double *pwm; array for pwm */
+ /* do own indexing; 5*pos + nt */
+{
+ double counts[2*MAXCOUNTS];
+ double max_log;
+ double min_log;
+ double scratch[1+MAXCOUNTS];
+ int done = 0;
+ int nt;
+ int num_counts;
+ int pos;
+ int retval=0;
+ FILE *fp; /* stream for counts file */
+
+ if ( __DEBUG__ )
+ announce("+++\nEntering get_matrix\n+++\n");
+
+ /* Open the file */
+ if ( (fp=fopen(pargs->counts_file,"r")) == NULL )
+ {
+ err_log("GET_MATRIX: could not open specified file.");
+ retval = -1;
+ }
+
+ /* Read in the real numbers without regard to dimension */
+ else
+ {
+ for ( num_counts=0; !done && num_counts<MAXCOUNTS; ++num_counts )
+ {
+ if ( fscanf(fp,"%lf,%*c",scratch+num_counts) == EOF )
+ done = 1;
+ }
+ if ( !done )
+ {
+ err_log("GET_MATRIX: too many counts.");
+ retval = -1;
+ }
+ }
+
+ fclose(fp);
+ if ( !retval )
+ {
+
+ /* Put the weights where they belong, and put avg of ACGT for 'n' */
+ pargs->width = num_counts/4;
+ for ( pos=0; pos<pargs->width; ++pos )
+ {
+ for ( nt=0; nt<4; ++nt )
+ {
+ pwm[5*pos + nt] = scratch[(pargs->width)*nt + pos];
+ }
+
+ pwm[5*pos + 4] =
+ (pwm[5*pos + 0] +
+ pwm[5*pos + 1] +
+ pwm[5*pos + 2] +
+ pwm[5*pos + 3]
+ ) / 4;
+ }
+
+
+ /* Next the extreme scores */
+ pargs->max_score = 0;
+ pargs->min_score = 0;
+ for ( pos=0; pos<pargs->width; ++pos )
+ {
+ max_log = -10.0;
+ min_log = 10.0;
+ for ( nt=0; nt<4; ++nt )
+ {
+ max_log = ( max_log>pwm[5*pos+nt] ) ? max_log : pwm[5*pos+nt];
+ min_log = ( min_log<pwm[5*pos+nt] ) ? min_log : pwm[5*pos+nt];
+ }
+ pargs->max_score += max_log;
+ pargs->min_score += min_log;
+ }
+ }
+
+ if ( __DEBUG__ )
+ announce("+++\nLeaving get_matrix\n+++\n");
+
+ return (retval);
+}
+
+/*--------------------------------------------------------------------
+ * GET_SEQUENCE
+ *
+ * Get the next sequence from the input file (fasta format)
+ *
+ * Called by loop_on_seqs.
+ *
+ * Return 0 normally, -1 on error, 1 if called at EOF.
+ *------------------------------------------------------------------*/
+get_sequence(fp,seq_id,sequence)
+FILE *fp; /* file to read */
+char *seq_id; /* name of sequence */
+char *sequence; /* text of sequence */
+{
+ char msg[2*MAX_LINE];
+ int c;
+ int done=0;
+ int position;
+ int retval = 0;
+ int word = 0;
+ int count = 0;
+ long base = 0L;
+ char line[MAX_LINE]; // was static
+ int at_eof = 0; // was static
+ int first_time=1; // was static
+
+ if ( __DEBUG__ )
+ {
+ announce("+++\nEntering Get_sequence\n+++\n");
+ }
+
+ if ( first_time )
+ {
+ first_time=0;
+ if ( fgets(line,MAX_LINE,fp)==NULL )
+ {
+ at_eof = 1;
+ }
+ }
+ if ( at_eof ) /* this time or last time */
+ {
+ retval = 1;
+ }
+
+ /* At this point, line should always be the first line of an entry */
+ /* Pull out the id */
+ if ( !retval )
+ {
+ strcpy(seq_id,line+1);
+ seq_id[ strlen(seq_id) -1 ] = '\0';
+ while (count < strlen(seq_id) && !word)
+ {
+ if (seq_id[count] == ' ')
+ {
+ word++;
+ seq_id[count]= '\0';
+ }
+ count++;
+ }
+
+ }
+
+ /* Read in the sequence */
+ while ( !retval && !done )
+ {
+ if ( __DEBUG__ )
+ {
+ announce("+++\nReading in...\n+++\n");
+ }
+
+ if ( fgets(line,MAX_LINE,fp) == NULL )
+ {
+ at_eof = 1;
+ done = 1;
+ }
+ else if ( line[0] == '>' )
+ {
+ done = 1;
+ }
+ else
+ {
+ for ( position=0; !retval && line[position]!='\0'; ++position)
+ {
+ c = line[position];
+ if ( !isdigit( c ) && !isspace( c ) )
+ {
+ if ( base >= SEQLEN )
+ {
+ err_log("GET_SEQUENCE: Sequence too long.");
+ retval = -1;
+ }
+ else
+ {
+ sequence[base++] = c;
+ }
+ }
+ }
+ }
+ }
+ sequence[base] = '\0';
+
+ if ( __DEBUG__ )
+ {
+ announce("+++\nLeaving Get_sequence\n+++\n");
+ sprintf(msg,"seq_id=%s\nlength=%ld\n",
+ seq_id, base
+ );
+ announce(msg);
+ }
+
+ return(retval);
+}
+
+/*--------------------------------------------------------------------
+ * LOOP_ON_SEQS - Loop through the sequences of the input file,
+ * doing the search and output.
+ *
+ * Called by main.
+ *
+ * Returns: 0 for success, -1 for failure.
+ *------------------------------------------------------------------*/
+int
+loop_on_seqs(pargs,pwm,fp, outfp)
+struct arguments *pargs; /* args from command line */
+double *pwm; /* pwm, from get_matrix */
+FILE *fp; /* sequence file pointer */
+FILE *outfp; /* output file pointer */
+{
+ char seq[SEQLEN+1];
+ char seqid[SEQNAMELEN+1];
+ int done = 0;
+ int retval=0;
+ if ( __DEBUG__ )
+ announce("+++\nEntering loop_on_seqs\n+++\n");
+
+ /* Main loop */
+ while ( !retval && !done )
+ {
+ done = get_sequence(fp,seqid,seq);
+ if ( done == -1 )
+ {
+ err_log("LOOP_ON_SEQS: get_sequence failed.");
+ retval = -1;
+ }
+ else if ( done == 0 )
+ {
+ if ( do_seq(pargs,pwm,seqid,seq,outfp) )
+ {
+ err_log("LOOP_ON_SEQS: do_seq failed.");
+ retval = -1;
+ }
+ }
+ }
+
+ if ( __DEBUG__ )
+ announce("+++\nLeaving loop_on_seqs\n+++\n");
+
+ return (retval);
+}
+
+/*--------------------------------------------------------------------
+ * MARK - write "width" dashes, to mark strand
+ *
+ * Called by output.
+ *
+ * Returns: 0 for success, -1 for failure.
+ *------------------------------------------------------------------*/
+int
+mark(width)
+int width;
+{
+ int pos;
+
+ for ( pos=0; pos<width; ++pos )
+ putchar('-');
+ putchar('\n');
+}
+
+/*--------------------------------------------------------------------
+ * OUTPUT - Print a find in its context.
+ *
+ * Called by do_seq.
+ *
+ * Returns: 0 for success, -1 for failure.
+ *------------------------------------------------------------------*/
+int
+output(pargs,seqid,base,seq,strand,score, outfp)
+struct arguments *pargs; /* args from command line */
+char *seqid; /* id of sequence in which pattern found */
+long base; /* base of pattern nearest base 0 of top strand */
+char *seq; /* the sequence itself, ascii, top strand */
+int strand; /* find is on (0) top strand or (1) bottom */
+double score; /* score of the find */
+FILE *outfp;
+{
+ int pos;
+ int retval = 0;
+
+ if ( __DEBUG__ )
+ announce("+++\nEntering output\n+++\n");
+
+/* if 1
+# printf("*********************************************\n");
+ printf("%s\tTFBS\t",seqid);
+
+# printf("Score: %6.3f(%6.1f) in range %6.3f(0.0) to %6.3f(100.0)\n",
+# score,
+# 100*(score - pargs->min_score)/(pargs->max_score - pargs->min_score),
+# pargs->min_score,
+# pargs->max_score);
+
+# printf("\n%ld\n",base+1);
+*/
+ fprintf(outfp, "%s\tTFBS\t%s\t%s\t",seqid,pargs->name,pargs->class);
+
+ if (strand)
+ {
+ fprintf(outfp, "-\t"); /* FIXED BY BORIS : 1 is for "-" strand */
+ }
+ else fprintf(outfp, "+\t"); /* FIXED BY BORIS : 0 is for "+" strand */
+
+ fprintf(outfp, "%6.3f\t%6.1f\t", score,
+ 100*(score - pargs->min_score)/(pargs->max_score - pargs->min_score));
+
+ fprintf(outfp, "%ld\t%ld\t",base+1,base+pargs->width);
+
+ for ( pos=0; pos<pargs->width; ++pos )
+ {
+ putc(seq[base+pos], outfp);
+ }
+ putc('\n', outfp);
+
+/* #endif */
+ if ( __DEBUG__ )
+ announce("+++\nLeaving output\n+++\n");
+
+ return( retval );
+}
+
+/*--------------------------------------------------------------------
+ * SAVE_HIT - save location, strand and score of a hit in an array of such
+ *
+ * Called by do_seq.
+ *
+ * Returns: 0 for success, -1 for failure.
+ *------------------------------------------------------------------*/
+int
+save_hit(base,strand,score,hits,pnhit)
+long base;
+int strand;
+double score;
+struct HIT *hits;
+long *pnhit;
+{
+ int retval = 0;
+
+ if ( *pnhit == MAXHITS )
+ {
+ err_log("SAVE_HIT: MAXHITS limit reached.");
+ retval = -1;
+ }
+
+ hits[*pnhit].base = base;
+ hits[*pnhit].strand = strand;
+ hits[*pnhit].score = score;
+ *pnhit = *pnhit + 1;
+
+ return(retval);
+}
diff --git a/blib/man1/.exists b/blib/man1/.exists
new file mode 100644
index 0000000..e69de29
diff --git a/blib/man3/.exists b/blib/man3/.exists
new file mode 100644
index 0000000..e69de29
diff --git a/blib/man3/TFBS::DB::FlatFileDir.3pm b/blib/man3/TFBS::DB::FlatFileDir.3pm
new file mode 100644
index 0000000..fd15fbe
--- /dev/null
+++ b/blib/man3/TFBS::DB::FlatFileDir.3pm
@@ -0,0 +1,299 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::DB::FlatFileDir 3"
+.TH TFBS::DB::FlatFileDir 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::DB::FlatFileDir \- interface to a database of pattern matrices
+stored as a collection of flat files in a dedicated directory
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.IP "\(bu" 4
+creating a database object by connecting to the existing directory
+.Sp
+.Vb 1
+\& my $db = TFBS::DB::FlatFileDir\->connect("/home/boris/MatrixDir");
+.Ve
+.IP "\(bu" 4
+retrieving a TFBS::Matrix::* object from the database
+.Sp
+.Vb 2
+\& # retrieving a PFM by ID
+\& my $pfm = $db\->get_Matrix_by_ID(\*(AqM00079\*(Aq,\*(AqPFM\*(Aq);
+\&
+\& #retrieving a PWM by name
+\& my $pwm = $db\->get_Matrix_by_name(\*(AqNF\-kappaB\*(Aq, \*(AqPWM\*(Aq);
+.Ve
+.IP "\(bu" 4
+retrieving a set of matrices as a TFBS::MatrixSet object according to various criteria
+.Sp
+.Vb 4
+\& # retrieving a set of PWMs from a list of IDs:
+\& my @IDlist = (\*(AqM0019\*(Aq, \*(AqM0045\*(Aq, \*(AqM0073\*(Aq, \*(AqM0101\*(Aq);
+\& my $matrixset = $db\->get_MatrixSet(\-IDs => \e at IDlist,
+\& \-matrixtype => "PWM");
+\&
+\& # retrieving a set of ICMs from a list of names:
+\& my @namelist = (\*(Aqp50\*(Aq, \*(Aqp53\*(Aq, \*(AqHNF\-1\*(Aq. \*(AqGATA\-1\*(Aq, \*(AqGATA\-2\*(Aq, \*(AqGATA\-3\*(Aq);
+\& my $matrixset = $db\->get_MatrixSet(\-names => \e at namelist,
+\& \-matrixtype => "ICM");
+\&
+\& # retrieving a set of all PFMs in the database
+\& my $matrixset = $db\->get_MatrixSet(\-matrixtype => "PFM");
+.Ve
+.IP "\(bu" 4
+creating a new FlatFileDir database in a new directory:
+.Sp
+.Vb 1
+\& my $db = TFBS::DB::JASPAR2\->create("/home/boris/NewMatrixDir");
+.Ve
+.IP "\(bu" 4
+storing a matrix in the database:
+.Sp
+.Vb 2
+\& #let $pfm is a TFBS::Matrix::PFM object
+\& $db\->store_Matrix($pfm);
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+TFBS::DB::FlatFileDir is a read/write database interface module that
+retrieves and stores TFBS::Matrix::* and TFBS::MatrixSet
+objects in a set of flat files in a dedicated directory. It has a
+very simple structure and can be easily set up manually if desired.
+.SH "FEEDBACK"
+.IX Header "FEEDBACK"
+Please send bug reports and other comments to the author.
+.SH "AUTHOR \- Boris Lenhard"
+.IX Header "AUTHOR - Boris Lenhard"
+Boris Lenhard <Boris.Lenhard at cgb.ki.se>
+.SH "APPENDIX"
+.IX Header "APPENDIX"
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+.SS "new"
+.IX Subsection "new"
+.Vb 8
+\& Title : new
+\& Usage : my $db = TFBS::DB::FlatFileDir\->new(%args);
+\& Function: the formal constructor for the TFBS::DB::FlatFileDir object;
+\& most users will not use it \- they will use specialized
+\& I<connect> or I<create> constructors to create a
+\& database object
+\& Returns : a TFBS::DB::FlatFileDir object
+\& Args : \-dir # the directory containing flat files
+.Ve
+.SS "connect"
+.IX Subsection "connect"
+.Vb 8
+\& Title : connect
+\& Usage : my $db = TFBS::DB::FlatFileDir\->connect($directory);
+\& Function: Creates a database object that retrieves TFBS::Matrix::*
+\& object data from or stores it in an existing directory
+\& Returns : a TFBS::DB::FlatFileDir object
+\& Args : ($directory)
+\& The name of the directory (possibly with fully qualified
+\& path).
+.Ve
+.SS "create"
+.IX Subsection "create"
+.Vb 9
+\& Title : create
+\& Usage : my $newdb = TFBS::DB::FlatFileDir\->create($new_directory);
+\& Function: connects to the database server, creates a new directory,
+\& sets up a FlatFileDir database and returns a database
+\& object that interfaces the database
+\& Returns : a TFBS::DB::FlatFileDir object
+\& Args : ($new_directory)
+\& The name of the directory to create
+\& (possibly with fully qualified path).
+.Ve
+.SS "get_Matrix_by_ID"
+.IX Subsection "get_Matrix_by_ID"
+.Vb 10
+\& Title : get_Matrix_by_ID
+\& Usage : my $pfm = $db\->get_Matrix_by_ID(\*(AqM00034\*(Aq, \*(AqPFM\*(Aq);
+\& Function: fetches matrix data under the given 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 \*(AqPFM\*(Aq, \*(AqICM\*(Aq, and \*(AqPWM\*(Aq); 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: \*(AqPFM\*(Aq (raw position frequency matrix),
+\& \*(AqICM\*(Aq (information content matrix) or \*(AqPWM\*(Aq (position
+\& weight matrix)
+\& If Matrix_type is omitted, a PWM is retrieved by default.
+.Ve
+.SS "get_Matrix_by_name"
+.IX Subsection "get_Matrix_by_name"
+.Vb 10
+\& Title : get_Matrix_by_name
+\& Usage : my $pfm = $db\->get_Matrix_by_name(\*(AqHNF\-1\*(Aq, \*(AqPWM\*(Aq);
+\& Function: fetches matrix data under the given name 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
+\& \*(AqPFM\*(Aq, \*(AqICM\*(Aq, and \*(AqPWM\*(Aq)
+\& Args : (Matrix_name, Matrix_type)
+\& Matrix_name is a string; Matrix_type is one of the
+\& following:
+\& \*(AqPFM\*(Aq (raw position frequency matrix),
+\& \*(AqICM\*(Aq (information content matrix) or
+\& \*(AqPWM\*(Aq (position weight matrix)
+\& If Matrix_type is omitted, a PWM is retrieved by default.
+\& Warning : According to the current JASPAR2 data model, name is
+\& not necessarily a unique identifier. In the case where
+\& there are several matrices with the same name in the
+\& database, the function fetches the first one and prints
+\& a warning on STDERR. You have been warned.
+.Ve
+.SS "store_Matrix"
+.IX Subsection "store_Matrix"
+.Vb 6
+\& Title : store_Matrix
+\& Usage : $db\->store_Matrix($matrixobj);
+\& Function: Stores the contents of a TFBS::Matrix::DB object in the database
+\& Returns : 0 on success; $@ contents on failure
+\& (this is too C\-like and may change in future versions)
+\& Args : ($matrixobj) # a TFBS::Matrix::* object
+.Ve
+.SS "delete_Matrix_having_ID"
+.IX Subsection "delete_Matrix_having_ID"
+.Vb 9
+\& Title : delete_Matrix_having_ID
+\& Usage : $db\->delete_Matrix_with_ID(\*(AqM00045\*(Aq);
+\& Function: Deletes the matrix having the given ID from the database
+\& Returns : 0 on success; $@ contents on failure
+\& (this is too C\-like and may change in future versions)
+\& Args : (ID)
+\& A string
+\& Comment : Yeah, yeah, \*(Aqdelete_Matrix_having_ID\*(Aq is a stupid name
+\& for a method, but at least it should be obviuos what it does.
+.Ve
diff --git a/blib/man3/TFBS::DB::JASPAR2.3pm b/blib/man3/TFBS::DB::JASPAR2.3pm
new file mode 100644
index 0000000..312c6d6
--- /dev/null
+++ b/blib/man3/TFBS::DB::JASPAR2.3pm
@@ -0,0 +1,476 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::DB::JASPAR2 3"
+.TH TFBS::DB::JASPAR2 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::DB::JASPAR2 \- interface to MySQL relational database of pattern matrices
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.IP "\(bu" 4
+creating a database object by connecting to the existing JASPAR2\-type database
+.Sp
+.Vb 3
+\& my $db = TFBS::DB::JASPAR2\->connect("dbi:mysql:JASPAR2:myhost",
+\& "myusername",
+\& "mypassword");
+.Ve
+.IP "\(bu" 4
+retrieving a TFBS::Matrix::* object from the database
+.Sp
+.Vb 2
+\& # retrieving a PFM by ID
+\& my $pfm = $db\->get_Matrix_by_ID(\*(AqM0079\*(Aq,\*(AqPFM\*(Aq);
+\&
+\& #retrieving a PWM by name
+\& my $pwm = $db\->get_Matrix_by_name(\*(AqNF\-kappaB\*(Aq, \*(AqPWM\*(Aq);
+.Ve
+.IP "\(bu" 4
+retrieving a set of matrices as a TFBS::MatrixSet object according to various criteria
+.Sp
+.Vb 4
+\& # retrieving a set of PWMs from a list of IDs:
+\& my @IDlist = (\*(AqM0019\*(Aq, \*(AqM0045\*(Aq, \*(AqM0073\*(Aq, \*(AqM0101\*(Aq);
+\& my $matrixset = $db\->get_MatrixSet(\-IDs => \e at IDlist,
+\& \-matrixtype => "PWM");
+\&
+\& # retrieving a set of ICMs from a list of names:
+\& my @namelist = (\*(Aqp50\*(Aq, \*(Aqp53\*(Aq, \*(AqHNF\-1\*(Aq. \*(AqGATA\-1\*(Aq, \*(AqGATA\-2\*(Aq, \*(AqGATA\-3\*(Aq);
+\& my $matrixset = $db\->get_MatrixSet(\-names => \e at namelist,
+\& \-matrixtype => "ICM");
+\&
+\& # retrieving a set of all PFMs in the database
+\& # derived from human genes:
+\& my $matrixset = $db\->get_MatrixSet(\-species => [\*(AqHomo sapiens\*(Aq],
+\& \-matrixtype => "PFM");
+.Ve
+.IP "\(bu" 4
+creating a new JASPAR2\-type database named \s-1MYJASPAR2:\s0
+.Sp
+.Vb 3
+\& my $db = TFBS::DB::JASPAR2\->create("dbi:mysql:MYJASPAR2:myhost",
+\& "myusername",
+\& "mypassword");
+.Ve
+.IP "\(bu" 4
+storing a matrix in the database (currently only PFMs):
+.Sp
+.Vb 2
+\& #let $pfm is a TFBS::Matrix::PFM object
+\& $db\->store_Matrix($pfm);
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+\&\s-1TFBS::DB::JASPAR2\s0 is a read/write database interface module that
+retrieves and stores TFBS::Matrix::* and TFBS::MatrixSet
+objects in a relational database.
+.SH "JASPAR2 DATA MODEL"
+.IX Header "JASPAR2 DATA MODEL"
+\&\s-1JASPAR2\s0 is working name for a relational database model used
+for storing transcriptional factor pattern matrices in a MySQL database.
+It was initially designed to store matrices for the \s-1JASPAR\s0 database of
+high quality eukaryotic transcription factor specificity profiles by
+Albin Sandelin and Wyeth W. Wasserman. Besides the profile matrix itself,
+this data model stores profile \s-1ID\s0 (unique), name, structural class,
+basic taxonomic and bibliographic information
+as well as some additional optional tags.
+.PP
+Due to its data model, which precedeed the design of the
+module, \s-1TFBS::DB::JASPAR2\s0 cannot store arbitrary tags for a matrix.
+.PP
+The supported tags are
+ 'acc' # (accession number;
+ # originally for transcription factor protein seq)
+ 'seqdb' # sequence database where 'acc' comes from
+ 'medline' # PubMed \s-1ID\s0
+ 'species' # Species name
+ 'sysgroup'
+ 'total_ic' # total information content \- redundant, present
+ # for historical
+\&\*(L"medline\*(R" => ($self\->_get_medline($ID) or "\*(L"),
+ \*(R"species\*(L" => ($self\->_get_species($ID) or \*(R"\*(L"),
+ \*(R"sysgroup\*(L"=> ($self\->_get_sysgroup($ID) or \*(R"\*(L"),
+ \*(R"type\*(L" => ($self\->_get_type($ID) or \*(R"\*(L"),
+ \*(R"seqdb\*(L" => ($self\->_get_seqdb($ID) or \*(R"\*(L"),
+ \*(R"acc\*(L" => ($self\->_get_acc($ID) or \*(R"\*(L"),
+ \*(R"total_ic"=
+.PP
+\&\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \s-1ADVANCED\s0 \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+.PP
+For the developers and the curious, here is the \s-1JASPAR2\s0 data model:
+.PP
+.Vb 12
+\& CREATE TABLE matrix_data (
+\& ID varchar(16) DEFAULT \*(Aq\*(Aq NOT NULL,
+\& pos_ID varchar(24) DEFAULT \*(Aq\*(Aq NOT NULL,
+\& base enum(\*(AqA\*(Aq,\*(AqC\*(Aq,\*(AqG\*(Aq,\*(AqT\*(Aq),
+\& position tinyint(3) unsigned,
+\& raw int(3) unsigned,
+\& info float(7,5) unsigned, \-\- calculated
+\& pwm float(7,5) unsigned, \-\- calculated
+\& normalized float(7,5) unsigned,
+\& PRIMARY KEY (pos_ID),
+\& KEY id_index (ID)
+\& );
+\&
+\&
+\& CREATE TABLE matrix_info (
+\& ID varchar(16) DEFAULT \*(Aq\*(Aq NOT NULL,
+\& name varchar(15) DEFAULT \*(Aq\*(Aq NOT NULL,
+\& type varchar(8) DEFAULT \*(Aq\*(Aq NOT NULL,
+\& class varchar(20),
+\& phylum varchar (32), \-\- maps to \*(Aqsysgroup\*(Aq tag
+\& litt varchar(40), \-\- not used by this module
+\& medline int(12),
+\& information varchar(20), \-\- not used by this module
+\& iterations varchar(6),
+\& width int(2), \-\- calculated
+\& consensus varchar(25), \-\- calculated
+\& IC float(6,4), \-\- maps to \*(Aqtotal_ic\*(Aq tag
+\& sites int(3) unsigned, \-\- not used by this module
+\& PRIMARY KEY (ID)
+\& )
+\&
+\&
+\& CREATE TABLE matrix_seqs (
+\& ID varchar(16) DEFAULT \*(Aq\*(Aq NOT NULL,
+\& internal varchar(8) DEFAULT \*(Aq\*(Aq NOT NULL,
+\& seq_db varchar(15) NOT NULL,
+\& seq varchar(10) NOT NULL,
+\& PRIMARY KEY (ID, seq_db, seq)
+\& )
+\&
+\&
+\& CREATE TABLE matrix_species (
+\& ID varchar(16) DEFAULT \*(Aq\*(Aq NOT NULL,
+\& internal varchar(8) DEFAULT \*(Aq\*(Aq NOT NULL,
+\& species varchar(24) NOT NULL,
+\& PRIMARY KEY (ID, species)
+\& )
+.Ve
+.PP
+It is our best intention to hide the details of this data model, which we
+are using on a daily basis in our work, from most \s-1TFBS\s0 users, simply
+because for historical reasons some table column names are confusing
+at best. Most users should only know the methods to store the data and
+which tags are supported.
+.PP
+\&\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+.SH "FEEDBACK"
+.IX Header "FEEDBACK"
+Please send bug reports and other comments to the author.
+.SH "AUTHOR \- Boris Lenhard"
+.IX Header "AUTHOR - Boris Lenhard"
+Boris Lenhard <Boris.Lenhard at cgb.ki.se>
+.SH "APPENDIX"
+.IX Header "APPENDIX"
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+.SS "new"
+.IX Subsection "new"
+.Vb 3
+\& Title : new
+\& Usage : DEPRECATED \- for backward compatibility only
+\& Use connect() or create() instead
+.Ve
+.SS "connect"
+.IX Subsection "connect"
+.Vb 10
+\& Title : connect
+\& Usage : my $db =
+\& TFBS::DB::JASPAR2\->connect("dbi:mysql:DATABASENAME:HOSTNAME",
+\& "USERNAME",
+\& "PASSWORD");
+\& Function: connects to the existing JASPAR2\-type database and
+\& returns a database object that interfaces the database
+\& Returns : a TFBS::DB::JASPAR2 object
+\& Args : a standard database connection triplet
+\& ("dbi:mysql:DATABASENAME:HOSTNAME", "USERNAME", "PASSWORD")
+\& In place of DATABASENAME, HOSTNAME, USERNAME and PASSWORD,
+\& use the actual values. PASSWORD and USERNAME might be
+\& optional, depending on the user acces permissions for
+\& the database server.
+.Ve
+.SS "create"
+.IX Subsection "create"
+.Vb 10
+\& Title : create
+\& Usage : my $newdb =
+\& TFBS::DB::JASPAR2\->create("dbi:mysql:NEWDATABASENAME:HOSTNAME",
+\& "USERNAME",
+\& "PASSWORD");
+\& Function: connects to the database server, creates a new JASPAR2\-type database and returns a database
+\& object that interfaces the database
+\& Returns : a TFBS::DB::JASPAR2 object
+\& Args : a standard database connection triplet
+\& ("dbi:mysql:NEWDATABASENAME:HOSTNAME", "USERNAME", "PASSWORD")
+\& In place of NEWDATABASENAME, HOSTNAME, USERNAME and
+\& PASSWORD use the actual values. PASSWORD and USERNAME
+\& might be optional, depending on the users acces permissions
+\& for the database server.
+.Ve
+.SS "dbh"
+.IX Subsection "dbh"
+.Vb 10
+\& Title : dbh
+\& Usage : my $dbh = $db\->dbh();
+\& $dbh\->do("UPDATE matrix_data SET name=\*(AqADD1\*(Aq WHERE NAME=\*(AqSREBP2\*(Aq");
+\& Function: returns the DBI database handle of the MySQL database
+\& interfaced by $db; THIS IS USED FOR WRITING NEW METHODS
+\& FOR DIRECT RELATIONAL DATABASE MANIPULATION \- if you
+\& have write access AND do not know what you are doing,
+\& you can severely corrupt the data
+\& For documentation about database handle methods, see L<DBI>
+\& Returns : the database (DBI) handle of the MySQL JASPAR2\-type
+\& relational database associated with the TFBS::DB::JASPAR2
+\& object
+\& Args : none
+.Ve
+.SS "get_Matrix_by_ID"
+.IX Subsection "get_Matrix_by_ID"
+.Vb 10
+\& Title : get_Matrix_by_ID
+\& Usage : my $pfm = $db\->get_Matrix_by_ID(\*(AqM00034\*(Aq, \*(AqPFM\*(Aq);
+\& Function: fetches matrix data under the given 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 \*(AqPFM\*(Aq, \*(AqICM\*(Aq, and \*(AqPWM\*(Aq); 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: \*(AqPFM\*(Aq (raw position frequency matrix),
+\& \*(AqICM\*(Aq (information content matrix) or \*(AqPWM\*(Aq (position
+\& weight matrix)
+\& If Matrix_type is omitted, a PWM is retrieved by default.
+.Ve
+.SS "get_Matrix_by_name"
+.IX Subsection "get_Matrix_by_name"
+.Vb 10
+\& Title : get_Matrix_by_name
+\& Usage : my $pfm = $db\->get_Matrix_by_name(\*(AqHNF\-1\*(Aq, \*(AqPWM\*(Aq);
+\& Function: fetches matrix data under the given name 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
+\& \*(AqPFM\*(Aq, \*(AqICM\*(Aq, and \*(AqPWM\*(Aq)
+\& Args : (Matrix_name, Matrix_type)
+\& Matrix_name is a string; Matrix_type is one of the
+\& following:
+\& \*(AqPFM\*(Aq (raw position frequency matrix),
+\& \*(AqICM\*(Aq (information content matrix) or
+\& \*(AqPWM\*(Aq (position weight matrix)
+\& If Matrix_type is omitted, a PWM is retrieved by default.
+\& Warning : According to the current JASPAR2 data model, name is
+\& not necessarily a unique identifier. In the case where
+\& there are several matrices with the same name in the
+\& database, the function fetches the first one and prints
+\& a warning on STDERR. You have been warned.
+.Ve
+.SS "get_MatrixSet"
+.IX Subsection "get_MatrixSet"
+.Vb 10
+\& Title : get_MatrixSet
+\& Usage : my $matrixset = $db\->get_MatrixSet(%args);
+\& Function: fetches matrix data under for all matrices in the database
+\& matching criteria defined by the named arguments
+\& and returns a TFBS::MatrixSet object
+\& Returns : a TFBS::MatrixSet object
+\& Args : This method accepts named arguments:
+\& \-IDs # a reference to an array of IDs (strings)
+\& \-names # a reference to an array of
+\& # transcription factor names (string)
+\& \-classes # a reference to an array of
+\& # structural class names (strings)
+\& \-species # a reference to an array of
+\& # Latin species names (strings)
+\& \-sysgroups # a reference to an array of
+\& # higher taxonomic categories (strings)
+\&
+\& \-matrixtype # a string, \*(AqPFM\*(Aq, \*(AqICM\*(Aq or \*(AqPWM\*(Aq
+\& \-min_ic # float, minimum total information content
+\& # of the matrix
+.Ve
+.PP
+The five arguments that expect list references are used in database
+query formulation: elements within lists are combined with '\s-1OR\s0'
+operators, and the lists of different types with '\s-1AND\s0'. For example,
+.PP
+.Vb 3
+\& my $matrixset = $db\->(\-classes => [\*(AqTRP_CLUSTER\*(Aq, \*(AqFORKHEAD\*(Aq],
+\& \-species => [\*(AqHomo sapiens\*(Aq, \*(AqMus musculus\*(Aq],
+\& \-matrixtype => \*(AqPWM\*(Aq);
+.Ve
+.PP
+gives a set of PWMs whose (structural clas is '\s-1TRP_CLUSTER\s0' \s-1OR\s0
+\&'\s-1FORKHEAD\s0') \s-1AND\s0 (the species they are derived from is 'Homo sapiens'
+\&\s-1OR\s0 'Mus musculus').
+.PP
+The \-min_ic filter is applied after the query in the sense that the
+matrices profiles with total information content less than specified
+are not included in the set.
+.SS "store_Matrix"
+.IX Subsection "store_Matrix"
+.Vb 9
+\& Title : store_Matrix
+\& Usage : $db\->store_Matrix($pfm);
+\& Function: Stores the contents of a TFBS::Matrix::DB object in the database
+\& Returns : 0 on success; $@ contents on failure
+\& (this is too C\-like and may change in future versions)
+\& Args : (PFM_object)
+\& A TFBS::Matrix::PFM object
+\& Comment : this is an experimental method that is not 100% bulletproof;
+\& use at your own risk
+.Ve
+.SS "store_MatrixSet"
+.IX Subsection "store_MatrixSet"
+.Vb 9
+\& Title : store_MatrixSet
+\& Usage : $db\->store_Matrix($matrixset);
+\& Function: Stores the TFBS::DB::PFM object that are part of a
+\& TFBS::MatrixSet object into the database
+\& Returns : 0 on success; $@ contents on failure
+\& (this is too C\-like and may change in future versions)
+\& Args : (MatrixSet_object)
+\& A TFBS::MatrixSet object
+\& Comment : THIS METHOD IS NOT YET IMPLEMENTED
+.Ve
+.SS "delete_Matrix_having_ID"
+.IX Subsection "delete_Matrix_having_ID"
+.Vb 9
+\& Title : delete_Matrix_having_ID
+\& Usage : $db\->delete_Matrix_with_ID(\*(AqM00045\*(Aq);
+\& Function: Deletes the matrix having the given ID from the database
+\& Returns : 0 on success; $@ contents on failure
+\& (this is too C\-like and may change in future versions)
+\& Args : (ID)
+\& A string
+\& Comment : Yeah, yeah, \*(Aqdelete_Matrix_having_ID\*(Aq is a stupid name
+\& for a method, but at least it should be obviuos what it does.
+.Ve
diff --git a/blib/man3/TFBS::DB::JASPAR4.3pm b/blib/man3/TFBS::DB::JASPAR4.3pm
new file mode 100644
index 0000000..9310d15
--- /dev/null
+++ b/blib/man3/TFBS::DB::JASPAR4.3pm
@@ -0,0 +1,392 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::DB::JASPAR4 3"
+.TH TFBS::DB::JASPAR4 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::DB::JASPAR4 \- interface to MySQL relational database of pattern matrices
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.IP "\(bu" 4
+creating a database object by connecting to the existing JASPAR2\-type database
+.Sp
+.Vb 3
+\& my $db = TFBS::DB::JASPAR4\->connect("dbi:mysql:JASPAR4:myhost",
+\& "myusername",
+\& "mypassword");
+.Ve
+.IP "\(bu" 4
+retrieving a TFBS::Matrix::* object from the database
+.Sp
+.Vb 2
+\& # retrieving a PFM by ID
+\& my $pfm = $db\->get_Matrix_by_ID(\*(AqM0079\*(Aq,\*(AqPFM\*(Aq);
+\&
+\& #retrieving a PWM by name
+\& my $pwm = $db\->get_Matrix_by_name(\*(AqNF\-kappaB\*(Aq, \*(AqPWM\*(Aq);
+.Ve
+.IP "\(bu" 4
+retrieving a set of matrices as a TFBS::MatrixSet object according to various criteria
+.Sp
+.Vb 4
+\& # retrieving a set of PWMs from a list of IDs:
+\& my @IDlist = (\*(AqM0019\*(Aq, \*(AqM0045\*(Aq, \*(AqM0073\*(Aq, \*(AqM0101\*(Aq);
+\& my $matrixset = $db\->get_MatrixSet(\-IDs => \e at IDlist,
+\& \-matrixtype => "PWM");
+\&
+\& # retrieving a set of ICMs from a list of names:
+\& my @namelist = (\*(Aqp50\*(Aq, \*(Aqp53\*(Aq, \*(AqHNF\-1\*(Aq. \*(AqGATA\-1\*(Aq, \*(AqGATA\-2\*(Aq, \*(AqGATA\-3\*(Aq);
+\& my $matrixset = $db\->get_MatrixSet(\-names => \e at namelist,
+\& \-matrixtype => "ICM");
+\&
+\& # retrieving a set of all PFMs in the database
+\& # derived from human genes:
+\& my $matrixset = $db\->get_MatrixSet(\-species => [\*(AqHomo sapiens\*(Aq],
+\& \-matrixtype => "PFM");
+.Ve
+.IP "\(bu" 4
+creating a new JASPAR4\-type database named \s-1MYJASPAR4:\s0
+.Sp
+.Vb 3
+\& my $db = TFBS::DB::JASPAR4\->create("dbi:mysql:MYJASPAR4:myhost",
+\& "myusername",
+\& "mypassword");
+.Ve
+.IP "\(bu" 4
+storing a matrix in the database (currently only PFMs):
+.Sp
+.Vb 2
+\& #let $pfm is a TFBS::Matrix::PFM object
+\& $db\->store_Matrix($pfm);
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+\&\s-1TFBS::DB::JASPAR4\s0 is a read/write database interface module that
+retrieves and stores TFBS::Matrix::* and TFBS::MatrixSet
+objects in a relational database. The interface is nearly identical
+to the JASPAR2interface, while the underlying data model is different
+.SH "JASPAR2 DATA MODEL"
+.IX Header "JASPAR2 DATA MODEL"
+\&\s-1JASPAR4\s0 is working name for a relational database model used
+for storing transcriptional factor pattern matrices in a MySQL database.
+It was initially designed (\s-1JASPAR2\s0) to store matrices for the \s-1JASPAR\s0 database of
+high quality eukaryotic transcription factor specificity profiles by
+Albin Sandelin and Wyeth W. Wasserman. Besides the profile matrix itself,
+this data model stores profile \s-1ID\s0 (unique), name, structural class,
+basic taxonomic and bibliographic information
+as well as some additional opseqdbtional tags.
+.PP
+Tags that are commonly used in the actual \s-1JASPAR\s0 database include
+ 'medline' # PubMed \s-1ID\s0
+ 'species' # Species name
+ 'superclass' #Species supergroup, eg 'vertebrate', 'plant' etc
+ 'total_ic' # total information content \- redundant, present
+ # for historical
+ 'type' #experimental nethod
+ 'acc' #accession number for \s-1TF\s0 protein sequence
+ 'seqdb' #corresponding database name
+.PP
+but any tag is storable and searchable.
+.PP
+\&\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \s-1ADVANCED\s0 \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+.PP
+For the developers and the curious, here is the \s-1JASPAR4\s0 data model:
+.PP
+It is our best intention to hide the details of this data model, which we
+are using on a daily basis in our work, from most \s-1TFBS\s0 users.
+Most users should only know the methods to store the data and
+which tags are supported.
+.PP
+\&\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+.SH "FEEDBACK"
+.IX Header "FEEDBACK"
+Please send bug reports and other comments to the author.
+.SH "AUTHOR \- Boris Lenhard"
+.IX Header "AUTHOR - Boris Lenhard"
+Boris Lenhard <Boris.Lenhard at cgb.ki.se>
+.SH "APPENDIX"
+.IX Header "APPENDIX"
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+.SS "new"
+.IX Subsection "new"
+.Vb 3
+\& Title : new
+\& Usage : DEPRECATED \- for backward compatibility only
+\& Use connect() or create() instead
+.Ve
+.SS "connect"
+.IX Subsection "connect"
+.Vb 10
+\& Title : connect
+\& Usage : my $db =
+\& TFBS::DB::JASPAR4\->connect("dbi:mysql:DATABASENAME:HOSTNAME",
+\& "USERNAME",
+\& "PASSWORD");
+\& Function: connects to the existing JASPAR4\-type database and
+\& returns a database object that interfaces the database
+\& Returns : a TFBS::DB::JASPAR4 object
+\& Args : a standard database connection triplet
+\& ("dbi:mysql:DATABASENAME:HOSTNAME", "USERNAME", "PASSWORD")
+\& In place of DATABASENAME, HOSTNAME, USERNAME and PASSWORD,
+\& use the actual values. PASSWORD and USERNAME might be
+\& optional, depending on the user\*(Aqs acces permissions for
+\& the database server.
+.Ve
+.SS "dbh"
+.IX Subsection "dbh"
+.Vb 10
+\& Title : dbh
+\& Usage : my $dbh = $db\->dbh();
+\& $dbh\->do("UPDATE matrix_data SET name=\*(AqADD1\*(Aq WHERE NAME=\*(AqSREBP2\*(Aq");
+\& Function: returns the DBI database handle of the MySQL database
+\& interfaced by $db; THIS IS USED FOR WRITING NEW METHODS
+\& FOR DIRECT RELATIONAL DATABASE MANIPULATION \- if you
+\& have write access AND do not know what you are doing,
+\& you can severely corrupt the data
+\& For documentation about database handle methods, see L<DBI>
+\& Returns : the database (DBI) handle of the MySQL JASPAR2\-type
+\& relational database associated with the TFBS::DB::JASPAR2
+\& object
+\& Args : none
+.Ve
+.SS "store_Matrix"
+.IX Subsection "store_Matrix"
+.Vb 11
+\& Title : store_Matrix
+\& Usage : $db\->store_Matrix($matrixobject);
+\& Function: Stores the contents of a TFBS::Matrix::DB object in the database
+\& Returns : 0 on success; $@ contents on failure
+\& (this is too C\-like and may change in future versions)
+\& Args : (PFM_object)
+\& A TFBS::Matrix::PFM, FBS::Matrix::PWM or FBS::Matrix::ICM object.
+\& PFM object are recommended to use, as they are eaily converted to
+\& other formats
+\& Comment : this is an experimental method that is not 100% bulletproof;
+\& use at your own risk
+.Ve
+.SS "get_Matrix_by_ID"
+.IX Subsection "get_Matrix_by_ID"
+.Vb 9
+\& Title : get_Matrix_by_ID
+\& Usage : my $pfm = $db\->get_Matrix_by_ID(\*(AqM00034\*(Aq, \*(AqPFM\*(Aq);
+\& Function: fetches matrix data under the given ID from the
+\& database and returns a TFBS::Matrix::* object
+\& Returns : a TFBS::Matrix::* object; the exact type of the
+\& object depending on what form the matrix is stored
+\& in the database (PFM is default)
+\& Args : (Matrix_ID)
+\& Matrix_ID is a string;
+.Ve
+.SS "get_Matrix_by_name"
+.IX Subsection "get_Matrix_by_name"
+.Vb 8
+\& Title : get_Matrix_by_name
+\& Usage : my $pfm = $db\->get_Matrix_by_name(\*(AqHNF\-1\*(Aq);
+\& Function: fetches matrix data under the given name from the
+\& database and returns a TFBS::Matrix::* object
+\& Returns : a TFBS::Matrix::* object; the exact type of the object
+\& depending on what form the matrix object was stored in
+\& the database (default PFM))
+\& Args : (Matrix_name)
+\&
+\& Warning : According to the current JASPAR4 data model, name is
+\& not necessarily a unique identifier. In the case where
+\& there are several matrices with the same name in the
+\& database, the function fetches the first one and prints
+\& a warning on STDERR. You\*(Aqve been warned.
+.Ve
+.SS "get_MatrixSet"
+.IX Subsection "get_MatrixSet"
+.Vb 10
+\& Title : get_MatrixSet
+\& Usage : my $matrixset = $db\->get_MatrixSet(%args);
+\& Function: fetches matrix data under for all matrices in the database
+\& matching criteria defined by the named arguments
+\& and returns a TFBS::MatrixSet object
+\& Returns : a TFBS::MatrixSet object
+\& Args : This method accepts named arguments, corresponding to arbitrary tags.
+\& Note that this is different from JASPAR2. As any tag is supported for
+\& database storage, any tag can be used for information retrieval.
+\& Additionally, arguments as \*(Aqname\*(Aq and \*(Aqclass\*(Aq can be used (even though
+\& they are not tags.
+\& As with get_Matrix methods, it is important to realize taht any matrix
+\& format can be stored in the database: the TFBS::MatrixSet might therefore
+\& consist of PFMs, ICMs and PWMS, depending on how matrices are stored,
+\&
+\& Examples include
+\& \-ID # a reference to an array of IDs (strings)
+\& \-name # a reference to an array of
+\& # transcription factor names (string)
+\& \-class # a reference to an array of
+\& # structural class names (strings)
+\& \-species # a reference to an array of
+\& # Latin species names (strings)
+\& \-sysgroup # a reference to an array of
+\& # higher taxonomic categories (strings)
+\&
+\&
+\& \-min_ic # float, minimum total information content
+\& # of the matrix. IMPORTANT:if retrieved matrices are in PWM
+\& format there is no way to measureinformation content.
+\& \-matrixtype #string describing type of matrix to retrieve. If left out, the format
+\& will revert to the database format. Note that this option only works
+\& if the database format is pfm
+.Ve
+.PP
+The arguments that expect list references are used in database
+query formulation: elements within lists are combined with '\s-1OR\s0'
+operators, and the lists of different types with '\s-1AND\s0'. For example,
+.PP
+.Vb 3
+\& my $matrixset = $db\->(\-class => [\*(AqTRP_CLUSTER\*(Aq, \*(AqFORKHEAD\*(Aq],
+\& \-species => [\*(AqHomo sapiens\*(Aq, \*(AqMus musculus\*(Aq],
+\& );
+.Ve
+.PP
+gives a set of TFBS::Matrix::PFM objects (given that the matrix models are stored as such)
+ whose (structural clas is '\s-1TRP_CLUSTER\s0' \s-1OR\s0'\s-1FORKHEAD\s0') \s-1AND\s0 (the species they are derived
+ from is 'Homo sapiens'\s-1OR\s0 'Mus musculus').
+.PP
+The \-min_ic filter is applied after the query in the sense that the
+matrices profiles with total infromation content less than specified
+are not included in the set.
+.SS "delete_Matrix_having_ID"
+.IX Subsection "delete_Matrix_having_ID"
+.Vb 9
+\& Title : delete_Matrix_having_ID
+\& Usage : $db\->delete_Matrix_with_ID(\*(AqM00045\*(Aq);
+\& Function: Deletes the matrix having the given ID from the database
+\& Returns : 0 on success; $@ contents on failure
+\& (this is too C\-like and may change in future versions)
+\& Args : (ID)
+\& A string
+\& Comment : Yeah, yeah, \*(Aqdelete_Matrix_having_ID\*(Aq is a stupid name
+\& for a method, but at least it should be obviuos what it does.
+.Ve
diff --git a/blib/man3/TFBS::DB::LocalTRANSFAC.3pm b/blib/man3/TFBS::DB::LocalTRANSFAC.3pm
new file mode 100644
index 0000000..3a2b833
--- /dev/null
+++ b/blib/man3/TFBS::DB::LocalTRANSFAC.3pm
@@ -0,0 +1,221 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::DB::LocalTRANSFAC 3"
+.TH TFBS::DB::LocalTRANSFAC 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::DB::LocalTRANSFAC \- interface to local transfac database
+position frequency matrices (matrix.dat)
+.PP
+.Vb 5
+\& \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- 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.
+\& \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.IP "\(bu" 4
+creating a database object by connecting to \s-1TRANSFAC\s0 data
+.Sp
+.Vb 1
+\& my $db = TFBS::DB::LocalTRANSFAC\->connect(\-localdir => \*(Aq/home/someusr\*(Aq);
+\&
+\& localdir is the location of the matrix.dat TRANSFAC datafile
+.Ve
+.IP "\(bu" 4
+retrieving a TFBS::Matrix::* object from the database
+.Sp
+.Vb 2
+\& # retrieving a PFM by ID
+\& my $pfm = $db\->get_Matrix_by_ID(\*(AqV$CEBPA_01\*(Aq,\*(AqPFM\*(Aq);
+\&
+\& #retrieving a PWM by TRANSFAC accession number
+\& my $pwm = $db\->get_Matrix_by_acc(\*(AqM00116\*(Aq, \*(AqPWM\*(Aq);
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+TFBS::DB::LocalTRANSFAC is a read only database interface that fetches
+\&\s-1TRANSFAC\s0 matrix data from a local \s-1TRANSFAC\s0 install (matrix.dat)
+.SS "connect"
+.IX Subsection "connect"
+.Vb 10
+\& 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
+.Ve
+.SS "get_Matrix_by_acc"
+.IX Subsection "get_Matrix_by_acc"
+.Vb 10
+\& Title : get_Matrix_by_acc
+\& Usage : my $pfm = $db\->get_Matrix_by_acc(\*(AqV$CREB_01\*(Aq, \*(AqPFM\*(Aq);
+\& Function: fetches matrix data under the given TRANSFAC aaccession 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 \*(AqPFM\*(Aq, \*(AqICM\*(Aq, and \*(AqPWM\*(Aq); 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: \*(AqPFM\*(Aq (raw position frequency matrix),
+\& \*(AqICM\*(Aq (information content matrix) or \*(AqPWM\*(Aq (position
+\& weight matrix)
+\& If Matrix_type is omitted, a PFM is retrieved by default.
+.Ve
+.SS "get_Matrix_by_ID"
+.IX Subsection "get_Matrix_by_ID"
+.Vb 10
+\& Title : get_Matrix_by_ID
+\& Usage : my $pfm = $db\->get_Matrix_by_ID(\*(AqV$CREB_01\*(Aq, \*(AqPFM\*(Aq);
+\& 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 \*(AqPFM\*(Aq, \*(AqICM\*(Aq, and \*(AqPWM\*(Aq); 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: \*(AqPFM\*(Aq (raw position frequency matrix),
+\& \*(AqICM\*(Aq (information content matrix) or \*(AqPWM\*(Aq (position
+\& weight matrix)
+\& If Matrix_type is omitted, a PFM is retrieved by default.
+.Ve
diff --git a/blib/man3/TFBS::DB::TRANSFAC.3pm b/blib/man3/TFBS::DB::TRANSFAC.3pm
new file mode 100644
index 0000000..7697ce4
--- /dev/null
+++ b/blib/man3/TFBS::DB::TRANSFAC.3pm
@@ -0,0 +1,232 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::DB::TRANSFAC 3"
+.TH TFBS::DB::TRANSFAC 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::DB::TRANSFAC \- interface to database of TRANSFAC public
+position frequency matrices at TESS (http://www.cbil.upenn.edu/tess)
+.PP
+.Vb 5
+\& \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- 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.
+\& \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.IP "\(bu" 4
+creating a database object by connecting to \s-1TRANSFAC\s0 data
+.Sp
+.Vb 1
+\& my $db = TFBS::DB::TRANSFAC\->connect();
+.Ve
+.IP "\(bu" 4
+retrieving a TFBS::Matrix::* object from the database
+.Sp
+.Vb 2
+\& # retrieving a PFM by ID
+\& my $pfm = $db\->get_Matrix_by_ID(\*(AqV$CEBPA_01\*(Aq,\*(AqPFM\*(Aq);
+\&
+\& #retrieving a PWM by TRANSFAC accession number
+\& my $pwm = $db\->get_Matrix_by_acc(\*(AqM00116\*(Aq, \*(AqPWM\*(Aq);
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+\&\s-1TFBS::DB::TRANSFAC\s0 is a read only database interface that fetches
+\&\s-1TRANSFAC\s0 matrix data from \s-1TESS\s0 web interface
+(http://www.cbil.upen.edu/TESS) and returns TFBS::Matrix::* objects.
+.SS "connect"
+.IX Subsection "connect"
+.Vb 10
+\& 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 public TRANSFAC databases via the web
+\& Returns : a TFBS::DB::TRANSFAC object
+\& Args : \-proxy # OPTIONAL: a http proxy server name,
+\& # usually required for accessing TRANSFAC from behind
+\& # a firewall
+\& \-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
+.Ve
+.SS "new"
+.IX Subsection "new"
+.Vb 7
+\& Title : connect
+\& Usage : my $db = TFBS::DB::TRANSFAC\->connect(%args);
+\& Function: Here, I<new> is just a synonim for I<connect>
+\& (to make the interface consistent with other
+\& bioperl read\-obly Bio::DB::* objects)
+\& Returns : a TFBS::DB::TRANSFAC object
+\& Args : \-accept_conditions # see explanation at I<new>
+.Ve
+.SS "get_Matrix_by_ID"
+.IX Subsection "get_Matrix_by_ID"
+.Vb 10
+\& Title : get_Matrix_by_ID
+\& Usage : my $pfm = $db\->get_Matrix_by_ID(\*(AqV$CREB_01\*(Aq, \*(AqPFM\*(Aq);
+\& 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 \*(AqPFM\*(Aq, \*(AqICM\*(Aq, and \*(AqPWM\*(Aq); 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: \*(AqPFM\*(Aq (raw position frequency matrix),
+\& \*(AqICM\*(Aq (information content matrix) or \*(AqPWM\*(Aq (position
+\& weight matrix)
+\& If Matrix_type is omitted, a PFM is retrieved by default.
+.Ve
+.SS "get_Matrix_by_acc"
+.IX Subsection "get_Matrix_by_acc"
+.Vb 10
+\& Title : get_Matrix_by_acc
+\& Usage : my $pfm = $db\->get_Matrix_by_acc(\*(AqV$CREB_01\*(Aq, \*(AqPFM\*(Aq);
+\& Function: fetches matrix data under the given TRANSFAC aaccession 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 \*(AqPFM\*(Aq, \*(AqICM\*(Aq, and \*(AqPWM\*(Aq); 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: \*(AqPFM\*(Aq (raw position frequency matrix),
+\& \*(AqICM\*(Aq (information content matrix) or \*(AqPWM\*(Aq (position
+\& weight matrix)
+\& If Matrix_type is omitted, a PFM is retrieved by default.
+.Ve
diff --git a/blib/man3/TFBS::Ext::pwmsearch.3pm b/blib/man3/TFBS::Ext::pwmsearch.3pm
new file mode 100644
index 0000000..f044e71
--- /dev/null
+++ b/blib/man3/TFBS::Ext::pwmsearch.3pm
@@ -0,0 +1,155 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "pwmsearch 3"
+.TH pwmsearch 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::Ext::pwmsearch \- Perl extension for scanning a DNA sequence object with a position weight matrix
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 2
+\& use TFBS::Ext::pwmsearch;
+\& pwmsearch
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+Stub documentation for TFBS::Ext::pwmsearch, created by h2xs. It looks like the
+author of the extension was negligent enough to leave the stub
+unedited.
+.PP
+Blah blah blah.
+.SS "\s-1EXPORT\s0"
+.IX Subsection "EXPORT"
+None by default.
+.SH "AUTHOR"
+.IX Header "AUTHOR"
+A. U. Thor, a.u.thor at a.galaxy.far.far.away
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+\&\fIperl\fR\|(1).
diff --git a/blib/man3/TFBS::Matrix.3pm b/blib/man3/TFBS::Matrix.3pm
new file mode 100644
index 0000000..fa9edcf
--- /dev/null
+++ b/blib/man3/TFBS::Matrix.3pm
@@ -0,0 +1,214 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::Matrix 3"
+.TH TFBS::Matrix 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::Matrix \- base class for matrix patterns, containing methods common
+to all
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+TFBS::Matrix is a base class consisting of universal constructor called by
+its subclasses (TFBS::Matrix::*), and matrix manipulation methods that are
+independent of the matrix type. It is not meant to be instantiated itself.
+.SH "FEEDBACK"
+.IX Header "FEEDBACK"
+Please send bug reports and other comments to the author.
+.SH "AUTHOR \- Boris Lenhard"
+.IX Header "AUTHOR - Boris Lenhard"
+Boris Lenhard <Boris.Lenhard at cgb.ki.se>
+.SH "APPENDIX"
+.IX Header "APPENDIX"
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+.SS "matrix"
+.IX Subsection "matrix"
+.Vb 7
+\& Title : matrix
+\& Usage : my $matrix = $pwm\->matrix();
+\& $pwm\->matrix( [ [12, 3, 0, 0, 4, 0],
+\& [ 0, 0, 0,11, 7, 0],
+\& [ 0, 9,12, 0, 0, 0],
+\& [ 0, 0, 0, 1, 1,12]
+\& ]);
+\&
+\& Function: get/set for the matrix data
+\& Returns : a reference to 2D array of integers(PFM) or floats (ICM, PWM)
+\& Args : none for get;
+\& a four line string, reference to 2D array, or a 2D piddle for set
+.Ve
+.SS "pdl_matrix"
+.IX Subsection "pdl_matrix"
+.Vb 6
+\& Title : pdl_matrix
+\& Usage : my $pdl = $pwm\->pdl_matrix();
+\& Function: access the PDL matrix used to store the actual
+\& matrix data directly
+\& Returns : a PDL object, aka a piddle
+\& Args : none
+.Ve
+.SS "revcom"
+.IX Subsection "revcom"
+.Vb 7
+\& Title : revcom
+\& Usage : my $revcom_pfm = $pfm\->revcom();
+\& Function: create a matrix pattern object which is reverse complement
+\& of the current one
+\& Returns : a TFBS::Matrix::* object of the same type as the one
+\& the method acted upon
+\& Args : none
+.Ve
+.SS "rawprint"
+.IX Subsection "rawprint"
+.Vb 5
+\& Title : rawprint
+\& Usage : my $rawstring = $pfm\->rawprint);
+\& Function: convert matrix data to a simple tab\-separated format
+\& Returns : a four\-line string of tab\-separated integers or floats
+\& Args : none
+.Ve
+.SS "prettyprint"
+.IX Subsection "prettyprint"
+.Vb 5
+\& Title : prettyprint
+\& Usage : my $prettystring = $pfm\->prettyprint();
+\& Function: convert matrix data to a human\-readable string format
+\& Returns : a four\-line string with nucleotides and aligned numbers
+\& Args : none
+.Ve
+.SS "length"
+.IX Subsection "length"
+.Vb 6
+\& Title : length
+\& Usage : my $pattern_length = $pfm\->length;
+\& Function: gets the pattern length in nucleotides
+\& (i.e. number of columns in the matrix)
+\& Returns : an integer
+\& Args : none
+.Ve
diff --git a/blib/man3/TFBS::Matrix::ICM.3pm b/blib/man3/TFBS::Matrix::ICM.3pm
new file mode 100644
index 0000000..4608157
--- /dev/null
+++ b/blib/man3/TFBS::Matrix::ICM.3pm
@@ -0,0 +1,350 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::Matrix::ICM 3"
+.TH TFBS::Matrix::ICM 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::Matrix::ICM \- class for information content matrices of nucleotide
+patterns
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.IP "\(bu" 4
+creating a TFBS::Matrix::ICM object manually:
+.Sp
+.Vb 9
+\& my $matrixref = [ [ 0.00, 0.30, 0.00, 0.00, 0.24, 0.00 ],
+\& [ 0.00, 0.00, 0.00, 1.45, 0.42, 0.00 ],
+\& [ 0.00, 0.89, 2.00, 0.00, 0.00, 0.00 ],
+\& [ 0.00, 0.00, 0.00, 0.13, 0.06, 2.00 ]
+\& ];
+\& my $icm = TFBS::Matrix::ICM\->new(\-matrix => $matrixref,
+\& \-name => "MyProfile",
+\& \-ID => "M0001"
+\& );
+\&
+\& # or
+\&
+\& my $matrixstring = <<ENDMATRIX
+\& 2.00 0.30 0.00 0.00 0.24 0.00
+\& 0.00 0.00 0.00 1.45 0.42 0.00
+\& 0.00 0.89 2.00 0.00 0.00 0.00
+\& 0.00 0.00 0.00 0.13 0.06 2.00
+\& ENDMATRIX
+\& ;
+\& my $icm = TFBS::Matrix::ICM\->new(\-matrixstring => $matrixstring,
+\& \-name => "MyProfile",
+\& \-ID => "M0001"
+\& );
+.Ve
+.IP "\(bu" 4
+retrieving a TFBS::Matix::ICM object from a database:
+.Sp
+(See documentation of individual TFBS::DB::* modules to learn
+how to connect to different types of pattern databases and retrieve
+TFBS::Matrix::* objects from them.)
+.Sp
+.Vb 6
+\& my $db_obj = TFBS::DB::JASPAR2\->new
+\& (\-connect => ["dbi:mysql:JASPAR2:myhost",
+\& "myusername", "mypassword"]);
+\& my $pfm = $db_obj\->get_Matrix_by_ID("M0001", "ICM");
+\& # or
+\& my $pfm = $db_obj\->get_Matrix_by_name("MyProfile", "ICM");
+.Ve
+.IP "\(bu" 4
+retrieving list of individual TFBS::Matrix::ICM objects
+from a TFBS::MatrixSet object
+.Sp
+(see decumentation of TFBS::MatrixSet to learn how to create
+objects for storage and manipulation of multiple matrices)
+.Sp
+.Vb 1
+\& my @icm_list = $matrixset\->all_patterns(\-sort_by=>"name");
+.Ve
+.Sp
+* drawing a sequence logo
+.Sp
+.Vb 7
+\& $icm\->draw_logo(\-file=>"logo.png",
+\& \-full_scale =>2.25,
+\& \-xsize=>500,
+\& \-ysize =>250,
+\& \-graph_title=>"C/EBPalpha binding site logo",
+\& \-x_title=>"position",
+\& \-y_title=>"bits");
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+TFBS::Matrix::ICM is a class whose instances are objects representing
+position weight matrices (PFMs). An \s-1ICM\s0 is normally calculated from a
+raw position frequency matrix (see TFBS::Matrix::PFM
+for the explanation of position frequency matrices). For example, given
+the following position frequency matrix,
+.PP
+.Vb 4
+\& A:[ 12 3 0 0 4 0 ]
+\& C:[ 0 0 0 11 7 0 ]
+\& G:[ 0 9 12 0 0 0 ]
+\& T:[ 0 0 0 1 1 12 ]
+.Ve
+.PP
+the standard computational procedure is applied to convert it into the
+following information content matrix:
+.PP
+.Vb 4
+\& A:[2.00 0.30 0.00 0.00 0.24 0.00]
+\& C:[0.00 0.00 0.00 1.45 0.42 0.00]
+\& G:[0.00 0.89 2.00 0.00 0.00 0.00]
+\& T:[0.00 0.00 0.00 0.13 0.06 2.00]
+.Ve
+.PP
+which contains the \*(L"weights\*(R" associated with the occurrence of each
+nucleotide at the given position in a pattern.
+.PP
+A TFBS::Matrix::PWM object is equipped with methods to search nucleotide
+sequences and pairwise alignments of nucleotide sequences with the
+pattern they represent, and return a set of sites in nucleotide
+sequence (a TFBS::SiteSet object for single sequence search, and a
+TFBS::SitePairSet for the alignment search).
+.SH "FEEDBACK"
+.IX Header "FEEDBACK"
+Please send bug reports and other comments to the author.
+.SH "AUTHOR \- Boris Lenhard"
+.IX Header "AUTHOR - Boris Lenhard"
+Boris Lenhard <Boris.Lenhard at cgb.ki.se>
+.SH "APPENDIX"
+.IX Header "APPENDIX"
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+.SS "new"
+.IX Subsection "new"
+.Vb 5
+\& Title : new
+\& Usage : my $icm = TFBS::Matrix::ICM\->new(%args)
+\& Function: constructor for the TFBS::Matrix::ICM object
+\& Returns : a new TFBS::Matrix::ICM object
+\& Args : # you must specify either one of the following three:
+\&
+\& \-matrix, # reference to an array of arrays of integers
+\& #or
+\& \-matrixstring,# a string containing four lines
+\& # of tab\- or space\-delimited integers
+\& #or
+\& \-matrixfile, # the name of a file containing four lines
+\& # of tab\- or space\-delimited integers
+\& #######
+\&
+\& \-name, # string, OPTIONAL
+\& \-ID, # string, OPTIONAL
+\& \-class, # string, OPTIONAL
+\& \-tags # an array reference, OPTIONAL
+.Ve
+.SS "to_PWM"
+.IX Subsection "to_PWM"
+.Vb 9
+\& Title : to_PWM
+\& Usage : my $pwm = $icm\->to_PWM()
+\& Function: converts an information content matrix (a TFBS::Matrix::ICM object)
+\& to position weight matrix. At present it assumes uniform
+\& background distribution of nucleotide frequencies.
+\& Returns : a new TFBS::Matrix::PWM object
+\& Args : none; in the future releases, it should be able to accept
+\& a user defined background probability of the four
+\& nucleotides
+.Ve
+.SS "draw_logo"
+.IX Subsection "draw_logo"
+.Vb 10
+\& Title : draw_logo
+\& Usage : my $gdImageObj = $icm\->draw_logo(%args)
+\& Function: Draws a "sequence logo", a graphical representation
+\& of a possibly degenerate fixed\-width nucleotide
+\& sequence pattern, from the information content matrix
+\& Returns : a GD::Image object;
+\& if you only need the image file you can ignore it
+\& Args : \-file, # the name of the output PNG image file
+\& # OPTIONAL: default none
+\& \-xsize # width of the image in pixels
+\& # OPTIONAL: default 600
+\& \-ysize # height of the image in pixels
+\& # OPTIONAL: default 5/8 of \-x_size
+\& \-margin # size of image margins in pixels
+\& # OPTIONAL: default 15% of \-y_size
+\& \-full_scale # the maximum value on the y\-axis, in bits
+\& # OPTIONAL: default 2.25
+\& \-graph_title,# the graph title
+\& # OPTIONAL: default none
+\& \-x_title, # x\-axis title; OPTIONAL: default none
+\& \-y_title # y\-axis title; OPTIONAL: default none
+\& \-error_bars # reference to an array of S.D. values for each column; OPTIONAL
+\& \-ps # if true, produces a postscript string instead of a GD::Image object
+\& \-pdf # if true AND the \-file argumant is used, produces an output pdf file
+.Ve
+.SS "_draw_ps_logo"
+.IX Subsection "_draw_ps_logo"
+.Vb 10
+\& Title : _draw_ps_logo
+\& Usage : my $postscript_string = $icm\->_draw_ps_logo(%args)
+\& Internal method, should be accessed using draw_logo()
+\& Function: Draws a "sequence logo", a graphical representation
+\& of a possibly degenerate fixed\-width nucleotide
+\& sequence pattern, from the information content matrix
+\& Returns : a postscript string;
+\& if you only need the image file you can ignore it
+\& Args : \-file, # the name of the output PNG image file
+\& # OPTIONAL: default none
+\& \-xsize # width of the image in pixels
+\& # OPTIONAL: default 600
+\& \-ysize # height of the image in pixels
+\& # OPTIONAL: default 5/8 of \-x_size
+\& \-full_scale # the maximum value on the y\-axis, in bits
+\& # OPTIONAL: default 2.25
+\& \-graph_title,# the graph title
+\& # OPTIONAL: default none
+\& \-x_title, # x\-axis title; OPTIONAL: default none
+\& \-y_title # y\-axis title; OPTIONAL: default none
+.Ve
+.SS "name"
+.IX Subsection "name"
+.SS "\s-1ID\s0"
+.IX Subsection "ID"
+.SS "class"
+.IX Subsection "class"
+.SS "matrix"
+.IX Subsection "matrix"
+.SS "length"
+.IX Subsection "length"
+.SS "revcom"
+.IX Subsection "revcom"
+.SS "rawprint"
+.IX Subsection "rawprint"
+.SS "prettyprint"
+.IX Subsection "prettyprint"
+The above methods are common to all matrix objects. Please consult
+TFBS::Matrix to find out how to use them.
diff --git a/blib/man3/TFBS::Matrix::PFM.3pm b/blib/man3/TFBS::Matrix::PFM.3pm
new file mode 100644
index 0000000..61e4b38
--- /dev/null
+++ b/blib/man3/TFBS::Matrix::PFM.3pm
@@ -0,0 +1,413 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::Matrix::PFM 3"
+.TH TFBS::Matrix::PFM 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::Matrix::PFM \- class for raw position frequency matrix patterns
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.IP "\(bu" 4
+creating a TFBS::Matrix::PFM object manually:
+.Sp
+.Vb 10
+\& my $matrixref = [ [ 12, 3, 0, 0, 4, 0 ],
+\& [ 0, 0, 0, 11, 7, 0 ],
+\& [ 0, 9, 12, 0, 0, 0 ],
+\& [ 0, 0, 0, 1, 1, 12 ]
+\& ];
+\& my $pfm = TFBS::Matrix::PFM\->new(\-matrix => $matrixref,
+\& \-name => "MyProfile",
+\& \-ID => "M0001"
+\& );
+\& # or
+\&
+\& my $matrixstring =
+\& "12 3 0 0 4 0\en0 0 0 11 7 0\en0 9 12 0 0 0\en0 0 0 1 1 12";
+\&
+\& my $pfm = TFBS::Matrix::PFM\->new(\-matrixstring => $matrixstring,
+\& \-name => "MyProfile",
+\& \-ID => "M0001"
+\& );
+.Ve
+.IP "\(bu" 4
+retrieving a TFBS::Matix::PFM object from a database:
+.Sp
+(See documentation of individual TFBS::DB::* modules to learn
+how to connect to different types of pattern databases and
+retrieve TFBS::Matrix::* objects from them.)
+.Sp
+.Vb 6
+\& my $db_obj = TFBS::DB::JASPAR2\->new
+\& (\-connect => ["dbi:mysql:JASPAR2:myhost",
+\& "myusername", "mypassword"]);
+\& my $pfm = $db_obj\->get_Matrix_by_ID("M0001", "PFM");
+\& # or
+\& my $pfm = $db_obj\->get_Matrix_by_name("MyProfile", "PFM");
+.Ve
+.IP "\(bu" 4
+retrieving list of individual TFBS::Matrix::PFM objects
+from a TFBS::MatrixSet object
+.Sp
+(See the TFBS::MatrixSet to learn how to create
+objects for storage and manipulation of multiple matrices.)
+.Sp
+.Vb 1
+\& my @pfm_list = $matrixset\->all_patterns(\-sort_by=>"name");
+.Ve
+.IP "\(bu" 4
+convert a raw frequency matrix to other matrix types:
+.Sp
+.Vb 2
+\& my $pwm = $pfm\->to_PWM(); # convert to position weight matrix
+\& my $icm = $icm\->to_ICM(); # convert to information con
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+TFBS::Matrix::PFM is a class whose instances are objects representing
+raw position frequency matrices (PFMs). A \s-1PFM\s0 is derived from N
+nucleotide patterns of fixed size, e.g. the set of sequences
+.PP
+.Vb 12
+\& AGGCCT
+\& AAGCCT
+\& AGGCAT
+\& AAGCCT
+\& AAGCCT
+\& AGGCAT
+\& AGGCCT
+\& AGGCAT
+\& AGGTTT
+\& AGGCAT
+\& AGGCCT
+\& AGGCCT
+.Ve
+.PP
+will give the matrix:
+.PP
+.Vb 4
+\& A:[ 12 3 0 0 4 0 ]
+\& C:[ 0 0 0 11 7 0 ]
+\& G:[ 0 9 12 0 0 0 ]
+\& T:[ 0 0 0 1 1 12 ]
+.Ve
+.PP
+which contains the count of each nucleotide at each position in the
+sequence. (If you have a set of sequences as above and want to
+create a TFBS::Matrix::PFM object out of them, have a look at
+TFBS::PatternGen::SimplePFM module.)
+.PP
+PFMs are easily converted to other types of matrices, namely
+information content matrices and position weight matrices. A
+TFBS::Matrix::PFM object has the methods to_ICM and to_PWM which
+do just that, returning a TFBS::Matrix::ICM and TFBS::Matrix::PWM
+objects, respectively.
+.SH "FEEDBACK"
+.IX Header "FEEDBACK"
+Please send bug reports and other comments to the author.
+.SH "AUTHOR \- Boris Lenhard"
+.IX Header "AUTHOR - Boris Lenhard"
+Boris Lenhard <Boris.Lenhard at cgb.ki.se>
+.SH "APPENDIX"
+.IX Header "APPENDIX"
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+.SS "new"
+.IX Subsection "new"
+.Vb 5
+\& Title : new
+\& Usage : my $pfm = TFBS::Matrix::PFM\->new(%args)
+\& Function: constructor for the TFBS::Matrix::PFM object
+\& Returns : a new TFBS::Matrix::PFM object
+\& Args : # you must specify either one of the following three:
+\&
+\& \-matrix, # reference to an array of arrays of integers
+\& #or
+\& \-matrixstring,# a string containing four lines
+\& # of tab\- or space\-delimited integers
+\& #or
+\& \-matrixfile, # the name of a file containing four lines
+\& # of tab\- or space\-delimited integers
+\& #######
+\&
+\& \-name, # string, OPTIONAL
+\& \-ID, # string, OPTIONAL
+\& \-class, # string, OPTIONAL
+\& \-tags # an array reference, OPTIONAL
+\&Warnings : Warns if the matrix provided has columns with different
+\& sums. Columns with different sums contradict the usual
+\& origin of matrix data and, unless you are absolutely sure
+\& that column sums _should_ be different, it would be wise to
+\& check your matrices.
+.Ve
+.SS "column_sum"
+.IX Subsection "column_sum"
+.Vb 8
+\& Title : column_sum
+\& Usage : my $nr_sequences = $pfm\->column_sum()
+\& Function: calculates the sum of elements of one column
+\& (the first one by default) which normally equals the
+\& number of sequences used to derive the PFM.
+\& Returns : the sum of elements of one column (an integer)
+\& Args : columnn number (starting from 1), OPTIONAL \- you DO NOT
+\& need to specify it unless you are dealing with a matrix
+.Ve
+.SS "to_PWM"
+.IX Subsection "to_PWM"
+.Vb 9
+\& Title : to_PWM
+\& Usage : my $pwm = $pfm\->to_PWM()
+\& Function: converts a raw frequency matrix (a TFBS::Matrix::PFM object)
+\& to position weight matrix. At present it assumes uniform
+\& background distribution of nucleotide frequencies.
+\& Returns : a new TFBS::Matrix::PWM object
+\& Args : none; in the future releases, it should be able to accept
+\& a user defined background probability of the four
+\& nucleotides
+.Ve
+.SS "to_ICM"
+.IX Subsection "to_ICM"
+.Vb 7
+\& Title : to_ICM
+\& Usage : my $icm = $pfm\->to_ICM()
+\& Function: converts a raw frequency matrix (a TFBS::Matrix::PFM object)
+\& to information content matrix. At present it assumes uniform
+\& background distribution of nucleotide frequencies.
+\& Returns : a new TFBS::Matrix::ICM object
+\& Args : \-small_sample_correction # undef (default), \*(Aqschneider\*(Aq or \*(Aqpseudocounts\*(Aq
+.Ve
+.PP
+How a \s-1PFM\s0 is converted to \s-1ICM:\s0
+.PP
+For a \s-1PFM\s0 element PFM[i,k], the probability without
+pseudocounts is estimated to be simply
+.PP
+.Vb 1
+\& p[i,k] = PFM[i,k] / Z
+.Ve
+.PP
+where
+\&\- Z equals the column sum of the matrix i.e. the number of motifs used
+to construct the \s-1PFM\s0.
+\&\- i is the column index (position in the motif)
+\&\- k is the row index (a letter in the alphacer, here k is one of
+(A,C,G,T)
+.PP
+Here is how one normally calculates the pseudocount-corrected positional
+probability p'[i,j]:
+.PP
+.Vb 1
+\& p\*(Aq[i,k] = (PFM[i,k] + 0.25*sqrt(Z)) / (Z + sqrt(Z))
+.Ve
+.PP
+0.25 is for the flat distribution of nucleotides, and sqrt(Z) is the
+recommended pseudocount weight. In the general case,
+.PP
+.Vb 1
+\& p\*(Aq[i,k] = (PFM[i,k] + q[k]*B) / (Z + B)
+.Ve
+.PP
+where q[k] is the background distribution of the letter (nucleotide) k,
+and B an arbitrary pseudocount value or expression (for no pseudocounts
+B=0).
+.PP
+For a given position i, the deviation from random distribution in bits
+is calculated as (Baldi and Brunak eq. 1.9 (2ed) or 1.8 (1ed)):
+.PP
+\&\- for an arbitrary alphabet of A letters:
+.PP
+.Vb 1
+\& D[i] = log2(A) + sum_for_all_k(p[i,k]*log2(p[i,k]))
+.Ve
+.PP
+\&\- special case for nucleotides (A=4)
+.PP
+.Vb 1
+\& D[i] = 2 + sum_for_all_k(p[i,k]*log2(p[i,k]))
+.Ve
+.PP
+D[i] equals the information content of the position i in the motif. To
+calculate the entire \s-1ICM\s0, you have to calculate the contrubution of each
+nucleotide at a position i to D[i], i.e.
+.PP
+ICM[i,k] = p'[i,k] * D[i]
+.SS "draw_logo"
+.IX Subsection "draw_logo"
+.Vb 10
+\& Title : draw_logo
+\& Usage : my $gd_image = $pfm\->draw_logo()
+\& Function: draws a sequence logo; similar to the
+\& method in TFBS::Matrix::ICM, but can automatically calculate
+\& error bars for drawing
+\& Returns : a GD image object (see documentation of GD module)
+\& Args : many; PFM\-specific options are:
+\& \-small_sample_correction # One of
+\& # "Schneider" (uses correction
+\& # described by Schneider et al.
+\& # (Schneider t et al. (1986) J.Biol.Chem.
+\& # "pseudocounts" \- standard pseudocount
+\& # correction, more suitable for
+\& # PFMs with large r column sums
+\& # If the parameter is ommited, small
+\& # sample correction is not applied
+\&
+\& \-draw_error_bars # if true, adds error bars to each position
+\& # in the logo. To calculate the error bars,
+\& # it uses the \-small_sample_connection
+\& # argument if explicitly set,
+\& # or "Schneider" by default
+\&For other args, see draw_logo entry in TFBS::Matrix::ICM documentation
+.Ve
+.SS "add_PFM"
+.IX Subsection "add_PFM"
+.Vb 5
+\& Title : add_PFM
+\& Usage : $pfm\->add_PFM($another_pfm)
+\& Function: adds the values of $pnother_pfm matrix to $pfm
+\& Returns : reference to the updated $pfm object
+\& Args : a TFBS::Matrix::PFM object
+.Ve
+.SS "name"
+.IX Subsection "name"
+.SS "\s-1ID\s0"
+.IX Subsection "ID"
+.SS "class"
+.IX Subsection "class"
+.SS "matrix"
+.IX Subsection "matrix"
+.SS "length"
+.IX Subsection "length"
+.SS "revcom"
+.IX Subsection "revcom"
+.SS "rawprint"
+.IX Subsection "rawprint"
+.SS "prettyprint"
+.IX Subsection "prettyprint"
+The above methods are common to all matrix objects. Please consult
+TFBS::Matrix to find out how to use them.
diff --git a/blib/man3/TFBS::Matrix::PWM.3pm b/blib/man3/TFBS::Matrix::PWM.3pm
new file mode 100644
index 0000000..bbb3046
--- /dev/null
+++ b/blib/man3/TFBS::Matrix::PWM.3pm
@@ -0,0 +1,370 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::Matrix::PWM 3"
+.TH TFBS::Matrix::PWM 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::Matrix::PWM \- class for position weight matrices of nucleotide
+patterns
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.IP "\(bu" 4
+creating a TFBS::Matrix::PWM object manually:
+.Sp
+.Vb 10
+\& my $matrixref = [ [ 0.61, \-3.16, 1.83, \-3.16, 1.21, \-0.06],
+\& [\-0.15, \-2.57, \-3.16, \-3.16, \-2.57, \-1.83],
+\& [\-1.57, 1.85, \-2.57, \-1.34, \-1.57, 1.14],
+\& [ 0.31, \-3.16, \-2.57, 1.76, 0.24, \-0.83]
+\& ];
+\& my $pwm = TFBS::Matrix::PWM\->new(\-matrix => $matrixref,
+\& \-name => "MyProfile",
+\& \-ID => "M0001"
+\& );
+\& # or
+\&
+\& my $matrixstring = <<ENDMATRIX
+\& 0.61 \-3.16 1.83 \-3.16 1.21 \-0.06
+\& \-0.15 \-2.57 \-3.16 \-3.16 \-2.57 \-1.83
+\& \-1.57 1.85 \-2.57 \-1.34 \-1.57 1.14
+\& 0.31 \-3.16 \-2.57 1.76 0.24 \-0.83
+\& ENDMATRIX
+\& ;
+\& my $pwm = TFBS::Matrix::PWM\->new(\-matrixstring => $matrixstring,
+\& \-name => "MyProfile",
+\& \-ID => "M0001"
+\& );
+.Ve
+.IP "\(bu" 4
+retrieving a TFBS::Matix::PWM object from a database:
+.Sp
+(See documentation of individual TFBS::DB::* modules to learn
+how to connect to different types of pattern databases and retrieve
+TFBS::Matrix::* objects from them.)
+.Sp
+.Vb 6
+\& my $db_obj = TFBS::DB::JASPAR2\->new
+\& (\-connect => ["dbi:mysql:JASPAR2:myhost",
+\& "myusername", "mypassword"]);
+\& my $pwm = $db_obj\->get_Matrix_by_ID("M0001", "PWM");
+\& # or
+\& my $pwm = $db_obj\->get_Matrix_by_name("MyProfile", "PWM");
+.Ve
+.IP "\(bu" 4
+retrieving list of individual TFBS::Matrix::PWM objects
+from a TFBS::MatrixSet object
+.Sp
+(see decumentation of TFBS::MatrixSet to learn how to create
+objects for storage and manipulation of multiple matrices)
+.Sp
+.Vb 1
+\& my @pwm_list = $matrixset\->all_patterns(\-sort_by=>"name");
+.Ve
+.IP "\(bu" 4
+scanning a nucleotide sequence with a matrix
+.Sp
+.Vb 2
+\& my $siteset = $pwm\->search_seq(\-file =>"myseq.fa",
+\& \-threshold => "80%");
+.Ve
+.IP "\(bu" 4
+scanning a pairwise alignment with a matrix
+.Sp
+.Vb 4
+\& my $site_pair_set = $pwm\->search_aln(\-file =>"myalign.aln",
+\& \-threshold => "80%",
+\& \-cutoff => "70%",
+\& \-window => 50);
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+TFBS::Matrix::PWM is a class whose instances are objects representing
+position weight matrices (PWMs). A \s-1PWM\s0 is normally calculated from a
+raw position frequency matrix (see TFBS::Matrix::PFM
+for the explanation of position frequency matrices). For example, given
+the following position frequency matrix:
+.PP
+.Vb 4
+\& A:[ 12 3 0 0 4 0 ]
+\& C:[ 0 0 0 11 7 0 ]
+\& G:[ 0 9 12 0 0 0 ]
+\& T:[ 0 0 0 1 1 12 ]
+.Ve
+.PP
+The standard computational procedure is applied to convert it into the
+following position weight matrix:
+.PP
+.Vb 4
+\& A:[ 0.61 \-3.16 1.83 \-3.16 1.21 \-0.06]
+\& C:[\-0.15 \-2.57 \-3.16 \-3.16 \-2.57 \-1.83]
+\& G:[\-1.57 1.85 \-2.57 \-1.34 \-1.57 1.14]
+\& T:[ 0.31 \-3.16 \-2.57 1.76 0.24 \-0.83]
+.Ve
+.PP
+which contains the \*(L"weights\*(R" associated with the occurence of each
+nucleotide at the given position in a pattern.
+.PP
+A TFBS::Matrix::PWM object is equipped with methods to search nucleotide
+sequences and pairwise alignments of nucleotide sequences with the
+pattern they represent, and return a set of sites in nucleotide
+sequence (a TFBS::SiteSet object for single sequence search, and a
+TFBS::SitePairSet for the alignment search).
+.SH "FEEDBACK"
+.IX Header "FEEDBACK"
+Please send bug reports and other comments to the author.
+.SH "AUTHOR \- Boris Lenhard"
+.IX Header "AUTHOR - Boris Lenhard"
+Boris Lenhard <Boris.Lenhard at cgb.ki.se>
+.SH "APPENDIX"
+.IX Header "APPENDIX"
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+.SS "new"
+.IX Subsection "new"
+.Vb 5
+\& Title : new
+\& Usage : my $pwm = TFBS::Matrix::PWM\->new(%args)
+\& Function: constructor for the TFBS::Matrix::PWM object
+\& Returns : a new TFBS::Matrix::PWM object
+\& Args : # you must specify either one of the following three:
+\&
+\& \-matrix, # reference to an array of arrays of integers
+\& #or
+\& \-matrixstring,# a string containing four lines
+\& # of tab\- or space\-delimited integers
+\& #or
+\& \-matrixfile, # the name of a file containing four lines
+\& # of tab\- or space\-delimited integers
+\& #######
+\&
+\& \-name, # string, OPTIONAL
+\& \-ID, # string, OPTIONAL
+\& \-class, # string, OPTIONAL
+\& \-tags # an array reference, OPTIONAL
+.Ve
+.SS "search_seq"
+.IX Subsection "search_seq"
+.Vb 6
+\& 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::SiteSet object
+\& 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
+\&
+\& \-threshold, # minimum score for the hit, either absolute
+\& # (e.g. 11.2) or relative (e.g. "75%")
+\& # OPTIONAL: default "80%"
+\&
+\& \-subpart # subpart of the sequence to search, given as
+\& # \-subpart => { start => 140,
+\& # end => 180 }
+\& # where start and end are coordinates in the
+\& # sequence; the coordinate range is interpreted
+\& # in the BioPerl tradition (1\-based, inclusive)
+\& # OPTIONAL: by default searches entire alignment
+.Ve
+.SS "search_aln"
+.IX Subsection "search_aln"
+.Vb 10
+\& 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 PWM: 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::SitePairSet object
+\& 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
+\& #############
+\&
+\& \-threshold, # minimum score for the hit, either absolute
+\& # (e.g. 11.2) or relative (e.g. "75%")
+\& # OPTIONAL: default "80%"
+\&
+\& \-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%"
+\&
+\& \-subpart # subpart of the alignment to search, given as e.g.
+\& # \-subpart => { relative_to => 1,
+\& # start => 140,
+\& # end => 180 }
+\& # where start and end are coordinates in the
+\& # sequence indicated by relative_to (1 for the
+\& # 1st sequence in the alignment, 2 for the 2nd)
+\& # OPTIONAL: by default searches entire alignment
+\&
+\& \-conservation
+\& # conservation profile, a TFBS::ConservationProfile
+\& # OPTIONAL: by default the conservation profile is
+\& # computed internally on the fly (less efficient)
+.Ve
+.SS "name"
+.IX Subsection "name"
+.SS "\s-1ID\s0"
+.IX Subsection "ID"
+.SS "class"
+.IX Subsection "class"
+.SS "matrix"
+.IX Subsection "matrix"
+.SS "length"
+.IX Subsection "length"
+.SS "revcom"
+.IX Subsection "revcom"
+.SS "rawprint"
+.IX Subsection "rawprint"
+.SS "prettyprint"
+.IX Subsection "prettyprint"
+The above methods are common to all matrix objects. Please consult
+TFBS::Matrix to find out how to use them.
diff --git a/blib/man3/TFBS::MatrixSet.3pm b/blib/man3/TFBS::MatrixSet.3pm
new file mode 100644
index 0000000..d5d2a8d
--- /dev/null
+++ b/blib/man3/TFBS::MatrixSet.3pm
@@ -0,0 +1,298 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::MatrixSet 3"
+.TH TFBS::MatrixSet 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::Matrix::Set \- an agregate class representing a set of matrix patterns, containing methods for manipulating the set as a whole
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 2
+\& # creation of a TFBS::MatrixSet object
+\& # let @list_of_matrix_objects be a list of TFBS::Matrix::* objects
+\&
+\& ###################################
+\& # Create a TFBS::MatrixSet object:
+\&
+\& my $matrixset = TFBS::MatrixSet\->new(); # creates an empty set
+\& $matrixset\->add_Matrix(@list_of_matrix_objects); #add matrix objects to set
+\& $matrixset\->add_Matrix($matrixobj); # adds a single matrix object to set
+\&
+\& # or, same as above:
+\&
+\& my $matrixset = TFBS::MatrixSet\->new(@list_of_matrix_objects, $matrixobj);
+\&
+\& ###################################
+\& #
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+TFBS::MatrixSet is an aggregate class storing a set of TFBS::Matrix::* subclass objects, and providing methods form manipulating those sets as a whole. TFBS::MatrixSet objects are created <I>de novo<I> or returned by some database (TFBS::DB::*) retrieval methods.
+.SH "FEEDBACK"
+.IX Header "FEEDBACK"
+Please send bug reports and other comments to the author.
+.SH "AUTHOR \- Boris Lenhard"
+.IX Header "AUTHOR - Boris Lenhard"
+Boris Lenhard <Boris.Lenhard at cgb.ki.se>
+.SH "APPENDIX"
+.IX Header "APPENDIX"
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+.SS "new"
+.IX Subsection "new"
+.SS "add_matrix"
+.IX Subsection "add_matrix"
+.Vb 5
+\& Title : add_matrix
+\& Usage : $matrixset\->add_matrix(@list_of_matrix_objects);
+\& Function: Adds matrix objects to matrixset
+\& Returns : object reference (usually ignored)
+\& Args : one or more TFBS::Matrix::* objects
+.Ve
+.SS "add_matrix_set"
+.IX Subsection "add_matrix_set"
+.Vb 6
+\& Title : add_matrix
+\& Usage : $matrixset\->add_matrix(@list_of_matrixset_objects);
+\& Function: Adds to the matrixset matrix objects contained in one or
+\& more other matrixsets
+\& Returns : object reference (usually ignored)
+\& Args : one or more TFBS::MatrixSet objects
+.Ve
+.SS "search_seq"
+.IX Subsection "search_seq"
+.Vb 4
+\& Title : search_seq
+\& Usage : my $siteset = $matrixset\->search_seq(%args)
+\& Function: scans a nucleotide sequence with all patterns represented
+\& stored in $matrixset;
+\&
+\& It works only if all matrix objects in $matrixset understand
+\& search_seq method (currently only TFBS::Matrix::PWM objects do)
+\& Returns : a TFBS::SiteSet object
+\& 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
+\&
+\& \-threshold, # minimum score for the hit, either absolute
+\& # (e.g. 11.2) or relative (e.g. "75%")
+\& # OPTIONAL: default "80%"
+.Ve
+.SS "search_aln"
+.IX Subsection "search_aln"
+.Vb 10
+\& Title : search_aln
+\& Usage : my $site_pair_set = $matrixset\->search_aln(%args)
+\& Function: Scans a pairwise alignment of nucleotide sequences
+\& with the pattern represented by the PWM: 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.
+\& It works only if all matrix object in $matrixset understand
+\& search_aln method (currently only TFBS::Matrix::PWM objects do)
+\&
+\& Returns : a TFBS::SitePairSet object
+\& 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
+\& #############
+\&
+\& \-threshold, # minimum score for the hit, either absolute
+\& # (e.g. 11.2) or relative (e.g. "75%")
+\& # OPTIONAL: default "80%"
+\&
+\& \-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%"
+\&
+\& \-subpart # subpart of the alignment to search, given as e.g.
+\& # \-subpart => { relative_to => 1,
+\& # start => 140,
+\& # end => 180 }
+\& # where start and end are coordinates in the
+\& # sequence indicated by relative_to (1 for the
+\& # 1st sequence in the alignment, 2 for the 2nd)
+\& # OPTIONAL: by default searches entire alignment
+\&
+\& \-conservation
+\& # conservation profile, a TFBS::ConservationProfile
+\& # OPTIONAL: by default the conservation profile is
+\& # computed internally on the fly (less efficient)
+.Ve
+.SS "size"
+.IX Subsection "size"
+.Vb 6
+\& Title : size
+\& Usage : my $number_of_matrices = $matrixset\->size;
+\& Function: gets the number of matrix objects in the $matrixset
+\& (i.e. the size of the set)
+\& Returns : a number
+\& Args : none
+.Ve
+.SS "Iterator"
+.IX Subsection "Iterator"
+.Vb 10
+\& Title : Iterator
+\& Usage : my $matrixset_iterator =
+\& $matrixset\->Iterator(\-sort_by =>\*(Aqtotal_ic\*(Aq);
+\& while (my $matrix_object = $matrix_iterator\->next) {
+\& # do whatever you want with individual matrix objects
+\& }
+\& Function: Returns an iterator object that can be used to go through
+\& all members of the set
+\& Returns : an iterator object (currently undocumentened in TFBS \-
+\& but understands the \*(Aqnext\*(Aq method)
+\& Args : \-sort_by # optional \- currently it accepts
+\& # \*(AqID\*(Aq (alphabetically)
+\& # \*(Aqname\*(Aq (alphabetically)
+\& # \*(Aqclass\*(Aq (alphabetically)
+\& # \*(Aqtotal_ic\*(Aq (numerically, decreasing order)
+\&
+\& \-reverse # optional \- reverses the default sorting order if true
+.Ve
diff --git a/blib/man3/TFBS::PatternGen.3pm b/blib/man3/TFBS::PatternGen.3pm
new file mode 100644
index 0000000..76bd882
--- /dev/null
+++ b/blib/man3/TFBS::PatternGen.3pm
@@ -0,0 +1,175 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::PatternGen 3"
+.TH TFBS::PatternGen 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::PatternGen \- a base class for pattern generators
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+TFBS::PatternGen is a base class providing methods common to all pattern generating
+modules. It is meant to be inherited by a concrete pattern generator, which must have its own
+constructor.
+.SS "pattern"
+.IX Subsection "pattern"
+.Vb 10
+\& Title : pattern
+\& Usage : my $pattern_obj = $patterngen\->pattern()
+\& Function: retrieves a pattern object produced by the pattern generator
+\& Returns : a pattern object (currently available pattern generators
+\& return a TFBS::Matrix::PFM object)
+\& Args : none
+\& Warning : If a pattern generator produces more than one pattern,
+\& this method call returns only the first one and prints
+\& a warning on STDERR, In those cases you should use
+\& I<all_patterns> or I<patternSet> methods.
+.Ve
+.SS "patternSet"
+.IX Subsection "patternSet"
+.Vb 7
+\& Title : patternSet
+\& Usage : my $patternSet = $patterngen\->patternSet()
+\& Function: retrieves a pattern set object containing all the patterns
+\& produced by the pattern generator
+\& Returns : a pattern set object (currently available pattern generators
+\& return a TFBS::MatrixSet object)
+\& Args : none
+.Ve
+.SS "all_patterns"
+.IX Subsection "all_patterns"
+.Vb 8
+\& Title : all_patterns
+\& Usage : my @patterns = $patterngen\->all_patterns()
+\& Function: retrieves an array of pattern objects
+\& produced by the pattern generator
+\& Returns : an array of pattern set objects (currently available
+\& pattern generators return an array of
+\& TFBS::Matrix::PFM objects)
+\& Args : none
+.Ve
diff --git a/blib/man3/TFBS::PatternGen::AnnSpec.3pm b/blib/man3/TFBS::PatternGen::AnnSpec.3pm
new file mode 100644
index 0000000..ca616dc
--- /dev/null
+++ b/blib/man3/TFBS::PatternGen::AnnSpec.3pm
@@ -0,0 +1,185 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::PatternGen::AnnSpec 3"
+.TH TFBS::PatternGen::AnnSpec 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::PatternGen::AnnSpec \- a pattern factory that uses the AnnSpec program
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 3
+\& my $patterngen =
+\& TFBS::PatternGen::AnnSpec\->new(\-seq_file=>\*(Aqsequences.fa\*(Aq,
+\& \-binary => \*(Aqann\-spec \*(Aq
+\&
+\&
+\& my $pfm = $patterngen\->pattern(); # $pfm is now a TFBS::Matrix::PFM object
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+TFBS::PatternGen::AnnSpec builds position frequency matrices
+using an external program AnnSpec (Workman, C. and Stormo, G.D. (2000) ANN-Spec: A method for discovering transcription factor binding sites with improved specificity. Proc. Pacific Symposium on Biocomputing 2000).
+.SH "FEEDBACK"
+.IX Header "FEEDBACK"
+Please send bug reports and other comments to the author.
+.SH "AUTHOR \- Wynand Alkema"
+.IX Header "AUTHOR - Wynand Alkema"
+Wynand Alkema <Wynand.Alkema at cgb.ki.se>
+.SS "new"
+.IX Subsection "new"
+.Vb 10
+\& Title : new
+\& Usage : my $pattrengen = TFBS::PatternGen::AnnSpec\->new(%args);
+\& Function: the constructor for the TFBS::PatternGen::AnnSpec object
+\& Returns : a TFBS::PatternGen::AnnSpec object
+\& Args : This method takes named arguments;
+\& you must specify one of the following three
+\& \-seq_list # a reference to an array of strings
+\& # and/or Bio::Seq objects
+\& # or
+\& \-seq_stream # A Bio::SeqIO object
+\& # or
+\& \-seq_file # the name of the fasta file containing
+\& # all the sequences
+\& Other arguments are:
+\& \-binary # a fully qualified path to the \*(Aqmeme\*(Aq executable
+\& # OPTIONAL: default \*(Aqann\-spec\*(Aq
+\& \-additional_params # a string containing additional
+\& # command\-line switches for the
+\& # ann\-spec program
+.Ve
+.SS "pattern"
+.IX Subsection "pattern"
+.SS "all_patterns"
+.IX Subsection "all_patterns"
+.SS "patternSet"
+.IX Subsection "patternSet"
+The three methods listed above are used for the retrieval of patterns,
+and are common to all TFBS::PatternGen::* classes. Please
+see TFBS::PatternGen for details.
diff --git a/blib/man3/TFBS::PatternGen::AnnSpec::Motif.3pm b/blib/man3/TFBS::PatternGen::AnnSpec::Motif.3pm
new file mode 100644
index 0000000..715e137
--- /dev/null
+++ b/blib/man3/TFBS::PatternGen::AnnSpec::Motif.3pm
@@ -0,0 +1,153 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::PatternGen::AnnSpec::Motif 3"
+.TH TFBS::PatternGen::AnnSpec::Motif 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::PatternGen::AnnSpec::Motif \- class for unprocessed motifs and associated
+numerical scores created by the Gibbs program
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+TFBS::PatternGen::AnnSpec::Motif is used to store and manipulate unprocessed
+motifs and associated numerical scores created by the AnnSpec program. You do not
+normally want to create a TFBS::PatternGen::AnnSpec::Motif yourself. They are created
+by running TFBS::PatternGen::AnnSpec
+.SH "FEEDBACK"
+.IX Header "FEEDBACK"
+Please send bug reports and other comments to the author.
+.SH "AUTHOR \- Boris Lenhard and Wynand Alkema"
+.IX Header "AUTHOR - Boris Lenhard and Wynand Alkema"
+Boris Lenhard <Boris.Lenhard at cgb.ki.se>
+Wynand Alkema <Wynand.Alkema at cgb.ki.se>
+.SH "APPENDIX"
+.IX Header "APPENDIX"
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
diff --git a/blib/man3/TFBS::PatternGen::Elph.3pm b/blib/man3/TFBS::PatternGen::Elph.3pm
new file mode 100644
index 0000000..70dd08a
--- /dev/null
+++ b/blib/man3/TFBS::PatternGen::Elph.3pm
@@ -0,0 +1,190 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::PatternGen::Elph 3"
+.TH TFBS::PatternGen::Elph 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::PatternGen::Elph \- a pattern factory that uses the Elph program
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 5
+\& my $patterngen =
+\& TFBS::PatternGen::Elph\->new(\-seq_file=>\*(Aqsequences.fa\*(Aq,
+\& \-binary => \*(Aq/Elph/elph\*(Aq
+\& \-motif_length => [8, 9, 10],
+\& \-additional_params => \*(Aq\-x \-r \-e\*(Aq);
+\&
+\& my $pfm = $patterngen\->pattern(); # $pfm is now a TFBS::Matrix::PFM object
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+TFBS::PatternGen::Gibbs builds position frequency matrices
+using an advanced Gibbs sampling algorithm implemented in external
+\&\fIGibbs\fR program by Chip Lawrence. The algorithm can produce
+multiple patterns from a single set of sequences.
+.SS "new"
+.IX Subsection "new"
+.Vb 10
+\& Title : new
+\& Usage : my $db = TFBS::PatternGen::Gibbs\->new(%args);
+\& Function: the constructor for the TFBS::PatternGen::Gibbs object
+\& Returns : a TFBS::PatternGen::Gibbs object
+\& Args : This method takes named arguments;
+\& you must specify one of the following three
+\& \-seq_list # a reference to an array of strings
+\& # and/or Bio::Seq objects
+\& # or
+\& \-seq_stream # A Bio::SeqIO object
+\& # or
+\& \-seq_file # the name of the fasta file containing
+\& # all the sequences
+\& Other arguments are:
+\& \-binary # a fully qualified path to Gibbs executable
+\& # OPTIONAL: default \*(AqGibbs\*(Aq
+\& \-nr_hits # a presumed number of pattern occurrences in the
+\& # sequence set: it can be a single integer, e.g.
+\& # \-nr_hits => 24 , or a reference to an array of
+\& # integers, e.g \-nr_hits => [12, 24, 36]
+\& \-motif_length # an expected length of motif in nucleotides:
+\& # it can be a single integer, e.g.
+\& # \-motif_length => 8 , or a reference to an
+\& # array ofintegers, e.g \-motif_length => [8..12]
+\& \-additional_params # a string containing additional
+\& # command\-line switches for the
+\& # Gibbs program
+.Ve
+.SS "pattern"
+.IX Subsection "pattern"
+.SS "all_patterns"
+.IX Subsection "all_patterns"
+.SS "patternSet"
+.IX Subsection "patternSet"
+The three methods listed above are used for the retrieval of patterns,
+and are common to all TFBS::PatternGen::* classes. Please
+see TFBS::PatternGen for details.
diff --git a/blib/man3/TFBS::PatternGen::Elph::Motif.3pm b/blib/man3/TFBS::PatternGen::Elph::Motif.3pm
new file mode 100644
index 0000000..dc104fc
--- /dev/null
+++ b/blib/man3/TFBS::PatternGen::Elph::Motif.3pm
@@ -0,0 +1,152 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::PatternGen::Elph::Motif 3"
+.TH TFBS::PatternGen::Elph::Motif 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::PatternGen::AnnSpec::Motif \- class for unprocessed motifs and associated
+numerical scores created by the Gibbs program
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+TFBS::PatternGen::MEME::Motif is used to store and manipulate unprocessed
+motifs and associated numerical scores created by the meme program. You do not
+normally want to create a TFBS::PatternGen::MEME::Motif yourself. They are created
+by running TFBS::PatternGen::MEME
+.SH "FEEDBACK"
+.IX Header "FEEDBACK"
+Please send bug reports and other comments to the author.
+.SH "AUTHOR \- Wynand Alkema"
+.IX Header "AUTHOR - Wynand Alkema"
+Wynand Alkema <Wynand.Alkema at cgb.ki.se>
+.SH "APPENDIX"
+.IX Header "APPENDIX"
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
diff --git a/blib/man3/TFBS::PatternGen::Gibbs.3pm b/blib/man3/TFBS::PatternGen::Gibbs.3pm
new file mode 100644
index 0000000..e9c5c49
--- /dev/null
+++ b/blib/man3/TFBS::PatternGen::Gibbs.3pm
@@ -0,0 +1,191 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::PatternGen::Gibbs 3"
+.TH TFBS::PatternGen::Gibbs 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::PatternGen::Gibbs \- a pattern factory that uses Chip Lawrences Gibbs program
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 6
+\& my $patterngen =
+\& TFBS::PatternGen::Gibbs\->new(\-seq_file=>\*(Aqsequences.fa\*(Aq,
+\& \-binary => \*(Aq/Programs/Gibbs\-1.0/bin/Gibbs\*(Aq
+\& \-nr_hits => 24,
+\& \-motif_length => [8, 9, 10],
+\& \-additional_params => \*(Aq\-x \-r \-e\*(Aq);
+\&
+\& my $pfm = $patterngen\->pattern(); # $pfm is now a TFBS::Matrix::PFM object
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+TFBS::PatternGen::Gibbs builds position frequency matrices
+using an advanced Gibbs sampling algorithm implemented in external
+\&\fIGibbs\fR program by Chip Lawrence. The algorithm can produce
+multiple patterns from a single set of sequences.
+.SS "new"
+.IX Subsection "new"
+.Vb 10
+\& Title : new
+\& Usage : my $db = TFBS::PatternGen::Gibbs\->new(%args);
+\& Function: the constructor for the TFBS::PatternGen::Gibbs object
+\& Returns : a TFBS::PatternGen::Gibbs object
+\& Args : This method takes named arguments;
+\& you must specify one of the following three
+\& \-seq_list # a reference to an array of strings
+\& # and/or Bio::Seq objects
+\& # or
+\& \-seq_stream # A Bio::SeqIO object
+\& # or
+\& \-seq_file # the name of the fasta file containing
+\& # all the sequences
+\& Other arguments are:
+\& \-binary # a fully qualified path to Gibbs executable
+\& # OPTIONAL: default \*(AqGibbs\*(Aq
+\& \-nr_hits # a presumed number of pattern occurrences in the
+\& # sequence set: it can be a single integer, e.g.
+\& # \-nr_hits => 24 , or a reference to an array of
+\& # integers, e.g \-nr_hits => [12, 24, 36]
+\& \-motif_length # an expected length of motif in nucleotides:
+\& # it can be a single integer, e.g.
+\& # \-motif_length => 8 , or a reference to an
+\& # array ofintegers, e.g \-motif_length => [8..12]
+\& \-additional_params # a string containing additional
+\& # command\-line switches for the
+\& # Gibbs program
+.Ve
+.SS "pattern"
+.IX Subsection "pattern"
+.SS "all_patterns"
+.IX Subsection "all_patterns"
+.SS "patternSet"
+.IX Subsection "patternSet"
+The three methods listed above are used for the retrieval of patterns,
+and are common to all TFBS::PatternGen::* classes. Please
+see TFBS::PatternGen for details.
diff --git a/blib/man3/TFBS::PatternGen::Gibbs::Motif.3pm b/blib/man3/TFBS::PatternGen::Gibbs::Motif.3pm
new file mode 100644
index 0000000..e0aace7
--- /dev/null
+++ b/blib/man3/TFBS::PatternGen::Gibbs::Motif.3pm
@@ -0,0 +1,169 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::PatternGen::Gibbs::Motif 3"
+.TH TFBS::PatternGen::Gibbs::Motif 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::PatternGen::Gibbs::Motif \- class for unprocessed motifs and associated
+numerical scores created by the Gibbs program
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+TFBS::PatternGen::Gibbs::Motif is used to store and manipulate unprocessed
+motifs and associated numerical scores created by the Gibbs program. You do not
+normally want to create a TFBS::PatternGen::Gibbs::Motif yourself. They are created
+by running TFBS::PatternGen::Gibbs
+.SH "FEEDBACK"
+.IX Header "FEEDBACK"
+Please send bug reports and other comments to the author.
+.SH "AUTHOR \- Boris Lenhard and Wynand Alkema"
+.IX Header "AUTHOR - Boris Lenhard and Wynand Alkema"
+Boris Lenhard <Boris.Lenhard at cgb.ki.se>
+Wynand Alkema <Wynand.Alkema at cgb.ki.se>
+.SH "APPENDIX"
+.IX Header "APPENDIX"
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+.SS "\s-1MAP\s0"
+.IX Subsection "MAP"
+.Vb 7
+\& Title : MAP
+\& Usage : my $map_score = $motif\->MAP;
+\& Function: returns MAP score for the detected motif
+\& (This is a backward compatibility method. For consistency,
+\& you should use $motif\->tag(\*(AqMAP_score\*(Aq) instead
+\& Returns : float (a scalar)
+\& Args : none
+.Ve
+.SS "Other methods"
+.IX Subsection "Other methods"
+TFBS::PatterGen::Motif::Gibbs inherits from TFBS::PatternGen::Motif,
+which inherits from TFBS::Matrix. Please consult the documentation of those modules
+for additional available methods.
diff --git a/blib/man3/TFBS::PatternGen::MEME.3pm b/blib/man3/TFBS::PatternGen::MEME.3pm
new file mode 100644
index 0000000..f18b2aa
--- /dev/null
+++ b/blib/man3/TFBS::PatternGen::MEME.3pm
@@ -0,0 +1,188 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::PatternGen::MEME 3"
+.TH TFBS::PatternGen::MEME 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::PatternGen::MEME \- a pattern factory that uses the MEME program
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 3
+\& my $patterngen =
+\& TFBS::PatternGen::MEME\->new(\-seq_file=>\*(Aqsequences.fa\*(Aq,
+\& \-binary => \*(Aqmeme\*(Aq
+\&
+\&
+\& my $pfm = $patterngen\->pattern(); # $pfm is now a TFBS::Matrix::PFM object
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+TFBS::PatternGen::MEME builds position frequency matrices
+using an external program \s-1MEME\s0 written by Bailey and Elkan.
+For information and source code of \s-1MEME\s0 see
+.PP
+http://www.sdsc.edu/MEME
+.SH "FEEDBACK"
+.IX Header "FEEDBACK"
+Please send bug reports and other comments to the author.
+.SH "AUTHOR \- Wynand Alkema"
+.IX Header "AUTHOR - Wynand Alkema"
+Wynand Alkema <Wynand.Alkema at cgb.ki.se>
+.SS "new"
+.IX Subsection "new"
+.Vb 10
+\& Title : new
+\& Usage : my $pattrengen = TFBS::PatternGen::MEME\->new(%args);
+\& Function: the constructor for the TFBS::PatternGen::MEME object
+\& Returns : a TFBS::PatternGen::MEME object
+\& Args : This method takes named arguments;
+\& you must specify one of the following three
+\& \-seq_list # a reference to an array of strings
+\& # and/or Bio::Seq objects
+\& # or
+\& \-seq_stream # A Bio::SeqIO object
+\& # or
+\& \-seq_file # the name of the fasta file containing
+\& # all the sequences
+\& Other arguments are:
+\& \-binary # a fully qualified path to the \*(Aqmeme\*(Aq executable
+\& # OPTIONAL: default \*(Aqmeme\*(Aq
+\& \-additional_params # a string containing additional
+\& # command\-line switches for the
+\& # meme program
+.Ve
+.SS "pattern"
+.IX Subsection "pattern"
+.SS "all_patterns"
+.IX Subsection "all_patterns"
+.SS "patternSet"
+.IX Subsection "patternSet"
+The three methods listed above are used for the retrieval of patterns,
+and are common to all TFBS::PatternGen::* classes. Please
+see TFBS::PatternGen for details.
diff --git a/blib/man3/TFBS::PatternGen::MEME::Motif.3pm b/blib/man3/TFBS::PatternGen::MEME::Motif.3pm
new file mode 100644
index 0000000..b2a1dff
--- /dev/null
+++ b/blib/man3/TFBS::PatternGen::MEME::Motif.3pm
@@ -0,0 +1,152 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::PatternGen::MEME::Motif 3"
+.TH TFBS::PatternGen::MEME::Motif 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::PatternGen::AnnSpec::Motif \- class for unprocessed motifs and associated
+numerical scores created by the Gibbs program
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+TFBS::PatternGen::MEME::Motif is used to store and manipulate unprocessed
+motifs and associated numerical scores created by the meme program. You do not
+normally want to create a TFBS::PatternGen::MEME::Motif yourself. They are created
+by running TFBS::PatternGen::MEME
+.SH "FEEDBACK"
+.IX Header "FEEDBACK"
+Please send bug reports and other comments to the author.
+.SH "AUTHOR \- Wynand Alkema"
+.IX Header "AUTHOR - Wynand Alkema"
+Wynand Alkema <Wynand.Alkema at cgb.ki.se>
+.SH "APPENDIX"
+.IX Header "APPENDIX"
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
diff --git a/blib/man3/TFBS::PatternGen::SimplePFM.3pm b/blib/man3/TFBS::PatternGen::SimplePFM.3pm
new file mode 100644
index 0000000..a272ad9
--- /dev/null
+++ b/blib/man3/TFBS::PatternGen::SimplePFM.3pm
@@ -0,0 +1,180 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::PatternGen::SimplePFM 3"
+.TH TFBS::PatternGen::SimplePFM 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::PatternGen::SimplePFM \- a simple position frequency matrix factory
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 6
+\& my @sequences = qw( AAGCCT AGGCAT AAGCCT
+\& AAGCCT AGGCAT AGGCCT
+\& AGGCAT AGGTTT AGGCAT
+\& AGGCCT AGGCCT );
+\& my $patterngen =
+\& TFBS::PatternGen::SimplePFM\->new(\-seq_list=>\e at sequences);
+\&
+\& my $pfm = $patterngen\->pattern(); # $pfm is now a TFBS::Matrix::PFM object
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+TFBS::PatternGen::SimplePFM generates a position frequency matrix from a set
+of nucleotide sequences of equal length, The sequences can be passed either
+as strings, as Bio::Seq objects or as a fasta file.
+.PP
+This pattern generator always creates only one pattern from a given set
+of sequences.
+.SS "new"
+.IX Subsection "new"
+.Vb 10
+\& Title : new
+\& Usage : my $db = TFBS::PatternGen::SimplePFM\->new(%args);
+\& Function: the constructor for the TFBS::PatternGen::SimplePFM
+\& object
+\& Returns : a TFBS::PatternGen::SimplePFM obkect
+\& Args : This method takes named arguments;
+\& you must specify one of the following
+\& \-seq_list # a reference to an array of strings
+\& # and/or Bio::Seq objects
+\& # or
+\& \-seq_stream # A Bio::SeqIO object
+\& # or
+\& \-seq_file # the name of the fasta file containing
+\& # all the sequences
+.Ve
+.SS "pattern"
+.IX Subsection "pattern"
+.SS "all_patterns"
+.IX Subsection "all_patterns"
+.SS "patternSet"
+.IX Subsection "patternSet"
+The three above methods are used fro the retrieval of patterns,
+and are common to all TFBS::PatternGen::* classes. Please
+see TFBS::PatternGen for details.
diff --git a/blib/man3/TFBS::PatternGen::YMF.3pm b/blib/man3/TFBS::PatternGen::YMF.3pm
new file mode 100644
index 0000000..86f6a50
--- /dev/null
+++ b/blib/man3/TFBS::PatternGen::YMF.3pm
@@ -0,0 +1,188 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::PatternGen::YMF 3"
+.TH TFBS::PatternGen::YMF 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::PatternGen::MEME \- a pattern factory that uses the MEME program
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 3
+\& my $patterngen =
+\& TFBS::PatternGen::MEME\->new(\-seq_file=>\*(Aqsequences.fa\*(Aq,
+\& \-binary => \*(Aqmeme\*(Aq
+\&
+\&
+\& my $pfm = $patterngen\->pattern(); # $pfm is now a TFBS::Matrix::PFM object
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+TFBS::PatternGen::MEME builds position frequency matrices
+using an external program \s-1MEME\s0 written by Bailey and Elkan.
+For information and source code of \s-1MEME\s0 see
+.PP
+http://www.sdsc.edu/MEME
+.SH "FEEDBACK"
+.IX Header "FEEDBACK"
+Please send bug reports and other comments to the author.
+.SH "AUTHOR \- Wynand Alkema"
+.IX Header "AUTHOR - Wynand Alkema"
+Wynand Alkema <Wynand.Alkema at cgb.ki.se>
+.SS "new"
+.IX Subsection "new"
+.Vb 10
+\& Title : new
+\& Usage : my $patterngen = TFBS::PatternGen::YMF\->new(%args);
+\& Function: the constructor for the TFBS::PatternGen::MEME object
+\& Returns : a TFBS::PatternGen::MEME object
+\& Args : This method takes named arguments;
+\& you must specify one of the following three
+\& \-seq_list # a reference to an array of strings
+\& # and/or Bio::Seq objects
+\& # or
+\& \-seq_stream # A Bio::SeqIO object
+\& # or
+\& \-seq_file # the name of the fasta file containing
+\& # all the sequences
+\& Other arguments are:
+\& \-binary # a fully qualified path to the \*(Aqmeme\*(Aq executable
+\& # OPTIONAL: default \*(Aqmeme\*(Aq
+\& \-additional_params # a string containing additional
+\& # command\-line switches for the
+\& # meme program
+.Ve
+.SS "pattern"
+.IX Subsection "pattern"
+.SS "all_patterns"
+.IX Subsection "all_patterns"
+.SS "patternSet"
+.IX Subsection "patternSet"
+The three methods listed above are used for the retrieval of patterns,
+and are common to all TFBS::PatternGen::* classes. Please
+see TFBS::PatternGen for details.
diff --git a/blib/man3/TFBS::PatternGen::YMF::Motif.3pm b/blib/man3/TFBS::PatternGen::YMF::Motif.3pm
new file mode 100644
index 0000000..e59ffba
--- /dev/null
+++ b/blib/man3/TFBS::PatternGen::YMF::Motif.3pm
@@ -0,0 +1,152 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::PatternGen::YMF::Motif 3"
+.TH TFBS::PatternGen::YMF::Motif 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::PatternGen::YMF::Motif \- class for unprocessed motifs and associated
+numerical scores created by the YMF program
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+TFBS::PatternGen::YMF::Motif is used to store and manipulate unprocessed
+motifs and associated numerical scores created by the ymf program. You do not
+normally want to create a TFBS::PatternGen::YMF::Motif yourself. They are created
+by running TFBS::PatternGen::YMF
+.SH "FEEDBACK"
+.IX Header "FEEDBACK"
+Please send bug reports and other comments to the author.
+.SH "AUTHOR \- Wynand Alkema"
+.IX Header "AUTHOR - Wynand Alkema"
+Wynand Alkema <Wynand.Alkema at cgb.ki.se>
+.SH "APPENDIX"
+.IX Header "APPENDIX"
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
diff --git a/blib/man3/TFBS::PatternI.3pm b/blib/man3/TFBS::PatternI.3pm
new file mode 100644
index 0000000..d97b1b1
--- /dev/null
+++ b/blib/man3/TFBS::PatternI.3pm
@@ -0,0 +1,206 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::PatternI 3"
+.TH TFBS::PatternI 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::PatternI \- interface definition for all pattern objects (currently
+includes matrices and word (consensus and regular expressions )
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+TFBS::PatternI is a draft class that should contain general interface for matrix and other (future) pattern objects. It is not defined and not used yet, as I need to ponder over certain unresolved issues in general pattern definition. User feedback is more than welcome.
+.SH "FEEDBACK"
+.IX Header "FEEDBACK"
+Please send bug reports and other comments to the author.
+.SH "AUTHOR \- Boris Lenhard"
+.IX Header "AUTHOR - Boris Lenhard"
+Boris Lenhard <Boris.Lenhard at cgb.ki.se>
+.SH "APPENDIX"
+.IX Header "APPENDIX"
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+.SS "\s-1ID\s0"
+.IX Subsection "ID"
+.Vb 6
+\& Title : ID
+\& Usage : my $ID = $icm\->ID()
+\& $pfm\->ID(\*(AqM00119\*(Aq);
+\& Function: Get/set on the ID of the pattern (unique in a DB or a set)
+\& Returns : pattern ID (a string)
+\& Args : none for get, string for set
+.Ve
+.SS "name"
+.IX Subsection "name"
+.Vb 6
+\& Title : name
+\& Usage : my $name = $pwm\->name()
+\& $pfm\->name(\*(AqPPARgamma\*(Aq);
+\& Function: Get/set on the name of the pattern
+\& Returns : pattern name (a string)
+\& Args : none for get, string for set
+.Ve
+.SS "class"
+.IX Subsection "class"
+.Vb 6
+\& Title : class
+\& Usage : my $class = $pwm\->class()
+\& $pfm\->class(\*(Aqforkhead\*(Aq);
+\& Function: Get/set on the structural class of the pattern
+\& Returns : class name (a string)
+\& Args : none for get, string for set
+.Ve
+.SS "tag"
+.IX Subsection "tag"
+.Vb 7
+\& Title : tag
+\& Usage : my $acc = $pwm\->tag(\*(Aqacc\*(Aq)
+\& $pfm\->tag(source => "Gibbs");
+\& Function: Get/set on the structural class of the pattern
+\& Returns : tag value (a scalar/reference)
+\& Args : tag name (string) for get,
+\& tag name (string) and value (any scalar/reference) for set
+.Ve
+.SS "all_tags"
+.IX Subsection "all_tags"
+.Vb 5
+\& Title : all_tags
+\& Usage : my %tag = $pfm\->all_tags();
+\& Function: get a hash of all tags for a matrix
+\& Returns : a hash of all tag values keyed by tag name
+\& Args : none
+.Ve
+.SS "delete_tag"
+.IX Subsection "delete_tag"
+.Vb 5
+\& Title : delete_tag
+\& Usage : $pfm\->delete_tag(\*(Aqscore\*(Aq);
+\& Function: get a hash of all tags for a matrix
+\& Returns : nothing
+\& Args : a string (tag name)
+.Ve
diff --git a/blib/man3/TFBS::Site.3pm b/blib/man3/TFBS::Site.3pm
new file mode 100644
index 0000000..d916e4c
--- /dev/null
+++ b/blib/man3/TFBS::Site.3pm
@@ -0,0 +1,284 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::Site 3"
+.TH TFBS::Site 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::Site \- a nucleotide sequence feature object representing (possibly putative) transcription factor binding site.
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 2
+\& # 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
+\& }
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+TFBS::Site object holds data for a (possibly predicted) transcription factor binding site on a nucleotide sequence (start, end, strand, score, tags, as well as references to the corresponding sequence and pattern objects). TFBS::Site is a subclass of Bio::SeqFeature::Generic and has acces to all of its method. Additionally, it contains the \fIpattern()\fR method, an accessor for pattern object associated with the site object.
+.SH "FEEDBACK"
+.IX Header "FEEDBACK"
+Please send bug reports and other comments to the author.
+.SH "AUTHOR \- Boris Lenhard"
+.IX Header "AUTHOR - Boris Lenhard"
+Boris Lenhard <Boris.Lenhard at cgb.ki.se>
+.SH "APPENDIX"
+.IX Header "APPENDIX"
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+.PP
+TFBS::Site is a class that extends Bio::SeqFeature::Generic. Please consult Bio::SeqFeature::Generic documentation for other available methods.
+.SS "new"
+.IX Subsection "new"
+.Vb 12
+\& Title : new
+\& Usage : my $site = TFBS::Site\->new(%args)
+\& Function: constructor for the TFBS::Site object
+\& Returns : TFBS::Site object
+\& Args : \-start, # integer
+\& \-end, # integer
+\& \-strand, # \-1, 0 or 1
+\& \-score, # float
+\& \-source, # string (method used to detect it)
+\& \-primary, # string (primary tag)
+\& \-seqobj, # a Bio::Seq object
+\& \-pattern # a pattern object, usu. TFBS::Matrix::PWM
+.Ve
+.SS "pattern"
+.IX Subsection "pattern"
+.Vb 6
+\& 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 TFBS::Matrix::PWM object
+\& Args : pattern object (optional, for setting the pattern only)
+.Ve
+.SS "rel_score"
+.IX Subsection "rel_score"
+.Vb 7
+\& Title : rel_score
+\& Usage : my $percent_score = $site\->rel_score() * 100; # gets the pattern
+\& Function: gets relative score (between 0.0 to 1.0) with respect of the score
+\& range of the associated pattern (matrix)
+\& Returns : floating point number between 0 and 1,
+\& or undef if pattern not defined
+\& Args : none
+.Ve
+.SS "\s-1GFF\s0"
+.IX Subsection "GFF"
+.Vb 7
+\& Title : GFF
+\& Usage : print $site\->GFF();
+\& : print $site\->GFF($gff_formatter)
+\& Function: returns a "standard" GFF string \- the "generic" gff_string
+\& method is left untouched for possible customizations
+\& Returns : a string (NOT newline terminated! )
+\& Args : a $gff_formatter function reference (optional)
+.Ve
+.SS "location"
+.IX Subsection "location"
+.SS "start"
+.IX Subsection "start"
+.SS "end"
+.IX Subsection "end"
+.SS "length"
+.IX Subsection "length"
+.SS "score"
+.IX Subsection "score"
+.SS "frame"
+.IX Subsection "frame"
+.SS "sub_SeqFeature"
+.IX Subsection "sub_SeqFeature"
+.SS "add_sub_SeqFeature"
+.IX Subsection "add_sub_SeqFeature"
+.SS "flush_sub_SeqFeature"
+.IX Subsection "flush_sub_SeqFeature"
+.SS "primary_tag"
+.IX Subsection "primary_tag"
+.SS "source_tag"
+.IX Subsection "source_tag"
+.SS "has_tag"
+.IX Subsection "has_tag"
+.SS "add_tag_value"
+.IX Subsection "add_tag_value"
+.SS "each_tag_value"
+.IX Subsection "each_tag_value"
+.SS "all_tags"
+.IX Subsection "all_tags"
+.SS "remove_tag"
+.IX Subsection "remove_tag"
+.SS "attach_seq"
+.IX Subsection "attach_seq"
+.SS "seq"
+.IX Subsection "seq"
+.SS "entire_seq"
+.IX Subsection "entire_seq"
+.SS "seq_id"
+.IX Subsection "seq_id"
+.SS "annotation"
+.IX Subsection "annotation"
+.SS "gff_format"
+.IX Subsection "gff_format"
+.SS "gff_string"
+.IX Subsection "gff_string"
+The above methods are inherited from Bio::SeqFeature::Generic.
+Please see Bio::SeqFeature::Generic for details on their usage.
diff --git a/blib/man3/TFBS::SitePair.3pm b/blib/man3/TFBS::SitePair.3pm
new file mode 100644
index 0000000..fd9542f
--- /dev/null
+++ b/blib/man3/TFBS::SitePair.3pm
@@ -0,0 +1,162 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::SitePair 3"
+.TH TFBS::SitePair 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SS "pattern"
+.IX Subsection "pattern"
+.Vb 6
+\& Title : pattern
+\& Usage : my $pattern = $sitepair\->pattern(); # gets the pattern
+\& # sets the pattern to $pwm
+\& Function: gets the pattern object associated with the site pair
+\& Returns : pattern object, here TFBS::Matrix::PWM object
+\& Args : none (get\-only method)
+.Ve
+.SS "\s-1GFF\s0"
+.IX Subsection "GFF"
+.Vb 6
+\& Title : GFF
+\& Usage : print $site\->GFF();
+\& : print $site\->GFF($gff_formatter)
+\& Function: returns a "standard" multiline GFF string
+\& Returns : a string (multiline, newline terminated)
+\& Args : a $gff_formatter function reference (optional)
+.Ve
+.SS "site1 =head2 site2"
+.IX Subsection "site1 =head2 site2"
+.Vb 3
+\& Title : site1
+\& site2
+\& Usage : my $site1 = $sitepair\->site1();
+\&
+\& Function: Returns individual TFBS::Site objects, from the site pair
+\& Returns : a TFBS::Site
+\& Args : none
+.Ve
diff --git a/blib/man3/TFBS::SitePairSet.3pm b/blib/man3/TFBS::SitePairSet.3pm
new file mode 100644
index 0000000..840bc3c
--- /dev/null
+++ b/blib/man3/TFBS::SitePairSet.3pm
@@ -0,0 +1,241 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::SitePairSet 3"
+.TH TFBS::SitePairSet 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::SitePairSet \- a set of TFBS::SitePair objects
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\& my $site_pair_set = TFBS::SitePairSet\->new(@list_of_site_pair_objects);
+\&
+\& # add a TFBS::SitePair object to set:
+\&
+\& $site_pair_set\->add_site_pair($site_pair_obj);
+\&
+\& # append another TFBS::SitePairSet contents:
+\&
+\& $site_pair_set\->add_site_pair_set($site_pair_obj);
+\&
+\& # create an iterator:
+\&
+\& my $it = $site_pair_set\->Iterator(\-sort_by => \*(Aqstart\*(Aq);
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+TFBS::SitePairSet is an aggregate class that contains a collection
+of TFBS::SitePair objects. It can be created anew and filled with
+TFBS::Site::Pair object. It is also returned by \fIsearch_aln()\fR method call
+of TFBS::PatternI subclasses (e.g. TFBS::Matrix::PWM).
+.SH "FEEDBACK"
+.IX Header "FEEDBACK"
+Please send bug reports and other comments to the author.
+.SH "AUTHOR \- Boris Lenhard"
+.IX Header "AUTHOR - Boris Lenhard"
+Boris Lenhard <Boris.Lenhard at cgb.ki.se>
+.SH "APPENDIX"
+.IX Header "APPENDIX"
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+.SS "size"
+.IX Subsection "size"
+.Vb 5
+\& Title : size
+\& Usage : my $size = $sitepairset\->size()
+\& Function: returns a number of TFBS::SitePair objects contained in the set
+\& Returns : a scalar (integer)
+\& Args : none
+.Ve
+.SS "add_site_pair"
+.IX Subsection "add_site_pair"
+.Vb 6
+\& Title : add_site_pair
+\& Usage : $sitepairset\->add_site_pair($site_pair_object)
+\& $sitepairset\->add_site_pair(@list_of_site_pair_objects)
+\& Function: adds TFBS::SitePair objects to an existing TFBS::SitePairSet object
+\& Returns : $sitepairset object (usually ignored)
+\& Args : A list of TFBS::SitePair objects to add
+.Ve
+.SS "add_site_pair_set"
+.IX Subsection "add_site_pair_set"
+.Vb 8
+\& Title : add_site_pair_set
+\& Usage : $sitepairset\->add_site_pair_set($site_pair_set_object)
+\& $sitepairset\->add_site_pair(@list_of_site_pair_set_objects)
+\& Function: adds the contents of other TFBS::SitePairSet objects
+\& to an existing TFBS::SitePairSet object
+\& Returns : $sitepairset object (usually ignored)
+\& Args : A list of TFBS::SitePairSet objects whose contents should be
+\& added to $sitepairset
+.Ve
+.SS "Iterator"
+.IX Subsection "Iterator"
+.Vb 10
+\& Title : Iterator
+\& Usage : my $it = $sitepairset\->Iterator(\-sort_by=>\*(Aqstart\*(Aq);
+\& while (my $site_pair = $it\->next()) { #...
+\& Function: Returns an iterator object, used to iterate thorugh elements
+\& (TFBS::SitePair objects)
+\& Returns : a TFBS::_Iterator object
+\& Args : \-sort_by # optional \- currently it accepts
+\& # (default sort order in parenthetse)
+\& # \*(Aqname\*(Aq (pattern name, alphabetically)
+\& # \*(AqID\*(Aq (pattern/matrix ID, alphabetically)
+\& # \*(Aqstart\*(Aq (site start in sequence,
+\& # numerically,increasing order)
+\& # \*(Aqend\*(Aq (site end in sequence,
+\& # numerically, increasing order)
+\& # \*(Aqscore\*(Aq (1st site in pair,
+\& # numerically, decreasing order)
+\& \-reverse # optional \- reverses the default sorting order if true
+.Ve
+.SS "set1"
+.IX Subsection "set1"
+.SS "set2"
+.IX Subsection "set2"
+.Vb 7
+\& Title : set1
+\& set2
+\& Usage : my $siteset1 = $sitepairset\->set1();
+\& : my $siteset2 = $sitepairset\->set2()
+\& Function: Returns individual TFBS::SiteSet objects, from the site set pair
+\& Returns : A TFBS::SiteSet object
+\& Args : none
+.Ve
+.SS "\s-1GFF\s0"
+.IX Subsection "GFF"
+.Vb 6
+\& Title : GFF
+\& Usage : print $site\->GFF();
+\& : print $site\->GFF($gff_formatter)
+\& Function: returns a "standard" multiline GFF string
+\& Returns : a string (multiline, newline terminated)
+\& Args : a $gff_formatter function reference (optional)
+.Ve
diff --git a/blib/man3/TFBS::SiteSet.3pm b/blib/man3/TFBS::SiteSet.3pm
new file mode 100644
index 0000000..73599c2
--- /dev/null
+++ b/blib/man3/TFBS::SiteSet.3pm
@@ -0,0 +1,232 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::SiteSet 3"
+.TH TFBS::SiteSet 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::SiteSet \- a set of TFBS::Site objects
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\& my $site_set = TFBS::SiteSet\->new(@list_of_site_objects);
+\&
+\& # add a TFBS::Site object to set:
+\&
+\& $site_set\->add_site($site_obj);
+\&
+\& # append another TFBS::SiteSet contents:
+\&
+\& $site_pair_set\->add_site_set($site_obj);
+\&
+\& # create an iterator:
+\&
+\& my $it = $site_set\->Iterator(\-sort_by => \*(Aqstart\*(Aq);
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+TFBS::SiteSet is an aggregate class that contains a collection
+of TFBS::Site objects. It can be created anew and filled with
+TFBS::Site object. It is also returned by \fIsearch_seq()\fR method call
+of some TFBS::PatternI subclasses (e.g. TFBS::Matrix::PWM).
+.SH "FEEDBACK"
+.IX Header "FEEDBACK"
+Please send bug reports and other comments to the author.
+.SH "AUTHOR \- Boris Lenhard"
+.IX Header "AUTHOR - Boris Lenhard"
+Boris Lenhard <Boris.Lenhard at cgb.ki.se>
+.SH "APPENDIX"
+.IX Header "APPENDIX"
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+.SS "add_site"
+.IX Subsection "add_site"
+.Vb 6
+\& Title : add_site
+\& Usage : $siteset\->add_site($site_object)
+\& $siteset\->add_site(@list_of_site_objects)
+\& Function: adds TFBS::Site objects to an existing TFBS::SiteSet object
+\& Returns : $sitepair object (usually ignored)
+\& Args : A list of TFBS::Site objects to add
+.Ve
+.SS "add_site_set"
+.IX Subsection "add_site_set"
+.Vb 8
+\& Title : add_site_set
+\& Usage : $siteset\->add_site_set($site_set_object)
+\& $siteset\->add_site(@list_of_site_set_objects)
+\& Function: adds the contents of other TFBS::SiteSet objects
+\& to an existing TFBS::SiteSet object
+\& Returns : $siteset object (usually ignored)
+\& Args : A list of TFBS::SiteSet objects whose contents should be
+\& added to $siteset
+.Ve
+.SS "size"
+.IX Subsection "size"
+.Vb 5
+\& Title : size
+\& Usage : my $size = $siteset\->size()
+\& Function: returns a number of TFBS::Site objects contained in the set
+\& Returns : a scalar (integer)
+\& Args : none
+.Ve
+.SS "Iterator"
+.IX Subsection "Iterator"
+.Vb 10
+\& Title : Iterator
+\& Usage : my $siteset_iterator =
+\& $siteset\->Iterator(\-sort_by =>\*(Aqstart\*(Aq);
+\& while (my $site = $siteset_iterator\->next) {
+\& # do whatever you want with individual matrix objects
+\& }
+\& Function: Returns an iterator object that can be used to go through
+\& all members of the set (TFBS::Site objects)
+\& Returns : an iterator object (currently undocumentened in TFBS \-
+\& but understands the \*(Aqnext\*(Aq method)
+\& Args : \-sort_by # optional \- currently it accepts
+\& # (default sort order in parenthetse)
+\& # \*(Aqname\*(Aq (pattern name, alphabetically)
+\& # \*(AqID\*(Aq (pattern/matrix ID, alphabetically)
+\& # \*(Aqstart\*(Aq (site start in sequence,
+\& # numerically,increasing order)
+\& # \*(Aqend\*(Aq (site end in sequence,
+\& # numerically, increasing order)
+\& # \*(Aqscore\*(Aq (numerically, decreasing order)
+\&
+\& \-reverse # optional \- reverses the default sorting order if true
+.Ve
+.SS "\s-1GFF\s0"
+.IX Subsection "GFF"
+.Vb 6
+\& Title : GFF
+\& Usage : print $siteset\->GFF();
+\& : print $siteset\->GFF($gff_formatter)
+\& Function: returns a "standard" multiline GFF string
+\& Returns : a string (multiline, newline terminated)
+\& Args : a $gff_formatter function reference (optional)
+.Ve
diff --git a/blib/man3/TFBS::Word.3pm b/blib/man3/TFBS::Word.3pm
new file mode 100644
index 0000000..bfaba6f
--- /dev/null
+++ b/blib/man3/TFBS::Word.3pm
@@ -0,0 +1,161 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::Word 3"
+.TH TFBS::Word 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::Word \- base class for word\-based patterns
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+TFBS::Word is a base class consisting of universal constructor called by
+its subclasses (TFBS::Matrix::*), and word pattern manipulation methods that
+are independent of the word type. It is not meant to be instantiated itself.
+.SH "FEEDBACK"
+.IX Header "FEEDBACK"
+Please send bug reports and other comments to the author.
+.SH "AUTHOR \- Boris Lenhard"
+.IX Header "AUTHOR - Boris Lenhard"
+Boris Lenhard <Boris.Lenhard at cgb.ki.se>
+.SH "APPENDIX"
+.IX Header "APPENDIX"
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+.SS "new"
+.IX Subsection "new"
+.SS "word"
+.IX Subsection "word"
+.SS "validate_word"
+.IX Subsection "validate_word"
+Required in all subclasses
+.SS "length"
+.IX Subsection "length"
+.SS "search_seq"
+.IX Subsection "search_seq"
+.SS "search_aln"
+.IX Subsection "search_aln"
diff --git a/blib/man3/TFBS::Word::Consensus.3pm b/blib/man3/TFBS::Word::Consensus.3pm
new file mode 100644
index 0000000..577e8cd
--- /dev/null
+++ b/blib/man3/TFBS::Word::Consensus.3pm
@@ -0,0 +1,233 @@
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "TFBS::Word::Consensus 3"
+.TH TFBS::Word::Consensus 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+TFBS::Word \- IUPAC DNA consensus word\-based pattern class
+=head1 DESCRIPTION
+.PP
+TFBS::Word is a base class consisting of universal constructor called by
+its subclasses (TFBS::Matrix::*), and word pattern manipulation methods that
+are independent of the word type. It is not meant to be instantiated itself.
+.SH "FEEDBACK"
+.IX Header "FEEDBACK"
+Please send bug reports and other comments to the author.
+.SH "AUTHOR \- Boris Lenhard"
+.IX Header "AUTHOR - Boris Lenhard"
+Boris Lenhard <Boris.Lenhard at cgb.ki.se>
+.SH "APPENDIX"
+.IX Header "APPENDIX"
+The rest of the documentation details each of the object
+methods. Internal methods are preceded with an underscore.
+.SS "new"
+.IX Subsection "new"
+.Vb 8
+\& Title : new
+\& Usage : my $pwm = TFBS::Matrix::PWM\->new(%args)
+\& Function: constructor for the TFBS::Matrix::PWM object
+\& Returns : a new TFBS::Matrix::PWM object
+\& Args : # 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
+.Ve
+.SS "search_seq"
+.IX Subsection "search_seq"
+.Vb 6
+\& 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::SiteSet object
+\& 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
+.Ve
+.SS "search_aln"
+.IX Subsection "search_aln"
+.Vb 10
+\& 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: 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::SitePairSet object
+\& 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%"
+.Ve
+.SS "to_PWM"
+.IX Subsection "to_PWM"
+.SS "validate_word"
+.IX Subsection "validate_word"
+.SS "length"
+.IX Subsection "length"
diff --git a/blib/script/.exists b/blib/script/.exists
new file mode 100644
index 0000000..e69de29
diff --git a/pm_to_blib b/pm_to_blib
new file mode 100644
index 0000000..e69de29
diff --git a/pod2htmd.tmp b/pod2htmd.tmp
deleted file mode 100644
index 8eac626..0000000
--- a/pod2htmd.tmp
+++ /dev/null
@@ -1,52 +0,0 @@
-TFBS
-.
-PatternGen ../../../Repos/github/TFBS/TFBS/PatternGen
-PatternGen::AnnSpec ../../../Repos/github/TFBS/TFBS/PatternGen/AnnSpec
-PatternGen::Gibbs::.svn::text-base::Motif.pm.svn-base ../../../Repos/github/TFBS/TFBS/PatternGen/Gibbs/.svn/text-base/Motif.pm
-PatternGen::Elph ../../../Repos/github/TFBS/TFBS/PatternGen/Elph
-PatternGen::MEME::.svn::text-base::Motif.pm.svn-base ../../../Repos/github/TFBS/TFBS/PatternGen/MEME/.svn/text-base/Motif.pm
-TFFM ../../../Repos/github/TFBS/TFBS/TFFM
-PatternGen::.svn::text-base::Gibbs.pm.svn-base ../../../Repos/github/TFBS/TFBS/PatternGen/.svn/text-base/Gibbs.pm
-DB::JASPAR6 ../../../Repos/github/TFBS/TFBS/DB/JASPAR6
-DB::FlatFileDir ../../../Repos/github/TFBS/TFBS/DB/FlatFileDir
-DB::JASPAR5 ../../../Repos/github/TFBS/TFBS/DB/JASPAR5
-PatternGen::Gibbs::Motif ../../../Repos/github/TFBS/TFBS/PatternGen/Gibbs/Motif
-Site ../../../Repos/github/TFBS/TFBS/Site
-Matrix::PWM ../../../Repos/github/TFBS/TFBS/Matrix/PWM
-Word::.svn::text-base::Consensus.pm.svn-base ../../../Repos/github/TFBS/TFBS/Word/.svn/text-base/Consensus.pm
-PatternGen::YMF::.svn::text-base::Motif.pm.svn-base ../../../Repos/github/TFBS/TFBS/PatternGen/YMF/.svn/text-base/Motif.pm
-PatternGen::.svn::text-base::SimplePFM.pm.svn-base ../../../Repos/github/TFBS/TFBS/PatternGen/.svn/text-base/SimplePFM.pm
-Matrix::.svn::text-base::PWM.pm.svn-base ../../../Repos/github/TFBS/TFBS/Matrix/.svn/text-base/PWM.pm
-Matrix ../../../Repos/github/TFBS/TFBS/Matrix
-PatternGen::AnnSpec::Motif ../../../Repos/github/TFBS/TFBS/PatternGen/AnnSpec/Motif
-PatternGen::Elph::Motif ../../../Repos/github/TFBS/TFBS/PatternGen/Elph/Motif
-Matrix::.svn::text-base::PFM.pm.svn-base ../../../Repos/github/TFBS/TFBS/Matrix/.svn/text-base/PFM.pm
-PatternGen::.svn::text-base::Elph.pm.svn-base ../../../Repos/github/TFBS/TFBS/PatternGen/.svn/text-base/Elph.pm
-Matrix::.svn::text-base::ICM.pm.svn-base ../../../Repos/github/TFBS/TFBS/Matrix/.svn/text-base/ICM.pm
-SitePairSet ../../../Repos/github/TFBS/TFBS/SitePairSet
-DB::JASPAR2 ../../../Repos/github/TFBS/TFBS/DB/JASPAR2
-DB::JASPAR4 ../../../Repos/github/TFBS/TFBS/DB/JASPAR4
-PatternGen::Elph::.svn::text-base::Motif.pm.svn-base ../../../Repos/github/TFBS/TFBS/PatternGen/Elph/.svn/text-base/Motif.pm
-PatternGen::YMF::Motif ../../../Repos/github/TFBS/TFBS/PatternGen/YMF/Motif
-SitePair ../../../Repos/github/TFBS/TFBS/SitePair
-PatternGen::SimplePFM ../../../Repos/github/TFBS/TFBS/PatternGen/SimplePFM
-PatternGen::.svn::text-base::MEME.pm.svn-base ../../../Repos/github/TFBS/TFBS/PatternGen/.svn/text-base/MEME.pm
-PatternGen::MEME ../../../Repos/github/TFBS/TFBS/PatternGen/MEME
-DB::TRANSFAC ../../../Repos/github/TFBS/TFBS/DB/TRANSFAC
-PatternGen::MEME::Motif ../../../Repos/github/TFBS/TFBS/PatternGen/MEME/Motif
-PatternI ../../../Repos/github/TFBS/TFBS/PatternI
-Matrix::ICM ../../../Repos/github/TFBS/TFBS/Matrix/ICM
-DB::JASPAR ../../../Repos/github/TFBS/TFBS/DB/JASPAR
-PatternGen::Gibbs ../../../Repos/github/TFBS/TFBS/PatternGen/Gibbs
-SiteSet ../../../Repos/github/TFBS/TFBS/SiteSet
-Matrix::Alignment ../../../Repos/github/TFBS/TFBS/Matrix/Alignment
-DB::LocalTRANSFAC ../../../Repos/github/TFBS/TFBS/DB/LocalTRANSFAC
-Word::Consensus ../../../Repos/github/TFBS/TFBS/Word/Consensus
-Word ../../../Repos/github/TFBS/TFBS/Word
-PatternGen::.svn::text-base::YMF.pm.svn-base ../../../Repos/github/TFBS/TFBS/PatternGen/.svn/text-base/YMF.pm
-MatrixSet ../../../Repos/github/TFBS/TFBS/MatrixSet
-PatternGen::YMF ../../../Repos/github/TFBS/TFBS/PatternGen/YMF
-Matrix::.svn::text-base::Alignment.pm.svn-base ../../../Repos/github/TFBS/TFBS/Matrix/.svn/text-base/Alignment.pm
-Matrix::PFM ../../../Repos/github/TFBS/TFBS/Matrix/PFM
-PatternGen::.svn::text-base::AnnSpec.pm.svn-base ../../../Repos/github/TFBS/TFBS/PatternGen/.svn/text-base/AnnSpec.pm
-PatternGen::AnnSpec::.svn::text-base::Motif.pm.svn-base ../../../Repos/github/TFBS/TFBS/PatternGen/AnnSpec/.svn/text-base/Motif.pm
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/libtfbs-perl.git
More information about the debian-med-commit
mailing list