Skip to content

Commit

Permalink
internal utility makeClassinfoRowForCompactPrinting() is now in S4Vec…
Browse files Browse the repository at this point in the history
…tors

git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/GenomicRanges@96945 bc3139a8-67e5-0310-9ffc-ced21a209358
  • Loading branch information
[email protected] committed Nov 20, 2014
1 parent 584c39a commit 12bc69f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 27 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Author: P. Aboyoun, H. Pages and M. Lawrence
Maintainer: Bioconductor Package Maintainer <[email protected]>
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
Expand Down
3 changes: 2 additions & 1 deletion R/GenomicRanges-class.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
25 changes: 0 additions & 25 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -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.
###
Expand Down

0 comments on commit 12bc69f

Please sign in to comment.