format_list_data: format_list_data

Description Usage Arguments Details Value Examples

View source: R/c3_functions.R

Description

This function transforms a list of gene expression data (matrices or vectors) into a single matrix by averaging the replicates for each cell/tissue in the list.

Usage

1
format_list_data(list.data, experiment.descriptor = names(list.data))

Arguments

list.data

A list of cell type specific gene expression data. Each element of the list contains a named gene expression vector or matrix with replicates. The list names (denoting cell types) should be unique, otherwise the experiment.descriptor parameter value should be provided with unique names for each cell or tissue.

experiment.descriptor

A vector correspoding to the elements of list.data that denotes the cell and/or tissue names of the data set. The names should be unique, defaults to the names of list.data.

Details

This function transforms a list of gene expression vectors or matrices with replicates into a single matrix by averaging the replicate values for each cell/tissue. The list elements should all have consistently named vectors, or rownames for matrices, representing the genes.

Value

This function returns a matrix with average gene expression values of the cells/tissues.

Examples

1
2
3
4
5
6
7
8
ll <- list()
ll[["cell1"]]<-matrix(sample(1:10, 30, replace=TRUE), 10, 3)
rownames(ll$cell1)<-c("CRYAA", "CRYAB", "CRYBB3", "PAX6", "SOX2", "PROX1", "SIX3", "CRIM1", "CRYBB2", "BMP7")
ll[["cell2"]]<-matrix(sample(1:10, 30, replace=TRUE), 10, 3)
rownames(ll$cell2)<-c("CRYAA", "CRYAB", "CRYBB3", "PAX6", "SOX2", "PROX1", "SIX3", "CRIM1", "CRYBB2", "BMP7")
ll[["cell3"]]<-matrix(sample(1:10, 30, replace=TRUE), 10, 3)
rownames(ll$cell1)<-c("CRYAA", "CRYAB", "CRYBB3", "PAX6", "SOX2", "PROX1", "SIX3", "CRIM1", "CRYBB2", "BMP7")
format_list_data(ll)

VCCRI/C3 documentation built on May 14, 2019, 8:41 a.m.