Skip to content

Commit 2919ae4

Browse files
committed
Merge branch 'dev'
2 parents 25a8211 + 7bbdd9c commit 2919ae4

26 files changed

Lines changed: 105 additions & 1788 deletions

README.rst

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,35 @@ pySCENIC
33

44
|buildstatus|_ |pypipackage|_ |docstatus|_
55

6+
67
pySCENIC is a lightning-fast python implementation of the SCENIC_ pipeline (Single-Cell rEgulatory Network Inference and
78
Clustering) which enables biologists to infer transcription factors, gene regulatory networks and cell types from
89
single-cell RNA-seq data.
910

1011
The pioneering work was done in R and results were published in Nature Methods [1]_.
11-
A new and comprehensive description of this Python implementation of the SCENIC pipeline is available in Nature Protocols [5]_ (`see here <https://doi.org/10.1038/s41596-020-0336-2>`_).
12+
A new and comprehensive description of this Python implementation of the SCENIC pipeline is available in Nature Protocols [4]_.
1213

1314
pySCENIC can be run on a single desktop machine but easily scales to multi-core clusters to analyze thousands of cells
1415
in no time. The latter is achieved via the dask_ framework for distributed computing [2]_.
1516

16-
**Full documentation** is available on `Read the Docs <https://pyscenic.readthedocs.io/en/latest/>`_
17+
**Full documentation** for pySCENIC is available on `Read the Docs <https://pyscenic.readthedocs.io/en/latest/>`_
18+
19+
----
20+
21+
pySCENIC is part of the SCENIC Suite of tools!
22+
See the main `SCENIC website <https://scenic.aertslab.org/>`_ for additional information and a full list of tools available.
23+
24+
----
25+
1726

1827
News and releases
1928
-----------------
2029

30+
0.11.2 | 2021-05-07
31+
^^^^^^^^^^^^^^^^^^^
32+
33+
* Split some core cisTarget functions out into a separate repository, `ctxcore <https://github.com/aertslab/ctxcore>`_. This is now a required package for pySCENIC.
34+
2135
0.11.1 | 2021-02-11
2236
^^^^^^^^^^^^^^^^^^^
2337

@@ -96,7 +110,9 @@ All the functionality of the original R implementation is available and in addit
96110
Additional resources
97111
--------------------
98112

99-
For more information, please visit the main SCENIC_ website.
113+
For more information, please visit LCB_,
114+
the main `SCENIC website <https://scenic.aertslab.org/>`_,
115+
or `SCENIC (R version) <https://github.com/aertslab/SCENIC>`_.
100116
There is a tutorial to `create new cisTarget databases <https://github.com/aertslab/create_cisTarget_databases>`_.
101117
The CLI to pySCENIC has also been streamlined into a pipeline that can be run with a single command, using the Nextflow workflow manager.
102118
There are two Nextflow implementations available:
@@ -114,11 +130,10 @@ We are grateful to all providers of TF-annotated position weight matrices, in pa
114130
References
115131
----------
116132

117-
.. [1] Aibar, S. et al. SCENIC: single-cell regulatory network inference and clustering. Nat Meth 14, 1083–1086 (2017).
133+
.. [1] Aibar, S. et al. SCENIC: single-cell regulatory network inference and clustering. Nat Meth 14, 1083–1086 (2017). `doi:10.1038/nmeth.4463 <https://doi.org/10.1038/nmeth.4463>`_
118134
.. [2] Rocklin, M. Dask: parallel computation with blocked algorithms and task scheduling. conference.scipy.org
119-
.. [3] Huynh-Thu, V. A. et al. Inferring regulatory networks from expression data using tree-based methods. PLoS ONE 5, (2010).
120-
.. [4] Zeisel, A. et al. Cell types in the mouse cortex and hippocampus revealed by single-cell RNA-seq. Science 347, 1138–1142 (2015).
121-
.. [5] Van de Sande B., Flerin C., et al. A scalable SCENIC workflow for single-cell gene regulatory network analysis. Nat Protoc. June 2020:1-30. doi:10.1038/s41596-020-0336-2
135+
.. [3] Huynh-Thu, V. A. et al. Inferring regulatory networks from expression data using tree-based methods. PLoS ONE 5, (2010). `doi:10.1371/journal.pone.0012776 <https://doi.org/10.1371/journal.pone.0012776>`_
136+
.. [4] Van de Sande B., Flerin C., et al. A scalable SCENIC workflow for single-cell gene regulatory network analysis. Nat Protoc. June 2020:1-30. `doi:10.1038/s41596-020-0336-2 <https://doi.org/10.1038/s41596-020-0336-2>`_
122137
123138
.. |buildstatus| image:: https://travis-ci.org/aertslab/pySCENIC.svg?branch=master
124139
.. _buildstatus: https://travis-ci.org/aertslab/pySCENIC

docs/faq.rst

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,8 @@ Frequently Asked Questions
44
I am having problems with Dask
55
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
66

7-
The Arboreto package :code:`v0.1.5`, and some steps of the cisTarget step within pySCENIC, seem to depend on an older version of Dask/Distributed.
8-
Using a more recent version of Dask/Distributed can result in some cryptic errors.
9-
It is recommended to use the older version of Dask and Distributed for stability here:
10-
11-
.. code-block:: bash
12-
13-
pip install dask==1.0.0 distributed'>=1.21.6,<2.0.0'
14-
15-
16-
But in many cases this still results in issues with the GRN step.
17-
An alternative is to use the multiprocessing implementation of Arboreto recently included in pySCENIC (`arboreto_with_multiprocessing.py <https://github.com/aertslab/pySCENIC/blob/master/src/pyscenic/cli/arboreto_with_multiprocessing.py>`_).
7+
An alternative is to use the multiprocessing implementation of Arboreto included in pySCENIC (`arboreto_with_multiprocessing.py <https://github.com/aertslab/pySCENIC/blob/master/src/pyscenic/cli/arboreto_with_multiprocessing.py>`_).
8+
This scrips is also available on the path once pySCENIC is installed.
189
This script uses the Arboreto and pySCENIC codebase to run GRNBoost2 (or GENIE3) without Dask.
1910
The eliminates the possibility of running the GRN step across multiple nodes, but brings provides additional stability.
2011
The run time is generally equivalent to the Dask implementation using the same number of workers.
@@ -101,7 +92,7 @@ Yes you can. The code snippet below shows you how to create your own databases:
10192

10293
.. code-block:: python
10394
104-
from pyscenic.rnkdb import DataFrameRankingDatabase as RankingDatabase
95+
from ctxcore.rnkdb import DataFrameRankingDatabase as RankingDatabase
10596
import numpy as np
10697
import pandas as pd
10798
@@ -114,6 +105,10 @@ Yes you can. The code snippet below shows you how to create your own databases:
114105
dtype=np.int32)
115106
RankingDatabase(df, 'custom').save('custom.db')
116107
108+
Please also see
109+
`create_cisTarget_databases <https://github.com/aertslab/create_cisTarget_databases>`_
110+
for more detailed and flexible methods to create custom cisTarget databases.
111+
117112

118113
Can I draw the distribution of AUC values for a regulon across cells?
119114
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

docs/installation.rst

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ You can also install the bleeding edge (i.e. less stable) version of the package
4444
4545
4646
Containers
47-
~~~~~~~~~
47+
~~~~~~~~~~
4848

4949
**pySCENIC containers** are also available for download and immediate use. In this case, no compiling or installation is required, provided either Docker or Singularity software is installed on the user's system. Images are available from `Docker Hub`_. Usage of the containers is shown below (`Docker and Singularity Images`_).
5050
To pull the docker images, for example:
@@ -194,7 +194,60 @@ Note that in this case, a bind needs to be specified.
194194

195195
.. code-block:: bash
196196
197-
singularity exec -B /data:/data aertslab-pyscenic-0.10.0.sif ipython kernel -f {connection_file}
197+
singularity exec -B /data:/data aertslab-pyscenic-latest.sif ipython kernel -f {connection_file}
198+
199+
More generally, a local or remote kernel can be set up by using the following examples.
200+
These would go in a kernel file in ``~/.local/share/jupyter/kernels/pyscenic-latest/kernel.json`` (for example).
201+
202+
**Remote singularity kernel:**
203+
204+
.. code-block:: bash
205+
206+
{
207+
"argv": [
208+
"/software/jupyter/bin/python",
209+
"-m",
210+
"remote_ikernel",
211+
"--interface",
212+
"ssh",
213+
"--host",
214+
"r23i27n14",
215+
"--workdir",
216+
"~/",
217+
"--kernel_cmd",
218+
"singularity",
219+
"exec",
220+
"-B",
221+
"/path/to/mounts",
222+
"/path/to/aertslab-pyscenic-latest.sif",
223+
"ipython",
224+
"kernel",
225+
"-f",
226+
"{connection_file}"
227+
],
228+
"display_name": "pySCENIC singularity remote",
229+
"language": "Python"
230+
}
231+
232+
**Local singularity kernel:**
233+
234+
.. code-block:: bash
235+
236+
{
237+
"argv": [
238+
"singularity",
239+
"exec",
240+
"-B",
241+
"/path/to/mounts",
242+
"/path/to/aertslab-pyscenic-latest.sif",
243+
"ipython",
244+
"kernel",
245+
"-f",
246+
"{connection_file}"
247+
],
248+
"display_name": "pySCENIC singularity local",
249+
"language": "python"
250+
}
198251
199252
200253
Nextflow

docs/tutorial.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ First we import the necessary modules and declare some constants:
5656
from arboreto.utils import load_tf_names
5757
from arboreto.algo import grnboost2
5858
59-
from pyscenic.rnkdb import FeatherRankingDatabase as RankingDatabase
59+
from ctxcore.rnkdb import FeatherRankingDatabase as RankingDatabase
6060
from pyscenic.utils import modules_from_adjacencies, load_motifs
6161
from pyscenic.prune import prune2df, df2regulons
6262
from pyscenic.aucell import aucell

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
ctxcore
12
cytoolz
23
multiprocessing_on_dill
34
llvmlite
@@ -9,7 +10,6 @@ pandas>=0.20.1
910
cloudpickle
1011
dask
1112
distributed
12-
pyarrow>=0.11.1,<0.17.0
1313
arboreto>=0.1.6
1414
boltons
1515
setuptools

requirements_docker.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ cffi==1.14.4
1818
chardet==3.0.4
1919
click==7.1.2
2020
cloudpickle==1.6.0
21+
ctxcore==0.1.1
2122
cycler==0.10.0
2223
Cython==0.29.21
2324
cytoolz==0.11.0

src/pyscenic/aucell.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# -*- coding: utf-8 -*-
22

33
import pandas as pd
4-
from .recovery import enrichment4cells
4+
from ctxcore.recovery import enrichment4cells
55
from tqdm import tqdm
66
from typing import Sequence, Type
7-
from .genesig import GeneSignature
7+
from ctxcore.genesig import GeneSignature
88
from multiprocessing import cpu_count, Process, Array
99
from boltons.iterutils import chunked
1010
from multiprocessing.sharedctypes import RawArray

src/pyscenic/cli/db2feather.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import os
44
import argparse
5-
from pyscenic.rnkdb import convert_sqlitedb_to_featherdb
5+
from ctxcore.rnkdb import convert_sqlitedb_to_featherdb
66

77

88
def derive_db_name(fname: str) -> str:

src/pyscenic/cli/gmt2regions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import os
44
import argparse
55
import sys
6-
from pyscenic.genesig import GeneSignature
6+
from ctxcore.genesig import GeneSignature
77
from pyscenic.regions import RegionRankingDatabase, Delineation, convert
88

99

src/pyscenic/cli/invertdb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import os
44
import argparse
5-
from pyscenic.rnkdb import opendb, InvertedRankingDatabase
5+
from ctxcore.rnkdb import opendb, InvertedRankingDatabase
66

77

88
def derive_db_name(fname: str) -> str:

0 commit comments

Comments
 (0)