show gene or cell distribution after filtering on expression threshold
filterDistributions(
gobject,
feat_type = NULL,
spat_unit = NULL,
expression_values = c("raw", "normalized", "scaled", "custom"),
method = c("threshold", "sum", "mean"),
expression_threshold = 1,
detection = c("feats", "cells"),
plot_type = c("histogram", "violin"),
scale_y = NULL,
nr_bins = 30,
fill_color = "lightblue",
scale_axis = "identity",
axis_offset = 0,
show_plot = NULL,
return_plot = NULL,
save_plot = NULL,
save_param = list(),
default_save_name = "filterDistributions"
)
giotto object
feature type
spatial unit
expression values to use
method to create distribution (see details)
threshold to consider a gene expressed
consider features (e.g. genes) or cells
type of plot
scale y-axis (e.g. "log"), NULL = no scaling
number of bins for histogram plot
fill color for plots
ggplot transformation for axis (e.g. log2)
offset to be used together with the scaling transformation
logical. show plot
logical. return ggplot object
logical. directly save the plot
list of saving parameters from GiottoVisuals::all_plots_save_function
default save name for saving, don't change, change save_name in save_param
ggplot object
There are 3 ways to create a distribution profile and summarize it for
either the features or the cells (spatial units)
1. threshold: calculate features that cross a thresold (default)
2. sum: summarize the features, i.e. total of a feature
3. mean: calculate mean of the features, i.e. average expression
g <- GiottoData::loadGiottoMini("visium")
#> 1. read Giotto object
#> 2. read Giotto feature information
#> 3. read Giotto spatial information
#> 3.1 read Giotto spatial shape information
#> 3.2 read Giotto spatial centroid information
#> 3.3 read Giotto spatial overlap information
#> 4. read Giotto image information
#> python already initialized in this session
#> active environment : '/usr/bin/python3'
#> python version : 3.10
#> checking default envname 'giotto_env'
#> a system default python environment was found
#> Using python path:
#> "/usr/bin/python3"
filterDistributions(g)