R/utils.R

#######################################################
# FakeaAccessor method which returns the same list
# which it takes as input in the case when annotation
# already presented as s GO iD - gene ID annotation list
#######################################################
#' @rdname getAnnotation
#' @export
setMethod(f = "getAnnotation",
          signature = "list",
          definition = function(object){
            return(object)
          }
)

#######################################################
# Accessor method for MgsaSets sets slot which contains
# GO iD - gene ID annotation list
#######################################################
#' @rdname getAnnotation
#' @export
setMethod(f = "getAnnotation",
          signature = "MgsaSets",
          definition = function(object){
            return(object@sets[-1])
          }
)

#######################################################
# If no custom annotation passed
#######################################################
#' @rdname getAnnotation
#' @export
setMethod(f = "getAnnotation",
          signature = "NULL" ,
          definition = function(object){
            "NULL"}
)

Try the FoldGO package in your browser

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

FoldGO documentation built on Nov. 8, 2020, 7:50 p.m.