Skip to content

Commit e297640

Browse files
committed
updated R scripts for fig generation
1 parent fdc1410 commit e297640

File tree

2 files changed

+22
-11
lines changed

2 files changed

+22
-11
lines changed

performance/accumulations.R

+6-1
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,16 @@ for (p in names(pfocr.4000.nl)){
4343
unique.4000.genes.counts <- c(unique.4000.genes.counts,length(unique.4000.genes))
4444
}
4545
plot(unique.4000.genes.counts)
46+
4647
## fit curve
4748
xx<-seq(1:length(unique.4000.genes.counts))
4849
fit<-lm(unique.4000.genes.counts~sqrt(xx))
4950
summary(fit)
50-
plot(unique.4000.genes.counts)
51+
par(mar=c(5,5,1,1))
52+
plot(unique.4000.genes.counts,
53+
xlab="Pathway Figures",
54+
ylab="Number of Unique Genes Identified",
55+
cex.lab=2, cex.axis=1.5)
5156
lines(xx, predict(fit, data.frame(x=xx)), col="red", lwd=2)
5257
predict(fit,data.frame(xx=2925))
5358
# 12,000 PFOCR images = 8000 unique genes

performance/performance.R

+16-10
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,16 @@ for (r in 1:length(counts.df.sk$pathway)){
110110
ggplot(counts.df.sk, aes(group=type, y=counts, x=reorder(pathway,-sort))) +
111111
geom_line(aes(color=type)) +
112112
geom_point(aes(color=type)) +
113-
xlab("pathways")+
114-
ylab("number of genes")+
113+
xlab("Pathways")+
114+
ylab("Counts by Type")+
115115
theme(
116116
axis.text.x = element_blank(),
117117
axis.ticks.x = element_blank(),
118-
legend.position = "none")
118+
panel.background = element_rect(fill = 'white'),
119+
legend.position = "none",
120+
axis.text=element_text(size=16),
121+
axis.title=element_text(size=16)
122+
)
119123

120124
## plot rates independently sorted
121125
counts.df.sk.tp<-counts.df.sk[counts.df.sk$type=="TP",2:1]
@@ -135,8 +139,8 @@ counts.df.sk.fn$type<-c(rep("2.FN"))
135139
ggplot(counts.df.sk.tp, aes(y=counts,x=sort,color="red"))+geom_area(fill="#619CFF") +
136140
geom_area(data=counts.df.sk.fn, aes(y=counts,x=sort,color="blue"), fill="#F8766D") +
137141
geom_area(data=counts.df.sk.fp, aes(y=counts,x=sort,color="green"), fill="#00BA38") +
138-
xlab("pathways")+
139-
ylab("number of genes")+
142+
xlab("Independently Ordered Pathways")+
143+
ylab("Stacked Counts by Type")+
140144
scale_x_continuous(breaks=c(1,100,200,300,400), expand = c(0,0))+
141145
scale_y_continuous(expand = c(0,0))+
142146
theme(
@@ -149,14 +153,16 @@ counts.df.sk.indi<-rbind(counts.df.sk.fp,counts.df.sk.fn,counts.df.sk.tp)
149153
p<-ggplot(counts.df.sk.indi, aes(y=counts, x=sort, fill=type))
150154
p + geom_area() +
151155
scale_fill_manual(values=c("#00BA38","#F8766D","#619CFF")) +
152-
xlab("pathways")+
153-
ylab("number of genes")+
154-
scale_x_continuous(breaks=c(1,100,200,300,400), expand = c(0,0))+
156+
xlab("Independently Ordered Pathways")+
157+
ylab("Stacked Counts by Type")+
158+
scale_x_continuous(breaks=c(1,100,200,300,400), expand = c(0,0))+
155159
scale_y_continuous(expand = c(0,0))+
156160
theme(
157161
panel.background = element_rect(fill = 'white'),
158-
legend.position = "none"
159-
)
162+
legend.position = "none",
163+
axis.text=element_text(size=22),
164+
axis.title=element_text(size=22)
165+
)
160166

161167
#median and means
162168
tp.med <- median(unlist(counts.df.sk.tp$counts))

0 commit comments

Comments
 (0)