plotReceptLoss: Plot histogram of genes with expression loss

Description Usage Arguments Value Examples

View source: R/scripts.R

Description

This function allows you to plot histograms of tumor and adj normal data

Usage

1
plotReceptLoss(exprMatrNml, exprMatrTum, rldf, geneName, addToTitle = "", clrs)

Arguments

exprMatrNml

A matrix of expression values from normal tissue. Each row is a gene, and each column is a patient or sample. Genes should be in same order as exprMatrTum.

exprMatrTum

A matrix of expression values from tumor tissue. Each row is a gene, and each column is a patient or sample. Genes should be in same order as exprMatrNml.

rldf

The dataframe output from running the receptLoss function

geneName

The name of the gene to plot. The name of the gene should correspond to a row name in both exprMatrNml and exprMatrTum matrices.

addToTitle

A string that can be added to the title, which includes the gene name.

clrs

Vector of length 2 containing colors to use for plot

Value

returns an object of class 'ggplot'

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
exprMatrNml <- matrix(abs(rnorm(100, mean=2)), nrow=10)
exprMatrTum <- matrix(abs(rnorm(100)), nrow=10)
geneNames <- paste0(letters[seq_len(nrow(exprMatrNml))],
seq_len(nrow(exprMatrNml)))
rownames(exprMatrNml) <- rownames(exprMatrTum) <- geneNames
nSdBelow <- 2
minPropPerGroup <- .2
rl <- receptLoss(exprMatrNml, exprMatrTum, nSdBelow, minPropPerGroup)
clrs <- c("#E78AC3", "#8DA0CB")
plotReceptLoss(exprMatrNml, exprMatrTum, rl, geneName="g7", clrs=clrs)

dpique/receptLoss documentation built on April 27, 2020, 3:21 a.m.