Date: 2026-04-28

# Visualization

Kevin Stachelek1* and Bhavana Bhat1**

1University of Southern California

*kevin.stachelek@gmail.com
**bbhat@usc.edu

#### 28 April 2026

#### Package

chevreulPlot 1.4.0

This article demonstrates the data visualization tools in Chevreul. We’ll introduce included functions, their usage, and resulting plots

First step is to load chevreulPlot package and all other packages required

    library(chevreulPlot)
    library(scater)
    library(scran)
    library(patchwork)

    data("small_example_dataset")

The different plotting functions within chevreulPlot allows for visualization of data, these plots can be customized for interactive or non-interactive display.

# 1 Plot expression

Expression of a feature (genes or transcripts) can be plotted on a given embedding resulting in an interactive feature plot.

When plotting only one feature, output is identical to `SingleCellExperiment::FeaturePlot`

    plot_feature_on_embedding(small_example_dataset,
        embedding = "UMAP",
        features = "Gene_0001", return_plotly = FALSE
    )

An interactive output plot can be generated by specifying `return_plotly = TRUE` which uses `ggplotly` allowing identification of individual cells for further investigation.

## 1.1 Plot read count or other QC measurements

The `plot_colData_histogram` function displays a histogram of cell read counts colored according to a categorical variable using the argument `fill_by`. Here we can see that read counts for this dataset are distinctly different depending on the sequencing batch

    plot_colData_histogram(small_example_dataset,
        group_by = "sizeFactor",
        fill_by = "Treatment"
    )

## 1.2 Plot metadata variable

Make an interactive scatter plot of a metadata variable, where each point in the plot represents a cell whose position on the plot is given by the cell embedding determined by the dimensional reduction technique by default, “UMAP”. The group argument specifies the colData variable by which to group the cells by, by default, “batch”.

    plot_colData_on_embedding(small_example_dataset,
        group = "gene_snn_res.1",
        embedding = "UMAP"
    )

This function utilizes a SingleCellExperiment function, `DimPlot()`, as sub function which produces the dimensional reduction plot. The interactive parameter, `return_plotly`, in plot_colData_on_embedding when set to TRUE will convert the plot into an interactive plot using ggplotly function from R’s plotly package

## 1.3 Plot cluster marker genes

Marker genes of louvain clusters or additional experimental metadata can be plotted using `plot_marker_features`. This allows visualization of n marker features grouped by the metadata of interest. Marker genes are identified using wilcoxon rank-sum test as implemented in `presto`. In the resulting dot plot the size of the dot corresponds to the percentage of cells expressing the feature in each cluster and the color represents the average expression level of the feature.

    plot_marker_features(small_example_dataset,
        group_by = "gene_snn_res.1",
        marker_method = "wilcox"
    )

## 1.4 Plotting transcript composition

`plot_transcript_composition()` plots the proportion of reads of a given gene map to each transcript. The gene of interest is specified by the argument ‘gene_symbol’.

    sessionInfo()
    #> R version 4.6.0 Patched (2026-04-24 r89963)
    #> Platform: aarch64-apple-darwin23
    #> Running under: macOS Tahoe 26.3.1
    #>
    #> Matrix products: default
    #> BLAS:   /Library/Frameworks/R.framework/Versions/4.6/Resources/lib/libRblas.0.dylib
    #> LAPACK: /Library/Frameworks/R.framework/Versions/4.6/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.1
    #>
    #> locale:
    #> [1] C/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
    #>
    #> time zone: America/New_York
    #> tzcode source: internal
    #>
    #> attached base packages:
    #> [1] stats4    stats     graphics  grDevices utils     datasets  methods
    #> [8] base
    #>
    #> other attached packages:
    #>  [1] patchwork_1.3.2             scran_1.40.0
    #>  [3] chevreulPlot_1.4.0          chevreulProcess_1.4.0
    #>  [5] scater_1.40.0               ggplot2_4.0.3
    #>  [7] scuttle_1.22.0              SingleCellExperiment_1.34.0
    #>  [9] SummarizedExperiment_1.42.0 Biobase_2.72.0
    #> [11] GenomicRanges_1.64.0        Seqinfo_1.2.0
    #> [13] IRanges_2.46.0              S4Vectors_0.50.0
    #> [15] BiocGenerics_0.58.0         generics_0.1.4
    #> [17] MatrixGenerics_1.24.0       matrixStats_1.5.0
    #> [19] BiocStyle_2.40.0
    #>
    #> loaded via a namespace (and not attached):
    #>   [1] RColorBrewer_1.1-3        jsonlite_2.0.0
    #>   [3] shape_1.4.6.1             magrittr_2.0.5
    #>   [5] ggbeeswarm_0.7.3          GenomicFeatures_1.64.0
    #>   [7] farver_2.1.2              rmarkdown_2.31
    #>   [9] GlobalOptions_0.1.4       fs_2.1.0
    #>  [11] BiocIO_1.22.0             vctrs_0.7.3
    #>  [13] memoise_2.0.1             Rsamtools_2.28.0
    #>  [15] DelayedMatrixStats_1.34.0 RCurl_1.98-1.18
    #>  [17] forcats_1.0.1             htmltools_0.5.9
    #>  [19] S4Arrays_1.12.0           curl_7.1.0
    #>  [21] BiocNeighbors_2.6.0       SparseArray_1.12.0
    #>  [23] sass_0.4.10               bslib_0.10.0
    #>  [25] htmlwidgets_1.6.4         plotly_4.12.0
    #>  [27] cachem_1.1.0              ResidualMatrix_1.22.0
    #>  [29] GenomicAlignments_1.48.0  igraph_2.3.0
    #>  [31] iterators_1.0.14          lifecycle_1.0.5
    #>  [33] pkgconfig_2.0.3           rsvd_1.0.5
    #>  [35] Matrix_1.7-5              R6_2.6.1
    #>  [37] fastmap_1.2.0             clue_0.3-68
    #>  [39] digest_0.6.39             colorspace_2.1-2
    #>  [41] AnnotationDbi_1.74.0      dqrng_0.4.1
    #>  [43] irlba_2.3.7               RSQLite_2.4.6
    #>  [45] beachmat_2.28.0           labeling_0.4.3
    #>  [47] httr_1.4.8                abind_1.4-8
    #>  [49] compiler_4.6.0            doParallel_1.0.17
    #>  [51] bit64_4.8.0               withr_3.0.2
    #>  [53] S7_0.2.2                  BiocParallel_1.46.0
    #>  [55] viridis_0.6.5             DBI_1.3.0
    #>  [57] DelayedArray_0.38.0       rjson_0.2.23
    #>  [59] bluster_1.22.0            tools_4.6.0
    #>  [61] vipor_0.4.7               otel_0.2.0
    #>  [63] beeswarm_0.4.0            glue_1.8.1
    #>  [65] restfulr_0.0.16           batchelor_1.28.0
    #>  [67] grid_4.6.0                cluster_2.1.8.2
    #>  [69] megadepth_1.22.0          gtable_0.3.6
    #>  [71] tzdb_0.5.0                tidyr_1.3.2
    #>  [73] ensembldb_2.36.0          data.table_1.18.2.1
    #>  [75] hms_1.1.4                 metapod_1.20.0
    #>  [77] BiocSingular_1.28.0       ScaledMatrix_1.20.0
    #>  [79] XVector_0.52.0            foreach_1.5.2
    #>  [81] stringr_1.6.0             ggrepel_0.9.8
    #>  [83] pillar_1.11.1             limma_3.68.0
    #>  [85] circlize_0.4.18           dplyr_1.2.1
    #>  [87] lattice_0.22-9            rtracklayer_1.72.0
    #>  [89] bit_4.6.0                 tidyselect_1.2.1
    #>  [91] ComplexHeatmap_2.28.0     locfit_1.5-9.12
    #>  [93] Biostrings_2.80.0         knitr_1.51
    #>  [95] gridExtra_2.3             bookdown_0.46
    #>  [97] ProtGenerics_1.44.0       edgeR_4.10.0
    #>  [99] cmdfun_1.0.2              xfun_0.57
    #> [101] statmod_1.5.1             stringi_1.8.7
    #> [103] UCSC.utils_1.8.0          EnsDb.Hsapiens.v86_2.99.0
    #> [105] lazyeval_0.2.3            yaml_2.3.12
    #> [107] evaluate_1.0.5            codetools_0.2-20
    #> [109] cigarillo_1.2.0           tibble_3.3.1
    #> [111] wiggleplotr_1.36.0        BiocManager_1.30.27
    #> [113] cli_3.6.6                 jquerylib_0.1.4
    #> [115] dichromat_2.0-0.1         Rcpp_1.1.1-1.1
    #> [117] GenomeInfoDb_1.48.0       png_0.1-9
    #> [119] XML_3.99-0.23             parallel_4.6.0
    #> [121] readr_2.2.0               blob_1.3.0
    #> [123] AnnotationFilter_1.36.0   sparseMatrixStats_1.24.0
    #> [125] bitops_1.0-9              viridisLite_0.4.3
    #> [127] scales_1.4.0              purrr_1.2.2
    #> [129] crayon_1.5.3              GetoptLong_1.1.1
    #> [131] rlang_1.2.0               cowplot_1.2.0
    #> [133] KEGGREST_1.52.0