comparison region_motif_compare.r @ 5:4803f5186f1a draft default tip

Uploaded
author jeremyjliu
date Tue, 26 May 2015 12:44:08 -0400
parents cab2db9d058b
children
comparison
equal deleted inserted replaced
4:53e45130e6f9 5:4803f5186f1a
26 pwmFile = unlist(strsplit(args[8], ','))[1] # If duplicate entires, take first one 26 pwmFile = unlist(strsplit(args[8], ','))[1] # If duplicate entires, take first one
27 27
28 # Set input and reference files 28 # Set input and reference files
29 inTab1 = args[9] 29 inTab1 = args[9]
30 inTab2 = args[10] 30 inTab2 = args[10]
31 enrichTab = args[11] 31 enrichTab1 = args[11]
32 depleteTab = args[12] 32 enrichTab2 = args[12]
33 plotsPng = args[13] 33 plotsPng = args[13]
34 34
35 # Load dependencies 35 # Load dependencies
36 source(concat(workingDir, "/plotting.r")) 36 source(concat(workingDir, "/plotting.r"))
37 37
172 indicesEnrich = which(outDF$enrichment>1) 172 indicesEnrich = which(outDF$enrichment>1)
173 indicesDeplete = which(outDF$enrichment<1) 173 indicesDeplete = which(outDF$enrichment<1)
174 outDF$enrichment = ifelse(outDF$enrichment>1, 174 outDF$enrichment = ifelse(outDF$enrichment>1,
175 round(outDF$enrichment,3), 175 round(outDF$enrichment,3),
176 paste("1/",round(1/outDF$enrichment,3))) 176 paste("1/",round(1/outDF$enrichment,3)))
177 write.table(outDF[indicesEnrich,], file=enrichTab, quote=FALSE, 177 write.table(outDF[indicesEnrich,], file=enrichTab1, quote=FALSE,
178 sep="\t", append=FALSE, row.names=FALSE, col.names=TRUE) 178 sep="\t", append=FALSE, row.names=FALSE, col.names=TRUE)
179 write.table(outDF[indicesDeplete,], file=depleteTab, quote=FALSE, 179 write.table(outDF[indicesDeplete,], file=enrichTab2, quote=FALSE,
180 sep="\t", append=FALSE, row.names=FALSE, col.names=TRUE) 180 sep="\t", append=FALSE, row.names=FALSE, col.names=TRUE)
181 } 181 }
182 182
183 # Catch display messages and output timing information 183 # Catch display messages and output timing information
184 catchMessage = dev.off() 184 catchMessage = dev.off()