-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Artifact fetching for pseudotemporal and lamindb default text (#344)
* Add pseudotemporal registration script Signed-off-by: Lukas Heumos <[email protected]> * Add lamindb pseudotime * Fix envs * Pin jupyterbook * dropdown * Polish * Polish --------- Signed-off-by: Lukas Heumos <[email protected]>
- Loading branch information
Showing
7 changed files
with
152 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
This book uses [lamindb](https://github.com/laminlabs/lamindb) to store, share, and load datasets and notebooks using the [theislab/sc-best-practices instance](https://lamin.ai/theislab/sc-best-practices). | ||
We acknowledge free hosting from [Lamin Labs](https://lamin.ai/). | ||
|
||
1. **Install lamindb** | ||
|
||
- Install the lamindb Python package: | ||
|
||
```bash | ||
pip install lamindb[bionty,jupyter,zarr] | ||
``` | ||
|
||
2. **Optionally create a lamin account** | ||
|
||
- Sign up and log in following [the instructions](https://docs.lamin.ai/setup#sign-up-log-in) | ||
|
||
3. **Connect to the [theislab/sc-best-practices instance](https://lamin.ai/theislab/sc-best-practices)** | ||
|
||
- Run the `lamin connect` command: | ||
|
||
```bash | ||
lamin connect theislab/sc-best-practices | ||
``` | ||
|
||
You should now see `→ connected lamindb: theislab/sc-best-practices`. | ||
|
||
4. **Verify your setup** | ||
|
||
- Run the `lamin connect` command: | ||
|
||
```python | ||
import lamindb as ln | ||
|
||
ln.Artifact.df() | ||
``` | ||
|
||
You should now see up to 100 of the stored datasets. | ||
|
||
5. **Accessing datasets (Artifacts)** | ||
|
||
- Search for the datasets on the [Artifacts page](https://lamin.ai/theislab/sc-best-practices/artifacts) | ||
- Load an Artifact and the corresponding object: | ||
|
||
```python | ||
import lamindb as ln | ||
af = ln.Artifact.get(key="key_of_dataset", is_latest=True) # or ln.Artifact("SOMEID").get() | ||
obj = af.load() | ||
``` | ||
|
||
The object is now accessible in memory and is ready for analysis. | ||
Adapt the `ln.Artifact("SOMEID").get()` suffix to get older versions like `ln.Artifact("SOMEID0001").get()` to get the second uploaded version. | ||
|
||
6. **Accessing notebooks (Transforms)** | ||
|
||
- Search for the notebook on the [Transforms page](https://lamin.ai/theislab/sc-best-practices/transforms) | ||
- Load the notebook: | ||
|
||
```bash | ||
lamin load <notebook url> | ||
``` | ||
|
||
which will download the notebook to the current working directory. | ||
Analogously to `Artifacts`, you can adapt the suffix ID to get older versions. | ||
|
||
7. **On `ln.track()` and `ln.finish()`** | ||
|
||
- These functions are currently only available for users with write access and may error. Please comment them out for now. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters