Skip to contents

Sample cells from a population

Usage

sample_uniform_regions(tbl, nsam = 2L, ncell = 10L, jitter = 0)

sample_random_regions(tbl, nsam = 2L, ncell = 10L)

sample_bulk(tbl, center = c(x = 0, y = 0, z = 0), ncell = 10L)

evaluate_mrs(
  population,
  nsam,
  ncell,
  threshold = 0.05,
  sensitivity = 0.05,
  jitter = 0
)

distances_mrs(population, nsam, ncell, jitter = 0)

Arguments

tbl

tibble of extant cells with id, x, y, z columns

nsam

number of regions to sample

ncell

number of cells per specimen

jitter

amount of random variations on x and y axes

center

named (x, y, z) vector, list, or tibble

population

tbl

threshold

minimum frequency of detectable alleles

sensitivity

minimum allele frequency

Details

sample_uniform_regions sample uniformly distributed regions.

sample_random_regions samples multiple regions at random.

sample_bulk samples a bulk of cells near the specified center.

evaluate_mrs is a shortcut to evaluate multi-region sampling.

distances_mrs is a shortcut for sampling and calculation