Package: gscramble 1.0.1.9000

gscramble: Simulating Admixed Genotypes Without Replacement

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.

Authors:Eric C. Anderson [aut, cre], Rachael M. Giglio [aut], Matt G. DeSaix [aut], Timothy J. Smyser [aut]

gscramble_1.0.1.9000.tar.gz
gscramble_1.0.1.9000.zip(r-4.5)gscramble_1.0.1.9000.zip(r-4.4)gscramble_1.0.1.9000.zip(r-4.3)
gscramble_1.0.1.9000.tgz(r-4.4-any)gscramble_1.0.1.9000.tgz(r-4.3-any)
gscramble_1.0.1.9000.tar.gz(r-4.5-noble)gscramble_1.0.1.9000.tar.gz(r-4.4-noble)
gscramble_1.0.1.9000.tgz(r-4.4-emscripten)gscramble_1.0.1.9000.tgz(r-4.3-emscripten)
gscramble.pdf |gscramble.html
gscramble/json (API)
NEWS

# Install 'gscramble' in R:
install.packages('gscramble', repos = c('https://eriqande.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/eriqande/gscramble/issues

Datasets:
  • GSP - Example Genomic Simulation Pedigree, GSP, with 13 members
  • GSP_opts - A list of tibbles specifying the pedigrees available from 'createGSP()'
  • Geno - Genotype matrix of 78 individuals and 100 SNP markers
  • I_meta - Metadata for 78 individuals
  • M_meta - Metadata for 100 molecular markers
  • RecRates - Recombination rate data for many roughly 1 Mb bins
  • RepPop1 - A simple example of a reppop table
  • RepPop4 - Another simple example of a reppop table
  • example_chrom_lengths - Lengths of the three chromosomes used in the example data set
  • example_segments - Example of a segments tibble
  • gsp3 - Tibble holding specification for a 5 member genomic permutation pedigree.
  • gsp4 - Tibble holding specification for a 7 member genomic permutation pedigree.

On CRAN:

noaa-omics-software

5.07 score 13 scripts 514 downloads 23 exports 46 dependencies

Last updated 9 months agofrom:752d7cf83c. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 18 2024
R-4.5-winOKNov 18 2024
R-4.5-linuxOKNov 18 2024
R-4.4-winOKNov 18 2024
R-4.4-macOKNov 18 2024
R-4.3-winOKNov 18 2024
R-4.3-macOKNov 18 2024

Exports:check_chrom_lengthscheck_gsp_for_validity_and_saturationcheck_pedigree_for_inbreedingcomputeQs_from_segmentscreate_GSPdrop_segs_down_gspgscramble2newhybridsgscramble2plinkgsp2dotmat_scrambleperm_gs_by_popsplink_map2rec_ratesplink2gscrambleplot_simulated_chromomsome_segmentsprep_gsp_for_hap_droppingrearrange_genosrecomb_pointrenumber_GSPseg2tibsegments2markerssegregatesim_level_founder_haplosxover

Dependencies:bitbit64clicliprcolorspacecpp11crayondplyrfansifarvergenericsggplot2gluegtablehmsisobandlabelinglatticelifecyclemagrittrMASSMatrixmgcvmunsellnlmepillarpkgconfigprettyunitsprogresspurrrR6RColorBrewerreadrrlangscalesstringistringrtibbletidyrtidyselecttzdbutf8vctrsviridisLitevroomwithr

A first tutorial for 'gscramble'

Rendered fromgscramble-tutorial.Rmdusingknitr::rmarkdownon Nov 18 2024.

Last update: 2024-02-27
Started: 2019-08-05

Pedigrees Available from create_GSP()

Rendered fromabout-createGSP.Rmdusingknitr::rmarkdownon Nov 18 2024.

Last update: 2022-09-19
Started: 2021-10-21

Permutation Options in 'gscramble'

Rendered frompermutation-options.Rmdusingknitr::rmarkdownon Nov 18 2024.

Last update: 2024-02-27
Started: 2023-10-25

Readme and manuals

Help Manual

Help pageTopics
check that the chromosome lengths are acceptable given recombination ratescheck_chrom_lengths
Check that GSP does not reuse genetic material and yet uses all of itcheck_gsp_for_validity_and_saturation
Check the a GSP (in prepped list format) for inbreeding loopscheck_pedigree_for_inbreeding
return the admixture fractions of sampled individualscomputeQs_from_segments
Create a GSP from user inputs about what type of hybrids from which populations to create hybridscreate_GSP
High level function for dropping segments down a GSPdrop_segs_down_gsp
Lengths of the three chromosomes used in the example data setexample_chrom_lengths
Example of a segments tibbleexample_segments
Genotype matrix of 78 individuals and 100 SNP markersGeno
Convert 'gscramble' output to newhybrids formatgscramble2newhybrids
Write 'gscramble' I_meta, M_meta, and Geno to a plink filegscramble2plink
Example Genomic Simulation Pedigree, GSP, with 13 membersGSP
A list of tibbles specifying the pedigrees available from 'createGSP()'GSP_opts
Write a dot file to represent a genome simulation pedigreegsp2dot
Tibble holding specification for a 5 member genomic permutation pedigree.gsp3
Tibble holding specification for a 7 member genomic permutation pedigree.gsp4
Metadata for 78 individualsI_meta
Metadata for 100 molecular markersM_meta
Scramble a matrix of genotype datamat_scramble
Take the output of rearrange_genos and permute everyone by populationperm_gs_by_pops
Convert a PLINK map file to 'gscramble' RecRates bins in a tibbleplink_map2rec_rates
read plink-formatted .map and .ped files into 'gscramble' formatplink2gscramble
Plot the simulated chromosomes of an individualplot_simulated_chromomsome_segments
Take a gsp in tibble form and make a list suitable for gene droppingprep_gsp_for_hap_dropping
rearrange genotypes into separate columns for each haplotype.rearrange_genos
Randomly sample the positions of recombinations on a chromosomerecomb_point
Recombination rate data for many roughly 1 Mb binsRecRates
Renumber GSP members by adding a constant to eachrenumber_GSP
A simple example of a reppop tableRepPop1
Another simple example of a reppop tableRepPop4
Takes a gamete in segment format and returns a tibble with Pop and indiv_indexseg2tib
Map alleles from scrambled founders to the sampled segments from a GSP.segments2markers
Segregate segments down genomic simulation pedigreessegregate
computes the simulation-level founder haplotype index for each founder haplosim_level_founder_haplos
internal function to do crossovers and create recombinationsxover