Interactive 3D visualization of QTL–gene relationships using a scatter3D plot.
Usage
qtl3dplotly(
d,
chrlen = gap::hg19,
zmax = 300,
qtl.id = "SNPid:",
qtl.prefix = "QTL:",
qtl.gene = "Gene:",
target.type = "Protein",
TSS = FALSE,
xlab = "QTL position",
ylab = "Gene position",
...
)Arguments
- d
Data frame in
qtl2dplot()-compatible format.- chrlen
Chromosome lengths (e.g.
gap::hg19,hg38).- zmax
Maximum value for z-axis truncation.
- qtl.id
Prefix for SNP identifier.
- qtl.prefix
Prefix for QTL coordinate label.
- qtl.gene
Prefix for gene coordinate label.
- target.type
Label for target entity type.
- TSS
Logical; use transcription start site if TRUE.
- xlab
X-axis label.
- ylab
Y-axis label.
- ...
Additional arguments passed to
qtl2dplot().
Details
This function extends gap::qtl2dplot() into a 3D representation by adding
a z-axis (typically \-log10(p) or similar association strength).
Features:
caps extreme values at
zmaxcolors cis/trans associations
provides interactive hover labels
Examples
if (FALSE) { # \dontrun{
suppressMessages(library(dplyr))
INF <- Sys.getenv("INF")
d <- read.csv(
file.path(INF, "work", "INF1.merge.cis.vs.trans"),
as.is = TRUE
) %>%
dplyr::mutate(log10p = -log10p)
r <- qtl3dplotly(d, zmax = 300)
htmlwidgets::saveWidget(r, file = "qtl3dplotly.html")
r
} # }