sim_bim | R Documentation |
Purpose is to build an artificial BIM table with several chromosomes, which some methods require, such as leave-one-chromosome-out (LOCO) estimation. This function produces chromosomes with approximately equal numbers of variants. Positions are spaced uniformly by a given size.
sim_bim(m_loci = 1e+05, n_chr = 22, pos_gap = 1000)
m_loci |
The number of loci. |
n_chr |
Number of chromosomes to simulate. Chromosome assignments are not biologically meaningful, as all loci are drawn independently (no LD). |
pos_gap |
The number of basepairs to space variants. |
A tibble
with these columns:
chr
: The constructed chromosome positions.
id
: Locus ID values (autocompleted by genio::make_bim()
to match row numbers).
posg
: Genetic distance (autocompleted by genio::make_bim()
to 0
, all missing).
pos
: locus positions, starting at pos_gap
for each chromosome and increasing in increments of pos_gap
.
ref
: Reference allele (autocompleted by genio::make_bim()
to 1
).
alt
: Alternative allele (autocompleted by genio::make_bim()
to 2
).
# simulate a small table m_loci <- 100 bim <- sim_bim( m_loci )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.