'AnnotatedDataFrame' and featureNames'
1
0
Entering edit mode
@diego-arcelli-1267
Last seen 10.1 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20070524/ 8515da0d/attachment.pl
• 588 views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 11 weeks ago
United States
Hi Diego -- The following might help... "diego arcelli" <diego.arcelli at="" gmail.com=""> writes: > Hi to all > > I'd like to resolve this question: > > > in R 2.4 and bioconductor 1.9 I used the follow string to read my phenodata > in txt file (mysamplehe): > where "esetmysamples" is my dataset > > # Reading and setting phenodata > >> pd <- read.phenoData(filename="mysamplesphe.txt", sep="\t", header=TRUE) >> pData(esetmysamples) > > and this to remove AFFX-id probes > > ### Removing AFFX-id probes > >>ids <- (geneNames(esetmysamples)) >>ids.affx <- grep("^AFFX", ids) >>ids.noaffx <- setdiff(c(1:length(ids)), ids.affx) >>esetmysamples <- esetmysamples[ids.noaffx,] > > now, in R 2.5 and bioconductor 2.0 I must use read.'AnnotatedDataFrame' > instead of 'read.phenoData' and 'featureNames' instead of > > and here I have the Warning message: > > >> setwd(workdir) >> esetmysamples <- rma(mysamples) > Background correcting > Normalizing > Calculating Expression >> sampleNames(esetmysamples) <- smpls >> >> # Removing AFFX-id probes >> ids <- (geneNames(esetmysamples)) > Warning message: > 'geneNames' is deprecated. > Use 'featureNames' instead. > See help("Deprecated") ids <- featureNames(esetmysamples) >> ids.affx <- grep("^AFFX", ids) >> ids.noaffx <- setdiff(c(1:length(ids)), ids.affx) >> esetmysamples <- esetmysamples[ids.noaffx,] >> setwd(workdir) >> pd <- read.phenoData(filename="mysamplesphe.txt", sep="\t", header=TRUE) > Warning messages: > 1: read.phenoData is deprecated, use read.AnnotatedDataFrame instead > 2: The phenoData class is deprecated, use AnnotatedDataFrame (with > ExpressionSet) instead adf <- read.AnnotatedDataFrame(filename="mysamplesphe.txt", sep="\t", header=TRUE) The help page ?read.AnnotatedDataFrame might be helpful here. >> #esetmysamples <- new("exprSet", exprs = exprs(esetmysamples), phenoData = > pd) >> phenoData(esetmysamples) <- pd > Error in function (classes, fdef, mtable) : > unable to find an inherited method for function "phenoData<-", for > signature "ExpressionSet", "phenoData" >> phenoData(esetmysamples) <- adf Alternatively, to live with the warning but not the error, phenoData(esetmysamples) <- as(pd, "AnnotatedDataFrame") Finally, take a look at section 4 of the vignette Biobase - An introduction to Biobase and ExpressionSets for an approach that doesn't use read.AnnotatedDataFrame. Hope that helps, Martin > Can anyone help me to write the right the R.script? > > > thanks a lot > > ardi > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- Martin Morgan Bioconductor / Computational Biology http://bioconductor.org
ADD COMMENT

Login before adding your answer.

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