View source: R/roi_functions.R
genebodies | R Documentation |
This function returns ranges that are defined relative to the strand-specific start and end sites of regions of interest (usually genes).
genebodies(
genelist,
start = 300L,
end = -300L,
fix.start = "start",
fix.end = "end",
min.window = 0L
)
genelist |
A GRanges object containing genes of interest. |
start |
Depending on |
end |
Identical to the |
fix.start |
The reference point to use for defining the strand-specific
start positions of returned ranges, either |
fix.end |
The reference point to use for defining the strand-specific
end positions of returned ranges, either |
min.window |
When |
Unlike
GenomicRanges::promoters
,
distances can be defined to be upstream or downstream by changing the sign
of the argument, and both the start and end of the returned regions can be
defined in terms of the strand-specific start or end site of the input
ranges. For example, genebodies(txs, -50, 150, fix.end = "start")
is
equivalent to promoters(txs, 50, 151)
(the downstream edge is off by
1 because promoters
keeps the downstream interval closed). The
default arguments return ranges that begin 300 bases downstream of the
original start positions, and end 300 bases upstream of the original end
positions.
A GRanges object that may be shorter than genelist
due to
filtering of short ranges. For example, using the default arguments, genes
shorter than 600 bp would be removed.
Mike DeBerardine
intra-range-methods
data("txs_dm6_chr4") # load included transcript data
txs <- txs_dm6_chr4[c(1, 2, 167, 168)]
txs
#--------------------------------------------------#
# genebody regions from 300 bp after the TSS to
# 300 bp before the polyA site
#--------------------------------------------------#
genebodies(txs, 300, -300)
#--------------------------------------------------#
# promoter-proximal region from 50 bp upstream of
# the TSS to 100 bp downstream of the TSS
#--------------------------------------------------#
promoters(txs, 50, 101)
genebodies(txs, -50, 100, fix.end = "start")
#--------------------------------------------------#
# region from 500 to 1000 bp after the polyA site
#--------------------------------------------------#
genebodies(txs, 500, 1000, fix.start = "end")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.