cannin edited this page Oct 30, 2011 · 1 revision
Clone this wiki locally


How do I install snp.plotter?

snp.plotter requires the installation of R, the statistical computing software, freely available here for Linux, Windows, or MacOS. snp.plotter uses three contributed packages: grid, lattice, and genetics available from the R Project website. snp.plotter can be downloaded here. Packages in the current working directory of R can be installed using the install.packages command.

In Windows, make sure that you have downloaded the .zip version of a package, which is a pre-compiled binary. Change the word PACKAGE_FILENAME to the name of the package being installed.

install.packages("", repos=NULL)

In Unix/Linux, make sure that you have downloaded a source package, the .tar.gz version, of a package. Change the word PACKAGE_FILENAME to the name of the package being installed.

install.packages("PACKAGE_FILENAME.tar.gz", repos=NULL)

The following error indicates that additional packages need to be installed: PACKAGE_FILENAME can be grid or genetics. These packages can be downloaded from CRAN. and installed using the same process described above.

Error: package 'PACKAGE_FILENAME' could not be loaded

How is snp.plotter used?

Once snp.plotter and its dependencies are installed, snp.plotter can be loaded into R using this command:


snp.plotter is then run using the following command. Explanation of snp.plotter configuration files and input files is provided in the file formats section. The configuration file specifies all the characteristics for the plot to be produced and the names of the data files to be used as input. Example configuration and input files are also provided.


Information about the configuration options is provided in the documentation, which can viewed from within R using this command.


How do I incorporate the snp.plotter figures into my publication?

The listing below shows the most common scenarios for inclusion of a figure into a publication; methods will vary based on the intended publication type:

  • Inclusion of PDF into Word document: PDF images can be selected and copied using the Adobe Reader snapshot tool. These images can then be pasted into a Word document.
  • Inclusion of PDF/EPS into LaTeX document: Images included into DVI file using latex must be in the EPS format. PDF documents created by pdflatex cannot use files in the EPS format and requires the PDF format. The following is basic LaTeX code for including an image. FILENAME must be changed to the appropriate filename.
  • Conversion of PDF/EPS file into other formats using Ghostscript: Ghostscript can be used to convert PDF and EPS files into a variety of raster formats such as JPG, BMP, PNG, etc. The following commandline converts an EPS image into a JPG image; the resulting image has a resolution of 300 DPI and pixel dimension of 1050×1050 pixels. Further information on the usage of Ghostscript can be found here. FILENAME must be changed to the appropriate filename.

gs -q -dNOPAUSE -dSAFER -dBATCH -r300 -g1050x1050 -sOutputFile=FILENAME.jpg -sDEVICE=jpeg FILENAME.eps