phenodata GEOquery query
1
0
Entering edit mode
Reema Singh ▴ 570
@reema-singh-4373
Last seen 9.6 years ago
Hi I have downloaded a GSE file (GSE21111_family.soft.gz). And using the GEOquery package documentation creating the expression set from the GSE file. Here is that script. library(GEOquery) u <- getGEO(filename=GSE21111_family.soft.gz,GSEMatrix=TRUE) probesets <- Table(GPLList(u)[[1]])$ID data.matrix <- do.call("cbind",lapply(GSMList(u), function(x) { tab <- Table(x) mymatch <- match(probesets, tab$ID_REF) return(tab$VALUE[mymatch])})) data.matrix <- apply(data.matrix,2,function(x) { as.numeric(as.character(x)) }) rownames(data.matrix)<- probesets colnames(data.matrix) <- names(GSMList(u)) pdata <- data.frame(samples=names(GSMList(u))) rownames(pdata) <- names(GSMList(u)) pheno <- as(pdata, "AnnotatedDataFrame") eset <- new("ExpressionSet",exprs=data.matrix,phenoData=pheno) pData(eset) samplenames.................. Now when i did pData(eset), it gives me the sampleNames only. But along with samplenames i also want sample conditions like controll and clinical isolates). Kindly tell me how i include these information. i am also wondering about one thing when we use download GSE2111 file directly from internet using u <- getGEO(GSE21111) , then u is an expression set and get the full phenodata information. Regards~ Reema Singh [[alternative HTML version deleted]]
• 1.9k views
ADD COMMENT
0
Entering edit mode
@sean-davis-490
Last seen 3 months ago
United States
Hi, Reema. The recommended way of getting a GSE into an ExpressionSet is to use a GSE Matrix file. eset = getGEO('GSE21111')[[1]] If you want to store the downloaded file in a convenient place for the future, specify a download directory in the getGEO call. Hope that helps. Sean On Sat, Nov 5, 2011 at 6:33 AM, Reema Singh <reema28sep at="" gmail.com=""> wrote: > Hi > > I have downloaded a GSE file (GSE21111_family.soft.gz). And using the > GEOquery package documentation creating the expression set from the GSE > file. Here is that script. > > library(GEOquery) > u <- getGEO(filename=GSE21111_family.soft.gz,GSEMatrix=TRUE) > ?probesets <- Table(GPLList(u)[[1]])$ID > ? ? ? ?data.matrix <- do.call("cbind",lapply(GSMList(u), function(x) { > ? ? ? ?tab <- Table(x) > ? ? ? ?mymatch <- match(probesets, tab$ID_REF) > ? ? ? ?return(tab$VALUE[mymatch])})) > ? ? ? ?data.matrix <- apply(data.matrix,2,function(x) { > ? ? ? ?as.numeric(as.character(x)) }) > ? ? ? ?rownames(data.matrix)<- probesets > ? ? ? ?colnames(data.matrix) <- names(GSMList(u)) > ? ? ? ?pdata <- data.frame(samples=names(GSMList(u))) > ? ? ? ?rownames(pdata) <- names(GSMList(u)) > ? ? ? ?pheno <- as(pdata, "AnnotatedDataFrame") > ? ? ? ?eset <- new("ExpressionSet",exprs=data.matrix,phenoData=pheno) > ? ? ? ?pData(eset) > ? ? ? ? samplenames.................. > > > Now when i did pData(eset), it gives me the sampleNames only. But along > with samplenames i also want sample conditions like controll and clinical > isolates). Kindly tell me how i include these information. > i am also wondering about one thing when we use download GSE2111 file > directly from internet using u <- getGEO(GSE21111) , then u is an > expression set and get the full phenodata information. > > Regards~ > Reema Singh > > ? ? ? ?[[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 COMMENT

Login before adding your answer.

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