find_ref_gene {RQdeltaCT} | R Documentation |
find_ref_gene
Description
This function assess gene expression stability by calculation the following parameters: minimum, maximum, standard deviation, variance, and stability measures from NormFinder and geNorm algorithms. It also presents C values graphically on a line plot. This function is helpful to select the best reference gene for normalization of Ct values.
Usage
find_ref_gene(
data,
groups,
candidates,
colors,
norm.finder.score = TRUE,
genorm.score = TRUE,
line.width = 1,
angle = 0,
x.axis.title = "",
y.axis.title = "Ct",
axis.title.size = 11,
axis.text.size = 10,
legend.title = "",
legend.title.size = 11,
legend.text.size = 11,
legend.position = "top",
plot.title = "",
plot.title.size = 14,
save.to.tiff = FALSE,
dpi = 600,
width = 15,
height = 15,
name.tiff = "Ct_reference_gene_selection"
)
Arguments
data |
Object returned from make_Ct_ready() functions. |
groups |
Character vector with names of groups used for analysis. If all groups should be included to the analysis, groups parameter should be set to "all". |
candidates |
Character: vector of names of genes - candidates for gene reference. |
colors |
Character: vector of colors for genes, the number of colors should be equal to the number of candidate genes. |
norm.finder.score |
Logical: if TRUE, NormFinder stability score will be calculated. Default to TRUE. |
genorm.score |
Logical: if TRUE, geNorm stability score will be calculated. Default to TRUE. |
line.width |
Numeric: width of lines drawn in the plot. Default to 1. |
angle |
Integer: value of angle in which names of genes are displayed. Default to 0. |
x.axis.title |
Character: title of x axis. Default to "". |
y.axis.title |
Character: title of y axis. Default to "Ct". |
axis.title.size |
Integer: font size of axis titles. Default to 11. |
axis.text.size |
Integer: font size of axis text. Default to 10. |
legend.title |
Character: title of legend. Default to "". |
legend.title.size |
Integer: font size of legend title. Default to 11. |
legend.text.size |
Integer: font size of legend text. Default to 11. |
legend.position |
Position of the legend, can be "top" (default), "right", "bottom", "left", or "none" (no legend). See description for legend.position in ggplot2::theme() function. |
plot.title |
Character: title of plot. Default to "". |
plot.title.size |
Integer: font size of plot title. Default to 14. |
save.to.tiff |
Logical: if TRUE, plot will be saved as .tiff file. Default to FALSE. |
dpi |
Integer: resolution of saved .tiff file. Default to 600. |
width |
Numeric: width (in cm) of saved .tiff file. Default to 15. |
height |
Numeric: height (in cm) of saved .tiff file. Default to 15. |
name.tiff |
Character: name of saved .tiff file, without ".tiff" name of extension. Default to "Ct_reference_gene_selection". |
Value
List containing an object with plot and a table with calculated parameters. Created plot is also displayed on the graphic device.
Examples
library(ctrlGene)
library(tidyverse)
data(data.Ct)
data.CtF <- filter_Ct(data.Ct,
remove.Gene = c("Gene2","Gene5","Gene6","Gene9","Gene11"),
remove.Sample = c("Control08","Control16","Control22"))
data.CtF.ready <- make_Ct_ready(data.CtF, imput.by.mean.within.groups = TRUE)
ref <- find_ref_gene(data.CtF.ready,
groups = c("Disease","Control"),
candidates = c("Gene4", "Gene8","Gene10","Gene16","Gene17", "Gene18"),
col = c("#66c2a5", "#fc8d62","#6A6599", "#D62728", "#1F77B4", "black"),
norm.finder.score = TRUE,
genorm.score = TRUE)
ref[[2]]