You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/getting-started.rst
+44-25Lines changed: 44 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,22 +3,14 @@
3
3
Getting started
4
4
===============
5
5
6
-
The main prerequisite for `lcdb-wf` is `conda
7
-
<https://docs.conda.io/en/latest/>_`, with the `bioconda
8
-
<https://bioconda.github.io>`_. channel set up and the `mamba
9
-
<https://github.com/mamba-org/mamba>`_ drop-in replacement for conda.
6
+
The main prerequisite for `lcdb-wf` is `conda <https://docs.conda.io/en/latest/>_`, with the `bioconda <https://bioconda.github.io>`_. channel set up and the `mamba <https://github.com/mamba-org/mamba>`_ drop-in replacement for conda installed.
10
7
11
8
If this is new to you, please see :ref:`conda-envs`.
12
9
13
10
.. note::
14
11
15
-
`lcdb-wf` is tested and heavily used on Linux.
16
-
17
-
It is likely to work on macOS as long as all relevant conda packages are
18
-
available for macOS -- though this is not tested.
19
-
20
-
It will **not** work on Windows due to a general lack of support of Windows
21
-
in bioinformatics tools.
12
+
`lcdb-wf` is tested and heavily used on Linux. It is only supported on
13
+
Linux.
22
14
23
15
.. _setup-proj:
24
16
@@ -27,21 +19,24 @@ Setting up a project
27
19
28
20
The general steps to use lcdb-wf in a new project are:
29
21
30
-
1. **Deploy:** download and run ``deploy.py``
22
+
1. **Deploy:** download and run ``deploy.py`` to copy files into a project directory
31
23
2. **Configure:** set up samples table for experiments and edit configuration file
32
24
3. **Run:** activate environment and run the Snakemake file either locally or on a cluster
33
25
34
26
.. _deploy:
35
27
36
28
1. Deploying lcdb-wf
37
29
--------------------
30
+
Using `lcdb-wf` starts with copying files to a project directory, or
31
+
"deploying".
38
32
39
33
Unlike other tools you may have used, `lcdb-wf` is not actually installed per
40
34
se. Rather, it is "deployed" by copying over relevant files from the `lcdb-wf`
41
35
repository to your project directory. This includes Snakefiles, config files,
42
36
and other infrastructure required to run, and excludes files like these docs
43
-
and testing files that are not necessary for an actual project. The reason to
44
-
use this script is so you end up with a cleaner project directory.
37
+
and testing files that are not necessary for an actual project. The reason is
38
+
to use this script is so you end up with a cleaner project directory, compared
39
+
to cloning the repo directly.
45
40
46
41
This script also writes a file to the destination called
47
42
``.lcdb-wf-deployment.json``. It stores the timestamp and details about what
@@ -53,8 +48,8 @@ There are a few ways of doing this.
53
48
Option 1: Download and run the deployment script
54
49
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55
50
56
-
Note that you will not be able to run tests with this method, but it is likely
57
-
the most convenient method.
51
+
This is the most convenient method, although it does not allow running tests
52
+
locally.
58
53
59
54
.. code-block:: bash
60
55
@@ -63,7 +58,8 @@ the most convenient method.
63
58
64
59
Run ``python deploy.py -h`` to see help. Be sure to use the ``--staging`` and
65
60
``--branch=$BRANCH`` arguments when using this method, which will clone the
66
-
repository to a location of your choosing. Once you deploy you can remove it. For example:
61
+
repository to a location of your choosing. Once you deploy you can remove the
62
+
script. For example:
67
63
68
64
.. code-block:: bash
69
65
@@ -78,6 +74,12 @@ repository to a location of your choosing. Once you deploy you can remove it. Fo
78
74
# You can clean up the cloned copy if you want:
79
75
# rm -rf /tmp/lcdb-wf-tmp
80
76
77
+
This will clone the full git repo to ``/tmp/lcdb-wf-tmp``, check out the master
78
+
branch (or whatever branch ``$BRANCH`` is set to), copy the files required for
79
+
an RNA-seq project over to ``analysis/project``, build the main conda
80
+
environment and the R environment, save the ``.lcdb-wf-deployment.json`` file
81
+
there, and then delete the temporary repo.
82
+
81
83
Option 2: Clone repo manually
82
84
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
83
85
Clone a repo using git and check out the branch. Use this method for running
@@ -140,9 +142,9 @@ and run the following:
140
142
141
143
If all goes well, this should print a list of jobs to be run.
142
144
143
-
You can run locally, but this is NOT recommended. To run locally, choose the
144
-
number of CPUs you want to use with the ``-j`` argument as is standard for
145
-
Snakemake.
145
+
You can run locally, but this is NOT recommended for a typicaly RNA-seq
146
+
project. To run locally, choose the number of CPUs you want to use with the
147
+
``-j`` argument as is standard for Snakemake.
146
148
147
149
.. warning::
148
150
@@ -157,18 +159,35 @@ Snakemake.
157
159
# run locally (not recommended)
158
160
snakemake --use-conda -j 8
159
161
160
-
The recommended way is to run on a cluster. On NIH's Biowulf cluster, the way
161
-
to do this is to submit the wrapper script as a batch job:
162
+
The recommended way is to run on a cluster.
163
+
164
+
To run on a cluster, you will need a `Snakemake profile
165
+
<https://snakemake.readthedocs.io/en/stable/executing/cli.html#profiles>`_ for
166
+
your cluster that translates generic resource requirements into arguments for
167
+
your cluster's batch system.
168
+
169
+
On NIH's Biowulf cluster, the profile can be found at
170
+
https://github.com/NIH-HPC/snakemake_profile. If you are not already using this for other Snakemake workflows, you can set it up the first time like this:
171
+
172
+
1. Clone the profile to a location of your choosing, maybe
173
+
``~/snakemake_profile``
174
+
2. Set the environment variable ``LCDBWF_SNAKEMAKE_PROFILE``, perhaps in your
175
+
``~/.bashrc`` file.
176
+
177
+
Then back in your deployed and configured project, submit the wrapper script as
178
+
a batch job:
162
179
163
180
.. code-block:: bash
164
181
165
182
sbatch ../../include/WRAPPER_SLURM
166
183
167
-
and then monitor the various jobs that will be submitted on your behalf. See
184
+
This will submit Snakemake as a batch job, use the profile to translate
185
+
resources to cluster arguments and set default command-line arguments, and
186
+
submit the various jobs created by Snakemake to the cluster on your behalf. See
168
187
:ref:`cluster` for more details on this.
169
188
170
-
Other clusters will need different configuration, but everything is standard
171
-
Snakemake. The Snakemake documentation on `cluster execution
189
+
Other clusters will need different configuration, but everything in `lcdb-wf`
190
+
is standard Snakemake. The Snakemake documentation on `cluster execution
172
191
<https://snakemake.readthedocs.io/en/stable/executing/cluster.html>`_ and
173
192
`cloud execution
174
193
<https://snakemake.readthedocs.io/en/stable/executing/cloud.html>`_ can be
0 commit comments