eg-react icon indicating copy to clipboard operation
eg-react copied to clipboard

Adding my public datahub pre-loaded to washu?

Open KHBHH opened this issue 2 years ago • 7 comments

Hi,

I have my instance of WashU running on my s3 bucket through Cloudfront. I want to add pre-loaded data/tracks (which lives in one of my S3 buckets), so that whenever the user accesses the app, they can have the option to load the data, as in the example shown below:

image

How can I add pre-loaded data? Which file/code do I need to work with? I would appreciate your guidance, thank you!

Right now I have a single track (bigwig file from hg38 genome) that I want to add (as pre-loaded data)...

KHBHH avatar Jun 24 '22 13:06 KHBHH

Hi @KHBHH you would need to edit hg38.js file, and then the publicHubList variable.

lidaof avatar Jun 24 '22 14:06 lidaof

Hi @lidaof , thank you, can you share with me the path of hg38.js file please? Thanks again!

KHBHH avatar Jun 24 '22 15:06 KHBHH

sure, frontend/src/model/genomes/hg38/hg38.js

lidaof avatar Jun 24 '22 15:06 lidaof

Hi @lidaof , thank you, can I just update my hg38.js file which already is in my S3 bucket?

Or I should go all over the process again to create build folder (npm build run) etc?

KHBHH avatar Jun 24 '22 15:06 KHBHH

HI @KHBHH when you update hg38.js, you would need to run the build step again and upload the newly built files to the S3 bucket.

lidaof avatar Jun 24 '22 15:06 lidaof

Hi @lidaof , thank you for your advices, they have been so helpful, and it worked! I had another two questions regarding the tracks:

  1. There are few tracks which are already on WashU: E066 Liver AuxiliaryHMM, E071 Brain Hippocampus Middle AuxiliaryHMM, E086 Fetal Kidney PrimaryHMM, E128 NHLF Lung Fibroblast Primary Cells PrimaryHMM in the public data hub..Can I have them pre-loaded when I first run the app? Meaning, when I visit the link of the app, I can just see these tracks by default without having to load them..What kind of edits should I do regarding that? And which file should I have a look at in the original app folder?

  2. I would like to remove the URLs in the information section of the tracks I am viewing (for all by default). If I want to do that programmatically, which file should I edit from the original app folder? (example below has the URL)

image

Also, just mentioning again, WashU right now is running on my jobsite's S3 which is accessed through CloudFront.

I would highly appreciate your advice, thank you!

KHBHH avatar Jun 28 '22 15:06 KHBHH

Hi @KHBHH,

1, you can modify the defaultTracks in hg38.js, this controls the default tracks once you load the genome 2, the url info is displayed by the function from line 342 in frontend/src/components/trackContextMenu/TrackContextMenu.js, you can edit the code to make it hidden (like comment out line 142)

Just a friendly reminder we do have some policy in the license regarding code modification :)

lidaof avatar Jun 29 '22 15:06 lidaof

close for now, feel free to open new issue. thank you!

lidaof avatar Jan 25 '23 16:01 lidaof