How to create a genotype database for use as a DAS source

Assuming your data is of the following format seperated by tabs (genotype id, chromosome, position, genotype bases):

rs7763	16	544555	TT
rs763158	16	546105	GG
rs7190878	16	549131	AG
rs4984890	16	552699	CT
rs710925	16	573355	AG

if you have access to a mysql database and admin priveleges you can use the following commands to set up a database called genotype1 with a table called genotype.

First you have to make sure you have a user set up for creating and reading from the database:

if it’s not a production database you can usually log in as root using:

-mysql -u uroot

Then run the following commands:

create database genotype1;

grant all privileges on genotype1.* to genotype@localhost;

then type exit and then login as the genotype user.

mysql -u genotype -p

use genotype;

CREATE TABLE `genotype` (

`rs_id` varchar (100) NOT NULL,

`chromosome` mediumint(8) unsigned NOT NULL,

`position` bigint(8) unsigned NOT NULL,

`bases` varchar(5) default NULL,

PRIMARY KEY  (`rs_id`)


you now have a database called genotype1 set up with a user genotype and password genotype (which obviously you would set to something different).

To load your data file using the unix command line and not when logged into mysql:

mysqlimport -u genotype -pgenotype –local genotype1 genotype.txt

loads the genotype.txt file into the genotype table (note file names need to be same as table name) into the genotype1 database.

Or from the mysql command line: LOAD DATA INFILE ‘/Users/jw12/genotype.txt’ into table genotype;
example configuration for MyDAS:

<datasource uri="person1"

title="genotype db person1"

description="genotype db person1"



<maintainer email="" />

<version uri="person1" created="2010-04-01">


<coordinates uri=""




test_range="ENSG00000160916">Ensembl,Gene_ID,Homo sapiens</coordinates>

<capability type="das1:sources" query_uri="http://localhost:8080/das/ensemblTest" />

<capability type="das1:types" query_uri="http://localhost:8080/das/ensemblTest/types" />

<capability type="das1:features" query_uri="http://localhost:8080/das/ensemblTest/features" />

<capability type="das1:feature-by-id" query_uri="http://localhost:8080/das/ensemblTest/features" />

<capability type="das1:stylesheet" query_uri="http://localhost:8080/das/ensemblTest/stylesheet" />

<capability type="das1:unknown-feature" />

<capability     type="das1:maxbins"     />

<capability     type="das1:entry_points"        />






  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: