Description Usage Arguments Value Examples

View source: R/DownsampleMatrix.R

Generates a single simulated dataset, bootstrapping from the input counts matrix.

1 | ```
generateSimulatedData(totalReads, cells, originalData, realLabels)
``` |

`totalReads` |
Numeric. The total number of reads in the simulated dataset, to be split between all simulated cells. |

`cells` |
Numeric. The number of virtual cells to simulate. |

`originalData` |
Matrix. The original raw readcount matrix. When used within the Shiny app, this will be assay(SCEsetObject, "counts"). |

`realLabels` |
Factor. The condition labels for differential expression. If only two factors present, will default to t-test. If multiple factors, will default to ANOVA. |

A simulated counts matrix, the first row of which contains the 'true' labels for each virtual cell.

1 2 3 4 5 | ```
data("mouseBrainSubsetSCE")
res <- generateSimulatedData(
totalReads = 1000, cells=10,
originalData = assay(mouseBrainSubsetSCE, "counts"),
realLabels = colData(mouseBrainSubsetSCE)[, "level1class"])
``` |

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.