Skip to content

Commit

Permalink
stage
Browse files Browse the repository at this point in the history
  • Loading branch information
0xF6 committed Jul 31, 2019
1 parent 5e95f74 commit ea55e89
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
28 changes: 28 additions & 0 deletions extra/scripts/genome.rd7.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.pkgname <- "genome.rd7"
.seqnames <- paste("chr", c(1:22, "X", "Y"), sep = "")
.circ_seqs <- "chrD"
.mseqnames <- NULL

.onLoad <- function(libname, pkgname) {
if (pkgname != .pkgname)
stop("package name (", pkgname, ") is not ", "the expected name (", .pkgname, ")")
extdata_dirpath <- system.file("gendata", package = pkgname, lib.loc = libname, mustWork = TRUE)
bsgenome <- BSgenome(
organism = "Unknown",
species = "unk",
provider = "UCSC",
provider_version = "hg19",
release_date = "July 2019",
release_name = "Genome",
seqnames = .seqnames,
circ_seqs = .circ_seqs,
mseqnames = .mseqnames,
seqs_pkgname = pkgname,
seqs_dirpath = extdata_dirpath
)
ns <- asNamespace(pkgname)

objname <- pkgname
assign(objname, bsgenome, envir = ns)
namespaceExport(ns, objname)
}
8 changes: 4 additions & 4 deletions extra/scripts/viz-gen.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ library(ggbio)
library(GenomicRanges)
p <- ggbio()
data("CRC", package = "biovizBase")
head(hg19sub)
p <- ggbio() + circle(hg19sub, geom = "ideo", fill = "gray70") +
+ circle(hg19sub, geom = "scale", size = 2) +
+ circle(hg19sub, geom = "text", aes(label = seqnames), vjust = 0, size = 3)
head(hg18sub)
p <- ggbio() + circle(hg19sub, geom = "ideo", fill = "yellow") +
circle(hg19sub, geom = "scale", size = 3) +
circle(hg19sub, geom = "text", aes(label = seqnames), vjust = 10, size = 3)
p

0 comments on commit ea55e89

Please sign in to comment.