getDMPatRegions | R Documentation |
The function counts DMPs overlapping with genomic regions.
In fact, this function operates as getDIMPatGenes
function,
but without the restrictions set for GRanges objects derived from MethylIT
pipeline.
getDMPatRegions(
GR,
regions,
only.hypo = FALSE,
only.hyper = FALSE,
type = "within",
ignore.strand = TRUE,
gene_id_col = NULL,
gene_name_col = NULL,
...
)
## Default S3 method:
getDMPatRegions(
GR,
regions,
only.hypo = FALSE,
only.hyper = FALSE,
type = "within",
ignore.strand = TRUE,
gene_id_col = NULL,
gene_name_col = NULL,
...
)
## S3 method for class 'GRanges'
getDMPatRegions(
GR,
regions,
only.hypo = FALSE,
only.hyper = FALSE,
type = "within",
ignore.strand = TRUE,
gene_id_col = NULL,
gene_name_col = NULL,
...
)
## S3 method for class 'pDMP'
getDMPatRegions(
GR,
regions,
only.hypo = FALSE,
only.hyper = FALSE,
type = "within",
ignore.strand = TRUE,
gene_id_col = NULL,
gene_name_col = NULL,
...
)
## S3 method for class 'InfDiv'
getDMPatRegions(
GR,
regions,
only.hypo = FALSE,
only.hyper = FALSE,
type = "within",
ignore.strand = TRUE,
gene_id_col = NULL,
gene_name_col = NULL,
...
)
## S3 method for class 'list'
getDMPatRegions(
GR,
regions,
only.hypo = FALSE,
only.hyper = FALSE,
type = "within",
ignore.strand = TRUE,
gene_id_col = NULL,
gene_name_col = NULL,
...
)
GR |
An objects object from the any of the classes: 'pDMP', 'InfDiv', GRangesList, GRanges or a list of GRanges. |
regions |
A GRanges object with gene coordinates and gene IDs. A meta-column named 'gene_id' carying the gene ids should be included. If the meta-column named 'gene_id' is not provided, then gene (region) ids will be created using the gene (region) coordinates. |
only.hypo, only.hyper |
logical(1). Whether to select only hypo-methylated or hyper-methylated cytosine sites. |
ignore.strand, type |
Same as for
|
... |
optional arguments for
|
A GRanges object
getDIMPatGenes
## Gene annotation
genes <- GRanges(seqnames = '1',
ranges = IRanges(start = c(3631, 6788, 11649),
end = c(5899, 9130, 13714)),
strand = c('+', '-', '-'))
mcols(genes) <- data.frame(gene_id = c('AT1G01010', 'AT1G01020',
'AT1G01030'))
## Get a dataset of dmps from the package
data(dmps)
## Finally DMPs found on genes
dmrs <- getDMPatRegions(GR = dmps, regions = genes)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.