lidaof / eg-react

WashU Epigenome Browser
https://epigenomegateway.wustl.edu
Other
66 stars 30 forks source link

Firebase/network issue #205

Closed PhrenoVermouth closed 2 years ago

PhrenoVermouth commented 3 years ago

Halo there! Thx for the tutorial and I did successfully built my mirror browser. I'm a newbie in NodeJS and here I have quite some questions relating to the 'session' function.

  1. Actually now Firebase doesn't provide the 'databaseURL' after configuration. Mine just like:
    
    // For Firebase JS SDK v7.20.0 and later, measurementId is optional
    const firebaseConfig = {
    apiKey: "AIzaSyAj8sYtNRboOWOK9De8X1FDHsantyI",
    authDomain: "epgg-test-bc3bc.firebaseapp.com",
    databaseURL: "https://epgg-test-bc3bc-default-rtdb.firebaseio.com",
    projectId: "epgg-test-bc3bc",
    storageBucket: "epgg-test-bc3bc.appspot.com",
    messagingSenderId: "979585227586",
    appId: "1:979585227586:web:396fe8fd7d4bbfecc906db",
    measurementId: "G-6T3CR2ZLHW"
    };

I opened the **build**-**Realtime Database** on the left menu and saw the link on the top of the window: _https://epgg-test-bc3bc-default-rtdb.firebaseio.com/_  Maybe this is the 'databaseURL'?

2. If so here comes another question: In mainland China, all google services were blocked (incl. firebaseio.com).  Is this the reason that I can't save the session (shown below)? If I set an 'npm config proxy', will it help ( I want to proxy the eg browser but don't know the way)? 
![image](https://user-images.githubusercontent.com/14256941/127767545-33da1385-3d8a-40c1-91a9-6e79fa19ff49.png)

3.  A more general question. Whether the 'session' function could help restore the local track info in the json file?  I tried but to find it saves only the top four tracks which were presented by default. This means next time when I open the browser I have to manually load all my local tracks, really exhausting.

Looking forward to your answer!

Thanks!

Yours,
Gran
lidaof commented 3 years ago

Hi Gran @PhrenoVermouth , for 1, you are right, that's the database url. for 2, I am not sure....I should consider that blocking thing....I cannot test that either....i need to think about this and some alternative approach, does Aliyun provide similar service? I don't know much about npm proxy....sorry about that. for 3, local tracks cannot saved into session, due to Javascript security settings, you need to manually allow data access every-time, this is true for every web application wants to access user's local files. you can build a local hub so just one time of load...please check https://eg.readthedocs.io/en/latest/local.html#view-files-or-a-folder-as-a-datahub. Hope this helps :)

PhrenoVermouth commented 3 years ago

Thanks for your timely reply, deeply appreciated! I'll try to figure it out. Keep in touch~

PhrenoVermouth commented 3 years ago

Hello Daofeng, sorry for the interruption but I found there's no way to load local .vcf file on the browser. image I saw the example but it was a dbSNP public demo on hg38. Seems no suitable class for a local track vcf file (not bedGraph and categorical, which I tried).

lidaof commented 3 years ago

Hi @PhrenoVermouth I will work on this issue, will keep you posted. Thanks!

lidaof commented 3 years ago

Hi @PhrenoVermouth please refresh the browser, it should also in the dropdown list now :) Thanks for reporting this.

PhrenoVermouth commented 3 years ago

Thx! The repository was not updated so I used the public one (epigenomegateway.wustl.edu/browser/). Unfortunately, the file is blank while loaded on eg browser(left) but not IGV(right). Maybe it is a network issue? image

My files are enclosed: https://drive.google.com/file/d/1BtQOeP7trHtYKcbFLwkyhpNUJ_3fJMq3/view?usp=sharing, https://drive.google.com/file/d/1RUxIdgZEgoKKRHff9o4tF1BF_OVVEA1i/view?usp=sharing

lidaof commented 3 years ago

Hi @PhrenoVermouth Thank you for reporting this issue!

I see the problem is that the vcf file is aligned to chromosome named 1, 2, 3 not like chr1, chr2, chr3 which we supported. I have add a fix and updated the public browser, you would need refresh and do the same thing plus right click the track, check the ensembl style option, that should work.

Screen Shot 2021-08-27 at 9 42 50 PM

for local datahub, you can specify "ensemblStyle": true,

For the github repo update, I am in the middle of changes of other file, will update once that's done.

PhrenoVermouth commented 3 years ago

What a relief! Thx! :)