View source: R/plot_cistrans.R
| plot_cistrans | R Documentation |
Scatterplot of gene location vs QTL location to display eQTL/pQTL results
plot_cistrans(
peaks,
map,
pheno_pos,
gap = 0,
cis_window = 1,
pch = 21,
col = "slateblue",
bg = "slateblue",
cex = 0.8,
pch_cis = 21,
col_cis = "violetred",
bg_cis = "violetred",
cex_cis = 0.8,
pty = "s",
bgcolor = "gray90",
altbgcolor = "gray80",
...
)
peaks |
Data frame of QTL results, as output by |
map |
Marker map, as a list of chromosomes, each being a vector of positions; used to get chromosome names and start/end |
pheno_pos |
Data frame with chromosome, position, and name of
the phenotypes in |
gap |
Gap between chromosomes in the plot |
cis_window |
Window size that defines cis-QTL (on same chromosome, and position of gene within this distance of QTL position) |
pch |
Point type for "trans" points |
col |
Point color for "trans" points |
bg |
Background color for "trans" points |
cex |
Character expansion size for "trans" points |
pch_cis |
Point type for "cis" points |
col_cis |
Point color for "cis" points |
bg_cis |
Background color for "cis" points |
cex_cis |
Character expansion size for "cis" points |
pty |
Plot type; the default "s" forces a square plot; use "m" to use the maximal plotting region. |
bgcolor |
Background color for chromosome rectangles |
altbgcolor |
Alternate background color for chromosome rectangles |
... |
Additional graphics arguments passed to |
Invisibly returns a data frame with peaks merged with
pheno_pos, with an additional column cis that indicates
which QTL appear to be cis (vs trans).
plot_scan1(), find_peaks(), plot_lodpeaks()
## Not run:
# download example pQTL results (from Keele et al. 2026, https://doi.org/10.1016/j.xgen.2025.101069)
# contains qtl, map, and pheno_pos
url <- "https://kbroman.org/qtl2/assets/sampledata/pqtl_data.RData"
tempfile <- file.path(tempdir(), basename(url))
download.file(url, tempfile)
load(tempfile)
unlink(tempfile)
plot_cistrans(qtl, map, pheno_pos, cis_window=5)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.