log_reg {RQdeltaCT}R Documentation

log_reg

Description

This function performs logistic regression analysis, computes odd ratio values, and presents them graphically.

Usage

log_reg(
  data,
  sel.Gene = "all",
  group.study,
  group.ref,
  increment,
  centerline = 1,
  ci = 0.95,
  log.axis = FALSE,
  x.axis.title = "Odds ratio",
  y.axis.title = "",
  axis.title.size = 11,
  axis.text.size = 10,
  legend.title = "p value",
  legend.text.size = 11,
  legend.title.size = 11,
  legend.position = "right",
  plot.title = "",
  plot.title.size = 14,
  save.to.tiff = FALSE,
  dpi = 600,
  width = 15,
  height = 15,
  name.tiff = "OR_plot",
  save.to.txt = FALSE,
  name.txt = "OR_results"
)

Arguments

data

Object returned from make_Ct_ready() or delta_Ct() functions.

sel.Gene

Character vector with names of genes to include, or "all" (default) to use all genes.

group.study

Character: name of study group (group of interest).

group.ref

Character: name of reference group.

increment

Numeric or "mean": the change of expression for which odds ratio values are calculated. If increment = 1, odds ratio values regards for a one-unit increase in gene expression (more suitable where data are not transformed using 2^-value formula). If increment = "mean", odds ratio values are calculated for the situation where gene expression increases by mean of gene expression levels in all samples (more suitable where data were transformed using 2^-value formula).

centerline

Numeric: position of vertical centerline on the plot. Default to 1.

ci

Numeric: confidence level used for computation of confidence interval. Default to 0.95.

log.axis

Logical: if TRUE, axis with odds ratio values will be in log10 scale. Default to FALSE.

x.axis.title

Character: title of x axis. Default to "Gene".

y.axis.title

Character: title of y axis. Default to "value".

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 "Group".

legend.text.size

Integer: font size of legend text. Default to 11.

legend.title.size

Integer: font size of legend title. Default to 11.

legend.position

Position of the legend, can be one of "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 "OR_plot".

save.to.txt

Logical: if TRUE, returned table with results will be saved to .txt file. Default to FALSE.

name.txt

Character: name of saved .txt file, without ".txt" name of extension. Default to "OR_results".

Value

A list that contains an object with plot and data frame with calculated results. Created plot is also displayed on the graphic device.

Examples

library(tidyverse)
library(oddsratio)
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)
data.dCt <- delta_Ct(data.CtF.ready,
                     ref = "Gene8")
log.reg.results <- log_reg(data.dCt,
                           sel.Gene = c("Gene1","Gene16","Gene19","Gene20"),
                           group.study = "Disease",
                           group.ref = "Control",
                           increment = 1)


[Package RQdeltaCT version 1.3.0 Index]