33       1       2       0
## 1:196659237       0       2       1
</code></pre>

<p>In this example, we use the <em>fileName</em> for the VCF file path, <em>1:196621007-196716634</em> for the genomic range, and <em>Nonsynonymous</em> for the variants type.
Extraction results are stored in the variable <em>cfh</em>. Its row names are variant positions, while column names are sample IDs.</p>

<p>Similarly, we can extract genotype matrix per gene:</p>

<pre><code class="r">geneFile = system.file(&quot;vcf/refF