Skip to content

Commit 51f4b4e

Browse files
committed
handle cases when wasp_dir is not provided
1 parent 91c31c5 commit 51f4b4e

File tree

5 files changed

+12
-1
lines changed

5 files changed

+12
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ If you have [Anaconda](https://conda.io/docs/user-guide/install/index.html) inst
3636
- [rtracklayer](https://bioconductor.org/packages/release/bioc/html/rtracklayer.html)
3737
- [dplyr](https://www.rdocumentation.org/packages/dplyr)
3838

39-
Note that our pipeline uses [WASP](https://www.biorxiv.org/content/early/2014/11/07/011221) (v3.x), which is not available from Anaconda. You must [manually install it](https://github.com/bmvdgeijn/WASP). The `--use-conda` option will automatically handle WASP's dependencies, but you can see the [WASP README](https://github.com/bmvdgeijn/WASP/blob/master/README.md) if you'd like to install these dependencies manually.
39+
Note that our pipeline uses [WASP](https://github.com/bmvdgeijn/WASP) (v3.x), which is not available from Anaconda. If the pipeline is unable to locate WASP, it will automatically install it. The `--use-conda` option will automatically handle WASP's dependencies, but you can see the [WASP README](https://github.com/bmvdgeijn/WASP/blob/master/README.md) if you'd like to install these dependencies manually.

Snakefiles/Snakefile-WASP

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ if 'SAMP_TO_VCF_ID' not in globals():
4040
return samp_dict
4141
SAMP_TO_VCF_ID = read_vcf_samples()
4242

43+
# set the wasp_dir if the user hasn't specified one
44+
if 'wasp_dir' not in config:
45+
config['wasp_dir'] = ".snakemake/WASP"
4346
# set the default SNP H5 dir if the user hasn't specified one
4447
if 'snp_h5_dir' not in config:
4548
config['snp_h5_dir'] = "/genotypes/snp_h5"

Snakefiles/Snakefile-counts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ if 'SAMP_TO_VCF_ID' not in globals():
4949
return samp_dict
5050
SAMP_TO_VCF_ID = read_vcf_samples()
5151

52+
# set the wasp_dir if the user hasn't specified one
53+
if 'wasp_dir' not in config:
54+
config['wasp_dir'] = ".snakemake/WASP"
55+
5256

5357
if not hasattr(rules, 'all'):
5458
rule all:

configs/config-WASP.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
# If you have downloaded WASP from https://github.com/bmvdgeijn/WASP, specify the path to your WASP directory here
2020
# Otherwise, specify the location of the directory in which you'd like it installed
21+
# When this option is not provided, the pipeline will install WASP in your .snakemake directory
2122
"wasp_dir" : "/iblm/netapp/home/amassarat/bin/WASP"
2223

2324
# directory in which to output all of the output files
@@ -29,6 +30,7 @@
2930

3031
# If you already have SNP HDF5 files, specify the directory of the files here
3132
# Otherwise, they will be created in this location
33+
# When this option is not provided, the pipeline will use {output_dir}/genotypes/snp_h5
3234
"snp_h5_dir" : "out/genotypes/snp_h5"
3335

3436
# what are the maximum number of threads to use for the entire pipeline?

configs/config-counts.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
# If you have downloaded WASP from https://github.com/bmvdgeijn/WASP, specify the path to your WASP directory here
2727
# Otherwise, specify the location of the directory in which you'd like it installed
28+
# When this option is not provided, the pipeline will install WASP in your .snakemake directory
2829
"wasp_dir" : "/iblm/netapp/home/amassarat/bin/WASP"
2930

3031
# Directory in which to output all of the generated files
@@ -36,6 +37,7 @@
3637

3738
# If you already have SNP HDF5 files, specify the directory of the files here
3839
# Otherwise, they will be created in this location
40+
# When this option is not provided, the pipeline will use {output_dir}/genotypes/snp_h5
3941
"snp_h5_dir" : "out/genotypes/snp_h5"
4042

4143
# what are the maximum number of threads to use for each rule in the pipeline?

0 commit comments

Comments
 (0)