luria的个人博客分享 http://blog.sciencenet.cn/u/luria

博文

Nanopore basecalling之Albacore

已有 10252 次阅读 2018-7-17 13:19 |个人分类:Nanopore|系统分类:科研笔记| Nanopore, Albabore, basecalling, ONT, pacbio, Nanopore, pacbio, Nanopore, pass, pacbio, Nanopore

使用Nanopore MinION测序,当电脑跟不上时(如果采用笔记本来测,建议价格在1w以上的),测序会断掉。这时如果保留有fast5文件,还可以救——手动basecalling

目前,做basecalling的软件有ONT官方提供的Albacore,Nanonet,GuppyScrappie,以及非官方的Nanocall(已淘汰,仅在早期的文章中看到)DeepNanoChiron。它们之间的比较可参见[1],另外在人类基因组Nanopore测序文章中也特别比较了AlbacoreScrappie[2]。这些basecalling大多要在不断升级中,各软件间存在一些差异,特别是对poly结构的basecalling 

       Albacore集成在MinKNOW,因此测序时可作实时的basecalling,它在文章中出现次数最多,也是目前主要的开发热点。可在nanopore官网下载最新版的Albacore,例如:

wget https://apac.oxfordnanoportal.com/software/analysis/ont_albacore-2.3.1-cp35-cp35m-manylinux1_x86_64.whl

下载下来后,需要python3.5环境,如果有安装conda,则方便可以建立一个python3的环境,在这个环境中作后续分析,具体步骤可查看我的另一篇博文[3],在集群上用以下代码进入python3.5环境

source activate python3

再用以下代码进行安装:

pip3 install ont_albacore-xx.whl

当然conda环境不是必需的,必需的是Python3.5环境。 

安装完成后,用以下-h看一下是否安装成功

基本运行代码如下:

read_fast5_basecaller.py --input /path/to/fast5/dir --recursive --worker_threads 10 --flowcell FLO-MIN106 --kit SQK-LSK108 --save_path /path/to/output

注意:FLO-MIN106这个是flowcell的型号,类似FAH57248这个是flowcell唯一的id,这里--flowcellFLO-MIN106

另外,如果是混合测序,可添加--barcoding选项,程序会自动搜索barcode;如果想个性化的指定参数,可以提供config文件,再通过--config指定。

# --input指定输入的文件夹,配合--recursive选项,可以只指定最上层目录,程序会自动递归寻找其中的fast5文件

# --worker_threads指定线程数

# --kit的只能在https://nanopore.yilimart.com/Group/Kits1/这里选择现有的试剂盒

# --save_path指定输出的目录

 

运行完后生成configuration.cfg,pipeline.log,sequencing_summary.txt和workspace文件夹,在workspace文件夹中存放有pass和fail文件夹,里边放的是fastq文件,通常用pass目录下的文件作后续分析。

configuration.cfg记录运行参数,默认min_qscore_1d值为7.0,这个值非常重要,因为它和reads过滤为pass/fail有关,后续有详解;另外还记录有fastq相关文件(夹)命令规则:

[fastq]

identifier = {read_id}

header = {identifier} runid={run_id} read={read_number} ch={channel_id} start_time={start_time_utc}

header_with_barcoding = {identifier} runid={run_id} read={read_number} ch={channel_id} start_time={start_time_utc} barcode={barcode_id}

batch_file_name = fastq_runid_{run_id}_{batch_counter}.{extension}

single_file_name = {read_id}.{extension}

all_file_name = fastq_runid_{run_id}.{extension}

 

sequencing_summary.txt记录的信息最为全面,这也是目前Nanopore QC软件玩花样的竞技场! 其中的19列内容如下:

filename

fast5文件名

read_id

每个fast5文件对应一条read

run_id

这次run的id号,一个flowcell通常为一个run,所以sequencing_summary中run_id都一致。如果一个flowcell中途停掉再跑,每跑一次会记录新的run id

channel

测序有512channel,这个记录read在哪个channel测的

start_time

这条read测序起始时间

duration

这条read测序经过时间

num_events

event的概念为历史遗存,目前已弃用

passes_filtering

readmean_qscore_template大于7(min_qscore_1d的默认值)时为True,否则为False

template_start

template不详,如有知情者欢迎补上!

num_events_template

template_duration

num_called_template

sequence_length_template

记录的read的长度

mean_qscore_template

passfail通过这一项进行划分,注意默认是从0-7(不包括07)等于0的划分为skip,不过通常skip目录不会保留

strand_score_template

这几个值不详

calibration_strand_genome_template

calibration_strand_identity_template

calibration_strand_accuracy_template

calibration_strand_speed_bps_template

注:其中最重要的是mean_qscore_template 

后续分析建议用pass目录下的read进行。

 

参考材料:

[1] https://github.com/rrwick/Basecalling-comparison

[2] Miten Jain, Sergey Koren, Karen H Miga. et al. Nanopore sequencing and assembly of a human genome with ultra-long reads. nature biotechnology. 2018. doi:10.1038/nbt.4060

[3] http://blog.sciencenet.cn/blog-2970729-1074395.html




https://blog.sciencenet.cn/blog-2970729-1124496.html

上一篇:比对算法的原理及代码实现
下一篇:使用Biopython解析Blast结果
收藏 IP: 111.47.21.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-3-29 20:20

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部