MyNixOS website logo
Description

Antigenic Cartography Macros.

A toolkit for making antigenic maps from immunological assay data, in order to quantify and visualize antigenic differences between different pathogen strains as described in Smith et al. (2004) <doi:10.1126/science.1097211> and used in the World Health Organization influenza vaccine strain selection process. Additional functions allow for the diagnostic evaluation of antigenic maps and an interactive viewer is provided to explore antigenic relationships amongst several strains and incorporate the visualization of associated genetic information.

R-CMD-check CRAN status

Racmacs

The Racmacs package provides a toolkit for making antigenic maps from assay data such as HI assays, as described in Smith et al. 2004.

For an introduction to antigenic cartography, see the article an introduction to antigenic cartography. For a general introduction to using Racmacs to make an antigenic map from titer data see the article making an antigenic map from titer data. For documentation of the functions available see the references section.

Installation instructions

Installing the latest CRAN release

Pre-compiled version of Racmacs can now be installed directly from CRAN with:

install.packages("Racmacs")

Installing the latest development release

The latest developmental release of Racmacs can be installed from github but may require some setting up of your compiler toolchain as described below.

Install the devtools package

If not already installed, install the devtools package, this provides functions to help with installation.

install.packages("devtools")

Install Racmacs

Now you can install Racmacs directly from the latest development source code. In future pre-built binary versions will also be included.

# To build from github source
devtools::install_github("acorg/Racmacs")

Problems compiling on MacOS

When installing Racmacs on a mac os, compilation will most likely fail under the default setup since the necessary libraries that are linked to cannot be found. The recommended solution, which should both solve this problem and speed up the code, is for mac users to follow the instructions below for setting up your environment to use the gcc and associated fortran compiler.

Building Racmacs to run code in parallel

Racmacs uses OpenMP instructions to specify when code can be run in parallel to increase performance. The resulting speed-up can be significant, but you need to check whether the compiler you use supports OpenMP.

The default compiler on mac systems for example is clang which does not support OpenMP and will fail anyway by default because it does not include a fortran compiler by default.

Installing gcc and a fortran compiler
The solution for both OpenMP support and provision of a fortran compiler on a mac system is to follow the guidance from the R project page for mac and install the official GNU Fortran binaries from F.X.Coudert found here.

Note that you have to install the correct version according to your hardware e.g. an intel or M1 mac, and for your correct OS. Also if you have an M1 mac, make sure that you have installed the M1 version of the R installer and not the intel one, otherwise loading the package will fail since R will have been compiled for an intel system and Racmacs for an M1 system.

The easiest method of installation is through finding the appropriate .dmg file which will contain an automatic installer for you rather than the .tar.xz source versions where you will have to deal with installation yourself.

Changing the default compiler in R
Once you have installed your fortran compiler and the packaged gcc compiler you need to change the default compiler in R. To do this you specify it in your local Makevars file. This exists in the .R folder in your home folder, i.e. ~/.R/Makevars. It is possible you will have to create the .R folder and the Makevars text file.

Once done, add the following lines to the Makevars file and update the paths to the appropriate path for each of the respective executables, for example:

CC=/usr/local/gfortran/bin/gcc
CXX=/usr/local/gfortran/bin/g++
CXX1X=/usr/local/gfortran/bin/g++
CXX11=/usr/local/gfortran/bin/g++
SHLIB_CXXLD=/usr/local/gfortran/bin/g++
FC=/usr/local/gfortran/bin/gfortran
F77=/usr/local/gfortran/bin/gfortran
MAKE=make -j8

SHLIB_OPENMP_CFLAGS=-fopenmp
SHLIB_OPENMP_CXXFLAGS=-fopenmp
SHLIB_OPENMP_FCFLAGS=-fopenmp
SHLIB_OPENMP_FFLAGS=-fopenmp

Now when you try and install and build the package from source things should be setup to use g++, with support for OpenMP parallelization now included.

Finally, to check whether your version of Racmacs has been compiled to work in parallel or not you can run the command Racmacs:::parallel_mode(), which should return TRUE. It's not a problem if it returns FALSE, optimization code just won't run in parallel so will take a bit longer.

Metadata

Version

1.2.9

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows