Description Usage Arguments Details Value

This function uses the graph-based distances between cells and between locations, and optionally a distance matrix (e.g. Euclidean) bewteen cells and locations in gene expression space if an in situ atlas is present, to compute a probabilistic assignment of cells to locations. See the Methods section of the novoSpaRc paper.

1 2 3 |

`D_cell` |
Graph-based distance matrix between pairs of cells, generated
from function |

`D_loc` |
Graph-based distance matrix between pairs of
locations generated from function |

`D_cell_loc` |
Distance (e.g. Euclidean) matrix between each cell and each location in gene expression space if in situ atlas is present. This argument can be left missing if an in situ atlas (e.g. from seqFISH, MERFISH, or STARmap). |

`alpha` |
Weight to give to the in situ atlas if it's present. |

`p` |
Numeric vector, marginal distribution over the cells, by default uniform. |

`q` |
Numeric vector, Marginal distribution over the genes, by default uniform. |

`loss_fun` |
A string that specifies loss function for difference between cells' pairwise distance and locations' pairwise distance. Right now only "square", meaning square loss, is supported. |

`epsilon` |
Entropy regularization term. |

`maxiter` |
Maximum number of iterations in projected gradient descent. |

`tol` |
Tolerance. When |

`verbose` |
Whether to display progress during projected gradient descent. |

`check_every` |
Check change in objective value once in how many iterations in gradient descent. For instance, if 10 is passed to this argument, then check once every 10 iterations. You may not want to check every single iteration since checking involves computing the Frobenius norm of a potentially large matrix, which can be time consuming. However, if you do not check frequently enough, then this function will keep on running after the actual change in objective is less than the tolerance until the next check. |

R uses BLAS for linear algebra, and the default BLAS that comes with R is not optimized. Using an optimized version of BLAS, such as OpenBLAS and Intel MKL (as in Microsoft R Open), can speed up matrix multiplication several times compared to default BLAS. For the projected gradient descent, a matrix multiplication is done in each iteration, and the matrix can be large if your dataset has many cells. Therefore, an optimized BLAS is strongly recommended. See vignette for how to make R use optimized BLAS.

A matrix with cells in rows and locations in columns.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.