Package org.pharmgkb.parser.vcf
Class MemoryMappedVcfLineParser
java.lang.Object
org.pharmgkb.parser.vcf.MemoryMappedVcfLineParser
- All Implemented Interfaces:
VcfLineParser
A simple
VcfLineParser that loads an entire VCF file into memory to permit
constant-time lookup for VCF records, either:
- By any ID listed in the
IDfield, or - By chromosome and position
This implementation is memory-intensive and should only be used for short VCF files where repeated arbitrary (random) access to VCF records is required.
By default, an IllegalArgumentException is thrown each time a duplicate ID or locus is found.
To change this behavior, see MemoryMappedVcfLineParser.Builder.setDuplicateLocusHandler(org.pharmgkb.parser.vcf.MemoryMappedVcfLineParser.DuplicateHandler) and MemoryMappedVcfLineParser.Builder.setDuplicateLocusHandler(org.pharmgkb.parser.vcf.MemoryMappedVcfLineParser.DuplicateHandler).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumWhat to do when a duplicate VCF record (line) is encountered. -
Method Summary
Modifier and TypeMethodDescriptionvoidparseLine(VcfMetadata metadata, VcfPosition position, List<VcfSample> sampleData)
-
Method Details
-
getDataStore
-
parseLine
- Specified by:
parseLinein interfaceVcfLineParser
-