Learn R Programming

saps (version 2.4.2)

plotSapsScoreDensity: Draw density plot of saps_score values for random gene sets

Description

This function retrieves the saps_score values for the random gene sets generated during the computation of saps_qvalue for a given gene set. These are drawn as a density plot, with the value of saps_score for the gene set indicated.

Usage

plotSapsScoreDensity(geneset, ...)

Arguments

geneset
A geneset as returned by saps.
...
Additional arguments to be passed to plot

Value

  • The function is used for side-effects (drawing a plot). No value is returned.

See Also

saps calculateQValue

Examples

Run this code
# 25 patients, none lost to followup
followup <- rep(1, 25)

# first 5 patients have good survival (in days)
time <- c(25, 27, 24, 21, 26, sample(1:3, 20, TRUE))*365

# create data for 100 genes, 25 patients
dat <- matrix(rnorm(25*100), nrow=25, ncol=100)
colnames(dat) <- as.character(1:100)

# create two random genesets of 5 genes each
set1 <- sample(colnames(dat), 5)
set2 <- sample(colnames(dat), 5)

genesets <- rbind(set1, set2)

# increase expression levels for set1 for first 5 patients
dat[1:5, set1] <- dat[1:5, set1]+10

# run saps and compute q-values
results <- saps(genesets, dat, time, followup, random.samples=100,
               compute_qvalue=TRUE, qvalue.samples=10)

set <- results$genesets[["set1"]]

# qvalue.samples=10 is too small to achieve significance
plotSapsScoreDensity(set)

Run the code above in your browser using DataLab