Package htsjdk.variant.vcf
Class VCFIteratorBuilder
java.lang.Object
htsjdk.variant.vcf.VCFIteratorBuilder
A Class building
VCFIterator
Example:
VCFIterator r = new VCFIteratorBuilder().open(System.in); while (r.hasNext()) { System.out.println(r.next()); } r.close();
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreates a VCF iterator from a Fileopen
(InputStream in) creates a VCF iterator from an input stream It detects if the stream is a BCF stream or a GZipped stream.creates a VCF iterator from a URI It detects if the stream is a BCF stream or a GZipped stream.open
(String path, Function<SeekableByteChannel, SeekableByteChannel> wrapper) creates a VCF iterator from a URI It detects if the stream is a BCF stream or a GZipped stream.creates a VCF iterator from a Pathopen
(Path path, Function<SeekableByteChannel, SeekableByteChannel> wrapper) creates a VCF iterator from a Path
-
Constructor Details
-
VCFIteratorBuilder
public VCFIteratorBuilder()
-
-
Method Details
-
open
creates a VCF iterator from an input stream It detects if the stream is a BCF stream or a GZipped stream.- Parameters:
in
- inputstream- Returns:
- the VCFIterator
- Throws:
IOException
-
open
creates a VCF iterator from a URI It detects if the stream is a BCF stream or a GZipped stream.- Parameters:
path
- the Path- Returns:
- the VCFIterator
- Throws:
IOException
-
open
creates a VCF iterator from a Path- Parameters:
path
- the path- Returns:
- the VCFIterator
- Throws:
IOException
-
open
public VCFIterator open(Path path, Function<SeekableByteChannel, SeekableByteChannel> wrapper) throws IOExceptioncreates a VCF iterator from a Path- Parameters:
path
- the file pathwrapper
- wrapper forSeekablePathStream
. Can be null.- Returns:
- the VCFIterator
- Throws:
IOException
-
open
public VCFIterator open(String path, Function<SeekableByteChannel, SeekableByteChannel> wrapper) throws IOExceptioncreates a VCF iterator from a URI It detects if the stream is a BCF stream or a GZipped stream.- Parameters:
path
- the Pathwrapper
- wrapper forSeekablePathStream
. Can be null.- Returns:
- the VCFIterator
- Throws:
IOException
-
open
creates a VCF iterator from a File- Parameters:
file
- the file (can be bcf, vcf, vcf.gz)- Returns:
- the VCFIterator
- Throws:
IOException
-