Package htsjdk.samtools
Interface SAMFileWriter
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
BAMFileWriter,CRAMFileWriter,SAMFileWriterImpl,SAMTextWriter
Interface for SAMText and BAM file writers. Clients need not care which they write to,
once the object is constructed.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddAlignment(SAMRecord alignment) voidclose()Must be called to flush or file will likely be defective.voidsetProgressLogger(ProgressLoggerInterface progress) Sets a ProgressLogger on this writer.default voidsetSortOrderChecking(boolean check) If true writers that are writing pre-sorted records should check the order during writing.
-
Method Details
-
addAlignment
-
getFileHeader
SAMFileHeader getFileHeader() -
setProgressLogger
Sets a ProgressLogger on this writer. This is useful when pulling, for instance, from a SortingCollection. -
setSortOrderChecking
default void setSortOrderChecking(boolean check) If true writers that are writing pre-sorted records should check the order during writing. -
close
void close()Must be called to flush or file will likely be defective.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-