Description Usage Arguments Details Value See Also
View source: R/prep_dimRedPlot_sce.R
This will generate a ggplot starting from a DimRedPlot
object.
See get_reducedDimPlot.sce
to start from a SingleCellExperiment
object.
Wrapper function for extracting the X and Y coordinates for the plot as well as the variables for coloring, shape assignment etc. This function expects a SingleCellExperiment object.
1 2 3 4 5 6 7 8 9 10 | plt.DimRedPlot(drp_object, X = "x_axs", Y = "y_axs", color_by = NULL,
shape_by = NULL, size_by = NULL, circle_by = NULL, which_quantile = 1,
ignore_drp_labels = FALSE, theme_size = 14, legend = "auto",
alpha = 0.75, remove_rug = FALSE, set_colors = TRUE,
set_fill_colors = TRUE)
get_reducedDimPlot.sce(object, which_reddim = NULL, which_pcs = c(1, 2),
X = NULL, Y = NULL, dim_red_type = NULL, color_by = NULL,
shape_by = NULL, size_by = NULL, circle_by = NULL,
exprs_values = "counts", add_cell_info = NULL)
|
drp_object |
a |
X |
name of the drp_object column that contains the values for the x axis |
Y |
name of the drp_object column that contains the values for the y axis |
color_by |
specify the column of |
shape_by |
the factor to assign the shape of the points to; max. 10 levels
are accepted for |
size_by |
the factor to assign the size of the points to;
default: |
circle_by |
a factor (e.g. "condition") that will be used to draw circles around the points belonging to the same factor instance. |
which_quantile |
default: 1 |
ignore_drp_labels |
If set to TRUE, all entries of
|
theme_size |
font size for the plot |
legend |
choose wether there should be no legend ("none"), a legend for every factor or whether the legend will only show up for those factors that have more than 1 level ("auto", default setting). |
alpha |
define the opacity of the points, default: .65 |
remove_rug |
Define whether the bars at both axes that represent the two 1d marginal distributions should be removed. Default: FALSE. |
set_colors |
Set to |
set_fill_colors |
Set to |
object |
|
which_reddim |
accessor to retrieve the list of choice for the reduced
dimension coordinates from |
which_pcs |
vector of integers to specify which (principal) components
are going to be used for the x and y coordinates. The default ( |
dim_red_type |
what type of dimensionality reduction was used to generate the data (e.g. "PCA"). Will mostly be used for labelling purposes. Default: NULL |
exprs_values |
types of expression values that will be used for plotting if a gene name is being
specified in either |
add_cell_info |
if you want to add columns for certain entries of
|
X |
directly supply the X coordinates, e.g. |
Y |
directly supply the Y coordinates, e.g. |
color_by |
entry of either |
shape_by |
default: |
size_by |
default: |
circle_by |
Used for encircling points of interest; default: |
which_reddim The reducedDims slot of the SingleCellExperiment object
is a list (SimpleList
. To know which coordinates to extract,
the accessor for the specific reducedDims list member must be given.
ggplot2
object (a plot)
DimRedPlot object: a simple S3-based object, i.e. a list with:
plot_data
: data.frame fit for ggplot2-based plotting
label_data
: additional stuff that may be used for labelling the
x and y axes of the final plot
factors
: names of the plotting variables, e.g. which values
were used for defining the coloring etc.
get_reducedDimPlot.sce
, which generates the DimRedPlot
object that will be used here.
SingleCellExperiment
, reducedDims
,
plt.DimRedPlot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.