Show the missing value distributation.
show_missing_values(
object,
show_row_names = FALSE,
show_column_names = TRUE,
row_names_gp = gpar(fontsize = 12),
column_names_gp = gpar(fontsize = 12),
column_names_rot,
cell_color = "transparent",
row_names_side = "right",
percentage = FALSE,
sample_na_cutoff = 50,
variable_na_cutoff = 50,
only_outlier_samples = FALSE,
only_outlier_variables = FALSE,
return_as_ggplot = FALSE,
...
)
(required) mass_dataset class object.
show row names or not. see?ComplexHeatmap::Heatmap
show column names or not. see?ComplexHeatmap::Heatmap
row names gp, see?ComplexHeatmap
column names gp, see?ComplexHeatmap
column names rot see?ComplexHeatmap::Heatmap
Cell color.
Row names side. left or right.
percentage or not.
Na cutoff for samples.
Na cutoff for variables
Only show the outlier samples?
Only show the outlier variables?
Return plot as ggplot2 object?
Other parameters for ComplexHeatmap::Heatmap
A ggplot2 class object
data("expression_data")
data("sample_info")
data("variable_info")
object =
create_mass_dataset(
expression_data = expression_data,
sample_info = sample_info,
variable_info = variable_info,
)
object
#> --------------------
#> massdataset version: 1.0.33
#> --------------------
#> 1.expression_data:[ 1000 x 8 data.frame]
#> 2.sample_info:[ 8 x 4 data.frame]
#> 8 samples:Blank_3 Blank_4 QC_1 ... PS4P3 PS4P4
#> 3.variable_info:[ 1000 x 3 data.frame]
#> 1000 variables:M136T55_2_POS M79T35_POS M307T548_POS ... M232T937_POS M301T277_POS
#> 4.sample_info_note:[ 4 x 2 data.frame]
#> 5.variable_info_note:[ 3 x 2 data.frame]
#> 6.ms2_data:[ 0 variables x 0 MS2 spectra]
#> --------------------
#> Processing information
#> 1 processings in total
#> create_mass_dataset ----------
#> Package Function.used Time
#> 1 massdataset create_mass_dataset() 2024-09-06 08:49:57
##show missing values plot
show_missing_values(object)
show_missing_values(object[1:10,], cell_color = "white")
###only show subject samples
object %>%
activate_mass_dataset(what = "sample_info") %>%
filter(class == "Subject") %>%
show_missing_values()
###only show QC samples
object %>%
activate_mass_dataset(what = "expression_data") %>%
dplyr::select(contains("QC")) %>%
show_missing_values()
###only show features with mz < 100
object %>%
activate_mass_dataset(what = "variable_info") %>%
dplyr::filter(mz < 100) %>%
show_missing_values(cell_color = "white",
show_row_names = TRUE,
row_names_side = "left",
percentage = TRUE,
sample_na_cutoff = 50,
variable_na_cutoff = 20)