可視化dotPlotly工具蜕青,是利用R語言寫的可視化Minimap2/mummer比對輸出的結(jié)果文件覆履。
安裝
# 1 激活環(huán)境后輸入R乖仇,進(jìn)入R環(huán)境
# 2 指定安裝包的來源(這些步驟都是用的百度到的
options(repos=structure(c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/")))
# 3 R安裝模塊
install.packages("optparse", "plotly","ggplot2")
4 在Linux服務(wù)器終端從github上下載dotPlotly的兩個(gè)R腳本
git clone https://github.com/piyixing/dotPlotly.git
5 根據(jù)參數(shù)進(jìn)行運(yùn)行腳本,先使用例子的paf文件也行
/public/home/fengting/task/5.12ragtag/7.22/out/test/dotPlotly/pafCoordsDotPlotly.R -i test.paf -o 1 -s -t -m 500 -q 500000 -k 7 -l
minimap2 生成paf文件命令,-ax 生成sam格式,-cx生成paf格式鹿寨。
minimap2 -cx asm5 HHZ.fasta rice_MH63.fa > test.paf
參數(shù)說明:
Usage: pafCoordsDotPlotly.R -i alignments.coords -o out [options]
Options:
-i INPUT, --input=INPUT # 輸入文件,minimap paf文件
coords file from mummer program 'show.coords' [default NULL]
-o OUTPUT, --output=OUTPUT #輸出文件前綴
output filename prefix [default out]
-v, --verbose
Print out all parameter settings [default]
-q MIN-QUERY-LENGTH, --min-query-length=MIN-QUERY-LENGTH # 最短的查詢序列長度薪夕,用于過濾
filter queries with total alignments less than cutoff X bp [default 4e+05]
-m MIN-ALIGNMENT-LENGTH, --min-alignment-length=MIN-ALIGNMENT-LENGTH #最短的比對長度
filter alignments less than cutoff X bp [default 10000]
-p PLOT-SIZE, --plot-size=PLOT-SIZE # 繪圖圖片大小
plot size X by X inches [default 15]
-l, --show-horizontal-lines # 顯示水平線脚草,默認(rèn)關(guān)上,建議打開
turn on horizontal lines on plot for separating scaffolds [default FALSE]
-k NUMBER-REF-CHROMOSOMES, --number-ref-chromosomes=NUMBER-REF-CHROMOSOMES # 選擇繪圖時(shí)染色體數(shù)目寥殖,默認(rèn)繪制所有序列
number of sorted reference chromosomes to keep [default all chromosmes]
-s, --identity # -s 不同比對一致性顯示不同的顏色玩讳,默認(rèn)關(guān)上,建議打開
turn on color alignments by % identity [default FALSE]
-t, --identity-on-target # 僅對目標(biāo)對比時(shí)計(jì)算一致性嚼贡,可以理解為比對很好時(shí)才會計(jì)算一致性熏纯,如果加上-s 參數(shù),那就是只有比對很好的序列會顯示顏色粤策,其他都是黑白
turn on calculation of % identity for on-target alignments only [default FALSE]
-x, --interactive-plot-off #是否打開互動展示樟澜,默認(rèn)開,建議關(guān)上,打開報(bào)錯(cuò)
turn off production of interactive plotly [default TRUE]
-r REFERENCE-IDS, --reference-ids=REFERENCE-IDS #要保留的引用id列表(以逗號分隔)
comma-separated list of reference IDs to keep [default NULL]
-h, --help
Show this help message and exit
經(jīng)過安裝dotPlotly秩贰,就得到了共線性圖霹俺,會自動排序,調(diào)整正負(fù)方向毒费,和mummer軟件出來的圖有所差別丙唧,更美觀,同時(shí)也會損失正負(fù)鏈信息觅玻。