makeBioRegionFromGranges: makeBioRegionFromGranges

View source: R/tagMatrix.R

makeBioRegionFromGrangesR Documentation

makeBioRegionFromGranges

Description

make windows from granges object

Usage

makeBioRegionFromGranges(gr, by, type, upstream = 1000, downstream = 1000)

Arguments

gr

a grange object contain region of interest

by

specify be users, e.g. gene, insulator, enhancer

type

one of "start_site", "end_site", "body"

upstream

upstream from start site or end site, can be NULL if the type == 'body'

downstream

downstream from start site or end site, can be NULL if the type == 'body'

Details

makeBioRegionFromGranges() function can make bioregion from granges object.

The differences between makeBioRegionFromGranges() and getBioRegion() is that getBioRegion() get the region object from txdb object but makeBioRegionFromGranges() get the region from the granges object provided by users. For example, txdb object do not contain insulator or enhancer regions. Users can provide these regions through self-made granges object

There are three kinds of regions, start_site, end_site and body.

We take enhancer region to explain the differences of these three regions. enhancer: chr1 1000 1400.

body region refers to the 1000-1400bp.

start_site region with upstream = 100, downstream = 100 refers to 900-1100bp.

end_site region with upstream = 100, downstream = 100 refers to 1300-1500bp.

In makeBioRegionFromGranges(), upstream and downstream can be NULL if the type == 'body'. by should be specified by users and can not be omitted. by parameter will be used to made labels. type should also be specified.

https://github.com/YuLab-SMU/ChIPseeker/issues/189

Value

GRanges object


YuLab-SMU/ChIPseeker documentation built on Nov. 2, 2024, 1:45 p.m.