Learn R Programming

EMDomics (version 2.2.2)

plot_cvmnull: Plot null distribution of permuted cvm scores vs. calculated cvm scores.

Description

The median of the randomly permuted CVM scores (i.e. the null distribution) is plotted on the x-axis, vs. the observed CVM scores on the y-axis. The line y=x is superimposed.

Usage

plot_cvmnull(cvmobj)

Arguments

cvmobj
An CVMomics object, typically returned via a call to calculate_cvm.

Value

A ggplot object is returned. If the value is not assigned, a plot will be drawn.

See Also

calculate_cvm ggplot

Examples

Run this code
# 100 genes, 100 samples
dat <- matrix(rnorm(10000), nrow=100, ncol=100)
rownames(dat) <- paste("gene", 1:100, sep="")
colnames(dat) <- paste("sample", 1:100, sep="")

# "group A" = first 50, "group B" = second 50
groups <- c(rep("A",50),rep("B",50))
names(groups) <- colnames(dat)

results <- calculate_cvm(dat, groups, nperm=10, parallel=FALSE)
plot_cvmnull(results)

Run the code above in your browser using DataLab