From 12bc69fcad6653e645aeb03c7bee81f8b57b5420 Mon Sep 17 00:00:00 2001 From: "hpages@fhcrc.org" Date: Thu, 20 Nov 2014 02:36:10 +0000 Subject: [PATCH] internal utility makeClassinfoRowForCompactPrinting() is now in S4Vectors git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/GenomicRanges@96945 bc3139a8-67e5-0310-9ffc-ced21a209358 --- DESCRIPTION | 2 +- R/GenomicRanges-class.R | 3 ++- R/utils.R | 25 ------------------------- 3 files changed, 3 insertions(+), 27 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index ff2c66c..86de285 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -12,7 +12,7 @@ Author: P. Aboyoun, H. Pages and M. Lawrence Maintainer: Bioconductor Package Maintainer biocViews: Genetics, Infrastructure, Sequencing, Annotation, Coverage, GenomeAnnotation -Depends: R (>= 2.10), methods, BiocGenerics (>= 0.11.3), S4Vectors (>= 0.5.8), +Depends: R (>= 2.10), methods, BiocGenerics (>= 0.11.3), S4Vectors (>= 0.5.10), IRanges (>= 2.1.17), GenomeInfoDb (>= 1.1.20) Imports: utils, stats, XVector LinkingTo: S4Vectors, IRanges diff --git a/R/GenomicRanges-class.R b/R/GenomicRanges-class.R index dc294e4..000ae1e 100644 --- a/R/GenomicRanges-class.R +++ b/R/GenomicRanges-class.R @@ -802,7 +802,8 @@ showGenomicRanges <- function(x, margin="", ) extraColumnNames <- extraColumnSlotNames(x) .COL2CLASS <- c(.COL2CLASS, getSlots(class(x))[extraColumnNames]) - classinfo <- makeClassinfoRowForCompactPrinting(x, .COL2CLASS) + classinfo <- + S4Vectors:::makeClassinfoRowForCompactPrinting(x, .COL2CLASS) ## A sanity check, but this should never happen! stopifnot(identical(colnames(classinfo), colnames(out))) out <- rbind(classinfo, out) diff --git a/R/utils.R b/R/utils.R index 1dbb5ca..1551596 100644 --- a/R/utils.R +++ b/R/utils.R @@ -3,31 +3,6 @@ ### ------------------------------------------------------------------------- -### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -### Used by "show" methods. -### - -makeClassinfoRowForCompactPrinting <- function(x, col2class) -{ - ans_names <- names(col2class) - no_bracket <- ans_names == "" - ans_names[no_bracket] <- col2class[no_bracket] - left_brackets <- right_brackets <- character(length(col2class)) - left_brackets[!no_bracket] <- "<" - right_brackets[!no_bracket] <- ">" - ans <- paste0(left_brackets, col2class, right_brackets) - names(ans) <- ans_names - x_mcols <- mcols(x) - x_nmc <- if (is.null(x_mcols)) 0L else ncol(x_mcols) - if (x_nmc > 0L) { - tmp <- sapply(x_mcols, - function(xx) paste0("<", classNameForDisplay(xx), ">")) - ans <- c(ans, `|`="|", tmp) - } - matrix(ans, nrow=1L, dimnames=list("", names(ans))) -} - - ### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ### Used by "elementMetadata<-" methods. ###