R/sort-methods.R

setMethod("sort", signature("KcghData"), function(x, decreasing=FALSE, ...){
    dataOrdering <- order(x@probeAnnotation@chromosome, x@probeAnnotation@maploc)
    x@probeAnnotation <- x@probeAnnotation[dataOrdering]
    x@data <- x@data[dataOrdering,]
    x
})

setMethod("sort", signature("KcghDataSum"), function(x, decreasing=FALSE, ...){
    dataOrdering <- order(x@probeAnnotation@chromosome, x@probeAnnotation@maploc)
    x@probeAnnotation <- x@probeAnnotation[dataOrdering]
    x@pos <- x@pos[dataOrdering]
    x@neg <- x@neg[dataOrdering]
    x
})

Try the KCsmart package in your browser

Any scripts or data that you put into this service are public.

KCsmart documentation built on Nov. 8, 2020, 7:08 p.m.