sample_seq_depth: Update matrix D with manually selected missing rate

View source: R/reads_simulator.R

sample_seq_depthR Documentation

Update matrix D with manually selected missing rate

Description

Given missing rate, the NA will be generated first. For none NA element, sequencing depth with uniformly sampled from D, row wisely. Namely, the depth is variant specific.

Usage

sample_seq_depth(D, n_cells = NULL, n_sites = NULL, missing_rate = NULL)

Arguments

D

A matrix (N variants x M cells), the original sequencing coverage, NA means missing

n_cells

A integer, the number of the cells to generate

n_sites

A integer, the number of variants to generate

missing_rate

A float value, if NULL, use the same missing rate as D

Value

a n_sites by n_cells matrix sampled from input D.

Examples

data(simulation_input)
D1 <- sample_seq_depth(D_input,
    n_cells = 500, n_sites = 50,
    missing_rate = 0.85
)

davismcc/cardelino documentation built on Nov. 19, 2022, 2:44 a.m.