TCGAbiolinks下载“Copy Number Variation”在提取矩阵时报错(在下载miRNA和甲基化数据时也遇到这个问题), expdat变量不是SummarizedExperiment这个类型,导致assay(expdat)不能提取,请问怎么解决

#  加载需要的包
library(SummarizedExperiment)
library(TCGAbiolinks)

 #下载Copy Number Variation数据
  query <- GDCquery(project =  "TCGA-CHOL", 
                    data.category = "Copy Number Variation", 
                    data.type = "Copy Number Segment")
  
  GDCdownload(query, method = "api", files.per.chunk = 50)
  expdat <- GDCprepare(query = query)
  
  count_matrix=assay(expdat)
  write.csv(count_matrix,file = paste(cancer_type,"Copy-Number-Variation.csv",sep = "-"))
####报错
> count_matrix=assay(expdat)
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘assay’ for signature ‘"spec_tbl_df", "missing"’

attachments-2020-03-vnJHweDW5e5d2d7c04c32.pngattachments-2020-03-QNbuqaoA5e5d2d9070251.png

请先 登录 后评论

1 个回答

omicsgene - 生物信息
请先 登录 后评论