Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法访问GEOquery R中的GSM列表_R_Geo_Bioconductor - Fatal编程技术网

无法访问GEOquery R中的GSM列表

无法访问GEOquery R中的GSM列表,r,geo,bioconductor,R,Geo,Bioconductor,我正在使用一个包含2个系列矩阵的GSE集,并希望将整个内容转换为一个表达式集,以便在Limma中使用它。我已使用以下命令加载GSE: > gse <- getGEO('GSE16560', GSEMatrix = T) 到目前为止,我检查了gse对象的维度,它是空的,所以这没有帮助。而且,它不是一个列表。当我调用“Meta(gse)”时,它也会抛出相同的错误。一般来说,我对这些数据结构和R比较陌生,因此如果有人能为我指出正确的方向,这将是一个巨大的帮助。您的“gse”对象是两个表达

我正在使用一个包含2个系列矩阵的GSE集,并希望将整个内容转换为一个表达式集,以便在Limma中使用它。我已使用以下命令加载GSE:

> gse <- getGEO('GSE16560', GSEMatrix = T)

到目前为止,我检查了gse对象的维度,它是空的,所以这没有帮助。而且,它不是一个列表。当我调用“Meta(gse)”时,它也会抛出相同的错误。一般来说,我对这些数据结构和R比较陌生,因此如果有人能为我指出正确的方向,这将是一个巨大的帮助。

您的“gse”对象是两个表达式集的列表

library(GEOquery)
gse <- getGEO('GSE16560', GSEMatrix = T)

class(gse)
# [1] "list"

length(gse)
# [1] 2
我相信
GSMList
将处理类“GSE”的对象,如果将
getGEO
的“GSEMatrix”参数更改为
FALSE

既然你说你是R和这些数据结构的新手,请查看
?str
。它对于快速了解对象中存储的内容以及如何对数据进行索引(如果出于某种原因需要这样做)非常有用

str(gse[[1]]
#带有7个插槽的正式类“ExpressionSet”[包“Biobase”]
#..@experimentData:Formal类“MIAME”[包“Biobase”]有13个插槽
#   .. .. ..@ 姓名:chr“”
#   .. .. ..@ 实验室:chr“
#   .. .. ..@ 联系人:chr“”
#   .. .. ..@ 标题:chr“
#   .. .. ..@ 摘要:chr“
#   .. .. ..@ url:chr“”
#   .. .. ..@ pubMedIds:chr“”
#   .. .. ..@ 样本:列表()
#   .. .. ..@ 杂交:列表()
#   .. .. ..@ normControls:list()
#   .. .. ..@ 预处理:列表()
#   .. .. ..@ 其他:名单()
#   .. .. ..@ .__classVersion\正式类“Versions”[包“Biobase”]带有1个插槽
#   .. .. .. .. ..@ .数据:2人名单
#   .. .. .. .. .. ..$ : int[1:3]100
#   .. .. .. .. .. ..$ : int[1:3]11 0
#..@分析数据:
#..@phenoData:Formal类“AnnotatedDataFrame”[包“Biobase”]带有4个插槽
#   .. .. ..@ varMetadata:'data.frame':44 obs。第1个变量:
#   .. .. .. ..$ 标签说明:chr[1:44]不。。。
#   .. .. ..@ 数据:'data.frame':255 obs。在44个变量中:
#……等等
gse[[1]]@experimentData
#实验数据
#实验者姓名:
#实验室:
#联系方式:
#标题:
#网址:
#PMID:
#没有可用的摘要。
#还有一个例子。。。
水头(水平)(gse[[1]]@phenoData@data$geo_(加入))
#[1]“GSM416241”“GSM416242”“GSM416243”“GSM416244”“GSM416245”“GSM416246”

您可能正在关注GEOquery的小插曲

您需要传递“GSEMatrix=F”而不是TRUE

> gse.withmatrix <- getGEO('GSE16560', GSEMatrix = T)
> gse.nomatrix   <- getGEO('GSE16560', GSEMatrix = F)

> class(gse.withmatrix[[1]])
[1] "ExpressionSet"
attr(,"package")
[1] "Biobase"

> class(gse.nomatrix)
[1] "GSE"
attr(,"package")
[1] "GEOquery"

> GSMList(gse.withmatrix)
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘GSMList’ for signature ‘"list"’

> GSMList(gse.nomatrix)
.....
>gse.withmatrix gse.nomatrix类(gse.withmatrix[[1]]
[1] “表达式集”
属性(,“包”)
[1] “生物基”
>类别(gse.nomatrix)
[1] “GSE”
属性(,“包”)
[1] “地理查询”
>GSMList(带矩阵的gse)
(函数(类、fdef、mtable)中出错:
找不到签名“list”的函数“GSMList”的继承方法
>GSMList(gse.nomatrix)
.....

在上询问适用于Bioconductor软件包,如
GEOquery
。请确保包括
sessionInfo()
的输出,以便列表中的其他人知道您正在使用的版本R和软件包。@MartinMorgan谢谢,这是我以前不知道的一个很好的资源:)
# get the class of the first element in the list
class(gse[[1]])
# [1] "ExpressionSet"
# attr(,"package")
# [1] "Biobase"
str(gse[[1]])
# Formal class 'ExpressionSet' [package "Biobase"] with 7 slots
#   ..@ experimentData   :Formal class 'MIAME' [package "Biobase"] with 13 slots
#   .. .. ..@ name             : chr ""
#   .. .. ..@ lab              : chr ""
#   .. .. ..@ contact          : chr ""
#   .. .. ..@ title            : chr ""
#   .. .. ..@ abstract         : chr ""
#   .. .. ..@ url              : chr ""
#   .. .. ..@ pubMedIds        : chr ""
#   .. .. ..@ samples          : list()
#   .. .. ..@ hybridizations   : list()
#   .. .. ..@ normControls     : list()
#   .. .. ..@ preprocessing    : list()
#   .. .. ..@ other            : list()
#   .. .. ..@ .__classVersion__:Formal class 'Versions' [package "Biobase"] with 1 slots
#   .. .. .. .. ..@ .Data:List of 2
#   .. .. .. .. .. ..$ : int [1:3] 1 0 0
#   .. .. .. .. .. ..$ : int [1:3] 1 1 0
#   ..@ assayData        :<environment: 0x7fb344a81758> 
#   ..@ phenoData        :Formal class 'AnnotatedDataFrame' [package "Biobase"] with 4 slots
#   .. .. ..@ varMetadata      :'data.frame':   44 obs. of  1 variable:
#   .. .. .. ..$ labelDescription: chr [1:44] NA NA NA NA ...
#   .. .. ..@ data             :'data.frame':   255 obs. of  44 variables:
# ....and so on and so forth

gse[[1]]@experimentData
# Experiment data
#   Experimenter name:  
#   Laboratory:  
#   Contact information:  
#   Title:  
#   URL:  
#   PMIDs:  
#   No abstract available.

# and one more example...
head(levels(gse[[1]]@phenoData@data$geo_accession))
# [1] "GSM416241" "GSM416242" "GSM416243" "GSM416244" "GSM416245" "GSM416246"
> gse.withmatrix <- getGEO('GSE16560', GSEMatrix = T)
> gse.nomatrix   <- getGEO('GSE16560', GSEMatrix = F)

> class(gse.withmatrix[[1]])
[1] "ExpressionSet"
attr(,"package")
[1] "Biobase"

> class(gse.nomatrix)
[1] "GSE"
attr(,"package")
[1] "GEOquery"

> GSMList(gse.withmatrix)
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘GSMList’ for signature ‘"list"’

> GSMList(gse.nomatrix)
.....