readISATab: Read an ISA-Tab dataset into an R object.

Description Usage Arguments Value Author(s) Examples

View source: R/isatabr-read.R

Description

Reads an ISA-Tab dataset, given as a zip file or as a set of files in a specific folder, and builds an object of the ISA-class.

Usage

1
readISATab(path = getwd(), zipfile = NULL, verbose = FALSE)

Arguments

path

A character vector with the name of the directory in which the ISA-Tab files are located (if the parameter zipfile is not provided or if it is equal to NULL), or the name of the directory where the zip archive containing the ISA-Tab files is located (if the parameter zipfile is not NULL). The default value is the current working directory.

zipfile

A character vector with the name of the zip archive containing ISA-Ttab files themselves (without a directory name in the zip archive). The default value is NULL (specifying that the ISA- Tab files have not been archived in one zipped file).

verbose

A logical vector indicating to show messages for the different steps, if TRUE, or not to show them, if FALSE (the default value).

Value

An object of the ISA class.

Author(s)

Maikel Verouden

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## Not run: 
## Example for mass spectrometry dataset
temp <- tempdir()
datafiles <- c(file.path(system.file("cdf/KO", package = "faahKO"),
                         grep(pattern = "CDF",
                              x = dir(system.file("cdf/KO", package = "faahKO")),
                              ignore.case = TRUE,
                              value = TRUE)),
               file.path(system.file("cdf/WT", package = "faahKO"),
                         grep(pattern = "CDF",
                              x = dir(system.file("cdf/WT", package = "faahKO")),
                              value = TRUE)))
file.copy(datafiles, temp, recursive = TRUE)
isafiles <- file.path(system.file(package = "faahKO"),
                      grep(pattern = "txt",
                           x = dir(system.file(package = "faahKO")),
                           value = TRUE))
file.copy(isafiles, temp, recursive = TRUE)
isaObject1 <- readISATab(path = temp)

## Example of readISATab for a mass spectrometry experiment
isazip <- system.file("extdata", "faahKO-metadata.zip", package = "Risa")
isaObject2 <- readISATab(path = file.path(system.file("extdata",
                                                      package = "Risa"),
                                                      "ISAexample"),
                         zipfile = isazip,
                         verbose = TRUE)

## End(Not run)

mverouden/isatabr documentation built on April 21, 2019, 4:35 a.m.