Skip to content

Draft 0.3.1 #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions docs/classifier.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# classifier functions

more details on the clf object

::: pySingleCellNet.classify


Binary file added docs/img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/logoGlow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SingleCellNet predicts the _cell type_ of query scRNA-seq data by Random forest multi-class classification. See [Tan 2019](https://pubmed.ncbi.nlm.nih.gov/31377170/) for more details. It was [originally written in R](https://github.com/pcahan1/SingleCellNet). PySingleCellNet (**PySCN**) is the Python version, and it is compatible with [Scanpy](https://scanpy.readthedocs.io/en/stable/). PySCN was crafted to aid in the analysis of engineered cell populations (i.e. cells derived via directed differentiation of pluripotent stem cells or via direct conversion), but can just as easily be used to perform _cell typing_ on data dervived from other sources as long as adequate training data is available.



14 changes: 14 additions & 0 deletions docs/install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
PySingleCellnet depends on several packages, most of which can be installed with pip, and some are available in conda channels.

### Prerequisites

```python
pip install pandas numpy sklearn scanpy statsmodels scipy matplotlib seaborn umap-learn
```

### Installation

```python
!pip install git+https://github.com/pcahan1/PySingleCellNet/
```

10 changes: 10 additions & 0 deletions docs/javascripts/extra.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Using the document$ observable from mkdocs-material to get notified of page "reload" also if using `navigation.instant` (SSA)
document$.subscribe(function() {
// First check if the page contains a notebook-related class
if (document.querySelector('.jp-Notebook')) {
document.querySelector("div.md-sidebar.md-sidebar--secondary").remove();
// document.querySelector("div.md-sidebar.md-sidebar--primary").remove();
}
});


527 changes: 527 additions & 0 deletions docs/notebooks/Basics.ipynb

Large diffs are not rendered by default.

637 changes: 637 additions & 0 deletions docs/notebooks/categorize.ipynb

Large diffs are not rendered by default.

Binary file added docs/notebooks/eb_diagram.png
Loading
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.
Binary file added docs/notebooks/img/categories.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/notebooks/img/eb_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
449 changes: 449 additions & 0 deletions docs/notebooks/old_quickstart.ipynb

Large diffs are not rendered by default.

538 changes: 538 additions & 0 deletions docs/notebooks/quickstart.ipynb

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions docs/plotting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# plotting functions

::: pySingleCellNet.plotting

File renamed without changes.
3 changes: 0 additions & 3 deletions docs/requirements.txt

This file was deleted.

1 change: 0 additions & 1 deletion docs/source/apidocs/index.md

This file was deleted.

56 changes: 0 additions & 56 deletions docs/source/conf.py

This file was deleted.

14 changes: 0 additions & 14 deletions docs/source/install.md

This file was deleted.

9 changes: 9 additions & 0 deletions docs/stylesheets/extra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* hide jupyter notebooks input/output numbers */
.jp-InputPrompt {
display: none !important;
}

.jp-OutputPrompt {
display: none !important;
}

File renamed without changes.
6 changes: 6 additions & 0 deletions docs/utils.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# utility functions

Add a brief summary here

::: pySingleCellNet.utils

Binary file removed md_img/HM_Lung_Leiden_101120.png
Binary file not shown.
Binary file removed md_img/HM_Val_Lung_100920.png
Binary file not shown.
Binary file removed md_img/HM_Val_Other_100920.png
Binary file not shown.
Binary file removed md_img/HM_Val_Other_softmax_100920.png
Binary file not shown.
Binary file removed md_img/PR_curves_Lung_100920.png
Binary file not shown.
Binary file removed md_img/UMAP_Lung_Other_101120.png
Binary file not shown.
Binary file removed md_img/UMAP_Lung_SCN_101120.png
Binary file not shown.
Binary file removed md_img/hm_mgenes_result.png
Binary file not shown.
Binary file removed md_img/output_17_0.png
Binary file not shown.
Binary file removed md_img/output_18_0.png
Binary file not shown.
Binary file removed md_img/output_20_0.png
Binary file not shown.
Binary file removed md_img/output_21_0.png
Binary file not shown.
Binary file removed md_img/output_22_0.png
Binary file not shown.
Binary file removed md_img/output_24_0.png
Binary file not shown.
Binary file removed md_img/pca_lung_101120.png
Binary file not shown.
1 change: 0 additions & 1 deletion md_img/temp

This file was deleted.

77 changes: 77 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
site_name: pySingleCellNet
site_author: Patrick Cahan
copyright: Copyright © 2024 Cahan Lab
repo_url: https://github.com/CahanLab/PySingleCellNet

use_directory_urls: false

extra_css:
- stylesheets/extra.css

extra_javascript:
- javascripts/extra.js

theme:
name: material
font:
text: Noto Sans
palette:
primary: light blue
logo: img/logoGlow.png
favicon: img/logo.png
features:
- content.footnote.tooltips
- navigation.expand
- toc.integrate
# - navigation.tabs
# - navigation.tabs.sticky
# - navigation.sections

markdown_extensions:
- md_in_html
- footnotes
- admonition
- attr_list
- tables
- def_list
- toc:
title: On this page
- pymdownx.blocks.caption
- pymdownx.tasklist:
custom_checkbox: false
- pymdownx.emoji:
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg

plugins:
- mkdocstrings:
handlers:
python:
options:
separate_signature: true
docstring_section_style: list
heading_level: 3
- search
- mkdocs-jupyter:
execute: false
include_source: True

nav:
# - Home: index.md
- Installation: install.md
- Tutorials:
- 'Quickstart': notebooks/quickstart.ipynb
- 'Explore': notebooks/categorize.ipynb
# - 'train & classify': 'notebooks/Basics.ipynb'
# - 'analyze _in vitro_ cells': 'notebooks/explore.ipynb'
# - 'prepare training data': 'notebooks/how-to_prepare_reference_data.ipynb'
# - 'Train a classifier': 'notebooks/train_classifier.ipynb'
# - 'Enrichment analysis': 'notebooks/enrichment.ipynb'
- Training data: training_data.md
- References: refs.md
- API:
- 'Utility functions': 'utils.md'
- 'Classifier functions': 'classifier.md'
- 'Plotting functions': 'plotting.md'


File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions old_docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
sphinx
sphinx-rtd-theme
sphinx-autodoc-typehints
sphinxcontrib-napoleon
nbsphinx
myst-nb
sphinx-copybutton
sphinx-book-theme
File renamed without changes.
File renamed without changes
7 changes: 7 additions & 0 deletions old_docs/source/apidocs/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pySingleCellNet
===============

.. toctree::
:maxdepth: 4

pySingleCellNet
4 changes: 4 additions & 0 deletions old_docs/source/apidocs/pySingleCellNet.config.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. automodule:: pySingleCellNet.config
:members:
:undoc-members:
:show-inheritance:
4 changes: 4 additions & 0 deletions old_docs/source/apidocs/pySingleCellNet.plotting.bar.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. automodule:: pySingleCellNet.plotting.bar
:members:
:undoc-members:
:show-inheritance:
4 changes: 4 additions & 0 deletions old_docs/source/apidocs/pySingleCellNet.plotting.dot.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. automodule:: pySingleCellNet.plotting.dot
:members:
:undoc-members:
:show-inheritance:
4 changes: 4 additions & 0 deletions old_docs/source/apidocs/pySingleCellNet.plotting.heatmap.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. automodule:: pySingleCellNet.plotting.heatmap
:members:
:undoc-members:
:show-inheritance:
18 changes: 18 additions & 0 deletions old_docs/source/apidocs/pySingleCellNet.plotting.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
pySingleCellNet.plotting package
================================

.. automodule:: pySingleCellNet.plotting
:members:
:undoc-members:
:show-inheritance:

Submodules
----------

.. toctree::
:maxdepth: 4

pySingleCellNet.plotting.bar
pySingleCellNet.plotting.dot
pySingleCellNet.plotting.heatmap
pySingleCellNet.plotting.scatter
4 changes: 4 additions & 0 deletions old_docs/source/apidocs/pySingleCellNet.plotting.scatter.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. automodule:: pySingleCellNet.plotting.scatter
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. automodule:: pySingleCellNet.postclass_analysis
:members:
:undoc-members:
:show-inheritance:
4 changes: 4 additions & 0 deletions old_docs/source/apidocs/pySingleCellNet.rank_class.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. automodule:: pySingleCellNet.rank_class
:members:
:undoc-members:
:show-inheritance:
30 changes: 30 additions & 0 deletions old_docs/source/apidocs/pySingleCellNet.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
pySingleCellNet package
=======================

.. automodule:: pySingleCellNet
:members:
:undoc-members:
:show-inheritance:

Subpackages
-----------

.. toctree::
:maxdepth: 4

pySingleCellNet.plotting
pySingleCellNet.utils

Submodules
----------

.. toctree::
:maxdepth: 4

pySingleCellNet.config
pySingleCellNet.postclass_analysis
pySingleCellNet.rank_class
pySingleCellNet.scn_assess
pySingleCellNet.scn_train
pySingleCellNet.stats
pySingleCellNet.tsp_rf
4 changes: 4 additions & 0 deletions old_docs/source/apidocs/pySingleCellNet.scn_assess.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. automodule:: pySingleCellNet.scn_assess
:members:
:undoc-members:
:show-inheritance:
4 changes: 4 additions & 0 deletions old_docs/source/apidocs/pySingleCellNet.scn_train.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. automodule:: pySingleCellNet.scn_train
:members:
:undoc-members:
:show-inheritance:
4 changes: 4 additions & 0 deletions old_docs/source/apidocs/pySingleCellNet.stats.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. automodule:: pySingleCellNet.stats
:members:
:undoc-members:
:show-inheritance:
4 changes: 4 additions & 0 deletions old_docs/source/apidocs/pySingleCellNet.tsp_rf.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. automodule:: pySingleCellNet.tsp_rf
:members:
:undoc-members:
:show-inheritance:
4 changes: 4 additions & 0 deletions old_docs/source/apidocs/pySingleCellNet.utils.adataTools.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. automodule:: pySingleCellNet.utils.adataTools
:members:
:undoc-members:
:show-inheritance:
4 changes: 4 additions & 0 deletions old_docs/source/apidocs/pySingleCellNet.utils.annotation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. automodule:: pySingleCellNet.utils.annotation
:members:
:undoc-members:
:show-inheritance:
4 changes: 4 additions & 0 deletions old_docs/source/apidocs/pySingleCellNet.utils.colors.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. automodule:: pySingleCellNet.utils.colors
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. automodule:: pySingleCellNet.utils.oldFunctions
:members:
:undoc-members:
:show-inheritance:
4 changes: 4 additions & 0 deletions old_docs/source/apidocs/pySingleCellNet.utils.qc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. automodule:: pySingleCellNet.utils.qc
:members:
:undoc-members:
:show-inheritance:
19 changes: 19 additions & 0 deletions old_docs/source/apidocs/pySingleCellNet.utils.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
pySingleCellNet.utils package
=============================

.. automodule:: pySingleCellNet.utils
:members:
:undoc-members:
:show-inheritance:

Submodules
----------

.. toctree::
:maxdepth: 4

pySingleCellNet.utils.adataTools
pySingleCellNet.utils.annotation
pySingleCellNet.utils.colors
pySingleCellNet.utils.oldFunctions
pySingleCellNet.utils.qc
Loading