netSmooth,matrix-method {netSmooth} | R Documentation

## Perform network smoothing of gene expression or other omics data

### Description

Perform network smoothing of gene expression or other omics data

### Usage

    ## S4 method for signature 'matrix'
    netSmooth(x, adjMatrix, alpha = "auto",
      normalizeAdjMatrix = c("rows", "columns"),
      autoAlphaMethod = c("robustness", "entropy"), autoAlphaRange = 0.1 *
      (seq_len(9)), autoAlphaDimReduceFlavor = "auto", is.counts = TRUE,
      bpparam = BiocParallel::SerialParam(), ...)

    ## S4 method for signature 'SummarizedExperiment'
    netSmooth(x, ...)

    ## S4 method for signature 'SingleCellExperiment'
    netSmooth(x, ...)

    ## S4 method for signature 'Matrix'
    netSmooth(x, adjMatrix, alpha = "auto",
      normalizeAdjMatrix = c("rows", "columns"),
      autoAlphaMethod = c("robustness", "entropy"), autoAlphaRange = 0.1 *
      (seq_len(9)), autoAlphaDimReduceFlavor = "auto", is.counts = TRUE,
      bpparam = BiocParallel::SerialParam(), ...)

    ## S4 method for signature 'DelayedMatrix'
    netSmooth(x, adjMatrix, alpha = "auto",
      normalizeAdjMatrix = c("rows", "columns"),
      autoAlphaMethod = c("robustness", "entropy"), autoAlphaRange = 0.1 *
      (seq_len(9)), autoAlphaDimReduceFlavor = "auto", is.counts = TRUE,
      bpparam = BiocParallel::SerialParam(), chunk.size = 1,
      filepath = NULL, ...)

### Arguments

`x` | matrix or SummarizedExperiment
`adjMatrix` | adjacency matrix of gene network to use
`alpha` | numeric in [0,1] or 'audo'. if 'auto', the optimal value for alpha will be automatically chosen among the values specified in 'autoAlphaRange', using the strategy specified in 'autoAlphaMethod'
`normalizeAdjMatrix` | how to normalize the adjacency matrix possible values are 'rows' (in-degree) and 'columns' (out-degree)
`autoAlphaMethod` | if 'robustness', pick alpha that gives the highest proportion of samples in robust clusters if 'entropy', pick alpha that gives highest Shannon entropy in 2D PCA embedding
`autoAlphaRange` | if ‘alpha=’optimal'', search these values for the best alpha
`autoAlphaDimReduceFlavor` | algorithm for dimensionality reduction that will be used to pick the optimal value for alpha. Either the 2D embedding to calculate the Shannon entropy for (if ‘autoAlphaMethod=’entropy''), or the dimensionality reduction algorithm to be used in robust clustering (if ‘autoAlphamethod=’robustness'')
`is.counts` | logical: is the assay count data
`bpparam` | instance of bpparam, for parallel computation with the ‘alpha=’auto'' option. See the BiocParallel manual.
`...` | arguments passed on to 'robustClusters' if using the robustness criterion for optimizing alpha
`chunk.size` | integer in [1,length(colnames[x])]. Number of columns that processed at the same time when using disk based DelayedMatrix. Will be ignored when regular matrices or SummarizedExperiment are used as input.
`filepath` | String: Path to location where hdf5 output file is supposed to be saved. Will be ignored when regular matrices or SummarizedExperiment are used as input.

### Value

network-smoothed gene expression matrix or SummarizedExperiment object

### Examples

    x <- matrix(rnbinom(12000, size=1, prob = .1), ncol=60)
    rownames(x) <- paste0('gene', seq_len(dim(x)[1]))

    adj_matrix <- matrix(as.numeric(rnorm(200*200)>.8), ncol=200)
    rownames(adj_matrix) <- colnames(adj_matrix) <- paste0('gene', seq_len(dim(x)[1]))
    x.smoothed <- netSmooth(x, adj_matrix, alpha=0.5)

[Package netSmooth version 1.4.0 Index]