annotate RnBeadsGalaxy.R @ 13:d6cdc73fd57e draft

Uploaded
author pavlo-lutsik
date Sun, 21 Apr 2013 18:04:11 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
1 #msg.file<-file("RnBeads.messages.out", open="w")
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
2 #sink(file=msg.file)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
3
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
4 suppressWarnings(suppressPackageStartupMessages(library(RnBeads)))
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
5 suppressWarnings(suppressPackageStartupMessages(library(getopt)))
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
6
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
7 #all.opts<-names(rnb.options())
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
8 opt.class<-RnBeads:::OPTION.TYPES[-28]
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
9 all.opts<-names(opt.class)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
10 #all.opts<-paste("--", all.opts, sep="")
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
11 #all.opts<-gsub("\\.([a-z])", "\\U\\1", all.opts, perl=TRUE)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
12 all.opts<-gsub("\\.","-", all.opts)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
13 #opt.class<-sapply(rnb.options(), class)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
14
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
15 rnb.opt.spec<-data.frame(
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
16 Long=all.opts,
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
17 Short=as.character(1:length(all.opts)),
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
18 Mask=c(1,2)[as.integer((opt.class=="logical"))+1],
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
19 Type=opt.class)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
20
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
21 ### automated xml file preparation
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
22 #xml.strings<-apply(rnb.opt.spec,1, function(row){
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
23 #
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
24 # opt.lab<-gsub("-", ".", row[1])
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
25 # opt.def.val<-rnb.getOption(opt.lab)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
26 # opt.name<-gsub("-([0-9a-z])", "\\U\\1", row[1], perl=TRUE)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
27 # tf.opt<-"\t\t\t<option value=\"True\">True</option>\n\t\t\t<option value=\"False\">False</option>"
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
28 # opt.lab<-paste(opt.lab, gsub("\\."," ", row[4]), sep=", ")
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
29 # if(row[4]=="logical"){
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
30 # opt.type<-'select'
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
31 # if(!is.null(opt.def.val) && opt.def.val)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
32 # opt.def.val<-"1" else
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
33 # opt.def.val<-"0"
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
34 # string<-sprintf("\t\t<param name=\"%s\" type=\"%s\" label=\"%s\" value=\"%s\">\n%s\n\t\t</param>\n", opt.name, opt.type, opt.lab, opt.def.val, tf.opt)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
35 # }else{
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
36 # opt.type<-'text'
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
37 # if(!is.null(opt.def.val) && opt.def.val!="")
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
38 # opt.def.val<-paste(opt.def.val, collapse=",") else
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
39 # opt.def.val<-""
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
40 # string<-sprintf("\t\t<param name=\"%s\" type=\"%s\" label=\"%s\" value=\"%s\"/>\n", opt.name, opt.type, opt.lab, opt.def.val)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
41 # }
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
42 # string
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
43 # })
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
44 #
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
45 #cat(xml.strings, sep="", file="automated.settings.xml.txt")
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
46 #
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
47 #opt.def.strings<-apply(rnb.opt.spec,1, function(row){
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
48 #
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
49 # opt.name<-gsub("-([0-9a-z])", "\\U\\1", row[1], perl=TRUE)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
50 # opt.long<-row[1]
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
51 # opt.short<-row[2]
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
52 #
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
53 # if(row[4]=="logical"){
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
54 # def.string<-sprintf("#if str( $options.%s ) == \"True\"\n\t--%s\n#end if\n", opt.name, opt.long)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
55 # }else{
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
56 # def.string<-sprintf("#if str( $options.%s ) != \"\"\n\t--%s=\"$options.%s\" \n#end if\n", opt.name, opt.long, opt.name)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
57 # }
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
58 # def.string
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
59 #
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
60 # })
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
61 #cat(opt.def.strings, sep="", file="automated.option.assignments.txt")
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
62
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
63
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
64 rnb.opt.spec$Type<-gsub("\\.vector", "", rnb.opt.spec$Type)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
65 rnb.opt.spec$Type<-gsub("numeric", "double", rnb.opt.spec$Type)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
66 rnb.opt.spec<-rbind(data.frame(
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
67 Long=c("data-type", "pheno", "idat-dir","idat-files","bed-files", "gs-report", "geo-series", "betas", "pvals","output-file", "report-dir"),
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
68 Short=c("d","s","a","i","f","g","e","b","p","r","o"),
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
69 Mask=c(1,2,2,2,2,2,2,2,2,1,1),
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
70 Type=c("character","character","character","character","character","character","character","character","character","character", "character")),
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
71 rnb.opt.spec)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
72
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
73 opts<-getopt(as.matrix(rnb.opt.spec))
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
74 #opts<-getopt(as.matrix(rnb.opt.spec), opt=list("--data-type=idats","--report-dir=dir", "--idats=file1\tfile2"))
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
75 print(opts)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
76
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
77 if(opts[["data-type"]]=="idatDir"){
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
78
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
79 data.source<-list()
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
80 data.type<-"idat.dir"
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
81 data.source[["idat.dir"]]<-opts[["idat-dir"]]
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
82 data.source[["sample.sheet"]]<-opts[["pheno"]]
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
83
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
84 }else if(opts[["data-type"]]=="idatFiles"){
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
85
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
86 data.type<-"idat.dir"
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
87 file.string<-gsub(" ","", opts[["idat-files"]])
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
88 files<-strsplit(file.string, ",")[[1]]
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
89 files<-files[files!=""]
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
90 bed.dir<-sprintf("%s_beds",opts[["report-dir"]])
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
91 dir.create(bed.dir)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
92 file.copy(files, bed.dir)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
93 for(dat.file in list.files(bed.dir, full.names = TRUE)){
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
94 file.rename(dat.file, gsub("\\.dat", ".bed", dat.file))
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
95 }
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
96 data.source<-list()
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
97 data.source[["bed.dir"]]<-bed.dir
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
98 data.source[["sample.sheet"]]<-opts[["pheno"]]
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
99
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
100
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
101 }else if(opts[["data-type"]]=="GS.report"){
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
102
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
103 data.type<-"GS.report"
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
104 data.source<-opts[["gs-report"]]
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
105
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
106 }else if(opts[["data-type"]]=="GEO"){
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
107
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
108 data.type<-"GEO"
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
109 data.source<-opts[["geo-series"]]
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
110
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
111 }else if(opts[["data-type"]]=="data.files"){
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
112
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
113 data.type<-"GEO"
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
114 data.source<-opts[["geo-series"]]
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
115
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
116 }else if(opts[["data-type"]]=="data.files"){
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
117
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
118 data.type<-"data.files"
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
119 data.source<-c(opts[["pheno"]], opts[["betas"]])
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
120 if(!is.null(opts[["pvals"]]))
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
121 data.source<-c(data.source, opts[["pvals"]])
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
122
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
123 }else if(opts[["data-type"]]=="bed.dir"){
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
124
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
125 data.type<-"bed.dir"
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
126 file.string<-gsub(" ","", opts[["bed-files"]])
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
127 files<-strsplit(file.string, ",")[[1]]
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
128 files<-files[files!=""]
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
129 bed.dir<-sprintf("%s_beds",opts[["report-dir"]])
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
130 dir.create(bed.dir)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
131 file.copy(files, bed.dir)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
132 for(dat.file in list.files(bed.dir, full.names = TRUE)){
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
133 file.rename(dat.file, gsub("\\.dat", ".bed", dat.file))
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
134 }
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
135 data.source<-list()
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
136 data.source[["bed.dir"]]<-bed.dir
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
137
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
138 sample.sheet<-rnb.read.annotation(opts[["pheno"]])
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
139 if(length(files) < nrow(sample.sheet))
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
140 stop("Not all bed files are present")
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
141
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
142 cn<-colnames(sample.sheet)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
143 sample.sheet<-cbind(sample.sheet, gsub("\\.dat", ".bed", files))
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
144 colnames(sample.sheet)<-c(cn, "BED_files")
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
145 data.source[["sample.sheet"]]<-sample.sheet
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
146 }
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
147
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
148 if("logging" %in% names(opts)){ # TODO create a cleaner way of checking whether the full options set was supplied
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
149
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
150 dump<-sapply(names(opt.class), function(on){
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
151 getoptname<-gsub("-", "\\.","-",on)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
152 if(getoptname %in% names(opts)){
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
153 if(opt.class[on]=="logical"){
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
154 ov<-TRUE
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
155 }else if(opt.class %in% c("character","character.vector")){
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
156 ov<-opts[[getoptname]]
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
157 ov<-gsub("\"", "", ov)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
158 if(opt.class=="character.vector"){
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
159 ov<-as.character(strsplit(ov,","))
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
160 }
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
161
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
162 }else if(opt.class %in% c("integer","numeric","integer.vector","numeric.vector")){
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
163 ov<-opts[[getoptname]]
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
164 ov<-gsub("\"", "", ov)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
165 if(opt.class %in% c("integer.vector","numeric.vector")){
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
166 ov<-as.character(strsplit(ov,","))
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
167 }
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
168 }
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
169 eval(parse(text=sprintf("rnb.options(%s=ov)",on)))
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
170 }
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
171 })
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
172
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
173 logical.opts<-names(opt.class[opt.class=="logical"])
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
174 logical.opts.false<-logical.opts[!logical.opts %in% gsub("-",".",names(opts))]
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
175
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
176
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
177 dump<-sapply(logical.opts.false, function(on){
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
178 eval(parse(text=sprintf("rnb.options(%s=FALSE)",on)))
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
179 })
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
180 }
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
181
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
182 print(rnb.options())
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
183
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
184 #report.out.dir<-sprintf("%s_rnbReport", tempdir())
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
185 report.out.dir<-opts[["report-dir"]]
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
186 #print("Starting RnBeads with the following inputs:")
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
187 #print(data.source)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
188 #print(report.out.dir)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
189 #print(data.type)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
190 rnb.run.analysis(data.source=data.source, dir.report=report.out.dir, data.type=data.type)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
191
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
192
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
193 #sink(file=NULL)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
194 #flush(msg.file)
d6cdc73fd57e Uploaded
pavlo-lutsik
parents:
diff changeset
195 #close(msg.file)