Browse code

Fix bad link in documentation for plotUpSet

dunstone-a authored on 17/03/2025 03:48:14
Showing 1 changed files
... ...
@@ -39,7 +39,7 @@ include the set size (set_size), combination size (comb_size), degree (deg).}
39 39
 
40 40
 \item{set_order}{Array specifying order of states.}
41 41
 
42
-\item{...}{Further arguments passed to \code{\link[UpSet]{UpSet}}}
42
+\item{...}{Further arguments passed to \code{\link[ComplexHeatmap]{UpSet}}}
43 43
 }
44 44
 \value{
45 45
 Returns a \code{ComplexHeatmap} object.
Browse code

Fix plotting functions not passing on further arguments - plotPairwiseSharing, plotQTLClusters and plotUpSet now support further arguments

dunstone-a authored on 17/03/2025 03:36:21
Showing 1 changed files
... ...
@@ -39,7 +39,7 @@ include the set size (set_size), combination size (comb_size), degree (deg).}
39 39
 
40 40
 \item{set_order}{Array specifying order of states.}
41 41
 
42
-\item{...}{further arguments passed to \code{\link[Rtsne]{Rtsne}}}
42
+\item{...}{Further arguments passed to \code{\link[UpSet]{UpSet}}}
43 43
 }
44 44
 \value{
45 45
 Returns a \code{ComplexHeatmap} object.
Browse code

Updated many arguments to use camelCase - Also added type checking for qtle objects

dunstone-a authored on 21/04/2024 15:04:28
Showing 1 changed files
... ...
@@ -8,10 +8,10 @@ plotUpSet(
8 8
   object,
9 9
   assay = "significant",
10 10
   name = "colnames",
11
-  min_shared = 10,
12
-  min_degree = 2,
13
-  max_degree = NULL,
14
-  annotate_by = NULL,
11
+  minShared = 10,
12
+  minDegree = 2,
13
+  maxDegree = NULL,
14
+  annotateColsBy = NULL,
15 15
   comb_order = "comb_size",
16 16
   set_order = order(ss),
17 17
   ...
... ...
@@ -25,13 +25,13 @@ plotUpSet(
25 25
 \item{name}{character specifying the column in colData to use to label rows
26 26
 and columns. Default is colnames(qtle).}
27 27
 
28
-\item{min_shared}{minimum number of shared QTL for set to be included.}
28
+\item{minShared}{minimum number of shared QTL for set to be included.}
29 29
 
30
-\item{min_degree}{minimum degree of sharing for set to be included.}
30
+\item{minDegree}{minimum degree of sharing for set to be included.}
31 31
 
32
-\item{max_degree}{maximum degree of sharing for set to be included.}
32
+\item{maxDegree}{maximum degree of sharing for set to be included.}
33 33
 
34
-\item{annotate_by}{character or array of characters specifying the
34
+\item{annotateColsBy}{character or array of characters specifying the
35 35
 column(s) in colData to be plotted as annotations.}
36 36
 
37 37
 \item{comb_order}{characters specifying how sets should be ordered. Options
... ...
@@ -50,10 +50,10 @@ significant in sets of states.
50 50
 }
51 51
 \examples{
52 52
 sim <- qtleSimulate(
53
-    nstates=10, nfeatures=100, ntests=1000,
53
+    nStates=10, nFeatures=100, nTests=1000,
54 54
     global=0.2, multi=0.4, unique=0.2, k=2)
55 55
 sim <- callSignificance(sim, mode="simple", assay="lfsrs", 
56
-    thresh=0.0001, second.thresh=0.0002)
56
+    thresh=0.0001, secondThresh=0.0002)
57 57
 sim_sig <- getSignificant(sim)
58 58
 sim_top <- getTopHits(sim_sig, assay="lfsrs", mode="state")
59 59
 sim_top <- runPairwiseSharing(sim_top)
... ...
@@ -61,5 +61,5 @@ sim_top <- runPairwiseSharing(sim_top)
61 61
 plotUpSet(sim_top)
62 62
 
63 63
 # Upset plot with complex row annotations
64
-plotUpSet(sim_top, annotate_by = c("nSignificant", "multistateGroup"))
64
+plotUpSet(sim_top, annotateColsBy = c("nSignificant", "multistateGroup"))
65 65
 }
Browse code

Update documentation - Added examples for callSignificance, replaceNAs and plotting functions - Needed to add elipses in "plotUpSet"

dunstone-a authored on 21/03/2024 13:42:27
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,65 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/plots.R
3
+\name{plotUpSet}
4
+\alias{plotUpSet}
5
+\title{Upset plot of QTL sharing between states with state-level annotations}
6
+\usage{
7
+plotUpSet(
8
+  object,
9
+  assay = "significant",
10
+  name = "colnames",
11
+  min_shared = 10,
12
+  min_degree = 2,
13
+  max_degree = NULL,
14
+  annotate_by = NULL,
15
+  comb_order = "comb_size",
16
+  set_order = order(ss),
17
+  ...
18
+)
19
+}
20
+\arguments{
21
+\item{object}{an \code{QTLExperiment} object}
22
+
23
+\item{assay}{Name of assay to use to assess significance.}
24
+
25
+\item{name}{character specifying the column in colData to use to label rows
26
+and columns. Default is colnames(qtle).}
27
+
28
+\item{min_shared}{minimum number of shared QTL for set to be included.}
29
+
30
+\item{min_degree}{minimum degree of sharing for set to be included.}
31
+
32
+\item{max_degree}{maximum degree of sharing for set to be included.}
33
+
34
+\item{annotate_by}{character or array of characters specifying the
35
+column(s) in colData to be plotted as annotations.}
36
+
37
+\item{comb_order}{characters specifying how sets should be ordered. Options
38
+include the set size (set_size), combination size (comb_size), degree (deg).}
39
+
40
+\item{set_order}{Array specifying order of states.}
41
+
42
+\item{...}{further arguments passed to \code{\link[Rtsne]{Rtsne}}}
43
+}
44
+\value{
45
+Returns a \code{ComplexHeatmap} object.
46
+}
47
+\description{
48
+Convenient method to plot an UpSet plot showing the number of QTL that are
49
+significant in sets of states.
50
+}
51
+\examples{
52
+sim <- qtleSimulate(
53
+    nstates=10, nfeatures=100, ntests=1000,
54
+    global=0.2, multi=0.4, unique=0.2, k=2)
55
+sim <- callSignificance(sim, mode="simple", assay="lfsrs", 
56
+    thresh=0.0001, second.thresh=0.0002)
57
+sim_sig <- getSignificant(sim)
58
+sim_top <- getTopHits(sim_sig, assay="lfsrs", mode="state")
59
+sim_top <- runPairwiseSharing(sim_top)
60
+
61
+plotUpSet(sim_top)
62
+
63
+# Upset plot with complex row annotations
64
+plotUpSet(sim_top, annotate_by = c("nSignificant", "multistateGroup"))
65
+}