Learn R Programming

sim1000G (version 1.40)

Genotype Simulations for Rare or Common Variants Using Haplotypes from 1000 Genomes

Description

Generates realistic simulated genetic data in families or unrelated individuals.

Copy Link

Version

Install

install.packages('sim1000G')

Monthly Downloads

183

Version

1.40

License

GPL (>= 2)

Maintainer

Apostolos Dimitromanolakis

Last Published

June 9th, 2019

Functions in sim1000G (1.40)

SIM

Holds data necessary for a simulation.
setRecombinationModel

Set recombination model to either poisson (no interference) or chi-square.
saveSimulation

Save the data for a simulation for later use. When simulating multiple populations it allows saving and restoring of simulation data for each population.
pkg.opts

Holds general package options
plotRegionalGeneticMap

Generates a plot of the genetic map for a specified region.
computePairIBD1

Computes pairwise IBD1 for a specific pair of individuals. See function computePairIBD12 for description.
geneticMap

Holds the genetic map information that is used for simulations.
newFamilyWithOffspring

Simulates genotypes for 1 family with n offspring
downloadGeneticMap

Downloads a genetic map for a particular chromosome under GRCh37 coordinates for use with sim1000G.
newNuclearFamily

Simulates genotypes for 1 family with 1 offspring
readGeneticMap

Reads a genetic map downloaded from the function downloadGeneticMap or reads a genetic map from a specified file. If the argument filename is used then the genetic map is read from the corresponding file. Otherwise, if a chromosome is specified, the genetic map is downloaded for human chromosome using grch37 coordinates.
newFamily3generations

Generates genotype data for a family of 3 generations
loadSimulation

Load some previously saved simulation data by function saveSimulation
printMatrix

Utility function that prints a matrix. Useful for IBD12 matrices.
generateChromosomeRecombinationPositions

Generates a recombination vector arising from one meiotic event. The origin of segments is coded as (0 - haplotype1 , 1 - haplotype2 )
getCMfromBP

Converts centimorgan position to base-pair. Return a list of centimorgan positions that correspond to the bp vector (in basepairs).
generateUnrelatedIndividuals

Generates variant data for n unrelated individuals
generateUniformGeneticMap

Generates a uniform genetic map.
readGeneticMapFromFile

Reads a genetic map to be used for simulations. The genetic map should be of a single chromosome and covering the extent of the region to be simulated. Whole chromosome genetic maps can also be used.
readVCF

Read a vcf file, with options to filter out low or high frequency markers.
retrieveGenotypes

Retrieve a matrix of simulated genotypes for a specific set of individual IDs
resetSimulation

Removes all individuals that have been simulated and resets the simulator.
sim1000G-package

Simulations of rare/common variants using haplotype data from 1000 genomes
startSimulation

Starts and initializes the data structures required for a simulation. A VCF file should be read beforehand with the function readVCF.
subsetVCF

Generate a market subset of a vcf file
writePED

Writes a plink compatible PED/MAP file from the simulated genotypes
createVCF

Creates a regional vcf file using bcftools to extract a region from 1000 genomes vcf files
generateFakeWholeGenomeGeneticMap

Generates a fake genetic map that spans the whole genome.
computePairIBD2

Computes pairwise IBD2 for a specific pair of individuals
computePairIBD12

Computes pairwise IBD1/2 for a specific pair of individuals
crossoverCDFvector

Contains recombination model information.
generateSingleRecombinationVector

Genetates a recombination vector arising from one meiotic event. The origin of segments is coded as (0 - haplotype1 , 1 - haplotype2 )
generateRecombinationDistances_noInterference

Generate recombination distances using a no-interference model.
generateRecombinationDistances

Generate inter-recombination distances using a chi-square model. Note this are the distances between two succesive recombination events and not the absolute positions of the events. To generate the locations of the recombination events see the example below.