patternComparison {rcellminer} | R Documentation

## Compare an input pattern against a set of patterns.

### Description

Compare an input pattern against a set of patterns.

### Usage

    patternComparison(pattern, profileMatrixList, method = "pearson")

### Arguments

`pattern` | An N element input pattern specified as either a named vector or an 1 x N matrix or data frame. Names (or column names) must match the column names of each element of profileMatrixList.
`profileMatrixList` | A single matrix (or data frame) or a list of matrices (or data frames). Each matrix (data frame) must be k x N - that is the k patterns for comparison with the input pattern must be specified along the rows, with rownames set appropriately.
`method` | a string specifying the type of correlation, chosen from pearson (default) or spearman.

### Value

A data frame with pattern comparison results. Specifically, if M is the total number patterns in profileMatrixList elements, an M x 2 matrix is returned with sorted Pearson's correlations in the first column and corresponding p-values in the second column. Comparison pattern names are indicated in the row names.

### Examples

    drugAct <- exprs(getAct(rcellminerData::drugData))
    molDataMats <- getMolDataMatrices()[c("exp", "mut")]
    molDataMats <- lapply(molDataMats, function(X) X[1:10, ])
    pcResults <- patternComparison(drugAct["609699", ], molDataMats)
    pcResults <- patternComparison(drugAct["609699", ], molDataMats, method="spearman")
    pcResults <- patternComparison(drugAct["609699", ], molDataMats$exp, method="spearman")

[Package rcellminer version 2.16.0 Index]