Error while building ExpressionSet from scratch....
2
0
Entering edit mode
Bas Jansen ▴ 150
@bas-jansen-2966
Last seen 10.3 years ago
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 ExperimentData LMGene • 9.8k views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 5 months ago
United States
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 COMMENT
0
Entering edit mode
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 REPLY
0
Entering edit mode
@vincent-j-carey-jr-4
Last seen 3 months ago
United States
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 COMMENT
0
Entering edit mode
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 REPLY

Login before adding your answer.

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