Skip to content

Commit 293e303

Browse files
committed
Updated documentation for running pySCENIC using Docker and Singularity.
1 parent b492340 commit 293e303

File tree

1 file changed

+37
-35
lines changed

1 file changed

+37
-35
lines changed

README.rst

+37-35
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ You can also install the bleeding edge (i.e. less stable) version of the package
6161
cd pySCENIC/
6262
pip install .
6363
64+
**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 both `Docker Hub`_ and `Singularity Hub`_. Usage of the containers is shown below (`Docker and Singularity Images`_).
65+
6466
To successfully use this pipeline you also need **auxilliary datasets**:
6567

6668
1. *Databases ranking the whole genome* of your species of interest based on regulatory features (i.e. transcription factors). Ranking databases are typically stored in the feather_ format and can be downloaded from cisTargetDBs_.
@@ -290,44 +292,43 @@ Docker and Singularity Images
290292
-----------------------------
291293
292294
pySCENIC is available to use with both Docker and Singularity, and tool usage from a container is similar to that of the command line interface.
293-
Note that the feather databases, transcription factors, and motif annotation databases need to be accessible to the container.
294-
In the below examples, separate mounts are created for the input, output, and databases directories.
295+
Note that the feather databases, transcription factors, and motif annotation databases need to be accessible to the container via a mounted volume.
296+
In the below examples, a single volume mount is used for simplicity, which will contains the input, output, and databases files.
295297
296298
Docker
297299
~~~~~~
298300
299-
Docker images are available from `Docker Hub`_.
301+
Docker images are available from `Docker Hub`_, and can be obtained by running :code:`docker pull aertslab/pyscenic:[version]`, with the version tag as the latest release.
300302
301-
To run pySCENIC in Docker, use the following three steps.
303+
To run pySCENIC using Docker, use the following three steps.
302304
A mount point (or more than one) needs to be specified, which contains the input data and necessary resources).
303305
304306
.. code-block:: bash
305307
306308
docker run \
307309
-v /path/to/data:/scenicdata \
308-
aertslab/pyscenic pyscenic grn \
310+
aertslab/pyscenic:[version] pyscenic grn \
309311
--num_workers 6 \
310312
-o /scenicdata/expr_mat.adjacencies.tsv \
311313
/scenicdata/expr_mat.tsv \
312314
/scenicdata/allTFs_hg38.txt
313315
314316
docker run \
315317
-v /path/to/data:/scenicdata \
316-
aertslab/pyscenic pyscenic ctx \
318+
aertslab/pyscenic:[version] pyscenic ctx \
317319
/scenicdata/expr_mat.adjacencies.tsv \
318320
/scenicdata/hg19-500bp-upstream-7species.mc9nr.feather \
319321
/scenicdata/hg19-tss-centered-5kb-7species.mc9nr.feather \
320322
/scenicdata/hg19-tss-centered-10kb-7species.mc9nr.feather \
321323
--annotations_fname /scenicdata/motifs-v9-nr.hgnc-m0.001-o0.0.tbl \
322324
--expression_mtx_fname /scenicdata/expr_mat.tsv \
323325
--mode "dask_multiprocessing" \
324-
--output_type csv \
325326
--output /scenicdata/regulons.csv \
326327
--num_workers 6
327328
328329
docker run \
329-
-v /path/to/data:/scenic-input \
330-
aertslab/pyscenic pyscenic aucell \
330+
-v /path/to/data:/scenicdata \
331+
aertslab/pyscenic:[version] pyscenic aucell \
331332
/scenicdata/expr_mat.tsv \
332333
/scenicdata/regulons.csv \
333334
-o /scenicdata/auc_mtx.csv \
@@ -336,39 +337,39 @@ A mount point (or more than one) needs to be specified, which contains the input
336337
Singularity
337338
~~~~~~~~~~~
338339
339-
Singularity images are available from `Singularity Hub`_.
340+
Singularity images are available from `Singularity Hub`_ and can be obtained by running :code:`singularity pull shub://aertslab/pySCENIC:0.9.7` with the proper version tag.
340341
341-
To run pySCENIC in Singularity, use the following three steps.
342-
Note that in Singularity 3.0+, the mount points are automatically overlaid.
342+
To run pySCENIC with Singularity, the usage is very similar to that of Docker.
343+
Note that in Singularity 3.0+, the mount points are automatically overlaid, but bind points can be specified similarly to Docker with :code:`--bind`/:code:`-B`.
344+
The first step (GRN inference) is shown as an example:
343345
344346
.. code-block:: bash
345347
346-
singularity exec pySCENIC_latest.sif \
348+
singularity exec pySCENIC_0.9.7.sif \
347349
pyscenic grn \
348350
--num_workers 6 \
349-
-o /scenic-output/expr_mat.adjacencies.tsv \
350-
/scenic-input/expr_mat.tsv \
351-
/scenic-db/allTFs_hg38.txt
352-
353-
singularity exec pySCENIC_latest.sif \
354-
pyscenic ctx \
355-
expr_mat.adjacencies.tsv \
356-
hg19-500bp-upstream-7species.mc9nr.feather \
357-
hg19-tss-centered-5kb-7species.mc9nr.feather \
358-
hg19-tss-centered-10kb-7species.mc9nr.feather \
359-
--annotations_fname motifs-v9-nr.hgnc-m0.001-o0.0.tbl \
360-
--expression_mtx_fname expr_mat.tsv \
361-
--mode "dask_multiprocessing" \
362-
--output_type csv \
363-
--output regulons.csv \
364-
--num_workers 6
365-
366-
singularity exec pySCENIC_latest.sif \
367-
pyscenic aucell \
351+
-o expr_mat.adjacencies.tsv \
368352
expr_mat.tsv \
369-
regulons.csv \
370-
-o auc_mtx.csv \
371-
--num_workers 6
353+
allTFs_hg38.txt
354+
355+
356+
Using the Docker or Singularity images with Jupyter notebook
357+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
358+
359+
As of version 0.9.7, the pySCENIC containers have the ipykernel package installed, and can also be used interactively in a notebook.
360+
This can be achieved using a kernel command similar to the following (for singularity).
361+
Note that in this case, a bind needs to be specified.
362+
363+
.. code-block:: bash
364+
365+
singularity exec -B /data:/data pySCENIC_0.9.7.sif ipython kernel -f {connection_file}
366+
367+
368+
Running pySCENIC with Nextflow
369+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
370+
371+
The CLI to pySCENIC has also been streamlined into a pipeline that can be run with a single command, using the Nextflow workflow manager.
372+
For details on this usage, see the `scenic-nf`_ repository.
372373
373374
374375
Frequently Asked Questions
@@ -472,4 +473,5 @@ References
472473
.. _bioconda: https://anaconda.org/bioconda/pyscenic
473474
.. _`Singularity Hub`: https://www.singularity-hub.org/collections/2033
474475
.. _`Docker Hub`: https://cloud.docker.com/u/aertslab/repository/docker/aertslab/pyscenic
476+
.. _`scenic-nf`: https://github.com/aertslab/scenic-nf
475477

0 commit comments

Comments
 (0)