DrawQQPlot | R Documentation |
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
DrawQQPlot(cancer.exp, immune.exp, name = "")
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. |
Generates a QQ plot.
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.