category_compare: compares the mean expression between two groups of genes in a...

Description Usage Arguments Value Examples

View source: R/category_compare.R

Description

compares the mean expression between two groups of genes in a given expression matrix, calculates the number and proportion of genes in the input matrix that are up-regulated

Usage

1
2
3
4
5
6
7
8
category_compare(
  dat,
  setsIndices,
  grp1name = "group1",
  grp2name = "group2",
  grp1idx,
  grp2idx
)

Arguments

dat

A matrix of gene expression

setsIndices

A nested-list of gene indices for each GSEA category, most commonly made from limma::ids2indices()

grp1name

String indicating name of the first group for the comparison

grp2name

String indicating name of the second group for the comparison

grp1idx

A vector of integer indices indicating columns belonging to group1

grp2idx

A vector of integer indices indicating columns belonging to group1

Value

table of genes' mean expression values for each group

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
out <- category_compare(expressionMatrix,
                                  setIndices,
                                  grp1name = "control",
                                  grp2name = "experimental",
                                  which(grepl("control", colnames(expressionMatrix))),
                                  which(grepl("experimental", colnames(expressionMatrix)))
                                  )

## End(Not run)

ptvan/Pmisc documentation built on Nov. 19, 2020, 10:27 p.m.