stackedBarplot {GISPA} | R Documentation |
Given a gene, this function will plot the proportion of each sample over all the samples for each gene or row within each data type
stackedBarplot(gispa.output,feature,cpt,type,input.cex,input.cex.lab,input.gap,samp.col,strip.col)
gispa.output |
: A data frame containing genes as rows followed by between gene feature profile statistics for each sample. |
feature |
: Analysis type i.e., one ('1d'), two ('2d') or three ('3d') dimensional feature analysis. |
cpt |
: Changepoint gene set to be plotted. |
type |
: Type of data, e.g., EXP (default) for expression, VAR of variants, CNV for copy number change. |
input.cex |
: character (or symbol expansion): x- and y-axis labels |
input.cex.lab |
: character (or symbol expansion) for the horizontal and vertial strip labels |
input.gap |
: gap or distance between each data type plot |
samp.col |
: a vector of colors of the bar for the three sample groups, reference followed by other two samples |
strip.col |
: color to be used for the vertial strip |
This function expects the output from GISPA function of GISPA package, and highlights the gene set in the selected changepoints and their proportion in each of the three sample groups.
Barplot illustrating each sample proportion for each gene in the selected change point
Bhakti Dwivedi & Jeanne Kowalski
id <- 20 ## number of rows s <- 4 ## number of columns dm <- matrix(runif(id*s,min=0,max=100), nrow=id, ncol=s, dimnames=list(paste("gene", 1:id, sep=""), paste("sample", 1:s, sep=""))) changepoints <- sort(sample(1:2, id, replace=TRUE)) dm <- cbind(dm,changepoints) stackedBarplot(gispa.output=dm, feature=1, cpt=1, type="EXP", input.cex=1.5, input.cex.lab=1.5, input.gap=0.5, samp.col=c("red", "green", "blue"), strip.col="yellow")