gscramble1.0.1 package

Simulating Admixed Genotypes Without Replacement

check_chrom_lengths

check that the chromosome lengths are acceptable given recombination r...

check_gsp_for_validity_and_saturation

Check that GSP does not reuse genetic material and yet uses all of it

check_pedigree_for_inbreeding

Check the a GSP (in prepped list format) for inbreeding loops

check_rec_rates_formatting

check to make sure that the recombination rates tibble is formatted pr...

check_reppop

check that the RepPop is formatted correctly

computeQs_from_segments

return the admixture fractions of sampled individuals

create_GSP

Create a GSP from user inputs about what type of hybrids from which po...

drop_segs_down_gsp

High level function for dropping segments down a GSP

example_segments

Example of a segments tibble

gscramble2newhybrids

Convert 'gscramble' output to newhybrids format

gscramble2plink

Write 'gscramble' I_meta, M_meta, and Geno to a plink file

gsp2dot

Write a dot file to represent a genome simulation pedigree

make_subscript_matrix

makes a two-column matrix for subscripting alleles out of a genotype m...

mat_scramble

Scramble a matrix of genotype data

perm_gs_by_pops

Take the output of rearrange_genos and permute everyone by population

plink_map2rec_rates

Convert a PLINK map file to 'gscramble' RecRates bins in a tibble

plink2gscramble

read plink-formatted .map and .ped files into 'gscramble' format

plot_simulated_chromomsome_segments

Plot the simulated chromosomes of an individual

prep_gsp_for_hap_dropping

Take a gsp in tibble form and make a list suitable for gene dropping

rearrange_genos

rearrange genotypes into separate columns for each haplotype.

recomb_point

Randomly sample the positions of recombinations on a chromosome

renumber_GSP

Renumber GSP members by adding a constant to each

seg_haps_through_gsp

Segregate haplotypes through a genome simulation pedigree list

seg2tib

Takes a gamete in segment format and returns a tibble with Pop and ind...

segments2markers

Map alleles from scrambled founders to the sampled segments from a GSP...

segregate

Segregate segments down genomic simulation pedigrees

sim_level_founder_haplos

computes the simulation-level founder haplotype index for each founder...

tidy_up_sampled_haplos

takes the waka_waka table and returns a simple tibble with results for...

xover

internal function to do crossovers and create recombinations

A genomic simulation approach for creating biologically informed individual genotypes from empirical data that 1) samples alleles from populations without replacement, 2) segregates alleles based on species-specific recombination rates. 'gscramble' is a flexible simulation approach that allows users to create pedigrees of varying complexity in order to simulate admixed genotypes. Furthermore, it allows users to track haplotype blocks from the source populations through the pedigrees.

  • Maintainer: Eric C. Anderson
  • License: CC0
  • Last published: 2024-02-28