Virus discovery is super fun!
The following works on Ubuntu 14.04 LTS.
$ cd /tmp
$ curl -L 'http://downloads.sourceforge.net/freetype/freetype-2.5.3.tar.bz2' > freetype-2.5.3.tar.bz2
$ tar xfj freetype-2.5.3.tar.bz2
$ cd freetype-2.5.3
$ sed -i -e "/AUX.*.gxvalid/s@^# @@" -e "/AUX.*.otvalid/s@^# @@" modules.cfg
$ sed -ri -e 's:.*(#.*SUBPIXEL.*) .*:\1:' include/config/ftoption.h
$ ./configure --prefix=/usr --disable-static
$ make
$ sudo make install
$ sudo apt-get install python-pip pkg-config python-dev libpng-dev mysql-server libmysqlclient-dev
$ sudo pip install virtualenv
$ virtualenv env
$ . env/bin/activate
$ git clone git@github.com:acorg/dark-matter.git
$ cd dark-matter
$ pip install -r requirements.txt
You may want to add the dark-matter
directory (the one that was created
above by git clone
) to your PYTHONPATH
.
In order to be able to filter by taxonomic level, you need make a mysql database with the NCBI taxonomy information according to the following format:
- Download the taxonomy database files from NCBI:
ftp://ftp.ncbi.nih.gov/pub/taxonomy/gi_taxid_nucl.dmp.gz This file contains a list that maps the gi number of each database record to a taxonomy id.
ftp://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz This directory contains multiple files, the ones we need are nodes.dmp and names.dmp.
- Install mySQL:
$ brew install mysql
$ unset TMPDIR
$ mysql_install_db --verbose --user='some username' --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
$ /usr/local/opt/mysql/bin/mysql_secure_installation
$ mysql.server start
$ /usr/local/opt/mysql/bin/mysql_secure_installation
$ mysql -uroot -p
- make a mySQL database:
mysql> create database ncbi_taxonomy;
- create the tables:
mysql> CREATE TABLE gi_taxid_nucl (gi INT, taxID INT);
mysql> LOAD DATA LOCAL INFILE 'path-to-dir/gi_taxid_nucl.dmp' INTO TABLE gi_taxid_nucl;
mysql> create table names (taxID INT, divider1 VARCHAR(300), name VARCHAR(300), divider2 VARCHAR(300), unique_name VARCHAR(300), divider3 VARCHAR(300), name_class VARCHAR(300));
mysql> LOAD DATA LOCAL INFILE 'path-to-dir/gi_taxid_nucl.dmp' INTO TABLE names;
mysql> create table nodes (taxID INT, divider1 VARCHAR(300), parent_taxID INT, divider2 VARCHAR(300), rank VARCHAR(300));
mysql> LOAD DATA LOCAL INFILE 'path-to-dir/nodes.dmp' INTO TABLE nodes;
- Index the databases:
mysql> ALTER TABLE gi_taxid_nucl ADD INDEX (gi);
mysql> ALTER TABLE nodes ADD INDEX (taxID);
mysql> ALTER TABLE names ADD INDEX (taxID);
The following works on Windows 8.1 with Cygwin. Alternative to sudo (which is found in the Linux instructions): run Cygwin as administrator or use cygstart --action=runas
followed by the command.
See: pip installation guide.
These can be found and downloaded through the Cygwin setup.exe process or using apt-cyg, if installed:
curl
make
python-setuptools
libmysqlclient-devel
mysql
mysqld
libmysqld-devel
libpng-devel
libboost_python-devel
pkg-config
Ensure you have GNU Make version 3.78.1 or higher by running make -v
.
$ cd /tmp
$ curl -L 'http://downloads.sourceforge.net/freetype/freetype-2.5.3.tar.bz2' > freetype-2.5.3.tar.bz2
$ tar xfj freetype-2.5.3.tar.bz2
$ cd freetype-2.5.3
$ sed -i -e "/AUX.*.gxvalid/s@^# @@" -e "/AUX.*.otvalid/s@^# @@" modules.cfg
$ sed -ri -e 's:.*(#.*SUBPIXEL.*) .*:\1:' include/config/ftoption.h
$ ./configure --prefix=/usr --disable-static
$ make
$ make install
$ git clone git@github.com:acorg/dark-matter.git
$ cd dark-matter
$ pip install -r requirements.txt
You may want to add the dark-matter
directory (the one that was created
above by git clone
) to your PYTHONPATH
.
In order to be able to filter by taxonomic level, you need make a mysql database with the NCBI taxonomy information according to the following format:
- Download the taxonomy database files from NCBI:
ftp://ftp.ncbi.nih.gov/pub/taxonomy/gi_taxid_nucl.dmp.gz This file contains a list that maps the gi number of each database record to a taxonomy id.
ftp://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz This directory contains multiple files, the ones we need are nodes.dmp and names.dmp.
-
Install mySQL: See: mySQL installer.
-
make a mySQL database:
mysql> CREATE DATABASE ncbi_taxonomy;
mysql> USE ncbi_taxonomy
- create the tables:
mysql> CREATE TABLE gi_taxid_nucl (gi INT, taxID INT);
mysql> LOAD DATA LOCAL INFILE 'path-to-dir/gi_taxid_nucl.dmp' INTO TABLE gi_taxid_nucl;
mysql> create table names (taxID INT, divider1 VARCHAR(300), name VARCHAR(300), divider2 VARCHAR(300), unique_name VARCHAR(300), divider3 VARCHAR(300), name_class VARCHAR(300));
mysql> LOAD DATA LOCAL INFILE 'path-to-dir/gi_taxid_nucl.dmp' INTO TABLE names;
mysql> create table nodes (taxID INT, divider1 VARCHAR(300), parent_taxID INT, divider2 VARCHAR(300), rank VARCHAR(300));
mysql> LOAD DATA LOCAL INFILE 'path-to-dir/nodes.dmp' INTO TABLE nodes;
- Index the databases:
mysql> ALTER TABLE gi_taxid_nucl ADD INDEX (gi);
mysql> ALTER TABLE nodes ADD INDEX (taxID);
mysql> ALTER TABLE names ADD INDEX (taxID);