gen_simulated_data: gen_simulated_data

View source: R/simulate.R

gen_simulated_dataR Documentation

gen_simulated_data

Description

The function simulates one sample's underlying somatic point mutations and copy number aberrations and creates vcf files formatted for UNMASC. Additional files created include bed files defining chromosome lengths, centromere regions, and target regions.

Usage

gen_simulated_data(
  outdir,
  purity = NULL,
  cn_state = NULL,
  num_loci = 10000,
  num_normals = 20,
  AA_vaf = 0.002,
  mean_DP = 500,
  oxog_vaf = 0.01,
  ffpe_vaf = 0.1,
  max_PSI = 0.02,
  show_plot = TRUE,
  seed = NULL
)

Arguments

outdir

Character string specifying the output directory.

purity

Tumor purity. By default, purity = NULL will randomly generate a tumor purity.

cn_state

A R data.frame containing copy number states with columns tCN, CN_A, CN_B, and prob corresponding to the total integer copy number, the minor allelic integer copy number, the major allelic integer copy number, and probability of selecting a copy number state, respectively. By default, cn_state = NULL, will generate a default cn_state object.

num_loci

A positive integer for the number of tumor only variant loci simulated.

num_normals

A positive integer for the number of unmatched normal controls to simulate.

AA_vaf

The mean non-zero variant allele frequency for homozygous reference positions.

mean_DP

A positve numeric value for the mean depth of variant calls.

oxog_vaf

A positive numeric value for the expected allele frequency of oxoG variants.

ffpe_vaf

A positive numeric value for the expected allele frequency of FFPE variants.

max_PSI

A positive numeric value for the maximum overdispersion in the beta-binomial distribution.

show_plot

By default, set to TRUE. If TRUE, the variant calls are plotted. This will include germline, artifact, and somatic variants.

seed

A numeric seed value. If NULL, a default seed is set.

Value

A list of simulated data including vcfs, filepaths, target BED file, dictionary chrom BED file, gender indicator to reflect the data type and format UNMASC is expecting.


pllittle/UNMASC documentation built on June 1, 2025, 1 p.m.