Skip to content

Commit 9639a9b

Browse files
author
Charles Plessy
committed
Remove CTSSclusteringMethod and stop recording clustering method name.
Storing this information in metadata slots was very fragile, complicated the code, and caused bugs.
1 parent 3f85d02 commit 9639a9b

29 files changed

+12
-178
lines changed

NAMESPACE

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export("inputFilesType<-")
1313
export("sampleLabels<-")
1414
export(CAGEexp)
1515
export(CTSS)
16-
export(CTSSclusteringMethod)
1716
export(CTSScoordinatesGR)
1817
export(CTSScumulativesCC)
1918
export(CTSScumulativesTagClusters)

NEWS.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Upcoming changes in version 2.11.3
22

3+
BACKWARDS-INCOMPATIBLE CHANGES
4+
5+
- Remove `CTSSclusteringMethod()` function and stop recording clustering
6+
method name.
7+
38
NEW FEATURES
49

510
- New `resetCAGEexp()` function.
@@ -39,8 +44,7 @@ BUG FIXES
3944

4045
# Changes in version 2.8.0 (25/10/2023)
4146

42-
BACKWARDS-INCOMPATIBLE CHANGES
43-
47+
4448
- The `CTSStagCountDA` function is removed.
4549
- The _dominant peak_ in `TagClusters` objects is now a `GRanges` object like
4650
in `ConsensusClusters`.

R/ClusteringMethods.R

+1-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
#'
8080
#' @author Vanja Haberle
8181
#'
82-
#' @seealso [`tagClustersGR`], [`aggregateTagClusters`] and [`CTSSclusteringMethod`].
82+
#' @seealso [`aggregateTagClusters`]
8383
#'
8484
#' @family CAGEr object modifiers
8585
#' @family CAGEr clusters functions
@@ -150,7 +150,6 @@ setMethod( "clusterCTSS", "CAGEexp"
150150
stop("Deprecated method. See ", dQuote("CustomConsensusClusters()"), " instead.")
151151
}
152152

153-
CTSSclusteringMethod(ctss.cluster.list) <- method
154153
seqlevels(ctss.cluster.list) <- seqlevels(CTSStagCountSE(object))
155154
seqinfo(ctss.cluster.list) <- seqinfo(CTSStagCountSE(object))
156155
# Changing the sequence levels may change the sort order. Re-sort

R/GetMethods.R

+2-40
Original file line numberDiff line numberDiff line change
@@ -384,40 +384,6 @@ setMethod( "CTSSnormalizedTpmGR", "CAGEexp", function (object, samples) {
384384
gr
385385
})
386386

387-
#' @name CTSSclusteringMethod
388-
#'
389-
#' @title Get /set CTSS clustering method
390-
#'
391-
#' @description Returns or sets the name of the method that was used make tag
392-
#' clusters from the CTSSs of a \code{\link{CAGEr}} object.
393-
#'
394-
#' @param object A CAGEr object.
395-
#'
396-
#' @seealso \code{\link{clusterCTSS}}
397-
#' @family CAGEr accessor methods
398-
#' @family CAGEr clusters functions
399-
#'
400-
#' @author Vanja Haberle
401-
#' @author Charles Plessy
402-
#'
403-
#' @examples
404-
#' CTSSclusteringMethod(exampleCAGEexp)
405-
#'
406-
#' @export CTSSclusteringMethod
407-
408-
setGeneric("CTSSclusteringMethod", function(object) standardGeneric("CTSSclusteringMethod"))
409-
410-
#' @rdname CTSSclusteringMethod
411-
412-
setMethod("CTSSclusteringMethod", "GRangesList", function (object)
413-
metadata(object)$clusteringMethod)
414-
415-
#' @rdname CTSSclusteringMethod
416-
417-
setMethod("CTSSclusteringMethod", "CAGEexp", function (object)
418-
CTSSclusteringMethod(metadata(object)$tagClusters))
419-
420-
421387
#' @name tagClustersGR
422388
#' @rdname tagClusters
423389
#'
@@ -440,14 +406,12 @@ setMethod("CTSSclusteringMethod", "CAGEexp", function (object)
440406
#' start coordinate of the cluster. Used only when
441407
#' `returnInterquantileWidth = TRUE`, otherwise ignored.
442408
#'
443-
#' @return Returns a `GRangesList` or a `GRanges` object with genomic coordinates,
409+
#' @return Returns a `GRangesList` or a `TagClusters` object with genomic coordinates,
444410
#' position of dominant TSS, total CAGE signal and additional information for
445411
#' all TCs from specified CAGE dataset (sample). If
446412
#' `returnInterquantileWidth = TRUE`, interquantile width for each TC is also
447413
#' calculated using provided quantile positions. The [`S4Vectors::metadata`]
448-
#' slot of the object contains a copy of the `CAGEexp` object's _column data_,
449-
#' as well as information on the clustering method in a `clusteringMethod`
450-
#' element.
414+
#' slot of the object contains a copy of the `CAGEexp` object's _column data_.
451415
#'
452416
#' @author Vanja Haberle
453417
#' @author Charles Plessy
@@ -460,7 +424,6 @@ setMethod("CTSSclusteringMethod", "CAGEexp", function (object)
460424
#' tagClustersGR( exampleCAGEexp, "Zf.high", TRUE, 0.1, 0.9 )
461425
#' tagClustersGR( exampleCAGEexp, 1
462426
#' , returnInterquantileWidth = TRUE, qLow = 0.1, qUp = 0.9 )
463-
#' tagClustersGR( exampleCAGEexp )$clusteringMethod
464427
#' tagClustersGR( exampleCAGEexp )@metadata$colData
465428
#'
466429
#' @export
@@ -475,7 +438,6 @@ setGeneric( "tagClustersGR"
475438
, returnInterquantileWidth = returnInterquantileWidth
476439
, qLow = qLow, qUp = qUp))
477440
names(tc.list) <- sampleLabels(object)
478-
metadata(tc.list)$clusteringMethod <- CTSSclusteringMethod(object)
479441
metadata(tc.list)$colData <- colData(object)
480442
return(tc.list)
481443
}

R/SetMethods.R

-27
Original file line numberDiff line numberDiff line change
@@ -159,33 +159,6 @@ setMethod("filteredCTSSidx<-", "CAGEexp", function (object, value) {
159159
if (validObject(object)) object
160160
})
161161

162-
163-
#' @name CTSSclusteringMethod<-
164-
#'
165-
#' @rdname CTSSclusteringMethod
166-
#'
167-
#' @param value character
168-
169-
setGeneric( "CTSSclusteringMethod<-"
170-
, function(object, value) standardGeneric("CTSSclusteringMethod<-"))
171-
172-
#' @rdname CTSSclusteringMethod
173-
174-
setMethod("CTSSclusteringMethod<-", "GRangesList", function (object, value) {
175-
metadata(object)$clusteringMethod <- value
176-
if (validObject(object)) object
177-
})
178-
179-
#' @rdname CTSSclusteringMethod
180-
181-
setMethod("CTSSclusteringMethod<-", "CAGEexp", function (object, value) {
182-
CTSSclusteringMethod(metadata(object)$tagClusters) <- value
183-
# extrat directly TCs from metadata slot because tagClustersGR does more that
184-
# is not needed here.
185-
if (validObject(object)) object
186-
})
187-
188-
189162
#' @name CTSScumulativesTagClusters<-
190163
#'
191164
#' @rdname CTSScumulativesTagClusters

data/exampleCAGEexp.RData

2.08 KB
Binary file not shown.

man/CTSSclusteringMethod.Rd

-75
This file was deleted.

man/CTSScoordinates.Rd

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/CTSScumulativesTagClusters.Rd

-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/CTSSnormalizedTpm.Rd

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/CTSStagCount.Rd

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/CustomConsensusClusters.Rd

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/GeneExpDESeq2.Rd

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/GeneExpSE.Rd

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/aggregateTagClusters.Rd

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/clusterCTSS.Rd

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/consensusClusters.Rd

-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/consensusClustersDESeq2.Rd

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/cumulativeCTSSdistribution.Rd

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/expressionClasses.Rd

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/genomeName.Rd

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/inputFiles.Rd

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/inputFilesType.Rd

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/librarySizes.Rd

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/plotInterquantileWidth.Rd

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)