MHH-RCUG / scrnaseq_app

UNDER DEVELOPMENT: Shiny app for visualisation of scRNASeq data
2 stars 4 forks source link

Download of plots doesn't work in local setting #34

Closed tglomb closed 4 years ago

tglomb commented 4 years ago

I've downloaded the repository to start it in a local RStudio on Windows.
Everything works fine so far just except the dowload of the selected plots. RStudio is calculating in the background. In case of using the RStudio browser it appears a download window with a file name other than the given that cannot not be saved. In case of the a browser such as Firefox not even the download window appears.

mariusrueve commented 4 years ago

Hello, I can reproduce these problems on my windows pc. On the other hand, the download works fine on my Mac and the RStudio server. The Server runs on Linux, so it works on UNIX based systems, but not on windows.

mariusrueve commented 4 years ago

Screenshot 2020-10-02 120014

You can see that the app creates all files and has every filename saved in files (see print(files)).

Therefore we have two options:

mariusrueve commented 4 years ago

In order to use the zip() function on windows, Rtools has to be installed. After I installed it and put Rtools on PATH, everything worked fine with no changes to the code.

Is it okay to ask the user to install Rtools, if he has a windows pc, or should I try to fine another solution?

Oliver-D-B commented 4 years ago

great Marius, thanks a lot for providing this solution, @tglomb @colindaven do you think Rtools may be integrated to the singularity environment ? @tglomb could you help me to get this running (either at our windows server with RTools installed or even better with singularity)?

mariusrueve commented 4 years ago

Note: Just found this system2("zip", args=(paste(file,files,sep=" "))) and could be used instead of zip(file,files). Maybe I can get this working and we have no need for Rtools.

colindaven commented 4 years ago

@mariusrueve Can you push the fix to dev or master and get me to recreate the container so we can test if this has an effect ? No one could download from the container so far.

Torsten can recreate the container next week too (need sudo), I am away from today on holiday.

mariusrueve commented 4 years ago

@colindaven sure! For me the download works on Windows with system2("zip", args=(paste(file,files,sep=" "))), but I don't know if the download works because I have Rtools installed now or because the function doesn't need Rtools.

Pushed to dev ✔️ https://github.com/MHH-RCUG/scrnaseq_app/commit/654f870cc9f1b00675f0a5138cc7ec727add39ed

colindaven commented 4 years ago

Singularity container being created now from dev branch with

https://github.com/MHH-RCUG/scrnaseq_app/commit/ab4e11e4c1543650393ae550b7a23adce403f46d

@mariusrueve @tglomb @Oliver-D-B please retest the container from dev with the current changes by Marius

colindaven commented 4 years ago

For me on the Windows Server using the Singularity version and Firefox, I can't download the files.

The link is and it doesn't look like a variable is being filled after w= (perhaps).

http://172.24.148.210:3838/session/524cf7e557435fa4342b0f817da961fd/download/download_plots?w=

mariusrueve commented 4 years ago

@colindaven It doesn't work for me. Maybe I can find another solution to create a .zip (etc) file. I'm going to deactivate RTools so I can test locally.

mariusrueve commented 4 years ago

For me on the Windows Server using the Singularity version and Firefox, I can't download the files.

The link is and it doesn't look like a variable is being filled after w= (perhaps).

http://172.24.148.210:3838/session/524cf7e557435fa4342b0f817da961fd/download/download_plots?w=

@colindaven How did you produce this link?

colindaven commented 4 years ago

Link produced by right click on download button - copy link location

and or with developer mode im browse (F12 in firefox?) and checking the Network Tab. (status 500 = Internal server error )

mariusrueve commented 4 years ago

Possible fix ❔ https://github.com/MHH-RCUG/scrnaseq_app/commit/e51ae3eab9b0acabd11400c839c53b8d03591fbd

I explicitly installed zip, even though it should be included already, with install.packages("zip"). And added library(zip) to the code.

This worked for me with Rtools deactivated.

tglomb commented 4 years ago

Tested the dev branch in RStudio. Download is working so far. Just got the info Note: zip::zip() is deprecated, please use zip::zipr() instead. Maybe you could fix this quickly.

mariusrueve commented 4 years ago

@tglomb I haven't seen this message yet (tested on macOS). I will try to recreate this error on windows.

tglomb commented 4 years ago

I've recently installed the latest versions of R (4.0.2) and RStudio (1.3.1073) and tested it again. Now it didn't show up again.
So everthing is fine so far. Thx