DEG.analysis {ORFik} | R Documentation |
Expression analysis of 1 dimension, usually between conditions of RNA-seq.
Using the standardized DESeq2 pipeline flow.
Creates a DESeq model (given x is the target.contrast argument)
(usually 'condition' column)
1. RNA-seq model: design = ~ x (differences between the x groups in RNA-seq)
DEG.analysis( df, output.dir = QCfolder(df), target.contrast = design[1], design = ORFik::design(df), p.value = 0.05, counts = countTable(df, "mrna", type = "summarized"), batch.effect = TRUE, pairs = combn.pairs(unlist(df[, target.contrast])), plot.title = "", plot.ext = ".pdf", width = 6, height = 6, dot.size = 0.4, relative.name = paste0("DEG_plot", plot.ext) )
df |
a |
output.dir |
character, default |
target.contrast |
a character vector, default |
design |
a character vector, default |
p.value |
a numeric, default 0.05 in interval (0,1) or "" to not show. What p-value used for the analysis? Will be shown as a caption. |
counts |
a SummarizedExperiment, default: countTable(df, "mrna", type = "summarized"), all transcripts. Assign a subset if you don't want to analyze all genes. It is recommended to not subset, to give DESeq2 data for variance analysis. |
batch.effect |
logical, default TRUE. Makes replicate column of the experiment
part of the design. |
pairs |
list of character pairs, the experiment contrasts. Default:
|
plot.title |
title for plots, usually name of experiment etc |
plot.ext |
character, default: ".pdf". Alternatives: ".png" or ".jpg". |
width |
numeric, default 6 (in inches) |
height |
numeric, default 6 (in inches) |
dot.size |
numeric, default 0.4, size of point dots in plot. |
relative.name |
character, Default: |
#' Analysis is done between each possible
combination of levels in the target contrast If target contrast is the condition column,
with factor levels: WT, mut1 and mut2 with 3 replicates each. You get comparison
of WT vs mut1, WT vs mut2 and mut1 vs mut2.
The respective result categories are defined as:
(given a user defined p value, shown here as 0.05):
Significant - p-value adjusted < 0.05 (p-value cutoff decided by 'p.value argument)
The LFC values are shrunken by lfcShrink(type = "normal").
Remember that DESeq by default can not
do global change analysis, it can only find subsets with changes in LFC!
a data.table with columns: (contrast variable, gene id, regulation status, log fold changes, p.adjust values, mean counts)
doi: 10.1002/cpmb.108
Other DifferentialExpression:
DEG.plot.static()
,
DTEG.plot()
,
te.table()
,
te_rna.plot()
## Simple example (use ORFik template, then split on Ribo and RNA) df <- ORFik.template.experiment() df.rna <- df[df$libtype == "RNA",] design(df.rna) # The full experimental design design(df.rna)[1] # Default target contrast #dt <- DEG.analysis(df.rna)