Utility to plot contig-level 2D-SFS

Utility to plot contig-level 2D-SFS

This script superposes the distribution of SNPs from given contigs to the genome-level distribution produced with gridPlot.txt All scripts are provided in their current state of development with no warranty that they will work in all cases, and only for reference purposes. They can be used and modified by citing the Author (see script header). Example files can be obtained from the Author upon request.

#this script was written by Ivan Scotti, INRA, URFM
#Site Agroparc, Domaine Saint-Paul
#84914 AVIGNON Cedex 9
#you are free to use and modify it, provided you quote the author
#for questions, please contact Ivan Scotti at
#ivan.scotti[at]paca.inra.fr
#15 July 2015
#
gridPlotContig<-function(X,nbGenes,colCode)
  #similar to gridPlot, but prints circles of
  #colour corresponding to the SNPs contained in individual contigs
  #requires single-contig 2-way tables to work
{
  #text(labels=X,x=(col(X)-1),y=((nbGenes+1)-row(X)),cex=((X+0.1)/max(X))^3)
  symbols(x=(col(X)-1),y=((nbGenes+1)-row(X)),
          circles=rep(0.5,(nbGenes+1)^2),inches=F,asp=1,xlab="",ylab="",xaxt="n",yaxt="n",
          bty="n",bg=colours()[colCode*X],fg=colours()[colCode*X],add=T)
  #bty="n",bg=colours()[153])
}

Date de modification : 22 juin 2023 | Date de création : 16 juillet 2015 | Rédaction : Ivan Scotti