Question: How to integrate JBrowse with Django
gravatar for pyramidsnail
4.2 years ago by
pyramidsnail10 wrote:


I want to integrate the JBrowse genome browser into my website written with the Django framework but have no ideas how to realize it. Anyone can help with how to modify the and to realize a small test case? (like what they show on the homepage of JBrowse:

Many thanks

jbrowse django • 1.7k views
ADD COMMENTlink modified 24 months ago by bioinfosuite20 • written 4.2 years ago by pyramidsnail10
gravatar for cmdcolin
4.1 years ago by
United States
cmdcolin1.4k wrote:

You can probably put JBrowse in your static assets in django. There are some corner cases like handling Range requests, which I have heard might require special handling. The RangeHTTPServer package from danvk might be able to help though. Alternatively, you might consider fully putting jbrowse on a different apache http server, and using django for just handling certain aspects of your app, just because jbrowse is well suited to being deployed on a fully featured web server (e.g. servers that can handle the HTTP Range request header for bigwigs and bam files).

If the question is how to embed jbrowse on a specific page that has other content on it, then the easiest answer is to simply use an iframe.

If you would like to avoid an iframe, you can also just take a look at the contents of JBrowse's index.html and use it in your template. You will just have to watch out for CSS collisions. JBrowse is almost fully contained in the GenomeBrowser "div" on it's index.html

I'm not too familiar with django but let me know if that helps

ADD COMMENTlink modified 4.1 years ago • written 4.1 years ago by cmdcolin1.4k

This project has started adding Django integration as a backend to

ADD REPLYlink modified 4.1 years ago • written 4.1 years ago by cmdcolin1.4k
gravatar for bioinfosuite
24 months ago by
bioinfosuite20 wrote:

I went through the same issue and here is the solution I found: The solution is to put the whole jbrowse folder like in the static directory of your webapp and after call it as follows from your template html:

<iframe style="border: 1px solid #505050;" src="/static/jbrowse/index.html" height="600" width="1000"></iframe>

as you notice I specified the path of the index.html that is located in the jbrowse. You can use also {% load staticfiles %} on the top of your html template and point to the jbrowse index.html as follows src="/static/jbrowse/index.html" src="{% static '/jbrowse/index.html' %}". hope it helps others

ADD COMMENTlink written 24 months ago by bioinfosuite20
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1518 users visited in the last hour