Description Usage Arguments Value Examples

View source: R/getArtificialDoublets.R

Create expression profiles of random artificial doublets.

1 2 3 4 5 6 7 8 9 10 11 12 | ```
getArtificialDoublets(
x,
n = 3000,
clusters = NULL,
resamp = 0.5,
halfSize = 0.5,
adjustSize = 0.2,
propRandom = 0.1,
selMode = c("proportional", "uniform", "sqrt"),
n.meta.cells = 2,
meta.triplets = TRUE
)
``` |

`x` |
A count matrix, with features as rows and cells as columns. |

`n` |
The approximate number of doublet to generate (default 3000). |

`clusters` |
The optional clusters labels to use to build cross-cluster doublets. |

`resamp` |
Logical; whether to resample the doublets using the poisson distribution. Alternatively, if a proportion between 0 and 1, the proportion of doublets to resample. |

`halfSize` |
Logical; whether to half the library size of doublets (instead of just summing up the cells). Alternatively, a number between 0 and 1 can be given, determining the proportion of the doublets for which to perform the size adjustment. |

`adjustSize` |
Logical; whether to adjust the size of the doublets using the ratio between each cluster's median library size. Alternatively, a number between 0 and 1 can be given, determining the proportion of the doublets for which to perform the size adjustment. |

`propRandom` |
The proportion of the created doublets that are fully random (default 0.1); the rest will be doublets created across clusters. Ignored if 'clusters' is NULL. |

`selMode` |
The cell pair selection mode for inter-cluster doublet generation, either 'uniform' (same number of doublets for each combination), 'proportional' (proportion expected from the clusters' prevalences), or 'sqrt' (roughly the square root of the expected proportion). |

`n.meta.cells` |
The number of meta-cell per cluster to create. If given, additional doublets will be created from cluster meta-cells. Ignored if 'clusters' is missing. |

`meta.triplets` |
Logical; whether to create triplets from meta cells. Ignored if 'clusters' is missing. |

A list with two elements: 'counts' (the count matrix of the artificial doublets) and 'origins' the clusters from which each artificial doublets originated (NULL if 'clusters' is not given).

1 2 3 |

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.