stackedBarplot: A plotting function for each sample proportion

Description Usage Arguments Details Value Author(s) Examples

View source: R/stackedBarplot.R

Description

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

Usage

1
stackedBarplot(gispa.output,feature,cpt,type,input.cex,input.cex.lab,input.gap,samp.col,strip.col)

Arguments

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

Details

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.

Value

Barplot illustrating each sample proportion for each gene in the selected change point

Author(s)

Bhakti Dwivedi & Jeanne Kowalski

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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")

BhaktiDwivedi/GISPA documentation built on June 23, 2020, 3:41 p.m.