# Class SAMFileWriterFactory

java.lang.Object
htsjdk.samtools.SAMFileWriterFactory

All Implemented Interfaces:
  `Cloneable`

public class SAMFileWriterFactory extends Object implements Cloneable
Create a writer for writing SAM, BAM, or CRAM files.

## Constructor Summary

Constructors
Constructor
Description
`SAMFileWriterFactory()`
simple constructor
`SAMFileWriterFactory(SAMFileWriterFactory other)`
copy constructor

## Method Summary

Modifier and Type
Method
Description
`SAMFileWriterFactory`
`clone()`
`int`
`getCompressionLevel()`
`CRAMEncodingStrategy`
`getCRAMEncodingStrategy()`
`static boolean`
`getDefaultCreateIndexWhileWriting()`
Gets the default for subsequent SAMFileWriterFactories that do not specify whether to create an index.
`static boolean`
`getDefaultCreateMd5File()`
Gets the default for whether to create md5Files for BAM files this factory.
`int`
`getMaxRecordsInRam()`
Gets the maximum number of records held in RAM before spilling to disk during sorting.
`File`
`getTempDirectory()`
Gets the temporary directory that will be used when sorting data.
`SAMFileWriter`
`makeBAMWriter(SAMFileHeader header, boolean presorted, File outputFile)`
Create a BAMFileWriter that is ready to receive SAMRecords.
`SAMFileWriter`
`makeBAMWriter(SAMFileHeader header, boolean presorted, File outputFile, int compressionLevel)`
Create a BAMFileWriter that is ready to receive SAMRecords.
`SAMFileWriter`
`makeBAMWriter(SAMFileHeader header, boolean presorted, OutputStream stream)`
Create a BAMFileWriter for writing to a stream that is ready to receive SAMRecords.
`SAMFileWriter`
`makeBAMWriter(SAMFileHeader header, boolean presorted, Path outputPath)`
Create a BAMFileWriter that is ready to receive SAMRecords.
`SAMFileWriter`
`makeBAMWriter(SAMFileHeader header, boolean presorted, Path outputPath, int compressionLevel)`
Create a BAMFileWriter that is ready to receive SAMRecords.
`CRAMFileWriter`
`makeCRAMWriter(SAMFileHeader header, boolean presorted, File outputFile, File referenceFasta)`
Create a CRAMFileWriter on an output file.
`CRAMFileWriter`
`makeCRAMWriter(SAMFileHeader header, boolean presorted, Path output, File referenceFasta)`
Deprecated.
since 6/18, prefer `makeWriter(SAMFileHeader, boolean, Path, Path)` for creating bam/cram writers however `makeCRAMWriter(SAMFileHeader, boolean, Path, Path)` is the direct replacement for this method
`CRAMFileWriter`
`makeCRAMWriter(SAMFileHeader header, boolean presorted, Path output, Path referenceFasta)`
Create a CRAMFileWriter on an output file.
`CRAMFileWriter`
`makeCRAMWriter(SAMFileHeader header, File outputFile, File referenceFasta)`
Create a CRAMFileWriter on an output file.
`CRAMFileWriter`
`makeCRAMWriter(SAMFileHeader header, OutputStream stream, File referenceFasta)`
Create a CRAMFileWriter on an output stream.
`CRAMFileWriter`
`makeCRAMWriter(SAMFileHeader header, OutputStream stream, Path referenceFasta)`
Create a CRAMFileWriter on an output stream.
`CRAMFileWriter`
`makeCRAMWriter(SAMFileHeader header, Path outputPath, File referenceFasta)`
Deprecated.
since 6/18, prefer `makeWriter(SAMFileHeader, boolean, Path, Path)` for creating bam/cram writers however `makeCRAMWriter(SAMFileHeader, boolean, Path, Path)` is the direct replacement for this method
`SAMFileWriter`
`makeSAMOrBAMWriter(SAMFileHeader header, boolean presorted, File outputFile)`
Create either a SAM or a BAM writer based on examination of the outputFile extension, defaults to BAM writer.
`SAMFileWriter`
`makeSAMOrBAMWriter(SAMFileHeader header, boolean presorted, Path outputPath)`
Create either a SAM or a BAM writer based on examination of the outputPath extension.
`SAMFileWriter`
`makeSAMWriter(SAMFileHeader header, boolean presorted, File outputFile)`
Create a SAMTextWriter that is ready to receive SAMRecords.
`SAMFileWriter`
`makeSAMWriter(SAMFileHeader header, boolean presorted, OutputStream stream)`
Create a SAMTextWriter for writing to a stream that is ready to receive SAMRecords.
`SAMFileWriter`
`makeSAMWriter(SAMFileHeader header, boolean presorted, Path outputPath)`
Create a SAMTextWriter that is ready to receive SAMRecords.
`SAMFileWriter`
`makeWriter(SAMFileHeader header, boolean presorted, File outputFile, File referenceFasta)`
Create a SAM, BAM or CRAM writer based on examination of the outputFile extension.
`SAMFileWriter`
`makeWriter(SAMFileHeader header, boolean presorted, Path outputPath, File referenceFasta)`
Deprecated.
since 6/18, use `makeWriter(SAMFileHeader, boolean, Path, Path)` instead
`SAMFileWriter`
`makeWriter(SAMFileHeader header, boolean presorted, Path outputPath, Path referenceFasta)`
Create a SAM, BAM or CRAM writer based on examination of the outputPath extension.
`SAMFileWriterFactory`
`setAsyncOutputBufferSize(int asyncOutputBufferSize)`
If and only if using asynchronous IO then sets the maximum number of records that can be buffered per SAMFileWriter before producers will block when trying to write another SAMRecord.
`SAMFileWriterFactory`
`setBufferSize(int bufferSize)`
Controls size of write buffer.
`SAMFileWriterFactory`
`setCompressionLevel(int compressionLevel)`
set compression level 0!none 9: max
`SAMFileWriterFactory`
`setCRAMEncodingStrategy(CRAMEncodingStrategy cramEncodingStrategy)`
Set the `CRAMEncodingStrategy` to use when creating CRAM writers.
`SAMFileWriterFactory`
`setCreateIndex(boolean setting)`
Convenience method allowing newSAMFileWriterFactory().setCreateIndex(true); Equivalent to SAMFileWriterFactory.setDefaultCreateIndexWhileWriting(true); newSAMFileWriterFactory(); If a BAM or CRAM (not SAM) file is created, the setting is true, and the file header specifies coordinate order, then a BAM index file will be written along with the BAM file.
`SAMFileWriterFactory`
`setCreateMd5File(boolean createMd5File)`
Sets whether to create md5Files for BAMs from this factory.
`static void`
`setDefaultCreateIndexWhileWriting(boolean setting)`
Sets the default for subsequent SAMFileWriterFactories that do not specify whether to create an index.
`static void`
`setDefaultCreateMd5File(boolean createMd5File)`
Sets the default for whether to create md5Files for BAM files this factory.
`SAMFileWriterFactory`
`setDeflaterFactory(DeflaterFactory deflaterFactory)`
Set the deflater factory used by BAM writers created by this writer factory.
`SAMFileWriterFactory`
`setMaxRecordsInRam(int maxRecordsInRam)`
Before creating a writer that is not presorted, this method may be called in order to override the default number of SAMRecords stored in RAM before spilling to disk (c.f.
`SAMFileWriterFactory`
`setSamFlagFieldOutput(SamFlagField samFlagFieldOutput)`
Set the flag output format only when writing text.
`SAMFileWriterFactory`
`setTempDirectory(File tmpDir)`
Set the temporary directory to use when sort data.
`SAMFileWriterFactory`
`setUseAsyncIo(boolean useAsyncIo)`
Turn on or off the use of asynchronous IO for writing output SAM and BAM files.
`String`
`toString()`

### Methods inherited from class Object

`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### SAMFileWriterFactory

public SAMFileWriterFactory()
simple constructor

### SAMFileWriterFactory

public SAMFileWriterFactory(SAMFileWriterFactory other)
copy constructor

## Method Details

### clone

public SAMFileWriterFactory clone()

Overrides:
  `clone` in class `Object`

### setDefaultCreateMd5File

public static void setDefaultCreateMd5File(boolean createMd5File)
Sets the default for whether to create md5Files for BAM files this factory.

### getDefaultCreateMd5File

public static boolean getDefaultCreateMd5File()
Gets the default for whether to create md5Files for BAM files this factory.

See Also:
  - `setDefaultCreateMd5File(boolean)`

### setCreateMd5File

public SAMFileWriterFactory setCreateMd5File(boolean createMd5File)
Sets whether to create md5Files for BAMs from this factory.

### setDeflaterFactory

public SAMFileWriterFactory setDeflaterFactory(DeflaterFactory deflaterFactory)
Set the deflater factory used by BAM writers created by this writer factory. Must not be null. If this method is not called, the default `DeflaterFactory` is used which creates the default JDK `Deflater`. This method returns the SAMFileWriterFactory itself.

### setCompressionLevel

public SAMFileWriterFactory setCompressionLevel(int compressionLevel)
set compression level 0!none 9: max

### getCompressionLevel

public int getCompressionLevel()

### setDefaultCreateIndexWhileWriting

public static void setDefaultCreateIndexWhileWriting(boolean setting)
Sets the default for subsequent SAMFileWriterFactories that do not specify whether to create an index. If a BAM (not SAM) file is created, the setting is true, and the file header specifies coordinate order, then a BAM index file will be written along with the BAM file.

Parameters:
  `setting` - whether to attempt to create a BAM index while creating the BAM file

### getDefaultCreateIndexWhileWriting

public static boolean getDefaultCreateIndexWhileWriting()
Gets the default for subsequent SAMFileWriterFactories that do not specify whether to create an index.

See Also:
  - `setDefaultCreateIndexWhileWriting(boolean)`

### setCreateIndex

public SAMFileWriterFactory setCreateIndex(boolean setting)
Convenience method allowing newSAMFileWriterFactory().setCreateIndex(true); Equivalent to SAMFileWriterFactory.setDefaultCreateIndexWhileWriting(true); newSAMFileWriterFactory(); If a BAM or CRAM (not SAM) file is created, the setting is true, and the file header specifies coordinate order, then a BAM index file will be written along with the BAM file.

Parameters:
  `setting` - whether to attempt to create a BAM index while creating the BAM file.
Returns:
  this factory object

### setMaxRecordsInRam

public SAMFileWriterFactory setMaxRecordsInRam(int maxRecordsInRam)
Before creating a writer that is not presorted, this method may be called in order to override the default number of SAMRecords stored in RAM before spilling to disk (c.f. SAMFileWriterImpl.MAX_RECORDS_IN_RAM). When writing very large sorted SAM files, you may need call this method in order to avoid running out of file handles. The RAM available to the JVM may need to be increased in order to hold the specified number of records in RAM. This value affects the number of records stored in subsequent calls to one of the make...() methods.

Parameters:
  `maxRecordsInRam` - Number of records to store in RAM before spilling to temporary file when creating a sorted SAM or BAM file.

### getMaxRecordsInRam

public int getMaxRecordsInRam()
Gets the maximum number of records held in RAM before spilling to disk during sorting.

See Also:
  - `setMaxRecordsInRam(int)`

### setUseAsyncIo

public SAMFileWriterFactory setUseAsyncIo(boolean useAsyncIo)
Turn on or off the use of asynchronous IO for writing output SAM and BAM files. If true then each SAMFileWriter creates a dedicated thread which is used for compression and IO activities.

### setAsyncOutputBufferSize

public SAMFileWriterFactory setAsyncOutputBufferSize(int asyncOutputBufferSize)
If and only if using asynchronous IO then sets the maximum number of records that can be buffered per SAMFileWriter before producers will block when trying to write another SAMRecord.

### setBufferSize

public SAMFileWriterFactory setBufferSize(int bufferSize)
Controls size of write buffer. Default value: [[htsjdk.samtools.Defaults#BUFFER_SIZE]]

### setTempDirectory

public SAMFileWriterFactory setTempDirectory(File tmpDir)
Set the temporary directory to use when sort data.

Parameters:
  `tmpDir` - Path to the temporary directory

### getTempDirectory

public File getTempDirectory()
Gets the temporary directory that will be used when sorting data.

See Also:
  - `setTempDirectory(File)`

### setSamFlagFieldOutput

public SAMFileWriterFactory setSamFlagFieldOutput(SamFlagField samFlagFieldOutput)
Set the flag output format only when writing text. Default value: [[htsjdk.samtools.SAMTextWriter.samFlagFieldOutput.DECIMAL]]

### setCRAMEncodingStrategy

public SAMFileWriterFactory setCRAMEncodingStrategy(CRAMEncodingStrategy cramEncodingStrategy)
Set the `CRAMEncodingStrategy` to use when creating CRAM writers. Controls the CRAM version, compression profile, and per-data-series codec selection.

The default strategy uses the `CRAMCompressionProfile.NORMAL` profile. To use a specific profile:

      factory.setCRAMEncodingStrategy(CRAMCompressionProfile.ARCHIVE.toStrategy());

Parameters:
  `cramEncodingStrategy` - the encoding strategy to use for CRAM output
Returns:
  this factory for chaining

### getCRAMEncodingStrategy

public CRAMEncodingStrategy getCRAMEncodingStrategy()

Returns:
  the current CRAM encoding strategy

### makeBAMWriter

public SAMFileWriter makeBAMWriter(SAMFileHeader header, boolean presorted, File outputFile)
Create a BAMFileWriter that is ready to receive SAMRecords. Uses default compression level.

Parameters:
  `header` - entire header. Sort order is determined by the sortOrder property of this arg.
  `presorted` - if true, SAMRecords must be added to the SAMFileWriter in order that agrees with header.sortOrder.
  `outputFile` - where to write the output.

### makeBAMWriter

public SAMFileWriter makeBAMWriter(SAMFileHeader header, boolean presorted, Path outputPath)
Create a BAMFileWriter that is ready to receive SAMRecords. Uses default compression level.

Parameters:
  `header` - entire header. Sort order is determined by the sortOrder property of this arg.
  `presorted` - if true, SAMRecords must be added to the SAMFileWriter in order that agrees with header.sortOrder.
  `outputPath` - where to write the output.

### makeBAMWriter

public SAMFileWriter makeBAMWriter(SAMFileHeader header, boolean presorted, File outputFile, int compressionLevel)
Create a BAMFileWriter that is ready to receive SAMRecords.

Parameters:
  `header` - entire header. Sort order is determined by the sortOrder property of this arg.
  `presorted` - if true, SAMRecords must be added to the SAMFileWriter in order that agrees with header.sortOrder.
  `outputFile` - where to write the output.
  `compressionLevel` - Override default compression level with the given value, between 0 (fastest) and 9 (smallest).

### makeBAMWriter

public SAMFileWriter makeBAMWriter(SAMFileHeader header, boolean presorted, Path outputPath, int compressionLevel)
Create a BAMFileWriter that is ready to receive SAMRecords.

Parameters:
  `header` - entire header. Sort order is determined by the sortOrder property of this arg.
  `presorted` - if true, SAMRecords must be added to the SAMFileWriter in order that agrees with header.sortOrder.
  `outputPath` - where to write the output.
  `compressionLevel` - Override default compression level with the given value, between 0 (fastest) and 9 (smallest).

### makeSAMWriter

public SAMFileWriter makeSAMWriter(SAMFileHeader header, boolean presorted, File outputFile)
Create a SAMTextWriter that is ready to receive SAMRecords.

Parameters:
  `header` - entire header. Sort order is determined by the sortOrder property of this arg.
  `presorted` - if true, SAMRecords must be added to the SAMFileWriter in order that agrees with header.sortOrder.
  `outputFile` - where to write the output.

### makeSAMWriter

public SAMFileWriter makeSAMWriter(SAMFileHeader header, boolean presorted, Path outputPath)
Create a SAMTextWriter that is ready to receive SAMRecords.

Parameters:
  `header` - entire header. Sort order is determined by the sortOrder property of this arg.
  `presorted` - if true, SAMRecords must be added to the SAMFileWriter in order that agrees with header.sortOrder.
  `outputPath` - where to write the output.

### makeSAMWriter

public SAMFileWriter makeSAMWriter(SAMFileHeader header, boolean presorted, OutputStream stream)
Create a SAMTextWriter for writing to a stream that is ready to receive SAMRecords. This method does not support the creation of an MD5 file

Parameters:
  `header` - entire header. Sort order is determined by the sortOrder property of this arg.
  `presorted` - if true, SAMRecords must be added to the SAMFileWriter in order that agrees with header.sortOrder.
  `stream` - the stream to write records to. Note that this method does not buffer the stream, so the caller must buffer if desired. Note that PrintStream is buffered.

### makeBAMWriter

public SAMFileWriter makeBAMWriter(SAMFileHeader header, boolean presorted, OutputStream stream)
Create a BAMFileWriter for writing to a stream that is ready to receive SAMRecords. This method does not support the creation of an MD5 file

Parameters:
  `header` - entire header. Sort order is determined by the sortOrder property of this arg.
  `presorted` - if true, SAMRecords must be added to the SAMFileWriter in order that agrees with header.sortOrder.
  `stream` - the stream to write records to. Note that this method does not buffer the stream, so the caller must buffer if desired. Note that PrintStream is buffered.

### makeSAMOrBAMWriter

public SAMFileWriter makeSAMOrBAMWriter(SAMFileHeader header, boolean presorted, File outputFile)
Create either a SAM or a BAM writer based on examination of the outputFile extension, defaults to BAM writer.

Parameters:
  `header` - entire header. Sort order is determined by the sortOrder property of this arg.
  `presorted` - presorted if true, SAMRecords must be added to the SAMFileWriter in order that agrees with header.sortOrder.
  `outputFile` - where to write the output. Must end with .sam or .bam.
Returns:
  SAM or BAM writer based on file extension of outputFile.

### makeSAMOrBAMWriter

public SAMFileWriter makeSAMOrBAMWriter(SAMFileHeader header, boolean presorted, Path outputPath)
Create either a SAM or a BAM writer based on examination of the outputPath extension.

Parameters:
  `header` - entire header. Sort order is determined by the sortOrder property of this arg.
  `presorted` - presorted if true, SAMRecords must be added to the SAMFileWriter in order that agrees with header.sortOrder.
  `outputPath` - where to write the output. Must end with .sam or .bam.
Returns:
  SAM or BAM writer based on file extension of outputPath.

### makeWriter

public SAMFileWriter makeWriter(SAMFileHeader header, boolean presorted, File outputFile, File referenceFasta)
Create a SAM, BAM or CRAM writer based on examination of the outputFile extension. The method assumes BAM file format for unknown file extensions.

Parameters:
  `header` - header. Sort order is determined by the sortOrder property of this arg.
  `presorted` - if true, SAMRecords must be added to the SAMFileWriter in order that agrees with header.sortOrder.
  `outputFile` - where to write the output. Should end with .sam, .bam or .cram.
  `referenceFasta` - reference sequence file
Returns:
  SAMFileWriter appropriate for SAM and CRAM file types specified in outputFile, or a BAM writer for all other types

### makeWriter

@Deprecated public SAMFileWriter makeWriter(SAMFileHeader header, boolean presorted, Path outputPath, File referenceFasta)
Deprecated.
since 6/18, use `makeWriter(SAMFileHeader, boolean, Path, Path)` instead
Create a SAM, BAM or CRAM writer based on examination of the outputPath extension.

Parameters:
  `header` - header. Sort order is determined by the sortOrder property of this arg.
  `presorted` - if true, SAMRecords must be added to the SAMFileWriter in order that agrees with header.sortOrder.
  `outputPath` - where to write the output. Must end with .sam, .bam or .cram.
  `referenceFasta` - reference sequence file
Returns:
  SAMFileWriter appropriate for the file type specified in outputPath

### makeWriter

public SAMFileWriter makeWriter(SAMFileHeader header, boolean presorted, Path outputPath, Path referenceFasta)
Create a SAM, BAM or CRAM writer based on examination of the outputPath extension.

Parameters:
  `header` - header. Sort order is determined by the sortOrder property of this arg.
  `presorted` - if true, SAMRecords must be added to the SAMFileWriter in order that agrees with header.sortOrder.
  `outputPath` - where to write the output. Must end with .sam, .bam or .cram.
  `referenceFasta` - reference sequence file
Returns:
  SAMFileWriter appropriate for the file type specified in outputPath

### makeCRAMWriter

public CRAMFileWriter makeCRAMWriter(SAMFileHeader header, OutputStream stream, File referenceFasta)
Create a CRAMFileWriter on an output stream. Requires the input to be presorted to match the sort order defined by the input header. Note: does not honor factory settings for CREATE_MD5, CREATE_INDEX, USE_ASYNC_IO.

Parameters:
  `header` - entire header. Sort order is determined by the sortOrder property of this arg.
  `stream` - where to write the output.
  `referenceFasta` - reference sequence file
Returns:
  CRAMFileWriter

### makeCRAMWriter

public CRAMFileWriter makeCRAMWriter(SAMFileHeader header, OutputStream stream, Path referenceFasta)
Create a CRAMFileWriter on an output stream. Requires the input to be presorted to match the sort order defined by the input header. Note: does not honor factory settings for CREATE_MD5, CREATE_INDEX, USE_ASYNC_IO.

Parameters:
  `header` - entire header. Sort order is determined by the sortOrder property of this arg.
  `stream` - where to write the output.
  `referenceFasta` - reference sequence file
Returns:
  CRAMFileWriter

### makeCRAMWriter

public CRAMFileWriter makeCRAMWriter(SAMFileHeader header, File outputFile, File referenceFasta)
Create a CRAMFileWriter on an output file. Requires input record to be presorted to match the sort order defined by the input header. Note: does not honor factory settings for USE_ASYNC_IO.

Parameters:
  `header` - entire header. Sort order is determined by the sortOrder property of this arg.
  `outputFile` - where to write the output. Must end with .sam, .bam or .cram.
  `referenceFasta` - reference sequence file
Returns:
  CRAMFileWriter

### makeCRAMWriter

@Deprecated public CRAMFileWriter makeCRAMWriter(SAMFileHeader header, Path outputPath, File referenceFasta)
Deprecated.
since 6/18, prefer `makeWriter(SAMFileHeader, boolean, Path, Path)` for creating bam/cram writers however `makeCRAMWriter(SAMFileHeader, boolean, Path, Path)` is the direct replacement for this method
Create a CRAMFileWriter on an output file. Requires input record to be presorted to match the sort order defined by the input header. Note: does not honor factory settings for USE_ASYNC_IO.

Parameters:
  `header` - entire header. Sort order is determined by the sortOrder property of this arg.
  `outputPath` - where to write the output. Must end with .sam, .bam or .cram.
  `referenceFasta` - reference sequence file
Returns:
  CRAMFileWriter

### makeCRAMWriter

public CRAMFileWriter makeCRAMWriter(SAMFileHeader header, boolean presorted, File outputFile, File referenceFasta)
Create a CRAMFileWriter on an output file. Note: does not honor factory setting for USE_ASYNC_IO.

Parameters:
  `header` - entire header. Sort order is determined by the sortOrder property of this arg.
  `presorted` - if true, SAMRecords must be added to the SAMFileWriter in order that agrees with header.sortOrder.
  `outputFile` - where to write the output. Must end with .sam, .bam or .cram.
  `referenceFasta` - reference sequence file
Returns:
  CRAMFileWriter

### makeCRAMWriter

@Deprecated public CRAMFileWriter makeCRAMWriter(SAMFileHeader header, boolean presorted, Path output, File referenceFasta)
Deprecated.
since 6/18, prefer `makeWriter(SAMFileHeader, boolean, Path, Path)` for creating bam/cram writers however `makeCRAMWriter(SAMFileHeader, boolean, Path, Path)` is the direct replacement for this method
Create a CRAMFileWriter on an output file. Note: does not honor factory setting for USE_ASYNC_IO.

Parameters:
  `header` - entire header. Sort order is determined by the sortOrder property of this arg.
  `presorted` - if true, SAMRecords must be added to the SAMFileWriter in order that agrees with header.sortOrder.
  `output` - where to write the output. Must end with .sam, .bam or .cram.
  `referenceFasta` - reference sequence file
Returns:
  CRAMFileWriter

### makeCRAMWriter

public CRAMFileWriter makeCRAMWriter(SAMFileHeader header, boolean presorted, Path output, Path referenceFasta)
Create a CRAMFileWriter on an output file. Note: does not honor factory setting for USE_ASYNC_IO.

Parameters:
  `header` - entire header. Sort order is determined by the sortOrder property of this arg.
  `presorted` - if true, SAMRecords must be added to the SAMFileWriter in order that agrees with header.sortOrder.
  `output` - where to write the output. Must end with .sam, .bam or .cram.
  `referenceFasta` - reference sequence file
Returns:
  CRAMFileWriter

### toString

public String toString()

Overrides:
  `toString` in class `Object`