BaderLab / EnrichmentMapApp

The EnrichmentMap Cytoscape App allows you to visualize the results of gene-set enrichment as a network.
http://apps.cytoscape.org/apps/enrichmentmap
GNU Lesser General Public License v2.1
32 stars 12 forks source link

create EM through cyrest without files #385

Closed risserlin closed 3 years ago

risserlin commented 4 years ago

create an EM passing json objects or something similar so that files are not needed.

The file requirement makes using EM from a docker a nightmare

risserlin commented 3 years ago

Can I bump this issue up. I am working with docker more and more and using EM with docker is really really painful.

mikekucera commented 3 years ago

What's a good way for me to try this out for myself. Its been a while since I used EM with Docker.

risserlin commented 3 years ago

You really need to test it from the docker. I created an image a while that you could use easily but it is over year old now and has an older version of GSEA on it, and R and all that. I will refresh the image.
https://hub.docker.com/repository/docker/risserlin/em_base_image

Currently to get it to work I need to have the file location on the docker and host machine and when I call the command to send to cytoscape I have to use the host machine full address.

mikekucera commented 3 years ago

Thanks for refreshing the image. I remember how the command was all complicated because of the file locations.

EM serializes its internal model to json to store it in the session file. If we reuse the same format then I can probably reuse the same serialization code. It will have to be sent as a CyREST POST call.

risserlin commented 3 years ago

Hi Mike, I have refreshed the image and updated the example code. All the instructions are associated with the image. (In short, clone the repo with the code and launch the image from same directory and run the notebook. All the GSEA are run on the docker but stored on its virtual drive so it is physically located on the same machine as cytoscape. I change the file path to be the machine path just before calling the em command) Let me know if you need any help getting it to work. https://hub.docker.com/repository/docker/risserlin/em_base_image Thanks, Ruth

mikekucera commented 3 years ago

I have created a CyREST endpoint that allows a text file to be transferred from the docker container to the host. The file goes into the Karaf temp directory, and CyREST returns the full path to the local file. The R script can then pass the local paths to the EM build command and EM can find the files locally.

I will create a separate pull request on the Cytoscape_workflows repository for the changes to the R script.

mikekucera commented 3 years ago

Hi Ruth. Is this solution working for you? Can I close this issue?

risserlin commented 3 years ago

The solution works nicely for me. Thanks!