acorg / acmacs.r

Acmacs package for R

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

acmacs.r package

This package provides R 4.0 with ability to read, modify, save the data stored in acmacs and lispmds files.

Supported platforms

  • macOS 10.14.6

  • Linux

Dependencies

Rcpp 1.0.3 or later is required.

install.packages("Rcpp")

Installation

https://cran.r-project.org/web/packages/Rcpp/index.html R 4.0 is required, other versions are not supported!

Package is supposed to be installed from a binary archive for the specific platform. Building package from sources is complicated and it cannot be done within R.

Installation on macOS 10.14

install.packages(c("Rcpp", "devtools", "testthat", "roxygen2"))
install.packages(Find(function(asset) { grepl("macOS", asset$name, fixed=TRUE) }, devtools:::github_GET("repos/acorg/acmacs.r/releases/latest")$assets)$browser_download_url)

Installation on Linux

install.packages(c("Rcpp", "devtools", "testthat", "roxygen2"))
install.packages(Find(function(asset) { grepl("linux", asset$name, fixed=TRUE) }, devtools:::github_GET("repos/acorg/acmacs.r/releases/latest")$assets)$browser_download_url)

Loading

library(acmacs.r)

Usage example

Complete example with the most of available functions can be accessed within R using ?acmacs.Example

library(acmacs.r)
chart <- new(acmacs.Chart, "/tmp/file.ace")
cat(chart$info)

ags <- chart$antigens
format_antigen <- function(a) {
  paste(c(a$name, a$passage, a$reassortant, a$reference, a$annotations, paste("[", a$date, "]", sep="", collapse=""), a$lab_ids), collapse=" ", sep="")
}
cat("antigens:", length(ags), "\n ", paste(sapply(ags, format_antigen), collapse="\n  "), "\n")

Docs

Rcpp

About

Acmacs package for R

License:GNU General Public License v3.0


Languages

Language:C++ 66.9%Language:R 26.9%Language:Python 3.3%Language:Makefile 2.9%