export: Export data as text files

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Export data from classes SchemeTreeSet, DataTreeSet, ExprTreeSet, or CallTreeSet to outfile.

Usage

1
2
3
4
5
6
7
8
9
export.scheme(xps.scheme, treetype = character(0), varlist = "*", outfile = character(0), sep = "\t", as.dataframe = FALSE, verbose = TRUE)

export.data(xps.data, treename = "*", treetype = "cel", varlist = "*", outfile = character(0), sep = "\t", as.dataframe = FALSE, verbose = TRUE)

export.expr(xps.expr, treename = "*", treetype = character(0), varlist = "*", outfile = character(0), sep = "\t", as.dataframe = FALSE, verbose = TRUE)

export.call(xps.call, treename = "*", treetype = character(0), varlist = "*", outfile = character(0), sep = "\t", as.dataframe = FALSE, verbose = TRUE)

export(object, ...)

Arguments

xps.scheme

an object of type SchemeTreeSet.

xps.data

an object of type DataTreeSet.

xps.expr

an object of type ExprTreeSet.

xps.call

an object of type CallTreeSet.

treename

vector of tree names to export.

treetype

type of tree(s) to export, see validTreetype

varlist

names of tree leaves to export

outfile

name of output file.

sep

column separator

as.dataframe

if TRUE a data.frame will be returned.

verbose

logical, if TRUE print status information.

object

object of class DataTreeSet.

...

arguments treenames,treetype,varlist,outfile,sep,as.dataframe.

Details

Export data from classes SchemeTreeSet, DataTreeSet, ExprTreeSet, or CallTreeSet to outfile.

Parameter varlist lists the parameters to export:
- parameters are separated by ":", e.g. varlist="fInten:fStdev".
- for varlist="*" all valid parameters will be exported.

For class DataTreeSet the following varlist parameters are valid:

fInten: intensities from e.g. tree.cel.
fStdev: standard deviation from e.g. tree.cel.
fNPixels: number of pixels from e.g. tree.cel.
fBg: background values (background trees only).

For classes ExprTreeSet and CallTreeSet varlist can contain annotation parameters and parameters of the resulting data.
Following varlist annotation parameters are valid:

fUnitName: unit name (probeset ID).
fTranscriptID: transcript_id (probeset ID).
fName: gene name.
fSymbol: gene symbol.
fAccession: mRNA accession such as Refseq ID.
fEntrezID: entrez ID.
fChromosome: chromosome.
fStart: start position.
fStop: stop position.
fStrand: strand on chromosome.
fCytoBand: cytoband.

Following varlist parameters are valid for ExprTreeSet:

fLevel: expression level.
fStdev: standard deviation.
fNPairs: number of pairs.

Following varlist parameters are valid for CallTreeSet:

fCall: detection call.
fPValue: detection p-value.

Following varlist parameters are valid for QualTreeSet:

fLevel: expression level.
fStderr: standard error.
fNUSE: normalized unscaled standard error.
fRLE: relative log expression value.

An example: varlist="fUnitName:fName:fSymbol:fLevel:fStdev:fEntrezID"

export is a generic method to export data from ROOT trees as text file.

Value

If as.dataframe is TRUE, the data will be imported into the current R session as data.frame. Otherwise, NULL will be returned.

Author(s)

Christian Stratowa

See Also

export-methods

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## load existing ROOT scheme file and ROOT data file
scheme.test3 <- root.scheme(paste(path.package("xps"),"schemes/SchemeTest3.root",sep="/"))
data.test3 <- root.data(scheme.test3, paste(path.package("xps"),"rootdata/DataTest3_cel.root",sep="/"))

## export as table only
export(scheme.test3, treetype="idx", outfile="Test3_idx.txt",verbose=FALSE)

## export as table and import as data.frame
ann <- export.scheme(scheme.test3, treetype="ann", outfile="Test3_ann.txt",as.dataframe=TRUE,verbose=FALSE)
head(ann)
data <- export.data(data.test3, outfile="Test3_cel.txt",as.dataframe=TRUE,verbose=FALSE)
head(data)

xps documentation built on Nov. 8, 2020, 6 p.m.