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 TypeMethodDescriptionvoid
addAlignment
(SAMRecord alignment) void
close()
Must be called to flush or file will likely be defective.void
setProgressLogger
(ProgressLoggerInterface progress) Sets a ProgressLogger on this writer.default void
setSortOrderChecking
(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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-