View source: R/granges_overlap.R
granges_overlap | R Documentation |
Find GenomicRanges overlap
Find overlap genomic position overlap between two GRanges objects.
granges_overlap(
dat1,
dat2,
chrom_col.1 = "chrom",
start_col.1 = "start",
end_col.1 = start_col.1,
chrom_col.2 = "chrom",
start_col.2 = "start",
end_col.2 = end_col.2,
return_merged = TRUE,
unique_only = TRUE,
style = "NCBI",
verbose = FALSE
)
dat1 |
Dataset 1 (can be GRanges or data.table). |
dat2 |
Dataset 2. (can be GRanges or data.table). |
chrom_col.1 |
Name of the chromosome column in |
start_col.1 |
Name of the start position column in |
end_col.1 |
Name of the end position column in |
chrom_col.2 |
Name of the chromosome column in |
start_col.2 |
Name of the start position column in |
end_col.2 |
Name of the end position column in |
return_merged |
Whether to return an object with columns
from |
unique_only |
Only return unique rows. |
style |
GRanges style (e.g. "NCBI, "UCSC") set by seqlevelsStyle. |
verbose |
Print messages. |
dat1 <- echodata::BST1
dat2 <- echoannot::xgr_example
GenomicRanges::mcols(dat2) <- NULL
gr.hits <- echoannot::granges_overlap(dat1 = dat1,
dat2 = dat2,
chrom_col.1 = "CHR",
start_col.1 = "POS")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.