Package htsjdk.beta.plugin.registry
Class VariantsResolver
java.lang.Object
htsjdk.beta.plugin.registry.HtsCodecResolver<VariantsCodec>
htsjdk.beta.plugin.registry.VariantsResolver
Class with methods for resolving inputs and outputs to variants encoders and decoders.
Provides a convenient typesafe layer over the HtsCodecResolver
used by an
HtsCodecRegistry
to manage VariantsCodec
s
(see HtsCodecRegistry.getHaploidReferenceResolver()
).
Provides typesafe conversion of argument and return types to types that conform to those
used with VariantsCodec
s, such as VariantsDecoder
, VariantsEncoder
,
VariantsDecoderOptions
.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetVariantsDecoder
(Bundle inputBundle) Get aVariantsDecoder
suitable for decodinginputBundle
.getVariantsDecoder
(Bundle inputBundle, VariantsDecoderOptions variantsDecoderOptions) getVariantsDecoder
(IOPath inputPath) Get aVariantsDecoder
suitable for decodinginputPath
.getVariantsDecoder
(IOPath inputPath, VariantsDecoderOptions variantsDecoderOptions) getVariantsEncoder
(Bundle outputBundle, VariantsEncoderOptions variantsEncoderOptions) getVariantsEncoder
(Bundle outputBundle, VariantsEncoderOptions variantsEncoderOptions, String variantsFormat, HtsVersion formatVersion) Get aVariantsEncoder
suitable for encoding tooutputBundle
usingvariantsEncoderOptions
, specifying a version and output format.getVariantsEncoder
(IOPath outputPath) Get aVariantsEncoder
suitable for encoding tooutputPath
.getVariantsEncoder
(IOPath outputPath, VariantsEncoderOptions variantsEncoderOptions) Methods inherited from class htsjdk.beta.plugin.registry.HtsCodecResolver
getCodecs, registerCodec, resolveForDecoding, resolveForEncoding, resolveForEncoding, resolveForFormat, resolveFormatAndVersion
-
Constructor Details
-
VariantsResolver
public VariantsResolver()Create a VariantsResolver.
-
-
Method Details
-
getVariantsDecoder
Get aVariantsDecoder
suitable for decodinginputPath
.- Parameters:
inputPath
- the input path to decode- Returns:
- a
VariantsDecoder
suitable for decodinginputPath
- Throws:
HtsjdkException
- if no registered codecs can handle the resourceHtsjdkPluginException
- if more than one codec claims to handle the resource. this usually indicates that the registry contains an incorrectly written codec.
-
getVariantsDecoder
public VariantsDecoder getVariantsDecoder(IOPath inputPath, VariantsDecoderOptions variantsDecoderOptions) - Parameters:
inputPath
- the input path to decodevariantsDecoderOptions
- decoder options to use- Returns:
- a
VariantsDecoder
suitable for decodinginputPath
- Throws:
HtsjdkException
- if no registered codecs can handle the resourceHtsjdkPluginException
- if more than one codec claims to handle the resource. this usually indicates that the registry contains an incorrectly written codec.
-
getVariantsDecoder
Get aVariantsDecoder
suitable for decodinginputBundle
.- Parameters:
inputBundle
- the input bundle containing resources to decode- Returns:
- a
VariantsDecoder
suitable for decodinginputBundle
- Throws:
HtsjdkException
- if no registered codecs can handle the resourceHtsjdkPluginException
- if more than one codec claims to handle the resource. this usually indicates that the registry contains an incorrectly written codec.
-
getVariantsDecoder
public VariantsDecoder getVariantsDecoder(Bundle inputBundle, VariantsDecoderOptions variantsDecoderOptions) - Parameters:
inputBundle
- the input bundle to decodevariantsDecoderOptions
- decoder options to use- Returns:
- a
VariantsDecoder
suitable for decodinginputBundle
- Throws:
HtsjdkException
- if no registered codecs can handle the resourceHtsjdkPluginException
- if more than one codec claims to handle the resource. this usually indicates that the registry contains an incorrectly written codec.
-
getVariantsEncoder
Get aVariantsEncoder
suitable for encoding tooutputPath
.- Parameters:
outputPath
- path to encode to- Returns:
- a
VariantsEncoder
suitable for encoding tooutputPath
- Throws:
HtsjdkException
- if no registered codecs can handle the resourceHtsjdkPluginException
- if more than one codec claims to handle the resource. this usually indicates that the registry contains an incorrectly written codec.
-
getVariantsEncoder
public VariantsEncoder getVariantsEncoder(IOPath outputPath, VariantsEncoderOptions variantsEncoderOptions) - Parameters:
outputPath
- path to encode tovariantsEncoderOptions
- encoder options to use- Returns:
- a
VariantsEncoder
suitable for encoding tooutputPath
- Throws:
HtsjdkException
- if no registered codecs can handle the resourceHtsjdkPluginException
- if more than one codec claims to handle the resource. this usually indicates that the registry contains an incorrectly written codec.
-
getVariantsEncoder
public VariantsEncoder getVariantsEncoder(Bundle outputBundle, VariantsEncoderOptions variantsEncoderOptions) - Parameters:
outputBundle
- output bundle containg resources to encode tovariantsEncoderOptions
- options to use- Returns:
- a
VariantsEncoder
suitable for encoding tooutputBundle
- Throws:
HtsjdkException
- if no registered codecs can handle the resourceHtsjdkPluginException
- if more than one codec claims to handle the resource. this usually indicates that the registry contains an incorrectly written codec.
-
getVariantsEncoder
public VariantsEncoder getVariantsEncoder(Bundle outputBundle, VariantsEncoderOptions variantsEncoderOptions, String variantsFormat, HtsVersion formatVersion) Get aVariantsEncoder
suitable for encoding tooutputBundle
usingvariantsEncoderOptions
, specifying a version and output format.- Parameters:
outputBundle
- output bundle containing resources to encode tovariantsEncoderOptions
- options to usevariantsFormat
- the output format to useformatVersion
- the format version to use- Returns:
- a
VariantsEncoder
suitable for encoding tooutputBundle
- Throws:
HtsjdkException
- if no registered codecs can handle the resourceHtsjdkPluginException
- if more than one codec claims to handle the resource. this usually indicates that the registry contains an incorrectly written codec.
-