Question: Error while building ExpressionSet from scratch....
0
gravatar for Bas Jansen
7.8 years ago by
Bas Jansen150
Bas Jansen150 wrote:
Hi Bioconductor gurus: I am trying to make ExpressionSet files for the analysis of PCR arrays, to be able to analyze them in LMGene. However, I get the following error message: > eSet_xxx <- new("ExpressionSet", exprs = exprs_xxx, phenoData = phenoData_xxx, experimentData = experimentData) Error in function (classes, fdef, mtable) : unable to find an inherited method for function "annotatedDataFrameFrom", for signature "data.frame" I have done this a gazillion times before without a hitch, and suddenly I'm not able to do so anymore. If anyone knows what's going on, I am all ears. Kind regards, Bas > sessionInfo() R version 2.13.2 (2011-09-30) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) locale: [1] C/UTF-8/C/C/C/C attached base packages: [1] splines tools stats graphics grDevices utils datasets [8] methods base other attached packages: [1] LMGene_2.8.0 affy_1.30.0 survival_2.36-10 multtest_2.8.0 [5] Biobase_2.12.2 loaded via a namespace (and not attached): [1] MASS_7.3-14 affyio_1.20.0 preprocessCore_1.14.0 [4] tcltk_2.13.2
experimentdata lmgene • 5.3k views
ADD COMMENTlink modified 7.8 years ago by Martin Morgan ♦♦ 23k • written 7.8 years ago by Bas Jansen150
Answer: Error while building ExpressionSet from scratch....
0
gravatar for Martin Morgan
7.8 years ago by
Martin Morgan ♦♦ 23k
United States
Martin Morgan ♦♦ 23k wrote:
On 11/14/2011 04:37 AM, Bas Jansen wrote: > Hi Bioconductor gurus: > > I am trying to make ExpressionSet files for the analysis of PCR > arrays, to be able to analyze them in LMGene. However, I get the > following error message: > >> eSet_xxx<- new("ExpressionSet", exprs = exprs_xxx, phenoData = phenoData_xxx, experimentData = experimentData) > Error in function (classes, fdef, mtable) : > unable to find an inherited method for function > "annotatedDataFrameFrom", for signature "data.frame" you're not providing a featureData instance, so R is trying to infer one from exprs. My guess is that exprs is data.frame, but should be a matrix. In R-2.14 there is the function ExpressionSet() which might make this more transparent > args(ExpressionSet) function (assayData, phenoData = annotatedDataFrameFrom(assayData, byrow = FALSE), featureData = annotatedDataFrameFrom(assayData, byrow = TRUE), experimentData = new("MIAME"), annotation = character(), protocolData = annotatedDataFrameFrom(assayData, byrow = FALSE), ...) NULL Martin > > I have done this a gazillion times before without a hitch, and > suddenly I'm not able to do so anymore. If anyone knows what's going > on, I am all ears. > > Kind regards, > Bas > >> sessionInfo() > R version 2.13.2 (2011-09-30) > Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) > > locale: > [1] C/UTF-8/C/C/C/C > > attached base packages: > [1] splines tools stats graphics grDevices utils datasets > [8] methods base > > other attached packages: > [1] LMGene_2.8.0 affy_1.30.0 survival_2.36-10 multtest_2.8.0 > [5] Biobase_2.12.2 > > loaded via a namespace (and not attached): > [1] MASS_7.3-14 affyio_1.20.0 preprocessCore_1.14.0 > [4] tcltk_2.13.2 > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- Computational Biology Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: M1-B861 Telephone: 206 667-2793
ADD COMMENTlink written 7.8 years ago by Martin Morgan ♦♦ 23k
Dear Martin, others, Thanks for your help! It appears to be the data.frame <-> matrix problem. Kind regards, Bas On Mon, Nov 14, 2011 at 6:35 PM, Martin Morgan <mtmorgan at="" fhcrc.org=""> wrote: > On 11/14/2011 04:37 AM, Bas Jansen wrote: >> >> Hi Bioconductor gurus: >> >> I am trying to make ExpressionSet files for the analysis of PCR >> arrays, to be able to analyze them in LMGene. However, I get the >> following error message: >> >>> eSet_xxx<- new("ExpressionSet", exprs = exprs_xxx, phenoData = >>> phenoData_xxx, experimentData = experimentData) >> >> Error in function (classes, fdef, mtable) ?: >> ? unable to find an inherited method for function >> "annotatedDataFrameFrom", for signature "data.frame" > > you're not providing a featureData instance, so R is trying to infer one > from exprs. My guess is that exprs is data.frame, but should be a matrix. > > In R-2.14 there is the function ExpressionSet() which might make this more > transparent > >> args(ExpressionSet) > function (assayData, phenoData = annotatedDataFrameFrom(assayData, > ? ?byrow = FALSE), featureData = annotatedDataFrameFrom(assayData, > ? ?byrow = TRUE), experimentData = new("MIAME"), annotation = character(), > ? ?protocolData = annotatedDataFrameFrom(assayData, byrow = FALSE), > ? ?...) > NULL > > Martin > >> >> I have done this a gazillion times before without a hitch, and >> suddenly I'm not able to do so anymore. If anyone knows what's going >> on, I am all ears. >> >> Kind regards, >> Bas >> >>> sessionInfo() >> >> R version 2.13.2 (2011-09-30) >> Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) >> >> locale: >> [1] C/UTF-8/C/C/C/C >> >> attached base packages: >> [1] splines ? tools ? ? stats ? ? graphics ?grDevices utils ? ? datasets >> [8] methods ? base >> >> other attached packages: >> [1] LMGene_2.8.0 ? ? affy_1.30.0 ? ? ?survival_2.36-10 multtest_2.8.0 >> [5] Biobase_2.12.2 >> >> loaded via a namespace (and not attached): >> [1] MASS_7.3-14 ? ? ? ? ? affyio_1.20.0 ? ? ? ? preprocessCore_1.14.0 >> [4] tcltk_2.13.2 >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at r-project.org >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: >> http://news.gmane.org/gmane.science.biology.informatics.conductor > > > -- > Computational Biology > Fred Hutchinson Cancer Research Center > 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 > > Location: M1-B861 > Telephone: 206 667-2793 >
ADD REPLYlink written 7.8 years ago by Bas Jansen150
Answer: Error while building ExpressionSet from scratch....
0
gravatar for Vincent J. Carey, Jr.
7.8 years ago by
United States
Vincent J. Carey, Jr.6.3k wrote:
On Mon, Nov 14, 2011 at 7:37 AM, Bas Jansen <bjhjansen@gmail.com> wrote: > Hi Bioconductor gurus: > > I am trying to make ExpressionSet files for the analysis of PCR > arrays, to be able to analyze them in LMGene. However, I get the > following error message: > > > eSet_xxx <- new("ExpressionSet", exprs = exprs_xxx, phenoData = > phenoData_xxx, experimentData = experimentData) > Error in function (classes, fdef, mtable) : > unable to find an inherited method for function > "annotatedDataFrameFrom", for signature "data.frame" > > I have done this a gazillion times before without a hitch, and > suddenly I'm not able to do so anymore. If anyone knows what's going > on, I am all ears. > > Dear Bas, Did you have a look at documentation? There is a vignette in Biobase called BiobaseDevelopment that shows that we pass an AnnotatedDataFrame instance in for phenoData. obj <- new("ExpressionSet", phenoData = new("AnnotatedDataFrame"), experimentData = new("MIAME"), annotation = character(), exprs = new("matrix")) You don't say what class phenoData_xxx has, but presumably it is a data.frame. The following may be relevant > new("AnnotatedDataFrame", data=data.frame()) An object of class "AnnotatedDataFrame": none > new("AnnotatedDataFrame", data=data.frame(1)) An object of class "AnnotatedDataFrame" rowNames: 1 varLabels: X1 varMetadata: labelDescription > Kind regards, > Bas > > > sessionInfo() > R version 2.13.2 (2011-09-30) > Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) > > locale: > [1] C/UTF-8/C/C/C/C > > attached base packages: > [1] splines tools stats graphics grDevices utils datasets > [8] methods base > > other attached packages: > [1] LMGene_2.8.0 affy_1.30.0 survival_2.36-10 multtest_2.8.0 > [5] Biobase_2.12.2 > > loaded via a namespace (and not attached): > [1] MASS_7.3-14 affyio_1.20.0 preprocessCore_1.14.0 > [4] tcltk_2.13.2 > > _______________________________________________ > 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 7.8 years ago by Vincent J. Carey, Jr.6.3k
Hi Bass, I was playing around building my own expression set last week (there could be easier ways) It is possible something in it could help you. This was for 2 colour array data but can be modified for PCR data etc. # Jump to directory where data files are setwd("C:/somewhere") dir() files = c("two_colour_1.txt", "two_colour_2.txt", "two_colour_3.txt", "two_colour_4.txt") library(marray) # load Agilent files mraw = read.Agilent(files) # normalise data mnorm = maNorm(mraw, "loess") # ignore control spots non_controls = mnorm at maGnames@maInfo$ControlType == 0 just_genes = mnorm[non_controls,] # Take just the expression M values fullexp = just_genes at maM rownames(fullexp) = just_genes at maGnames@maInfo$SystematicName # find something for missing values library(impute) imputed = impute.knn(fullexp, k=3)$data # Average spots for the same gene averaged = avereps(imputed) # Give some column names to averaged expression M value matrix names=c("two_colour_1","two_colour_2","two_colour_3","two_colour_4") colnames(averaged)=names # Make up some phenotype data into a data frame (rownames of pframe must be colnames of gene expression matrix) Cy3 = rep("control", 4) Cy5 = rep("treatment", 4) pframe = data.frame(Cy3=Cy3, Cy5=Cy5) rownames(pframe) = colnames(averaged) pframe # Make some information to store about array (rownames of metadata must be the same as column names of pframe) metadata = data.frame(labelDescription=c("Normal RNA labelled with Cy3", "Treatment RNA was labelled with Cy5")) metadata rownames(metadata)=colnames(pframe) metadata # Make a new annotated data frame with the above meta and pheno data library("Biobase") adf2 = new("AnnotatedDataFrame", data=pframe, varMetadata=metadata) adf2 # Give some background information in the MIAME format. experimental_data = new("MIAME", name="john", lab="BigLab", contact="me", title="Treatment vs. control") # Make a new expression set object. exp_set = new("ExpressionSet", exprs=averaged, phenoData=adf2, experimentData=experimental_data) Cheers, John. On Mon, Nov 14, 2011 at 2:38 PM, Vincent Carey <stvjc at="" channing.harvard.edu=""> wrote: > On Mon, Nov 14, 2011 at 7:37 AM, Bas Jansen <bjhjansen at="" gmail.com=""> wrote: > >> Hi Bioconductor gurus: >> >> I am trying to make ExpressionSet files for the analysis of PCR >> arrays, to be able to analyze them in LMGene. However, I get the >> following error message: >> >> > eSet_xxx <- new("ExpressionSet", exprs = exprs_xxx, phenoData = >> phenoData_xxx, experimentData = experimentData) >> Error in function (classes, fdef, mtable) ?: >> ?unable to find an inherited method for function >> "annotatedDataFrameFrom", for signature "data.frame" >> >> I have done this a gazillion times before without a hitch, and >> suddenly I'm not able to do so anymore. If anyone knows what's going >> on, I am all ears. >> >> Dear Bas, > > Did you have a look at documentation? ? There is a vignette in Biobase > called BiobaseDevelopment that shows that we pass an AnnotatedDataFrame > instance in for phenoData. > > obj <- new("ExpressionSet", phenoData = new("AnnotatedDataFrame"), > experimentData = new("MIAME"), annotation = character(), exprs = > new("matrix")) > > You don't say what class phenoData_xxx has, but presumably it is a > data.frame. ?The following may be relevant > >> new("AnnotatedDataFrame", data=data.frame()) > An object of class "AnnotatedDataFrame": none >> new("AnnotatedDataFrame", data=data.frame(1)) > An object of class "AnnotatedDataFrame" > ?rowNames: 1 > ?varLabels: X1 > ?varMetadata: labelDescription > > > >> Kind regards, >> Bas >> >> > sessionInfo() >> R version 2.13.2 (2011-09-30) >> Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) >> >> locale: >> [1] C/UTF-8/C/C/C/C >> >> attached base packages: >> [1] splines ? tools ? ? stats ? ? graphics ?grDevices utils ? ? datasets >> [8] methods ? base >> >> other attached packages: >> [1] LMGene_2.8.0 ? ? affy_1.30.0 ? ? ?survival_2.36-10 multtest_2.8.0 >> [5] Biobase_2.12.2 >> >> loaded via a namespace (and not attached): >> [1] MASS_7.3-14 ? ? ? ? ? affyio_1.20.0 ? ? ? ? preprocessCore_1.14.0 >> [4] tcltk_2.13.2 >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at 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]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >
ADD REPLYlink written 7.8 years ago by john herbert560
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 16.09
Traffic: 258 users visited in the last hour