Browse code

Tweaking the default size parameters some plotting functions

Joshua D. Campbell authored on 20/01/2023 17:26:28
Showing 1 changed files
... ...
@@ -21,7 +21,7 @@ plotSCEDimReduceColData(
21 21
   dim2 = NULL,
22 22
   bin = NULL,
23 23
   binLabel = NULL,
24
-  dotSize = 0.5,
24
+  dotSize = 0.1,
25 25
   transparency = 1,
26 26
   colorScale = NULL,
27 27
   colorLow = "white",
... ...
@@ -86,7 +86,7 @@ If more than one value, will bin numeric values using values as a cut point.}
86 86
 \item{binLabel}{Character vector. Labels for the bins created by the `bin` parameter.
87 87
 Default NULL.}
88 88
 
89
-\item{dotSize}{Size of dots. Default 0.5.}
89
+\item{dotSize}{Size of dots. Default 0.1.}
90 90
 
91 91
 \item{transparency}{Transparency of the dots, values will be 0-1. Default 1.}
92 92
 
Browse code

Fixed R CMD check issues

Irzam Sarfraz authored on 20/12/2021 22:24:01
Showing 1 changed files
... ...
@@ -138,6 +138,7 @@ Plot results of reduced dimensions data and
138 138
  colors by annotation data stored in the colData slot.
139 139
 }
140 140
 \examples{
141
+data("mouseBrainSubsetSCE")
141 142
 plotSCEDimReduceColData(
142 143
   inSCE = mouseBrainSubsetSCE, colorBy = "tissue",
143 144
   shape = NULL, conditionClass = "factor",
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
... ...
@@ -21,7 +21,7 @@ plotSCEDimReduceColData(
21 21
   dim2 = NULL,
22 22
   bin = NULL,
23 23
   binLabel = NULL,
24
-  dotSize = 2,
24
+  dotSize = 0.5,
25 25
   transparency = 1,
26 26
   colorScale = NULL,
27 27
   colorLow = "white",
... ...
@@ -86,7 +86,7 @@ If more than one value, will bin numeric values using values as a cut point.}
86 86
 \item{binLabel}{Character vector. Labels for the bins created by the `bin` parameter.
87 87
 Default NULL.}
88 88
 
89
-\item{dotSize}{Size of dots. Default 2.}
89
+\item{dotSize}{Size of dots. Default 0.5.}
90 90
 
91 91
 \item{transparency}{Transparency of the dots, values will be 0-1. Default 1.}
92 92
 
Browse code

Update documentation

Yusuke Koga authored on 10/05/2021 18:57:19
Showing 1 changed files
... ...
@@ -64,9 +64,13 @@ original class. Default NULL.}
64 64
 
65 65
 \item{ylab}{Character vector. Label for y-axis. Default NULL.}
66 66
 
67
-\item{axisSize}{Size of x/y-axis ticks. Default 10.}
67
+\item{baseSize}{The base font size for all text. Default 12.
68
+Can be overwritten by titleSize, axisSize, and axisLabelSize,
69
+legendSize, legendTitleSize.}
68 70
 
69
-\item{axisLabelSize}{Size of x/y-axis labels. Default 10.}
71
+\item{axisSize}{Size of x/y-axis ticks. Default NULL.}
72
+
73
+\item{axisLabelSize}{Size of x/y-axis labels. Default NULL.}
70 74
 
71 75
 \item{dim1}{1st dimension to be used for plotting. Can either be a string which specifies
72 76
 the name of the dimension to be plotted from reducedDims, or a numeric value which specifies
... ...
@@ -117,7 +121,7 @@ when `labelClusters` is set to TRUE. Default 3.5.}
117 121
 
118 122
 \item{legendTitleSize}{size of legend title. Default 12.}
119 123
 
120
-\item{legendSize}{size of legend. Default 10.
124
+\item{legendSize}{size of legend. Default NULL.
121 125
 Default FALSE.}
122 126
 
123 127
 \item{combinePlot}{Must be either "all", "sample", or "none". "all" will combine all plots into a single
Browse code

Modifications to plotting functions

Yusuke Koga authored on 10/05/2021 15:09:31
Showing 1 changed files
... ...
@@ -31,6 +31,7 @@ plotSCEDimReduceColData(
31 31
   title = NULL,
32 32
   titleSize = 15,
33 33
   labelClusters = TRUE,
34
+  clusterLabelSize = 3.5,
34 35
   legendTitle = NULL,
35 36
   legendTitleSize = NULL,
36 37
   legendSize = NULL,
... ...
@@ -109,6 +110,9 @@ Default 'blue'.}
109 110
 
110 111
 \item{labelClusters}{Logical. Whether the cluster labels are plotted.}
111 112
 
113
+\item{clusterLabelSize}{Numeric. Determines the size of cluster label
114
+when `labelClusters` is set to TRUE. Default 3.5.}
115
+
112 116
 \item{legendTitle}{title of legend. Default NULL.}
113 117
 
114 118
 \item{legendTitleSize}{size of legend title. Default 12.}
Browse code

Edits to singleCellTK plotting fxns

Yusuke Koga authored on 10/05/2021 11:55:21
Showing 1 changed files
... ...
@@ -14,8 +14,9 @@ plotSCEDimReduceColData(
14 14
   shape = NULL,
15 15
   xlab = NULL,
16 16
   ylab = NULL,
17
-  axisSize = 10,
18
-  axisLabelSize = 10,
17
+  baseSize = 12,
18
+  axisSize = NULL,
19
+  axisLabelSize = NULL,
19 20
   dim1 = NULL,
20 21
   dim2 = NULL,
21 22
   bin = NULL,
... ...
@@ -31,8 +32,8 @@ plotSCEDimReduceColData(
31 32
   titleSize = 15,
32 33
   labelClusters = TRUE,
33 34
   legendTitle = NULL,
34
-  legendTitleSize = 12,
35
-  legendSize = 10,
35
+  legendTitleSize = NULL,
36
+  legendSize = NULL,
36 37
   combinePlot = "none",
37 38
   plotLabels = NULL
38 39
 )
Browse code

Testing ggPlotting.R

Yusuke Koga authored on 14/03/2021 19:08:11
Showing 1 changed files
... ...
@@ -6,12 +6,12 @@
6 6
 \usage{
7 7
 plotSCEDimReduceColData(
8 8
   inSCE,
9
-  sample = NULL,
10 9
   colorBy,
10
+  reducedDimName,
11
+  sample = NULL,
11 12
   groupBy = NULL,
12 13
   conditionClass = NULL,
13 14
   shape = NULL,
14
-  reducedDimName = NULL,
15 15
   xlab = NULL,
16 16
   ylab = NULL,
17 17
   axisSize = 10,
... ...
@@ -39,13 +39,16 @@ plotSCEDimReduceColData(
39 39
 }
40 40
 \arguments{
41 41
 \item{inSCE}{Input \linkS4class{SingleCellExperiment} object with saved
42
-dimension reduction components or a variable with saved results. Required}
43
-
44
-\item{sample}{Character vector. Indicates which sample each cell belongs to.}
42
+dimension reduction components or a variable with saved results. Required.}
45 43
 
46 44
 \item{colorBy}{Color by a condition(any column of the annotation data).
47 45
 Required.}
48 46
 
47
+\item{reducedDimName}{Saved dimension reduction matrix name in the
48
+\linkS4class{SingleCellExperiment} object. Required.}
49
+
50
+\item{sample}{Character vector. Indicates which sample each cell belongs to.}
51
+
49 52
 \item{groupBy}{Group by a condition(any column of the annotation data).
50 53
 Default NULL.}
51 54
 
... ...
@@ -55,9 +58,6 @@ original class. Default NULL.}
55 58
 
56 59
 \item{shape}{Add shapes to each condition.}
57 60
 
58
-\item{reducedDimName}{Saved dimension reduction matrix name in the
59
-\linkS4class{SingleCellExperiment} object. Required.}
60
-
61 61
 \item{xlab}{Character vector. Label for x-axis. Default NULL.}
62 62
 
63 63
 \item{ylab}{Character vector. Label for y-axis. Default NULL.}
Browse code

Add value sections to documentation

Yusuke Koga authored on 15/10/2020 23:39:34
Showing 1 changed files
... ...
@@ -122,7 +122,7 @@ Default FALSE.}
122 122
 as the labels. If set to "none", no label will be plotted.}
123 123
 }
124 124
 \value{
125
-a ggplot of the reduced dimensions.
125
+a ggplot of the reduced dimension plot of coldata.
126 126
 }
127 127
 \description{
128 128
 Plot results of reduced dimensions data and
Browse code

Additional bug fixes relevant to ggSCTKCombinePlots function

Yusuke Koga authored on 07/10/2020 08:19:03
Showing 1 changed files
... ...
@@ -33,7 +33,7 @@ plotSCEDimReduceColData(
33 33
   legendTitle = NULL,
34 34
   legendTitleSize = 12,
35 35
   legendSize = 10,
36
-  combinePlot = NULL,
36
+  combinePlot = "none",
37 37
   plotLabels = NULL
38 38
 )
39 39
 }
... ...
@@ -115,9 +115,8 @@ Default 'blue'.}
115 115
 \item{legendSize}{size of legend. Default 10.
116 116
 Default FALSE.}
117 117
 
118
-\item{combinePlot}{Boolean. If multiple plots are generated (multiple
119
-samples, etc.), will combined plots using `cowplot::plot_grid`.
120
-Default TRUE.}
118
+\item{combinePlot}{Must be either "all", "sample", or "none". "all" will combine all plots into a single
119
+.ggplot object, while "sample" will output a list of plots separated by sample. Default "none".}
121 120
 
122 121
 \item{plotLabels}{labels to each plot. If set to "default", will use the name of the samples
123 122
 as the labels. If set to "none", no label will be plotted.}
Browse code

Resolve merge conflicts

Yusuke Koga authored on 01/10/2020 14:17:08
Showing 0 changed files
Browse code

Update documentation for plotSCEBar

Yusuke Koga authored on 30/09/2020 21:32:42
Showing 1 changed files
... ...
@@ -14,8 +14,8 @@ plotSCEDimReduceColData(
14 14
   reducedDimName = NULL,
15 15
   xlab = NULL,
16 16
   ylab = NULL,
17
-  axisSize = 10,
18
-  axisLabelSize = 10,
17
+  axisSize = NULL,
18
+  axisLabelSize = NULL,
19 19
   dim1 = NULL,
20 20
   dim2 = NULL,
21 21
   bin = NULL,
Browse code

merge upstream

Yichen Wang authored on 30/09/2020 18:15:03
Showing 0 changed files
Browse code

Debug .ggSCTKCombinePlots

Yusuke Koga authored on 23/09/2020 12:09:09
Showing 1 changed files
... ...
@@ -33,7 +33,8 @@ plotSCEDimReduceColData(
33 33
   legendTitle = NULL,
34 34
   legendTitleSize = 12,
35 35
   legendSize = 10,
36
-  combinePlot = TRUE
36
+  combinePlot = NULL,
37
+  plotLabels = NULL
37 38
 )
38 39
 }
39 40
 \arguments{
... ...
@@ -117,6 +118,9 @@ Default FALSE.}
117 118
 \item{combinePlot}{Boolean. If multiple plots are generated (multiple
118 119
 samples, etc.), will combined plots using `cowplot::plot_grid`.
119 120
 Default TRUE.}
121
+
122
+\item{plotLabels}{labels to each plot. If set to "default", will use the name of the samples
123
+as the labels. If set to "none", no label will be plotted.}
120 124
 }
121 125
 \value{
122 126
 a ggplot of the reduced dimensions.
Browse code

Add combinePlot parameter

Yusuke Koga authored on 29/07/2020 14:30:24
Showing 1 changed files
... ...
@@ -32,7 +32,8 @@ plotSCEDimReduceColData(
32 32
   labelClusters = TRUE,
33 33
   legendTitle = NULL,
34 34
   legendTitleSize = 12,
35
-  legendSize = 10
35
+  legendSize = 10,
36
+  combinePlot = TRUE
36 37
 )
37 38
 }
38 39
 \arguments{
... ...
@@ -112,6 +113,10 @@ Default 'blue'.}
112 113
 
113 114
 \item{legendSize}{size of legend. Default 10.
114 115
 Default FALSE.}
116
+
117
+\item{combinePlot}{Boolean. If multiple plots are generated (multiple
118
+samples, etc.), will combined plots using `cowplot::plot_grid`.
119
+Default TRUE.}
115 120
 }
116 121
 \value{
117 122
 a ggplot of the reduced dimensions.
Browse code

Add colorScale parameter to .ggScatter

Yusuke Koga authored on 28/07/2020 16:52:57
Showing 1 changed files
... ...
@@ -22,6 +22,7 @@ plotSCEDimReduceColData(
22 22
   binLabel = NULL,
23 23
   dotSize = 2,
24 24
   transparency = 1,
25
+  colorScale = NULL,
25 26
   colorLow = "white",
26 27
   colorMid = "gray",
27 28
   colorHigh = "blue",
... ...
@@ -81,6 +82,10 @@ Default NULL.}
81 82
 
82 83
 \item{transparency}{Transparency of the dots, values will be 0-1. Default 1.}
83 84
 
85
+\item{colorScale}{Vector. Needs to be same length as the
86
+number of unique levels of colorBy. Will be used only if
87
+conditionClass = "factor" or "character". Default NULL.}
88
+
84 89
 \item{colorLow}{Character. A color available from `colors()`.
85 90
 The color will be used to signify the lowest values on the scale.
86 91
 Default 'white'.}
Browse code

Add axisSize, legendTitleSize, legendSize options

Yusuke Koga authored on 10/07/2020 16:29:50
Showing 1 changed files
... ...
@@ -14,6 +14,8 @@ plotSCEDimReduceColData(
14 14
   reducedDimName = NULL,
15 15
   xlab = NULL,
16 16
   ylab = NULL,
17
+  axisSize = 10,
18
+  axisLabelSize = 10,
17 19
   dim1 = NULL,
18 20
   dim2 = NULL,
19 21
   bin = NULL,
... ...
@@ -27,7 +29,9 @@ plotSCEDimReduceColData(
27 29
   title = NULL,
28 30
   titleSize = 15,
29 31
   labelClusters = TRUE,
30
-  legendTitle = NULL
32
+  legendTitle = NULL,
33
+  legendTitleSize = 12,
34
+  legendSize = 10
31 35
 )
32 36
 }
33 37
 \arguments{
... ...
@@ -55,6 +59,10 @@ original class. Default NULL.}
55 59
 
56 60
 \item{ylab}{Character vector. Label for y-axis. Default NULL.}
57 61
 
62
+\item{axisSize}{Size of x/y-axis ticks. Default 10.}
63
+
64
+\item{axisLabelSize}{Size of x/y-axis labels. Default 10.}
65
+
58 66
 \item{dim1}{1st dimension to be used for plotting. Can either be a string which specifies
59 67
 the name of the dimension to be plotted from reducedDims, or a numeric value which specifies
60 68
 the index of the dimension to be plotted. Default is NULL.}
... ...
@@ -93,7 +101,11 @@ Default 'blue'.}
93 101
 
94 102
 \item{labelClusters}{Logical. Whether the cluster labels are plotted.}
95 103
 
96
-\item{legendTitle}{title of legend. Default NULL.
104
+\item{legendTitle}{title of legend. Default NULL.}
105
+
106
+\item{legendTitleSize}{size of legend title. Default 12.}
107
+
108
+\item{legendSize}{size of legend. Default 10.
97 109
 Default FALSE.}
98 110
 }
99 111
 \value{
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
... ...
@@ -31,8 +31,8 @@ plotSCEDimReduceColData(
31 31
 )
32 32
 }
33 33
 \arguments{
34
-\item{inSCE}{Input SCtkExperiment object with saved dimension reduction
35
-components or a variable with saved results. Required}
34
+\item{inSCE}{Input \linkS4class{SingleCellExperiment} object with saved
35
+dimension reduction components or a variable with saved results. Required}
36 36
 
37 37
 \item{sample}{Character vector. Indicates which sample each cell belongs to.}
38 38
 
... ...
@@ -48,8 +48,8 @@ original class. Default NULL.}
48 48
 
49 49
 \item{shape}{Add shapes to each condition.}
50 50
 
51
-\item{reducedDimName}{Saved dimension reduction matrix name in the SCtkExperiment
52
-object. Required.}
51
+\item{reducedDimName}{Saved dimension reduction matrix name in the
52
+\linkS4class{SingleCellExperiment} object. Required.}
53 53
 
54 54
 \item{xlab}{Character vector. Label for x-axis. Default NULL.}
55 55
 
Browse code

Fixed errors in .ggScatter. Removed emptyDropsExample and updated examples using this to use scExample instead.

Joshua D. Campbell authored on 28/06/2020 22:37:11
Showing 1 changed files
... ...
@@ -8,6 +8,7 @@ plotSCEDimReduceColData(
8 8
   inSCE,
9 9
   sample = NULL,
10 10
   colorBy,
11
+  groupBy = NULL,
11 12
   conditionClass = NULL,
12 13
   shape = NULL,
13 14
   reducedDimName = NULL,
... ...
@@ -38,6 +39,9 @@ components or a variable with saved results. Required}
38 39
 \item{colorBy}{Color by a condition(any column of the annotation data).
39 40
 Required.}
40 41
 
42
+\item{groupBy}{Group by a condition(any column of the annotation data).
43
+Default NULL.}
44
+
41 45
 \item{conditionClass}{Class of the annotation data used in colorBy.
42 46
 Options are NULL, "factor" or "numeric". If NULL, class will default to the
43 47
 original class. Default NULL.}
Browse code

color of scatterplot adjustable with colorLow, etc. arguments

Yusuke Koga authored on 22/06/2020 16:34:02
Showing 1 changed files
... ...
@@ -19,6 +19,9 @@ plotSCEDimReduceColData(
19 19
   binLabel = NULL,
20 20
   dotSize = 2,
21 21
   transparency = 1,
22
+  colorLow = "white",
23
+  colorMid = "gray",
24
+  colorHigh = "blue",
22 25
   defaultTheme = TRUE,
23 26
   title = NULL,
24 27
   titleSize = 15,
... ...
@@ -66,6 +69,18 @@ Default NULL.}
66 69
 
67 70
 \item{transparency}{Transparency of the dots, values will be 0-1. Default 1.}
68 71
 
72
+\item{colorLow}{Character. A color available from `colors()`.
73
+The color will be used to signify the lowest values on the scale.
74
+Default 'white'.}
75
+
76
+\item{colorMid}{Character. A color available from `colors()`.
77
+The color will be used to signify the midpoint on the scale.
78
+Default 'gray'.}
79
+
80
+\item{colorHigh}{Character. A color available from `colors()`.
81
+The color will be used to signify the highest values on the scale.
82
+Default 'blue'.}
83
+
69 84
 \item{defaultTheme}{adds grid to plot when TRUE. Default TRUE.}
70 85
 
71 86
 \item{title}{Title of plot. Default NULL.}
Browse code

Incorporate new per-QC plotting fxn

Yusuke Koga authored on 17/06/2020 13:39:12
Showing 1 changed files
... ...
@@ -17,7 +17,7 @@ plotSCEDimReduceColData(
17 17
   dim2 = NULL,
18 18
   bin = NULL,
19 19
   binLabel = NULL,
20
-  dotsize = 2,
20
+  dotSize = 2,
21 21
   transparency = 1,
22 22
   defaultTheme = TRUE,
23 23
   title = NULL,
... ...
@@ -62,7 +62,7 @@ If more than one value, will bin numeric values using values as a cut point.}
62 62
 \item{binLabel}{Character vector. Labels for the bins created by the `bin` parameter.
63 63
 Default NULL.}
64 64
 
65
-\item{dotsize}{Size of dots. Default 2.}
65
+\item{dotSize}{Size of dots. Default 2.}
66 66
 
67 67
 \item{transparency}{Transparency of the dots, values will be 0-1. Default 1.}
68 68
 
... ...
@@ -95,7 +95,7 @@ plotSCEDimReduceColData(
95 95
 plotSCEDimReduceColData(
96 96
   inSCE = mouseBrainSubsetSCE, colorBy = "age",
97 97
   shape = NULL, conditionClass = "numeric",
98
-  reducedDimName = "TSNE_counts", bin =  c(-Inf,20,25,+Inf),
98
+  reducedDimName = "TSNE_counts", bin = c(-Inf, 20, 25, +Inf),
99 99
   xlab = "tSNE1", ylab = "tSNE2", labelClusters = FALSE
100 100
 )
101 101
 }
Browse code

Add new .Rd man

Yusuke Koga authored on 15/06/2020 20:01:48
Showing 1 changed files
... ...
@@ -6,6 +6,7 @@
6 6
 \usage{
7 7
 plotSCEDimReduceColData(
8 8
   inSCE,
9
+  sample = NULL,
9 10
   colorBy,
10 11
   conditionClass = NULL,
11 12
   shape = NULL,
... ...
@@ -29,6 +30,8 @@ plotSCEDimReduceColData(
29 30
 \item{inSCE}{Input SCtkExperiment object with saved dimension reduction
30 31
 components or a variable with saved results. Required}
31 32
 
33
+\item{sample}{Character vector. Indicates which sample each cell belongs to.}
34
+
32 35
 \item{colorBy}{Color by a condition(any column of the annotation data).
33 36
 Required.}
34 37
 
Browse code

Modifications to ggScatter, add bin fxn

Yusuke Koga authored on 24/05/2020 02:08:55
Showing 1 changed files
... ...
@@ -6,14 +6,16 @@
6 6
 \usage{
7 7
 plotSCEDimReduceColData(
8 8
   inSCE,
9
-  colorBy = "No Color",
10
-  shape = "No Shape",
11
-  reducedDimName = NULL,
9
+  colorBy,
12 10
   conditionClass = NULL,
11
+  shape = NULL,
12
+  reducedDimName = NULL,
13 13
   xlab = NULL,
14 14
   ylab = NULL,
15 15
   dim1 = NULL,
16 16
   dim2 = NULL,
17
+  bin = NULL,
18
+  binLabel = NULL,
17 19
   dotsize = 2,
18 20
   transparency = 1,
19 21
   defaultTheme = TRUE,
... ...
@@ -27,34 +29,45 @@ plotSCEDimReduceColData(
27 29
 \item{inSCE}{Input SCtkExperiment object with saved dimension reduction
28 30
 components or a variable with saved results. Required}
29 31
 
30
-\item{colorBy}{color by a condition(any column of the annotation data).}
32
+\item{colorBy}{Color by a condition(any column of the annotation data).
33
+Required.}
34
+
35
+\item{conditionClass}{Class of the annotation data used in colorBy.
36
+Options are NULL, "factor" or "numeric". If NULL, class will default to the
37
+original class. Default NULL.}
31 38
 
32
-\item{shape}{add shapes to each condition.}
39
+\item{shape}{Add shapes to each condition.}
33 40
 
34
-\item{reducedDimName}{saved dimension reduction name in the SCtkExperiment
41
+\item{reducedDimName}{Saved dimension reduction matrix name in the SCtkExperiment
35 42
 object. Required.}
36 43
 
37
-\item{conditionClass}{class of the annotation data used in colorBy.
38
-Options are NULL, "factor" or "numeric". If NULL, class will default to the
39
-original class. Default NULL.}
44
+\item{xlab}{Character vector. Label for x-axis. Default NULL.}
45
+
46
+\item{ylab}{Character vector. Label for y-axis. Default NULL.}
40 47
 
41
-\item{xlab}{label for x-axis}
48
+\item{dim1}{1st dimension to be used for plotting. Can either be a string which specifies
49
+the name of the dimension to be plotted from reducedDims, or a numeric value which specifies
50
+the index of the dimension to be plotted. Default is NULL.}
42 51
 
43
-\item{ylab}{label for y-axis}
52
+\item{dim2}{2nd dimension to be used for plotting. Can either be a string which specifies
53
+the name of the dimension to be plotted from reducedDims, or a numeric value which specifies
54
+the index of the dimension to be plotted. Default is NULL.}
44 55
 
45
-\item{dim1}{1st dimension to be used for plotting. Default is NULL.}
56
+\item{bin}{Numeric vector. If single value, will divide the numeric values into the `bin` groups.
57
+If more than one value, will bin numeric values using values as a cut point.}
46 58
 
47
-\item{dim2}{2nd dimension to be used for plotting. Default is NULL.}
59
+\item{binLabel}{Character vector. Labels for the bins created by the `bin` parameter.
60
+Default NULL.}
48 61
 
49
-\item{dotsize}{size of dots. Default 2.}
62
+\item{dotsize}{Size of dots. Default 2.}
50 63
 
51
-\item{transparency}{transparency of the dots, values will be 0-1. Default 1.}
64
+\item{transparency}{Transparency of the dots, values will be 0-1. Default 1.}
52 65
 
53 66
 \item{defaultTheme}{adds grid to plot when TRUE. Default TRUE.}
54 67
 
55
-\item{title}{title of plot. Default NULL.}
68
+\item{title}{Title of plot. Default NULL.}
56 69
 
57
-\item{titleSize}{size of title of plot. Default 15.}
70
+\item{titleSize}{Size of title of plot. Default 15.}
58 71
 
59 72
 \item{labelClusters}{Logical. Whether the cluster labels are plotted.}
60 73
 
... ...
@@ -71,8 +84,15 @@ Plot results of reduced dimensions data and
71 84
 \examples{
72 85
 plotSCEDimReduceColData(
73 86
   inSCE = mouseBrainSubsetSCE, colorBy = "tissue",
74
-  shape = "No Shape", conditionClass = "factor",
87
+  shape = NULL, conditionClass = "factor",
75 88
   reducedDimName = "TSNE_counts",
76 89
   xlab = "tSNE1", ylab = "tSNE2", labelClusters = TRUE
77 90
 )
91
+
92
+plotSCEDimReduceColData(
93
+  inSCE = mouseBrainSubsetSCE, colorBy = "age",
94
+  shape = NULL, conditionClass = "numeric",
95
+  reducedDimName = "TSNE_counts", bin =  c(-Inf,20,25,+Inf),
96
+  xlab = "tSNE1", ylab = "tSNE2", labelClusters = FALSE
97
+)
78 98
 }
Browse code

Re-knit documentation for ggPlotting.R

Yusuke Koga authored on 13/05/2020 13:38:27
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,78 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/ggPlotting.R
3
+\name{plotSCEDimReduceColData}
4
+\alias{plotSCEDimReduceColData}
5
+\title{Dimension reduction plot tool for colData}
6
+\usage{
7
+plotSCEDimReduceColData(
8
+  inSCE,
9
+  colorBy = "No Color",
10
+  shape = "No Shape",
11
+  reducedDimName = NULL,
12
+  conditionClass = NULL,
13
+  xlab = NULL,
14
+  ylab = NULL,
15
+  dim1 = NULL,
16
+  dim2 = NULL,
17
+  dotsize = 2,
18
+  transparency = 1,
19
+  defaultTheme = TRUE,
20
+  title = NULL,
21
+  titleSize = 15,
22
+  labelClusters = TRUE,
23
+  legendTitle = NULL
24
+)
25
+}
26
+\arguments{
27
+\item{inSCE}{Input SCtkExperiment object with saved dimension reduction
28
+components or a variable with saved results. Required}
29
+
30
+\item{colorBy}{color by a condition(any column of the annotation data).}
31
+
32
+\item{shape}{add shapes to each condition.}
33
+
34
+\item{reducedDimName}{saved dimension reduction name in the SCtkExperiment
35
+object. Required.}
36
+
37
+\item{conditionClass}{class of the annotation data used in colorBy.
38
+Options are NULL, "factor" or "numeric". If NULL, class will default to the
39
+original class. Default NULL.}
40
+
41
+\item{xlab}{label for x-axis}
42
+
43
+\item{ylab}{label for y-axis}
44
+
45
+\item{dim1}{1st dimension to be used for plotting. Default is NULL.}
46
+
47
+\item{dim2}{2nd dimension to be used for plotting. Default is NULL.}
48
+
49
+\item{dotsize}{size of dots. Default 2.}
50
+
51
+\item{transparency}{transparency of the dots, values will be 0-1. Default 1.}
52
+
53
+\item{defaultTheme}{adds grid to plot when TRUE. Default TRUE.}
54
+
55
+\item{title}{title of plot. Default NULL.}
56
+
57
+\item{titleSize}{size of title of plot. Default 15.}
58
+
59
+\item{labelClusters}{Logical. Whether the cluster labels are plotted.}
60
+
61
+\item{legendTitle}{title of legend. Default NULL.
62
+Default FALSE.}
63
+}
64
+\value{
65
+a ggplot of the reduced dimensions.
66
+}
67
+\description{
68
+Plot results of reduced dimensions data and
69
+ colors by annotation data stored in the colData slot.
70
+}
71
+\examples{
72
+plotSCEDimReduceColData(
73
+  inSCE = mouseBrainSubsetSCE, colorBy = "tissue",
74
+  shape = "No Shape", conditionClass = "factor",
75
+  reducedDimName = "TSNE_counts",
76
+  xlab = "tSNE1", ylab = "tSNE2", labelClusters = TRUE
77
+)
78
+}