getCmatrix {safe}R Documentation

Generation of a C matrix

Description

This function will convert a text file, vector or list of gene annotation into a C matrix. Size constraints, and present/absent calls can be set to filter categories and genes accordingly.

Usage

  getCmatrix(list, present.genes=, min.size=, max.size=)
  getCmatrix(vector=, delimiter=)
  getCmatrix(file=, delimiter=, ...)

Arguments

list A list containing character vectors for each gene that specify the functional categories it belongs to by keywords.
vector A character vector of gene annotation with a specified delimiter between category keywords.
file A file containing the character vector of gene annotation.
delimiter Delimiter used between category keywords when provided as a vector or file.
present.genes An optional vector used to filter genes in the C matrix. Can be provided as an unordered character vector of gene names that match names(list), or as an ordered vector of presence (1) and absence (0) calls.
min.size Optional minimum category size to be considered.
max.size Optional maximum category size to be considered.
... Any extra arguments will be forwarded to the read.table function when category assigments are given as a file.

Value

A matrix is returned with the rows corresponding to the genes as labeled by names(list) and each column corresponding to a category.

Author(s)

William T. Barry: wbarry@bios.unc.edu

References

W. T. Barry, A. B. Nobel and F.A. Wright, 2004, Significance Analysis of functional categories in gene expression studies: a structured permutation approach, Bioinformatics In press.

See also the vignette included with this package.

See Also

{safe, safeplot, getPImatrix,.}

Examples

## A simple illustration
anno <- c("Keyword1","Keyword2;Keyword3","",
          "Keyword3;Keyword1","Keyword3")
names(anno) <- paste("Gene",1:5)

getCmatrix(vector = anno, delimiter = ";")

[Package safe version 1.2.0 Index]