[BioC] phenodata GEOquery query

Sean Davis sdavis2 at mail.nih.gov
Mon Nov 7 00:20:58 CET 2011


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
>



More information about the Bioconductor mailing list