convert data in to expression set
1
1
Entering edit mode
Nikul Soni ▴ 80
@nikul-soni-5917
Last seen 8.9 years ago
Sweden
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]]
limma convert limma convert • 14k views
ADD COMMENT
2
Entering edit mode
Jeremy Ng ▴ 180
@jeremy-ng-5464
Last seen 9.6 years ago
Singapore
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 COMMENT

Login before adding your answer.

Traffic: 680 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