Installing the Skylign Web Server
This web server can be downloaded and run locally or in a production environment as a dockerized Django application or by manually downloading all the perl dependencies and running it as a Catalyst server.
Running Skylign locally with Docker and Django
Download the repository files from https://github.com/ProteinsWebTeam/skylign
From the repository folder, run docker-compose to instantiate a local version of the Skylign web server.
# serve the app at http://localhost:8000/ $ docker-compose -f docker-compose.yml up -d --build
Server installation with Catalyst
For the purpose of these instructions it will be assumed that source files are placed in /opt/src.step 1 PNG support
libpng - required by Bio::HMM::Logo to produce PNG versions of the logos.
step 2 True Type font support (linux)
libfreetype - required to produce PNG logos on linux.
step 3 perl
Note: We recommend using perl 5.14 or higher, older versions have not been tested but could also work.
Download perl and install from source following their instructions or use the package manager of your choice.
Note: You may already have perl installed on your system, so this step may not be necessary.
step 4 supporting perl modules
You will then need to install the following perl modules. This can be done easily via cpan. For example, to install Catalyst:
$ cpan install Catalyst
Required by the Catalyst web framework.
- Config::General
- YAML::Syck
- Catalyst
- Catalyst::Plugin::Static::Simple
- Catalyst::Plugin::ConfigLoader
- Catalyst::Action::RenderView
- Catalyst::Controller::REST
Required by Bio::HMM::Logo
- Inline - version 0.53 or higher
- Imager
- Imager::File::PNG
- SVG
Required by Skylign
Installing the Catalyst Server
Note: If you have git installed, Skylign and Bio::HMM::Logo can be cloned from github. Otherwise a zip of the required files can be downloaded from the respective project page on the github website.
step 5 Bio::HMM::Logo
Skylign uses the Bio::HMM::Logo module for transforming alignments and HMMs into logos.
- Website - https://github.com/Janelia-Farm-Xfam/Bio-HMM-Logo
- Clone url - https://github.com/Janelia-Farm-Xfam/Bio-HMM-Logo.git
- Download - https://github.com/Janelia-Farm-Xfam/Bio-HMM-Logo/archive/master.zip
Install
$ cd /opt/src/Bio-HMM-Logo $ perl Makefile.PL $ make $ make test $ sudo make install
step 6 Skylign
The source code for the Skylign server is hosted on github.
- Website - https://github.com/Janelia-Farm-Xfam/LogoServer
- Clone url - https://github.com/Janelia-Farm-Xfam/LogoServer.git
- Download - https://github.com/Janelia-Farm-Xfam/LogoServer/archive/master.zip
Install
The validation code within the Skylign server requires the hmmer src during compilation. It is expecting it to be in /opt/src/hmmer, so we just create a link to the source we downloaded with the Bio::HMM::Logo module.
$ ln -s /opt/src/Bio-HMM-Logo/src /opt/src/hmmer
Each time a logo is created we store the result on disk for later retrieval. The website code expects the directory to exist, so we create it now.
$ mkdir /opt/data/logos
Starting the server.
Set the working directory to be the root of the LogoServer download.
$ cd /opt/src/LogoServer
Start the server in production mode on port 3000.
$ /path/to/perl ./script/logoserver_server HTTP::Server::PSGI: Accepting connections at http://0:3000/