scudoTest: Performs SCUDO analysis on test dataset

View source: R/scudoTest.R

scudoTestR Documentation

Performs SCUDO analysis on test dataset

Description

A function to perform the SCUDO analysis on test data, given an object of class ScudoResults used as training model.

Usage

scudoTest(trainScudoRes, testExpData, testGroups = NULL, nTop = NULL,
    nBottom = NULL, foldChange = TRUE, groupedFoldChange = FALSE,
    logTransformed = NULL, distFun = NULL)

Arguments

trainScudoRes

an object of class ScudoResult used as training model

testExpData

either an ExpressionSet, a SummarizedExperiment, a data.frame or a matrix of gene expression data, with a column for each sample and a row for each feature

testGroups

factor containing group labels for each sample in testExpData

nTop

number of up-regulated features to include in the signatures. If NULL, it defaults to the value present in trainScudoRes

nBottom

number of down-regulated features to include in the signatures. If NULL, it defaults to the value present in trainScudoRes

foldChange

logical, whether or not to compute fold-changes from expression data

groupedFoldChange

logical, whether or not to take into account the groups when computing fold-changes. See Details for a description of the computation of fold-changes

logTransformed

logical or NULL. It indicates whether the data is log-transformed. If NULL, an attempt is made to guess if the data is log-transformed

distFun

the function used to compute the distance between two samples. See Details of scudoTrain for the specification of this function

Details

Given an object of class ScudoResults and a set of expression profiles with unknown classification, scudoTest performs an analysis similar to scudoTrain, computing a list of signatures composed of genes over- and under-expressed in each sample, consensus signatures for each group and a distance matrix that quantifies the similarity between the signatures of pairs of samples.

scudoTest differs from scudoTrain in the feature selection step: only the features present in the ScudoResults object taken as input are considered for the follwing steps. The computation of fold-changes, the identification of gene signatures and the computation of the distance matrix are performed as described in the Details of scudoTrain.

If the classification of samples in the testing dataset is provided, it is only used for annotation purposes.

Value

Object of class ScudoResults.

Author(s)

Matteo Ciciani matteo.ciciani@gmail.com, Thomas Cantore cantorethomas@gmail.com

See Also

scudoTrain, scudoNetwork, ScudoResults, scudoClassify

Examples

# generate dummy train dataset
exprDataTrain <- data.frame(a = 11:20, b = 16:25,
    c = rev(1:10), d = c(1:2, rev(3:10)))
exprDataTest <- data.frame(e = 1:10, f = 11:20,
    g = rev(11:20), h = c(1:2, rev(3:10)))
rownames(exprDataTrain) <- rownames(exprDataTest) <- letters[11:20]
grpsTrain <- as.factor(c("G1", "G1", "G2", "G2"))
nTop <- 2
nBottom <- 3

# run scudo
res <- scudoTrain(exprDataTrain, grpsTrain, nTop, nBottom,
    foldChange = FALSE, featureSel = FALSE)
show(res)

# run scudoTest
testRes <- scudoTest(res, exprDataTest, foldChange = FALSE)
show(testRes)


Matteo-Ciciani/rScudo documentation built on Jan. 25, 2024, 8:55 p.m.