topWindowStats: stats for the top windows in each region

Description Usage Arguments Details Value Examples

View source: R/topWindow.R

Description

given window resutls and normalized counts, combine significant overlapping windows into regions and for each region, pick two candidate winodws:

  1. with highest log2FoldChange and

  2. with highest normalized mean in treatment samples (see parameter treatmentCols)

Return a data.frame with region information and stats, and for the selected windows, the following information:

Usage

1
2
3
4
topWindowStats(windowRes, padjCol = "padj", padjThresh = 0.05,
  log2FoldChangeCol = "log2FoldChange", log2FoldChangeThresh = 1,
  start0based = TRUE, normalizedCounts, treatmentCols,
  treatmentName = "treatment", controlName = "control", op = "max")

Arguments

windowRes

data.frame, output from resultsDEWSeq

padjCol

character, name of the adjusted pvalue column (default: padj)

padjThresh

numeric, threshold for p-adjusted value (default: 0.05)

log2FoldChangeCol

character, name of the log2foldchange column (default: log2FoldChange)

log2FoldChangeThresh

numeric, threshold for log2foldchange value (default:1)

start0based

logical, TRUE (default) or FALSE. If TRUE, then the start positions in windowRes is considered to be 0-based

normalizedCounts

data.frame or matrix, normalized read counts per window. rownames(normalizedCounts) and unique_id column from windoeRes must match see counts, vst or rlog

treatmentCols

character vector, column names in normalizedCounts for treatment/case samples. The remaining columns in the data.frame will be considered control samples

treatmentName

character, treatment name, see Details (default: treatment)

controlName

character, control name, see Details (default: control)

op

character, can be one of max (default) or min. max returns windows with maximum log2FoldChange and mean normalized expression in the treatmentCols columns, min returns windows with minimum log2FoldChange and mean normalized expression

Details

The output data.frame of this function has the following columns:

Value

data.frame

Examples

1
2
3
4
5
data(slbpWindows)
data(slbpVst)
slbpList <- topWindowStats(slbpWindows,padjCol = 'pSlidingWindows.adj',
normalizedCounts = slbpVst, treatmentCols = c('IP1','IP2'),
treatmentName = 'SLBP',controlName = 'SMI')

DEWSeq documentation built on Nov. 28, 2020, 2:01 a.m.