CMsearch: Predict cell type-expressed genes using CellMapper

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/CMsearch.R

Description

Predicts which genes are selectively expressed in the same cell type as a given cell type-specific marker gene (the 'query gene'), based on co-expression similarity.

Usage

1
2
CMsearch(Data, query.genes = NULL, control.genes = NULL, QDW = TRUE, 
alpha = 0.5, verbose = TRUE, raw.pvals = FALSE)

Arguments

Data

a CellMapperList object containing expression data processed with CMprep, or a list of datasets processed with CMprep.

query.genes

a list of genes that are specifically expressed in the cell type of interested, supplied as a character vector of gene names (matching the row names of the original expression matrix).

control.genes

a list of genes expressed specifically in non-target cell types (optional), supplied as a character vector of gene names (matching the row names of the original expression matrix). This option generally has little effect on the results and its use is NOT recommended.

QDW

logical value indicating whether 'query driven weighting' should be applied in the CellMapper SVD filter. The default value of TRUE can be used in most cases.

alpha

alpha parameter controlling the strength of the CellMapper SVD filter. The default value of 0.5 can be used in most cases.

verbose

logical value indicating whether progress updates should be provided.

raw.pvals

logical value indicating whether unadjusted p-values, which have not been corrected for multiple hypothesis testing, should be returned.

Details

This function predicts which genes are selectively expressed in the same cell type as a given cell type-specific marker gene (the 'query gene'), based on co-expression similarity. The only required inputs are a gene expression matrix that has been pre-processed with the CMprep function (or a list of pre-processed expression matrices), and a 'query gene' known to be specifically expressed in the cell type of interest. Pre-processed microarray data, ready for immediate use with CMsearch, can be found in the CellMapperData package.

See the CellMapper vignette for examples about how to use CMsearch and associated functions to infer genes selectively expressed in specific cell types.

Value

A dataframe containing the gene identifiers in the first column, the false discovery rate (FDR) in the second, and the unadjusted p-value in the third. FDR is calculated using the method of Benjamini and Hochberg.

Author(s)

Brad Nelms

References

B.D. Nelms, L. Waldron, L.A. Barrera, A.W. Weflen, J.A. Goettel, G. Guo, R.K. Montgomery, M.R. Neutra, D.T. Breault, S.B. Snapper, S.H. Orkin, M.L. Bulyk, C. Huttenhower and W.I. Lencer. CellMapper: rapid and accurate inference of gene expression in difficult-to-isolate cell types. Genome Biology 2016, 17(1).

See Also

CMprep, CellMapperData

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Create a mock expression dataset with random expression values
ngenes <- 1000
narrays <- 100
x <- matrix(rnorm(ngenes*narrays), ngenes, narrays)
rownames(x) <- 1:ngenes

# Prepare the dataset for use with CMsearch
data <- CMprep(x)

# Predict which genes are co-expressed in the same cell type as 'gene' 59 in the
# mock expression dataset
results <- CMsearch(data, query.genes = '59')

head(results)

Example output

Loading required package: S4Vectors
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colMeans, colSums, colnames, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
    setdiff, sort, table, tapply, union, unique, unsplit, which,
    which.max, which.min


Attaching package: 'S4Vectors'

The following object is masked from 'package:base':

    expand.grid

Warning messages:
1: replacing previous import 'stats::sd' by 'S4Vectors::sd' when loading 'CellMapper' 
2: replacing previous import 'stats::var' by 'S4Vectors::var' when loading 'CellMapper' 
* Scaling the data matrix...

* Computing the singular-value decomposition of the data matrix...

* Preparing data for CellMapper...

* Running CellMapper with query gene(s) '59'...

  Gene       FDR
1  440 0.1894243
2  530 0.4297517
3  569 0.4591757
4  355 0.4760320
5  696 0.4822727
6  976 0.4861366

CellMapper documentation built on Nov. 1, 2018, 4:27 a.m.