【5.2.1】nanopolish
一般第三方的nanopore数据分析工具喜欢以nano开头,而polish一般碱基纠错工具喜欢叫polish,没错。nanopolish也可以用来做nanopore拼接结果的碱基校正。除此之外,nanopolish还可以做碱基识别,比对,变异检测,甲基化检测等。
软件官网:https://github.com/jts/nanopolish
官方文档:https://nanopolish.readthedocs.io/en/latest/index.html
一、下载安装:
git clone --recursive https://github.com/jts/nanopolish.git
cd nanopolish
make
需要额外安装 https://github.com/samtools/htslib
git clone https://github.com/samtools/htslib.git
cd htslib
autoreconf -i # Build the configure script and install files it uses
./configure # Optional but recommended, for choosing extra functionality
make
make install
二、主要功能
nanapolish可以完成很多的分析,软件也提供了非常详细的帮助文档,还配有案例数据。软件安装完成之后在命令行直接敲nanopolish命令会弹出软件的选项参数。
- call-methylation:识别甲基化信号
- eventalign:序列比对
- extract:碱基识别
- index:建立索引
- phase-reads:相位分析,定位序列来自二倍体父本还是母本
- polya:估计RNA直接测序polyA尾巴长度
- variants:检测SNP等突变
- vcf2fasta:生成一致性序列
基本命令:
nanopolish call-methylation: predict genomic bases that may be methylated
nanopolish variants: detect SNPs and indels with respect to a reference genome
nanopolish variants --consensus: calculate an improved consensus sequence for a draft genome assembly
nanopolish eventalign: align signal-level events to k-mers of a reference genome
三、使用案例
nanopolish的各个功能一般都需要使用原始的fast5文件作为输入。例如利用nanopolish来检测甲基化位点。
1、首先,下载测试数据。
wget http://s3.climb.ac.uk/nanopolish_tutorial/methylation_example.tar.gz
tar -xvf methylation_example.tar.gz
cd methylation_example
2、建立索引
nanopolish index -d fast5_files/ output.fastq
3、与参考基因组比对
minimap2 -a -x map-ont reference.fasta output.fastq | samtools sort -T tmp -o output.sorted.bam
samtools index output.sorted.bam
4、利用nanopolish检测甲基化位点
nanopolish call-methylation -t 8 -r output.fastq -b output.sorted.bam -g reference.fasta -w "chr20:5,000,000-10,000,000" > methylation_calls.tsv
5、对结果进行过滤
scripts/calculate_methylation_frequency.py methylation_calls.tsv > methylation_frequency.tsv
参考资料
药企,独角兽,苏州。团队长期招人,感兴趣的都可以发邮件聊聊:tiehan@sina.cn
个人公众号,比较懒,很少更新,可以在上面提问题,如果回复不及时,可发邮件给我: tiehan@sina.cn
