Browse code

Update bcds and cxds

Yichen Wang authored on 12/10/2022 08:52:32
Showing 1 changed files
... ...
@@ -44,102 +44,114 @@ plotBcdsResults(
44 44
 \arguments{
45 45
 \item{inSCE}{Input \linkS4class{SingleCellExperiment} object with saved
46 46
 dimension reduction components or a variable with saved results from
47
-\link{runBcds}. Required.}
47
+\code{\link{runBcds}}. Required.}
48 48
 
49
-\item{sample}{Character vector. Indicates which sample each cell belongs to.
50
-Default NULL.}
49
+\item{sample}{Character vector or colData variable name. Indicates which 
50
+sample each cell belongs to. Default \code{NULL}.}
51 51
 
52
-\item{shape}{If provided, add shapes based on the value.}
52
+\item{shape}{If provided, add shapes based on the value. Default \code{NULL}.}
53 53
 
54 54
 \item{groupBy}{Groupings for each numeric value. A user may input a vector
55
-equal length to the number of the samples in the SingleCellExperiment
56
-object, or can be retrieved from the colData slot. Default NULL.}
55
+equal length to the number of the samples in \code{inSCE}, or can be 
56
+retrieved from the colData slot. Default \code{NULL}.}
57 57
 
58
-\item{combinePlot}{Must be either "all", "sample", or "none". "all" will combine all plots into a single .ggplot object,
59
-while "sample" will output a list of plots separated by sample. Default "all".}
58
+\item{combinePlot}{Must be either \code{"all"}, \code{"sample"}, or 
59
+\code{"none"}. \code{"all"} will combine all plots into a single .ggplot 
60
+object, while \code{"sample"} will output a list of plots separated by 
61
+sample. Default \code{"all"}.}
60 62
 
61
-\item{violin}{Boolean. If TRUE, will plot the violin plot. Default TRUE.}
63
+\item{violin}{Boolean. If \code{TRUE}, will plot the violin plot. Default 
64
+\code{TRUE}.}
62 65
 
63
-\item{boxplot}{Boolean. If TRUE, will plot boxplots for each violin plot.
64
-Default TRUE.}
66
+\item{boxplot}{Boolean. If \code{TRUE}, will plot boxplots for each violin 
67
+plot. Default \code{TRUE}.}
65 68
 
66
-\item{dots}{Boolean. If TRUE, will plot dots for each violin plot.
67
-Default TRUE.}
69
+\item{dots}{Boolean. If \code{TRUE}, will plot dots for each violin plot.
70
+Default \code{TRUE}.}
68 71
 
69
-\item{reducedDimName}{Saved dimension reduction name in the
70
-\linkS4class{SingleCellExperiment} object. Required.}
72
+\item{reducedDimName}{Saved dimension reduction name in \code{inSCE}. 
73
+Default \code{"UMAP"}.}
71 74
 
72
-\item{xlab}{Character vector. Label for x-axis. Default NULL.}
75
+\item{xlab}{Character vector. Label for x-axis. Default \code{NULL}.}
73 76
 
74
-\item{ylab}{Character vector. Label for y-axis. Default NULL.}
77
+\item{ylab}{Character vector. Label for y-axis. Default \code{NULL}.}
75 78
 
76
-\item{dim1}{1st dimension to be used for plotting. Can either be a string which specifies
77
-the name of the dimension to be plotted from reducedDims, or a numeric value which specifies
78
-the index of the dimension to be plotted. Default is NULL.}
79
+\item{dim1}{1st dimension to be used for plotting. Can either be a string 
80
+which specifies the name of the dimension to be plotted from reducedDims, or 
81
+a numeric value which specifies the index of the dimension to be plotted. 
82
+Default is \code{NULL}.}
79 83
 
80
-\item{dim2}{2nd dimension to be used for plotting. Can either be a string which specifies
81
-the name of the dimension to be plotted from reducedDims, or a numeric value which specifies
82
-the index of the dimension to be plotted. Default is NULL.}
84
+\item{dim2}{2nd dimension to be used for plotting. Similar to \code{dim1}. 
85
+Default is \code{NULL}.}
83 86
 
84
-\item{bin}{Numeric vector. If single value, will divide the numeric values into the `bin` groups.
85
-If more than one value, will bin numeric values using values as a cut point.}
87
+\item{bin}{Numeric vector. If single value, will divide the numeric values 
88
+into \code{bin} groups. If more than one value, will bin numeric values using
89
+values as a cut point. Default \code{NULL}.}
86 90
 
87
-\item{binLabel}{Character vector. Labels for the bins created by the `bin` parameter.
88
-Default NULL.}
91
+\item{binLabel}{Character vector. Labels for the bins created by \code{bin}.
92
+Default \code{NULL}.}
89 93
 
90
-\item{defaultTheme}{Removes grid in plot and sets axis title size to 10
91
-when TRUE. Default TRUE.}
94
+\item{defaultTheme}{Removes grid in plot and sets axis title size to 
95
+\code{10} when \code{TRUE}. Default \code{TRUE}.}
92 96
 
93
-\item{dotSize}{Size of dots. Default 0.5.}
97
+\item{dotSize}{Size of dots. Default \code{0.5}.}
94 98
 
95 99
 \item{summary}{Adds a summary statistic, as well as a crossbar to the
96
-violin plot. Options are "mean" or "median". Default NULL.}
100
+violin plot. Options are \code{"mean"} or \code{"median"}. Default 
101
+\code{NULL}.}
97 102
 
98 103
 \item{summaryTextSize}{The text size of the summary statistic displayed
99
-above the violin plot. Default 3.}
104
+above the violin plot. Default \code{3}.}
100 105
 
101
-\item{transparency}{Transparency of the dots, values will be 0-1. Default 1.}
106
+\item{transparency}{Transparency of the dots, values will be 0-1. Default 
107
+\code{1}.}
102 108
 
103
-\item{baseSize}{The base font size for all text. Default 15.
104
-Can be overwritten by titleSize, axisSize, and axisLabelSize,
105
-legendSize, legendTitleSize.}
109
+\item{baseSize}{The base font size for all text. Default \code{12}.
110
+Can be overwritten by \code{titleSize}, \code{axisSize}, and 
111
+\code{axisLabelSize}, \code{legendSize}, \code{legendTitleSize}.}
106 112
 
107
-\item{titleSize}{Size of title of plot. Default NULL.}
113
+\item{titleSize}{Size of title of plot. Default \code{NULL}.}
108 114
 
109
-\item{axisLabelSize}{Size of x/y-axis labels. Default NULL.}
115
+\item{axisLabelSize}{Size of x/y-axis labels. Default \code{NULL}.}
110 116
 
111
-\item{axisSize}{Size of x/y-axis ticks. Default NULL.}
117
+\item{axisSize}{Size of x/y-axis ticks. Default \code{NULL}.}
112 118
 
113
-\item{legendSize}{size of legend. Default NULL.}
119
+\item{legendSize}{size of legend. Default \code{NULL}.}
114 120
 
115
-\item{legendTitleSize}{size of legend title. Default NULL.}
121
+\item{legendTitleSize}{size of legend title. Default \code{NULL}.}
116 122
 
117
-\item{relHeights}{Relative heights of plots when combine is set.}
123
+\item{relHeights}{Relative heights of plots when combine is set. Default 
124
+\code{1}.}
118 125
 
119
-\item{relWidths}{Relative widths of plots when combine is set.}
126
+\item{relWidths}{Relative widths of plots when combine is set. Default 
127
+\code{c(1, 1, 1)}.}
120 128
 
121
-\item{plotNCols}{Number of columns when plots are combined in a grid.}
129
+\item{plotNCols}{Number of columns when plots are combined in a grid. Default 
130
+\code{NULL}.}
122 131
 
123
-\item{plotNRows}{Number of rows when plots are combined in a grid.}
132
+\item{plotNRows}{Number of rows when plots are combined in a grid. Default 
133
+\code{NULL}.}
124 134
 
125
-\item{labelSamples}{Will label sample name in title of plot if TRUE. Default TRUE.}
135
+\item{labelSamples}{Will label sample name in title of plot if TRUE. Default 
136
+\code{TRUE}.}
126 137
 
127
-\item{samplePerColumn}{If TRUE, when there are multiple samples and combining by "all",
128
-the output .ggplot will have plots from each sample on a single column. Default TRUE.}
138
+\item{samplePerColumn}{If \code{TRUE}, when there are multiple samples and 
139
+combining by \code{"all"}, the output .ggplot will have plots from each 
140
+sample on a single column. Default \code{TRUE}.}
129 141
 
130
-\item{sampleRelHeights}{If there are multiple samples and combining by "all",
131
-the relative heights for each plot.}
142
+\item{sampleRelHeights}{If there are multiple samples and combining by 
143
+\code{"all"}, the relative heights for each plot. Default \code{1}.}
132 144
 
133
-\item{sampleRelWidths}{If there are multiple samples and combining by "all",
134
-the relative widths for each plot.}
145
+\item{sampleRelWidths}{If there are multiple samples and combining by 
146
+\code{"all"}, the relative widths for each plot. Default \code{1}.}
135 147
 }
136 148
 \value{
137 149
 list of .ggplot objects
138 150
 }
139 151
 \description{
140 152
 A wrapper function which visualizes outputs from the
141
- runBcds function stored in the colData slot of the
142
- SingleCellExperiment object via various plots.
153
+\code{\link{runBcds}} function stored in the colData slot of the
154
+\linkS4class{SingleCellExperiment} object via various plots.
143 155
 }
144 156
 \examples{
145 157
 data(scExample, package="singleCellTK")
... ...
@@ -148,3 +160,6 @@ sce <- runQuickUMAP(sce)
148 160
 sce <- runBcds(sce)
149 161
 plotBcdsResults(inSCE=sce, reducedDimName="UMAP")
150 162
 }
163
+\seealso{
164
+\code{\link{runBcds}}
165
+}
Browse code

Deprecate "getUMAP", add "runUMAP" and "runQuickUMAP"

Yichen Wang authored on 28/09/2022 03:49:28
Showing 1 changed files
... ...
@@ -144,8 +144,7 @@ A wrapper function which visualizes outputs from the
144 144
 \examples{
145 145
 data(scExample, package="singleCellTK")
146 146
 sce <- subsetSCECols(sce, colData = "type != 'EmptyDroplet'")
147
-sce <- getUMAP(inSCE=sce, useAssay="counts", logNorm=TRUE, 
148
-               reducedDimName="UMAP")
147
+sce <- runQuickUMAP(sce)
149 148
 sce <- runBcds(sce)
150 149
 plotBcdsResults(inSCE=sce, reducedDimName="UMAP")
151 150
 }
Browse code

Function updates for HVG, PCA, UMAP and TSNE

Yichen Wang authored on 20/05/2022 14:07:18
Showing 1 changed files
... ...
@@ -144,7 +144,8 @@ A wrapper function which visualizes outputs from the
144 144
 \examples{
145 145
 data(scExample, package="singleCellTK")
146 146
 sce <- subsetSCECols(sce, colData = "type != 'EmptyDroplet'")
147
-sce <- getUMAP(inSCE=sce, useAssay="counts", reducedDimName="UMAP")
147
+sce <- getUMAP(inSCE=sce, useAssay="counts", logNorm=TRUE, 
148
+               reducedDimName="UMAP")
148 149
 sce <- runBcds(sce)
149 150
 plotBcdsResults(inSCE=sce, reducedDimName="UMAP")
150 151
 }
Browse code

Change default reducedDimName settings, DecontX functions use 'decontX_UMAP'

Yusuke Koga authored on 22/09/2021 13:09:56
Showing 1 changed files
... ...
@@ -13,7 +13,7 @@ plotBcdsResults(
13 13
   violin = TRUE,
14 14
   boxplot = FALSE,
15 15
   dots = TRUE,
16
-  reducedDimName = NULL,
16
+  reducedDimName = "UMAP",
17 17
   xlab = NULL,
18 18
   ylab = NULL,
19 19
   dim1 = NULL,
... ...
@@ -21,7 +21,7 @@ plotBcdsResults(
21 21
   bin = NULL,
22 22
   binLabel = NULL,
23 23
   defaultTheme = TRUE,
24
-  dotSize = 1,
24
+  dotSize = 0.5,
25 25
   summary = "median",
26 26
   summaryTextSize = 3,
27 27
   transparency = 1,
... ...
@@ -90,7 +90,7 @@ Default NULL.}
90 90
 \item{defaultTheme}{Removes grid in plot and sets axis title size to 10
91 91
 when TRUE. Default TRUE.}
92 92
 
93
-\item{dotSize}{Size of dots. Default 1.}
93
+\item{dotSize}{Size of dots. Default 0.5.}
94 94
 
95 95
 \item{summary}{Adds a summary statistic, as well as a crossbar to the
96 96
 violin plot. Options are "mean" or "median". Default NULL.}
Browse code

Remove code causing every barcode to be assigned to its own sample in importFromFiles function

Yusuke Koga authored on 27/07/2021 20:51:51
Showing 1 changed files
... ...
@@ -100,7 +100,7 @@ above the violin plot. Default 3.}
100 100
 
101 101
 \item{transparency}{Transparency of the dots, values will be 0-1. Default 1.}
102 102
 
103
-\item{baseSize}{The base font size for all text. Default 12.
103
+\item{baseSize}{The base font size for all text. Default 15.
104 104
 Can be overwritten by titleSize, axisSize, and axisLabelSize,
105 105
 legendSize, legendTitleSize.}
106 106
 
Browse code

Update documentation

Yusuke Koga authored on 10/05/2021 18:57:19
Showing 1 changed files
... ...
@@ -25,7 +25,7 @@ plotBcdsResults(
25 25
   summary = "median",
26 26
   summaryTextSize = 3,
27 27
   transparency = 1,
28
-  baseSize = 14,
28
+  baseSize = 15,
29 29
   titleSize = NULL,
30 30
   axisLabelSize = NULL,
31 31
   axisSize = NULL,
... ...
@@ -92,17 +92,27 @@ when TRUE. Default TRUE.}
92 92
 
93 93
 \item{dotSize}{Size of dots. Default 1.}
94 94
 
95
+\item{summary}{Adds a summary statistic, as well as a crossbar to the
96
+violin plot. Options are "mean" or "median". Default NULL.}
97
+
98
+\item{summaryTextSize}{The text size of the summary statistic displayed
99
+above the violin plot. Default 3.}
100
+
95 101
 \item{transparency}{Transparency of the dots, values will be 0-1. Default 1.}
96 102
 
97
-\item{titleSize}{Size of title of plot. Default 18.}
103
+\item{baseSize}{The base font size for all text. Default 12.
104
+Can be overwritten by titleSize, axisSize, and axisLabelSize,
105
+legendSize, legendTitleSize.}
106
+
107
+\item{titleSize}{Size of title of plot. Default NULL.}
98 108
 
99
-\item{axisLabelSize}{Size of x/y-axis labels. Default 18.}
109
+\item{axisLabelSize}{Size of x/y-axis labels. Default NULL.}
100 110
 
101
-\item{axisSize}{Size of x/y-axis ticks. Default 15.}
111
+\item{axisSize}{Size of x/y-axis ticks. Default NULL.}
102 112
 
103
-\item{legendSize}{size of legend. Default 15.}
113
+\item{legendSize}{size of legend. Default NULL.}
104 114
 
105
-\item{legendTitleSize}{size of legend title. Default 16.}
115
+\item{legendTitleSize}{size of legend title. Default NULL.}
106 116
 
107 117
 \item{relHeights}{Relative heights of plots when combine is set.}
108 118
 
Browse code

Edits to singleCellTK plotting fxns

Yusuke Koga authored on 10/05/2021 11:55:21
Showing 1 changed files
... ...
@@ -22,20 +22,20 @@ plotBcdsResults(
22 22
   binLabel = NULL,
23 23
   defaultTheme = TRUE,
24 24
   dotSize = 1,
25
+  summary = "median",
26
+  summaryTextSize = 3,
25 27
   transparency = 1,
26
-  titleSize = 18,
27
-  axisLabelSize = 18,
28
-  axisSize = 15,
29
-  legendSize = 15,
30
-  legendTitleSize = 16,
31
-  relHeights = c(1.5, 1, 1),
28
+  baseSize = 14,
29
+  titleSize = NULL,
30
+  axisLabelSize = NULL,
31
+  axisSize = NULL,
32
+  legendSize = NULL,
33
+  legendTitleSize = NULL,
34
+  relHeights = 1,
32 35
   relWidths = c(1, 1, 1),
33 36
   plotNCols = NULL,
34 37
   plotNRows = NULL,
35
-  plotLabels = "default",
36
-  plotLabelSize = 20,
37
-  plotLabelPositionX = NULL,
38
-  plotLabelPositionY = NULL,
38
+  labelSamples = TRUE,
39 39
   samplePerColumn = TRUE,
40 40
   sampleRelHeights = 1,
41 41
   sampleRelWidths = 1
... ...
@@ -112,14 +112,7 @@ when TRUE. Default TRUE.}
112 112
 
113 113
 \item{plotNRows}{Number of rows when plots are combined in a grid.}
114 114
 
115
-\item{plotLabels}{labels to each plot. If set to "default", will use the name of the samples
116
-as the labels. If set to "none", no label will be plotted.}
117
-
118
-\item{plotLabelSize}{size of labels}
119
-
120
-\item{plotLabelPositionX}{Numeric vector. The X position of the plot label.}
121
-
122
-\item{plotLabelPositionY}{Numeric vector. The Y position of the plot label.}
115
+\item{labelSamples}{Will label sample name in title of plot if TRUE. Default TRUE.}
123 116
 
124 117
 \item{samplePerColumn}{If TRUE, when there are multiple samples and combining by "all",
125 118
 the output .ggplot will have plots from each sample on a single column. Default TRUE.}
Browse code

Add value sections to documentation

Yusuke Koga authored on 15/10/2020 23:39:34
Showing 1 changed files
... ...
@@ -130,6 +130,9 @@ the relative heights for each plot.}
130 130
 \item{sampleRelWidths}{If there are multiple samples and combining by "all",
131 131
 the relative widths for each plot.}
132 132
 }
133
+\value{
134
+list of .ggplot objects
135
+}
133 136
 \description{
134 137
 A wrapper function which visualizes outputs from the
135 138
  runBcds function stored in the colData slot of the
Browse code

Subset example data in plotting functions using subsetSCECols

Yusuke Koga authored on 15/10/2020 17:29:49
Showing 1 changed files
... ...
@@ -137,7 +137,7 @@ A wrapper function which visualizes outputs from the
137 137
 }
138 138
 \examples{
139 139
 data(scExample, package="singleCellTK")
140
-sce <- sce[, colData(sce)$type != "EmptyDroplet"]
140
+sce <- subsetSCECols(sce, colData = "type != 'EmptyDroplet'")
141 141
 sce <- getUMAP(inSCE=sce, useAssay="counts", reducedDimName="UMAP")
142 142
 sce <- runBcds(sce)
143 143
 plotBcdsResults(inSCE=sce, reducedDimName="UMAP")
Browse code

Additional bug fixes relevant to ggSCTKCombinePlots function

Yusuke Koga authored on 07/10/2020 08:19:03
Showing 1 changed files
... ...
@@ -55,7 +55,7 @@ Default NULL.}
55 55
 equal length to the number of the samples in the SingleCellExperiment
56 56
 object, or can be retrieved from the colData slot. Default NULL.}
57 57
 
58
-\item{combinePlot}{Must be either "all" or "sample". "all" will combine all plots into a single .ggplot object,
58
+\item{combinePlot}{Must be either "all", "sample", or "none". "all" will combine all plots into a single .ggplot object,
59 59
 while "sample" will output a list of plots separated by sample. Default "all".}
60 60
 
61 61
 \item{violin}{Boolean. If TRUE, will plot the violin plot. Default TRUE.}
Browse code

Update documentation

Yusuke Koga authored on 29/09/2020 20:37:02
Showing 1 changed files
... ...
@@ -30,6 +30,8 @@ plotBcdsResults(
30 30
   legendTitleSize = 16,
31 31
   relHeights = c(1.5, 1, 1),
32 32
   relWidths = c(1, 1, 1),
33
+  plotNCols = NULL,
34
+  plotNRows = NULL,
33 35
   plotLabels = "default",
34 36
   plotLabelSize = 20,
35 37
   plotLabelPositionX = NULL,
... ...
@@ -106,6 +108,10 @@ when TRUE. Default TRUE.}
106 108
 
107 109
 \item{relWidths}{Relative widths of plots when combine is set.}
108 110
 
111
+\item{plotNCols}{Number of columns when plots are combined in a grid.}
112
+
113
+\item{plotNRows}{Number of rows when plots are combined in a grid.}
114
+
109 115
 \item{plotLabels}{labels to each plot. If set to "default", will use the name of the samples
110 116
 as the labels. If set to "none", no label will be plotted.}
111 117
 
Browse code

Debug .ggSCTKCombinePlots

Yusuke Koga authored on 23/09/2020 12:09:09
Showing 1 changed files
... ...
@@ -8,8 +8,8 @@ plotBcdsResults(
8 8
   inSCE,
9 9
   sample = NULL,
10 10
   shape = NULL,
11
-  groupby = NULL,
12
-  combinePlot = NULL,
11
+  groupBy = NULL,
12
+  combinePlot = "all",
13 13
   violin = TRUE,
14 14
   boxplot = FALSE,
15 15
   dots = TRUE,
... ...
@@ -32,6 +32,8 @@ plotBcdsResults(
32 32
   relWidths = c(1, 1, 1),
33 33
   plotLabels = "default",
34 34
   plotLabelSize = 20,
35
+  plotLabelPositionX = NULL,
36
+  plotLabelPositionY = NULL,
35 37
   samplePerColumn = TRUE,
36 38
   sampleRelHeights = 1,
37 39
   sampleRelWidths = 1
... ...
@@ -47,7 +49,7 @@ Default NULL.}
47 49
 
48 50
 \item{shape}{If provided, add shapes based on the value.}
49 51
 
50
-\item{groupby}{Groupings for each numeric value. A user may input a vector
52
+\item{groupBy}{Groupings for each numeric value. A user may input a vector
51 53
 equal length to the number of the samples in the SingleCellExperiment
52 54
 object, or can be retrieved from the colData slot. Default NULL.}
53 55
 
... ...
@@ -109,6 +111,10 @@ as the labels. If set to "none", no label will be plotted.}
109 111
 
110 112
 \item{plotLabelSize}{size of labels}
111 113
 
114
+\item{plotLabelPositionX}{Numeric vector. The X position of the plot label.}
115
+
116
+\item{plotLabelPositionY}{Numeric vector. The Y position of the plot label.}
117
+
112 118
 \item{samplePerColumn}{If TRUE, when there are multiple samples and combining by "all",
113 119
 the output .ggplot will have plots from each sample on a single column. Default TRUE.}
114 120
 
Browse code

Change format of plot combining function

Yusuke Koga authored on 26/08/2020 14:43:33
Showing 1 changed files
... ...
@@ -9,7 +9,7 @@ plotBcdsResults(
9 9
   sample = NULL,
10 10
   shape = NULL,
11 11
   groupby = NULL,
12
-  combinePlot = FALSE,
12
+  combinePlot = NULL,
13 13
   violin = TRUE,
14 14
   boxplot = FALSE,
15 15
   dots = TRUE,
... ...
@@ -27,7 +27,14 @@ plotBcdsResults(
27 27
   axisLabelSize = 18,
28 28
   axisSize = 15,
29 29
   legendSize = 15,
30
-  legendTitleSize = 16
30
+  legendTitleSize = 16,
31
+  relHeights = c(1.5, 1, 1),
32
+  relWidths = c(1, 1, 1),
33
+  plotLabels = "default",
34
+  plotLabelSize = 20,
35
+  samplePerColumn = TRUE,
36
+  sampleRelHeights = 1,
37
+  sampleRelWidths = 1
31 38
 )
32 39
 }
33 40
 \arguments{
... ...
@@ -44,8 +51,8 @@ Default NULL.}
44 51
 equal length to the number of the samples in the SingleCellExperiment
45 52
 object, or can be retrieved from the colData slot. Default NULL.}
46 53
 
47
-\item{combinePlot}{Boolean. Will combine plots using `cowplot::plot_grid`.
48
-Default FALSE.}
54
+\item{combinePlot}{Must be either "all" or "sample". "all" will combine all plots into a single .ggplot object,
55
+while "sample" will output a list of plots separated by sample. Default "all".}
49 56
 
50 57
 \item{violin}{Boolean. If TRUE, will plot the violin plot. Default TRUE.}
51 58
 
... ...
@@ -92,6 +99,24 @@ when TRUE. Default TRUE.}
92 99
 \item{legendSize}{size of legend. Default 15.}
93 100
 
94 101
 \item{legendTitleSize}{size of legend title. Default 16.}
102
+
103
+\item{relHeights}{Relative heights of plots when combine is set.}
104
+
105
+\item{relWidths}{Relative widths of plots when combine is set.}
106
+
107
+\item{plotLabels}{labels to each plot. If set to "default", will use the name of the samples
108
+as the labels. If set to "none", no label will be plotted.}
109
+
110
+\item{plotLabelSize}{size of labels}
111
+
112
+\item{samplePerColumn}{If TRUE, when there are multiple samples and combining by "all",
113
+the output .ggplot will have plots from each sample on a single column. Default TRUE.}
114
+
115
+\item{sampleRelHeights}{If there are multiple samples and combining by "all",
116
+the relative heights for each plot.}
117
+
118
+\item{sampleRelWidths}{If there are multiple samples and combining by "all",
119
+the relative widths for each plot.}
95 120
 }
96 121
 \description{
97 122
 A wrapper function which visualizes outputs from the
Browse code

Add combinePlot parameter

Yusuke Koga authored on 29/07/2020 14:30:24
Showing 1 changed files
... ...
@@ -9,6 +9,7 @@ plotBcdsResults(
9 9
   sample = NULL,
10 10
   shape = NULL,
11 11
   groupby = NULL,
12
+  combinePlot = FALSE,
12 13
   violin = TRUE,
13 14
   boxplot = FALSE,
14 15
   dots = TRUE,
... ...
@@ -43,6 +44,9 @@ Default NULL.}
43 44
 equal length to the number of the samples in the SingleCellExperiment
44 45
 object, or can be retrieved from the colData slot. Default NULL.}
45 46
 
47
+\item{combinePlot}{Boolean. Will combine plots using `cowplot::plot_grid`.
48
+Default FALSE.}
49
+
46 50
 \item{violin}{Boolean. If TRUE, will plot the violin plot. Default TRUE.}
47 51
 
48 52
 \item{boxplot}{Boolean. If TRUE, will plot boxplots for each violin plot.
Browse code

Edits to plotting fxn for droplet based fxns

Yusuke Koga authored on 14/07/2020 18:20:53
Showing 1 changed files
... ...
@@ -19,10 +19,14 @@ plotBcdsResults(
19 19
   dim2 = NULL,
20 20
   bin = NULL,
21 21
   binLabel = NULL,
22
-  dotSize = 0.5,
23
-  transparency = 1,
24 22
   defaultTheme = TRUE,
25
-  titleSize = 18
23
+  dotSize = 1,
24
+  transparency = 1,
25
+  titleSize = 18,
26
+  axisLabelSize = 18,
27
+  axisSize = 15,
28
+  legendSize = 15,
29
+  legendTitleSize = 16
26 30
 )
27 31
 }
28 32
 \arguments{
... ...
@@ -68,14 +72,22 @@ If more than one value, will bin numeric values using values as a cut point.}
68 72
 \item{binLabel}{Character vector. Labels for the bins created by the `bin` parameter.
69 73
 Default NULL.}
70 74
 
75
+\item{defaultTheme}{Removes grid in plot and sets axis title size to 10
76
+when TRUE. Default TRUE.}
77
+
71 78
 \item{dotSize}{Size of dots. Default 1.}
72 79
 
73 80
 \item{transparency}{Transparency of the dots, values will be 0-1. Default 1.}
74 81
 
75
-\item{defaultTheme}{Removes grid in plot and sets axis title size to 10
76
-when TRUE. Default TRUE.}
82
+\item{titleSize}{Size of title of plot. Default 18.}
83
+
84
+\item{axisLabelSize}{Size of x/y-axis labels. Default 18.}
85
+
86
+\item{axisSize}{Size of x/y-axis ticks. Default 15.}
87
+
88
+\item{legendSize}{size of legend. Default 15.}
77 89
 
78
-\item{titleSize}{Size of title of plot. Default 15.}
90
+\item{legendTitleSize}{size of legend title. Default 16.}
79 91
 }
80 92
 \description{
81 93
 A wrapper function which visualizes outputs from the
... ...
@@ -83,9 +95,9 @@ A wrapper function which visualizes outputs from the
83 95
  SingleCellExperiment object via various plots.
84 96
 }
85 97
 \examples{
86
-data(scExample, package = "singleCellTK")
87
-sce <- sce[, colData(sce)$type != 'EmptyDroplet']
88
-sce <- getUMAP(inSCE = sce, useAssay = "counts", reducedDimName = "UMAP")
98
+data(scExample, package="singleCellTK")
99
+sce <- sce[, colData(sce)$type != "EmptyDroplet"]
100
+sce <- getUMAP(inSCE=sce, useAssay="counts", reducedDimName="UMAP")
89 101
 sce <- runBcds(sce)
90
-plotBcdsResults(inSCE = sce, reducedDimName = "UMAP")
102
+plotBcdsResults(inSCE=sce, reducedDimName="UMAP")
91 103
 }
Browse code

Add axisSize, legendTitleSize, legendSize options

Yusuke Koga authored on 10/07/2020 16:29:50
Showing 1 changed files
... ...
@@ -22,7 +22,7 @@ plotBcdsResults(
22 22
   dotSize = 0.5,
23 23
   transparency = 1,
24 24
   defaultTheme = TRUE,
25
-  titleSize = 15
25
+  titleSize = 18
26 26
 )
27 27
 }
28 28
 \arguments{
Browse code

Removed SCtkExperiment class and methods. Removed all references in the documentation

Joshua D. Campbell authored on 02/07/2020 04:10:40
Showing 1 changed files
... ...
@@ -26,8 +26,9 @@ plotBcdsResults(
26 26
 )
27 27
 }
28 28
 \arguments{
29
-\item{inSCE}{Input SCtkExperiment object with saved dimension reduction
30
-components or a variable with saved results from runBcds. Required.}
29
+\item{inSCE}{Input \linkS4class{SingleCellExperiment} object with saved
30
+dimension reduction components or a variable with saved results from
31
+\link{runBcds}. Required.}
31 32
 
32 33
 \item{sample}{Character vector. Indicates which sample each cell belongs to.
33 34
 Default NULL.}
... ...
@@ -46,8 +47,8 @@ Default TRUE.}
46 47
 \item{dots}{Boolean. If TRUE, will plot dots for each violin plot.
47 48
 Default TRUE.}
48 49
 
49
-\item{reducedDimName}{Saved dimension reduction name in the SCtkExperiment
50
-object. Required.}
50
+\item{reducedDimName}{Saved dimension reduction name in the
51
+\linkS4class{SingleCellExperiment} object. Required.}
51 52
 
52 53
 \item{xlab}{Character vector. Label for x-axis. Default NULL.}
53 54
 
Browse code

Incorporate new per-QC plotting fxn

Yusuke Koga authored on 17/06/2020 13:39:12
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,90 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/ggPerQCWrapper.R
3
+\name{plotBcdsResults}
4
+\alias{plotBcdsResults}
5
+\title{Plots for runBcds outputs.}
6
+\usage{
7
+plotBcdsResults(
8
+  inSCE,
9
+  sample = NULL,
10
+  shape = NULL,
11
+  groupby = NULL,
12
+  violin = TRUE,
13
+  boxplot = FALSE,
14
+  dots = TRUE,
15
+  reducedDimName = NULL,
16
+  xlab = NULL,
17
+  ylab = NULL,
18
+  dim1 = NULL,
19
+  dim2 = NULL,
20
+  bin = NULL,
21
+  binLabel = NULL,
22
+  dotSize = 0.5,
23
+  transparency = 1,
24
+  defaultTheme = TRUE,
25
+  titleSize = 15
26
+)
27
+}
28
+\arguments{
29
+\item{inSCE}{Input SCtkExperiment object with saved dimension reduction
30
+components or a variable with saved results from runBcds. Required.}
31
+
32
+\item{sample}{Character vector. Indicates which sample each cell belongs to.
33
+Default NULL.}
34
+
35
+\item{shape}{If provided, add shapes based on the value.}
36
+
37
+\item{groupby}{Groupings for each numeric value. A user may input a vector
38
+equal length to the number of the samples in the SingleCellExperiment
39
+object, or can be retrieved from the colData slot. Default NULL.}
40
+
41
+\item{violin}{Boolean. If TRUE, will plot the violin plot. Default TRUE.}
42
+
43
+\item{boxplot}{Boolean. If TRUE, will plot boxplots for each violin plot.
44
+Default TRUE.}
45
+
46
+\item{dots}{Boolean. If TRUE, will plot dots for each violin plot.
47
+Default TRUE.}
48
+
49
+\item{reducedDimName}{Saved dimension reduction name in the SCtkExperiment
50
+object. Required.}
51
+
52
+\item{xlab}{Character vector. Label for x-axis. Default NULL.}
53
+
54
+\item{ylab}{Character vector. Label for y-axis. Default NULL.}
55
+
56
+\item{dim1}{1st dimension to be used for plotting. Can either be a string which specifies
57
+the name of the dimension to be plotted from reducedDims, or a numeric value which specifies
58
+the index of the dimension to be plotted. Default is NULL.}
59
+
60
+\item{dim2}{2nd dimension to be used for plotting. Can either be a string which specifies
61
+the name of the dimension to be plotted from reducedDims, or a numeric value which specifies
62
+the index of the dimension to be plotted. Default is NULL.}
63
+
64
+\item{bin}{Numeric vector. If single value, will divide the numeric values into the `bin` groups.
65
+If more than one value, will bin numeric values using values as a cut point.}
66
+
67
+\item{binLabel}{Character vector. Labels for the bins created by the `bin` parameter.
68
+Default NULL.}
69
+
70
+\item{dotSize}{Size of dots. Default 1.}
71
+
72
+\item{transparency}{Transparency of the dots, values will be 0-1. Default 1.}
73
+
74
+\item{defaultTheme}{Removes grid in plot and sets axis title size to 10
75
+when TRUE. Default TRUE.}
76
+
77
+\item{titleSize}{Size of title of plot. Default 15.}
78
+}
79
+\description{
80
+A wrapper function which visualizes outputs from the
81
+ runBcds function stored in the colData slot of the
82
+ SingleCellExperiment object via various plots.
83
+}
84
+\examples{
85
+data(scExample, package = "singleCellTK")
86
+sce <- sce[, colData(sce)$type != 'EmptyDroplet']
87
+sce <- getUMAP(inSCE = sce, useAssay = "counts", reducedDimName = "UMAP")
88
+sce <- runBcds(sce)
89
+plotBcdsResults(inSCE = sce, reducedDimName = "UMAP")
90
+}