Giter Club home page Giter Club logo

basic-browser's Introduction

Basic Browser

Basic Browser can take ChIA-PIPE outputs: https://github.com/TheJacksonLaboratory/chia_pipe

Running Basic Browser

Below are the instructions to run Basic Browser docker image.

Install Docker

How to build the Basic Browser Docker image

git clone https://github.com/TheJacksonLaboratory/basic-browser.git
cd basic-browser
docker build -t basic-browser .
cd ..

How to run Basic Browser

This creates a mongodb and mysql Docker volumes, which is useful for data persistence

docker run  -d --rm --name basic-browser \
       -p 8000:8000 \
       -v mongodb:/data/db \
       -v mysql:/var/lib/mysql \
       basic-browser

The basic browser should be running at localhost:8000. To upload track and data into the Basic Browser, a new TTY terminal must be opened in the container.

docker exec -ti basic-browser bash

Create a username and password through the terminal the first time

# this should create the superuser 'root'
cd /opt/basic/
$BASIC_DIR/_py/bin/python manage.py createsuperuser

About Data persistence

When you ran the above command to start Basic browser, it created two volumes mongodb and mysql. You can see the volumes using the command docker volume ls. For the data to persist between sessions and between containers, make sure you dont delete these volumes. If you need to delete the volumes for various reasons, please run 'docker volume rm mysql mongodb'.

To delete the basic browser container

docker rm -f $(docker ps --filter name=basic-browser -q)

To stop the basic browser container

Stopping the container will remove the container, as we are running the container with "--rm" option

docker stop basic-browser

To restart Basic Browser

docker restart basic-browser

To make sure mysql, mongod, and basic browser are running

supervisorctl status all

A note about passwords

The mysql root password is not set. If you would like to set the root password, follow these steps

# Login to the machine
docker exec -ti basic-browser bash

# Update the mysql password
mysql -u root -p
mysql> use mysql;
mysql> update user set password=PASSWORD('your_new_password') where User='root';
mysql> flush privileges;

Genome Installation File Download Links

(1) Genome Annotation File: http://genome.ucsc.edu/cgi-bin/hgTables

(2) Go Term File: http://www.geneontology.org/doc/GO.terms_alt_ids

(3) Gene Association File:

human: ftp://ftp.ebi.ac.uk/pub/databases/GO/goa/HUMAN/goa_human.gaf.gz

fly: ftp://ftp.ebi.ac.uk/pub/databases/GO/goa/FLY/goa_fly.gaf.gz

Install Genome Assembly on Basic Browser

(1)Make sure Basic Browser is running at localhost:8000, and you are able to login using your username and password, and a TTY terminal is opened in the container.

(2)Make sure your files to upload are accessible within the basic browser session. To mount the files in ~/Documents/BasicBrowser/

docker run  -d --rm --name basic-browser -p 8000:8000 \
-v ~/Documents/BasicBrowser/:/Documents -v mongodb:/data/db \
-v mysql:/var/lib/mysql \
basic-browser

The files in ~/Documents/BasicBrowser/ will be accessible in /Documents inside basic browser docker

(3)To create a folder to save gene annotation, go to admin page -> Librarys -> Add library -> Create a library name (for example, "annotation") -> save

(4)Install the genome assembly

source /opt/basic/_py/bin/activate
_py/bin/python console/table_util.py create hg19 "UCSC Known Genes (hg19)"
ID=1
_py/bin/python console/table_util.py load_genes ${ID} -i /Documents/data/hg19_known_genes.txt --assoc /Documents/data/gene_association.goa_human --terms /Documents/data/GO.terms_alt_ids
_py/bin/python console/track_util.py gen_genes hg19

Upload Tracks to Basic Browser

(1)Make sure your files to upload are accessible within the basic browser session. To mount the files in ~/Documents/BasicBrowser/

docker run  -d --rm --name basic-browser -p 8000:8000 \
-v ~/Documents/BasicBrowser/:/Documents -v mongodb:/data/db \
-v mysql:/var/lib/mysql \
basic-browser

The files in ~/Documents/BasicBrowser/ will be accessible in /Documents inside basic browser docker

(2)To create a folder to organize tracks, go to admin page -> Librarys -> Add library -> Create a library name (for example, "test_upload") -> save

Upload Coverage Track

(1) To upload the coverage track, first create a table for coverage, select a folder ("test_upload"), and give the name of the track ("GM12878_RNAPII_coverage")

alias TABLE="/opt/basic/_py/bin/python /opt/basic/console/table_util.py" 
alias TRACK="/opt/basic/_py/bin/python /opt/basic/console/track_util.py"
TABLE create hg19 -l "test_upload" "GM12878_RNAPII_coverage"

(2) Then you will get a TABLE ID for this track, and save the ID to the corresponding variable:

COV=2

(3) Upload coverage track:

TRACK gen_cov max ${COV} /Documents/GM12878_RNAPII_insitu.for.BROWSER.bedgraph

Upload Peak Track

(1) To upload the peak track, first create a table for peak, select a folder ("test_upload"), and give the name of the track ("GM12878_RNAPII_peak")

alias TABLE="/opt/basic/_py/bin/python /opt/basic/console/table_util.py" 
alias TRACK="/opt/basic/_py/bin/python /opt/basic/console/track_util.py"
TABLE create hg19 -l "test_upload" "GM12878_RNAPII_peak"

(2) Then you will get a TABLE ID for this track, and save the ID to the corresponding variable:

BED=4

(3) Upload peak track:

TABLE load ${BED} 1:chrom 2:start 3:end -i /Documents/GM12878_RNAPII_insitu.for.BROWSER.spp.z6.broadPeak
TRACK new ${BED} scls

Upload Loop Track

alias TABLE="/opt/basic/_py/bin/python /opt/basic/console/table_util.py" 
alias TRACK="/opt/basic/_py/bin/python /opt/basic/console/track_util.py"
TABLE create hg19 -l "test_upload" "GM12878_RNAPII_loop"
CLU=3
TABLE load ${CLU} 1:chrom 2:start 3:end 4:chrom2 5:start2 6:end2 7:score -i /Documents/GM12878_RNAPII_insitu.e500.clusters.cis.BE3
TRACK new ${CLU} curv

Configure Loop Track

Go to Tracks in Admin page and select the loop track you just uploaded, under Metadatas "Key" and "Value", set:

Key="options", Value= { "opacity": 0.02, "outbound": { "show": false }, "yaxis": { "log": 10.0 } }

Go to the next row,

Key="series", Value= [{"color": "red"}]

basic-browser's People

Contributors

capurso-jax avatar jiahuiwanggit avatar snamburi3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

basic-browser's Issues

[Go Term File Loss] Problem in Geome Installation

Hi,

I got some problem in hg38 genome installation. The Gene Ontology Resource seems stop providing GO.terms_alt_ids. So I tried to install without Go Term File and Gene Association File. But it reported an error.

(_py) [root@5ef180056e76 basic]# _py/bin/python console/table_util.py load_genes 5 -i /Documents/hg38.gtf 
/opt/basic/console/../table/traits.py:43: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  _TRAITS = yaml.load(f)
/opt/basic/console/../engine/table_load.py:23: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  raw_presets = yaml.load(f)
Traceback (most recent call last):
  File "console/table_util.py", line 16, in <module>
    pluginsys.execute('table')
  File "/opt/basic/console/pluginsys.py", line 53, in execute
    args.func(args)
  File "/opt/basic/console/../console/plugins/table/load_genes.py", line 172, in _parser_callback
    _upload_ucscfile(genefile, table_id)
  File "/opt/basic/console/../console/plugins/table/load_genes.py", line 64, in _upload_ucscfile
    for p, q in _determine_mapping(_MAPPING_NAME, header).iteritems()]
  File "/opt/basic/console/../console/plugins/table/load_genes.py", line 197, in _determine_mapping
    raise Exception('No column found that satisfies regex /%s/' % pat)
Exception: No column found that satisfies regex /.strand$/

I wonder if it is the problem of lacking Go Term File and Gene Association File. Where can I download or how can I thansform the existing files to Go Term and Association files for hg38.

Thank you for any help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.