You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何识别并排除minfi中getQC质量检查不合格的EPIC芯片样本?

标记并排除MethylSet中的低质量样本

步骤1:确定要排除的样本

从plotQC(qc)的可视化结果中,记录下需要排除的样本名称(或它们在样本列表中的位置索引)。

步骤2:更新表型数据的排除标记

在你的targets数据框中,将目标样本的exclude列设为TRUE:

# 示例:通过样本名称匹配标记
exclude_samples <- c("SampleID_1", "SampleID_2", "SampleID_3", "SampleID_4", "SampleID_5")
targets$exclude[targets$Sample_Name %in% exclude_samples] <- TRUE

# 或者通过样本索引标记(假设要排除第3、5、7、9、11位的样本)
# targets$exclude[c(3,5,7,9,11)] <- TRUE

步骤3:过滤MethylSet对象

利用targets中的exclude标记,对methylset进行子集筛选,保留未标记为排除的样本:

# 过滤MethylSet,只保留exclude为FALSE的样本
methylset_filtered <- methylset[, !targets$exclude]

步骤4:同步过滤表型数据

同步更新targets,得到过滤后的表型信息:

targets_filtered <- targets[!targets$exclude, ]

验证样本一致性

可以通过以下代码确认过滤后的MethylSet和表型数据的样本顺序/名称完全匹配:

all(sampleNames(methylset_filtered) == targets_filtered$Basename)

内容的提问来源于stack exchange,提问作者cewim

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.12 14:00:01