morpheus.js icon indicating copy to clipboard operation
morpheus.js copied to clipboard

Loading Morpheus session files from a URL

Open rajivnarayan opened this issue 4 years ago • 4 comments

Is it possible to load morpheus session files from a URL location? That would be useful for sharing preconfigured views of data.

  • Loading a dataset works, for example: https://software.broadinstitute.org/morpheus/?json={%22dataset%22%3A%22%2F%2Fs3.amazonaws.com%2Frn-test-data%2Ftest.gct%22}%0A

  • But it fails if I provide it a Json formatted session file https://software.broadinstitute.org/morpheus/?json={%22dataset%22%3A%22%2F%2Fs3.amazonaws.com%2Frn-test-data%2Ftest.json%22}%0A

However downloading the same session file and manually opening it also works.

rajivnarayan avatar Jan 28 '21 20:01 rajivnarayan

You can pass the URL to the session file as: https://software.broadinstitute.org/morpheus/?url=https://s3.amazonaws.com/rn-test-data/test.json

On Thu, Jan 28, 2021 at 3:13 PM rajivnarayan [email protected] wrote:

Is it possible to load morpheus session files from a URL location? That would be useful for sharing preconfigured views of data.

Loading a dataset works, for example:

https://software.broadinstitute.org/morpheus/?json={%22dataset%22%3A%22%2F%2Fs3.amazonaws.com%2Frn-test-data%2Ftest.gct%22}%0A https://software.broadinstitute.org/morpheus/?json=%7B%22dataset%22%3A%22%2F%2Fs3.amazonaws.com%2Frn-test-data%2Ftest.gct%22%7D%0A

But it fails if I provide it a Json formatted session file

https://software.broadinstitute.org/morpheus/?json={%22dataset%22%3A%22%2F%2Fs3.amazonaws.com%2Frn-test-data%2Ftest.json%22}%0A https://software.broadinstitute.org/morpheus/?json=%7B%22dataset%22%3A%22%2F%2Fs3.amazonaws.com%2Frn-test-data%2Ftest.json%22%7D%0A

However downloading the same session file and manually opening it also works.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cmap/morpheus.js/issues/25, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABH6THYOXNQUSXDPXV6UPFTS4HAOTANCNFSM4WXVJDJA .

joshua-gould avatar Jan 28 '21 22:01 joshua-gould

Awesome thanks.

On Thu, Jan 28, 2021, 5:16 PM Joshua Gould [email protected] wrote:

You can pass the URL to the session file as:

https://software.broadinstitute.org/morpheus/?url=https://s3.amazonaws.com/rn-test-data/test.json

On Thu, Jan 28, 2021 at 3:13 PM rajivnarayan [email protected] wrote:

Is it possible to load morpheus session files from a URL location? That would be useful for sharing preconfigured views of data.

Loading a dataset works, for example:

https://software.broadinstitute.org/morpheus/?json={%22dataset%22%3A%22%2F%2Fs3.amazonaws.com%2Frn-test-data%2Ftest.gct%22}%0A https://software.broadinstitute.org/morpheus/?json=%7B%22dataset%22%3A%22%2F%2Fs3.amazonaws.com%2Frn-test-data%2Ftest.gct%22%7D%0A

< https://software.broadinstitute.org/morpheus/?json=%7B%22dataset%22%3A%22%2F%2Fs3.amazonaws.com%2Frn-test-data%2Ftest.gct%22%7D%0A

But it fails if I provide it a Json formatted session file

https://software.broadinstitute.org/morpheus/?json={%22dataset%22%3A%22%2F%2Fs3.amazonaws.com%2Frn-test-data%2Ftest.json%22}%0A https://software.broadinstitute.org/morpheus/?json=%7B%22dataset%22%3A%22%2F%2Fs3.amazonaws.com%2Frn-test-data%2Ftest.json%22%7D%0A

< https://software.broadinstitute.org/morpheus/?json=%7B%22dataset%22%3A%22%2F%2Fs3.amazonaws.com%2Frn-test-data%2Ftest.json%22%7D%0A

However downloading the same session file and manually opening it also works.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cmap/morpheus.js/issues/25, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ABH6THYOXNQUSXDPXV6UPFTS4HAOTANCNFSM4WXVJDJA

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cmap/morpheus.js/issues/25#issuecomment-769435226, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXS2BRM42TF2R4M7FJWIKLS4HO4FANCNFSM4WXVJDJA .

rajivnarayan avatar Jan 29 '21 00:01 rajivnarayan

On a related note, is it possible in some way to use the morpheus javascript code from my own javascript program and pass it not a URL, but the data directory, e.g. as a string or a JSON object? I've written a simple t-SNE/UMAP viewer (cells.ucsc.edu) and it would be cool if I could let users explore the data in morpheus. However, I don't have a server backend yet that could create the .tsv file for morpheus.

For example, when running landingPage.open(options), I could add the data itself (as a typed array?) to the options object.

maximilianh avatar Aug 20 '21 12:08 maximilianh

Please see https://github.com/cmap/morpheus.js/blob/master/examples/json_example.html. Please let me know if anything is unclear and I'd be happy to help.

joshua-gould avatar Aug 21 '21 12:08 joshua-gould