|
63 | 63 | #' * For `jitter`, `jitter_log2fc`, `jitter_pct`, the arguments will be passed to [plotthis::JitterPlot()] |
64 | 64 | #' @examples |
65 | 65 | #' \donttest{ |
66 | | -#' data("pbmc_small", package = "SeuratObject") |
67 | | -#' markers <- Seurat::FindMarkers(pbmc_small, |
68 | | -#' group.by = "groups", ident.1 = "g1", ident.2 = "g2") |
69 | | -#' allmarkers <- Seurat::FindAllMarkers(pbmc_small) # RNA_snn_res.1 |
| 66 | +#' data(pancreas_sub) |
| 67 | +#' markers <- Seurat::FindMarkers(pancreas_sub, |
| 68 | +#' group.by = "Phase", ident.1 = "G2M", ident.2 = "G1") |
| 69 | +#' allmarkers <- Seurat::FindAllMarkers(pancreas_sub) # seurat_clusters |
70 | 70 | #' |
71 | | -#' MarkersPlot(markers, p_adjust = FALSE) |
72 | | -#' MarkersPlot(markers, p_adjust = FALSE, x_cutoff = 1) |
| 71 | +#' MarkersPlot(markers) |
| 72 | +#' MarkersPlot(markers, x_cutoff = 2) |
73 | 73 | #' MarkersPlot(allmarkers, p_adjust = FALSE, |
74 | 74 | #' subset_by = "cluster", ncol = 2, subset_as_facet = TRUE) |
75 | | -#' MarkersPlot(markers, p_adjust = FALSE, plot_type = "volcano_pct") |
| 75 | +#' MarkersPlot(markers, plot_type = "volcano_pct", flip_negative = TRUE) |
76 | 76 | #' |
77 | 77 | #' MarkersPlot(allmarkers, plot_type = "jitter", subset_by = "cluster") |
78 | 78 | #' MarkersPlot(allmarkers, plot_type = "jitter_pct", |
79 | | -#' subset_by = "cluster", add_hline = 0) |
| 79 | +#' subset_by = "cluster", add_hline = 0, shape = 16) |
80 | 80 | #' |
81 | 81 | #' MarkersPlot(allmarkers, plot_type = "heatmap_log2fc", subset_by = "cluster") |
82 | 82 | #' MarkersPlot(allmarkers, plot_type = "heatmap_pct", subset_by = "cluster", |
|
85 | 85 | #' MarkersPlot(allmarkers, plot_type = "dot_log2fc", subset_by = "cluster", |
86 | 86 | #' add_reticle = TRUE) |
87 | 87 | #' |
88 | | -#' MarkersPlot(allmarkers, object = pbmc_small, plot_type = "heatmap", |
89 | | -#' comparison_by = "cluster:RNA_snn_res.1") |
| 88 | +#' MarkersPlot(allmarkers, object = pancreas_sub, plot_type = "heatmap", |
| 89 | +#' columns_split_by = "CellType", |
| 90 | +#' comparison_by = "cluster:seurat_clusters") |
90 | 91 | #' |
91 | 92 | #' # Suppose we did a DE between g1 and g2 in each cluster |
92 | 93 | #' allmarkers$comparison <- "g1:g2" |
93 | | -#' MarkersPlot(allmarkers, object = pbmc_small, plot_type = "heatmap", |
94 | | -#' comparison_by = "comparison:groups", subset_by = "cluster:RNA_snn_res.1") |
95 | | -#' MarkersPlot(allmarkers, object = pbmc_small, plot_type = "dot", |
96 | | -#' comparison_by = "comparison:groups", subset_by = "cluster:RNA_snn_res.1") |
| 94 | +#' MarkersPlot(allmarkers, object = pancreas_sub, plot_type = "heatmap", |
| 95 | +#' comparison_by = "Phase", subset_by = "cluster:seurat_clusters") |
| 96 | +#' MarkersPlot(allmarkers, object = pancreas_sub, plot_type = "dot", |
| 97 | +#' comparison_by = "Phase", subset_by = "cluster:seurat_clusters") |
97 | 98 | #' |
98 | | -#' MarkersPlot(allmarkers, object = pbmc_small, plot_type = "violin", select = 3, |
99 | | -#' comparison_by = "comparison:groups", subset_by = "cluster:RNA_snn_res.1") |
| 99 | +#' MarkersPlot(allmarkers, object = pancreas_sub, plot_type = "violin", select = 3, |
| 100 | +#' comparison_by = "Phase", subset_by = "cluster:seurat_clusters") |
100 | 101 | #' |
101 | | -#' MarkersPlot(allmarkers, object = pbmc_small, plot_type = "box", select = 3, |
102 | | -#' comparison_by = "comparison:groups", subset_by = "cluster:RNA_snn_res.1") |
| 102 | +#' MarkersPlot(allmarkers, object = pancreas_sub, plot_type = "box", select = 3, |
| 103 | +#' comparison_by = "Phase", subset_by = "cluster:seurat_clusters") |
103 | 104 | #' |
104 | | -#' MarkersPlot(allmarkers, object = pbmc_small, plot_type = "ridge", select = 2, |
105 | | -#' comparison_by = "comparison:groups", subset_by = "cluster:RNA_snn_res.1", |
| 105 | +#' MarkersPlot(allmarkers, object = pancreas_sub, plot_type = "ridge", select = 2, |
| 106 | +#' comparison_by = "Phase", subset_by = "cluster:seurat_clusters", |
106 | 107 | #' ncol = 2) |
107 | 108 | #' } |
108 | 109 | #' @export |
|
0 commit comments