Class CRAMFileWriter

    • Constructor Detail

      • CRAMFileWriter

        public CRAMFileWriter​(OutputStream outputStream,
                              CRAMReferenceSource referenceSource,
                              SAMFileHeader samFileHeader,
                              String fileName)
        Create a CRAMFileWriter on an output stream. Requires input records to be presorted to match the sort order defined by the input samFileHeader.
        Parameters:
        outputStream - where to write the output. Can not be null.
        referenceSource - reference source. Can not be null.
        samFileHeader - SAMFileHeader to be used. Can not be null. Sort order is determined by the sortOrder property of this arg.
        fileName - used for display in error messages
        Throws:
        IllegalArgumentException - if the outputStream, referenceSource or samFileHeader are null
      • CRAMFileWriter

        public CRAMFileWriter​(OutputStream outputStream,
                              OutputStream indexOS,
                              CRAMReferenceSource referenceSource,
                              SAMFileHeader samFileHeader,
                              String fileName)
        Create a CRAMFileWriter and optional index on output streams. Requires input records to be presorted to match the sort order defined by the input samFileHeader.
        Parameters:
        outputStream - where to write the output. Can not be null.
        indexOS - where to write the output index. Can be null if no index is required.
        referenceSource - reference source
        samFileHeader - SAMFileHeader to be used. Can not be null. Sort order is determined by the sortOrder property of this arg.
        fileName - used for display in error messages
        Throws:
        IllegalArgumentException - if the outputStream, referenceSource or samFileHeader are null
      • CRAMFileWriter

        public CRAMFileWriter​(OutputStream outputStream,
                              OutputStream indexOS,
                              boolean presorted,
                              CRAMReferenceSource referenceSource,
                              SAMFileHeader samFileHeader,
                              String fileName)
        Create a CRAMFileWriter and optional index on output streams.
        Parameters:
        outputStream - where to write the output. Can not be null.
        indexOS - where to write the output index. Can be null if no index is required.
        presorted - if true records written to this writer must already be sorted in the order specified by the header
        referenceSource - reference source
        samFileHeader - SAMFileHeader to be used. Can not be null. Sort order is determined by the sortOrder property of this arg.
        fileName - used for display in error message display
        Throws:
        IllegalArgumentException - if the outputStream, referenceSource or samFileHeader are null