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 VariantsCodecs
(see HtsCodecRegistry.getHaploidReferenceResolver()).
Provides typesafe conversion of argument and return types to types that conform to those
used with VariantsCodecs, such as VariantsDecoder, VariantsEncoder,
VariantsDecoderOptions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetVariantsDecoder(Bundle inputBundle) Get aVariantsDecodersuitable for decodinginputBundle.getVariantsDecoder(Bundle inputBundle, VariantsDecoderOptions variantsDecoderOptions) getVariantsDecoder(IOPath inputPath) Get aVariantsDecodersuitable for decodinginputPath.getVariantsDecoder(IOPath inputPath, VariantsDecoderOptions variantsDecoderOptions) getVariantsEncoder(Bundle outputBundle, VariantsEncoderOptions variantsEncoderOptions) getVariantsEncoder(Bundle outputBundle, VariantsEncoderOptions variantsEncoderOptions, String variantsFormat, HtsVersion formatVersion) Get aVariantsEncodersuitable for encoding tooutputBundleusingvariantsEncoderOptions, specifying a version and output format.getVariantsEncoder(IOPath outputPath) Get aVariantsEncodersuitable 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 aVariantsDecodersuitable for decodinginputPath.- Parameters:
inputPath- the input path to decode- Returns:
- a
VariantsDecodersuitable 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
VariantsDecodersuitable 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 aVariantsDecodersuitable for decodinginputBundle.- Parameters:
inputBundle- the input bundle containing resources to decode- Returns:
- a
VariantsDecodersuitable 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
VariantsDecodersuitable 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 aVariantsEncodersuitable for encoding tooutputPath.- Parameters:
outputPath- path to encode to- Returns:
- a
VariantsEncodersuitable 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
VariantsEncodersuitable 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
VariantsEncodersuitable 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 aVariantsEncodersuitable for encoding tooutputBundleusingvariantsEncoderOptions, 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
VariantsEncodersuitable 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.
-