get_shifting_results: Get Shifting Results

View source: R/getters.R

get_shifting_resultsR Documentation

Get Shifting Results

Description

Extract the TSR shifting results.

Usage

get_shifting_results(experiment, samples = "all")

Arguments

experiment

TSRexploreR object.

samples

A vector of sample names to analyze.

Value

List of TSR shifting data.frames.

Examples

data(TSSs)
assembly <- system.file("extdata", "S288C_Assembly.fasta", package = "TSRexploreR")
samples <- 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=samples, genome_assembly=assembly) %>%
  format_counts(data_type="tss") %>%
  tss_clustering(threshold=3) %>%
  merge_samples(data_type = "tss", merge_group="condition") %>%
  merge_samples(data_type = "tsr", merge_group="condition") %>%
  tss_shift(
    sample_1=c(TSS="S288C_WT_1", TSR="S288C_WT_1"),
    sample_2=c(TSS="S288C_D_1", TSR="S288C_D_1"),
    comparison_name="Untreated_vs_Diamide",
    max_distance = 100, min_threshold = 10, n_resamples = 1000L
  )
  
sr <- get_shifting_results(exp)


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