我正在尝试从RNAseq结果摘要文件中提取几个基因集的数据:

示例基因列表:

我正在使用Excel首先突出显示重复的基因,对摘要文件进行排序,然后复制所需的数据。这是耗时的,Excel在排序时总是“冻结”,特别是对于大的基因列表。
我想知道R能不能做得更好。如果R可以是一个更好的解决方案,有人能提供代码吗?
发布于 2020-06-13 01:17:10
我想我得到了解决方案,尽管我仍然需要逐个处理这些列表。无论如何,它比Excel更快。:)
# read the RNAseq result summary file
result <- read_excel("RNAseq_Result.xlsx")
# read the gene lists file
geneset <- read_excel("Gene set list.xlsx")
# read one specific list from the gene lists file
ListA <- geneset$ListA
#subsetting
ResultListA <- result[(result$Gene_name) %in% ListA, ]
#output file
write.csv(ResultListA, 'ResultListA.csv')https://stackoverflow.com/questions/62333872
复制相似问题