Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Loading a bed file using epivizr
library(epivizr)
library(rtracklayer)
# download example bed file
download.file("https://raw.githubusercontent.com/arq5x/bedtools/master/data/aluY.hg19.bed.gz", destfile="test.bed.gz", method="curl")
# start UI
mgr <- startEpiviz(workspace="mi9NojjqT1l")
# import bed file
gr <- import(BEDFile("test.bed.gz"))
# drop data from unplaced contigs
gr <- keepSeqlevels(gr, paste0("chr",c(1:22,"X","Y")))
# add track with bed file data
dev <- mgr$addDevice(gr, "example bed")
# finish up
mgr$stopServer()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.