3
|
1 #!/usr/bin/R
|
|
2
|
|
3 library(UpSetR)
|
|
4 #library(svglite)
|
|
5 args = commandArgs(trailingOnly=TRUE)
|
|
6
|
|
7
|
|
8 movies <- read.csv(file=args[1], header = T, sep = "\t")
|
|
9
|
|
10 nb <- as.integer(args[3])+1
|
|
11
|
|
12 size <- 0.5
|
|
13 if (as.integer(nb)>60){
|
|
14 size <- 0.2
|
|
15 }
|
|
16
|
|
17 sets <- names(movies[2:nb])
|
|
18 #svglite(args[2], width = 4, height = 4)
|
|
19 pdf(args[2])
|
|
20 #upset(movies,nintersects = 20,number.angles = 0, mb.ratio = c(0.35, 0.65),order.by = "freq", sets = sets, point.size = 0.5, line.size = 0.3, mainbar.y.label = "Intersections", sets.x.label = "Nb genes", text.scale = c(0.8, 0.8, 0.8, 0.8, size, 0.5))
|
|
21 upset(movies,nintersects = 20,number.angles = 0, mb.ratio = c(0.35, 0.65), order.by = "freq",keep.order = T, sets = sets, point.size = 1.5, line.size = 0.3, mainbar.y.label = "Intersections", sets.x.label = "Nb genes", text.scale = c(0.8, 0.8, 0.8, 0.8, size, 0.5))
|
|
22 dev.off()
|