Description Usage Arguments Value Examples
Plot expression values from an SCESet object against transcript length values defined in the SCESet object or supplied as an argument.
1 2 3 4 5 |
object |
an |
tx_length |
transcript lengths to plot on the x-axis. Can be one of: (1)
the name of a column of |
exprs_values |
character string indicating which values should be used
as the expression values for this plot. Valid arguments are |
colour_by |
optional character string supplying name of a column of
|
shape_by |
optional character string supplying name of a column of
|
size_by |
optional character string supplying name of a column of
|
xlab |
label for x-axis; if |
show_exprs_sd |
logical, show the standard deviation of expression values for each feature on the plot |
show_smooth |
logical, show a smoothed fit through the expression values on the plot |
alpha |
numeric value between 0 (completely transparent) and 1 (completely solid) defining how transparent plotted points (cells) should be. Points are jittered horizontally if the x-axis value is categorical rather than numeric to avoid overplotting. |
theme_size |
numeric scalar giving default font size for plotting theme (default is 10) |
log2_values |
should the expression values be transformed to the log2-scale for plotting (with an offset of 1 to avoid logging zeroes)? |
size |
numeric scalar optionally providing size for points if
|
se |
logical, should standard errors be shown (default |
a ggplot object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | data("sc_example_counts")
data("sc_example_cell_info")
pd <- new("AnnotatedDataFrame", data = sc_example_cell_info)
fd <- new("AnnotatedDataFrame", data =
data.frame(gene_id = rownames(sc_example_counts),
feature_id = paste("feature", rep(1:500, each = 4), sep = "_"),
median_tx_length = rnorm(2000, mean = 5000, sd = 500)))
rownames(fd) <- rownames(sc_example_counts)
example_sceset <- newSCESet(countData = sc_example_counts, phenoData = pd,
featureData = fd)
plotExprsVsTxLength(example_sceset, "median_tx_length")
plotExprsVsTxLength(example_sceset, "median_tx_length", show_smooth = TRUE)
plotExprsVsTxLength(example_sceset, "median_tx_length", show_smooth = TRUE,
show_exprs_sd = TRUE)
## using matrix of tx length values in assayData(object)
mat <- matrix(rnorm(ncol(example_sceset) * nrow(example_sceset), mean = 5000,
sd = 500), nrow = nrow(example_sceset))
dimnames(mat) <- dimnames(example_sceset)
set_exprs(example_sceset, "tx_len") <- mat
plotExprsVsTxLength(example_sceset, "tx_len", show_smooth = TRUE,
show_exprs_sd = TRUE)
## using a vector of tx length values
plotExprsVsTxLength(example_sceset, rnorm(2000, mean = 5000, sd = 500))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.