View source: R/patternComparison.R
patternComparison | R Documentation |
Compare an input pattern against a set of patterns.
patternComparison(pattern, profileMatrixList, method = "pearson")
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. |
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.
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.