Package htsjdk.beta.plugin.variants
Class VariantsEncoderOptions
java.lang.Object
htsjdk.beta.plugin.variants.VariantsEncoderOptions
- All Implemented Interfaces:
HtsEncoderOptions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Get the buffer size used when writing to anIOPathResource
.boolean
Determine if writing fields that are missing from the header is allowed.boolean
Determine if async IO is enabled for these options.boolean
True if only full format fields should always be written (suppress trimming of trailing missing values).boolean
Determine if sites-only writing is enabled (suppresses writing of genotypes).setAllowFieldsMissingFromHeader
(boolean allowFieldsMissingFromHeader) Set whether writing fields that are missing from the header is allowed.setAsyncIO
(boolean asyncIO) Set whether to enable async IO for these options.setBuffer
(int bufferSize) Set an output buffer size to use when writing to anIOPathResource
.setWriteFullFormatField
(boolean writeFullFormatField) Set whether full format fields should always be written (suppress trimming of trailing missing values).setWriteSitesOnly
(boolean writeSitesOnly) Set whether only sites are written, without genotypes suppressed.
-
Constructor Details
-
VariantsEncoderOptions
public VariantsEncoderOptions()
-
-
Method Details
-
getBufferSize
public int getBufferSize()Get the buffer size used when writing to anIOPathResource
. Defaults toDefaults.NON_ZERO_BUFFER_SIZE
.- Returns:
- the buffer size used when writing to an IOPath
-
setBuffer
Set an output buffer size to use when writing to anIOPathResource
. Does not affect writing to OutputStreams supplied by the user as aOutputStreamResource
. Set to 0 for no buffering. Defaults toDefaults.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
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
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
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
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
-