-
Notifications
You must be signed in to change notification settings - Fork 6
Setting up Ymap locally
Vladimir Gritsenko edited this page Dec 10, 2016
·
25 revisions
Ymap should work on any *nix environment. It may work on Windows, though it was not tested. The biggest problem seems to be samtools (which is not officially supported for Windows), but that perhaps can be solved with Cygwin.
- Install and set up Apache. Run Apache with the basic configuration to make sure it works with http://localhost/. (On Mac, steps 1-3 are documented here for Yosemite and here for previous versions.)
- Set up the PHP plugin for Apache. Test it with (for example) the phpinfo() call. Also install php-GD.
- In httpd.conf set the DocumentRoot and Directory settings to point to Ymap’s directory (or otherwise point to Ymap's folder, for example with virtual hosts).
- In php.ini, set the date.timezone, otherwise there will be a lot of junk errors regarding it in Apache’s error log.
- In Ymap’s directory, create a ‘users’ directory.
- Add your own user to the _www group with the command: ‘sudo dseditgroup -o edit -a your_username -t user _www’ (if you're installing on Linux, the httpd group may be 'www-data' or even something else).
- Set the group of ‘users’ to _www (or whatever group Apache uses) with the command: ‘chown :_www users’.
- Add write permissions for the group with the command: ‘chmod g+w users’.
- Optional - within 'users' there may be a special user, 'default', the data in which is shared among all other users. This is useful, for example, in setting up reference genomes for all system users. If you use this option, make sure it has the same permissions as the the 'users' parent folder.
- Install the following software. Note that later you will need to reference them in the scripts (see the following point), so you may want to install them into a single directory (especially if you don't have root on the machine). Versions are important - other versions may have slightly different behavior that will fail at runtime.
- bowtie2 - 2.1.0
- samtools - 1.3.1 (the linked file is a source distribution, needs to be compiled)
- JDK - 7 (for GATK) and 6 (for FastQC and Picard tools)
- FastQC - 0.10.1 (downloads for Mac, for Windows/Linux) 1. On Mac: note that the executable itself is under the /Contents/Resources/Java directory. 2. On Mac: version 0.10.1 doesn’t have execute permissions on the fastqc executable, so make sure to chmod +x it.
- GATK - 2.8 - needs to be built from source (as old binaries are not available). Get the repo from github, check out the 2.8 tag ('git checkout 2.8'), install ant, go to the GATK directory in the terminal, and run 'ant clean dist'.
- Picard tools - 1.105 - needs to be built from source, AND requires Java 6. The same protocol as with GATK - clone the repo, checkout tag 1.105. In the Picard directory, run (make sure to substitute 1.6 JDK folder with the appropriate folder on your machine): 'ant -Djava6.home=/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home -lib lib/ant package-commands'
- Seqtk - version hash 08b3625 - run ‘make’ in the source code directory.
- Python - 2.7. It is recommended to use a local Python installation, as Ymap requires numpy 1.8.0 (see below), which may clash with the system installation of Python. You can get the source code, and compile it locally (without running 'make install').
- Numpy - 1.8.0. Can be installed with pip: 'python -m pip install numpy==1.8.0'. Make sure to run the correct Python executable (if you decided to use a local Python installation in the previous step).
- PyPy - 2.5 (though later versions that implement Python 2.7 should work, too) - optional, will considerably speed up most Python scripts.
- Matlab - 2016a for optimal graphic output, earlier versions should work as well but might fail to generate good figures for genomes with high number of chromosomes (more then 14). An issue was observed on Mac where Apache required write permissions to /Users/user_that_runs_ymap/.matlab, so you may need to run 'chmod -R a+w' on it (or otherwise give Apache access).
- Make sure that all of the above executables can actually be executed by Apache. One way of doing this is to recursively set a+rx on the application folders (if you installed everything into a single folder, you can just run 'chmod -R a+rx path/to/software'). Apart from FastQC, PyPy was also known to exhibit permission issues on Mac.
- Create local_installed_programs.sh to point to the above software and add running privileges (chmod +x).
- Create config.sh for configuring Ymap and also give it running privileges.
- Install a reference genome - for example, the latest version of Candida albicans, Assembly 21.
- Reference genomes should only contain one haplotype. While you can upload a FASTA with both haplotypes (as is the case with Assembly 22), make sure to deselect one of the haplotypes during the installation process.
- Deselect the mtDNA from the chromosomes to process (and other chromosomes of length <= 50,000), otherwise it will cause errors down the line.
Browse to http://localhost/index.php to use Ymap.