Search
Question: convert data in to expression set
1
gravatar for Nikul Soni
4.5 years ago by
Nikul Soni80
Sweden
Nikul Soni80 wrote:
I have my data in tab delimited file and i read it with read.delim function in R eset<-read.delim('expression_data.txt', header= T, row.names=1) i want to convert my eset object into Expressionset so that i can used it for plotting heatmaps after limma,s lmfit() finction according to the codes below. library("limma") f <- factor(as.character(eset$mol.biol)) design <- model.matrix(~f) fit <- eBayes(lmFit(eset,design)) selected <- p.adjust(fit$p.value[, 2]) <0.05 esetSel <- eset [selected, ] color.map <- function(mol.biol) { if (mol.biol=="ALL1/AF4") "#FF0000" else "#0000FF" } patientcolors <- unlist(lapply(esetSel$mol.bio, color.map)) heatmap(exprs(esetSel), col=topo.colors(100), ColSideColors=patientcolors) when i plot i have the error stated below heatmap(exprs(esetSel)) Error in function (classes, fdef, mtable) : unable to find an inherited method for function ‘exprs’ for signature ‘"data.frame"’ Please help me with the code. Nikul [[alternative HTML version deleted]]
ADD COMMENTlink modified 4.5 years ago by Jeremy Ng170 • written 4.5 years ago by Nikul Soni80
1
gravatar for Jeremy Ng
4.5 years ago by
Jeremy Ng170
Singapore
Jeremy Ng170 wrote:
Hi Nikul, You can do this with biobase. If your intensity is stored in a data frame called "data". To convert this to a ExpressionSet, use the following require(Biobase) object<-new("ExpressionSet", exprs=as.matrix(data)) "object" will be an expression set object containing just the intensity. Jeremy On Thu, Jun 20, 2013 at 3:50 PM, Nikul Soni <soninikul007@gmail.com> wrote: > I have my data in tab delimited file and i read it with read.delim function > in R > > eset<-read.delim('expression_data.txt', header= T, row.names=1) > > i want to convert my eset object into Expressionset so that i can used it > for plotting heatmaps after limma,s lmfit() finction according to the codes > below. > > library("limma") > f <- factor(as.character(eset$mol.biol)) > design <- model.matrix(~f) > fit <- eBayes(lmFit(eset,design)) > selected <- p.adjust(fit$p.value[, 2]) <0.05 > esetSel <- eset [selected, ] > color.map <- function(mol.biol) { if (mol.biol=="ALL1/AF4") "#FF0000" else > "#0000FF" } > patientcolors <- unlist(lapply(esetSel$mol.bio, color.map)) > heatmap(exprs(esetSel), col=topo.colors(100), ColSideColors=patientcolors) > > when i plot i have the error stated below > > heatmap(exprs(esetSel)) > Error in function (classes, fdef, mtable) : > unable to find an inherited method for function ‘exprs’ for signature > ‘"data.frame"’ > > Please help me with the code. > > Nikul > > [[alternative HTML version deleted]] > > > _______________________________________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD COMMENTlink written 4.5 years ago by Jeremy Ng170
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.2.0
Traffic: 420 users visited in the last hour