三代ONT甲基化相關分析軟件

一、deepmod

1、三代測序得到的fast5文件是muti fast5,一個fast5文件里面有4000條fast5序列,deepmod不支持muti fast5,需要拆分成singal fast5. 使用ont官方的程序ont_fast5_api進行轉(zhuǎn)換

https://github.com/nanoporetech/ont_fast5_api

$ multi_to_single_fast5 --input_path fast5 --save_path single_fast5 --recursive

2、需要使用Albacore對fast5文件進行basecalling,寫入events文件

1)Albacore可以用docker來運行,https://hub.docker.com/r/robegan21/albacore

軟件提供的訓練集是用albacore2.3.1完成的,我們也用這個版本進行basecalling

2)read_fast5_basecaller.py -l 來查看不同的試劑盒和芯片對應的config文件,我的芯片是FLO-MIN106,試劑盒是SQK-109,對應的config文件是r94_450bps_linear.cfg

$ docker run -it --rm -v $PWD:/data robegan21/albacore:2.3.1 bash

$ read_fast5_basecaller.py -i single_fast5 -f FLO-MIN106 -k SQK-109 -r -t 10 -c /opt/albacore/r94_450bps_linear.cfg -o fast5,fastq -s albacore

3、Deepmod進行m6A檢測

1)Deepmod安裝參照官網(wǎng),

https://github.com/WGLab/DeepMod/blob/master/docs/Install.md

tensorflow、matplotlib直接使用conda安裝可能會出問題,建議安裝時指定版本,按照安裝說明中的版本,tensorflow安裝1.7.0,matplotlib安裝2.1.2

2)github上下載Deepmod,這個軟件是免安裝的,下載下來,只要上面的依賴都安裝好了,就可以直接用

$ python Deepmod/bin/Deepmod.py detect --wrkBase albacore/workspace/pass --Ref ref/wt.fasta --Base A --FileID wt --modfile Deepmod/train_mod/rnn_conmodA_P100wd21_f7ne1u0_4/mod_train_conmodA_P100wd21_f3ne1u0 --threads 10 --outFolder wt

如果報錯的話,加上 --basecall_1d Basecall_1D_001 再試一下

二、mCaller

1、安裝參照說明即可,沒有遇到什么問題
https://github.com/al-mcintyre/mCaller

2、multi fast5 轉(zhuǎn)成single fast5
https://github.com/nanoporetech/ont_fast5_api

$ multi_to_single_fast5 --input_path fast5 --save_path single_fast5 –recursive

3、輸入文件需要帶event信息的fast5文件和對應的fastq文件,我們原始的fast5是不帶event信息的,需要重新進行basecalling。用Albacore或者guppy均可,albacore用上面deepmod里面說的docker程序運行,guppy的話可以下載安裝,用guppy進行basecalling

$ guppy_basecaller -i single_fast5 -s single_fast5 -c dna_r9.4.1_450bps_fast.cfg --fast5_out on --num_callers 4 --cpu_threads_per_caller 3

### --fast5_out 默認是off,這里要選成on,這樣就可以輸出帶event信息的fast5文件了

4、將basecalling得到的fastq文件合并,并建立索引

$ cat *.fastq >> wt.fastq
$ nanopolish index -d workspace -s sequencing_summary.txt wt.fastq

##  workspace 是guppy basecalling輸出的帶event信息的fast5文件的文件夾

5、后面就按部就班來就好了

$ bwa index wt.fasta

$ bwa mem -x ont2d -t 12 wt.fasta wt.fastq | samtools view -Sb - | samtools sort -T /tmp/wt.sorted -o wt.sorted.bam 

$ samtools index wt.sorted.bam

$ nanopolish eventalign -t 12 --scale-events -n -r wt.fastq -b wt.sorted.bam -g wt.fasta > wt.eventalign.tsv (不要丟掉wt.fasta后面的>)

$ mCaller.py -m A -r wt.fasta -d r94_model_NN_6_m6A.pkl -e wt.eventalign.tsv -f wt.fastq -b A  ( -m 參數(shù)可以指定motif,比對GATC,如果想要檢測所有的A的話,直接-m A就好了)

然后會得到一個wt.eventalign.diffs.6 的文件,里面有每個A是否發(fā)生甲基化修飾的信息了。后面還可以通過調(diào)整閾值線來判斷哪些是真的甲基化修飾

三、tombo

1、安裝
https://github.com/nanoporetech/tombo

使用conda安裝,沒有問題

2、tombo不支持multi fast5,同樣使用ont_fast5_api進行轉(zhuǎn)換
https://github.com/nanoporetech/ont_fast5_api

$ multi_to_single_fast5 --input_path fast5 --save_path single_fast5 –recursive

3、resquiggle 必須使用single_fast5文件夾為輸入文件夾

$ tombo resquiggle single_fast5 wt.fasta –processes 4 –num-most-common-errors 5

4、檢測6mA。tombo檢測堿基修飾有3種方式,推薦使用alternative model

$ tombo detect_modifications alternative_model --fast5-basedirs single_fast5 --alternate-bases 6mA --statistics-file-basename wt_6ma

1)--statistics-file 是指定輸出文件的名字

2)--alternate-bases還支持CpG dam dcm檢測

得到wt_6ma.6mA.tombo.stats,后續(xù)的motif分析以及作圖都是基于這個文件。

motif檢測

$ tombo text_output signif_sequence_context --statistics-filename wt_6ma.6mA.tombo.stats --genome-fasta wt.fasta --num-regions 1000 --num-bases 20

得到檢測到甲基化的A的周圍20bp的序列,使用MEME進行motif檢測

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容