combineAnnotatePeaks: Combine and annotate peaks from different sample types....

Description Usage Arguments Value Examples

Description

This function accomplishes three tasks: (1) Combines peaks from different sample types into one master list, and annotates each peak with it's sample type-specificity (which cell or tissue types the peak can be found in) (2) Categorizes peaks as either TSS-proximal or TSS-distal based on the distance from a known transcription start site (TSS). By defaul, distance is set to 1500 bp but can be changed with the distancefromTSS argument). (3) Optionally, regulatory regions that are within a certain distance of each other can be merged to form a larger regulatory region.

Usage

1
2
3
combineAnnotatePeaks(conspeaks, TSS, merge = FALSE, distancefromTSSdist = 0,
  distancefromTSSprox = 0, mergedist = 0, regionspecific = NA,
  distancefromTSS = 1500)

Arguments

conspeaks

list of GRanges objects for each sample type (output by getConsensusPeaks() function)

TSS

file of transcription start sites

merge

whether or not regions should be merged if they are within a user set distance to each other (default is FALSE)

distancefromTSSdist

merge TSS-distal peaks if they are < distancefromTSSdist apart (set when regionspecific is TRUE)

distancefromTSSprox

merge TSS-proximal if they are < distancefromTSSprox apart (set when regionspecific is TRUE)

mergedist

merge TSS-proximal and TSS-distal if they are < mergedist apart (set when regionspecific is FALSE)

regionspecific

logical to if TRUE, merging occurs within same type peaks (e.g. merge TSS-proximal, then merge TSS-distal)

distancefromTSS

in bp; peaks within distFromTSS of an annotated Transcription Start Site (TSS) will be annotated as TSS-proximal (default=1500bp)

Value

List containing two items: (1) GRanges object: all sample types combined, regions annotated as type-specific and TSS-distal/TSS-proximal specific. (2) Matrix: number and size of TSS-distal and TSS-proximal before and after merging nearby regulatory regions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
csvfile <- loadCSVFile("DNaseEncodeExample.csv")
samplePeaks <- loadBedFiles(csvfile)
consensusPeaks <- getConsensusPeaks(samplepeaks = samplePeaks, minreps = 2)
TSSannot <- getTSS()
consensusPeaksAnnotated <- combineAnnotatePeaks(conspeaks = consensusPeaks,
   TSS = TSSannot,
   merge = TRUE,
   regionspecific = TRUE,
   distancefromTSSdist = 1500,
   distancefromTSSprox = 1000)

## End(Not run)

Mathelab/ALTRE documentation built on May 7, 2019, 3:41 p.m.