Package htsjdk.variant.vcf
Interface VCFReader
- All Superinterfaces:
AutoCloseable
,Closeable
,Iterable<VariantContext>
- All Known Implementing Classes:
VCFFileReader
Interface for reading VCF/BCF files.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the VCFHeader associated with this VCFReader.boolean
A method to check if the reader is query-able, i.e.iterator()
default CloseableIterator<VariantContext>
Queries for records overlapping theLocatable
specified.Queries for records overlapping the region specified.Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
getHeader
VCFHeader getHeader()Returns the VCFHeader associated with this VCFReader. -
query
Queries for records overlapping the region specified. Note that this method requires VCF files with an associated index. If no index exists a TribbleException will be thrown.- Parameters:
chrom
- the chomosome to querystart
- query interval startend
- query interval end- Returns:
- non-null iterator over VariantContexts
-
query
Queries for records overlapping theLocatable
specified. Note that this method requires VCF files with an associated index. If no index exists a TribbleException will be thrown.- Returns:
- non-null iterator over VariantContexts
-
isQueryable
boolean isQueryable()A method to check if the reader is query-able, i.e. if a call toVCFFileReader.query(String, int, int)
can be successful- Returns:
- true if the reader can be queried, i.e. if the underlying Tribble reader is queryable.
-
iterator
CloseableIterator<VariantContext> iterator()- Specified by:
iterator
in interfaceIterable<VariantContext>
-