-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparseWgsa.R
36 lines (29 loc) · 979 Bytes
/
parseWgsa.R
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
# WGSA parsr wdl dev
args <- commandArgs(trailingOnly=T)
source.file <- args[1]
config.file <- args[2]
destination <- args[3]
freeze <- args[4]
chunk.size <- args[5]
dbnsfp.destination <- args[6]
# wgsaParsr requires that if you are only parsing SNVs, you also parse dbnsfp, so. need to adjust config file to reflect this.
library(data.table)
config <- fread(config.file, data.table=F)
library(wgsaparsr)
if (sum(config$indel) > 0){
parse_to_file(source_file = source.file,
config = config.file,
destination = destination,
freeze = freeze,
chunk_size = chunk.size,
verbose = TRUE)
} else {
config$dbnsfp[config$SNV] <- TRUE
parse_to_file(source_file = source.file,
config = config.file,
destination = destination,
dbnsfp_destination = dbnsfp.destination,
freeze = freeze,
chunk_size = chunk.size,
verbose = TRUE)
}