Learn R Programming

tempoR (version 1.0.4.4)

tempo.runInstance: Build models for all pathways using the control data and test on the test population.

Description

Build models for all pathways using the control data and test on the test population.

Usage

tempo.runInstance(X, Y, genesets, ctrl, test, train = NULL, comps = 10,
  validation = "CV")

Arguments

X

a matrix with sample ids as row names and gene ids as column names.

Y

a list indexed by sample ids, containing numerical values.

genesets

a list of lists. Outer list is indexed by gene set name, inner list contains all gene ids in a given gene set

ctrl

a list of sample ids. The list of control samples to use in scoring.

test

a list of sample ids. The list of test samples to use in scoring.

train

a list of sample ids. The list of control samples to train models on. If null, train on ctrl.

comps

maximum number of components to use in the plsr model

validation

"CV" for 10-fold cross-validation, "LOO" for leave-one-out cross-validation. "CV" is nondeterministic and should not be used where exactly reproducible results are important

Value

a list with the following entries

  • ctrl a list of the sample names used from the control set used for scoring

  • test a list of the sample names used from the test set used for scoring

  • train a list of the sample names used from the control set to train models

  • scores a data frame with gene set ids as row names and a "ctrlMSE" and "score" entry for each gene set with the MSE of control age predictions in cross-validation and the calulated score, respectively

  • pred a matrix with gene set labels, where the age prediction for sample j from the models for gene set i are at i,j

  • Y the continuous variable of interest that models are built with respect to, e.g. age

  • genesets the gene sets used in the analysis

Examples

Run this code
# NOT RUN {
data("dflatExample")
data("gse32472Example")

# It is possible to run just the model-building and scoring functions and skip
# cross-validation.  This is not recommended for general use, but may be useful
# in some cases
results = tempo.runInstance(ctrl=gse32472Example$ctrl,
    test=gse32472Example$test,
    genesets=dflatExample,
    X=gse32472Example$data,
    Y=gse32472Example$age)
# }

Run the code above in your browser using DataLab