DrawQQPlot: Draw QQ Plot Comparing Cancer and Immune Expression

View source: R/timer.R

DrawQQPlotR Documentation

Draw QQ Plot Comparing Cancer and Immune Expression

Description

This function creates a quantile-quantile (QQ) plot to compare the gene expression distributions between cancer and immune samples. The QQ plot helps assess if the two distributions are similarly shaped by plotting their quantiles against each other. Points lining up along the diagonal line indicate similar distributions. The function also fits a linear model to the central portion of the data (excluding the lowest 40

Usage

DrawQQPlot(cancer.exp, immune.exp, name = "")

Arguments

cancer.exp

A vector of gene expression data for cancer samples.

immune.exp

A vector of gene expression data for immune samples.

name

Optional parameter to add a subtitle with additional information.

Value

Generates a QQ plot.

Examples

cancer_exp <- rnorm(100, mean = 5, sd = 1.5)

immune_exp <- rnorm(100, mean = 5, sd = 1.5)

expression_data <- data.frame(
  Cancer_Expression = cancer_exp,
  Immune_Expression = immune_exp
)

DrawQQPlot(cancer.exp = expression_data$Cancer_Expression,
           immune.exp = expression_data$Immune_Expression,
           name = "Comparison of Gene Expression")

IOBR/IOBR documentation built on Nov. 13, 2024, 5:22 a.m.