Skip to content

Commit b05ad19

Browse files
committed
docs(MarkersPlot): update examples and references for pancreas_sub dataset
- Updated example data from pbmc_small to pancreas_sub - Adjusted example calls for MarkersPlot with new parameters - Changed documentation links from VolcanoPlot to MarkersPlot
1 parent fb0cf9b commit b05ad19

File tree

4 files changed

+44
-42
lines changed

4 files changed

+44
-42
lines changed

R/markersplot.R

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,20 @@
6363
#' * For `jitter`, `jitter_log2fc`, `jitter_pct`, the arguments will be passed to [plotthis::JitterPlot()]
6464
#' @examples
6565
#' \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
7070
#'
71-
#' MarkersPlot(markers, p_adjust = FALSE)
72-
#' MarkersPlot(markers, p_adjust = FALSE, x_cutoff = 1)
71+
#' MarkersPlot(markers)
72+
#' MarkersPlot(markers, x_cutoff = 2)
7373
#' MarkersPlot(allmarkers, p_adjust = FALSE,
7474
#' 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)
7676
#'
7777
#' MarkersPlot(allmarkers, plot_type = "jitter", subset_by = "cluster")
7878
#' MarkersPlot(allmarkers, plot_type = "jitter_pct",
79-
#' subset_by = "cluster", add_hline = 0)
79+
#' subset_by = "cluster", add_hline = 0, shape = 16)
8080
#'
8181
#' MarkersPlot(allmarkers, plot_type = "heatmap_log2fc", subset_by = "cluster")
8282
#' MarkersPlot(allmarkers, plot_type = "heatmap_pct", subset_by = "cluster",
@@ -85,24 +85,25 @@
8585
#' MarkersPlot(allmarkers, plot_type = "dot_log2fc", subset_by = "cluster",
8686
#' add_reticle = TRUE)
8787
#'
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")
9091
#'
9192
#' # Suppose we did a DE between g1 and g2 in each cluster
9293
#' 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")
9798
#'
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")
100101
#'
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")
103104
#'
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",
106107
#' ncol = 2)
107108
#' }
108109
#' @export

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ $ conda install pwwang::r-scplotter
4040

4141
![](./man/figures/gseaplot.png)
4242

43-
[`VolcanoPlot`][9]
43+
[`MarkersPlot`][9]
4444

4545
![](./man/figures/volcanoplot.png)
4646

@@ -106,7 +106,7 @@ chat$ask("Do a heatmap instead")
106106
[6]: https://pwwang.github.io/scplotter/reference/FeatureStatPlot.html
107107
[7]: https://pwwang.github.io/scplotter/reference/EnrichmentPlot.html
108108
[8]: https://pwwang.github.io/plotthis/reference/gsea.html
109-
[9]: https://pwwang.github.io/plotthis/reference/VolcanoPlot.html
109+
[9]: https://pwwang.github.io/scplotter/reference/MarkersPlot.html
110110
[10]: https://pwwang.github.io/scplotter/reference/CCCPlot.html
111111
[11]: https://pwwang.github.io/scplotter/reference/ClonalVolumePlot.html
112112
[12]: https://pwwang.github.io/scplotter/reference/ClonalAbundancePlot.html

man/MarkersPlot.Rd

Lines changed: 21 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/figures/volcanoplot.png

33.8 KB
Loading

0 commit comments

Comments
 (0)