Difference between revisions of "V44: viewing cool tracks, parallel loading track data and support dynamic track and hub URLs"

From wubrowse wiki
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 54: Line 54:
 
  COOL_DIR = "/srv/epgg/www/"
 
  COOL_DIR = "/srv/epgg/www/"
 
* update all the javascript code and you can view cool tracks now.
 
* update all the javascript code and you can view cool tracks now.
 +
* click '''cool''' track in the custom track submission panel
 +
[[File:V44-3.png|800px]]
 +
* filled in a relative path of the cool file to the '''COOL_DIR''' variable in '''coolUtils.py'''
 +
[[File:V44-4.png|800px]]
 +
* the cool file displayed in the browser
 +
[[File:V44-5.png|800px]]
 +
* also you can see the same dataset in hic and cool format displayed same in the browser
 +
[[File:V44-6.png|800px]]
 
==parallel loading track data==
 
==parallel loading track data==
 
* in order to increase the respond speed of the browser when viewing a big data hub, we modified the code to retrieve track data in parallel.
 
* in order to increase the respond speed of the browser when viewing a big data hub, we modified the code to retrieve track data in parallel.
[[File:V44-1.png]]
+
[[File:V44-1.png|800px]]
 
==dynamic URL support==
 
==dynamic URL support==
 
* tracks or data hub with special characters like ? or = or + etc can be used on the browser, you can directly submit them use the submission UI:
 
* tracks or data hub with special characters like ? or = or + etc can be used on the browser, you can directly submit them use the submission UI:
[[File:V44-1.png]]
+
[[File:V44-2.png|800px]]
 +
 
 
or if you want to use the one click URL, if need to encode your URL string like:
 
or if you want to use the one click URL, if need to encode your URL string like:
 
  http://epigenomegateway.wustl.edu/browser/?genome=hg19&datahub=http%3A%2F%2Fedcc-dev2.udes.genap.ca%2Fcgi-bin%2Fwashu.py%3Fsession%3D4308
 
  http://epigenomegateway.wustl.edu/browser/?genome=hg19&datahub=http%3A%2F%2Fedcc-dev2.udes.genap.ca%2Fcgi-bin%2Fwashu.py%3Fsession%3D4308

Latest revision as of 14:40, 6 September 2017

In this new release of browser, we are able to view cool tracks, parallel loading track data and support dynamic track and hub URLs.

Cool track

Cool format is another data format for long range interaction data, for more about this format, please check cooler's documentation: http://cooler.readthedocs.io/en/latest/quickstart.html, while since this format doesn't support access from network, so the cool track need be hosted locally at one browser mirror site.

install cooler and needed package

  • update your pip package and python libraries
 sudo pip install pip --upgrade
 sudo apt install -y python-pip python-dev
  • install cooler and update numpy
 sudo pip uninstall numpy
 sudo pip install numpy
 sudo pip install cooler
  • if you this error:
 #include "hdf5.h"

                  ^

compilation terminated.

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/h5py/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-YYDEMk-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/h5py
Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    load_entry_point('pip==1.5.4', 'console_scripts', 'pip')()
  File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 235, in main
    return command.main(cmd_args)
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 161, in main
    text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 40: ordinal not in range(128)

  • you can try
 sudo apt-get install libhdf5-10
 sudo apt-get install libhdf5-serial-dev
 sudo apt-get install libhdf5-dev
 sudo apt-get install libhdf5-cpp-11
 sudo apt install liblzma-dev lzma-dev
  • make a temporary folder at your Apache's root directory
cd /var/www/
mkdir .matplotlib
chmod 777 .matplotlib
  • grab the cooler folder form our repo, and pub on /usr/lib/cgi-bin/ folder, give the script executable permission
#at /usr/lib/cgi-bin/cooler folder
chmod +x *.py
  • update the COOL_DIR variable for the path which has the cool files:
vi coolUtils.py
COOL_DIR = "/srv/epgg/www/"
  • update all the javascript code and you can view cool tracks now.
  • click cool track in the custom track submission panel

V44-3.png

  • filled in a relative path of the cool file to the COOL_DIR variable in coolUtils.py

V44-4.png

  • the cool file displayed in the browser

V44-5.png

  • also you can see the same dataset in hic and cool format displayed same in the browser

V44-6.png

parallel loading track data

  • in order to increase the respond speed of the browser when viewing a big data hub, we modified the code to retrieve track data in parallel.

V44-1.png

dynamic URL support

  • tracks or data hub with special characters like ? or = or + etc can be used on the browser, you can directly submit them use the submission UI:

V44-2.png

or if you want to use the one click URL, if need to encode your URL string like:

http://epigenomegateway.wustl.edu/browser/?genome=hg19&datahub=http%3A%2F%2Fedcc-dev2.udes.genap.ca%2Fcgi-bin%2Fwashu.py%3Fsession%3D4308