text: user3039: 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" 
  
  
  user492: 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].   
  
  user492: 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.
  
original_text: 3039: <p>I am trying to simulate different genome of peoples, I have data (VCF files) of various genes from the 1000K Gene project. </p>
  
  <p>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. </p>
  
  <p>I am using Bioconductor packages VariantAnnotation to read and manipulate the VCF files and TxDb.Hsapiens.UCSC.hg19.knownGene to determine the Genes positions. </p>
  
  <p>The data looks as the following: </p>
  
  <pre><code>&gt; gene58@rowRanges
  GRanges object with 91 ranges and 1 metadata column:
                seqnames    ranges strand | paramRangeID
                   &lt;Rle&gt; &lt;IRanges&gt;  &lt;Rle&gt; |     &lt;factor&gt;
    rs551585351        1 229566998      * |         &lt;NA&gt;
    rs528384854        1 229567027      * |         &lt;NA&gt;
    rs542093083        1 229567063      * |         &lt;NA&gt;
    rs561849701        1 229567128      * |         &lt;NA&gt;
    rs531042647        1 229567160      * |         &lt;NA&gt;
            ...      ...       ...    ... .          ...
    rs565479298        1 229569784      * |         &lt;NA&gt;
    rs572772527        1 229569785      * |         &lt;NA&gt;
       rs605430        1 229569803      * |         &lt;NA&gt;
       rs605428        1 229569804      * |         &lt;NA&gt;
    rs368699658        1 229569810      * |         &lt;NA&gt;
    -------
    seqinfo: 86 sequences from "hg19" genome
  </code></pre>
  
  <p>The genotype matrix of the gene: </p>
  
  <pre><code>&gt; 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" 
  </code></pre>
   492: <p>The data in your matrix appears to be from a VCF file (For reference, see <a href="https://github.com/samtools/hts-specs/blob/master/VCFv4.3.pdf" rel="nofollow noreferrer">https://github.com/samtools/hts-specs/blob/master/VCFv4.3.pdf</a>).</p>
  
  <p>In the VCF specification, a heterozygous genotype can be specified as <code>0|1</code>. The zero and one indicate the allele numbers (0=ref, 1=first alt) that make up the genotype. The "pipe" (<code>|</code>) is used to indicate that the alleles are in phase with the previous entry in the file. Therefore, if you observe data like this:</p>
  
  <pre><code>"0|1"    "0|0"
  "0|1"    "1|1"
  "0|1"    "1|1"
  </code></pre>
  
  <p>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].   </p>
   492: <p>For simple haplotype simulation of unrelated individuals, there is Montana's venerable <a href="https://cran.r-project.org/web/packages/hapsim/index.html" rel="nofollow noreferrer">HapSim</a>. 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 <a href="https://github.com/joepickrell/1000-genomes-genetic-maps" rel="nofollow noreferrer">1000G</a>. A cursory google search also revealed this tool and walkthrough that may be suited to your problem: <a href="https://adimitromanolakis.github.io/sim1000G/inst/doc/SimulatingFamilyData.html" rel="nofollow noreferrer">https://adimitromanolakis.github.io/sim1000G/inst/doc/SimulatingFamilyData.html</a></p>
  
  <p>There are lots of other tools with more advanced models, but it sounds like those would be overkill here.</p>
  