Skip to contents

Process data from assay tab files

Process data from assay tab files with technology type mass spectrometry (ms). Processing those files requires the xcms package to be installed.

Process data from assay tab files with technology type DNA microarray (ms). Processing those files requires the Biobase and affy packages to be installed.

Usage

processAssay(isaObject, aTabObject, type = c("raw", "derived"))

# S4 method for ISA,assayTab,character
processAssay(isaObject, aTabObject, type = c("raw", "derived"))

# S4 method for ISA,msAssayTab,character
processAssay(isaObject, aTabObject, type = c("raw", "derived"))

# S4 method for ISA,microarrayAssayTab,character
processAssay(isaObject, aTabObject, type = c("raw", "derived"))

Arguments

isaObject

An object of the ISA.

aTabObject

An object of the microarrayAssayTab.

type

A character string indicating which data files should be processed, either "raw" for raw data files, or "derived" for derived data files. The file names are taken from the corresponding column in the aTabObject.

Examples

### Atwell data.

## Read example Atwell data set.
isaObject1 <- readISATab(path = file.path(system.file("extdata/Atwell",
                                          package = "isatabr")))

## Get assay tabs for isaObject1.
aTabObjects <- getAssayTabs(isaObject1)

## Process assay data.
isaDat <- processAssay(isaObject = isaObject1,
                      aTabObject = aTabObjects$s_study1.txt$a_study1.txt,
                       type = "derived")

## Display first rows and columns.
head(isaDat[, 1:10])
#>   Assay Name      LD  LDV      SD     SDV FT10 FT16 FT22 Seed Dormancy Emco5
#> 1   assay152 6.84105 32.6 93.0417 4.97494   74   87   89            NA    NA
#> 2   assay279      NA   NA      NA      NA   NA   NA   NA            NA    NA
#> 3   assay211      NA   NA      NA      NA   NA   NA   NA            NA    NA
#> 4   assay256      NA   NA      NA      NA   NA   NA   NA            NA    NA
#> 5   assay907      NA   NA      NA      NA   NA   NA   NA            NA    NA
#> 6   assay948      NA   NA      NA      NA   NA   NA   NA            NA    NA

# \donttest{
### faahKO data. - This requires the xcms package to be installed.
## Read ISA-Tab files for faahKO.
if (requireNamespace("xcms")) {
  isaObject3 <- readISATab(path = file.path(system.file("extdata/faahKO",
                                            package = "isatabr")))

  ## Get assay tabs for isaObject3.
  aTabObjects3 <- getAssayTabs(isaObject3)

  ## Process assay data.
  isaDat3 <-
    processAssay(isaObject = isaObject3,
                 aTabObject = aTabObjects3$s_Proteomic_profiling_of_yeast.txt$a_metabolite.txt,
                 type = "raw")

  ## Display output.
  isaDat3
  }
#> Loading required namespace: xcms
#> Loading required package: xcms
#> Loading required package: BiocParallel
#> Loading required package: MSnbase
#> Loading required package: BiocGenerics
#> 
#> Attaching package: ‘BiocGenerics’
#> The following objects are masked from ‘package:stats’:
#> 
#>     IQR, mad, sd, var, xtabs
#> The following objects are masked from ‘package:base’:
#> 
#>     Filter, Find, Map, Position, Reduce, anyDuplicated, aperm, append,
#>     as.data.frame, basename, cbind, colnames, dirname, do.call,
#>     duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
#>     lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
#>     pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
#>     tapply, union, unique, unsplit, which.max, which.min
#> Loading required package: Biobase
#> Welcome to Bioconductor
#> 
#>     Vignettes contain introductory material; view with
#>     'browseVignettes()'. To cite Bioconductor, see
#>     'citation("Biobase")', and for packages 'citation("pkgname")'.
#> Loading required package: mzR
#> Loading required package: Rcpp
#> Loading required package: S4Vectors
#> Loading required package: stats4
#> 
#> Attaching package: ‘S4Vectors’
#> The following object is masked from ‘package:utils’:
#> 
#>     findMatches
#> The following objects are masked from ‘package:base’:
#> 
#>     I, expand.grid, unname
#> Loading required package: ProtGenerics
#> 
#> Attaching package: ‘ProtGenerics’
#> The following object is masked from ‘package:stats’:
#> 
#>     smooth
#> 
#> This is MSnbase version 2.26.0 
#>   Visit https://lgatto.github.io/MSnbase/ to get started.
#> 
#> Attaching package: ‘MSnbase’
#> The following object is masked from ‘package:base’:
#> 
#>     trimws
#> 
#> This is xcms version 3.22.0 
#> 
#> Attaching package: ‘xcms’
#> The following object is masked from ‘package:stats’:
#> 
#>     sigma
#> An "xcmsSet" object with 1 samples
#> 
#> Time range: 2506.1-4132.1 seconds (41.8-68.9 minutes)
#> Mass range: 200.1-599.3129 m/z
#> Peaks: 470 (about 470 per sample)
#> Peak Groups: 0 
#> Sample classes:  
#> 
#> Feature detection:
#>  o Peak picking performed on MS1.
#> Profile settings: method = bin
#>                   step = 0.1
#> 
#> Memory usage: 0.0804 MB
# }