metWrite: Exporting a MultiDataSet instance into dataset subfolders,...

Description Usage Arguments Value Author(s) Examples

Description

Note that the dataMatrix is transposed before export (e.g., the samples are written column wise in the 'dataMatrix.tsv' exported file).

Note that the dataMatrix is transposed before export (e.g., the samples are written column wise in the 'dataMatrix.tsv' exported file).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
metWrite(x, ...)

## S4 method for signature 'MultiDataSet'
metWrite(x, dirC, filesLs = NULL,
  overwriteL = FALSE, info.txtC = NA)

## S4 method for signature 'ExpressionSet'
metWrite(x, dirC, dataMatrix.tsvC = NA,
  sampleMetadata.tsvC = NA, variableMetadata.tsvC = NA,
  overwriteL = FALSE, info.txtC = NA)

Arguments

x

An S4 object of class MultiDataSet

dirC

Character: directory where each dataset subfolder should be created

overwriteL

Logical: should existing files be overwritten?

info.txtC

Character: File name for the printed results (call to 'sink()'); if NA (default), messages will be printed on the screen; if NULL, no verbose will be generated

dataMatrix.tsvC

Character: alternatively, the FULL name of the dataMatrix, sampleMetadata, and variableMetadata files can be specified here and in the following two arguments (in that case, the dirC argument must be set to NA); note that if the sampleMetadata and/or variableMetadata file names are left to NA, the corresponding phenoData and featureData slots will be empty in the output ExpressionSet.

sampleMetadata.tsvC

Character: full name of the sampleMetadata file (when dirC is set to NA)

variableMetadata.tsvC

Character: full name of the variableMetadata file (when dirC is set to NA)

fileLs

List: alternatively to the dirC argument, the full names of the files can be provided as a list

x

An S4 object of class ExpressionSet

dirC

Character: directory where each dataset should be written

overwriteL

Logical: should existing files be overwritten?

info.txtC

Character: File name for the printed results (call to 'sink()'); if NA (default), messages will be printed on the screen; if NULL, no verbose will be generated

Value

No object returned.

No object returned.

Author(s)

Etienne Thevenot, etienne.thevenot@cea.fr

Etienne Thevenot, etienne.thevenot@cea.fr

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
prometMset <- metRead(system.file("extdata/promet",package="metabolis"))
## Not run: 
metWrite(prometMset, dirC = file.path(getwd(), "promet"))
# alternatively
metWrite(prometMset,
         dirC = NA,
         filesLs = list(metabo = list(dataMatrix.tsvC = file.path(getwd(), "met_dataMatrix.tsv"),
                                      sampleMetadata.tsvC = file.path(getwd(), "met_sampleMetadata.tsv"),
                                      variableMetadata.tsvC = file.path(getwd(), "met_variableMetadata.tsv")),
                        proteo = list(dataMatrix.tsvC = file.path(getwd(), "pro_dataMatrix.tsv"),
                                      sampleMetadata.tsvC = file.path(getwd(), "pro_sampleMetadata.tsv"),
                                      variableMetadata.tsvC = file.path(getwd(), "pro_variableMetadata.tsv"))))

## End(Not run)

metSet <- metabolis::metRead(system.file("extdata/promet/metabo", package="metabolis"))
## Not run: 
metWrite(metSet, dirC = file.path(getwd(), "metabo"))

## End(Not run)

ethevenot/metabolis documentation built on June 28, 2019, 1:27 p.m.