Created
December 18, 2014 15:20
-
-
Save hcorrada/f930fa0092f1100f1d37 to your computer and use it in GitHub Desktop.
Loading a bed file using epivizr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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