Learn R Programming

RNAinteract (version 1.20.0)

getData: Primary access function for all screen data.

Description

This function is the primary access function for a wide range of data from the screen. It does perform normalization, transformation, and reshaping if specified.

Usage

getData(sgi, type = "data", format = "plain", design = "template", mixTemplateQuery = TRUE, screen = NULL, channel = NULL, do.trafo = TRUE, do.inv.trafo = FALSE, normalized = FALSE, withoutgroups = c(), drop = TRUE)

Arguments

sgi
An object of class RNAinteract
type
Specifies which data is returned. Possible values are:
  • "p.value", "q.value": returns the p-value or q-value as computed by computePValues.
  • "data": returns the input data.
  • "pi": returns the pairwise interaction score.
  • "plateeffect": returns the plate effect estimated by normalizePlateEffect.
  • "ni.model" returns the non-interacting model as estimated by estimateMainEffect.
  • "main": returns the main effects.
  • "mainsderr": returns the std error of the main effects.
  • "mainsd": returns the std deviation of the main effects.
  • "maintime": returns the estimated time effect as estimated by normalizeMainEffectQuery
  • "mainspatial": returns the estimated spatial effect as estimated by normalizePlateEffect

format
The output format. Possible values:
  • "plain": The data can be returned as a plain vector
  • "platelist": a list of plate matrices that can be passed to plotScreen
  • "reagentMatrix": All values for the same reagent pair are summarized in a matrix of dimension reagents x reagents
  • "targetMatrix": All values for the same gene pair are summarized in a matrix of dimension genes x genes
design
If type is one of the main effect types, the design can be specified to state if the "template" or "query" main effect is returned.
mixTemplateQuery
If TRUE, The template-query and query-template entries in the matrix are symmetrized.
screen
The screen names of which data should be returned.
channel
The channel names of which data should be returned.
do.trafo
Only effective, if type is "data". If TRUE, the data is transformed.
do.inv.trafo
Not effective if type is "data", "p.value", or "q.value". If TRUE, the values are back-transformed to the original scale.
normalized
If TRUE, the normalization data is returned.
withoutgroups
The genes from the specified groups are not returned in the data.
drop
If FALSE, the returned array is reduced in dimensions, whenever there is a dimension 1.

Value

An array containing the specified values is returned. In the case, the format is chosen to be "platelist", a list of matrices is returned.

See Also

RNAinteract-package

Examples

Run this code
data("sgi")

# get the original data, as plain file, reshaped in plate layout,
# reshaped and summarized as target matrix
D <- getData(sgi, type="data", do.inv.trafo = TRUE)
Dplatelayout <- getData(sgi, type="data", 
	     format="platelist", do.inv.trafo = TRUE)
splots::plotScreen(Dplatelayout[["1"]][["nrCells"]],
	     nx=sgi@pdim[2], ny=sgi@pdim[1], ncol=3)
Dmatrix <- getData(sgi, type="data", 
	     format="targetMatrix", do.inv.trafo = TRUE)

# get main effects as plate layout with specified transformation
# (usually log-transformed)
Mplatelayout <- getData(sgi, type="main", design="template", 
	     screen="1", channel="nrCells", format="platelist")
splots::plotScreen(Mplatelayout, nx=sgi@pdim[2], ny=sgi@pdim[1],
	     ncol=3)

# get non-interacting model and pairwise interaction scores as matrix
NImatrix <- getData(sgi, type="ni.model", format="targetMatrix")
PImatrix <- getData(sgi, type="pi", format="targetMatrix")
PIplatelayout <- getData(sgi, type="main", design="query",
	     screen="1", channel="nrCells", format="platelist")
splots::plotScreen(PIplatelayout, nx=sgi@pdim[2], ny=sgi@pdim[1],
             ncol=3)

# get p-values and q-values
PVmatrix <- getData(sgi, type="p.value", format="targetMatrix")
QVmatrix <- getData(sgi, type="q.value", format="targetMatrix")

Run the code above in your browser using DataLab