Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
6c28886
fix dev setup
mffrank Jul 11, 2025
1d2ce70
Improve preprocessing docstrings
mffrank Jul 13, 2025
014b13d
add enrichment functions to docs
mffrank Jul 13, 2025
19e03c5
fix header warnings in docs and add enrichment
mffrank Jul 13, 2025
47a39f1
make the left sidebar wider
mffrank Jul 13, 2025
6db3fd4
add intersphinx
mffrank Jul 13, 2025
9e3c203
aggregate_proteins handles layers
mffrank Jul 13, 2025
a0cf30a
Improve preprocessing docstrings
mffrank Jul 14, 2025
31152ea
cleanup enrichment and add initial tests
mffrank Jul 14, 2025
5792fc1
Update issue templates
mffrank Jul 11, 2025
65c8e65
Adding ATPS and DC datasets to the grassp example data
marika-clark Jul 14, 2025
76d76c8
Adding docstrings
marika-clark Jul 14, 2025
15cb0e7
fix itzhak name in datasets
mffrank Jul 14, 2025
0e1426f
add datasets to the docs
mffrank Jul 14, 2025
6d721e0
make datasets available with ds
mffrank Jul 15, 2025
f0bbfae
Update hein 2024 dataset to include enriched version and more annotation
mffrank Jul 16, 2025
374fb00
setup notebook docs dependencies
mffrank Jul 16, 2025
2fbe1c9
add DC notebook
mffrank Jul 16, 2025
7f885e2
fix notebook pre-commit
mffrank Jul 16, 2025
863536a
fix grammar in DC tutorial
marika-clark Jul 16, 2025
344c3d9
add kwargs to example datasets
mffrank Jul 16, 2025
9e4d4f1
fix aggregate proteins
mffrank Jul 16, 2025
da33e8c
add integration tutorial notebook
mffrank Jul 16, 2025
5ded46b
add intersphinx
mffrank Jul 13, 2025
5dc29ce
aggregate_proteins handles layers
mffrank Jul 13, 2025
1574093
Improve preprocessing docstrings
mffrank Jul 14, 2025
2a6239d
update plotting docstrings
mffrank Jul 17, 2025
67dfe5d
update tools docstrings
mffrank Jul 17, 2025
0f95876
move tagm to own file
mffrank Jul 17, 2025
bf1c7af
update tutorials
mffrank Jul 18, 2025
43095e4
make aggregate_proteins fast
mffrank Jul 18, 2025
9e33731
remove duplicate in docs
mffrank Jul 18, 2025
7cbdec5
update markov_clustering docstring
mffrank Jul 18, 2025
568b576
fix aggregate proteins
mffrank Jul 16, 2025
e1abfff
add intersphinx
mffrank Jul 13, 2025
cebd156
aggregate_proteins handles layers
mffrank Jul 13, 2025
2334eff
Improve preprocessing docstrings
mffrank Jul 14, 2025
bcb6b9d
fix weird merges
mffrank Jul 18, 2025
2bdae65
Merge branch 'main' into improve_docs
mffrank Jul 18, 2025
2ad60c7
formatting
mffrank Jul 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ PACKAGE_NAME := grassp

.PHONY: setup-develop
setup-develop:
pip install -e .'[dev,docs,notebook]'
pip install -e .'[dev, docs, notebook]'

pre-commit install

.PHONY: uninstall
Expand Down
17 changes: 14 additions & 3 deletions docs/source/_static/custom.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
/* Adjust sidebar width */
.bd-sidebar {
min-width: 300px; /* Increase from default */
max-width: 450px; /* Set maximum width */
/* Wider left sidebar so long function names are not truncated */

/* For PyData Sphinx Theme >= 0.13 */
:root {
/* Primary sidebar width */
--pst-sidebar-primary: 400px;
}

/* For older/alternate class names */
.bd-sidebar,
.bd-sidebar-primary {
flex: 0 0 400px; /* fixed width */
max-width: 400px;
min-width: 400px;
}

/* Ensure content adjusts properly */
Expand Down
28 changes: 21 additions & 7 deletions docs/source/api/plotting.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Plotting: `pl`
# Plotting: `pl`

```{eval-rst}
.. module:: grassp.pl
Expand All @@ -11,10 +11,10 @@
This module provides visualization functions for proteomics data.

```{note}
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.
Many of [Scanpy's plotting](https://scanpy.readthedocs.io/en/stable/api/plotting.html) functions can be used directly with grassp AnnData objects. If you are looking for a specific plot, check whether it is already implemented in Scanpy.
```

### Preprocessing
## Preprocessing

```{eval-rst}
.. autosummary::
Expand All @@ -24,9 +24,10 @@ Many of scanpy's plotting functions can be directly used with grassp AnnData obj
pl.highly_variable_proteins
pl.bait_volcano_plots
pl.protein_clustermap
pl.sample_heatmap
```

### Integration
## Integration
```{eval-rst}
.. autosummary::
:nosignatures:
Expand All @@ -35,13 +36,26 @@ Many of scanpy's plotting functions can be directly used with grassp AnnData obj
pl.aligned_umap
pl.remodeling_score
pl.remodeling_sankey
```
pl.mr_plot
```

### Clustering
## Clustering
```{eval-rst}
.. autosummary::
:nosignatures:
:toctree: ../generated/

pl.qsep_heatmap
pl.qsep_boxplot
pl.tagm_map_contours
pl.tagm_map_pca_ellipses
pl.tagm_map_pca_ellipses
```

## Ternary
```{eval-rst}
.. autosummary::
:nosignatures:
:toctree: ../generated/

pl.ternary
```
17 changes: 14 additions & 3 deletions docs/source/api/preprocessing.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Preprocessing: `pp`
# Preprocessing: `pp`

```{eval-rst}
.. module:: grassp.pp
Expand All @@ -10,7 +10,7 @@

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.

### Basic Preprocessing
## Basic Preprocessing


```{eval-rst}
Expand All @@ -31,7 +31,18 @@ Any transformation of the data matrix that is not a *tool*. Other than *tools*,
pp.filter_min_consecutive_fractions
```

### Imputation
## Enrichment

```{eval-rst}
.. autosummary::
:nosignatures:
:toctree: ../generated/

pp.calculate_enrichment_vs_untagged
pp.calculate_enrichment_vs_all
```

## Imputation

```{eval-rst}
.. autosummary::
Expand Down
23 changes: 16 additions & 7 deletions docs/source/api/tools.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Tools: `tl`
# Tools: `tl`

```{eval-rst}
.. module:: grassp.tl
Expand All @@ -8,9 +8,9 @@
.. currentmodule:: grassp
```

This module provides various tools for analyzing proteomics data.
This module provides various tools for analyzing proteomics data.

### Clustering
## Clustering

```{eval-rst}
.. autosummary::
Expand All @@ -20,14 +20,13 @@ This module provides various tools for analyzing proteomics data.
tl.leiden_mito_sweep
tl.knn_annotation
tl.calculate_interfacialness_score
tl.get_n_nearest_neighbors
tl.silhouette_score
tl.calinski_habarasz_score
tl.tagm_map_train
tl.tagm_map_predict
```

### Enrichment
## Ontology Enrichment

```{eval-rst}
.. autosummary::
Expand All @@ -38,7 +37,7 @@ This module provides various tools for analyzing proteomics data.
```


### Integration
## Integration

```{eval-rst}
.. autosummary::
Expand All @@ -48,5 +47,15 @@ This module provides various tools for analyzing proteomics data.
tl.align_adatas
tl.aligned_umap
tl.remodeling_score
```

## Graph analysis

```{eval-rst}
.. autosummary::
:nosignatures:
:toctree: ../generated/

```
tl.to_knn_graph
tl.get_n_nearest_neighbors
```
10 changes: 10 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"sphinx.ext.githubpages",
"sphinx.ext.autosummary",
"sphinx_autodoc_typehints",
"sphinx.ext.intersphinx",
"scanpydoc",
"myst_nb", # enable notebook execution and rendering (includes myst_parser)
]
Expand Down Expand Up @@ -57,6 +58,15 @@
html_logo = "_static/img/grassp_logo.png"
issues_github_path = "czbiohub-sf/grassp"
html_show_sphinx = False
intersphinx_mapping = dict(
python=("https://docs.python.org/3", None),
numpy=("https://numpy.org/doc/stable", None),
pandas=("https://pandas.pydata.org/pandas-docs/stable", None),
anndata=("https://anndata.readthedocs.io/en/stable/", None),
scanpy=("https://scanpy.readthedocs.io/en/stable/", None),
scipy=("https://docs.scipy.org/doc/scipy", None),
)


# Execute notebooks only when out-of-date and set timeout
nb_execution_mode = "auto" # or "force" to always run, "off" to skip
Expand Down
6 changes: 6 additions & 0 deletions docs/source/generated/grassp.pl.mr_plot.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
grassp.pl.mr\_plot
==================

.. currentmodule:: grassp.pl

.. autofunction:: mr_plot
6 changes: 6 additions & 0 deletions docs/source/generated/grassp.pl.qsep_boxplot.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
grassp.pl.qsep\_boxplot
=======================

.. currentmodule:: grassp.pl

.. autofunction:: qsep_boxplot
6 changes: 6 additions & 0 deletions docs/source/generated/grassp.pl.qsep_heatmap.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
grassp.pl.qsep\_heatmap
=======================

.. currentmodule:: grassp.pl

.. autofunction:: qsep_heatmap
6 changes: 6 additions & 0 deletions docs/source/generated/grassp.pl.sample_heatmap.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
grassp.pl.sample\_heatmap
=========================

.. currentmodule:: grassp.pl

.. autofunction:: sample_heatmap
6 changes: 6 additions & 0 deletions docs/source/generated/grassp.pl.ternary.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
grassp.pl.ternary
=================

.. currentmodule:: grassp.pl

.. autofunction:: ternary
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
grassp.pp.calculate\_enrichment\_vs\_all
========================================

.. currentmodule:: grassp.pp

.. autofunction:: calculate_enrichment_vs_all
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
grassp.pp.calculate\_enrichment\_vs\_untagged
=============================================

.. currentmodule:: grassp.pp

.. autofunction:: calculate_enrichment_vs_untagged
6 changes: 6 additions & 0 deletions docs/source/generated/grassp.tl.to_knn_graph.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
grassp.tl.to\_knn\_graph
========================

.. currentmodule:: grassp.tl

.. autofunction:: to_knn_graph
3 changes: 1 addition & 2 deletions docs/source/tutorials/notebooks/DC_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
"import matplotlib.pyplot as plt\n",
"\n",
"# Numerical computing and statistics\n",
"import numpy as np\n",
"from scipy import stats\n"
"import numpy as np"
]
},
{
Expand Down
4 changes: 1 addition & 3 deletions docs/source/tutorials/notebooks/integration_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
"source": [
"dc = dc[dc.obs[\"Gene names\"].notna()]\n",
"dc_agg = gr.pp.aggregate_proteins(dc, grouping_columns=\"Gene names\", agg_func=np.mean)\n",
"dc_agg.obs.set_index(\"Gene names\", inplace=True, drop=True)\n",
"dc_agg.obs.head()"
]
},
Expand All @@ -107,9 +106,8 @@
"orgip_agg = gr.pp.aggregate_proteins(\n",
" orgip, grouping_columns=\"Gene_name_canonical\", agg_func=np.mean\n",
")\n",
"orgip_agg.obs.set_index(\"Gene_name_canonical\", inplace=True, drop=True)\n",
"orgip_agg.obs_names = orgip_agg.obs_names.str.upper()\n",
"orgip_agg.obs"
"orgip_agg.obs.head()"
]
},
{
Expand Down
Loading