前言:ONT,即Oxford Nanopore Technologies,劃時代的納米孔測序技術。ONTrack是一個用來分析MinION測序數據的pipeline,源碼在GitHub里(戳??:github.com/MaestSi/ONTrack)。
1.安裝前準備
1.1 安裝conda
首先確認服務器安裝了conda,沒有的先安裝conda:
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
chmod 755 Miniconda3-latest-Linux-x86_64.sh
./Miniconda3-latest-Linux-x86_64.sh
1.2 安裝guppy
guppy是nanopore官方提供的basecalling軟件,安裝步驟如下:
wget https://mirror.oxfordnanoportal.com/software/analysis/ont-guppy-cpu_version_of_interest.tar.gz
tar -xf ont-guppy-cpu_version_of_interest.tar.gz
下載的guppy軟件包解壓之后,會產生一個ont-guppy-cpu文件夾,在安裝好ONTrack之后,你需要把ont-guppy-cpu/bin的絕對路徑作為BASECALLER_DIR
變量添加在config_MinION_mobile_lab.R這個文件里。
1.3 安裝blast nt數據庫(可選)
這一步是非必要的,你可以選擇下載nt數據庫,用于本地化blast。nt數據庫非常大,65個G左右,建議先跳過這一步。安裝步驟如下:
mkdir NCBI_nt_db
cd NCBI_nt_db
echo `date +%Y-%m-%d` > download_date.txt
wget ftp://ftp.ncbi.nlm.nih.gov/blast/db/nt*
targz_files=$(find . | grep \.tar\.gz$ | sed 's/\.\///g')
for f in $targz_files; do tar -xzvf $f; done
rm $targz_files
同樣,在安裝好ONTrack之后,你需要把NCBI_nt_db/nt的絕對路徑作為NTDB變量
添加在config_MinION_mobile_lab.R這個文件里。(PS:NT數據庫下載鏈接:ftp.ncbi.nih.gov/blast/db)
2.安裝ONTrack
安裝步驟:
git clone https://github.com/MaestSi/ONTrack.git
cd ONTrack
chmod 755 *
./install.sh
運行install.sh之后,會創建一個名叫ONTrack_env
的conda環境,同時在該環境中安裝blast, emboss, vsearch, seqtk, mafft, minimap2, samtools, nanopolish, bedtools, pycoQC以及R with package Biostrings。
這些軟件缺一不可(手動捂臉),如果后面運行報錯,八成是有的軟件沒裝好,可以自己手動安裝,并在config_MinION_mobile_lab.R這個文件里設置好路徑。
3.ONTrack的使用
先上流程圖,各位看官請欣賞:
主要的用法是:
Usage: Rscript ONTrack.R <home_dir> <fast5_dir> <sequencing_summary.txt>
Inputs:
<home_dir>: directory containing fastq and fasta files for each sample named BC<numbers>.fast*
<fast5_dir>: directory containing raw fast5 files for nanopolish polishing, optional
<sequencing_summary.txt>: sequencing summary file generated during base-calling, used to speed-up polishing, optional
輸入文件是fastq時,必須把對應的fasta也放在同一目錄,可以用李恒的seqkt生成對應的fasta,命令如下:
seqkt seq -A sample.fastq > sample.fasta
Outputs:
<"sample_name".contigs.fasta>: polished consensus sequence in fasta format
<"sample_name".blastn.txt>: blast analysis of consensus sequence against NCBI nt database (if do_blast_flag variable is set to 1 in config_MinION_mobile_lab.R)
<"sample_name">: directory including intermediate files
小結:運行一個fastq試了一下,大概跑30分鐘左右,主要的結果就是"sample_name".contigs.fasta,一個經過嚴格計算的一致序列,可以用來在NCBI中去blast。我現在就等著60多G的nt數據庫下載完了,祝我好運吧!