Skip to content

Commit

Permalink
Update tutorials (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkanche authored Jul 16, 2024
1 parent 983a24e commit dacc205
Show file tree
Hide file tree
Showing 13 changed files with 683 additions and 190 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: Quarto Publish

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:

jobs:
build-deploy:
Expand All @@ -19,11 +16,15 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4

- name: Install rsync
- name: Install rsync and upgrade
run: |
sudo apt-get update
sudo apt-get -y update
sudo apt-get install -y rsync
# - name: Install alternatives for Python
# run: |
# sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 100

# - name: Install curl
# run: |
# sudo apt-get install libcurl4-openssl-dev
Expand All @@ -43,13 +44,20 @@ jobs:
run: quarto install tinytex

# - name: Setup Python
# uses: actions/setup-python@v4
# uses: actions/setup-python@v5
# with:
# python-version: '3.9'
# python-version: '3.10'
# cache: 'pip'

- name: Test python version
run: |
python3 --version
- name: Install Python dependencies
run: pip install -r requirements.txt
run: pip3 install -r requirements.txt

- name: install geniml
run: pip3 install geniml

# - name: Setup R
# uses: r-lib/actions/setup-r@v2
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/publish_python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Quarto Publish

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
tinytex: true

- name: Install Python and Dependencies
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- run: pip install -r requirements.txt

# build SQLite from source, because I need 3.35<=
- name: Download SQLite3
run: |
wget https://www.sqlite.org/2024/sqlite-autoconf-3450300.tar.gz
tar -xvf sqlite-autoconf-3450300.tar.gz
- name: Install SQLite3
run: |
cd sqlite-autoconf-3450300
./configure
make
sudo make install
export PATH="/usr/local/lib:$PATH"
cd ..
- name: Render
uses: quarto-dev/quarto-actions/render@v2
with:
to: html
env:
LD_LIBRARY_PATH: /usr/local/lib

- name: Publish to GH Pages
if: github.ref == 'refs/heads/master'
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages # The branch the action should deploy to.
render: false
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ chapters/zilinois_lung_with_celltypist/
*whee.h5
*.tiledb
*_cache
*_files
*_files
tutorials/cache/*``
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
## BiocPy tutorial
## Bioc 2024 workshop tutorial

This is a reproducible Quarto book with reusable snippets. If you're new to Quarto books, you can explore more about them [here](https://quarto.org/docs/books).

## Setting Up the Tutorial Locally

To get started locally, follow these steps:

- Install quarto-cli.
- Install the necessary packages listed in requirements.txt.
- 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
pip install -r requirements.txt
Rscript rpackages.R
```

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

```shell
qurto preview
```

Take advantage of GitHub actions, which are available to automatically publish the tutorial book whenever changes are made on the **master** branch.
3 changes: 2 additions & 1 deletion _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ website:
- index.qmd
- section: "Tutorials"
contents:
- tutorials/genomic_ranges.qmd
- tutorials/annotate_cell_types.qmd
- tutorials/sessioninfo
- tutorials/sessioninfo.qmd

# navbar:
# left:
Expand Down
Binary file added assets/single-cell-space.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 6 additions & 4 deletions index.qmd
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Welcome

Welcome to our workshop on exploring the data structures and packages
available in [BiocPy](https://github.com/biocpy), a project that brings
the power of Bioconductor to Python.
available in [BiocPy](https://github.com/biocpy), a project that aims
to facilitate Bioconductor workflows in Python.

In this workshop, we will focus on interoperability between R and Python, covering two main topics:

- Reading an RDS file containing `GenomicRanges` and performing downstream range-based analyses.
- Annotating single-cell RNA-seq data analysis using the [scrnaseq](https://github.com/biocpy/scrnaseq) package.
- Annotating single-cell RNA-seq data using the [scrnaseq](https://github.com/biocpy/scrnaseq) package.

Attendees will learn how to represent and manipulate their datasets in Python
in the same manner as in R/Bioconductor.
Expand All @@ -20,6 +20,8 @@ on [GitHub](https://github.com/BiocPy).
- [Jayaram Kancherla](https://github.com/jkanche)
- [Aaron Lun](https://github.com/LTLA)

Always looking for more contributions from the community to improve our packages! Checkout the issues or discussion in our GitHub organization.

----

## Other resources
Expand All @@ -29,4 +31,4 @@ on [GitHub](https://github.com/BiocPy).

## 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 [Reproduce me](./chapters/sessioninfo.qmd) for more information.
This is a reproducible Quarto book with reusable snippets. To learn more about Quarto books visit <https://quarto.org/docs/books>. Check out [Session Info](./chapters/sessioninfo.qmd) for more information.
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ biocframe>=0.5.0
summarizedexperiment>=0.4.3
singlecellexperiment>=0.4.2
multiassayexperiment>=0.4.2
genomicranges
genomicranges>=0.4.28
biocutils>=0.1.5
rds2py>=0.4.0
rds2py>=0.4.3
scranpy
singler>=0.2.0
numpy
Expand All @@ -20,4 +20,4 @@ celldex
scrnaseq
anndata
matplotlib
scanpy
geniml
5 changes: 4 additions & 1 deletion rpackages.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
install.packages(c("BiocManager"), repos='http://cran.us.r-project.org')
library(BiocManager)
BiocManager::install(c("scRNAseq", "celldex", "SingleR", "scuttle", "reticulate", "rmarkdown", "knitr", "downlit", "xml2", "ggplot2", "edgeR"))
BiocManager::install(
c("scRNAseq", "celldex", "SingleR", "scuttle", "reticulate",
"rmarkdown", "knitr", "downlit", "xml2", "ggplot2", "edgeR",
"AnnotationHub", "TxDb.Hsapiens.UCSC.hg38.refGene"))
Loading

0 comments on commit dacc205

Please sign in to comment.