WGBS chr1 10% 验证记录

WGBS chr1 10% 流程验证记录

完成日期:2026-11-26。原始全量 FastQC 复用既有结果;未运行全量比对;IGV 图形界面仍需人工操作。

本次实测 · 2026-11-26

样本 完整原始 reads 约 10% 抽样 reads 实际抽样比例 学生 chr1 原始 reads
Col-0 158,882,865 15,891,486 10.002014% 2,930,975
met1 282,849,630 28,282,453 9.999113% 4,769,170
展开教师准备:随机抽样、chr1 筛选、耗时和可复现记录

使用 seqtk 1.4-r122 的概率抽样,-s20261126 固定随机种子,0.1 为保留概率,不是要求恰好保留固定 N 条。相同输入顺序、软件版本和种子可复现抽样 read 集合;原始文件、抽样文件和学生 FASTQ 的 SHA256 分别记录。

实际执行的解压—抽样—压缩流水线如下;FULL_FASTQ 替换为相应完整输入路径,SUBSET_FASTQ 指向教师抽样输出。三个子进程退出码均为 0。

pigz -d -c -p 2 "$FULL_FASTQ" \
  | seqtk sample -s20261126 - 0.1 \
  | pigz -p 2 -c > "$SUBSET_FASTQ"

初次 trimming 后用 bismark -p 4 --parallel 2 对 chr1 比对。在去重之前选 primary mapped chr1 记录,保留重复情况让学生自行去重。参考序列名是 1:

samtools sort -o source.sorted.bam source.bam
samtools index source.sorted.bam
samtools view -b -F 2308 source.sorted.bam 1 > chr1.selected.bam
samtools fastq -n -0 selected.trimmed.fq.gz \
  -1 /dev/null -2 /dev/null -s /dev/null chr1.selected.bam

-F 2308 排除 unmapped、secondary 和 supplementary,未排除 duplicate。samtools fastq 会恢复 read 的原始方向,但输出的仍是已修剪序列,不能直接交给学生再次裁剪。本次使用 prepare_classroom_reads.py 按这些 QNAME,从未修剪的 10% FASTQ 回取原始序列和质量,按所选 read 顺序写成学生文件,并逐条复核重新 trimming 的结果。

样本 随机抽样耗时 10% 初次 chr1 比对 学生 chr1 回贴 按本次速度外推全量 chr1 比对
Col-0 1.89 分钟 5.48 分钟 3.78 分钟 约 55 分钟
met1 4.32 分钟 8.95 分钟 5.99 分钟 约 89 分钟

外推只把相同 chr1 索引、参数和本机负载下的首次比对时间乘以约 10,不是全基因组比对的实测耗时;也不含预处理和下游分析。两次比对使用的线程参数不同,不能把耗时比简单解释为 reads 数量比。本次未运行全量比对。

抽样与完整命令记录 · 抽样 Col-0 元数据 · 抽样 met1 元数据

Col-0 original SHA256: 9725c568f9ce2f210989b1240d9e5eada967175b7f8e64d3984f873f6d7bd21d
10% FASTQ SHA256: 1ab75fd067e175a864d8c153b1ee274c58f08d9101a2961e004eadf05e070665
student raw FASTQ SHA256: f6bdb4ad316a97fa2dbe8ef7e50964d05e49459b67b18713630d684abc40da69
met1 original SHA256: 0013ba36a0997e9052d45b0bc1cd043907f42234e3d27ebb4c702e92e33c497d
10% FASTQ SHA256: 8f5f218b142684124c229417aee317680329f7bfe13a289d6e546bd2d4aa8fa8
student raw FASTQ SHA256: f66968d0efbf94c1e181d10147f6f5f8b57c38bdee2f5b182205a432446f7e35
样本 课堂输入 唯一最佳匹配 回贴率 课堂回贴耗时 初次 10%→chr1 比对率
Col-0 2,930,975 2,930,975 100.00% 3.78 分钟 18.8%
met1 4,769,170 4,769,170 100.00% 5.99 分钟 17.4%
初次比对的分母是 10% 子集修剪后的全部 reads,课堂回贴的分母是已筛出的 chr1 reads,这两列回答不同问题。
展开两个样本的 Bismark 最终报告
Bismark report for: /home/sqc/tutil/wgbs_chr1_10pct_validation_20261126/03_trimmed/SRR534177_colWT.chr1_trimmed.fq.gz (version: v0.25.1)
Option '--directional' specified (default mode): alignments to complementary strands (CTOT, CTOB) were ignored (i.e. not performed)
Bismark was run with Bowtie 2 against the bisulfite genome of /home/sqc/tutil/wgbs_chr1_10pct_validation_20261126/04_bismark_index/Arabidopsis_thaliana_TAIR10_chr1/ with the specified options: -q --score-min L,0,-0.2 -p 2 --reorder --ignore-quals

Final Alignment report
======================
Sequences analysed in total:    2930975
Number of alignments with a unique best hit from the different alignments:  2930975
Mapping efficiency: 100.0%
Sequences with no alignments under any condition:   0
Sequences did not map uniquely: 0
Sequences which were discarded because genomic sequence could not be extracted: 0

Number of sequences with unique best (first) alignment came from the bowtie output:
CT/CT:  1508817 ((converted) top strand)
CT/GA:  1422158 ((converted) bottom strand)
GA/CT:  0   (complementary to (converted) top strand)
GA/GA:  0   (complementary to (converted) bottom strand)

Number of alignments to (merely theoretical) complementary strands being rejected in total: 0

Final Cytosine Methylation Report
=================================
Total number of C's analysed:   16202275

Total methylated C's in CpG context:    1350204
Total methylated C's in CHG context:    579948
Total methylated C's in CHH context:    877688
Total methylated C's in Unknown context:    80

Total unmethylated C's in CpG context:  1892393
Total unmethylated C's in CHG context:  2346556
Total unmethylated C's in CHH context:  9155486
Total unmethylated C's in Unknown context:  347

Bismark report for: /home/sqc/tutil/wgbs_chr1_10pct_validation_20261126/03_trimmed/SRR534239_met1.chr1_trimmed.fq.gz (version: v0.25.1)
Option '--directional' specified (default mode): alignments to complementary strands (CTOT, CTOB) were ignored (i.e. not performed)
Bismark was run with Bowtie 2 against the bisulfite genome of /home/sqc/tutil/wgbs_chr1_10pct_validation_20261126/04_bismark_index/Arabidopsis_thaliana_TAIR10_chr1/ with the specified options: -q --score-min L,0,-0.2 -p 2 --reorder --ignore-quals

Final Alignment report
======================
Sequences analysed in total:    4769170
Number of alignments with a unique best hit from the different alignments:  4769170
Mapping efficiency: 100.0%
Sequences with no alignments under any condition:   0
Sequences did not map uniquely: 0
Sequences which were discarded because genomic sequence could not be extracted: 0

Number of sequences with unique best (first) alignment came from the bowtie output:
CT/CT:  2419578 ((converted) top strand)
CT/GA:  2349592 ((converted) bottom strand)
GA/CT:  0   (complementary to (converted) top strand)
GA/GA:  0   (complementary to (converted) bottom strand)

Number of alignments to (merely theoretical) complementary strands being rejected in total: 0

Final Cytosine Methylation Report
=================================
Total number of C's analysed:   29593623

Total methylated C's in CpG context:    44848
Total methylated C's in CHG context:    507458
Total methylated C's in CHH context:    673175
Total methylated C's in Unknown context:    80

Total unmethylated C's in CpG context:  5076858
Total unmethylated C's in CHG context:  4565711
Total unmethylated C's in CHH context:  18725573
Total unmethylated C's in Unknown context:  898
样本 去重前 删除重复 删除比例 去重后 chr1 覆盖率 平均深度
Col-0 2,930,975 545,112 18.60% 2,385,863 82.1370% 2.994670×
met1 4,769,170 713,445 14.96% 4,055,725 92.2281% 5.149660×
这些结果来自本次 10% 抽样流程,替换了旧课堂示例的 63,820 reads 和 0.14× 等数值。不同输入不能要求复现历史示例的读数。
展开 quickcheck、计数、flagstat 和 coverage 的真实输出
2930975
2385863 + 0 in total (QC-passed reads + QC-failed reads)
2385863 + 0 primary
0 + 0 secondary
0 + 0 supplementary
0 + 0 duplicates
0 + 0 primary duplicates
2385863 + 0 mapped (100.00% : N/A)
2385863 + 0 primary mapped (100.00% : N/A)
0 + 0 paired in sequencing
0 + 0 read1
0 + 0 read2
0 + 0 properly paired (N/A : N/A)
0 + 0 with itself and mate mapped
0 + 0 singletons (N/A : N/A)
0 + 0 with mate mapped to a different chr
0 + 0 with mate mapped to a different chr (mapQ>=5)
#rname  startpos    endpos  numreads    covbases    coverage    meandepth   meanbaseq   meanmapq
1   1   30427671    2385863 24992376    82.137  2.99467 38  36.4
4769170
4055725 + 0 in total (QC-passed reads + QC-failed reads)
4055725 + 0 primary
0 + 0 secondary
0 + 0 supplementary
0 + 0 duplicates
0 + 0 primary duplicates
4055725 + 0 mapped (100.00% : N/A)
4055725 + 0 primary mapped (100.00% : N/A)
0 + 0 paired in sequencing
0 + 0 read1
0 + 0 read2
0 + 0 properly paired (N/A : N/A)
0 + 0 with itself and mate mapped
0 + 0 singletons (N/A : N/A)
0 + 0 with mate mapped to a different chr
0 + 0 with mate mapped to a different chr (mapQ>=5)
#rname  startpos    endpos  numreads    covbases    coverage    meandepth   meanbaseq   meanmapq
1   1   30427671    4055725 28062867    92.2281 5.14966 37  36.2

本次实测:各 context 内的甲基化率,分母为 m+u

样本 context m 调用 u 调用 m/(m+u)
Col-0 CG 896,120 1,610,642 35.748%
Col-0 CHG 378,748 1,999,579 15.925%
Col-0 CHH 630,459 7,701,473 7.567%
met1 CG 24,875 4,202,102 0.588%
met1 CHG 348,595 3,980,407 8.053%
met1 CHH 443,933 16,191,079 2.669%
已完整扫描全部 context 压缩文件,三类 m/u 总数与 splitting report 一致,也与 M-bias 各位置的计数和一致。met1 的 CG 比例明显较低;这是本次子集中的描述,不是具有生物学重复的显著性检验。
展开真实调用、M-bias 文件头及提取结果清单
total 615M
-rw-rw-r-- 1 sqc sqc  10M Nov 26 02:14 CHG_OB_SRR534177_colWT.chr1_trimmed_bismark_bt2.deduplicated.sorted.txt.gz
-rw-rw-r-- 1 sqc sqc  18M Nov 26 02:19 CHG_OB_SRR534239_met1.chr1_trimmed_bismark_bt2.deduplicated.sorted.txt.gz
-rw-rw-r-- 1 sqc sqc 9.9M Nov 26 02:14 CHG_OT_SRR534177_colWT.chr1_trimmed_bismark_bt2.deduplicated.sorted.txt.gz
-rw-rw-r-- 1 sqc sqc  18M Nov 26 02:19 CHG_OT_SRR534239_met1.chr1_trimmed_bismark_bt2.deduplicated.sorted.txt.gz
-rw-rw-r-- 1 sqc sqc  25M Nov 26 02:14 CHH_OB_SRR534177_colWT.chr1_trimmed_bismark_bt2.deduplicated.sorted.txt.gz
-rw-rw-r-- 1 sqc sqc  47M Nov 26 02:19 CHH_OB_SRR534239_met1.chr1_trimmed_bismark_bt2.deduplicated.sorted.txt.gz
-rw-rw-r-- 1 sqc sqc  24M Nov 26 02:14 CHH_OT_SRR534177_colWT.chr1_trimmed_bismark_bt2.deduplicated.sorted.txt.gz
-rw-rw-r-- 1 sqc sqc  45M Nov 26 02:19 CHH_OT_SRR534239_met1.chr1_trimmed_bismark_bt2.deduplicated.sorted.txt.gz
-rw-rw-r-- 1 sqc sqc  11M Nov 26 02:14 CpG_OB_SRR534177_colWT.chr1_trimmed_bismark_bt2.deduplicated.sorted.txt.gz
-rw-rw-r-- 1 sqc sqc  17M Nov 26 02:19 CpG_OB_SRR534239_met1.chr1_trimmed_bismark_bt2.deduplicated.sorted.txt.gz
-rw-rw-r-- 1 sqc sqc  10M Nov 26 02:14 CpG_OT_SRR534177_colWT.chr1_trimmed_bismark_bt2.deduplicated.sorted.txt.gz
-rw-rw-r-- 1 sqc sqc  17M Nov 26 02:19 CpG_OT_SRR534239_met1.chr1_trimmed_bismark_bt2.deduplicated.sorted.txt.gz
-rw-rw-r-- 1 sqc sqc 3.5K Nov 26 02:14 SRR534177_colWT.chr1_trimmed_bismark_bt2.deduplicated.sorted.M-bias.txt
-rw-rw-r-- 1 sqc sqc 4.3M Nov 26 02:14 SRR534177_colWT.chr1_trimmed_bismark_bt2.deduplicated.sorted.bedGraph.gz
-rw-rw-r-- 1 sqc sqc 4.4M Nov 26 02:14 SRR534177_colWT.chr1_trimmed_bismark_bt2.deduplicated.sorted.bismark.cov.gz
-rw-rw-r-- 1 sqc sqc  833 Nov 26 02:14 SRR534177_colWT.chr1_trimmed_bismark_bt2.deduplicated.sorted_splitting_report.txt
-rw-rw-r-- 1 sqc sqc  23M Nov 26 02:19 SRR534177_colWT_CHG.meth.bedGraph
-rw-rw-r-- 1 sqc sqc  94M Nov 26 02:19 SRR534177_colWT_CHH.meth.bedGraph
-rw-rw-r-- 1 sqc sqc  22M Nov 26 02:19 SRR534177_colWT_CpG.meth.bedGraph
-rw-rw-r-- 1 sqc sqc 3.4K Nov 26 02:19 SRR534239_met1.chr1_trimmed_bismark_bt2.deduplicated.sorted.M-bias.txt
-rw-rw-r-- 1 sqc sqc 5.4M Nov 26 02:19 SRR534239_met1.chr1_trimmed_bismark_bt2.deduplicated.sorted.bedGraph.gz
-rw-rw-r-- 1 sqc sqc 5.9M Nov 26 02:19 SRR534239_met1.chr1_trimmed_bismark_bt2.deduplicated.sorted.bismark.cov.gz
-rw-rw-r-- 1 sqc sqc  830 Nov 26 02:19 SRR534239_met1.chr1_trimmed_bismark_bt2.deduplicated.sorted_splitting_report.txt
-rw-rw-r-- 1 sqc sqc  33M Nov 26 02:19 SRR534239_met1_CHG.meth.bedGraph
-rw-rw-r-- 1 sqc sqc 149M Nov 26 02:19 SRR534239_met1_CHH.meth.bedGraph
-rw-rw-r-- 1 sqc sqc  30M Nov 26 02:19 SRR534239_met1_CpG.meth.bedGraph
Bismark methylation extractor version v0.25.1
SN603_WA034:3:2308:173.90:14803.50  +   1   109 Z
SN603_WA034:3:2308:173.90:14803.50  +   1   115 Z
SN603_WA034:3:2208:1046.20:13523.10 +   1   161 Z
SN603_WA034:3:1204:1559.00:2149.20  +   1   161 Z
SN603_WA034:3:2105:1085.30:8992.10  +   1   161 Z
CpG context
===========
position    count methylated    count unmethylated  % methylation   coverage
1   36541   36380   50.11   72921
2   24976   42329   37.11   67305
3   24325   43022   36.12   67347
4   26772   44322   37.66   71094
5   27978   43117   39.35   71095
6   24423   39435   38.25   63858
7   22754   38823   36.95   61577
8   22189   39189   36.15   61378
9   22386   38971   36.48   61357
track type="bedGraph" description="/home/sqc/tutil/wgbs_chr1_10pct_validation_20261126/06_methylation/SRR534177_colWT CpG methylation fractions"
1   108 109 1.000000
1   109 110 1.000000
1   114 115 1.000000
1   115 116 1.000000
1   160 161 1.000000

完整逐步讲解、图和折叠结果见主教程。