5
|
1 args<-commandArgs(TRUE)
|
|
2
|
|
3 input=args[1]
|
|
4 length=as.numeric(args[2])
|
|
5 probes=as.numeric(args[3])
|
|
6 tmp_dir=args[4]
|
|
7 nbcall=as.vector(args[5])
|
|
8 output=args[6]
|
|
9
|
|
10 nbcall_tmp <- strsplit(nbcall,",")
|
|
11 nbcall_vecstring <-unlist(nbcall_tmp)
|
|
12
|
|
13 nbcall_vecstring
|
|
14
|
|
15 library(MPAgenomics)
|
|
16 workdir=file.path(tmp_dir, "mpagenomics")
|
|
17 setwd(workdir)
|
|
18
|
|
19 segcall = read.table(input, header = TRUE)
|
|
20 filtercall=filterSeg(segcall,length,probes,nbcall_vecstring)
|
|
21 sink(output)
|
|
22 print(format(filtercall),row.names=FALSE)
|
|
23 sink()
|
|
24 #write.table(filtercall,output,row.names = FALSE, quote = FALSE, sep = "\t")
|
|
25
|