Skip to content

Commit

Permalink
update to readthedocs formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Gibbsdavidl committed Feb 10, 2024
1 parent d2b1add commit 9b5f5f5
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 49 deletions.
27 changes: 11 additions & 16 deletions docs/decoupler_api_doc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ sphinx-quickstart on Wed Apr 27 09:20:15 2022.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

gssnng using the decoupler-omnipath api
=======================================
The decoupler-omnipath api
==========================

Gene Set Scoring on the Nearest Neighbor Graph (gssnng) for Single Cell RNA-seq (scRNA-seq).

Expand All @@ -13,13 +13,8 @@ Gene Set Scoring on the Nearest Neighbor Graph (gssnng) for Single Cell RNA-seq
:caption: Table of Contents
:maxdepth: 1

`**Notebook using gmt files** <https://colab.research.google.com/github/IlyaLab/gssnng/blob/main/notebooks/gssnng_quick_start.ipynb>`_

`**Notebook using Decoupler/Omnipath style API** <https://colab.research.google.com/github/IlyaLab/gssnng/blob/main/notebooks/Scoring_PBMC_data_with_the_GSSNNG_decoupleR_API.ipynb>`_

`**Notebook for creating smoothed count matrices**<https://www.google.com>`_

`**See the paper** <https://academic.oup.com/bioinformaticsadvances/article/3/1/vbad150/7321111?login=false>`_

This package works with AnnData objects stored as h5ad files. Expression values are taken from adata.X.
Expand Down Expand Up @@ -102,23 +97,23 @@ Scoring Functions

The list of scoring functions::

geneset_overlap: For each geneset, number (or fraction) of genes expressed past a given threshold.
**geneset_overlap**: For each geneset, number (or fraction) of genes expressed past a given threshold.

singscore: Normalised mean (median centered) ranks (requires ranked data)
**singscore**: Normalised mean (median centered) ranks (requires ranked data)

ssGSEA: Single sample GSEA based on ranked data.
**ssGSEA**: Single sample GSEA based on ranked data.

rank_biased_overlap: RBO, Weighted average of agreement between sorted ranks and gene set.
**rank_biased_overlap**: RBO, Weighted average of agreement between sorted ranks and gene set.

robust_std: Med(x-med / mad), median of robust standardized values (recommend unranked).
**robust_std**: Med(x-med / mad), median of robust standardized values (recommend unranked).

mean_z: Mean( (x - mean)/stddv ), average z score. (recommend unranked).
**mean_z**: Mean( (x - mean)/stddv ), average z score. (recommend unranked).

average_score: Mean ranks or counts
**average_score**: Mean ranks or counts

median_score: Median of counts or ranks
**median_score**: Median of counts or ranks

summed_up: Sum up the ranks or counts.
**summed_up**: Sum up the ranks or counts.



Expand Down
29 changes: 12 additions & 17 deletions docs/gmt_files_doc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sphinx-quickstart on Wed Apr 27 09:20:15 2022.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

gssnng using gmt files
Genesets as .gmt files
======================

Gene Set Scoring on the Nearest Neighbor Graph (gssnng) for Single Cell RNA-seq (scRNA-seq).
Expand All @@ -16,10 +16,6 @@ Gene Set Scoring on the Nearest Neighbor Graph (gssnng) for Single Cell RNA-seq

`**Notebook using gmt files** <https://colab.research.google.com/github/IlyaLab/gssnng/blob/main/notebooks/gssnng_quick_start.ipynb>`_

`**Notebook using Decoupler/Omnipath style API** <https://colab.research.google.com/github/IlyaLab/gssnng/blob/main/notebooks/Scoring_PBMC_data_with_the_GSSNNG_decoupleR_API.ipynb>`_

`**Notebook for creating smoothed count matrices**<https://www.google.com>`_

`**See the paper** <https://academic.oup.com/bioinformaticsadvances/article/3/1/vbad150/7321111?login=false>`_


Expand Down Expand Up @@ -57,7 +53,6 @@ Copy the script out from the cloned repo and run, check the paths if you get an

python3.10 example_gmt_input.py


Usage
-----

Expand Down Expand Up @@ -90,25 +85,25 @@ See gssnng/notebooks for examples on all methods.
Scoring Functions
-----------------

The list of scoring functions:
The list of scoring functions::

geneset_overlap: For each geneset, number (or fraction) of genes expressed past a given threshold.
**geneset_overlap**: For each geneset, number (or fraction) of genes expressed past a given threshold.

singscore: Normalised mean (median centered) ranks (requires ranked data)
**singscore**: Normalised mean (median centered) ranks (requires ranked data)

ssGSEA: Single sample GSEA based on ranked data.
**ssGSEA**: Single sample GSEA based on ranked data.

rank_biased_overlap: RBO, Weighted average of agreement between sorted ranks and gene set.
**rank_biased_overlap**: RBO, Weighted average of agreement between sorted ranks and gene set.

robust_std: Med(x-med / mad), median of robust standardized values (recommend unranked).
**robust_std**: Med(x-med / mad), median of robust standardized values (recommend unranked).

mean_z: Mean( (x - mean)/stddv ), average z score. (recommend unranked).
**mean_z**: Mean( (x - mean)/stddv ), average z score. (recommend unranked).

average_score: Mean ranks or counts
**average_score**: Mean ranks or counts

median_score: Median of counts or ranks
**median_score**: Median of counts or ranks

summed_up: Sum up the ranks or counts.
**summed_up**: Sum up the ranks or counts.


Parameters
Expand Down Expand Up @@ -176,7 +171,7 @@ Some methods have some additional options. They are passed as a dictionary, meth

singscore: {'normalization', 'theoretical'}, {'normalization', 'standard'}

The singscore manuscript describes the theoretical method of standarization which involves determining the theoretical max and minimum ranks for the given gene set.::
The singscore manuscript describes the theoretical method of standardization which involves determining the theoretical max and minimum ranks for the given gene set.::

rank_biased_overlap: {'rbo_depth', n} (n: int)

Expand Down
10 changes: 4 additions & 6 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,17 @@ Contents
--------

.. toctree::
gssnng with gene set gmt files <gmt_files_doc>
gssnng with a decoupler/omnipath style <decoupler_api_doc>
gssnng to smooth count matrices <smoothing_adatas_doc>
Using gene set gmt files <gmt_files_doc>
The decoupler/omnipath api <decoupler_api_doc>
Smooth count matrices <smoothing_adatas_doc>

The problem: The sparsity of scRNA-seq data creates a poor overlap with many gene sets, which in turn makes gene set scoring difficult.
The GSSNNG method is based on using the nearest neighbor graph of cells for data smoothing. This essentially creates mini-pseudobulk expression profiles for each cell, which can be scored by using single sample gene set scoring methods often associated with bulk RNA-seq.
Nearest neighbor graphs (NNG) are constructed based on user defined groups (see the 'groupby' parameter below). The defined groups can be processed in parallel, speeding up the calculations. For example, a NNG could be constructed within each cluster or jointly by cluster and sample. Smoothing can be performed using either the adjacency matrix (all 1s) or the weighted graph to give less weight to more distant cells.

This package works with AnnData objects stored as h5ad files. Expression values are taken from adata.X. For creating groups, up to four categorical variables can be used, which are found in the adata.obs table. Gene sets can be provided by using .gmt files or through the OmniPath API (see below).

Scoring functions work with ranked or unranked data ("your mileage may vary")

.. note::

This project is under active development. Please consider using a named release.
This project is under active development. Please consider using a named release if you're concerned about reproducibility.

12 changes: 2 additions & 10 deletions docs/smoothing_adatas_doc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ sphinx-quickstart on Wed Apr 27 09:20:15 2022.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

gssnng to make smoothed count matrices
======================================
Smoothing count matrices
========================

Gene Set Scoring on the Nearest Neighbor Graph (gssnng) for Single Cell RNA-seq (scRNA-seq).

Expand All @@ -13,16 +13,8 @@ Gene Set Scoring on the Nearest Neighbor Graph (gssnng) for Single Cell RNA-seq
:caption: Table of Contents
:maxdepth: 1

`**Notebook using gmt files** <https://colab.research.google.com/github/IlyaLab/gssnng/blob/main/notebooks/gssnng_quick_start.ipynb>`_

`**Notebook using Decoupler/Omnipath style API** <https://colab.research.google.com/github/IlyaLab/gssnng/blob/main/notebooks/Scoring_PBMC_data_with_the_GSSNNG_decoupleR_API.ipynb>`_

`**Notebook for creating smoothed count matrices**<https://www.google.com>`_

`**See the paper** <https://academic.oup.com/bioinformaticsadvances/article/3/1/vbad150/7321111?login=false>`_


This package works with AnnData objects stored as h5ad files. Expression values are taken from adata.X.
For creating groups, up to four categorical variables can be used, which are found in the adata.obs table.

Expand Down

0 comments on commit 9b5f5f5

Please sign in to comment.