Plot GRanges xyz data with grid or rgl package.
view3dStructure(
obj,
feature.gr,
genomicSigs,
region,
signalTransformFun = function(x) {
log2(x + 1)
},
k = 3,
renderer = c("rgl", "threejs", "none"),
lwd.backbone = 2,
col.backbone = "gray",
lwd.maxGenomicSigs = 8,
reverseGenomicSigs = TRUE,
col.backbone_background = if (k == 2) "gray70" else c("gray30", "darkred"),
alpha.backbone_background = 0.5,
lwd.gene = 3,
coor_mark_interval = 5e+05,
col.coor = "black",
show_coor = TRUE,
coor_tick_unit = 50000,
label_gene = TRUE,
col.tension_line = "black",
lwd.tension_line = 1,
length.arrow = unit(abs(diff(obj$x))/20, "native"),
safe_text_force = 3,
square = TRUE,
cluster3Dpoints = FALSE,
...
)
GRanges object with mcols x, y, and/or z
The annotation features to be added. An object of GRanges.
The Genomic signals. An object of GRanges with scores or an object of track.
A GRanges object with the region to be plot.
The transformation function for genomic signals.
The dimension of plot. 2: 2d, 3: 3d.
The renderer of the 3D plots. Could be rgl or threejs. The threejs will create a htmlwidgets. If 'none' is set, a list of object will be returned.
Line width for the linker, gene, interaction node circle, the dashed line of interaction edges, the tension line and the maximal reversed genomic signal.
Color for the DNA chain, the compact DNA chain, the node circle, the linker, the tension line and the coordinates marker.
Plot the genomic signals in reverse values.
Alpha channel for transparency of backbone background.
The coordinates marker interval. Numeric(1). Set to 0 to turn it off. The default value 1e5 means show coordinates every 0.1M bp.
Plot ticks in the line to show the DNA compact tension.
The bps for every ticks. Default is 1K.
Show gene symbol or not.
Length of the edges of the arrow head (in inches).
The loops to avoid the text overlapping.
A logical value that controls whether control points for the curve are created city-block fashion or obliquely. See grid.curve.
A logical value that controls whether cluster the points in 3D. It will be ignored when k=2.
Parameters for create3dGenomicSignals.
Coordinates for 2d or a list of threeJsGeometry objects or a htmlwidget.
obj <- readRDS(system.file("extdata", "4DNFI1UEG1HD.chr21.FLAMINGO.res.rds",
package = "geomeTriD"
))
feature.gr <- readRDS(system.file("extdata", "4DNFI1UEG1HD.feature.gr.rds",
package = "geomeTriD"
))
tjg <- view3dStructure(obj,
k = 3, feature.gr = feature.gr, renderer = "none",
length.arrow = grid::unit(0.000006, "native")
)