Convert gene expression matrix to ExpressionSet
1
0
Entering edit mode
Wendy Qiao ▴ 360
@wendy-qiao-4501
Last seen 10.3 years ago
Hi all, I would like to use the GSVA package on my data. In order to do this, the gene expression matrix has to be converted into a ExpressionSet. Does anybody know a function for this purpose? I found an example from the "Convert Data Objects" page ( http://rss.acs.unt.edu/Rdoc/library/convert/html/coerce.html). The following code in the example gives me an error, but I am not sure how to define a new class. Could anybody help? Thank you very much. maT = new("marrayInfo", maLabels=c("S1", "S2"), maInfo= testTarget) Error in getClass(Class, where = topenv(parent.frame())) : "marrayInfo" is not a defined class Wendy [[alternative HTML version deleted]]
GSVA GSVA • 5.5k views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 4 months ago
United States
On 11/06/2011 07:29 PM, Wendy Qiao wrote: > Hi all, > > I would like to use the GSVA package on my data. In order to do this, the > gene expression matrix has to be converted into a ExpressionSet. Does > anybody know a function for this purpose? I found an example from the > "Convert Data Objects" page ( > http://rss.acs.unt.edu/Rdoc/library/convert/html/coerce.html). The > following code in the example gives me an error, but I am not sure how to > define a new class. Could anybody help? Thank you very much. > > maT = new("marrayInfo", maLabels=c("S1", "S2"), > maInfo= testTarget) > > Error in getClass(Class, where = topenv(parent.frame())) : > "marrayInfo" is not a defined class Hi Wendy -- have you looked at the Biobase vignette 'An Introduction to Biobase and ExpressionSet' at http://bioconductor.org/packages/release/bioc/html/Biobase.html ? Martin > > Wendy > > [[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 -- 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
Thanks a lot, Martin. It is a good idea. The example in section 4.1 seems exactly what I want, but it gives the following error. I wonder if you have any insight about this error. have checked Biobase manual. "ExpressionSet" is a valid function. I was wondering if you have any insight. Thank you very much. > library("Biobase") > dataDirectory <- system.file("extdata", package="Biobase") > exprsFile <- file.path(dataDirectory, "exprsData.txt") > exprs <- as.matrix(read.table(exprsFile, header=TRUE, sep="\t",row.names=1,as.is=TRUE)) > minimalSet <- ExpressionSet(assayData=exprs) Error: could not find function "ExpressionSet" Wendy On 6 November 2011 23:04, Martin Morgan <mtmorgan@fhcrc.org> wrote: > On 11/06/2011 07:29 PM, Wendy Qiao wrote: > >> Hi all, >> >> I would like to use the GSVA package on my data. In order to do this, the >> gene expression matrix has to be converted into a ExpressionSet. Does >> anybody know a function for this purpose? I found an example from the >> "Convert Data Objects" page ( >> http://rss.acs.unt.edu/Rdoc/**library/convert/html/coerce.**html<ht tp:="" rss.acs.unt.edu="" rdoc="" library="" convert="" html="" coerce.html="">). >> The >> following code in the example gives me an error, but I am not sure how to >> define a new class. Could anybody help? Thank you very much. >> >> maT = new("marrayInfo", maLabels=c("S1", "S2"), >> maInfo= testTarget) >> >> Error in getClass(Class, where = topenv(parent.frame())) : >> "marrayInfo" is not a defined class >> > > Hi Wendy -- have you looked at the Biobase vignette 'An Introduction to > Biobase and ExpressionSet' at > > http://bioconductor.org/**packages/release/bioc/html/**Biobase.html< http://bioconductor.org/packages/release/bioc/html/Biobase.html> > > ? > > Martin > > >> Wendy >> >> [[alternative HTML version deleted]] >> >> ______________________________**_________________ >> Bioconductor mailing list >> Bioconductor@r-project.org >> https://stat.ethz.ch/mailman/**listinfo/bioconductor<https: stat.e="" thz.ch="" mailman="" listinfo="" bioconductor=""> >> Search the archives: http://news.gmane.org/gmane.** >> science.biology.informatics.**conductor<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 > [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
On 11/06/2011 08:23 PM, Wendy Qiao wrote: > Thanks a lot, Martin. > > It is a good idea. The example in section 4.1 seems exactly what I want, > but it gives the following error. I wonder if you have any insight about > this error. have checked Biobase manual. "ExpressionSet" is a valid > function. I was wondering if you have any insight. Thank you very much. > > > > library("Biobase") > > dataDirectory <- system.file("extdata", package="Biobase") > > exprsFile <- file.path(dataDirectory, "exprsData.txt") > > exprs <- as.matrix(read.table(exprsFile, header=TRUE, > sep="\t",row.names=1,as.is <http: as.is="">=TRUE)) > > minimalSet <- ExpressionSet(assayData=exprs) > Error: could not find function "ExpressionSet" Hi Wendy -- You are using an older version of R and / or Biobase. Update R (to version 2.14.0 and Bioconductor http://bioconductor.org/install/ or consult the version of the vignette appropriate for your version of Biobase browseVignettes("Biobase") Martin > > > Wendy > > > > > > > > > > > > > On 6 November 2011 23:04, Martin Morgan <mtmorgan at="" fhcrc.org=""> <mailto:mtmorgan at="" fhcrc.org="">> wrote: > > On 11/06/2011 07:29 PM, Wendy Qiao wrote: > > Hi all, > > I would like to use the GSVA package on my data. In order to do > this, the > gene expression matrix has to be converted into a ExpressionSet. > Does > anybody know a function for this purpose? I found an example > from the > "Convert Data Objects" page ( > http://rss.acs.unt.edu/Rdoc/__library/convert/html/coerce.__html > <http: rss.acs.unt.edu="" rdoc="" library="" convert="" html="" coerce.html="">). The > following code in the example gives me an error, but I am not > sure how to > define a new class. Could anybody help? Thank you very much. > > maT = new("marrayInfo", maLabels=c("S1", "S2"), > maInfo= testTarget) > > Error in getClass(Class, where = topenv(parent.frame())) : > "marrayInfo" is not a defined class > > > Hi Wendy -- have you looked at the Biobase vignette 'An Introduction > to Biobase and ExpressionSet' at > > http://bioconductor.org/__packages/release/bioc/html/__Biobase.html > <http: bioconductor.org="" packages="" release="" bioc="" html="" biobase.html=""> > > ? > > Martin > > > Wendy > > [[alternative HTML version deleted]] > > _________________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org <mailto:bioconductor at="" r-project.org=""> > https://stat.ethz.ch/mailman/__listinfo/bioconductor > <https: stat.ethz.ch="" mailman="" listinfo="" bioconductor=""> > Search the archives: > http://news.gmane.org/gmane.__science.biology.informatics.__conductor > <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 <tel:206%20667-2793> > > -- 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
Thanks so much, Martin. It worked by updating R and Bioconductor packages! Wendy On 6 November 2011 23:33, Martin Morgan <mtmorgan@fhcrc.org> wrote: > On 11/06/2011 08:23 PM, Wendy Qiao wrote: > >> Thanks a lot, Martin. >> >> It is a good idea. The example in section 4.1 seems exactly what I want, >> but it gives the following error. I wonder if you have any insight about >> this error. have checked Biobase manual. "ExpressionSet" is a valid >> function. I was wondering if you have any insight. Thank you very much. >> >> >> > library("Biobase") >> > dataDirectory <- system.file("extdata", package="Biobase") >> > exprsFile <- file.path(dataDirectory, "exprsData.txt") >> > exprs <- as.matrix(read.table(**exprsFile, header=TRUE, >> sep="\t",row.names=1,as.is <http: as.is="">=TRUE)) >> >> > minimalSet <- ExpressionSet(assayData=exprs) >> Error: could not find function "ExpressionSet" >> > > Hi Wendy -- > > You are using an older version of R and / or Biobase. Update R (to version > 2.14.0 and Bioconductor > > http://bioconductor.org/**install/ <http: bioconductor.org="" install=""/> > > or consult the version of the vignette appropriate for your version of > Biobase > > browseVignettes("Biobase") > > Martin > > >> >> Wendy >> >> >> >> >> >> >> >> >> >> >> >> >> On 6 November 2011 23:04, Martin Morgan <mtmorgan@fhcrc.org>> <mailto:mtmorgan@fhcrc.org>> wrote: >> >> On 11/06/2011 07:29 PM, Wendy Qiao wrote: >> >> Hi all, >> >> I would like to use the GSVA package on my data. In order to do >> this, the >> gene expression matrix has to be converted into a ExpressionSet. >> Does >> anybody know a function for this purpose? I found an example >> from the >> "Convert Data Objects" page ( >> http://rss.acs.unt.edu/Rdoc/__**library/convert/html/coerce.__** >> html <http: rss.acs.unt.edu="" rdoc="" __library="" convert="" html="" coerce.__html=""> >> <http: rss.acs.unt.edu="" rdoc="" **library="" convert="" html="" coerce.*="" *html<http:="" rss.acs.unt.edu="" rdoc="" library="" convert="" html="" coerce.html="">>). >> The >> >> following code in the example gives me an error, but I am not >> sure how to >> define a new class. Could anybody help? Thank you very much. >> >> maT = new("marrayInfo", maLabels=c("S1", "S2"), >> maInfo= testTarget) >> >> Error in getClass(Class, where = topenv(parent.frame())) : >> "marrayInfo" is not a defined class >> >> >> Hi Wendy -- have you looked at the Biobase vignette 'An Introduction >> to Biobase and ExpressionSet' at >> >> http://bioconductor.org/__**packages/release/bioc/html/__** >> Biobase.html<http: bioconductor.org="" __packages="" release="" bioc="" html="" _="" _biobase.html=""> >> >> <http: bioconductor.org="" **packages="" release="" bioc="" html="" **biobase.="" html<http:="" bioconductor.org="" packages="" release="" bioc="" html="" biobase.html=""> >> > >> >> ? >> >> Martin >> >> >> Wendy >> >> [[alternative HTML version deleted]] >> >> ______________________________**___________________ >> Bioconductor mailing list >> Bioconductor@r-project.org <mailto:bioconductor@r-**project.org<bioconductor@r-project.org> >> > >> https://stat.ethz.ch/mailman/_**_listinfo/bioconductor<https :="" stat.ethz.ch="" mailman="" __listinfo="" bioconductor=""> >> >> <https: stat.ethz.ch="" mailman="" **listinfo="" bioconductor<https:="" stat.ethz.ch="" mailman="" listinfo="" bioconductor=""> >> > >> Search the archives: >> http://news.gmane.org/gmane.__**science.biology.informatics.__** >> conductor<http: news.gmane.org="" gmane.__science.biology.informatics="" .__conductor=""> >> >> <http: news.gmane.org="" gmane.**science.biology.informatics.**="">> conductor<http: news.gmane.org="" gmane.science.biology.informatics.c="" onductor=""> >> > >> >> >> >> -- >> Computational Biology >> Fred Hutchinson Cancer Research Center >> 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 >> >> Location: M1-B861 >> Telephone: 206 667-2793 <tel:206%20667-2793> >> >> >> > > -- > Computational Biology > Fred Hutchinson Cancer Research Center > 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 > > Location: M1-B861 > Telephone: 206 667-2793 > [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
hi Wendy, a little late, but if you consult pages 3 to 6 of the reference manual at: http://www.bioconductor.org/packages/2.9/bioc/manuals/GSVA/man/GSVA.pd f or the online help page of the gsva() function from the R shell with: help(gsva) you'll see that the gsva() function also accepts a matrix where rows correspond to genes and columns to samples. however, it is a very good practice to put your gene expression and phenotypic data into an ExpressionSet object to ensure integrity of both types of data. in the framework of the gsva() function it can also help you a lot if you're going to work with gene sets from the Broad Institute since the mapping steps between genes in the gene sets and genes in your expression matrix may be non-trivial for the non-experienced user and by passing an ExpressionSet and GeneSetCollection objects, this mapping logic will be seamless handled by the function. do not hesitate to post any question about this. cheers, robert. On 11/7/11 8:13 AM, Wendy Qiao wrote: > Thanks so much, Martin. It worked by updating R and Bioconductor packages! > > Wendy > > On 6 November 2011 23:33, Martin Morgan<mtmorgan at="" fhcrc.org=""> wrote: > >> On 11/06/2011 08:23 PM, Wendy Qiao wrote: >> >>> Thanks a lot, Martin. >>> >>> It is a good idea. The example in section 4.1 seems exactly what I want, >>> but it gives the following error. I wonder if you have any insight about >>> this error. have checked Biobase manual. "ExpressionSet" is a valid >>> function. I was wondering if you have any insight. Thank you very much. >>> >>> >>> > library("Biobase") >>> > dataDirectory<- system.file("extdata", package="Biobase") >>> > exprsFile<- file.path(dataDirectory, "exprsData.txt") >>> > exprs<- as.matrix(read.table(**exprsFile, header=TRUE, >>> sep="\t",row.names=1,as.is<http: as.is="">=TRUE)) >>> >>> > minimalSet<- ExpressionSet(assayData=exprs) >>> Error: could not find function "ExpressionSet" >>> >> >> Hi Wendy -- >> >> You are using an older version of R and / or Biobase. Update R (to version >> 2.14.0 and Bioconductor >> >> http://bioconductor.org/**install/<http: bioconductor.org="" install=""/> >> >> or consult the version of the vignette appropriate for your version of >> Biobase >> >> browseVignettes("Biobase") >> >> Martin >> >> >>> >>> Wendy >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> On 6 November 2011 23:04, Martin Morgan<mtmorgan at="" fhcrc.org="">>> <mailto:mtmorgan at="" fhcrc.org="">> wrote: >>> >>> On 11/06/2011 07:29 PM, Wendy Qiao wrote: >>> >>> Hi all, >>> >>> I would like to use the GSVA package on my data. In order to do >>> this, the >>> gene expression matrix has to be converted into a ExpressionSet. >>> Does >>> anybody know a function for this purpose? I found an example >>> from the >>> "Convert Data Objects" page ( >>> http://rss.acs.unt.edu/Rdoc/__**library/convert/html/coerce.__** >>> html<http: rss.acs.unt.edu="" rdoc="" __library="" convert="" html="" coerce.__html=""> >>> <http: rss.acs.unt.edu="" rdoc="" **library="" convert="" html="" coerce="" .**html<http:="" rss.acs.unt.edu="" rdoc="" library="" convert="" html="" coerce.html="">> ). >>> The >>> >>> following code in the example gives me an error, but I am not >>> sure how to >>> define a new class. Could anybody help? Thank you very much. >>> >>> maT = new("marrayInfo", maLabels=c("S1", "S2"), >>> maInfo= testTarget) >>> >>> Error in getClass(Class, where = topenv(parent.frame())) : >>> "marrayInfo" is not a defined class >>> >>> >>> Hi Wendy -- have you looked at the Biobase vignette 'An Introduction >>> to Biobase and ExpressionSet' at >>> >>> http://bioconductor.org/__**packages/release/bioc/html/__** >>> Biobase.html<http: bioconductor.org="" __packages="" release="" bioc="" html="" __biobase.html=""> >>> >>> <http: bioconductor.org="" **packages="" release="" bioc="" html="" **biobas="" e.html<http:="" bioconductor.org="" packages="" release="" bioc="" html="" biobase.html=""> >>>> >>> >>> ? >>> >>> Martin >>> >>> >>> Wendy >>> >>> [[alternative HTML version deleted]] >>> >>> ______________________________**___________________ >>> Bioconductor mailing list >>> Bioconductor at r-project.org<mailto:bioconductor at="" r-**project.org<bioconductor="" at="" r-project.org=""> >>>> >>> https://stat.ethz.ch/mailman/_**_listinfo/bioconductor<htt ps:="" stat.ethz.ch="" mailman="" __listinfo="" bioconductor=""> >>> >>> <https: stat.ethz.ch="" mailman="" **listinfo="" bioconductor<http="" s:="" stat.ethz.ch="" mailman="" listinfo="" bioconductor=""> >>>> >>> Search the archives: >>> http://news.gmane.org/gmane.__**science.biology.informatics.__** >>> conductor<http: news.gmane.org="" gmane.__science.biology.informatic="" s.__conductor=""> >>> >>> <http: news.gmane.org="" gmane.**science.biology.informatics.**="">>> conductor<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<tel:206%20667-2793> >>> >>> >>> >> >> -- >> Computational Biology >> Fred Hutchinson Cancer Research Center >> 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 >> >> Location: M1-B861 >> Telephone: 206 667-2793 >> > > [[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: 795 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