首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何将MAF文件与临床数据相结合来进行临床丰富分析?

如何将MAF文件与临床数据相结合来进行临床丰富分析?
EN

Stack Overflow用户
提问于 2022-03-12 22:21:57
回答 1查看 239关注 0票数 0

我想阅读一份MAF文件列表,并将其与临床数据相结合,然后进行临床丰富分析。

代码语言:javascript
复制
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(文件)中:无效的文件名参数

代码语言:javascript
复制
# 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

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-03-12 23:17:36

也许先尝试读取示例信息,然后每次在单个maf文件中(即在lapply中)读取时,将clinicalData参数表示为sample_info。如下所示:

代码语言:javascript
复制
# 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")
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71453169

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档