This is a test version of Biostars. For the public version, visit https://www.biostars.org.
URL query parameters in JBrowse2

I would like to present a jbrowse2 linear view of two reference sequences side by side and not quite sure how to do it via url query parameters or via config.json. I want a simple linear genome view for two orthologous sequences in two species, that I will be able to link to it, from my database website. Is it possible?

jbrowse2

1 answer

Posting here the answer I received on Jbrowse2 Github for the sake of those who will need the same:

There are a couple options for this in jbrowse 2 it is actually a bit hard to present two different species "side by side" you can do it as "top and bottom" though relatively easily

you can either

a) use two different linear genome views, showing two different assemblies b) use a single synteny view, showing the two different assemblies

here is an example of (a) using just two linear genome views

https://jbrowse.org/code/jb2/main/?config=test_data%2Fconfig_demo.json&session=spec-{"views":[{"assembly":"hg19","loc":"17:41,196,294..41,277,363","type":"LinearGenomeView","tracks":["ncbi_gff_hg19"]},{"assembly":"hg38","loc":"17:43,044,294..43,125,363","type":"LinearGenomeView","tracks":["ncbi_refseq_109_hg38_latest"]}]}

here is an example of (b) using the synteny view

https://jbrowse.org/code/jb2/main/?config=test_data%2Fconfig_demo.json&session=spec-{"views":[{"type":"LinearSyntenyView","tracks":["hg19ToHg38.over.chain.gz-1645073157673"],"views":[{"assembly":"hg19","loc":"17:41,196,294..41,277,363","type":"LinearGenomeView","tracks":["ncbi_gff_hg19"]},{"assembly":"hg38","loc":"17:43,044,294..43,125,363","type":"LinearGenomeView","tracks":["ncbi_refseq_109_hg38_latest"]}]}]}

more info on the url prams here https://jbrowse.org/jb2/docs/urlparams/

you can also in some cases use a gene name in the &loc= paramter if you added text indexing, but hope this helps.

note that these url parameters are not available if you use embedded.

Log in to answer this question.