Skip to content

Commit

Permalink
Cleaned up dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
cboix committed Jul 22, 2024
1 parent 142667c commit eeaef36
Show file tree
Hide file tree
Showing 33 changed files with 205 additions and 312 deletions.
29 changes: 16 additions & 13 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,25 @@ pip install ./scdemon
#+END_SRC


**** Minimal conda environment:

**** Conda environment:
#+BEGIN_SRC bash
conda create -n scdemonpy conda-forge::anndata conda-forge::tqdm conda-forge::pip conda-forge::igraph conda-forge::umap-learn conda::scikit-build
# Minimal:
conda create -n scdemonpy -c conda-forge numpy pandas scipy igraph umap-learn leidenalg scanpy seaborn matplotlib

# If you want to run GO enrichment:
conda install -n scdemonpy -c bioconda gprofiler-official
#+END_SRC


**** Full Dependencies:
**** Dependencies:

#+BEGIN_SRC bash
numpy, pandas,
scipy, tqdm,
igraph, umap-learn,
leidenalg, scikit-learn,
scanpy, anndata,
seaborn, matplotlib,
gprofiler-official,
python-igraph, adjustText,
numba
# Core:
numpy, pandas, scipy, igraph, umap-learn,
leidenalg, scanpy, seaborn, matplotlib

# Optional:
anndata, gprofiler-official, adjustText
#+END_SRC


Expand Down Expand Up @@ -80,3 +80,6 @@ mod.save_modules(graph_id)
gpres = sm.get_goterms(mod, graph_id)
#+END_SRC


Cite: Mathys*, Boix*, Akay*, et al., [_Single-cell multiregion dissection of Alzheimer’s disease_](https://www.nature.com/articles/s41586-024-07606-7)

23 changes: 0 additions & 23 deletions docs/source/api/generated/scdemon.graph.adjacency_matrix.rst

This file was deleted.

32 changes: 0 additions & 32 deletions docs/source/api/generated/scdemon.graph.gene_graph.rst

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions docs/source/api/generated/scdemon.utils.get_goterms.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/source/api/generated/scdemon.utils.make_graphlist.rst

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions docs/source/api/generated/scdemon.utils.recipe_annotate.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/source/api/generated/scdemon.utils.recipe_full.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/source/api/generated/scdemon.utils.recipe_preprocess.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/source/api/generated/scdemon.utils.vcorrcoef.rst

This file was deleted.

2 changes: 1 addition & 1 deletion docs/source/api/graph.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### Graph
# Graph

```{eval-rst}
.. module:: scdemon.graph
Expand Down
1 change: 0 additions & 1 deletion docs/source/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ API
modules
graph
plotting
utils

2 changes: 1 addition & 1 deletion docs/source/api/modules.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Modules
# Modules

<!-- TODO: Add description of how to use modules objects here -->

Expand Down
2 changes: 1 addition & 1 deletion docs/source/api/plotting.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### Plotting
# Plotting

```{eval-rst}
.. module:: scdemon.plotting
Expand Down
25 changes: 0 additions & 25 deletions docs/source/api/utils.md

This file was deleted.

5 changes: 5 additions & 0 deletions docs/source/example.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.. _example:

Basic example
=============

Expand All @@ -18,6 +19,7 @@ Basic example using one of the :code:`scanpy` datasets:
.. TODO: link to modules objects code documentation
Once we have this dataset, we can create an object that handles any modules and graphs derived from it:

.. code-block:: python
Expand All @@ -28,6 +30,7 @@ Once we have this dataset, we can create an object that handles any modules and
.. TODO: link to graph code documentation
After this, we build a basic gene-gene graph and learn modules on top of it. Any graph we create is an independent :code:`graph` object under the overarching modules object.

.. code-block:: python
Expand All @@ -41,6 +44,7 @@ After this, we build a basic gene-gene graph and learn modules on top of it. Any
.. TODO: put some of these plots in the documentation
We can also plot these modules in multiple ways:

.. code-block:: python
Expand All @@ -54,6 +58,7 @@ We can also plot these modules in multiple ways:
.. TODO: link gprofiler
We can also use :code:`gprofiler-official` to annotate these modules with functional terms:

.. code-block:: python
Expand Down
22 changes: 12 additions & 10 deletions docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Usage
=====

.. _installation:

Installation
------------

Expand All @@ -26,19 +27,20 @@ A minimal conda environment for this package includes:

.. code-block:: console
conda create -n scdemonpy conda-forge::anndata conda-forge::tqdm conda-forge::pip conda-forge::igraph conda-forge::umap-learn conda::scikit-build
# Minimal:
conda create -n scdemonpy -c conda-forge numpy pandas scipy igraph umap-learn leidenalg scanpy seaborn matplotlib
# If you want to run GO enrichment:
conda install -n scdemonpy -c bioconda gprofiler-official
The full list of dependencies is as follows:

.. code-block:: console
numpy, pandas,
scipy, tqdm,
igraph, umap-learn,
leidenalg, scikit-learn,
scanpy, anndata,
seaborn, matplotlib,
gprofiler-official,
igraph, adjustText,
numba
# Core:
numpy, pandas, scipy, igraph, umap-learn,
leidenalg, scanpy, seaborn, matplotlib
# Optional:
anndata, gprofiler-official, adjustText
22 changes: 5 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ requires = [
"setuptools>=60",
"setuptools-scm>=8.0"]

# [build-system]
# requires = ["scikit-build-core>=0.3.3"]
# build-backend = "scikit_build_core.build"
# build-backend = "setuptools.build_meta"

[project]
name = "scdemon"
version = "0.0.4"
Expand All @@ -17,14 +12,10 @@ authors = [{name = "Benjamin James", email = "[email protected]"},
license = {file = "LICENSE"}
requires-python = ">=3.7"
dependencies = [
"numpy", "pandas",
"scipy", "tqdm",
"igraph", "umap-learn",
"leidenalg", "scikit-learn",
# Added from original modules, can prune:
"scanpy", "anndata",
"seaborn", "matplotlib",
"igraph", "numba"
"numpy", "pandas",
"scipy", "igraph",
"umap-learn", "leidenalg",
"scanpy", "seaborn", "matplotlib"
]

[project.urls]
Expand All @@ -33,10 +24,7 @@ Source = "https://github.com/kellislab/scdemon"
Home-page = "https://github.com/kellislab/scdemon"

[project.optional-dependencies]
test = ["adjustText", "gprofiler-official"]

[tool.scikit-build]
wheel.expand-macos-universal-tags = true
test = ["adjustText", "gprofiler-official", "anndata"]

[tool.setuptools]
packages = ["scdemon",
Expand Down
2 changes: 1 addition & 1 deletion scdemon/graph/utils_community_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"""Utility scripts for community detection."""
import logging
import numpy as np
import leidenalg as la


def compute_leiden_partition(graph,
Expand All @@ -11,6 +10,7 @@ def compute_leiden_partition(graph,
use_weights=False,
n_iterations=-1,
random_state=1):
import leidenalg as la
# Set up the leidenalg arguments:
partition_kwargs = {}
partition_kwargs["n_iterations"] = n_iterations
Expand Down
Loading

0 comments on commit eeaef36

Please sign in to comment.