Skip to content

Commit

Permalink
docs: change readthedocs template
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheng, Caibin committed Jun 21, 2022
1 parent 1f8f668 commit 421e52f
Show file tree
Hide file tree
Showing 18 changed files with 139 additions and 136 deletions.
2 changes: 1 addition & 1 deletion README.md
@@ -1,6 +1,6 @@

<p align="left">
<img src="docs/img/scAR_logo_white.png" width="250" title="scAR">
<img src="docs/_static/scAR_logo_white.png" width="250" title="scAR">
</p>


Expand Down
98 changes: 0 additions & 98 deletions docs/Installation.ipynb

This file was deleted.

62 changes: 62 additions & 0 deletions docs/Installation.rst
@@ -0,0 +1,62 @@
Installation
================

To use ``scAR``, first install it using conda install or Git+pip.

Conda install
-------------------------------

1, Install `conda <https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html>`_

2, Create conda environment::
conda create -n scar

3, Activate conda environment::
conda activate scar
4, Install scar::

conda install -c bioconda scar
5, Activate the scar conda environment::

conda activate scar
Git + pip
-------------------------------------------

1, Clone scar repository::

git clone https://github.com/Novartis/scAR.git
2, Enter the cloned directory::

cd scAR
3, Create a conda environment

.. tabs::

.. tab:: GPU version

.. code-block::
:caption: Please use ``scar-gpu`` if you have an nvidia graphics card and the corresponging driver installed
conda env create -f scar-gpu.yml
.. tab:: CPU version

.. code-block::
:caption: Please use ``scar-cpu`` if you don't have a graphics card availalble
conda env create -f scar-cpu.yml
4, Activate the scar conda environment::

conda activate scar




8 changes: 4 additions & 4 deletions docs/Introduction.rst
Expand Up @@ -4,21 +4,21 @@ Introduction
What is ambient signal?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. image:: img/ambient_signal_hypothesis.png
.. image:: _static/ambient_signal_hypothesis.png
:width: 500
:align: center

During the preparation of the single-cell solution, RNA or protein counts are released upon cell lysis and consequently encapsulated by droplets. These exogenous molecules are mixed with native ones and barcoded by the same 10x bead, resulting in overestimated count data.
During the preparation of the single-cell solution, RNA or protein counts are released upon cell lysis and consequently encapsulated by droplets. These exogenous molecules are mixed with native ones and barcoded by the same 10x beads, resulting in overestimated count data. The ambient signal harms the downstream analysis and even introduces significant bias in some cases (e.g. scCRISPR-seq and Cell multiplexing).

The design of scAR
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. image:: img/overview_scAR.png
.. image:: _static/overview_scAR.png
:width: 600
:align: center

scAR uses a latent variable model to represent the biological and technical components in the observed count data. scAR is built under ambient signal hypothesis, in which the probability of occurrence of each ambient transcript can be empirically estimated from cell-free droplets. There are two hidden variables, contamination level per cell and the probability of occurrence of native transcript. With these three parameters, we are able to reconstruct the noisy observations. To learn the hidden variables, we train neural networks (the variational autoencoder) to minimize the differences between the reconstructions and original noisy observations. Once converging, the contamination levels and native expression are inferred and downstream analysis can be performed using these values. See our manuscript [Sheng2022]_ for details.

What types of data that scAR can process?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We applied scAR to scRNAseq data for denoising mRNA, scCRISPRseq data for sgRNA assignment, and CITE-seq data for denoising protein counts (ADT). In theory, any droplet-based single-cell omics technology has the ambient signal contamination issue, and scAR can be a good consideration.
We validated scAR on scRNAseq for denoising mRNA, scCRISPR-seq for sgRNA assignment, cell multiplexing for tag assignment and CITE-seq for denoising protein counts (ADT). It recovers great number (33% ~ 50%) of cells in scCRISPR-seq and cell multiplexing experiments and significantly improves data quality in scRNAseq and CITE-seq. In theory, any droplet-based single-cell omics technology may have the ambient contamination issue, especially for the complex experiments. scAR can also be a reasonable solution in these cases.
File renamed without changes
File renamed without changes
Binary file added docs/_static/scAR_favicon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
4 changes: 4 additions & 0 deletions docs/_static/scar-styles.css
@@ -0,0 +1,4 @@
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}
5 changes: 5 additions & 0 deletions docs/_templates/layout.html
@@ -0,0 +1,5 @@
{# Import the theme's layout. #}
{% extends "!layout.html" %}

{# Custom CSS overrides #}
{% set bootswatch_css_custom = ['_static/scar-styles.css'] %}
53 changes: 41 additions & 12 deletions docs/conf.py
Expand Up @@ -9,23 +9,18 @@
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#

import os
import sys

sys.path.insert(0, os.path.abspath("."))
sys.path.insert(0, os.path.abspath(".."))
# sys.path.insert(0, os.path.abspath('tutorials'))
from scar.main.__version__ import __version__, _copyright

# -- Project information -----------------------------------------------------


project = "scAR"
copyright = _copyright
author = "Caibin Sheng"

# The full version, including alpha/beta/rc tags
release = __version__


Expand All @@ -46,20 +41,20 @@
"sphinx.ext.napoleon",
"autodocsumm",
"matplotlib.sphinxext.plot_directive",
"sphinx_design",
"sphinx_tabs.tabs",
]

nbsphinx_execute = "never"
nbsphinx_allow_errors = True
autosummary_generate = True
# Add type of source files

# source_suffix = ['.rst', '.md'] #, '.ipynb'
nb_custom_formats = {
".md": ["jupytext.reads", {"fmt": "mystnb"}],
}

# Add any paths that contain templates here, relative to this directory.
# templates_path = ["tutorials"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand All @@ -74,16 +69,50 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_rtd_theme"
html_theme = "pydata_sphinx_theme"
templates_path = ["_templates"]
html_static_path = ["_static"]
html_css_files = ["scar-styles.css"]

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_logo = "img/scAR_logo_transparent.png"
html_logo = "_static/scAR_logo_transparent.png"
html_theme_options = {
"logo_only": True,
"display_version": True,
"logo": {
"image_light": "scAR_logo_white.png",
"image_dark": "scAR_logo_black.png",
},
"pygment_light_style": "tango",
"pygment_dark_style": "native",
"icon_links": [
{
"name": "GitHub",
"url": "https://github.com/Novartis/scar",
"icon": "fab fa-github-square",
"type": "fontawesome",
}
],
"use_edit_page_button": True,
"favicons": [
{
"rel": "icon",
"sizes": "32x32",
"href": "scAR_favicon.png",
}
],
}
html_context = {
"github_user": "Novartis",
"github_repo": "scar",
"github_version": "develop",
"doc_path": "docs",
}

# html_sidebars = {
# "**": ["search-field.html", "sidebar-nav-bs.html", "sidebar-ethical-ads.html"]
# }

autodoc_mock_imports = ["django"]
autodoc_default_options = {
"autosummary": True,
Expand Down
6 changes: 2 additions & 4 deletions docs/index.rst
Expand Up @@ -7,7 +7,7 @@
scAR
================================

**scAR** (single-cell Ambient Remover) is a tool for denoising the ambient signals in droplet-based single cell omics. It can be used for multiple tasks, such as, **sgRNA assignment** for scCRISPRseq, **identity barcode assignment** for cell indexing, **protein denoising** for CITE-seq, **mRNA denoising** for scRNAseq, and etc..
**scAR** (single-cell Ambient Remover) is an explainable machine learning model for denoising the ambient signals in droplet-based single cell omics. It can be used for multiple tasks, such as, **sgRNA assignment** for scCRISPR-seq, **identity barcode assignment** for cell multiplexing, **protein denoising** for CITE-seq, **mRNA denoising** for scRNAseq, and etc..

It is developed by Oncology Data Science, Novartis Institute for BioMedical Research.

Expand All @@ -20,10 +20,8 @@ It is developed by Oncology Data Science, Novartis Institute for BioMedical Rese
Introduction
Installation
usages/index
usages/Command_Line_Interface
tutorials/Tutorials
Release_notes
Reference
License
Contacts
GitHub <https://github.com/Novartis/scAR>
Contacts
2 changes: 2 additions & 0 deletions docs/requirements.txt
Expand Up @@ -10,4 +10,6 @@ ipykernel
protobuf==3.20.*
anndata
scanpy
sphinx-design
pydata-sphinx-theme
git+https://github.com/Novartis/scAR.git
7 changes: 0 additions & 7 deletions docs/usages/Command_Line_Interface.rst

This file was deleted.

0 comments on commit 421e52f

Please sign in to comment.