You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assuming this was run from a Jupyter notebook, this would create test.loom in the same folder as the notebook.
Let's say that we now want to open this test file in the loom viewer. What needs to be done?
close the file
move file to project subfolder (say, TestProject) in loom-datasets folder,
the existence of a loom-datasets folder is very easy to miss for new users
assuming people use Finder on the Mac or Explorer on Windows, it can be surprisingly hard to locate the home folder in which the loom-datasets folder is generated by default. And even after finding my home folder on Windows, I think locating the the loom-datasets folder takes a bit of hunting:
connecting to the loom file again later requires remembering the full path to the new location (on Windows, ~/ is not automatically expanded to the home folder)
metadata and attributes can currently be viewed without expansion
to see the genes, we'd need to expand it via the CLI (will have an interface through the website soon)
to see the tiles, they would have to be generated through the CLI too (same promise of web-interface).
In other words, setting up loom files for viewing requires quite a bit of tiny steps.
The last two points are currently done via the CLI, and I'm working on a web-based option for it.
However, when using the loompy library in (for example) a Jupyter notebook or the Python REPL, each of these points could be simplified via helper functions, which shouldn't take too much hassle to write. After all, the logic for the following already present in the loom-viewer CLI code:
finding the dataset folder,
falling back to the (and when necessary creating a) default folder in the user's home folder
listing the whole dataset folder
listing the projects in the selected dataset folder,
listing the files in a project
finding all files matching a name
expanding all files/all files in a project/all files matching a name
starting the server from the default dataset folder
distinguishing between relative and absolute paths
Refactoring this code into functions that can be imported and used from within other Python code could make it a bit easier to integrate using the loom-viewer with loompy (especially for new users).
I can think of a one more that could make life a bit simpler.
loom_viewer.dataset_path(), which return a string representing the expanded full path of ~/loom-datasets/ (or whatever the LOOM_PATH is set to, assuming we still support that)
This would make the above example easy to integrate with loom-viewer, without adding a lot of syntax, and also keeping the distinction between loompy and loom-viewer conventions:
Take the following example from the loompy API walkthrough:
Assuming this was run from a Jupyter notebook, this would create
test.loom
in the same folder as the notebook.Let's say that we now want to open this test file in the loom viewer. What needs to be done?
TestProject
) inloom-datasets
folder,loom-datasets
folder is very easy to miss for new usersloom-datasets
folder is generated by default. And even after finding my home folder on Windows, I think locating the theloom-datasets
folder takes a bit of hunting:~/
is not automatically expanded to the home folder)In other words, setting up loom files for viewing requires quite a bit of tiny steps.
The last two points are currently done via the CLI, and I'm working on a web-based option for it.
However, when using the loompy library in (for example) a Jupyter notebook or the Python REPL, each of these points could be simplified via helper functions, which shouldn't take too much hassle to write. After all, the logic for the following already present in the loom-viewer CLI code:
Refactoring this code into functions that can be imported and used from within other Python code could make it a bit easier to integrate using the loom-viewer with loompy (especially for new users).
I can think of a one more that could make life a bit simpler.
loom_viewer.dataset_path()
, which return a string representing the expanded full path of~/loom-datasets/
(or whatever theLOOM_PATH
is set to, assuming we still support that)This would make the above example easy to integrate with
loom-viewer
, without adding a lot of syntax, and also keeping the distinction betweenloompy
andloom-viewer
conventions:The text was updated successfully, but these errors were encountered: