View source: R/jj_plot_blended_feature.R
jj_plot_blended_feature | R Documentation |
jj_plot_blended_feature translates two continuous feature scales to a red and green colorscale and plots a blended colorscale a scatterplot. Useful e.g. to visualize co-expression patterns.
jj_plot_blended_feature(df, x, y, colfeat1, colfeat2, pt_size = 1)
df |
sparse matrix, vector, or data.frame |
x |
vector with group annotation, has to have length equal to ncol(sparse_mat)/nrow(data.frame)/length(vector) |
y |
provide |
colfeat1 |
vector specifying range of x axis (and for fc_fc plot range of y axis) |
colfeat2 |
define |
pt_size |
size of points |
ggplot scatterplot
library(Seurat)
dr_df = jj_get_reduction_coords(pbmc_small, 'tsne')
dr_df = jj_bind_features_with_dr_df(pbmc_small, assay= 'RNA', slot = 'data', features = c('CD19', 'CD79A'), dr_df = dr_df, cap_top = 'q95')
jj_plot_blended_feature(dr_df, x = 'tSNE_1', y = 'tSNE_2', colfeat1 = 'CD19', colfeat2 = 'CD79A', pt_size = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.