Yifan-Yin / DMR-Project

shinyapp for DMR Visualization
0 stars 0 forks source link

deploy on shinyapps.io #17

Open wvictor14 opened 4 years ago

wvictor14 commented 4 years ago

Hi Yifan, can you help get this set up on shinyapps?

I'm circulating a manuscript around, I'll send to you soon. Hoping to submit by may 1st.

Victor

Yifan-Yin commented 4 years ago

Hi Victor,

Yes, for sure! Currently, I am pretty free.

Yifan

Yifan-Yin commented 4 years ago

There is an issue related to deployment. Our app is not deployed successfully on shinyapps.io because of the free memory size provided by the server is 1GB. However, our app needs approximately 2GB. The solution is that we need to update our account to get a larger memory size (perhaps 39 USD per month).

Yifan-Yin commented 4 years ago

There is an issue related to deployment. Our app is not deployed successfully on shinyapps.io because of the free memory size provided by the server is 1GB. However, our app needs approximately 2GB. The solution is that we need to update our account to get a larger memory size (perhaps 39 USD per month).

I just updated the account to see if our app can run successfully. Now it has been deployed on shinapps.io, and users can access it through the URL: https://yifan7.shinyapps.io/Placental_Methylome_Browser/

wvictor14 commented 4 years ago

probably not going to be able to pay that much for a paid plan every month.

Can you figure out what are the largest files and their file sizes? Might be possible to reduce to 1 gb

Yifan-Yin commented 4 years ago

The total size of our files is under 1 GB. However, our app needs 2 GB of RAM when it runs on shinyapps.iso. Gonna find some solutions.

wvictor14 commented 4 years ago

Hey @Yifan-Yin, how is this going? I am planning to send out a final manuscript by the end of this week, so I want to put a link up. I can help with this, I few ideas but it's hard to say without knowing which part of the app is taking up more space.

Yifan-Yin commented 4 years ago

Hi Victor, Here is the memory usage of our app.

mem_used() 1.49 GB object_size(anno) 196 MB object_size(anno_annotatr) 331 MB object_size(betas) 826 MB The total memory usage is 1.49GB, and the biggest parts are from our datasets (1.47GB), especially from the methylation dataset (826MB).

wvictor14 commented 4 years ago

OK I will work on reducing the size of the betas, I think it is possible.

Yifan-Yin commented 4 years ago

Another thing is the website domain name. We can only customize the domain name when we upgrade our account into the Professional plan (299 CAD/ month), otherwise, the default URL will be the form of https://account-name.shinyapps.io/application-name, just like our current one https://yifan7.shinyapps.io/Placental_Methylome_Browser/, which sounds like not official. My thought was that we can establish a new account with a name like Methylome Browser, which might be better.

wvictor14 commented 4 years ago

Yeah the issue here is the cost. I could ask but I don't think Wendy would be willing to spend that much money. If it was a one-time fee then maybe, but this should presumably be accessible indefinitely. Maybe in the future if our lab uses shiny more then we could justify a paid plan, but right now it is only me/you using it.

I think your idea is good, what about we make a "robinsonlab" account so like "robinsonlab.shinyapps.io/Placental_methylome_browser/"

Then if more apps are developed we can put them all here.

Also, I just found out that rstudio just announced that they are giving the basic plan away free for 6 months because of COVID: post. But I think it's best if we try to make our app compatible with the free plan.

Yifan-Yin commented 4 years ago

Robinsonlab sounds better!

The basic plan works well for our app. Maybe temporarily we can use the free basic plan in case we are unable to find a way to decrease our memory usage in a short period.

Yifan-Yin commented 4 years ago

Hi Victor, I have created a new account and signed up for the free basic plan. Now users can get access to our app through the URL https://robinsonlab.shinyapps.io/Placental_Methylome_Browser/.

wvictor14 commented 4 years ago

Hi Yifan, I am working on reducing the file size since using the basic plan is only going to be temporary solution as it is only free for 6 months.

I will let you know when I push these changes.

Yifan-Yin commented 4 years ago

Yeah, I see. This is just a temporary method. I am also trying to if there are any solutions from the shiny server side.

wvictor14 commented 4 years ago

Hey @Yifan-Yin I made a pull request using the summarized versions of the data. The app should be runnable under the 1gb limit now. There is a bit of clean up to do though which I describe in the pull request comments. Can you take a look?

Yifan-Yin commented 4 years ago

Great! I am working on it right now!

wvictor14 commented 4 years ago

Cool let me know if you have any questions or need help with anything!

Yifan-Yin commented 4 years ago

Our app has been successfully deployed on shinyapps.io, and the current memory usage is 700MB. Thanks Victor! I will work on reducing the unnecessary functions within our app this afternoon.

Yifan-Yin commented 4 years ago

Hi Victor,

I just updated our app. Can you check if the deployed app can work well on your PC? The URL is: https://robinsonlab.shinyapps.io/Placental_Methylome_Browser/.

wvictor14 commented 4 years ago

it looks great! Thanks