生信软件25 - 三代测序数据灵敏比对工具ngmlr

1. ngmlr简介

CoNvex Gap-cost Ments for Long Reads(ngmlr)是一种长reads比对工具,可以将PacBio或Oxford Nanopore灵敏地与(大)参考基因组(比如人类参考基因组)对齐,能快速和正确地比对reads,包括那些跨越(复杂)结构变异的reads。

Ngmlr使用结构变异(SV)感知的k-mer搜索来找到reads的近似映射位置,然后使用Smith-Waterman比对算法来计算最终比对。Ngmlr使用凸间隙成本模型(convex gap cost model),该模型对较长间隙的间隙扩展的罚分小于较短间隙的间隙扩展,以计算精确的比对。

差距模型允许ngmlr同时考虑测序误差和真实的基因组变异,并使其在更精确地鉴定源于结构变异的断裂点的位置方面特别有效。k-mer搜索有助于检测和拆分不能线性比对的reads,使ngmlr能够可靠地将读段与广泛的不同结构变异(包括嵌套SV)(例如侧翼缺失的倒位)进行比对。

NGMLR和Sniffles可以自动过滤错误事件并对低覆盖率数据,从而降低了阻碍长reads在临床和研究环境中应用的高成本

参考文献:
Accurate detection of complex structural variations using single-molecule sequencing
https://www.nature.com/articles/s41592-018-0001-7

文献

2. ngmlr安装

# 下载安装包
wget https://github.com/philres/ngmlr/releases/download/v0.2.7/ngmlr-0.2.7-linux-x86_64.tar.gz

# 解压
tar xvzf ngmlr-0.2.7-linux-x86_64.tar.gz

cd ngmlr-0.2.7/


3. PacBio数据运行

三代fastq数据质控参考:三代测序PacBio&ONT reads过滤和修剪-Chooper和NanoFilt

结构变异Calling参考: 三代测序结构变异分析 - 单样本Germline SV calling和多样本SV Calling

# 数据质控
gunzip -c sample.fastq.gz | NanoFilt -q 10 -l 1000 > sample.clean.fastq

# 比对
ngmlr -t 4 -r reference.fasta \
-q sample.clean.fastq -o sample.sam
# -t: 线程数
# -r: 参考基因组fasta路径
# -q: clean fastq路径
# -o: 比对输出sam文件路径

# Sam2bam
samtools view -bS sample.sam > sample.bam

# 排序
samtools sort sample.bam -o sample.sorted.bam
samtools index sample.sorted.bam

# 查看bam
samtools view sample.sorted.bam|less -S

4. Oxford Nanopore运行

gunzip -c sample.fastq.gz | NanoFilt -q 10 -l 1000 > sample.clean.fastq

# 参数-x: 三代数据类型,默认PacBio
ngmlr -t 4 -r reference.fasta \
-q sample.clean.fastq -o test.sam -x ont


# Sam2bam
samtools view -bS sample.sam > sample.bam

# 排序
samtools sort sample.bam -o sample.sorted.bam
samtools index sample.sorted.bam

# 查看bam
samtools view sample.sorted.bam|less -S

主要参数说明

Usage: ngmlr [options] -r <reference> -q <reads> [-o <output>]

Input/Output:
    -r <file>,  --reference <file>
        (required)  Path to the reference genome (FASTA/Q, can be gzipped)
    -q <file>,  --query <file>
        Path to the read file (FASTA/Q) [/dev/stdin]
    -o <string>,  --output <string>
        Path to output file [stdout]
    --skip-write
        Don't write reference index to disk [false]
    --bam-fix
        Report reads with > 64k CIGAR operations as unmapped. Required to be compatible with the BAM format [false]
    --rg-id <string>
        Adds RG:Z:<string> to all alignments in SAM/BAM [none]
    --rg-sm <string>
        RG header: Sample [none]
    --rg-lb <string>
        RG header: Library [none]
    --rg-pl <string>
        RG header: Platform [none]
    --rg-ds <string>
        RG header: Description [none]
    --rg-dt <string>
        RG header: Date (format: YYYY-MM-DD) [none]
    --rg-pu <string>
        RG header: Platform unit [none]
    --rg-pi <string>
        RG header: Median insert size [none]
    --rg-pg <string>
        RG header: Programs [none]
    --rg-cn <string>
        RG header: sequencing center [none]
    --rg-fo <string>
        RG header: Flow order [none]
    --rg-ks <string>
        RG header: Key sequence [none]

General:
    -t <int>,  --threads <int>
        Number of threads [1]
    -x <pacbio, ont>,  --presets <pacbio, ont>
        Parameter presets for different sequencing technologies [pacbio]
    -i <0-1>,  --min-identity <0-1>
        Alignments with an identity lower than this threshold will be discarded [0.65]
    -R <int/float>,  --min-residues <int/float>
        Alignments containing less than <int> or (<float> * read length) residues will be discarded [0.25]
    --no-smallinv
        Don't detect small inversions [false]
    --no-lowqualitysplit
        Split alignments with poor quality [false]
    --verbose
        Debug output [false]
    --no-progress
        Don't print progress info while mapping [false]

生信软件文章推荐

生信软件1 - 测序下机文件比对结果可视化工具 visNano

生信软件2 - 下游比对数据的统计工具 picard

生信软件3 - mapping比对bam文件质量评估工具 qualimap

生信软件4 - 拷贝数变异CNV分析软件 WisecondorX

生信软件5 - RIdeogram包绘制染色体密度图

生信软件6 - bcftools查找指定区域的变异位点信息

生信软件7 - 多线程并行运行Linux效率工具Parallel

生信软件8 - bedtools进行窗口划分、窗口GC含量、窗口测序深度和窗口SNP统计

生信软件9 - 多公共数据库数据下载软件Kingfisher

生信软件10 - DNA/RNA/蛋白多序列比对图R包ggmsa

生信软件11 - 基于ACMG的CNV注释工具ClassifyCNV

生信软件12 - 基于Symbol和ENTREZID查询基因注释的R包(easyConvert )

生信软件13 - 基于sambamba 窗口reads计数和平均覆盖度统计

生信软件14 - bcftools提取和注释VCF文件关键信息

生信软件15 - 生信NGS数据分析强大的工具集ngs-bits

生信软件16 - 常规探针设计软件mrbait

生信软件17 - 基于fasta文件的捕获探针设计工具catch

生信软件18 - 基于docker部署Web版 Visual Studio Code

生信软件19 - vcftools高级用法技巧合辑

生信软件20 - seqkit+awk+sed+grep高级用法技巧合辑

生信软件21 - 多线程拆分NCBI-SRA文件工具pfastq-dump

生信软件22 - 测序数据5‘和3‘端reads修剪工具sickle

生信软件23 - Samtools和GATK去除PCR重复方法汇总

生信软件24 - 查询物种分类学信息和下载基因组TaxonKit和ncbi-genome-download

更多内容请关注公众号【生信与基因组学】,定期更新生信算法和编程、基因组学、统计学、分子生物学、临床检测和深度学习等内容。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

生信与基因组学

每一份鼓励是我坚持下去动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值