... | ... |
@@ -105,12 +105,12 @@ expression value of the output corrected matrix from that of the original |
105 | 105 |
input matrix, and then devided by the input. |
106 | 106 |
} |
107 | 107 |
\examples{ |
108 |
-data(scExample, package = "singleCellTK") |
|
109 |
-sce <- subsetSCECols(sce, colData = "type != 'EmptyDroplet'") |
|
110 | 108 |
\dontrun{ |
111 |
-# SoupX does not work for toy example, |
|
112 |
-# can be tested with `sce <- importExampleData("pbmc3k")` |
|
109 |
+sce <- importExampleData("pbmc3k") |
|
113 | 110 |
sce <- runSoupX(sce, sample = "sample") |
114 |
-plotSoupXResults(sce) |
|
111 |
+plotSoupXResults(sce, sample = "sample") |
|
115 | 112 |
} |
116 | 113 |
} |
114 |
+\seealso{ |
|
115 |
+runSoupX |
|
116 |
+} |
... | ... |
@@ -30,34 +30,34 @@ plotSoupXResults( |
30 | 30 |
) |
31 | 31 |
} |
32 | 32 |
\arguments{ |
33 |
-\item{inSCE}{A \linkS4class{SingleCellExperiment} object. With |
|
33 |
+\item{inSCE}{A \linkS4class{SingleCellExperiment} object. With |
|
34 | 34 |
\code{\link{runSoupX}} already applied.} |
35 | 35 |
|
36 |
-\item{sample}{Character vector. Indicates which sample each cell belongs to. |
|
36 |
+\item{sample}{Character vector. Indicates which sample each cell belongs to. |
|
37 | 37 |
Default \code{NULL}.} |
38 | 38 |
|
39 |
-\item{background}{Logical. Whether \code{background} was applied when |
|
39 |
+\item{background}{Logical. Whether \code{background} was applied when |
|
40 | 40 |
running \code{\link{runSoupX}}. Default \code{FALSE}.} |
41 | 41 |
|
42 | 42 |
\item{reducedDimName}{Character. The embedding to use for plotting. Leave it |
43 |
-\code{NULL} for using the sample-specific UMAPs generated when running |
|
43 |
+\code{NULL} for using the sample-specific UMAPs generated when running |
|
44 | 44 |
\code{\link{runSoupX}}. Default \code{NULL}.} |
45 | 45 |
|
46 |
-\item{plotNCols}{Integer. Number of columns for the plot grid per sample. |
|
47 |
-Will determine the number of top markers to show together with |
|
46 |
+\item{plotNCols}{Integer. Number of columns for the plot grid per sample. |
|
47 |
+Will determine the number of top markers to show together with |
|
48 | 48 |
\code{plotNRows}. Default \code{3}.} |
49 | 49 |
|
50 | 50 |
\item{plotNRows}{Integer. Number of rows for the plot grid per sample. Will |
51 | 51 |
determine the number of top markers to show together with \code{plotNCols}. |
52 | 52 |
Default \code{2}.} |
53 | 53 |
|
54 |
-\item{baseSize}{Numeric. The base font size for all text. Default 12. Can be |
|
55 |
-overwritten by titleSize, axisSize, and axisLabelSize, legendSize, |
|
54 |
+\item{baseSize}{Numeric. The base font size for all text. Default 12. Can be |
|
55 |
+overwritten by titleSize, axisSize, and axisLabelSize, legendSize, |
|
56 | 56 |
legendTitleSize. Default \code{8}.} |
57 | 57 |
|
58 |
-\item{combinePlot}{Must be either \code{"all"}, \code{"sample"}, or |
|
59 |
-\code{"none"}. \code{"all"} will combine all plots into a single |
|
60 |
-\code{.ggplot} object, while \code{"sample"} will output a list of plots |
|
58 |
+\item{combinePlot}{Must be either \code{"all"}, \code{"sample"}, or |
|
59 |
+\code{"none"}. \code{"all"} will combine all plots into a single |
|
60 |
+\code{.ggplot} object, while \code{"sample"} will output a list of plots |
|
61 | 61 |
separated by sample. Default \code{"all"}.} |
62 | 62 |
|
63 | 63 |
\item{xlab}{Character vector. Label for x-axis. Default \code{NULL}.} |
... | ... |
@@ -71,10 +71,10 @@ separated by sample. Default \code{"all"}.} |
71 | 71 |
\item{labelClusters}{Logical. Whether the cluster labels are plotted. Default |
72 | 72 |
\code{FALSE}.} |
73 | 73 |
|
74 |
-\item{clusterLabelSize}{Numeric. Determines the size of cluster label when |
|
74 |
+\item{clusterLabelSize}{Numeric. Determines the size of cluster label when |
|
75 | 75 |
\code{labelClusters} is set to \code{TRUE}. Default \code{3.5}.} |
76 | 76 |
|
77 |
-\item{defaultTheme}{Logical. Adds grid to plot when \code{TRUE}. Default |
|
77 |
+\item{defaultTheme}{Logical. Adds grid to plot when \code{TRUE}. Default |
|
78 | 78 |
\code{TRUE}.} |
79 | 79 |
|
80 | 80 |
\item{dotSize}{Numeric. Size of dots. Default \code{0.5}.} |
... | ... |
@@ -96,19 +96,19 @@ to 1. Default \code{1}.} |
96 | 96 |
ggplot object of the combination of UMAPs. See description. |
97 | 97 |
} |
98 | 98 |
\description{ |
99 |
-This function will generate a combination of plots basing on the |
|
100 |
-correction done by SoupX. For each sample, there will be a UMAP with cluster |
|
101 |
-labeling, followed by a number of UMAPs showing the change in selected top |
|
102 |
-markers. The cluster labeling is what should be used for SoupX to estimate |
|
103 |
-the contamination. The Soup Fraction is calculated by subtracting the gene |
|
104 |
-expression value of the output corrected matrix from that of the original |
|
99 |
+This function will generate a combination of plots basing on the |
|
100 |
+correction done by SoupX. For each sample, there will be a UMAP with cluster |
|
101 |
+labeling, followed by a number of UMAPs showing the change in selected top |
|
102 |
+markers. The cluster labeling is what should be used for SoupX to estimate |
|
103 |
+the contamination. The Soup Fraction is calculated by subtracting the gene |
|
104 |
+expression value of the output corrected matrix from that of the original |
|
105 | 105 |
input matrix, and then devided by the input. |
106 | 106 |
} |
107 | 107 |
\examples{ |
108 | 108 |
data(scExample, package = "singleCellTK") |
109 | 109 |
sce <- subsetSCECols(sce, colData = "type != 'EmptyDroplet'") |
110 | 110 |
\dontrun{ |
111 |
-# SoupX does not work for toy example, |
|
111 |
+# SoupX does not work for toy example, |
|
112 | 112 |
# can be tested with `sce <- importExampleData("pbmc3k")` |
113 | 113 |
sce <- runSoupX(sce, sample = "sample") |
114 | 114 |
plotSoupXResults(sce) |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,116 @@ |
1 |
+% Generated by roxygen2: do not edit by hand |
|
2 |
+% Please edit documentation in R/runSoupX.R |
|
3 |
+\name{plotSoupXResults} |
|
4 |
+\alias{plotSoupXResults} |
|
5 |
+\title{Plot SoupX Result} |
|
6 |
+\usage{ |
|
7 |
+plotSoupXResults( |
|
8 |
+ inSCE, |
|
9 |
+ sample = NULL, |
|
10 |
+ background = FALSE, |
|
11 |
+ reducedDimName = NULL, |
|
12 |
+ plotNCols = 3, |
|
13 |
+ plotNRows = 2, |
|
14 |
+ baseSize = 8, |
|
15 |
+ combinePlot = c("all", "sample", "none"), |
|
16 |
+ xlab = NULL, |
|
17 |
+ ylab = NULL, |
|
18 |
+ dim1 = NULL, |
|
19 |
+ dim2 = NULL, |
|
20 |
+ labelClusters = FALSE, |
|
21 |
+ clusterLabelSize = 3.5, |
|
22 |
+ defaultTheme = TRUE, |
|
23 |
+ dotSize = 0.5, |
|
24 |
+ transparency = 1, |
|
25 |
+ titleSize = NULL, |
|
26 |
+ axisLabelSize = NULL, |
|
27 |
+ axisSize = NULL, |
|
28 |
+ legendSize = NULL, |
|
29 |
+ legendTitleSize = NULL |
|
30 |
+) |
|
31 |
+} |
|
32 |
+\arguments{ |
|
33 |
+\item{inSCE}{A \linkS4class{SingleCellExperiment} object. With |
|
34 |
+\code{\link{runSoupX}} already applied.} |
|
35 |
+ |
|
36 |
+\item{sample}{Character vector. Indicates which sample each cell belongs to. |
|
37 |
+Default \code{NULL}.} |
|
38 |
+ |
|
39 |
+\item{background}{Logical. Whether \code{background} was applied when |
|
40 |
+running \code{\link{runSoupX}}. Default \code{FALSE}.} |
|
41 |
+ |
|
42 |
+\item{reducedDimName}{Character. The embedding to use for plotting. Leave it |
|
43 |
+\code{NULL} for using the sample-specific UMAPs generated when running |
|
44 |
+\code{\link{runSoupX}}. Default \code{NULL}.} |
|
45 |
+ |
|
46 |
+\item{plotNCols}{Integer. Number of columns for the plot grid per sample. |
|
47 |
+Will determine the number of top markers to show together with |
|
48 |
+\code{plotNRows}. Default \code{3}.} |
|
49 |
+ |
|
50 |
+\item{plotNRows}{Integer. Number of rows for the plot grid per sample. Will |
|
51 |
+determine the number of top markers to show together with \code{plotNCols}. |
|
52 |
+Default \code{2}.} |
|
53 |
+ |
|
54 |
+\item{baseSize}{Numeric. The base font size for all text. Default 12. Can be |
|
55 |
+overwritten by titleSize, axisSize, and axisLabelSize, legendSize, |
|
56 |
+legendTitleSize. Default \code{8}.} |
|
57 |
+ |
|
58 |
+\item{combinePlot}{Must be either \code{"all"}, \code{"sample"}, or |
|
59 |
+\code{"none"}. \code{"all"} will combine all plots into a single |
|
60 |
+\code{.ggplot} object, while \code{"sample"} will output a list of plots |
|
61 |
+separated by sample. Default \code{"all"}.} |
|
62 |
+ |
|
63 |
+\item{xlab}{Character vector. Label for x-axis. Default \code{NULL}.} |
|
64 |
+ |
|
65 |
+\item{ylab}{Character vector. Label for y-axis. Default \code{NULL}.} |
|
66 |
+ |
|
67 |
+\item{dim1}{See \code{\link{plotSCEDimReduceColData}}. Default \code{NULL}.} |
|
68 |
+ |
|
69 |
+\item{dim2}{See \code{\link{plotSCEDimReduceColData}}. Default \code{NULL}.} |
|
70 |
+ |
|
71 |
+\item{labelClusters}{Logical. Whether the cluster labels are plotted. Default |
|
72 |
+\code{FALSE}.} |
|
73 |
+ |
|
74 |
+\item{clusterLabelSize}{Numeric. Determines the size of cluster label when |
|
75 |
+\code{labelClusters} is set to \code{TRUE}. Default \code{3.5}.} |
|
76 |
+ |
|
77 |
+\item{defaultTheme}{Logical. Adds grid to plot when \code{TRUE}. Default |
|
78 |
+\code{TRUE}.} |
|
79 |
+ |
|
80 |
+\item{dotSize}{Numeric. Size of dots. Default \code{0.5}.} |
|
81 |
+ |
|
82 |
+\item{transparency}{Numeric. Transparency of the dots, values will be from 0 |
|
83 |
+to 1. Default \code{1}.} |
|
84 |
+ |
|
85 |
+\item{titleSize}{Numeric. Size of title of plot. Default \code{15}.} |
|
86 |
+ |
|
87 |
+\item{axisLabelSize}{Numeric. Size of x/y-axis labels. Default \code{NULL}.} |
|
88 |
+ |
|
89 |
+\item{axisSize}{Numeric. Size of x/y-axis ticks. Default \code{NULL}.} |
|
90 |
+ |
|
91 |
+\item{legendSize}{Numeric. Size of legend. Default \code{NULL}.} |
|
92 |
+ |
|
93 |
+\item{legendTitleSize}{Numeric. Size of legend title. Default \code{NULL}.} |
|
94 |
+} |
|
95 |
+\value{ |
|
96 |
+ggplot object of the combination of UMAPs. See description. |
|
97 |
+} |
|
98 |
+\description{ |
|
99 |
+This function will generate a combination of plots basing on the |
|
100 |
+correction done by SoupX. For each sample, there will be a UMAP with cluster |
|
101 |
+labeling, followed by a number of UMAPs showing the change in selected top |
|
102 |
+markers. The cluster labeling is what should be used for SoupX to estimate |
|
103 |
+the contamination. The Soup Fraction is calculated by subtracting the gene |
|
104 |
+expression value of the output corrected matrix from that of the original |
|
105 |
+input matrix, and then devided by the input. |
|
106 |
+} |
|
107 |
+\examples{ |
|
108 |
+data(scExample, package = "singleCellTK") |
|
109 |
+sce <- subsetSCECols(sce, colData = "type != 'EmptyDroplet'") |
|
110 |
+\dontrun{ |
|
111 |
+# SoupX does not work for toy example, |
|
112 |
+# can be tested with `sce <- importExampleData("pbmc3k")` |
|
113 |
+sce <- runSoupX(sce, sample = "sample") |
|
114 |
+plotSoupXResults(sce) |
|
115 |
+} |
|
116 |
+} |