Package htsjdk.variant.utils
Class VCFHeaderReader
java.lang.Object
htsjdk.variant.utils.VCFHeaderReader
Utility class to read a VCF header without being told beforehand whether the input is VCF or BCF.
-
Method Summary
Modifier and TypeMethodDescriptionstatic VCFHeader
Read a VCF header from a stream that may be a VCF file (possibly gzip or block compressed) or a BCF file.
-
Method Details
-
readHeaderFrom
Read a VCF header from a stream that may be a VCF file (possibly gzip or block compressed) or a BCF file. After successfully reading a header the stream is positioned immediately after the header, otherwise, if an exception is thrown, the state of the stream is undefined.- Parameters:
in
- the stream to read the header from- Returns:
- the VCF header read from the stream
- Throws:
TribbleException.InvalidHeader
- if the header in the file is invalidIOException
- if an IOException occurs while reading the header
-