sim_generate_global: This function simulates fully known gamete genotypes given a...

View source: R/sim_generate_global.R

sim_generate_globalR Documentation

This function simulates fully known gamete genotypes given a specified number of meiotic recombination events

Description

This function runs portions of the generative model to simulate fully known gamete genotypes for a specified number of gametes and number of SNPs as well as a specified number of meiotic recombination events for each gamete

Usage

sim_generate_global(num_gametes, num_snps, n_crossovers, random_seed = 42)

Arguments

num_gametes

an integer, the number of gametes to simulate; also the number of columns -1 of the output

num_snps

an integer, the number of SNPs to simulate; also the number of rows of the output

n_crossovers

a vector of integers, whose length is num_gametes

random_seed

an integer, the random seed which will be set for reproducibility; default is 42

Value

gam_full_df a dataframe of 0's and 1's with num_gametes + 1 columns, and num_snps rows. The first column is the SNP index and has a column name of "positions". The rest of the columns have a name corresponding to which gamete number it is (i.e. "gam101_")


mccoy-lab/rhapsodi documentation built on July 27, 2022, 3:56 a.m.