跳转至

Manta — 快速准确的结构变异与大Indel检测工具


一句话说明

Manta(v1.6.0)能从短读测序数据中检测所有类型的结构变异(SV)——缺失、重复、倒位、易位等,就像用"拼图对比法"找出基因组里的大规模重排,速度极快(40x WGS仅需20分钟)。


安装与配置

# 方法1:conda安装(推荐)
conda create -n manta python=3.6   # Manta需要Python 3.6
conda activate manta
conda install -c bioconda manta    # 安装最新版manta(v1.6.0)

# 验证安装
configManta.py --help   # 查看配置脚本帮助

# 方法2:下载预编译二进制包
wget https://github.com/Illumina/manta/releases/download/v1.6.0/manta-1.6.0.centos6_x86_64.tar.bz2
tar xjf manta-1.6.0.centos6_x86_64.tar.bz2
cd manta-1.6.0.centos6_x86_64/bin
./configManta.py --help  # 验证

# 方法3:Docker运行
docker pull rmattila/manta:1.6.0

核心用法

模式一:胚系SV检测(单样本/多样本)

# 配置胚系分析流程
configManta.py \
    --bam sample.bam \              # 输入BAM(可多次--bam添加多个样本)
    --referenceFasta reference.fasta \  # 参考基因组
    --runDir manta_germline         # 输出目录

# 运行流程
manta_germline/runWorkflow.py \
    -m local \                      # 本地运行
    -j 20                           # 20个线程

模式二:体细胞SV检测(肿瘤-正常配对)

# 配置体细胞分析(肿瘤+正常样本)
configManta.py \
    --normalBam normal.bam \        # 正常样本BAM
    --tumorBam tumor.bam \          # 肿瘤样本BAM
    --referenceFasta reference.fasta \
    --runDir manta_somatic          # 输出目录

# 运行
manta_somatic/runWorkflow.py -m local -j 20

模式三:仅肿瘤(无配对正常样本)

configManta.py \
    --tumorBam tumor.bam \          # 仅提供肿瘤BAM
    --referenceFasta reference.fasta \
    --runDir manta_tumor_only

manta_tumor_only/runWorkflow.py -m local -j 20

参数详解

参数说明示例值
--bam胚系分析BAM文件(可多个)sample.bam
--normalBam体细胞分析正常样本BAMnormal.bam
--tumorBam体细胞分析肿瘤样本BAMtumor.bam
--referenceFasta参考基因组(需.fai索引)hg38.fasta
--callRegions限定分析区域BED文件(需bgzip+tabix)targets.bed.gz
--exome外显子组模式(WES数据必须设置)无值,flag参数
--rnaRNA-seq模式检测融合基因无值,flag参数
--runDir输出工作目录manta_output/
-j线程数20
-m运行模式localsgelsf

实战案例

# 完整体细胞SV检测流程(以hg38为例)

REF="hg38.fasta"
NORMAL="normal_sample.bam"
TUMOR="tumor_sample.bam"

# 1. 配置Manta体细胞流程
configManta.py \
    --normalBam $NORMAL \
    --tumorBam $TUMOR \
    --referenceFasta $REF \
    --runDir manta_sv_results

# 2. 运行SV检测(多线程加速)
manta_sv_results/runWorkflow.py -m local -j 24

# 3. 查看输出结果
ls manta_sv_results/results/variants/
# diploidSV.vcf.gz           - 胚系SV(双倍体)
# candidateSV.vcf.gz         - 所有候选SV
# candidateSmallIndels.vcf.gz - 候选小Indel(传给Strelka2)
# somaticSV.vcf.gz           - 体细胞SV(仅肿瘤模式)

# 4. 过滤PASS变异
bcftools view -f PASS \
    manta_sv_results/results/variants/somaticSV.vcf.gz \
    -o somatic_sv_pass.vcf.gz -O z

# 5. 按SV类型统计
bcftools view somatic_sv_pass.vcf.gz | grep -v "^#" \
    | awk '{print $5}' | sort | uniq -c
# 结果类似:
# 150 <DEL>    - 缺失
# 45  <DUP>    - 重复
# 23  <INV>    - 倒位
# 12  <BND>    - 断点(易位)

# 6. 提取特定类型(例如缺失)
bcftools view -i 'SVTYPE="DEL"' somatic_sv_pass.vcf.gz -o deletions.vcf.gz -O z

# 7. 将candidateSmallIndels传给Strelka2(最佳实践)
configureStrelkaSomaticWorkflow.py \
    --normalBam $NORMAL --tumorBam $TUMOR \
    --referenceFasta $REF \
    --indelCandidates manta_sv_results/results/variants/candidateSmallIndels.vcf.gz \
    --runDir strelka_somatic

常见报错与解决

报错1:configManta.py: ERROR: BAM file index is not found - 原因:BAM文件缺少.bai索引 - 解决:samtools index sample.bam

报错2:ERROR: The following BAM file appears to not be coordinate-sorted - 原因:BAM未按坐标排序 - 解决:samtools sort -o sorted.bam input.bam && samtools index sorted.bam

报错3:WES数据SV检测结果非常少 - 原因:未指定--exome参数,Manta用WGS参数过于保守 - 解决:配置时加--exome参数,同时设置--callRegions限定捕获区域


速查表

命令/文件说明
configManta.py --bam sample.bam配置胚系检测
configManta.py --normalBam N --tumorBam T配置体细胞检测
configManta.py --exomeWES数据专用参数
runWorkflow.py -m local -j N本地运行N线程
somaticSV.vcf.gz体细胞SV结果
diploidSV.vcf.gz胚系SV结果
candidateSmallIndels.vcf.gz传给Strelka2的Indel候选
SV类型:DEL/DUP/INV/BND缺失/重复/倒位/断点(易位)
检测范围:≥300bp(短读)最小可靠SV大小