get_diff_results: Get Differential TSS/TSR results

View source: R/getters.R

get_diff_resultsR Documentation

Get Differential TSS/TSR results

Description

Get the DESeq2 or edgeR differential features.

Usage

get_diff_results(experiment, data_type = c("tss", "tsr"), samples = "all")

Arguments

experiment

TSRexploreR object.

data_type

Either 'tss' or 'tsr'.

samples

A vector of sample names to analyze.

Value

List of differential features data.frames.

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") %>%
  fit_de_model(~condition, data_type="tss", method="edgeR") %>%
  differential_expression(
    data_type="tss",
    comparison_name="Diamide_vs_Untreated",
    comparison_type="coef",
    comparison=2
  )

dr <- get_diff_results(exp, data_type="tss")


zentnerlab/TSRexploreR documentation built on Dec. 30, 2022, 10:27 p.m.