comparison ChoosePatterns.R @ 15:58bb88f53765 draft

Uploaded
author ning
date Fri, 15 Mar 2013 18:23:57 -0400
parents
children
comparison
equal deleted inserted replaced
14:eb8e01ed3516 15:58bb88f53765
1 sink(file="/tmp/none")
2 sink("/dev/null")
3 options(warn=-1)
4 options(echo=F)
5
6 #invisible("EBSeq")
7 suppressMessages(library("EBSeq"))
8
9 args <- commandArgs(trailingOnly = T)
10 inputfile <- args[1]
11 Idx <- args[2]
12 outputfile <- args[3]
13
14 print(args)
15
16 ReadIn=read.table(inputfile,stringsAsFactors=F,header=T, sep="\t")
17
18 IndexIn=strsplit(Idx,split=",")[[1]]
19 Index=as.numeric(IndexIn)
20
21 Mat=data.matrix(ReadIn)
22
23 Out=Mat[Index,]
24
25
26 write.table(Out,file=outputfile,quote=F,col.names=T,row.names=T,sep = "\t")
27