DESeqDataSetFromSlidingWindows: create DESeq data object

Description Usage Arguments Details Value Examples

View source: R/preprocess.R

Description

create DESeq data object from sliding window counts, phenotype data and annotation data

Usage

1
2
DESeqDataSetFromSlidingWindows(countData, colData, annotObj, design,
  tidy = FALSE, ignoreRank = FALSE, start0based = TRUE)

Arguments

countData

data.frame or matrix, sliding window count data

colData

DataFrame or data.frame, phenotype data, see DESeqDataSet

annotObj

data.frame or character, can either be a data.frame or a file name, see details

design

formula or matrix, design of the experiment, see DESeqDataSet

tidy

logical, If TRUE, first column is of countData is treated as rownames (defalt: FALSE), see DESeqDataSet

ignoreRank

logical, ignore rank, see DESeqDataSet

start0based

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

Details

If annotObj is a file name, the input file MUST be <TAB> separated, and supports reading in .gz files.
If annotObj is a data.frame, colnames(annotObj) MUST not be empty.
This function checks for the following columns after reading in the file or on data.frame:

This function creates a DESeqDataSet using supplied countData, phenotype data and annotation data. The chromosomal locations and annotations of the sliding windows (parsed from annotObj) can be accessed from the returned object using: rowRanges(object)

Value

DESeq object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data("SLBP_K562_w50s20")
slbpDat <- counts(SLBP_K562_w50s20)
phenoDat <- DataFrame(conditions=as.factor(c(rep('IP',2),'SMI')),
row.names = colnames(slbpDat))
phenoDat$conditions <- relevel(phenoDat$conditions,ref='SMI')
annotDat <- as.data.frame(rowRanges(SLBP_K562_w50s20))
# by default chromsome column is 'seqnames'
# and begin co-ordinate column is 'start'
# rename these columns
colnames(annotDat)[1:2] <- c('chromosome','begin')
slbpDds <- DESeqDataSetFromSlidingWindows(countData = slbpDat,
colData = phenoDat,annotObj = annotDat,design=~conditions)

DEWSeq documentation built on Feb. 7, 2020, 2 a.m.