View source: R/plotFunctions.R
ggGeneOnTSNE | R Documentation |
Plot gene expression on tSNE map
ggGeneOnTSNE(
Y,
dat.map,
gene.to.show,
out.prefix = NULL,
p.ncol = 3,
theme.use = theme_bw,
xlim = NULL,
ylim = NULL,
size = NULL,
pt.alpha = 0.5,
pt.order = "value",
clamp = NULL,
palette.name = "YlOrRd",
verbose = F,
fun.extra = NULL,
width = 9,
height = 8,
scales = "fixed",
my.ggPoint = geom_point,
par.geom_point = list(),
par.legend = list(),
splitBy = NULL
)
Y |
matrix or data.frame; Gene expression data, rownames shoud be gene id, colnames should be sample id |
dat.map |
data.frame; tSNE map, must be two columns data.frame and rownames should be sample id |
gene.to.show |
character; gene id to be showd on the tSNE map |
out.prefix |
character; output prefix (default: NULL) |
p.ncol |
integer; number of columns in the plot's layout (default: 3) |
theme.use |
function; which theme to use (default: theme_bw) |
xlim |
integer or NULL; only draw points lie in the ragne specified by xlim and ylim (default NULL) |
ylim |
integer or NULL; only draw points lie in the ragne specified by xlim and ylim (default NULL) |
size |
double; points' size. If NULL, infer from number of points (default NULL) |
pt.alpha |
numeric; alpha of the points (default: 0.5) |
pt.order |
character; (default: "value") |
clamp |
integer vector; expression values will be clamped to the range defined by this parameter, such as c(0,15). (default: NULL ) |
palette.name |
character; which palette to use, such as "RdBu","RdYlBu" (default: NULL) |
verbose |
logical; (default: FALSE) |
fun.extra |
function; (default: NULL) |
width |
numeric; width of the plot (default: 9) |
height |
numeric; height of the plot (default: 8) |
scales |
character; whether use the same scale across genes. one of "fixed" or "free" (default: "fixed") |
my.ggPoint |
function; used to plot scatter plot, such as geom_point, geom_point_rast, geom_scattermore, geom_scattermost (default: geom_point) |
par.geom_point |
list; extra parameters for geom_point/geom_point_rast; (default: list()) |
par.legend |
list; lengend parameters, used to overwrite the default setting; (default: list()) |
splitBy |
character; split by (default: NULL) |
For genes contained in both 'Y' and 'gene.to.show', show their expression on the tSNE map provided as 'dat.map'. One point in the map represent a cell; cells with higher expression also have darker color.
a ggplot object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.