-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ✨ add doc dependencies and build website locally - some hints on how to build docs - added missing file - cleaned-up configuration * ✨ build documentation references on Read the Docs * 🐛 install package on readthedocs * 🎨 switch theme * 🎨 add intersphinx and typehint highlighting * 🐛 update to GitHub (actions) - 🐛 update repository references - 🔥 remove travis CI config file * 🎨 add an executed example to the docs (jupytext+mystnb 🐛 pass on parameters in umap fct. * 🐛 fix various type annotation bugs (intersphinx linking) need to be valid types (typos) or module.objects (missing module name) * 🎨 style landing page
- Loading branch information
Showing
20 changed files
with
289 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
_build | ||
jupyter_execute | ||
reference | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Docs creation | ||
|
||
In order to build the docs you need to | ||
|
||
1. install sphinx and additional support packages | ||
2. build the package reference files | ||
3. run sphinx to create a local html version | ||
|
||
The documentation is build using readthedocs automatically. | ||
|
||
Install the docs dependencies of the package (as speciefied in toml): | ||
|
||
```bash | ||
# in main folder | ||
pip install .[docs] | ||
``` | ||
|
||
## Build docs using Sphinx command line tools | ||
|
||
Command to be run from `path/to/docs`, i.e. from within the `docs` package folder: | ||
|
||
Options: | ||
- `--separate` to build separate pages for each (sub-)module | ||
|
||
```bash | ||
# pwd: docs | ||
# apidoc | ||
sphinx-apidoc --force --implicit-namespaces --module-first -o reference ../acore | ||
# build docs | ||
sphinx-build -n -W --keep-going -b html ./ ./_build/ | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# %% [markdown] | ||
# # Exploratory Analysis | ||
|
||
# %% | ||
import pandas as pd | ||
import acore.exploratory_analysis as ea | ||
|
||
data = pd.DataFrame( | ||
{ | ||
"group": ["A", "A", "B", "B"], | ||
"protein1": [1.4, 2.2, 5.3, 4.2], | ||
"protein2": [5.6, 0.3, 2.1, 8.1], | ||
"protein3": [9.1, 10.01, 11.2, 12.9], | ||
} | ||
) | ||
|
||
# %% [markdown] | ||
# Show first two principal components of the data. | ||
|
||
# %% | ||
result_dfs, annotation = ea.run_pca( | ||
data, drop_cols=[], annotation_cols=[], group="group", components=2, dropna=True | ||
) | ||
|
||
# %% [markdown] | ||
# Show what was computed: | ||
|
||
# %% | ||
result_dfs[0] | ||
|
||
# %% | ||
result_dfs[1] | ||
|
||
# %% | ||
result_dfs[2] | ||
|
||
# %% | ||
annotation | ||
|
||
# %% [markdown] | ||
# Visualize UMAP low-dimensional embedding of the data. | ||
|
||
# %% | ||
result, annotation = ea.run_umap( | ||
data, | ||
drop_cols=["sample", "subject"], | ||
group="group", | ||
n_neighbors=10, | ||
min_dist=0.3, | ||
metric="cosine", | ||
dropna=True, | ||
) | ||
|
||
# %% | ||
result['umap'] | ||
|
||
# %% | ||
annotation | ||
|
||
# %% [markdown] | ||
# Make sure to check the parameter annotations in the API docs. |
Oops, something went wrong.