可用ref:https://blog.sciencenet.cn/home.php?mod=space&uid=2970729&do=blog&id=1174911
下载稳定老版本gnuplot v4.6.2
mkdir gnuplot && cd gnuplot
wget https://sourceforge.net/projects/gnuplot/files/gnuplot/4.6.2/gnuplot-4.6.2.tar.gz
tar -zxvf gnuplot-4.6.2.tar.gz
./configure --prefix=$PWD
make
make install
export PATH=/path/to/gnuplot/gnuplot-4.6.2/bin:$PATH
step1: run nucmer for alignment
nucmer --threads 32 --mum -D 5 -p
-D, --diagdiff=uint32 Set the maximum diagonal difference between two adjacent anchors in a cluster (5)
-p, 前缀
subject和query是序列,fasta
step2: filter alignment result
delta-filter -i 85 -l 8000 -o 85 .delta -1 > .best_delta
-i,最小alignment相似性阈值
-l,小写L,最小的alignment长度
-o 和-r,-q相关,可以理解为alignment coverage
-1,数字1,指定是否进行一对一的比对,一个位置(subject或query上)只找一个最佳的比对。特别是对大的基因组一定要加这个选项,否则会异常慢
step3: generate figure using mummerplot
mummerplot -p .best_delta -t postscript
采用上一步过滤后的结果.best_delta画图,这里生成的是ps格式的图,虽然-t可以指定png图,但是结果显示生成的png图分辨率太低。
-t 格式
-s small/large font and dot size
step4: convert ps format to png
/usr/bin/ps2pdf .ps .pdf
convert -density 300 .pdf .png
ps2pdf可以将ps格式的文件转pdf
convert是imagemagick包中的一个子程序,可将pdf转为png