multi_diff: Differential gene expression of multi-normalised NanoString...

Description Usage Arguments Value References Examples

View source: R/multi_diff.R

Description

Provides a wrapper around limma to performs differential gene expression analysis of all possible pairwise comparisons on all normalised assays within a count_set object.

Usage

1
2
3
4
5
6
7
multi_diff(
  count_set = NULL,
  adj_method = "fdr",
  p_cut_off = 0.1,
  logFC_cut_off = 0,
  pairing = "unpaired"
)

Arguments

count_set

a normalised, count_set summarized experiment. Default = NULL

adj_method

method for multiple test corrections. Options are: "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr" or "none". See ?p.adjust.methods for a details description and references. Default = "fdr".

p_cut_off

p value threshold for DGE.

logFC_cut_off

log2 fold change threshold for DGE

pairing

if data is paired "paired", if unpaired "unpaired" (Default)

Value

Returns a list containing number of DGE for each normalization method, upset plots and full DEG results and fits.

References

Ritchie, M.E., Phipson, B., Wu, D., Hu, Y., Law, C.W., Shi, W., and Smyth, G.K. (2015). limma powers differential expression analyses for RNA-sequencing and microarray studies. Nucleic Acids Research 43(7), e47.

Nils Gehlenborg (2019). UpSetR: A More Scalable Alternative to Venn and Euler Diagrams for Visualizing Intersecting Sets. R package version 1.4.0. https://CRAN.R-project.org/package=UpSetR

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# biological groups
rnf5_group <- c(rep("WT", 5), rep("KO", 5))

# sample ids
rnf5_sampleid <- c("GSM3638131", "GSM3638132", "GSM3638133", "GSM3638134",
                  "GSM3638135", "GSM3638136", "GSM3638137", "GSM3638138",
                  "GSM3638139", "GSM3638140")

# build count_set
rnf5_count_set <- count_set(count_data = Rnf5,
                            group = rnf5_group,
                            samp_id = rnf5_sampleid)
# normalize
rnf5_count_set_norm <- multi_norm(count_set = rnf5_count_set,
                                  positive_control_scaling = TRUE,
                                  background_correct = "mean2sd",
                                  #plot_dir = "~/Dropbox/git/NanoStringClustR/plot_test/"
                                  )
# rank normalizations
rnf5_eval <- norm_rank(rnf5_count_set_norm)

# differential gene expression
rnf5_multi_diff <- multi_diff(count_set = rnf5_count_set_norm,
                              adj_method = "fdr",
                              p_cut_off = 0.05,
                              logFC_cut_off = 0)

MarthaCooper/NanoStringClustR documentation built on June 25, 2021, 9:41 p.m.