Package htsjdk.beta.plugin.variants

# Class VariantsEncoderOptions

java.lang.Object
htsjdk.beta.plugin.variants.VariantsEncoderOptions

All Implemented Interfaces:
  `HtsEncoderOptions`

public class VariantsEncoderOptions extends Object implements HtsEncoderOptions

## Constructor Summary

Constructors
Constructor
Description
`VariantsEncoderOptions()`

## Method Summary

Modifier and Type
Method
Description
`int`
`getBufferSize()`
Get the buffer size used when writing to an `IOPathResource`.
`boolean`
`isAllowFieldsMissingFromHeader()`
Determine if writing fields that are missing from the header is allowed.
`boolean`
`isAsyncIO()`
Determine if async IO is enabled for these options.
`boolean`
`isWriteFullFormatField()`
True if only full format fields should always be written (suppress trimming of trailing missing values).
`boolean`
`isWriteSitesOnly()`
Determine if sites-only writing is enabled (suppresses writing of genotypes).
`VariantsEncoderOptions`
`setAllowFieldsMissingFromHeader(boolean allowFieldsMissingFromHeader)`
Set whether writing fields that are missing from the header is allowed.
`VariantsEncoderOptions`
`setAsyncIO(boolean asyncIO)`
Set whether to enable async IO for these options.
`VariantsEncoderOptions`
`setBuffer(int bufferSize)`
Set an output buffer size to use when writing to an `IOPathResource`.
`VariantsEncoderOptions`
`setWriteFullFormatField(boolean writeFullFormatField)`
Set whether full format fields should always be written (suppress trimming of trailing missing values).
`VariantsEncoderOptions`
`setWriteSitesOnly(boolean writeSitesOnly)`
Set whether only sites are written, without genotypes suppressed.

### Methods inherited from class java.lang.Object

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

## Constructor Details

### VariantsEncoderOptions

public VariantsEncoderOptions()

## Method Details

### getBufferSize

public int getBufferSize()
Get the buffer size used when writing to an `IOPathResource`. Defaults to `Defaults.NON_ZERO_BUFFER_SIZE`.

Returns:
  the buffer size used when writing to an IOPath

### setBuffer

public VariantsEncoderOptions setBuffer(int bufferSize)
Set an output buffer size to use when writing to an `IOPathResource`. Does not affect writing to OutputStreams supplied by the user as a `OutputStreamResource`. Set to 0 for no buffering. Defaults to `Defaults.NON_ZERO_BUFFER_SIZE`.

Parameters:
  `bufferSize` - the buffer size to use
Returns:
  updated `VariantsEncoderOptions`

### isWriteSitesOnly

public boolean isWriteSitesOnly()
Determine if sites-only writing is enabled (suppresses writing of genotypes). Defaults to false.

Returns:
  true if writeSitesOnly is enabled

### setWriteSitesOnly

public VariantsEncoderOptions setWriteSitesOnly(boolean writeSitesOnly)
Set whether only sites are written, without genotypes suppressed. Defaults to false.

Parameters:
  `writeSitesOnly` - true if only sites should be written; or false to include genotypes

### isAllowFieldsMissingFromHeader

public boolean isAllowFieldsMissingFromHeader()
Determine if writing fields that are missing from the header is allowed. Defaults to false.

Returns:
  true if writing fields that are missing from the header is allowed, otherwise false

### setAllowFieldsMissingFromHeader

public VariantsEncoderOptions setAllowFieldsMissingFromHeader(boolean allowFieldsMissingFromHeader)
Set whether writing fields that are missing from the header is allowed. Defaults to false.

Parameters:
  `allowFieldsMissingFromHeader` - true to allow missing fields to be written, otherwise false

### isAsyncIO

public boolean isAsyncIO()
Determine if async IO is enabled for these options. Defaults to false. `Defaults.USE_ASYNC_IO_WRITE_FOR_SAMTOOLS`.

Returns:
  true if async IO is enabled, otherwise false

### setAsyncIO

public VariantsEncoderOptions setAsyncIO(boolean asyncIO)
Set whether to enable async IO for these options. Defaults to false.

Parameters:
  `asyncIO` - true to enable async IO, false to disable.
Returns:
  updated options

### isWriteFullFormatField

public boolean isWriteFullFormatField()
True if only full format fields should always be written (suppress trimming of trailing missing values). Defaults to false.

Returns:
  true if only full format fields should always be written

### setWriteFullFormatField

public VariantsEncoderOptions setWriteFullFormatField(boolean writeFullFormatField)
Set whether full format fields should always be written (suppress trimming of trailing missing values). Defaults to false.

Parameters:
  `writeFullFormatField` - true if full format fields should always be written