comparison shm_csr.r @ 2:e85fec274cde draft

Uploaded
author davidvanzessen
date Thu, 27 Oct 2016 07:26:45 -0400
parents faae21ba5c63
children 275ab5175fd6
comparison
equal deleted inserted replaced
1:faae21ba5c63 2:e85fec274cde
372 pc = ggplot(genesForPlot, aes(x = factor(1), y=Freq, fill=Gene)) 372 pc = ggplot(genesForPlot, aes(x = factor(1), y=Freq, fill=Gene))
373 pc = pc + geom_bar(width = 1, stat = "identity") + scale_fill_manual(labels=genesForPlot$label, values=c("IGA1" = "lightblue1", "IGA2" = "blue4")) 373 pc = pc + geom_bar(width = 1, stat = "identity") + scale_fill_manual(labels=genesForPlot$label, values=c("IGA1" = "lightblue1", "IGA2" = "blue4"))
374 pc = pc + coord_polar(theta="y") + scale_y_continuous(breaks=NULL) 374 pc = pc + coord_polar(theta="y") + scale_y_continuous(breaks=NULL)
375 pc = pc + theme(panel.background = element_rect(fill = "white", colour="black"), text = element_text(size=13, colour="black")) 375 pc = pc + theme(panel.background = element_rect(fill = "white", colour="black"), text = element_text(size=13, colour="black"))
376 pc = pc + xlab(" ") + ylab(" ") + ggtitle(paste("IGA subclasses", "( n =", sum(genesForPlot$Freq), ")")) 376 pc = pc + xlab(" ") + ylab(" ") + ggtitle(paste("IGA subclasses", "( n =", sum(genesForPlot$Freq), ")"))
377 write.table(genesForPlot, "IGA.txt", sep="\t",quote=F,row.names=F,col.names=T) 377 write.table(genesForPlot, "IGA_pie.txt", sep="\t",quote=F,row.names=F,col.names=T)
378 378
379 png(filename="IGA.png") 379 png(filename="IGA.png")
380 print(pc) 380 print(pc)
381 dev.off() 381 dev.off()
382 } 382 }
393 pc = ggplot(genesForPlot, aes(x = factor(1), y=Freq, fill=Gene)) 393 pc = ggplot(genesForPlot, aes(x = factor(1), y=Freq, fill=Gene))
394 pc = pc + geom_bar(width = 1, stat = "identity") + scale_fill_manual(labels=genesForPlot$label, values=c("IGG1" = "olivedrab3", "IGG2" = "red", "IGG3" = "gold", "IGG4" = "darkred")) 394 pc = pc + geom_bar(width = 1, stat = "identity") + scale_fill_manual(labels=genesForPlot$label, values=c("IGG1" = "olivedrab3", "IGG2" = "red", "IGG3" = "gold", "IGG4" = "darkred"))
395 pc = pc + coord_polar(theta="y") + scale_y_continuous(breaks=NULL) 395 pc = pc + coord_polar(theta="y") + scale_y_continuous(breaks=NULL)
396 pc = pc + theme(panel.background = element_rect(fill = "white", colour="black"), text = element_text(size=13, colour="black")) 396 pc = pc + theme(panel.background = element_rect(fill = "white", colour="black"), text = element_text(size=13, colour="black"))
397 pc = pc + xlab(" ") + ylab(" ") + ggtitle(paste("IGG subclasses", "( n =", sum(genesForPlot$Freq), ")")) 397 pc = pc + xlab(" ") + ylab(" ") + ggtitle(paste("IGG subclasses", "( n =", sum(genesForPlot$Freq), ")"))
398 write.table(genesForPlot, "IGG.txt", sep="\t",quote=F,row.names=F,col.names=T) 398 write.table(genesForPlot, "IGG_pie.txt", sep="\t",quote=F,row.names=F,col.names=T)
399 399
400 png(filename="IGG.png") 400 png(filename="IGG.png")
401 print(pc) 401 print(pc)
402 dev.off() 402 dev.off()
403 } 403 }