Question: Plotting gene expression values from microarray data
0
gravatar for Natasha
2.4 years ago by
Natasha40
Natasha40 wrote:

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)

ADD COMMENTlink modified 2.4 years ago by Devon Ryan98k • written 2.4 years ago by Natasha40
1
gravatar for Devon Ryan
2.4 years ago by
Devon Ryan98k
Freiburg, Germany
Devon Ryan98k wrote:

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 COMMENTlink written 2.4 years ago by Devon Ryan98k

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 REPLYlink written 2.4 years ago by Natasha40

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 REPLYlink written 2.4 years ago by Devon Ryan98k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1852 users visited in the last hour
_