create_genome: Create a reference genome.

View source: R/create_genome.R

create_genomeR Documentation

Create a reference genome.

Description

Random chromosomes are generated to create a new ref_genome object. Note that this function will never generate empty chromosomes.

Usage

create_genome(
  n_chroms,
  len_mean,
  len_sd = 0,
  pi_tcag = rep(0.25, 4),
  n_threads = 1
)

Arguments

n_chroms

Number of chromosomes.

len_mean

Mean for the gamma distribution of chromosome sizes.

len_sd

Standard deviation for the gamma distribution of chromosome sizes. If set to <= 0, all chromosomes will be the same length. Defaults to 0.

pi_tcag

Vector of length 4 containing the nucleotide equilibrium frequencies for "T", "C", "A", and "G", respectively. Defaults to rep(0.25, 4).

n_threads

Number of threads to use for parallel processing. This argument is ignored if OpenMP is not enabled. Defaults to 1.

Value

A ref_genome object.

Examples


genome <- create_genome(10, 100e3, 100, pi_tcag = c(0.1, 0.2, 0.3, 0.4))


jackalope documentation built on Oct. 15, 2023, 9:06 a.m.