-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRunTrust4Convertor.R
36 lines (29 loc) · 1.28 KB
/
RunTrust4Convertor.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
33
34
35
36
# Script to convert the constructed isotype files from trust4 into a format for isotyper!
## Lauren Overend [email protected]
## November 2021
library("optparse")
option_list <- list(
make_option(c("-o", "--outputdir"), action="store", type="character", default="NA", help="Path to Outputdir"),
make_option(c("-s", "--sampleid"), action="store", type="character", help="Sampleid"),
make_option(c("-v", "--vthreshold"), action="store", type="character", help="Vtrimming"),
make_option(c("-j", "--jthreshold"), action="store", type="character", help="Jtrimming")
)
opt_parser = OptionParser(option_list=option_list);
opt = parse_args(opt_parser, print_help_and_exit = TRUE, args = commandArgs(trailingOnly = TRUE))
outputdir <- opt$o
sampleid <- opt$s
vtrim <- opt$v
jtrim <- opt$j
#outputdir='/gpfs2/well/immune-rep/shared/MISEQ/TRUST4_GAINS/V_20_J_15/'
#sampleid='gains8032905'
#vtrim='10'
#jtrim='10'
my_aux_functions <- c("/well/immune-rep/shared/CODE/BCR_TCR_PROCESSING_PIPELINE/RFunctions/TRUST4")
source_files <- list.files(my_aux_functions, "*.R$", full.names=TRUE) # locate all .R files
print(source_files)
for (f in source_files) {
source(f)
}
# Run the convertor function
convert_trust4(outputdir, sampleid, as.numeric(vtrim), as.numeric(jtrim))
## Done