一、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
軟件提供的訓(xùn)練集是用albacore2.3.1完成的,我們也用這個版本進行basecalling
2)read_fast5_basecaller.py -l 來查看不同的試劑盒和芯片對應(yīng)的config文件哲身,我的芯片是FLO-MIN106辩涝,試劑盒是SQK-109,對應(yīng)的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文件和對應(yīng)的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檢測