View source: R/scTC_trim_effect.R
scTC_trim_effect | R Documentation |
Visualizes the impact of scTrimClust's trimming by comparing gene sets between: 1) Default Seurat analysis (no trimming) 2) scTrimClust post-trimming results
scTC_trim_effect(
method_pairs,
method_colors,
set_colors = setNames(c("#4D4D4D", "#AEAEAE", "#E6E6E6"), c("S1:standard",
"S2:intersect", "S3:trimmed")),
heatmap_color_palette = colorRamp2(seq(0, 100, 1), heat.colors(101, rev = TRUE)),
column_title = "",
row_names_side = "right",
legend_name = "No. of\nmarkers",
row_names_gp = 10,
column_title_gp = 12
)
method_pairs |
A named list of method comparisons. Each element should be a list with two components (data1 (untrimmed) and data2 (trimmed)) containing data frames with:
|
method_colors |
Named vector of colors for method annotations. Names should match the names in method_pairs. |
set_colors |
Named vector of colors for set annotations (S1-S3). Default: c("S1:standard", "S2:intersect", "S3:trimmed") with grey colors. |
heatmap_color_palette |
Color mapping function for heatmap. Default: colorRamp2(seq(0, 100, 1), heat.colors(101, rev = TRUE)). |
column_title |
Main title for the heatmap columns. |
row_names_side |
Side for row names ("left" or "right"). Default: "right". |
legend_name |
Title for the heatmap legend. Default: "No. of markers". |
row_names_gp |
Graphics parameters for row names. Default: 10. |
column_title_gp |
Graphics parameters for column title. Default: 12. |
scTC_trim_effect creates a heatmap showing the percentage differences in gene sets between method pairs across clusters. The heatmap shows three components for each method comparison:
Column 1-3: Unique to method1 (untrimmed), Intersection, Unique to method2 (trimmed)
Rows represent (cell) clusters with counts from first method in parentheses
Columns are split by method pairs
A Heatmap object from the ComplexHeatmap package.
## Not run:
method_pairs <- list(
CLR = list(
data1 = RepeatedHighDim:::scTC_eff_clr,
data2 = RepeatedHighDim:::scTC_eff_clr_robust
),
LogNorm = list(
data1 = RepeatedHighDim:::scTC_eff_log,
data2 = RepeatedHighDim:::scTC_eff_log_robust
)
)
method_colors <- setNames(grey.colors(2), c("CLR", "LogNorm"))
scTC_trim_effect(
method_pairs = method_pairs,
method_colors = method_colors,
column_title = "nPCs:5, nFeatures:1000"
)
set_colors <- grey.colors(3)
names(set_colors) <- c("S1:standard", "S2:intersect", "S3:trimmed")
scTC_trim_effect(
method_pairs = method_pairs,
method_colors = method_colors,
set_colors = setNames(c("blue", "green", "red"), names(set_colors)),
heatmap_color_palette = colorRamp2(c(0, 50, 100), c("white", "pink", "purple")),
column_title = "Custom Color Example"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.