Skip to content

Commit 5ee5522

Browse files
committed
add documentation
1 parent c12c742 commit 5ee5522

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+544
-1
lines changed

.github/workflows/docs.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build and Deploy Documentation
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
build-and-deploy:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: '3.9'
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install ".[docs]" # Install package with docs dependencies
28+
29+
- name: Build Documentation
30+
run: |
31+
cd docs
32+
make html
33+
touch build/html/.nojekyll
34+
35+
- name: Deploy to GitHub Pages
36+
if: github.event_name == 'push'
37+
uses: JamesIves/github-pages-deploy-action@v4
38+
with:
39+
folder: docs/build/html
40+
branch: gh-pages

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
%SPHINXBUILD% >NUL 2>NUL
14+
if errorlevel 9009 (
15+
echo.
16+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17+
echo.installed, then set the SPHINXBUILD environment variable to point
18+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
19+
echo.may add the Sphinx directory to PATH.
20+
echo.
21+
echo.If you don't have Sphinx installed, grab it from
22+
echo.https://www.sphinx-doc.org/
23+
exit /b 1
24+
)
25+
26+
if "%1" == "" goto help
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd
438 KB
Loading
137 KB
Loading

docs/source/api/datasets.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Datasets

docs/source/api/index.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# API
2+
3+
Import grassp as:
4+
5+
```
6+
import grassp as gr
7+
```
8+
9+
10+
```{toctree}
11+
:maxdepth: 2
12+
13+
preprocessing
14+
tools
15+
plotting
16+
io
17+
datasets
18+
```

docs/source/api/io.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# IO

docs/source/api/plotting.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
## Plotting: `pl`
2+
3+
```{eval-rst}
4+
.. module:: grassp.pl
5+
```
6+
7+
```{eval-rst}
8+
.. currentmodule:: grassp
9+
```
10+
11+
This module provides visualization functions for proteomics data.
12+
13+
```{note}
14+
Many of scanpy's plotting functions can be directly used with grassp AnnData objects. So if you are looking for a specific plot, it is worth checking if it is already implemented in scanpy.
15+
```
16+
17+
### Preprocessing
18+
19+
```{eval-rst}
20+
.. autosummary::
21+
:nosignatures:
22+
:toctree: ../generated/
23+
24+
pl.highly_variable_proteins
25+
pl.bait_volcano_plots
26+
pl.protein_clustermap
27+
```
28+
29+
### Integration
30+
```{eval-rst}
31+
.. autosummary::
32+
:nosignatures:
33+
:toctree: ../generated/
34+
35+
pl.aligned_umap
36+
pl.remodeling_score
37+
pl.remodeling_sankey
38+
```

docs/source/api/preprocessing.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
## Preprocessing: `pp`
2+
3+
```{eval-rst}
4+
.. module:: grassp.pp
5+
```
6+
7+
```{eval-rst}
8+
.. currentmodule:: grassp
9+
```
10+
11+
Any transformation of the data matrix that is not a *tool*. Other than *tools*, preprocessing steps usually don't return an easily interpretable annotation, but perform a basic transformation on the data matrix.
12+
13+
### Basic Preprocessing
14+
15+
16+
```{eval-rst}
17+
.. autosummary::
18+
:nosignatures:
19+
:toctree: ../generated/
20+
21+
pp.calculate_qc_metrics
22+
pp.filter_samples
23+
pp.filter_proteins
24+
pp.highly_variable_proteins
25+
pp.filter_proteins_per_replicate
26+
pp.aggregate_proteins
27+
pp.aggregate_samples
28+
pp.normalize_total
29+
pp.drop_excess_MQ_metadata
30+
pp.remove_contaminants
31+
```
32+
33+
### Imputation
34+
35+
```{eval-rst}
36+
.. autosummary::
37+
:nosignatures:
38+
:toctree: ../generated/
39+
40+
pp.impute_gaussian
41+
```

0 commit comments

Comments
 (0)