view filter.R @ 6:7dc6ce39fb89 default tip

add selection tool
author blanck
date Wed, 29 Apr 2015 10:08:52 +0200
parents b7f3854e08f8
children
line wrap: on
line source

args<-commandArgs(TRUE)

input=args[1]
length=as.numeric(args[2])
probes=as.numeric(args[3])
tmp_dir=args[4]
nbcall=as.vector(args[5])
output=args[6]

nbcall_tmp <- strsplit(nbcall,",")
nbcall_vecstring <-unlist(nbcall_tmp)

nbcall_vecstring

library(MPAgenomics)
workdir=file.path(tmp_dir, "mpagenomics")
setwd(workdir)

segcall = read.table(input, header = TRUE)
filtercall=filterSeg(segcall,length,probes,nbcall_vecstring)
sink(output)
print(format(filtercall),row.names=FALSE)
sink()
#write.table(filtercall,output,row.names = FALSE, quote = FALSE, sep = "\t")