inst/scripts/convertBlacklist2GRanges.R

library(GRanges)

indir = system.file("extdata",package = "ChIPexoQual")
files = list.files(indir,full.names = TRUE)

blacklists = lapply(files,readr::read_tsv,col_names = FALSE)
names(blacklists) = sapply(strsplit(basename(files),"-"),function(x)x[1])

blacklists = lapply(blacklists,
                function(x)GRanges(seqnames = x$X1,
                                   ranges = IRanges(
                                     start = x$X2,
                                     end = x$X3
                                   )))

save(blacklists,file = "data/blacklists.RData")

Try the ChIPexoQual package in your browser

Any scripts or data that you put into this service are public.

ChIPexoQual documentation built on Nov. 8, 2020, 8:22 p.m.