Description Usage Arguments Details Value Author(s) Examples
View source: R/GenomicHilbertCurve.R
Initialize a Hilbert curve specifically for genomic data
1 2 | GenomicHilbertCurve(chr = paste0("chr", c(1:22, "X", "Y")), species = "hg19",
background = NULL, ...)
|
chr |
a vector of chromosome names. Note it should have 'chr' prefix. This argument will be ignored when |
species |
abbreviation of species, e.g. 'hg19' or 'mm10'. |
background |
the background can be provided as a |
... |
common arguments in |
Multiple chromosomes can be visualized in a same Hilbert curve. All chromosomes are concatenated on after the other based on the order which is specified.
Since chromosomes will have irregular shapes on the curve, under 'pixel' mode,
users can set border
option in hc_map,GenomicHilbertCurve-method
to highlight
borders of chromosomes to identify their locations on the curve.
A GenomicHilbertCurve-class
object
Zuguang Gu <z.gu@dkfz.de>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | require(circlize)
require(GenomicRanges)
bed = generateRandomBed()
gr = GRanges(seqnames = bed[[1]], ranges = IRanges(bed[[2]], bed[[3]]))
hc = GenomicHilbertCurve()
hc_points(hc, gr)
hc = GenomicHilbertCurve(chr = c("chr1", "chr2"))
hc_points(hc, gr)
bg = GRanges(seqnames = c("chr1", "chr2"),
ranges = IRanges(c(1,10000000), c(10000000,20000000)))
hc = GenomicHilbertCurve(background = bg, level = 6)
hc_points(hc, gr, gp = gpar(fill = rand_color(length(gr))))
hc_map(hc, fill = NA, border = "grey", add = TRUE)
|
Loading required package: grid
Loading required package: IRanges
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, sd, var, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, colMeans, colSums, colnames, do.call,
duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
setdiff, sort, table, tapply, union, unique, unsplit, which,
which.max, which.min
Loading required package: S4Vectors
Loading required package: stats4
Attaching package: 'S4Vectors'
The following object is masked from 'package:base':
expand.grid
Loading required package: GenomicRanges
Loading required package: GenomeInfoDb
Loading required package: circlize
Warning message:
In file.remove(chromInfo) :
cannot remove file '/work/tmp/tmp/RtmpgQuE0T/hg19_chromInfo.txt.gz', reason 'No such file or directory'
Warning message:
In file.remove(chromInfo) :
cannot remove file '/work/tmp/tmp/RtmpgQuE0T/hg19_chromInfo.txt.gz', reason 'No such file or directory'
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.