tool-banner
工具目录
ABiView
ABiView
2026-03-31
立即尝试

ABiView

1 简介

ABiView 是一款基于 Sanger 测序数据的可视化分析工具,专为抗体 ABi 测序文件的批量解析、质量评估与可视化打造,核心解决抗体测序数据的高效解读与问题定位需求。一键导入多个抗体 ABi 测序文件,自动提取每个文件的核心序列,并生成可交互的测序峰图,支持基础交互操作。一键运行抗体 ABi 测序文件的质量分析,输出标准化分析结果。一键导出抗体 ABi 测序文件的序列或异常分析汇总表。

2 参数说明

  • File:一键导入多个抗体 ABi 测序文件,支持100个文件以内的批量输入。
  • Run Analysis:运行抗体 ABi 测序文件的质量分析。
    • Primer:引物序列,默认 GGTGCAGCTGGTGCAGTCTGG。
    • Region: 质量分析区域,默认 100 bp - 800 bp。
  • Export:一键导出抗体 ABi 测序文件的序列或异常分析汇总表。

3 结果说明

  • 可交互的测序峰图
    一个ABi文件对应一个测序峰图,包含了ATCG的荧光曲线和测序质量,峰图有拖动、动态显示荧光强度等交互效果。
    • Search:输入搜索序列片段。
    • Peak height: 设置峰高。
    • Peak width: 设置峰宽。
可交互的测序峰图

Figure 1. 可交互的测序峰图

  • 质量分析结果汇总表

    Field Description 中文描述
    file_name Name of the input ABI sequencing file ABi文件名
    seq DNA nucleotide sequence extracted from the ABI file ABi 文件中提取到的 DNA 序列
    seq_len Total number of base pairs in the extracted DNA sequence DNA 序列的长度
    evaluation Evaluation result. Marked as 'abnormal' if there is an exception. 评估结果。若为异常,标注为abnormal
    low_quality Whether the quality is low. If True, it indicates that the sequencing quality of the sequence is low (whether the detection region is below the low-quality threshold or below the average quality score multiplied by the low-quality factor). 是否质量低。若为True,说明该序列测序质量低(检测区域是否低于低质量阈值或低于平均质量分数乘以低质量因子)。
    interruption Whether it is interrupted in advance. If True, it indicates that the sequence is interrupted in advance (whether the sequence length is less than the region end). 是否提前中断。若为True,说明该序列提前中断(序列长度是否小于 region end)。
    abnormal_region_count Total count of abnormal regions. Abnormalities include stacking peaks, decay, no signal, high GC content, consecutive identical bases, bubbles, and dispersion. 异常区域的总计数。异常包括套峰、衰减、无信号、GC含量高、连续相同碱基、气泡、弥散。
    stacking Number of regions with stacking peaks. 存在套峰的区域数量。
    decay Number of regions with decay. 存在衰减的区域数量。
    no_signal Number of regions with no signal. 存在无信号的区域数量。
    GC_high Number of regions with high GC content. 存在GC含量高的区域数量。
    consecutive_base Number of regions with consecutive identical bases. 存在连续相同碱基的区域数量。
    bubble Number of regions with bubbles. 存在气泡的区域数量。
    disperse Number of regions with dispersion. 存在弥散的区域数量。
  • 详细表说明(Detailed Table Description)
    详细表包含了异常区域的总计数。异常包括套峰、衰减、无信号、GC含量高、连续相同碱基、气泡、弥散。(The detailed table includes the total count of abnormal regions. Abnormalities include stacking peaks, decay, no signal, high GC content, consecutive identical bases, bubbles, and dispersion.)

    Field Description 中文描述
    region Detection region 检测区域
    stacking Whether there are stacking peaks in the detection region. 该检测区域是否存在套峰。
    decay Whether there is decay in the detection region. 该检测区域是否存在衰减。
    no_signal Whether there is no signal in the detection region. 该检测区域是否存在无信号。
    GC_high Whether there is high GC content in the detection region. 该检测区域是否存在GC含量高。
    consecutive_base Whether there are consecutive identical bases in the detection region. 该检测区域是否存在连续相同碱基。
    bubble Whether there are bubbles in the detection region. 该检测区域是否存在气泡。
    disperse Whether there is dispersion in the detection region. 该检测区域是否存在弥散。

4 异常的计算和定义


异常检测流程图

异常检测流程图

Figure 2. 异常检测流程图


低质量区域

计算低质量标志, 找到所有连续低质量区间。

  • 对于每个碱基质量分数,计算其是否低于低质量阈值或低于平均质量分数乘以低质量因子:

    \text{low\_quality\_flags} = [ \text{score} < \text{low\_quality\_threshold} \text{ or } \text{score} < \text{mean\_quality} \times \text{low\_quality\_factor}


stacking(套峰检测)

判断该区间内是否出现套峰。在进行套峰判定时,首先需要对信号进行排序,计算主峰和次峰的信号强度及其占比,然后根据峰宽进行进一步的判定。

  1. 信号排序
  • 对信号进行降序排序,获取主峰和次峰的碱基及其信号强度:

(\text{main\_peak\_base}, \text{main\_peak\_sig}), (\text{sub\_peak\_base}, \text{sub\_peak\_sig}) = \text{sorted\_sigs}[0], \text{sorted\_sigs}[1]

  1. 计算占比
  • 计算主峰和次峰的信号占比:

\text{main\_peak\_ratio} = \frac{\text{main\_peak\_sig}}{\text{total\_signal}}, \quad \text{sub\_peak\_ratio} = \frac{\text{sub\_peak\_sig}}{\text{total\_signal}}

  1. 峰形检测
  • 计算主峰的峰宽:

\text{peak\_width} = \text{calculate\_peak\_width}(\text{intensity\_data}[\text{main\_peak\_base}], \text{pos})

  1. 套峰判定
  • 先过滤次峰绝对信号/占比不达标情况:

\text{if } \text{sub\_peak\_sig} < \text{sub\_peak\_min\_abs} \text{ or } \text{sub\_peak\_ratio} < \text{sub\_peak\_min\_ratio}

  • 优先使用全局平均峰宽,不足则用局部均值:

\text{if } \text{global\_avg\_width} > 0 \text{ then } \text{avg\_width} = \text{global\_avg\_width}

  • 否则,累计检测范围的局部峰宽:

\text{if } \text{local\_width\_count} \geq 5 \text{ then } \text{avg\_width} = \frac{\text{local\_avg\_width}}{\text{local\_width\_count}}

  • 峰宽校验(区分单峰拖尾和套峰):

\text{if } \text{peak\_width} < \text{avg\_width} \times \text{peak\_width\_threshold} \text{ then } \text{reason} = \text{"单峰拖尾"}

  • 否则,判定为套峰:

\text{is\_overlay} = \text{True}, \quad \text{reason} = \text{"套峰,"} + \text{width\_source} + \text{"基准"}


no_signal(无信号):

判断该区间内信号是否不明显。在进行无信号判定时,需要检查总信号是否低于设定的最小阈值,或者是否存在明显的主峰。

  • 如果总信号小于最小阈值,则直接判定为无信号;否则排序信号找主峰,计算主峰的信号占比:

(\text{main\_peak\_base}, \text{main\_peak\_sig}) = \text{sorted\_sigs}[0]

\text{main\_peak\_ratio} = \frac{\text{main\_peak\_sig}}{\text{total\_signal}}

  • 如果主峰占比小于最小占比阈值或主峰信号小于最小绝对阈值,,判定为无信号:

\text{if } \text{main\_peak\_ratio} < \text{main\_peak\_min\_ratio} \text{ or } \text{main\_peak\_sig} < \text{main\_peak\_min\_abs} \text{ then } \text{is\_no\_signal} = \text{True}


decay(衰减)

判断每个位置的主荧光信号强度是否逐渐降低。在进行衰减检测时,需要分析指定区域内的主峰信号值,并进行线性拟合以判断是否存在显著的衰减。

  • 遍历指定区域,收集主峰信号值 main_peak_signals
  • 如果主峰信号值个数小于min_decay_data(默认10),忽略该区域;否则进行线性拟合:

x = \text{np.arange(len(main\_peak\_signals))} \\ y = \frac{\text{main\_peak\_signals}}{\text{np.mean(main\_peak\_signals)}} \\ (\text{slope}, \text{intercept}, \text{r\_value}, \text{p\_value}, \text{std\_err}) = \text{stats.linregress}(x, y) \\

\text{decay} = \begin{cases} \text{True} & \text{if } \text{slope} < \text{slope\_threshold} \\ \text{False} \end{cases}


GC_high(GC含量高):

计算GC含量并判断是否高于设定的阈值(gc_threshold,默认0.9)。先计算GC比例,再判断GC含量是否高:

\text{gc\_ratio} = \begin{cases} \frac{\text{gc\_count}}{\text{region\_len}} & \text{if } \text{region\_len} > 0 \\ 0 & \text{otherwise} \end{cases}

\text{gc\_high} = \begin{cases} \text{True} & \text{if } \text{gc\_ratio} \geq \text{gc\_threshold} \\ \text{False} & \text{otherwise} \end{cases}

consecutive_base(连续多个相同碱基):

检查是否存在连续相同碱基,或同一个碱基占比大于0.9。设 consecutive_base_count 为连续相同碱基的长度阈值,region_len 为序列长度,则计算连续相同碱基的存在性:

\text{consecutive\_base} = \left( \exists i \in \{0, 1, \ldots, \text{seq\_len} - \text{max\_consecutive\_base}\}, \text{ such that } \text{seq}[i:i+\text{max\_consecutive\_base}] = \text{seq}[i]^\text{max\_consecutive\_base} \right) \vee \left( \exists \text{base} \in \{'A', 'T', 'C', 'G'\}, \frac{\text{seq.count(base)}}{\text{seq\_len}} > \text{consecutive\_base\_threshold} \right)


bubble(气泡):

判断信号值最高的位置是否出现在该区域,且主峰不明显。

  • 计算当前位置的总信号和平均的总信号:

    \text{max\_signal\_pos} = \underset{i}{\text{argmax}} \left( \text{a\_intensity}[i] + \text{c\_intensity}[i] + \text{g\_intensity}[i] + \text{t\_intensity}[i] \right)

    \text{total\_peak\_signals}_i = \text{a\_intensity}[i] + \text{c\_intensity}[i] + \text{g\_intensity}[i] + \text{t\_intensity}[i]

    \text{mean\_total\_peak\_signals} = \frac{1}{n} \sum_{i=1}^{n} \text{total\_peak\_signals}_i

  • 气泡判定:当前位置的总信号突增(≥平均的总信号的2倍)且信号分散(当前位置的前2名信号占比之和<60%,即无明显主峰):

    \text{bubble} = \begin{cases} \text{True} & \text{if } \text{total\_peak\_signals}_i > 2 \times \text{mean\_total\_peak\_signals} \text{ and } \frac{\text{signals}[0] + \text{signals}[1]}{\text{total\_peak\_signals}_i} < 0.6 \\ \text{False} & \text{otherwise} \end{cases}


disperse(弥散)

单个碱基的信号在多个连续的碱基位置上被检测到,从而导致峰形变宽。总信号足够且信号分散的前提下,出现单碱基在连续位置或相邻位置有显著占比,则判别为弥散。

  • 主峰碱基占比:

\text{Main peak base proportion}_i = \frac{\text{main\_peak\_base\_signal\_intensity}_i}{\text{total\_signal}_i}

  • 跨位置占比(某碱基在前后2个位置均有显著占比)。对于当前碱基位置 ( i ) 和相邻位置 j ( j = i ± 1, i ± 2 ),跨位置占比的判断条件为::

\text{Cross-position proportion condition} = \left( \frac{\text{base\_signal\_intensity}_i}{\text{total\_signal}_i} > \text{threshold} \right) \land \left( \frac{\text{base\_signal\_intensity}_j}{\text{total\_signal}_j} > \text{threshold} \right)

  • 设disp_candidates是满足弥散条件的碱基位置列表,提取连续弥散区域的公式为:

\text{Continuous disperse region} = \left\{ (s, e) \mid s, e \in \text{disp\_candidates}, e - s + 1 \geq \text{min\_continuous} \right\}