16
16
# ' @param thresholdIsTpm Logical indicating if `threshold` is expressed in
17
17
# ' raw tag counts (`FALSE`) or normalized signal (`TRUE`).
18
18
# '
19
- # ' @param method Method to be used for clustering: `"distclu"`,
20
- # ' `"paraclu"` or `"custom"`. See Details.
19
+ # ' @param method Method to be used for clustering: `"distclu"` or `"paraclu"`.
20
+ # ' See Details.
21
21
# '
22
22
# ' @param maxDist Maximal distance between two neighbouring CTSSs for them to be
23
23
# ' part of the same cluster. Used only when `method = "distclu"`,
24
24
# ' otherwise ignored.
25
25
# '
26
26
# ' @param removeSingletons Logical indicating if tag clusters containing only
27
- # ' one CTSS be removed. Ignored when `method = "custom"`.
27
+ # ' one CTSS be removed.
28
28
# '
29
29
# ' @param keepSingletonsAbove Controls which singleton tag clusters will be
30
30
# ' removed. When `removeSingletons = TRUE`, only singletons with signal
31
31
# ' `< keepSingletonsAbove` will be removed. Useful to prevent removing
32
32
# ' highly supported singleton tag clusters. Default value `Inf` results
33
- # ' in removing all singleton TCs when `removeSingletons = TRUE`. Ignored
34
- # ' when `method = "custom"`.
33
+ # ' in removing all singleton TCs when `removeSingletons = TRUE`.
35
34
# '
36
35
# ' @param minStability Minimal stability of the cluster, where stability is
37
36
# ' defined as ratio between maximal and minimal density value for which
40
39
# ' `< minStability` will be discarded. Used only when `method = "paraclu"`.
41
40
# '
42
41
# ' @param maxLength Maximal length of cluster in base-pairs. Clusters with length
43
- # ' `> maxLength` will be discarded. Ignored when `method = "custom"`.
42
+ # ' `> maxLength` will be discarded.
44
43
# '
45
44
# ' @param reduceToNonoverlapping Logical, should smaller clusters contained
46
45
# ' within bigger cluster be removed to make a final set of tag clusters
47
46
# ' non-overlapping. Used only `method = "paraclu"`.
48
47
# '
49
- # ' @param customClusters Genomic coordinates of predefined regions to be used to
50
- # ' segment the CTSSs. The format is either a [`GRanges`] object or a
51
- # ' [`data.frame`] with the following columns: `chr` (chromosome name),
52
- # ' `start` (0-based start coordinate), `end` (end coordinate), `strand`
53
- # ' (either `"+"`, or `"-"`). Used only when `method = "custom"`.
54
- # '
55
48
# ' @param useMulticore Logical, should multicore be used. `useMulticore = TRUE`
56
49
# ' has no effect on non-Unix-like platforms.
57
50
# '
@@ -116,7 +109,7 @@ setGeneric( "clusterCTSS"
116
109
, method = c(" distclu" , " paraclu" , " custom" ), maxDist = 20
117
110
, removeSingletons = FALSE , keepSingletonsAbove = Inf
118
111
, minStability = 1 , maxLength = 500
119
- , reduceToNonoverlapping = TRUE , customClusters = NULL
112
+ , reduceToNonoverlapping = TRUE
120
113
, useMulticore = FALSE , nrCores = NULL )
121
114
standardGeneric(" clusterCTSS" ))
122
115
@@ -125,7 +118,7 @@ setGeneric( "clusterCTSS"
125
118
setMethod ( "clusterCTSS ", "CAGEexp"
126
119
, function ( object , threshold , nrPassThreshold , thresholdIsTpm , method , maxDist
127
120
, removeSingletons , keepSingletonsAbove , minStability , maxLength
128
- , reduceToNonoverlapping , customClusters , useMulticore , nrCores ) {
121
+ , reduceToNonoverlapping , useMulticore , nrCores ) {
129
122
130
123
assay <- ifelse(isTRUE(thresholdIsTpm ), " normalizedTpmMatrix" , " counts" )
131
124
data <- CTSStagCountSE(object )
@@ -156,12 +149,7 @@ setMethod( "clusterCTSS", "CAGEexp"
156
149
, reduceToNonoverlapping = reduceToNonoverlapping
157
150
, useMulticore = useMulticore , nrCores = nrCores )
158
151
} else if (method == " custom" ) {
159
- if (is.null(customClusters ))
160
- stop(sQuote(" customClusters" ), " must be given when method = " , sQuote(" custom" ), " ." )
161
- ctss.cluster.list <- .predefined.clusters( data = data [decode(filteredCTSSidx(object )),]
162
- , sample.labels = sampleLabels(object )
163
- , custom.clusters = customClusters
164
- , useMulticore = useMulticore , nrCores = nrCores )
152
+ stop(" Deprecated method. See " , dQuote(" CustomConsensusClusters()" ), " instead." )
165
153
}
166
154
167
155
CTSSclusteringMethod(ctss.cluster.list ) <- method
0 commit comments