R/methods-ExpressionSet.R

setMethod("[",
          signature(x="ExpressionSet", i="GeneSet"),
          function(x, i, j, ..., drop=TRUE) {
              if (!identical(geneIdType(i),
                             AnnotationIdentifier(annotation(x))))
                i <- mapIdentifiers(i, AnnotationIdentifier(annotation(x)))
              genesIds <- geneIds(i)
              ogenes <- genesIds[genesIds %in% featureNames(x)]
              if (missing(j))
                  x[ogenes,...]
              else
                  x[ogenes, j, ...]
          })

Try the GSEABase package in your browser

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

GSEABase documentation built on Dec. 13, 2020, 2 a.m.