Skip to content

Commit 27ead98

Browse files
committed
Renamed filter into cohort and some other small things.
* Singularised `masks` into `mask`. * The directories for masks are available on the command line. * Removed all mentions of swegen.
1 parent e08ab31 commit 27ead98

File tree

6 files changed

+18
-20
lines changed

6 files changed

+18
-20
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Options:
6666
Callers: manta, fermikit
6767
Annotation: vep, snpeff
6868
Extra: normalize (with vt),
69-
filter (with bed files in masks_filters/, by default swegen is used)
69+
filter (with bed files in mask_cohort/)
7070
--sg_mask_ovlp Fractional overlap for use with the filter option
7171
--no_sg_reciprocal Don't use a reciprocal overlap for the filter option
7272
--outdir Directory where resultfiles are stored (default: results)
@@ -114,10 +114,10 @@ file. That file also specifies how to deal with errors and the interaction
114114
with the Slurm scheduler, you probably don't want to change those unless you
115115
know what you are doing.
116116

117-
The two folders `masks_artifacts` and `masks_filters` contain bed files to
117+
The two folders `mask_artifacts` and `mask_cohort` contain bed files to
118118
filter the vcf-files from the callers. The artifact directory contains files
119-
that should mask out problematic regions, it removes everything that has an
120-
overlaps at least 25% with a region in the artifact mask. The filter one is
119+
that should remove problematic regions, it removes everything that has an
120+
overlap of at least 25% with a region in the artifact mask. The cohort one is
121121
for more stringent filtering of already known variants, and here the default
122122
filter threshold is instead a reciprocal overlap of 95%. It can be customized
123123
with the two options `sg_mask_ovlp` (default 0.95) and `no_sg_reciprocal`.

main.nf

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ process artifact_mask_vcfs {
170170

171171
"""
172172
BNAME=\$( echo $svfile | cut -d. -f1 )
173-
MASK_DIR=$params.mask_dirs.masks_artifacts
173+
MASK_DIR=$params.mask_dir_artifacts
174174
175175
# We don't want to change the filename in this process so we copy the
176176
# infile and remove the symbolic link. And then recreate the file at the
@@ -191,14 +191,14 @@ process artifact_mask_vcfs {
191191
}
192192

193193

194-
ch_noswegen_mask = ch_artifact_masked_vcfs.tap { ch_swegen_mask_in }
194+
ch_nocohort_mask = ch_artifact_masked_vcfs.tap { ch_cohort_mask_in }
195195
reciprocal = params.no_sg_reciprocal ? '': '-r'
196196

197-
process swegen_mask_vcfs {
197+
process cohort_mask_vcfs {
198198
input:
199-
set file(svfile), val(uuid), val(dir) from ch_swegen_mask_in
199+
set file(svfile), val(uuid), val(dir) from ch_cohort_mask_in
200200
output:
201-
set file('*_swegen_masked.vcf'), val(uuid), val(dir) into ch_swegen_masked_vcfs
201+
set file('*_cohort_masked.vcf'), val(uuid), val(dir) into ch_cohort_masked_vcfs
202202

203203
tag "$uuid $svfile"
204204

@@ -207,8 +207,8 @@ process swegen_mask_vcfs {
207207

208208
"""
209209
BNAME=\$( echo $svfile | cut -d. -f1 )
210-
MASK_FILE=\${BNAME}_swegen_masked.vcf
211-
MASK_DIR=$params.mask_dirs.masks_filters
210+
MASK_FILE=\${BNAME}_cohort_masked.vcf
211+
MASK_DIR=$params.mask_dir_cohort
212212
213213
cp $svfile workfile
214214
for mask in \$MASK_DIR/*; do
@@ -224,7 +224,7 @@ process swegen_mask_vcfs {
224224
"""
225225
}
226226

227-
ch_masked_vcfs = ch_noswegen_mask.mix(ch_swegen_masked_vcfs)
227+
ch_masked_vcfs = ch_nocohort_mask.mix(ch_cohort_masked_vcfs)
228228

229229
// To make intersect files we need to combine them into one channel with
230230
// toList() and then sort in the map so that fermi is before manta in the
@@ -439,7 +439,7 @@ def usage_message() {
439439
log.info ' Callers: manta, fermikit'
440440
log.info ' Annotation: vep, snpeff'
441441
log.info ' Extra: normalize (with vt),'
442-
log.info ' filter (with bed files in masks_filters/, by default swegen is used)'
442+
log.info ' filter (with bed files in mask_cohort/)'
443443
log.info ' --sg_mask_ovlp Fractional overlap for use with the filter option'
444444
log.info ' --no_sg_reciprocal Don\'t use a reciprocal overlap for the filter option'
445445
log.info ' --outdir Directory where resultfiles are stored (default: results)'

masks_artifacts/ceph18.b37.lumpy.exclude.2014-01-15.bed renamed to mask_artifacts/ceph18.b37.lumpy.exclude.2014-01-15.bed

File renamed without changes.
File renamed without changes.

nextflow.config

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ params {
88
prefix = ''
99
help = False
1010

11-
//optional swegen masking
12-
sg_mask_ovlp = 0.95 // --sg_mask_ovlp in case other overlap value than default 0.95 for swegen
13-
no_sg_reciprocal = False // --no_sg_reciprocal in case swegen masking should not include reciprocal overlap option
11+
//optional cohort masking
12+
sg_mask_ovlp = 0.95 // --sg_mask_ovlp in case other overlap value than default 0.95 for cohort
13+
no_sg_reciprocal = False // --no_sg_reciprocal in case cohort masking should not include reciprocal overlap option
1414

1515
// Reference assemblies
1616
ref_fasta = "/sw/data/uppnex/ToolBox/ReferenceAssemblies/hg38make/bundle/2.8/b37/human_g1k_v37.fasta"
@@ -24,10 +24,8 @@ params {
2424
}
2525

2626
// Dirs that contain BED files for masking
27-
mask_dirs {
28-
masks_artifacts = "$baseDir/masks_artifacts"
29-
masks_filters = "$baseDir/masks_filters"
30-
}
27+
mask_dir_artifacts = "$baseDir/mask_artifacts"
28+
mask_dir_cohort = "$baseDir/mask_cohort"
3129
}
3230

3331
profiles {

0 commit comments

Comments
 (0)