AUTHOR:
  Markus Meier
  Department of Chemistry
  University of Manitoba
  144 Dysart Road
  Winnipeg, MB, R3T 2N2, Canada
  E-mail: markus.meier "at" umanitoba.ca

ABOUT:
  This R script generates a plot of the backbone torsion angles the G-quadruplex
  NMR ensemble 2M4P from the JSON output of x3dna-dssr.
  
  2m4p.pdb is included, but can also be obtained from "http://www.rcsb.org".

INSTALLATION:
  Please refer to "https://cran.r-project.org" (CRAN) how to obtain R and how to
  install it. The following libraries must be obtained separately from CRAN:
  plotrix, dplyr, tidyson, Cairo

  To install these libraries, you can issue the following command in the R
  console:
    install.packages(c('plotrix','dplyr','tidyjson', 'Cairo'))
  Dependencies to other R packages are automatically resolved.

  For compilation from source (Linux, Cygwin, ...) you need install compilers
  and the developer packages for the necessary system libraries. Non-exhaustive
  list:
  gcc-fortran, gcc-g++, make, pkg-config, fontconfig-devel, libcairo-devel,
  libiconv-devel, libicu-devel, liblapack-devel, liblzma-devel, libjpeg-devel,
  libtiff-devel, libtirpc-devel, libXt-devel

  If the Cairo library compilation complains about missing fontconfig libraries
  on Cygwin, try
    install.packages('Cairo', configure.vars="LIBS=-lfontconfig")
    
    
  For the installation of x3dna-dssr, refer to "http://x3dna.org". Version
  x3dna-dssr-v1.6.6-2017feb20 or later is required.

RUN THE SCRIPT:
  1) Run x3nda-dssr and generate the JSON output from 2m4p.pdb
     x3dna-dssr -i=2m4p.pdb -o=2m4p.json --more --nmr --json
     
  2) Run the R script
     R -s -f backbone_torsions_2m4p_json.R

  A bash script that executes these commands for you is included for
  your convenience.

  If everything works, a PDF file "backbone_torsions_2m4p.pdf" containing the 
  backbone torsion angle plot will be produced.
  
  If you have troubles running this script on Windows, see "Known Issues" @
  https://support.rstudio.com/hc/en-us/articles/200532197-Character-Encoding.
  R on Windows is a broken mess, please do not ask for support to make this
  script work on this platform. I recommend to  install Cygwin
  (https://www.cygwin.com) and use the R version distributed with it instead of
  the native Windows version.
  
