Anno-J Genome Browser
  Instructions to set up your server environment
 

If you want to process your own data and set up environment on your computer, you
need to install some software packages before using AnnoJ genome browser:

Download document and instructions
Download STAR browser website framework AnnoJ genome browser server: http://tabit.ucsd.edu/sdec/ -------------------------------------------------------------------------------- Checklist for Required software packages: * GNU C++ http://gcc.gnu.org/ * PERL http://www.perl.org/ * FREETYPE http://www.freetype.org/ * ZLIB http://www.zlib.org * JPEG http://www.ijg.org/ * GD http://www.libgd.org/ * LIBPNG http://www.libpng.org/ * PHP http://www.php.net/ * Berkeley DB http://www.oracle.com/technetwork/database/berkeleydb/downloads/index.html * Apache http://httpd.apache.org/ Use following steps to install above mentioned packages. Normally GNU C++, PERL and APACHE have been installed in most Linux distributions. If they were installed already, skip it. JPEG, GD and LIBPNG are only required when you want to use graphical functions and modules in PHP. before installation, let's suppose: ${destdir} = /usr/local -------------------------------------------------------------------------------- 1. GNU C++ (required, may be installed defaultly) (1) download gcc-x.x.x.tar.gz from http://gcc.gnu.org/ (2) tar xzvf gcc-x.x.x.tar.gz (3) mkdir ${destdir}/gcc-x.x.x (4) gcc-x.x.x/configure --prefix=${destdir}/gcc-x.x.x --enable-threads=posix --disable-checking --enable--long-long --host=i386-redhat-linux --with-system-zlib --enable-languages=c,c++,java (5) make (6) make instal (7) add ${destdir}/gcc-x.x.x/bin to PATH environment variable (8) add ${destdir}/gcc-x.x.x/lib to LD_LIBRARY_PATH environment variable -------------------------------------------------------------------------------- 2. PERL (required, may be installed defaultly) (1) download perl-x.x.x.tar.gz from http://www.perl.org/ (2) tar xzvf perl-x.x.x.tar.gz (3) perl-x.x.x/configure (4) make (5) make test (6) make install -------------------------------------------------------------------------------- 3. FreeType (only required when using PHP graphical features) (1) download freetype-x.x.x.tar.gz from http://www.freetype.org/ (2) tar xzvf freetype-x.x.x.tar.gz (3) mkdir ${destdir}/freetype-x.x.x (4) freetype-x.x.x/configure --prefix=${destdir}/freetype-x.x.x (5) make (6) make install -------------------------------------------------------------------------------- 4. ZLIB (required, many packges need it) (1) download zlib-x.x.x.tar.gz from http://www.zlib.org (2) tar xzvf zlib-x.x.x.tar.gz (3) mkdir ${destdir}/zlib-x.x.x (4) zlib-x.x.x/configure --prefix=${destdir}/zlib-x.x.x (5) make (6) make install -------------------------------------------------------------------------------- 5. JPEG (only required when using PHP graphical features) (1) download jpeg.x.tar.gz from http://www.ijg.org/ (2) tar xzvf jpeg.x.tar.gz (3) mkdir ${destdir}/jpeg (4) jpeg.x/configure --prefix=${destdir}/jpeg (5) make (6) make install -------------------------------------------------------------------------------- 6. GD (only required when using PHP graphical features) (1) download gd-x.x.x.tar.gz from http://www.libgd.org/ (2) tar xzvf gd-x.x.x.tar.gz (3) mkdir ${destdir}/gd-x.x.x (4) gd-x.x.x/configure --prefix=${destdir}/gd-x.x.x --with-freetype =${destdri}/freetype-x.x.x --with-jpeg=${destdir}/jpeg (5) make (6) make install -------------------------------------------------------------------------------- 7. LIBPNG (only required when using PHP graphical features) (1) download from http://www.libpng.org/ (2) cp scripts/makefile.linux makefile (3) make (4) make install -------------------------------------------------------------------------------- 8. APACHE (required, may be installed defaultly) (1) download httpd-x.x.x.tar.gz from http://httpd.apache.org/ (2) tar xzvf httpd-x.x.x.tar.gz (3) mkdir ${destdir}/apache2 (4) cd {src}/srclib/apr (5) ./configure --prefix=/usr/local/apr-httpd/ (6) make (7) make install (8) cd ../apr-util (9) ./configure --prefix=/usr/local/apr-util-httpd/ --with-apr=/usr/local/apr-httpd/ (10) make (11) make install (12) cd {src} (13) ./configure --prefix=${destdir}/apache2 --enable-cgi --enable-ssl --enable-modules=most --enable-so --enable-proxy --enable-rewrite --sysconfdir=/etc --with-apr=/usr/local/apr-httpd --with-apr-util=/usr/local/apr-util-httpd (14) make (15) make install (16) modify httpd.conf to set up web server -------------------------------------------------------------------------------- 9. PHP (required) (1) download php-x.x.x.tar.gz from http://www.php.net/ (2) tar xzvf php-x.x.x.tar.gz (3) mkdir ${destdir}/php-x.x.x (4) php-x.x.x/configure --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --with-libdir=lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --disable-debug --with-pic --disable-rpath --without-pear --with-bz2 --with-curl --with-exec-dir=/usr/bin --with-freetype-dir=${destdir}/freetype-x.x.x --with-png-dir=/usr --enable-gd-native-ttf --without-gdbm --with-gettext --with-gmp --with-iconv --with-jpeg-dir=${destdir}/jpeg --with-openssl --with-pspell --with-pcre-regex=/usr --with-zlib=${destdir}/zlib --with-layout=GNU --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-wddx --with-kerberos --enable-ucd-snmp-hack --with-unixODBC=shared,/usr --enable-shmop --enable-calendar --with-mime-magic=/usr/share/file/magic.mime --without-sqlite --with-libxml-dir=/usr --with-apxs2=/usr/sbin/apxs --with-gd=${destdir}/gd-x.x.x --enable-shared (5) make (6) make test (7) make install (8) modify apache configuration file: httpd.conf sed -i 's/DirectoryIndex index.html/DirectoryIndex index.html index.php/g' httpd.conf sed -i '/AddType application\/x-tar .tgz/a\ AddType application\/x-httpd-php .php' httpd.conf sed -i '/AddType application\/x-tar .tgz/a\ AddType application\/x-httpd-source .phps' httpd.conf -------------------------------------------------------------------------------- 10. Berkeley DB (required) (1) download db-x.x.x.tar.gz from: http://www.oracle.com/technetwork/database/berkeleydb/downloads/index.html or just using db-4.6.18.tar.gz in this package. (2) tar xzvf db-x.x.x.tar.gz install C++ API: (3) cd db-x.x.x/build_unix (4) ../dist/configure --enable-cxx --enable-static --disable-shared (5) make (6) make install By default, the objects will be installed to /usr/local/BerkeleyDBx.x/. When you compile chipseq_proc, you should replace "/usr/local/BerkeleyDB4.6" with destination directory. install PHP module: (7) cd db-x.x.x/php_db* (8) phpize (9) ./configure --with-db4=${destdir}/db-x.x.x (10) make (11) make install (12) Then in your php.ini file add: extension=db4.so (13) mkdir ${your-db-dir} -------------------------------------------------------------------------------- 11. Install Proxy rewrite rules (1) In your httpd.conf, find the section:"AllowOverride None" and modify it to "AllowOverride All". This will allow apache server to support additional .htaccess file to rewrite url. (2) Create a .htaccess file and put it in the document root directory. Add the RewriteRules in your .htaccess file. Please find a .htaccess example file in this package. Note: Due to security problem, the program doesn't support retrieving data from crossdomain. Using the apache rewrite and proxy modules can help to solve this problem. That's the purpose of this section. -------------------------------------------------------------------------------- 12. Final step to test your system (1) put simple_counter.php to your web document root (2) visit http://yourdomain/simple_counter.php If you can see the correct result, your Apache, PHP and berkeley DB were correctly installed. -----------------------------------------------------------------------------------------------


 Process your data tracks
 

Instructions to process data tracks and finally generate html file which can be viewd 
as a configuration in AnnoJ genome browser.

Download the data processing package
AnnoJ genome browser server: http://tabit.ucsd.edu/sdec/ -------------------------------------------------------------------------------- Requirements: * GNU C++ * PERL * PHP * Berkeley DB * Apache web server -------------------------------------------------------------------------------- Suppose all of the above packages have beed installed and configured successfully, The install instructions of this package will be: cd src & vim Makefile CXXFLAGS += -I/usr/local/BerkeleyDB.4.6/include/ LDFLAGS := -L/usr/local/BerkeleyDB.4.6/lib/ -ldb_cxx -lpthread find the above two lines in Makefile and replace "/usr/local/BerkeleyDB.4.6/" with your Berkeley DB installation destination(please find the installation instructions of Berkeley DB in system configuration documentation). make & make install & Note: If the program was successfully compiled and installed, you will find chipseq_proc in your work directory. chipseq_proc is used to process data track files and then deposit them into Berkeley database, you can also use it separately. Usage:./chipseq_proc [options ....] -h --help Display this usage information -f --format Data format, in [BED | WIG | DEF] -r --db-dir Database directory, default: /data/anno-j-data/ -s --start Start position, default value is 0 -e --end End position, default value is 100000 -n --number Chromsome number, default is chromsome 1 -i --input Input data file name -c --create Create a database -q --query Query a database -d --delete Delete a database -l --list list all the databases -s --stat database statistics For example, ./chipseq_proc -c H3K4me1_tbl -f bed -r /data/anno-j-data -i ./H3K4me1 This command will create new tables H3K4me1_tbl for data track H3K4me1, data file is BED format and the database are located in /data/anno-j-data. Another example: ./chipseq_proc -q H3K4me1_tbl -n 1 -s 0 -e 1500000 It means searching data records from table H3K4me1_tbl, the range are between 0 and 1500000 in chromsome 1 NOTES: DEF format is similar to BED format. Each line has 6 columns: chromsome, start, end, strand, value, sequence. Value amd Sequence can be blank. -------------------------------------------------------------------------------- Run the program: Usage: ./gen_brw_url.pl [dirname] [data format] [db dir] [php dir] [url root] OR Usage: ./proc_tracks.pl [dirname] [data format] [db dir] [php dir] [url root] [dirname] data directory where data track files located [data format] data format of input data track files, format should be [BED|WIG|DEF], DEF format is similar to BED format. Each line has 6 columns: chromsome, start, end, strand, value, sequence. Value amd Sequence can be empty [db dir] your DB4 database directory, for example: /data/anno-j-data/ [php dir] php document root, for example: /var/www/html/sdec/ [url root] web server domain, for example: http://tabit.ucsd.edu/sdec/ [species] species of your data source, should be one of [HUMAN|MOUSE] for example: ./gen_brw_url.pl /data/IMR90/ bed /data/anno-j-data /var/www/html/sdec/ http://tabit.ucsd.edu/sdec/ This will process all the data tracks in /data/IMR90/ and output a final html URL: http://tabit.ucsd.edu/sdec/models/*.html Use this url then you can view your tracks in STAR genome browser. NOTES: difference between gen_brw_url.pl and proc_tracks.pl: proc_tracks.pl: generate PHP data fetchers. Those PHP fetchers are mainly used to retrieve data from database. They are located in your own web server and need to be registered at STAR genome browser website(http://tabit.ucsd.edu/sdec, register a new user firstly, then you can manage your own data tracks and configurations). You can also view other public data tracks. gen_brw_url.pl: generate all the files that are required for a independent instance of STAR genome browser. The data fetchers are same as above. The produced html url is the final configuration location corresponding to your input data tracks. You can not view public data tracks in STAR website along with your own data tracks. -----------------------------------------------------------------------------------------------