|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object htsjdk.variant.vcf.VCFFileReader
public class VCFFileReader
Simplified interface for reading from VCF/BCF files.
Constructor Summary | |
---|---|
VCFFileReader(java.io.File file)
Constructs a VCFFileReader that requires the index to be present. |
|
VCFFileReader(java.io.File file,
boolean requireIndex)
Allows construction of a VCFFileReader that will or will not assert the presence of an index as desired. |
|
VCFFileReader(java.io.File file,
java.io.File indexFile)
Constructs a VCFFileReader with a specified index. |
|
VCFFileReader(java.io.File file,
java.io.File indexFile,
boolean requireIndex)
Allows construction of a VCFFileReader with a specified index file. |
Method Summary | |
---|---|
void |
close()
|
static IntervalList |
fromVcf(java.io.File file)
Parse a VCF file and convert to an IntervalList The name field of the IntervalList is taken from the ID field of the variant, if it exists. |
static IntervalList |
fromVcf(java.io.File file,
boolean includeFiltered)
|
static IntervalList |
fromVcf(VCFFileReader vcf)
Converts a vcf to an IntervalList. |
static IntervalList |
fromVcf(VCFFileReader vcf,
boolean includeFiltered)
|
VCFHeader |
getFileHeader()
Returns the VCFHeader associated with this VCF/BCF file. |
static SAMSequenceDictionary |
getSequenceDictionary(java.io.File file)
Returns the SAMSequenceDictionary from the provided VCF file. |
static boolean |
isBCF(java.io.File file)
Returns true if the given file appears to be a BCF file. |
CloseableIterator<VariantContext> |
iterator()
Returns an iterator over all records in this VCF/BCF file. |
CloseableIterator<VariantContext> |
query(java.lang.String chrom,
int start,
int end)
Queries for records within the region specified. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VCFFileReader(java.io.File file)
public VCFFileReader(java.io.File file, java.io.File indexFile)
public VCFFileReader(java.io.File file, boolean requireIndex)
public VCFFileReader(java.io.File file, java.io.File indexFile, boolean requireIndex)
Method Detail |
---|
public static boolean isBCF(java.io.File file)
public static SAMSequenceDictionary getSequenceDictionary(java.io.File file)
public static IntervalList fromVcf(java.io.File file)
file
-
public static IntervalList fromVcf(java.io.File file, boolean includeFiltered)
public static IntervalList fromVcf(VCFFileReader vcf)
vcf
- the vcfReader to be used for the conversion
public static IntervalList fromVcf(VCFFileReader vcf, boolean includeFiltered)
public VCFHeader getFileHeader()
public CloseableIterator<VariantContext> iterator()
iterator
in interface java.lang.Iterable<VariantContext>
public CloseableIterator<VariantContext> query(java.lang.String chrom, int start, int end)
public void close()
close
in interface java.io.Closeable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |