-
Notifications
You must be signed in to change notification settings - Fork 0
/
kn99_haploid.config
123 lines (100 loc) · 3.88 KB
/
kn99_haploid.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
params {
config_profile_description = 'Washington University, St Louis Center for Genome Sciences HTCF profile.'
config_profile_contact = 'Chase Mateusiak (chasem@wustl.edu)'
config_profile_url = "https://htcf.wustl.edu/docs/"
snpeff_config_key = 'ASM221672v1'
snpeff_db = "${projectDir}/assets/genome_files/snpeff_db"
snpeff_db_config = "${projectDir}/assets/genome_files/snpEff.config"
fasta = "https://raw.githubusercontent.com/BrentLab/callvariants/main/assets/genome_files/KN99_genome_fungidb.fasta"
cnvpytor_conf_file = "https://github.com/BrentLab/callvariants/raw/main/assets/genome_files/kn99_cnvpytor_haploid_genome_conf.py"
cnvpytor_gc_file = "https://github.com/BrentLab/callvariants/raw/main/assets/genome_files/kn99_with_markers_gc.pytor"
region_bed_mask = "https://github.com/BrentLab/callvariants/raw/main/assets/genome_files/dustmasked.KN99.bed"
}
process{
// set variables here that are used in multiple places in the
// configurations below
def CNV_BINS = "100 1000 10000 100000"
def MIN_CNV_DEPTH_DUP = 1.7
def MAX_CNV_DEPTH_DEL = 0.1
def TIDDIT_COV_BIN = "10000"
def PLOIDY = "1"
def MIN_MAPQ = "20"
def MIN_BASE_QUAL = "10"
def MIN_ALTERNATE_FRACTION = "0.75"
def MIN_COVERAGE = "10"
withName: PICARD_MARKDUPLICATES {
cpus = { check_max( 1 * task.attempt, 'cpus' ) }
memory = { check_max( 10.GB * task.attempt, 'memory' ) }
time = { check_max( 1.h * task.attempt, 'time' ) }
}
withName: CNVPYTOR_CSV_RAW {
publishDir = [
path: { "${params.outdir}/variants/cnvpytor" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
ext.args =[
bins: CNV_BINS
]
}
withName: CNVPYTOR_CSV_FLTR {
publishDir = [
path: { "${params.outdir}/variants/cnvpytor" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
pattern: "*csv"
]
ext.args =[
bins: CNV_BINS,
min_cnv_depth_dup: MIN_CNV_DEPTH_DUP,
max_cnv_depth_del: MAX_CNV_DEPTH_DEL
]
}
withName: TIDDIT_COV {
ext.args = [
"-z " + TIDDIT_COV_BIN,
].join(' ').trim()
ext.prefix = {"${meta.id}_tiddit_" + TIDDIT_COV_BIN}
}
withName: TIDDIT_SV {
ext.args = [
"-n " + PLOIDY,
"-q 20",
"-c 10",
"--p_ratio 0.3",
"--r_ratio 0.3"
].join(' ').trim()
}
// note that this could be split into FREEBAYES_INDIVIDUAL and
// FREEBAYES_JOINT if you wish to configure them separately
withName: '.*FREEBAYES_.*' {
cpus = { check_max( 1 * task.attempt, 'cpus' ) }
memory = { check_max( 5.GB * task.attempt, 'memory' ) }
time = { check_max( 10.h * task.attempt, 'time' ) }
ext.args = [
"--genotype-qualities",
"--ploidy " + PLOIDY,
"--min-mapping-quality " + MIN_MAPQ,
"--min-base-quality " + MIN_BASE_QUAL,
"--min-alternate-fraction " + MIN_ALTERNATE_FRACTION,
"--min-coverage " + MIN_COVERAGE
].join(' ').trim()
}
withName: '.*:SNPEFF.*' {
ext.args = [
"-v ${params.snpeff_config_key}"
].join(' ').trim()
}
// currently, both joint and individual vcfs go through this one filter
// step. It may make sense to split the VCFTOOLS filter step into INDIVIDUAL
// and JOINT at
withName: VCFTOOLS {
ext.args = [
"--exclude-bed",
"--recode",
"--recode-INFO-all",
"--minQ " + MIN_MAPQ,
"--minDP " + MIN_COVERAGE
].join(' ').trim()
}
}