MetaNeighbor {MetaNeighbor} | R Documentation

## Runs MetaNeighbor

### Description

For each gene set of interest, the function builds a network of rank correlations between all cells. Next,It builds a network of rank correlations between all cells for a gene set. Next, the neighbor voting predictor produces a weighted matrix of predicted labels by performing matrix multiplication between the network and the binary vector indicating cell type membership, then dividing each element by the null predictor (i.e., node degree). That is, each cell is given a score equal to the fraction of its neighbors (including itself), which are part of a given cell type. For cross-validation, we permute through all possible combinations of leave-one-dataset-out cross-validation, and we report how well we can recover cells of the same type as area under the receiver operator characteristic curve (AUROC). This is repeated for all folds of cross-validation, and the mean AUROC across folds is reported. Calls `neighborVoting`.

### Usage

    MetaNeighbor(dat, i = 1, experiment_labels, celltype_labels, genesets,
      bplot = TRUE)

### Arguments

`dat` | A SummarizedExperiment object containing gene-by-sample expression matrix.
`i` | default value 1; non-zero index value of assay containing the matrix data
`experiment_labels` | A numerical vector that indicates the source of each sample.
`celltype_labels` | A matrix that indicates the cell type of each sample.
`genesets` | Gene sets of interest provided as a list of vectors.
`bplot` | default true, beanplot is generated

### Value

A matrix of AUROC scores representing the mean for each gene set tested for each celltype is returned directly (see `neighborVoting`).

### See Also

`neighborVoting`

### Examples

    data("mn_data")
    data("GOmouse")
    library(SummarizedExperiment)
    AUROC_scores = MetaNeighbor(dat = mn_data,
                                experiment_labels = as.numeric(factor(mn_data$study_id)),
                                celltype_labels = metadata(colData(mn_data))[["cell_labels"]],
                                genesets = GOmouse,
                                bplot = TRUE)

[Package MetaNeighbor version 1.2.1 Index]