GMOD / JBrowseR

R interface to the JBrowse 2 Linear Genome View.
https://gmod.github.io/JBrowseR/
Apache License 2.0
35 stars 3 forks source link

Too much time to load bigwig files #14

Closed KyriakisDimitrios closed 2 years ago

KyriakisDimitrios commented 2 years ago

Hello, Amazing job. I have some issues with JBrowser. I created the server to host local bigwig files, but since the files are big (~400MB) it is failing to fetch them or take too much time to load them in the Jbrowser. Is it possible to preload somehow the bigwig files or any track ? In order when the shiny app start to be preloaded.

shiny

cmdcolin commented 2 years ago

Hi there

For the red errors listed, it looks like they are referring to something on port 88888 but this is outside the maximum port range https://www.google.com/search?q=maximum+port+range so maybe is a typo

For the other track that appears waiting I can't be sure. The bigness of the files generally isn't an issue in jbrowse because bigwig files have "zoom levels" embedded in them: when you are zoomed in showing a small region, it shows finer grain data, and when you are zoomed out viewing a larger region, it shows coarser grained data.

KyriakisDimitrios commented 2 years ago

Hi, Yes, you were right about the port. I had a typo But still, the track is not visible even if it is loaded.

image

cmdcolin commented 2 years ago

Generally when something is blank, it means the chromosome names from e.g. the bigwig file don't exactly match the names from the FASTA. JBrowse is quite strict about is expecting the chromosome names to exactly match by default. It can smooth over some differences when refNameAliases are configured. By default, the "ViewHg38" setting uses a "refNameAliases" configuration that tries to smooth over the differences between chr1 and 1, see https://github.com/GMOD/JBrowseR/blob/013f8f3fd00610a79a053d5323e1a6297772ed65/srcjs/components/ViewHg38.jsx#L8-L39 so it would make the following matches https://s3.amazonaws.com/jbrowse.org/genomes/GRCh38/hg38_aliases.txt

Let me know if that helps

KyriakisDimitrios commented 2 years ago

Hello Colin, Thank you very much for your help. Everything is working properly now. I have one more question. How can I increase the fonts of the Jbrowser? [image: image.png]

They are not readable. Is there any argument in the JBrowseR that is related with font size? Thank you for your time Kind regards Dimitrios

On Mon, May 23, 2022 at 5:09 PM Colin Diesh @.***> wrote:

Generally when something is blank, it means the chromosome names from e.g. the bigwig file don't exactly match the names from the FASTA. JBrowse is quite strict about is expecting the chromosome names to exactly match by default. It can smooth over some differences when refNameAliases are configured. By default, the "ViewHg38" setting uses a "refNameAliases" configuration that tries to smooth over the differences between chr1 and 1, see https://github.com/GMOD/JBrowseR/blob/013f8f3fd00610a79a053d5323e1a6297772ed65/srcjs/components/ViewHg38.jsx#L8-L39 so it would make the following matches https://s3.amazonaws.com/jbrowse.org/genomes/GRCh38/hg38_aliases.txt

Let me know if that helps

— Reply to this email directly, view it on GitHub https://github.com/GMOD/JBrowseR/issues/14#issuecomment-1134797798, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIPD4E3ONDWURXPIPXA65ZTVLONSZANCNFSM5WRYOUDA . You are receiving this because you authored the thread.Message ID: @.***>

-- Dimitrios Kyriakis PhD Student, Bioinformatics Luxembourg Centre for Systems Biomedicine (LCSB) University of Luxembourg

cmdcolin commented 2 years ago

Hi there, I don't know of how to do this from within JBrowseR currently. If JBrowseR is updated to the latest release of jbrowse 2 then it will have a better default font size

cmdcolin commented 2 years ago

CC @elliothershberg if you are available to make a new release or guide jbrowse team to help do a release let me know :)

elliothershberg commented 2 years ago

Thanks @cmdcolin, I’ve really been meaning to cut a new release. I’m currently on my honeymoon (!!) but will do one as soon as I’m back (added to my calendar), and we can meet to add your email, etc. for CRAN in the future

cmdcolin commented 2 years ago

haha no worries, and congrats :)

elliothershberg commented 2 years ago

Thanks for your patience @KyriakisDimitrios !

A new release is en route to CRAN with the latest JB2 build.

In terms of your question about fonts, not much has changed directly from this release. The interaction between Shiny app settings and the browser can make it a bit small. However, you can take control of font size directly in your own code. Here's an example:

ui <- fluidPage(
  tags$head(
    tags$style(HTML(
      "html { font-size: 14px }"
    ))
  ),
  titlePanel("JBrowseR Example"),
  JBrowseROutput("widgetOutput")
)

You can check out custom_app.R in the example_apps/ directory for a working example with larger font. More info on styling Shiny apps can be found here.

Hope that helps!