我想阅读一份MAF文件列表,并将其与临床数据相结合,然后进行临床丰富分析。
library(maftools)
# Load MAF files (By default, silent mutations are discarded using removeSilent=TRUE; Hence, silent mutations do not need to be subsetted in Question 2)
d <- merge_mafs(lapply(Sys.glob("mafs/Patient*.maf"), read.maf))
# Load sample information
c <- read.table(file="sample-information.tsv", sep="\t", header=T)
# Combine MAF and sample info
d <- read.maf(maf=d, clinicalData=c)回溯:
-Reading错误在file.info(文件)中:无效的文件名参数
# Clinical enrichment
response.ce = clinicalEnrichment(maf=d, clinicalFeature="Response")
[.data.table中的错误(getClinicalData(x= maf)、c("Tumor_Sample_Barcode“)、:列(S)未找到:响应)
数据集:https://drive.google.com/file/d/1pX78BUsh__VIVg4tJNChCA5b8h4tkjj-/view
发布于 2022-03-12 23:17:36
也许先尝试读取示例信息,然后每次在单个maf文件中(即在lapply中)读取时,将clinicalData参数表示为sample_info。如下所示:
# Get the sample information
sample_info = read.table(file="sample-information.tsv", sep="\t", header=T)
# lapply over all the maf file, each indicating clinicalData=sample_info
d = merge_mafs(lapply(dir("mafs/",full.names = T), read.maf, verbose=F, clinicalData=sample_info))
# Get the response.ce
response.ce = clinicalEnrichment(maf = d,clinicalFeature = "Response")https://stackoverflow.com/questions/71453169
复制相似问题