Learn R Programming

DCA (version 2.0)

plot_la: Visualizing the dynamic correlation between a pair of genes given the AL scouting vector.

Description

Given three vectors, x, y and z, the function produces a color scatter plot of x and y, colored by the grouping of z.

Usage

plot_la(x, y, z, use.locfdr = FALSE, cols = c("red", "green", "blue"), cex = 0.5)

Arguments

x

The x vector.

y

The y vector.

z

The z vector, conditioned on which X and Y have dynamic correlation.

use.locfdr

Whether to use local fdr to group the z values. If TRUE, locfdr() is used and the fdr (posterior probability of belonging to the more extreme groups) threshold is 0.5. If FALSE, the z values are cut at the 0.33 and 0.67 quantiles into three groups.

cols

The colors of the groups.

cex

The point size to be passed to plot().

Value

A vector, each item is a string, recording the LA score and the correlation in each of the point groups as determined by z values.

Details

The locfdr approach is only to be used when it is clear z has heavy tails, and it is believed such points are driving the dynamic correlation.

Examples

Run this code
# NOT RUN {
x<-la.simu.gen(n=100,p=20,n.grp=2, n.noise.gene=10, rho=0.25, pwr=1)
plot_la(x$dat[1,], x$dat[2,], x$z[,1],use.locfdr=FALSE)
# }

Run the code above in your browser using DataLab