This is a strict streaming parser for VCF 4.1/4.2.
The main parser class (VcfParser
) is responsible for reading all metadata and initial position data. Then actual handling of each position line is delegated to an implementation of VcfLineParser
.
Check out VcfParserTest.java
for a quick and dirty view of it in action.
MemoryMappedVcfLineParser
is a implementation of VcfLineParser
that reads everything into memory.
<dependencies>
...
<dependency>
<groupId>org.pharmgkb</groupId>
<artifactId>vcf-parser</artifactId>
<version>0.3.1</version>
</dependency>
...
</dependencies>
You can download jars from the Central Maven Repository.