Installation manual
Table of contents:
Introduction
CT-Finder is essentially composed of web interfaces coded in PHP and JavaScript, with a backend pipeline implemented in Perl. The web interfaces accept users’ inputs, including a number of parameter settings, and communicate with and invoke the backend pipeline to perform data processing and data analysis. The pipeline will generate multiple result files residing in the web server. Afterwards, the results will be displayed through highly interactive web interfaces.
Prerequisite
- Linux System (Ubuntu 14.04.2 was used for this manual)
Set ulimit parameters on ubuntu:
- sudo gedit /etc/security/limits.conf
Add two lines at the end of the file:
user_name soft nofile 70000
user_name hard nofile 75000
- sudo gedit /etc/pam.d/common-session
Add one line at the end of the file:
session required pam_limits.so
- Restart computer
- Apache (version: 2.4.7)
After installing, Type /usr/sbin/apache2 -v into the command line to find out which version.
- Perl (version: 5.18.2)
You most likely already have perl installed. Type perl -v into the command line to find out which version.
- PHP
Enter the following commands into the command line:
- sudo apt-get update
- sudo apt-get install libapache2-mod-php5
- sudo a2enmod php5
- sudo service apache2 restart
- Bowtie2 (version: 2.2.6)
- Samtools (version: 1.2)
After building and installing, don't forget to add the installing directory to your $PATH with the command export PATH=/where/to/install/bin:$PATH. Type samtools into the command line to check if you have installed samtools successfully.
- JBrowse (version: 1.11.6)
Setting up:
- Create a folder called “JBrowse” by the following commands under the root directory of the apache server (may be found at, for example, /var/www/ on Debian or Ubuntu systems, /var/www/html on Red Hat, Fedora, or SUSE. /var/www is used as an example in this guide). Enter the following commands into the command line:
sudo chmod o+w /var/www
cd /var/www
mkdir JBrowse
- After downloading JBrowse-1.11.6.zip (jbrowse.org), put the unzipped folder “JBrowse-1.11.6” into /var/www/JBrowse.
- Enter the following commands into the command line:
cd /var/www/JBrowse/JBrowse-1.11.6
./setup.sh
- If you are not able to install JBrowse successfully, you may try deleting the .cpanm file under your account using the following commands:
** cd /home/username
sudo rm -Rf .cpanm
cd /var/www/JBrowse/JBrowse-1.11.6
./setup.sh**
- Create a folder called “data” under /var/www/JBrowse/JBrowse-1.11.6
- Create a folder called “userData” under /var/www/JBrowse/JBrowse-1.11.6/data.
- ~~~~~~~~~~~~~~~~ To add any new reference genome, repeat steps in this block. Change “TAIR10.27” in this block to the reference genome name (e.g. GRCh38.81) that you want to add ~~~~~~~~~~~~~~~~~
- To add a reference genome, create a folder under /var/www/JBrowse/JBrowse-1.11.6/data. For example: create a folder called “TAIR10.27” under /var/www/JBrowse/JBrowse-1.11.6/data. Then create two folders - “genome” and “gff” - under the reference genome folder (/var/www/JBrowse/JBrowse-1.11.6/data/TAIR10.27).
- Download the TAIR10.27 genome (or any reference genome) from Ensembl. Download each chromosome separately, and then unzip them and put into the appropriate reference genome folder, e.g. /var/www/JBrowse/JBrowse-1.11.6/data/TAIR10.27/genome (Note: only unzipped chromosome files should be put in the /www/JBrowse/JBrowse-1.11.6/data/TAIR10.27/genome/ folder).
- Concatenate the genome into a single FASTA file. Model your commands after the following example:
cd /var/www/JBrowse/JBrowse-1.11.6/data/TAIR10.27/genome
cat * > TAIR10.27.fa
- Download the TAIR10.27 (or other reference genome) gff file from Ensembl. In this case you may directly download the entire gff file (rather than by individual chromosome), e.g. “Arabidopsis_thaliana.TAIR10.27.gff3.gz”. Unzip and rename it to “TAIR10.27.gff3” and put the file into /var/www/JBrowse/JBrowse-1.11.6/data/TAIR10.27/gff
- Configure JBrowse with your reference genome. Model your commands after the following example:
cd /var/www/JBrowse/JBrowse-1.11.6
./bin/prepare-refseqs.pl --fasta data/TAIR10.27/genome/TAIR10.27.fa --out data/TAIR10.27/
./bin/flatfile-to-json.pl --gff data/TAIR10.27/gff/TAIR10.27.gff3 --type transcript --trackLabel transcript --out data/TAIR10.27
- Access http://localhost/JBrowse/JBrowse-1.11.6/?data=data/TAIR10.27 to check that you have sucessfully added TAIR10 genome to JBrowse
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Enter the following commands into the command line:
** cd /var/www/JBrowse/JBrowse-1.11.6/data/
sudo chgrp www-data userData/
sudo chmod g+rwx userData/
sudo chmod o-w /var/www**
Installing CT-Finder
- TAIR10.27 will be used as the example reference genome in this manual. Change names of folders and files as appropriate for the reference genome you are using.
- Download ct-finder.zip (sourceforge.net) and unzip it. Put it into the root directory of the apache server (e.g. /var/www/ on Debian or Ubuntu systems, /var/www/html on Red Hat, Fedora, or SUSE. /var/www/ is used as an example in this guide).
- ~~~~~~~~~~~~~~~~ To add any new reference genome, repeat steps in this block. Change “TAIR10.27” in this block to the reference genome name (e.g. GRCh38.81) that you want to add. Note: the reference genome name here must be the same as above block part ~~~~~~~~~~~~~~~~~
- Create a folder named according to the genome name that you want to add under /var/www/ct-finder/bowtie2db/. E.g. “TAIR10.27” under /var/www/ct-finder/bowtie2db/.
- Copy the TAIR10.27 genome (TAIR10.27.fa) from /var/www/JBrowse/JBrowse-1.11.6/data/TAIR10.27/genome/ folder into /var/www/ct-finder/bowtie2db/TAIR10.27/ folder.
- Create a .txt file called “TAIR10.27_chr.txt”, including TAIR10.27 chromosome names, in the /var/www/ct-finder/bowtie2db/TAIR10.27/ folder (Note: all chromosome names in “TAIR10.27_chr.txt” file must be the same as the names in "TAIR10.27.fa" file). Refer to the format in /var/www/ct-finder/example/TAIR10.27_chr.txt.
- Build the bowtie2 index. This may take some time, depending on the size of the reference genome. Model your commands after the following examples:
cd /var/www/ct-finder/bowtie2db/TAIR10.27/
bowtie2-build TAIR10.27.fa TAIR10.27
- Change TAIR10.27 folder ownership and permissions using the following commands:
cd /var/www/ct-finder/bowtie2db/
sudo chgrp www-data TAIR10.27
sudo chmod g+rwx TAIR10.27
- Go to /var/www/ct-finder/interface folder to edit the files “Cas9.php”, “Cas9n.php” and “RFNs.php”. Open “Cas9.php”, and then add one line of code “<option value=TAIR10.27 >Ensembl Thale cress (Arabidopsis thaliana) genome TAIR10.27</option>” below “<option value=none>Choose an organism</option>” (Note: the "TAIR10.27" in "value=TAIR10.27" is the name of your reference genome folder). Do the same for “Cas9n.php” and “RFNs.php”.
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Go to /var/www/ct-finder/ folder to edit “root_path.php” file. Open it and Configure the following parameters to reflect the actual location paths in your setup:
- JBROWSE_USERDATA_PATH: set the absolute path for folder “userData” in JBrowse.
- JBROWSE_RELATIVE_PATH: set the relative path for folder “JBrowse-1.11.6” in JBrowse. Here it is relative to /var/www/ (the default apache root directory).
- JBROWSE_DATA_PATH: set the absolute path for folder “Data” in JBrowse.
- JBROWSE_USERDATA_RELATIVE_PATH: set the relative path for folder “userData” in JBrowse. Here it is relative to /var/www/ct-finder/proc/.
- Enter http://localhost/ct-finder/ into the browser to run CT-Finder.