Package htsjdk.samtools.cram.structure
Class CRAMEncodingStrategy
java.lang.Object
htsjdk.samtools.cram.structure.CRAMEncodingStrategy
Parameters that can be set to control the encoding strategy used when writing CRAM.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionCreate an encoding strategy that uses all default values. -
Method Summary
Modifier and TypeMethodDescriptionbooleanintintintintinthashCode()voidSet theCompressionHeaderEncodingMapto use.setGZIPCompressionLevel(int compressionLevel) setMinimumSingleReferenceSliceSize(int minimumSingleReferenceSliceSize) The minimum number of reads we need to have seen to emit a single-reference slice.setReadsPerSlice(int readsPerSlice) Set number of slices per container.setSlicesPerContainer(int slicesPerContainer) Set the number of slices per container.toString()
-
Field Details
-
DEFAULT_MINIMUM_SINGLE_REFERENCE_SLICE_THRESHOLD
public static final int DEFAULT_MINIMUM_SINGLE_REFERENCE_SLICE_THRESHOLD- See Also:
-
DEFAULT_READS_PER_SLICE
public static final int DEFAULT_READS_PER_SLICE- See Also:
-
-
Constructor Details
-
CRAMEncodingStrategy
public CRAMEncodingStrategy()Create an encoding strategy that uses all default values.
-
-
Method Details
-
setReadsPerSlice
Set number of slices per container. In some cases, a container containing fewer slices than the requested value will be produced in order to honor the specification rule that all slices in a container must have the sameReferenceContextType. Note: this value must be >=getMinimumSingleReferenceSliceSize().- Parameters:
readsPerSlice- number of slices written per container- Returns:
- updated CRAMEncodingStrategy
-
setMinimumSingleReferenceSliceSize
The minimum number of reads we need to have seen to emit a single-reference slice. If we've seen fewer than this number, and we have more reads from a different reference context, we prefer to switch to, and subsequently emit, a multiple reference slice, rather than a small single-reference that contains fewer than this number of records. This number must be invalid input: '<' the value forgetReadsPerSlice()- Parameters:
minimumSingleReferenceSliceSize-
-
getMinimumSingleReferenceSliceSize
public int getMinimumSingleReferenceSliceSize() -
setGZIPCompressionLevel
-
setSlicesPerContainer
Set the number of slices per container. If > 1, multiple slices will be placed in the same container if the slices share the same reference context (container records mapped to the same contig). MULTI-REF slices are always emitted as a single contain to avoid conferring MULTI-REF on the next slice, which might otherwise be single-ref; the spec requires a MULTI_REF container to only contain multi-ref slices).- Parameters:
slicesPerContainer- - requested number of slices per container- Returns:
- CRAMEncodingStrategy
-
setCustomCompressionHeaderEncodingMap
Set theCompressionHeaderEncodingMapto use.- Parameters:
encodingMap- the encoding map to use
-
getCustomCompressionHeaderEncodingMap
-
getGZIPCompressionLevel
public int getGZIPCompressionLevel() -
getReadsPerSlice
public int getReadsPerSlice() -
getSlicesPerContainer
public int getSlicesPerContainer() -
toString
-
equals
-
hashCode
public int hashCode()
-