fit_de_model: Differential feature analysis

Description Usage Arguments Details Value See Also Examples

View source: R/diff_expression.R

Description

Find differential TSSs or TSRs.

Usage

1
2
3
4
5
6
7
fit_de_model(
  experiment,
  formula,
  data_type = c("tss", "tsr"),
  samples = "all",
  method = "DESeq2"
)

Arguments

experiment

TSRexploreR object.

formula

Formula for differenatial feature analysis.

data_type

Whether TSSs ('tss') or TSRs ('tsr') should be analyzed

samples

A vector of sample names to analyze.

method

Build DE model using either 'DESeq2' or 'edgeR'.

Details

This function uses either DESeq2 or edgeR to find differential TSSs or TSRs. 'formula' should be a valid R formula in any form accepted by DESeq2 or edgeR, where the formula components are any columns present in the sample sheet.

Value

TSRexploreR object with stored DE model.

See Also

differential_expression to extract differential TSSs or TSRs from model.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
data(TSSs)
sample_sheet <- data.frame(
  sample_name=c(
    sprintf("S288C_D_%s", seq_len(3)),
    sprintf("S288C_WT_%s", seq_len(3))
  ),
  file_1=rep(NA, 6), file_2=rep(NA, 6),
  condition=c(
    rep("Diamide", 3),
    rep("Untreated", 3)
  )
)

exp <- TSSs %>%
  tsr_explorer(sample_sheet=sample_sheet) %>%
  format_counts(data_type="tss")

exp <- fit_de_model(exp, data_type="tss", formula=~condition, method="edgeR")

rpolicastro/tsrexplorer documentation built on Oct. 17, 2021, 3:02 p.m.