Package htsjdk.samtools.util
Class IntervalListWriter
java.lang.Object
htsjdk.samtools.util.IntervalListWriter
- All Implemented Interfaces:
Closeable
,AutoCloseable
Writes out the list of intervals to the supplied file. This class is particularly useful if we have many intervals
to write, such that they all cannot be held in memory, for example in an
IntervalList
.-
Constructor Summary
ConstructorDescriptionIntervalListWriter
(Path path) Creates a new writer, writing a header to the file.IntervalListWriter
(Path path, SAMFileHeader header) Creates a new writer, writing a header to the file. -
Method Summary
-
Constructor Details
-
IntervalListWriter
Creates a new writer, writing a header to the file.- Parameters:
path
- a path to write to. If exists it will be overwritten.
-
IntervalListWriter
Creates a new writer, writing a header to the file.- Parameters:
path
- a file to write to. If exists it will be overwritten.header
- the header to write.
-
-
Method Details
-
write
Writes a single interval list.- Parameters:
interval
- the interval to write.- Throws:
IOException
-
close
Closes the writer.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-