Learn R Programming

bulkAnalyseR (version 1.1.0)

scatter_plot: Create a scatter plot of expression between two samples of an experiment

Description

This function creates a scatter plot between two samples.

Usage

scatter_plot(
  sub.expression.matrix,
  anno,
  genes.to.highlight = c(),
  log.transformation = TRUE
)

Value

The scatter plot as a ggplot object.

Arguments

sub.expression.matrix

subset of the expression matrix containing only the two selected samples

anno

annotation data frame containing a match between the row names of the expression.matrix (usually ENSEMBL IDs) and the gene names that should be rendered within the app and in output files; this object is created by generateShinyApp using the org.db specified

genes.to.highlight

vector of gene names to highlight. These should match entries in the anno NAME column.

log.transformation

whether expression should be shown on log (default) or linear scale

Examples

Run this code
expression.matrix.preproc <- as.matrix(read.csv(
  system.file("extdata", "expression_matrix_preprocessed.csv", package = "bulkAnalyseR"), 
  row.names = 1
))[,1:2]

print(scatter_plot(expression.matrix.preproc, c()))

Run the code above in your browser using DataLab