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
The Docker image uses `cwl-runner cwl/xenocp.cwl` as its entrypoint.
223
+
The Docker image does not provide an entrypoint.
188
224
189
-
The image assumes three working directories: `/data` for inputs, `/references` for
190
-
reference files, and `/results` for outputs. `/data` and `/references` can be
225
+
The image assumes three working directories: `/data` for inputs, `/reference` for
226
+
reference files, and `/results` for outputs. `/data` and `/reference` can be
191
227
read-only, where as `/results` needs write access.
192
228
193
229
The paths given in the input parameters file must be from inside the
@@ -197,13 +233,16 @@ container, not the host, e.g.,
197
233
bam:
198
234
class: File
199
235
path: /data/sample.bam
200
-
ref_db_prefix: /reference/ref.fa
236
+
ref_db_prefix: ref.fa
237
+
index:
238
+
class: Directory
239
+
path: /reference
201
240
aligner: "bwa aln"
202
241
```
203
242
204
-
The following is an example `run` command where files are stored in `test/{data,reference}`. Outputs are saved in `test/results`.
243
+
The following is an example `run` command where the data files are stored in the current directory under `sample_data/input_data`. Outputs are saved in `results` in the current directory. The path to the reference files on the host machine needs to be provided.
205
244
206
-
This example assumes you are running against Mus musculus (genome build MGSCv37). Set the path to the folder containing your reference data
245
+
This example assumes you are running against *Mus musculus* (genome build MGSCv37). Set the path to the folder containing your reference data
207
246
and run the following command to produce output from the included sample data. Test output for comparison is located at `sample_data/output_data`.
Singularity is an experimental container solution that is an HPC-friendly alternative to Docker. For many reasons, `singularity` is not a drop-in replacement for Docker. Many applications require modification to fully run with `singularity`. This alternative is provided on a best-effort basis. If issues are encountered, please open an issue on this repository with details and the maintainers will try to provide support as possible.
266
+
267
+
```
268
+
$ mkdir $(pwd)/results
269
+
$ singularity run \
270
+
--containall \ # Isolate container from host
271
+
-W /path/to/directory \ # Provide a directory with sufficient space to use for working directory
272
+
-B $(pwd)/sample_data/input_data:/data \
273
+
-B /path/to/reference:/reference \
274
+
-B $(pwd)/results:/results \
275
+
docker://ghcr.io/stjude/xenocp:latest \
276
+
cwl-runner \
277
+
--parallel \
278
+
--outdir results \
279
+
--no-container \
280
+
/opt/xenocp/cwl/xenocp.cwl \
216
281
/data/inputs.yml
217
282
```
218
283
284
+
Note: when running using Singularity on an HPC, problems can arise if the
285
+
default temporary file location, /tmp, is small. To solve this, include
286
+
`-W <dir>` when executing via Singularity to redirect temp files to a
287
+
larger directory `<dir>`.
288
+
289
+
Note: By default, `singularity` makes many host resources available inside the container. This is in contrast with Docker's native isolation. This also tends to cause conflicts and errors when running Docker-based workflows. Therefore we recommend always using the `--containall` option to Singularity.
290
+
219
291
[Dockerfile]: ./Dockerfile
220
292
293
+
## WDL workflow
294
+
295
+
XenoCP includes a [WDL](https://github.com/openwdl/wdl) workflow implementation. This can be run locally or on a supported HPC system. It can also use Docker or Singularity for containerization.
296
+
297
+
### WDL reference files
298
+
299
+
As of v1.2, WDL does not support directory inputs. Therefore the reference files provided to the WDL workflow must be compressed (`.tar.gz`) before running. The compressed reference files can be downloaded from [Zenodo](https://zenodo.org/uploads/10162103).
300
+
301
+
### Running WDL
302
+
303
+
To run the WDL workflow, you will need a WDL engine. We suggest [miniwdl](https://github.com/chanzuckerberg/miniwdl), though the [Cromwell](https://github.com/broadinstitute/cromwell/) engine should work, but is untested with XenoCP.
304
+
305
+
After acquiring the reference files for your chosen aligner, you can run the sample data through the WDL workflow with the following command.
306
+
307
+
```
308
+
miniwdl run https://raw.githubusercontent.com/stjude/XenoCP/main/wdl/workflows/xenocp.wdl input_bam=https://github.com/stjude/XenoCP/raw/main/sample_data/input_data/SJRB001_X.subset.bam input_bai=https://github.com/stjude/XenoCP/raw/main/sample_data/input_data/SJRB001_X.subset.bam.bai reference_tar_gz=MGSCv37_bwa.tar.gz aligner='bwa aln'
309
+
```
310
+
311
+
This will run all of the steps on the local machine with Docker. The WDL runner `miniwdl` supports alternative execution modes, such as the [Singularity](https://miniwdl.readthedocs.io/en/latest/runner_backends.html#singularity-beta) container engine, [Slurm](https://github.com/miniwdl-ext/miniwdl-slurm) for batch systems, and [LSF](https://github.com/adthrasher/miniwdl-lsf) for batch systems. Alternative execution modes can be specified using `miniwdl`'s [configuration system](https://miniwdl.readthedocs.io/en/latest/runner_reference.html#configuration).
312
+
221
313
## Evaluate test data results
222
314
223
315
If you have [bcftools] and a [GRCh37-lite] reference file, the following will show two variants in the input file.
0 commit comments