getCounts: Generates count data for regulatory regions

Description Usage Arguments Value Examples

Description

Counts the number of reads in each regulatory region for each sample type – read count is derived from user-input BAM filex, and regions of interest are supplied in a Granges object, ideally output of combineannotatepeaks.R.

Usage

1
getCounts(annotpeaks, sampleinfo, reference, chrom = NULL)

Arguments

annotpeaks

list output from combineannotatepeaks function

sampleinfo

dataframe as returned from loadCSVFile() function

reference

name of sample type to be considered 'reference' in DESeq2 analysis

chrom

optional, only chromosome chrom will be evaluated

Value

List containing three items: (1) DESeqDataSet: contains count information for all replicates of all samples (2) Matrix: contains number of enhancers and promoters before and after filtering (if applicable) (3) Data frame for creating a density plot (use function plotgetcounts()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
TSSannot <- getTSS()
dir <- system.file('extdata', package='ALTRE', mustWork=TRUE)
csvfile <- file.path(dir, 'lung.csv')
sampleinfo <- loadCSVFile(csvfile)
samplePeaks <- loadBedFiles(sampleinfo)
consPeaks <- getConsensusPeaks(samplepeaks = samplePeaks, minreps=2)
consPeaksAnnotated <- combineAnnotatePeaks(conspeaks = consPeaks,
                                          TSS = TSSannot,
                                          merge = TRUE,
                                          regionspecific = TRUE,
                                          mergedistenh = 1500,
                                          mergedistprom = 1000 )
counts_consPeaks <- getCounts(annotpeaks = consPeaksAnnotated,
                              sampleinfo = sampleinfo,
                              reference = 'SAEC',
                              chrom = 'chr21')

## End(Not run)

ewymathe/testALTREinstall documentation built on May 16, 2019, 9:42 a.m.