输入与数据准备
时长: 5 分钟
字数: 1.1k 字
更新: 2026-10-13
阅读: 0 次
必需的输入文件
SeekSoul Methyl Tools 接受每个样本的转录组和甲基化双端 FASTQ 文件:
- 转录组 Read1 FASTQ
- 转录组 Read2 FASTQ
- 甲基化 Read1 FASTQ
- 甲基化 Read2 FASTQ
如果一个样本包含多个测序数据集,请以相同的顺序列出它们。在 Shell 模式下,使用逗号分隔文件路径。在 Nextflow 模式下,在 samplesheet 中为每个数据集提供一行。
Shell 输入参数
Shell 封装脚本 sc_methy_workflow.sh 使用以下参数:
$1:转录组 Read1 FASTQ 路径$2:转录组 Read2 FASTQ 路径$3:甲基化 Read1 FASTQ 路径$4:甲基化 Read2 FASTQ 路径--sample:样本名称--outdir:输出目录--database_dir:参考基因组数据库目录--chemistry:DD-MET3或DD-MET5(默认值:DD-MET5)--core:CPU 核心数--filter_ch:移除包含超过n个 CH 甲基化位点的 reads;设置为0可禁用
样本命名规则
从 v2.0.0 开始,对 sample_id 和 outdir 进行更严格的验证:
- 不允许使用空格
- 类似空格的分隔符应规范为下划线
- 保持转录组和甲基化输入的样本名称一致
Nextflow Samplesheet 格式
必需的表头是:
text
sample_id,expression_r1,expression_r2,methylation_r1,methylation_r2单个数据集的示例:
text
sample_id,expression_r1,expression_r2,methylation_r1,methylation_r2
XYRD-WTJW880,/path/to/XYRD-WTJW880-E_S1_L005_R1_001.fastq.gz,/path/to/XYRD-WTJW880-E_S1_L005_R2_001.fastq.gz,/path/to/XYRD-WTJW880-MET_S01_L001_R1_001.fastq.gz,/path/to/XYRD-WTJW880-MET_S01_L001_R2_001.fastq.gz转录组和甲基化 FASTQ 数量不相等时的示例:
text
sample_id,expression_r1,expression_r2,methylation_r1,methylation_r2
WTJW969,/path/to/WTJW969_E_L003_R1.fq.gz,/path/to/WTJW969_E_L003_R2.fq.gz,/path/to/WTJW969_Met_L000_R1.fq.gz,/path/to/WTJW969_Met_L000_R2.fq.gz
WTJW969,/path/to/WTJW969_E_L004_R1.fq.gz,/path/to/WTJW969_E_L004_R2.fq.gz,/path/to/WTJW969_Met_L001_R1.fq.gz,/path/to/WTJW969_Met_L001_R2.fq.gz
WTJW969,,,/path/to/WTJW969_Met_L002_R1.fq.gz,/path/to/WTJW969_Met_L002_R2.fq.gz
WTJW969,,,/path/to/WTJW969_Met_L003_R1.fq.gz,/path/to/WTJW969_Met_L003_R2.fq.gz
WTJW969,,,/path/to/WTJW969_Met_L004_R1.fq.gz,/path/to/WTJW969_Met_L004_R2.fq.gzNextflow 运行参数
Nextflow 流程(nf/main.nf)使用以下关键参数:
--samplesheet:输入样本表文件--database_dir:参考基因组数据库目录--split_fastq:根据 barcode 前n个碱基拆分 FASTQ,以加速分析(默认值:4)--filter_ch:过滤包含超过n个 CH 甲基化位点的 reads(默认值:2)--expected_cell_num:仅甲基化工作流(methy_only)细胞估计使用的预期细胞数(默认值:3000)--chemistry:DD-MET3或DD-MET5(默认值:DD-MET5)
执行环境通过 -profile 选择:
-profile docker:使用公共容器镜像ghcr.io/seekgene/seeksoulmethyl_docker:v1.0.0-profile aliyun_k8s和-profile aliyun_k8s_argo:使用内部镜像seekgene-registry-vpc.cn-beijing.cr.aliyuncs.com/seekgene/seeksoulmethyl:1.1.2
参考数据库要求
--database_dir 目录应包含:
text
<database_dir>/
|-- bed/
| |-- chr_len.bed
| `-- chr_nochrM.bed
|-- fasta/
| |-- genome.fa
| |-- genome.fa.fai
| `-- Bisulfite_Genome/
|-- genes/
| `-- genes.gtf
`-- star/流程使用的路径约定:
star/:STAR 基因组索引fasta/genome.fa:基因组 FASTAfasta/:运行bismark_genome_preparation后的 Bismark 基因组文件夹genes/genes.gtf:基因注释bed/chr_len.bed:染色体大小bed/chr_nochrM.bed:推荐的不包含线粒体序列的染色体列表
详细的构建步骤请参阅:
代码仓库结构
克隆后,主要流程组件为:
nf/main.nf:顶层入口。通过--workflow选择子工作流(rna_met、methy_only、force_cell)。nf/subworkflows/:工作流定义:rna_met/main.nf:转录组 + 甲基化端到端处理。met_only/main.nf:仅甲基化工作流。forcecell/main.nf:Force-cell 工作流(使用先前输出重新计算/更新结果)。
nf/modules/:分步处理模块:step1.nf:预处理、质控、barcode 提取、转录组分析。step2.nf:Bismark 比对和 BAM 排序。step3.nf:按细胞拆分 BAM、ALLC 生成/合并、多尺度数据集。step4.nf:汇总统计、降维、联合报告。utils.nf:仅甲基化工作流的辅助工具(reads 计数和细胞估算)。
nf/bin/:辅助脚本和资源文件(如 barcode 白名单)。nf/nextflow.config:执行器和资源配置。nf/nextflow_schema.json:流程参数 schema。sc_methy_workflow.sh:运行双组学分析流程的 Shell 脚本。
