TCGA拷贝数变异数据copy number variation 下载处理的方法不一样,你不要套用表达数据的下载方法:
# 加载需要的包
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"’
TCGA拷贝数变异数据copy number variation 下载处理的方法不一样,你不要套用表达数据的下载方法:
如果觉得我的回答对您有用,请随意打赏。你的支持将鼓励我继续创作!