Learn R Programming

viper (version 1.6.0)

viperSignature: Generic S4 method for signature and sample-permutation null model for VIPER

Description

This function generates a viperSignature object from a test dataset based on a set of samples to use as reference

Usage

viperSignature(eset, ...)
"viperSignature"(eset, pheno, refgroup, method = c("ttest", "zscore", "mean"), per = 1000, seed = 1, cores = 1, verbose = TRUE)
"viperSignature"(eset, ref, method = c("ttest", "zscore", "mean"), per = 1000, seed = 1, cores = 1, verbose = TRUE)

Arguments

eset
ExpressionSet object or numeric matrix containing the test dataset, with genes in rows and samples in columns
...
Additional parameters added to keep compatibility
pheno
Character string indicating the phenotype data to use
refgroup
Vector of character string indicatig the category of pheno to use as reference group
method
Character string indicating how to compute the signature and null model, either ttest, zscore or mean
per
Integer indicating the number of sample permutations
seed
Integer indicating the seed for the random sample generation. The system default is used when set to zero
cores
Integer indicating the number of cores to use (only 1 in Windows-based systems)
verbose
Logical, whether progression messages should be printed in the terminal
ref
Numeric matrix containing the reference samples (columns) and genes in rows

Value

viperSignature S3 object containing the signature and null model

Examples

Run this code
data(bcellViper, package="bcellViper")
ss <- viperSignature(dset, "description", c("N", "CB", "CC"), per=100) # Only 100 permutations to reduce computation time, but it is recommended to perform at least 1000 permutations
res <- viper(ss, regulon)
dim(exprs(dset))
exprs(dset)[1:5, 1:5]
regulon
dim(res)
exprs(res)[1:5, 1:5]
data(bcellViper, package="bcellViper")
d1 <- exprs(dset)
pos <- pData(dset)[["description"]] %in% c("N", "CB", "CC")
ss <- viperSignature(d1[, !pos], d1[, pos], per=100) # Only 100 permutations to reduce computation time, but it is recommended to perform at least 1000 permutations
res <- viper(ss, regulon)
dim(d1)
d1[1:5, 1:5]
regulon
dim(res)
res[1:5, 1:5]

Run the code above in your browser using DataLab