# Sampling haplotypes

I am trying to simulate different genome of peoples, I have data (VCF files) of various genes from the 1000K Gene project.

I want to simulate different whole genomes i.e generate a new population by combining real haplotypes I have. I am wondering what is the best way to approach the problem. That is what is an efficient method of generating realistic (Not just randomly select parts and recombining them) new genotypes based on the real genotypes I already have.

I am using Bioconductor packages VariantAnnotation to read and manipulate the VCF files and TxDb.Hsapiens.UCSC.hg19.knownGene to determine the Genes positions.

The data looks as the following:

> gene58@rowRanges
GRanges object with 91 ranges and 1 metadata column:
seqnames    ranges strand | paramRangeID
<Rle> <IRanges>  <Rle> |     <factor>
rs551585351        1 229566998      * |         <NA>
rs528384854        1 229567027      * |         <NA>
rs542093083        1 229567063      * |         <NA>
rs561849701        1 229567128      * |         <NA>
rs531042647        1 229567160      * |         <NA>
...      ...       ...    ... .          ...
rs565479298        1 229569784      * |         <NA>
rs572772527        1 229569785      * |         <NA>
rs605430        1 229569803      * |         <NA>
rs605428        1 229569804      * |         <NA>
rs368699658        1 229569810      * |         <NA>
-------
seqinfo: 86 sequences from "hg19" genome


The genotype matrix of the gene:

> gene.mat[1:5, 1:5]
HG00867 HG02371 HG00759 HG00766 HG00844
rs551585351 "0|0"   "0|0"   "0|0"   "0|0"   "0|0"
rs528384854 "0|0"   "0|0"   "0|0"   "0|0"   "0|0"
rs542093083 "0|0"   "0|0"   "0|0"   "0|0"   "0|0"
rs561849701 "0|0"   "0|0"   "0|0"   "0|0"   "0|0"
rs531042647 "0|0"   "0|0"   "0|0"   "0|0"   "0|0"


For simple haplotype simulation of unrelated individuals, there is Montana's venerable HapSim. The model used in that tool is simple and may be good enough for your purposes. You will need to acquire a recombination rate map from for example the HapMap consortium or from 1000G. A cursory google search also revealed this tool and walkthrough that may be suited to your problem: https://adimitromanolakis.github.io/sim1000G/inst/doc/SimulatingFamilyData.html

There are lots of other tools with more advanced models, but it sounds like those would be overkill here.

The data in your matrix appears to be from a VCF file (For reference, see https://github.com/samtools/hts-specs/blob/master/VCFv4.3.pdf).

In the VCF specification, a heterozygous genotype can be specified as 0|1. The zero and one indicate the allele numbers (0=ref, 1=first alt) that make up the genotype. The "pipe" (|) is used to indicate that the alleles are in phase with the previous entry in the file. Therefore, if you observe data like this:

"0|1"    "0|0"
"0|1"    "1|1"
"0|1"    "1|1"


Then this means that the first sample has the haplotypes [0,0,0] and [1,1,1]; and that the second sample has the haplotypes [0,1,1] and [0,1,1].

• Thanks, but its not what I meant, I wanted to know how to recombine the haplotypes in order to generate new population out of it. Is there a place where recombination is more likely occur? Is there a program where I can input real haplotypes and it will generate a population? Dec 2 '18 at 14:22
• Oh! Well there certainly are programs for that. Any chance you could rephrase your post to contain that question? Dec 2 '18 at 14:26
• Hopes its better, let me know if I left anything unclear. Dec 2 '18 at 14:29

Ensembl have haplotypes from 1000 Genomes available by transcript.