Plotting gene expression values from microarray data
1
0
Entering edit mode
6.2 years ago
Natasha ▴ 40

I'm trying to plot a distribution graph of the gene expression values,after and before normalization, from microarray data.

Here is my code to obtain a plot of the normalized values,

library(Biobase)
library(GEOquery)
library(magrittr)
library(rJava)
library("xlsx")
library(stringr)
library(ggplot2)
eset <- getGEO('GSE20966')[[1]] 
boxplot(exprs(eset), outline=FALSE)
edata <- data.frame(exprs(eset))
ggplot(eset[,1])

I expected to obtain a plot similar to the distribution plot shown at the end of the page in this tutorial

Unfortunately, I couldn't succeed in doing this. Could someone suggest if there are alternate ways of plotting the logged gene expression values of each sample?(I expect a normally distributed plot)

R gene expression microarray bioconductor ggplot2 • 2.4k views
ADD COMMENT
1
Entering edit mode
6.2 years ago

Please have a read through a ggplot2 tutorial. ggplot(eset[,1]) just sets things up for plotting, it won't actually plot anything itself.

ADD COMMENT
0
Entering edit mode

I replaced the last line with ggplot(data = edata,aes(x=colnames(edata)[1]))+geom_density(alpha=.2) .I couldn't succeed in obtaining a distribution though.https://image.ibb.co/bVijN9/im.png

Is it appropriate to use geom_density?

ADD REPLY
0
Entering edit mode

You'll want to use something like x=GSMsomething rather than x=colnames(edata)[1]. If there are multiple samples then you'll want to make it a long-form table first and then use something like x=sample, y=value.

ADD REPLY

Login before adding your answer.

Traffic: 1904 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6