Milo-class {miloR} | R Documentation

## The Milo constructor

### Description

The Milo class extends the SingleCellExperiment class and is designed to work with neighbourhoods of cells. Therefore, it inherits from the SingleCellExperiment class and follows the same usage conventions. There is additional support for cell-to-cell distances via distance, and the KNN-graph used to define the neighbourhoods.

### Usage

    Milo(
      ...,
      graph = list(),
      nhoodDistances = Matrix(0L, sparse = TRUE),
      nhoods = Matrix(0L, sparse = TRUE),
      nhoodCounts = Matrix(0L, sparse = TRUE),
      nhoodIndex = list(),
      nhoodExpression = Matrix(0L, sparse = TRUE),
      .k = NULL
    )

### Arguments

`...` | Arguments passed to the Milo constructor to fill the slots of the base class. This should be either a `SingleCellExperiment` or matrix of features X cells
`graph` | An igraph object or list of adjacent vertices that represents the KNN-graph
`nhoodDistances` | A list containing sparse matrices of cell-to-cell distances for cells in the same neighbourhoods, one list entry per neighbourhood.
`nhoods` | A list of graph vertices, each containing the indices of the constiuent graph vertices in the respective neighbourhood
`nhoodCounts` | A matrix of neighbourhood X sample counts of the number of cells in each neighbourhood derived from the respective samples
`nhoodIndex` | A list of cells that are the neighborhood index cells.
`nhoodExpression` | A matrix of gene X neighbourhood expression.
`.k` | An integer value. The same value used to build the k-NN graph if already computed.

### Details

In this class the underlying structure is the gene/feature X cell expression data. The additional slots provide a link between these single cells and the neighbourhood representation. This can be further extended by the use of an abstracted graph for visualisation that preserves the structure of the single-cell KNN-graph

A Milo object can also be constructed by inputting a feature X cell gene expression matrix. In this case it simply constructs a SingleCellExperiment and fills the relevant slots, such as reducedDims.

### Value

a Milo object

### Author(s)

Mike Morgan

### Examples

    library(SingleCellExperiment)
    ux <- matrix(rpois(12000, 5), ncol=200)
    vx <- log2(ux + 1)
    pca <- prcomp(t(vx))

    sce <- SingleCellExperiment(assays=list(counts=ux, logcounts=vx),
                                reducedDims=SimpleList(PCA=pca$x))

    milo <- Milo(sce)
    milo

[Package miloR version 1.2.0 Index]