plot synteny genome alignment by mapper Mummer or LastZ using syntenyPlot.R.
plot assemblies comparison using comparePlot.R
###########
requriement
###########
R 3.3+
optparse # an R package
###########
plot mummer delta file
###########
There is a sample delta file and an output named "out.png" in project. user could try this by yourself.
Rscript syntenyPlot.R -i <delta.file> -o out.png
###########
Large delta file
###########
If the delta file is too large, it is very time-consuming for ploting it. We recommand format the delta file by our PERL script firstly. And then plot the format delta file.
perl nucmer2RPlotFormat.pl <delta.file> >out.format
Rscript syntenyPlot.R -i <delta.file> -c -o out.png
If the delta is formatted, the parameter -c should be setted.
###########
LastZ
###########
There are two steps to format LastZ into our plot format. Only support one chromosome in Reference right now.
perl maf2R_01.pl *.maf >out.maf_1
perl maf2R_02.pl *out.maf_1 >out.maf_2
Rscript syntenyPlot.R -i <out.maf_2> -c -o out.png
If the delta is formatted, the parameter -c should be setted.
###########
R Plot Format
###########
There are 11 columns in Our R plot Format. User could change any alignment format into our R plot format and then plot it by our R script. And there is a sample file named "out.format" in project.
refid # 1st columns
qryid # 2nd columns
reflen # 3rd columns
qrylen # 4th columns
refstart # 5th columns
refend # 6th columns
qrystart # 7th columns
qryend # 8th columns
refollen # 9th columns
belong ref start # 10th columns
belong ref # 11th columns
###########
Plot assemblies comparison
###########
There is a sample of three alignment files using minimap and an output named "AssemblyCompare.png" in project. user could try this by yourself.
Rscript comparePlot.R -i <alignment.files> -o out.png