visualize_metrics: Visualize summarized metrics for reference data and synthetic...

View source: R/visualize_metrics.R

visualize_metricsR Documentation

Visualize summarized metrics for reference data and synthetic data

Description

Visualize summarized metrics for reference data and synthetic data

Usage

visualize_metrics(
  simsrt,
  metric_type = c("all", "genewise", "locwise", "GeneMean", "GeneVar", "GeneCV",
    "GeneZeroProp", "LocZeroProp", "LocLibSize"),
  colorpalette = "Set3",
  axistextsize = 12
)

Arguments

simsrt

A SRTsim object

metric_type

Specification of metrics to be plotted. Default value is 'all', which will plot all six metrics: including four gene-wise metrics and two location-wise metrics. "genewise" will produce violin plots for all four gene-wise metrics; "locwise" will produce violin plots for all two location-wise metrics; "GeneMean", "GeneVar", "GeneCV", "GeneZeroProp", "LocZeroProp", and "LocLibSize" will produce single violin plot for the corresponding metric.

colorpalette

Specification of color palette to be passed to palette in the scale_fill_brewer. Default is "Set3"

axistextsize

Specification of axis font size. Default is 12.

Value

Returns a list of ggplots

Examples



## Create a simSRT object
toySRT  <- createSRT(count_in=toyData$toyCount,loc_in = toyData$toyInfo)
set.seed(1)

## Estimate model parameters for data generation
toySRT <- srtsim_fit(toySRT,sim_schem="tissue")

## Generate synthetic data with estimated parameters
toySRT <- srtsim_count(toySRT)

## Compute metrics 
toySRT   <- compareSRT(toySRT)

## Visualize Metrics
visualize_metrics(toySRT)

SRTsim documentation built on Jan. 13, 2023, 5:12 p.m.