View source: R/genomic_intervals_operations.R
simulate_windows | R Documentation |
This function counts genes that are contained in sliding windows related to each SNP.
simulate_windows(
gene_ranges,
marker_ranges,
windows = seq(0.1, 2, by = 0.1),
expand_intervals = TRUE
)
gene_ranges |
A GRanges object with genomic coordinates of all genes in the genome. |
marker_ranges |
Genomic positions of SNPs. For a single trait, a GRanges object. For multiple traits, a GRangesList or CompressedGRangesList object, with each element of the list representing SNP positions for a particular trait. |
windows |
Sliding windows (in Mb) upstream and downstream relative to each SNP. Default: seq(0.1, 2, by = 0.1). |
expand_intervals |
Logical indicating whether or not to expand markers that are represented by intervals. This is particularly useful if users want to use a custom interval defined by linkage disequilibrium, for example. Default: TRUE. |
By default, the function creates 20 sliding windows by expanding upstream and downstream boundaries for each SNP from 0.1 Mb (100 kb) to 2 Mb.
A ggplot object summarizing the results of the simulations.
findOverlaps-methods
data(snp_pos)
data(gene_ranges)
simulate_windows(gene_ranges, snp_pos)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.