Find differential TSSs or TSRs.

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'.

Value

TSRexploreR object with stored DE model.

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.

See also

differential_expression to extract differential TSSs or TSRs from model.

Examples

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")