knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

isaeditor

R-CMD-check

isaeditor is a collection of helper functions for modifying and displaying ISA-Tab files.

Installation

You can install the released version of isaeditor from CRAN with:

install.packages("isaeditor")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("bihealth/isaeditor")

Basic usage

Reading ISA-Tabs

Use the read_isa() function:

library(isaeditor)
file  <- system.file('extdata', 's_isatab.txt', package='isaeditor')
isa_s <- read_isa(file)
dim(isa_s)
class(isa_s)
summary(isa_s)
print(isa_s)

You can directly modify the isatab object almost as simply as you would do it with a data frame:

## access a node
isa_s[ "New Node" ] <- c("em", "pstrem", "bzdrem")

## create a property of the new node
isa_s[ "New Node", "Characteristics[Replicate]" ] <- 1:3

## remove the node and all its properties
isa_s[ "New Node" ] <- NULL

Unfortunately, multiple nodes with the same label may exist according to the ISA-Tab specifications. Sometimes it is therefore necessary to indicate which of these nodes we mean. There are several ways to do it in isaeditor, two of them are shown here:

file <- system.file('extdata', 'a_isatab.txt', package='isaeditor')
isa_a <- read_isa(file)

## use the internal ID to access the node
## you can also use isa_ID_find for that
isa_nodes(isa_a)
isa_a[['ID34']]

## specify which of the nodes 
isa_a[ "Extract Name", n=2 ]


bihealth/isaeditor documentation built on Feb. 8, 2025, 2:23 p.m.