Skip to content

Commit

Permalink
Add section on how to run the notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
jkanche committed Jul 17, 2024
1 parent df29771 commit f858c68
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 206 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ chapters/zilinois_lung_with_celltypist/
*.tiledb
*_cache
*_files
tutorials/cache/*``
tutorials/cache/*``
cache/
.ipynb_checkpoints
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ To get started locally, follow these steps:
- Install [quarto-cli](https://quarto.org/docs/get-started/).
- Install the necessary packages listed in [requirements.txt](./requirements.txt) and [rpackages.R](rpackages.R).

```shell
```sh
pip install -r requirements.txt
Rscript rpackages.R
```

- Run quarto preview to view the HTML version of the site.

```shell
```sh
qurto preview
```

Expand Down
40 changes: 2 additions & 38 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ website:
logo: ./assets/logo.png
contents:
- index.qmd
- howto.qmd
- section: "Tutorials"
contents:
- tutorials/genomic_ranges.qmd
Expand All @@ -30,46 +31,9 @@ website:
center:
- text: "(c) Jayaram Kancherla & Aaron Lun."

# navbar:
# left:
# - href: index.qmd
# text: Home
# - tutorials/annotate_cell_types.qmd
# - tutorials/sessioninfo

# book:
# title: "Bioc2024: Interoperability between R and Python using BiocPy"
# author: "[Jayaram Kancherla](mailto:[email protected])"
# contributor: "[Aaron Lun](mailto:[email protected])"
# favicon: ./assets/short.png
# site-url: https://biocpy.github.io/tutorial
# date: "5/31/2024"
# search: true
# repo-url: https://github.com/BiocPy/tutorial
# repo-actions: [issue]
# # downloads: [pdf, epub]
# sharing: [twitter]
# twitter-card: true
# cover-image: ./assets/full.png
# page-footer:
# center:
# - text: "(c) BiocPy core contributors"
# # href: chapters/summary.qmd
# sidebar:
# style: docked
# background: light
# chapters:
# - index.qmd
# - tutorials/annotate_cell_types.qmd
# - tutorials/sessioninfo.qmd
# # - chapters/references.qmd

format:
html:
theme: sandstone
number-sections: false
code-link: true
toc: true
# pdf:
# keep-tex: true
# documentclass: scrreprt
toc: true
Binary file added assets/colab_open_notebook.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/colab_session.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions howto.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# How to run the notebooks

## Option 1: Run notebooks locally

If you want to run locally, please clone the repository and install the python packages used for the workshop.

```sh
git clone https://github.com/BiocPy/BiocWorkshop2024
cd BiocWorkshop2024

# Assuming python is available
# You are free to use mamba, conda or virtualenv's
pip install -r requirements.txt

# Start the jupyter server
jupyter lab
```

Then checkout the [notebook](https://github.com/BiocPy/BiocWorkshop2024/tree/master/notebook) directory that contain Jupyter notebooks.

## Option 2: Using Google colab

To open the session in Google colab

1. Open [Google colab](https://colab.research.google.com/) in a new tab.
2. On the page, It should open up a dialog to "Open notebook" as shown in the screenshot below. If not, go to file -> Open Notebook from the menu in the top left.
3. Choose Github and enter the repository url for the workshop: `https://github.com/BiocPy/BiocWorkshop2024`. This will automatically find the python notebooks available in the repository.

![](./assets/colab_session.png)

4. Choose the open icon to explore this notebook

![](./assets/colab_open_notebook.png)

:::{.callout-important}
This process does not download the [RDS file](https://github.com/BiocPy/BiocWorkshop2024/tree/master/notebook) available in the repository. Folks might have to manually download this to their colab sessions.
:::

and thats it!
3 changes: 1 addition & 2 deletions index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ on [GitHub](https://github.com/BiocPy).

![](./assets/workshop.png)


### Core contributors

- [Jayaram Kancherla](https://github.com/jkanche)
Expand All @@ -33,4 +32,4 @@ We are looking for more contributions from the community to improve our packages

## Developer notes

This is a reproducible Quarto book with reusable snippets. To learn more about Quarto books visit <https://quarto.org/docs/books>. Check out [sessioninfo](./tutorials/sessioninfo.qmd) for more information.
This is a reproducible Quarto book with reusable snippets. Check out [sessioninfo](./tutorials/sessioninfo.qmd) for packages installed during the build.
177 changes: 15 additions & 162 deletions notebook/genomic_ranges.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tutorials/genomic_ranges.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Let's start by installing the required packages for R and Python.

You can install the Python packages using pip:

```bash
```sh
pip install -U biocutils genomicranges rds2py numpy pandas geniml
```

Expand Down

0 comments on commit f858c68

Please sign in to comment.