Entering edit mode
Reema Singh
▴
570
@reema-singh-4373
Last seen 10.5 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]]