Skip to content

htgt/WGE

Repository files navigation

    WGE Wellcome Sanger Institute Genome Editor
    Copyright (C) 2019  Genome Research Limited

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as
    published by the Free Software Foundation, either version 3 of the
    License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.


To use this app first create an empty postgres database, then:

log in to your db:
psql --host <host> --port <port> --user <username> <dbname>

load the sql:
begin;
\i ~/WGE/ddl/2/wge_tables_new.sql
commit;

Add the database connection information to the config file specified by the WGE_DBCONNECT_CONFIG environment variable:

WGE:
  schema_class: WGE::Model::Schema
  dsn: mydsn
  AutoCommit: 1
  user: my
  password: mypass
  
Set the WGE_DB environment variable to the name of the connection profile to use (e.g., "WGE" to use the above)

Bring up the webapp to make sure everything is working:
script/wge_server.pl --port 3030

Now the webapp can see your db lets load some data. Note: Make sure ensembl is installed and in your PERL5LIB.

We have included all the genes and exons (for mouse & human) from ensembl build 73, so load them:
perl -I lib ./bin/load_genes.pl human_genes_73.yaml

Or if you want to generate the yaml file:
perl ./bin/get_all_genes.pl <species>

To add all the crispr pairs to the db:
perl -I lib ./bin/get_all_genes.pl

If you make any changes to the db you can regenerate the DBIx::Class models with:
perl ./bin/dump_schema.pl

Create a separate test database before running tests.
Test::WGE::load_fixtures will delete all database content!

When you "use Test::WGE" the database connection profile named "WGE_TEST" will be used.
To override this with your own test database set the WGE_TEST_DB environment variable to e.g., "MY_WGE_TEST"