Description Usage Arguments Details Value Author(s) Examples
Visualize regions or intervals. e.g. VennDiagrams of intersections of distinct intervals, base pairs and genes.
1 2 3 4 5 6 7 8 9 10 |
input |
A list of input regions or indices |
filename |
The name of the output image file |
type |
The type of plot. only 'venn' is supported for intersections at the moment. |
feature |
How should the regions be intersected. By unique "interval", "gene", "size" or "other" to use the features in the first item in the input list. |
fraction.overlap |
Minimum overlap required as a fraction of A. Default is 1E-9 (i.e. 1bp). |
group |
A grouping parameter for barplots. Possible values include "input", "chr", or a categorical vector of length equal to the sum of the input. |
params |
Additional parameters for plotting or intersecting. See |
verbose |
Include text messages. |
By default a venn diagram is output. If a single input is used then the plot shows the number of unique and collapsed regions after applying a merge.
Plots!
Daryl Waggott
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | if (check.binary("bedtools")) {
# example data
a <- get.random.regions(n = 1000, chr = "chr22", size.mean = 10)
b <- get.random.regions(n = 1000, chr = "chr22", size.mean = 10)
d <- get.random.regions(n = 1000, chr = "chr22", size.mean = 10)
e <- get.random.regions(n = 1000, chr = "chr22", size.mean = 10)
f <- get.random.regions(n = 1000, chr = "chr22", size.mean = 10)
pdf("bedr.plot.region.ex.pdf")
# basic venn diagrams
bedr.plot.region(input = list(a=a,b=b))
bedr.plot.region(input = list(a=a,b=b,d=d))
#bedr.plot.region(input = list(a=a,b=b,d=d,e=e))
#bedr.plot.region(input = list(a=a,b=b,d=d,e=e,f=f))
### change venn parameters
bedr.plot.region(
input = list(a=a,b=b,d=d),
params = list(lty = 2, label.col = "black", main = "Region Overlap")
)
### try with different
#bedr.plot.region(input = list(a=a,b=b), feature = "gene")
#bedr.plot.region(input = list(a=a,b=b), feature = "reference")
#bedr.plot.region(input = list(a=a,b=b), feature = "interval")
#bedr.plot.region(input = list(a=a,b=b), feature = "cluster")
#bedr.plot.region(input = list(a=a,b=b), feature = "bp")
dev.off()
}
|
sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied
######################
#### bedr v1.0.3 ####
######################
checking binary availability...
* Checking path for bedtools... FAIL
* Checking path for bedops... FAIL
* Checking path for tabix... FAIL
tests and examples will be skipped on R CMD check if binaries are missing
* Checking path for bedtools... sh: 1: cannot create /dev/null: Permission denied
FAIL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.