Package htsjdk.beta.plugin.registry
Class HaploidReferenceResolver
java.lang.Object
htsjdk.beta.plugin.registry.HtsCodecResolver<HaploidReferenceCodec>
htsjdk.beta.plugin.registry.HaploidReferenceResolver
Class with methods for resolving inputs and outputs to haploid reference encoders and decoders.
Provides a typesafe layer over the HtsCodecResolver
used by an HtsCodecRegistry
to manage HaploidReferenceCodec
s (see HtsCodecRegistry.getHaploidReferenceResolver()
).
Provides typesafe conversion of argument and return types to types that conform to those used by
HaploidReferenceCodec
s, such as HaploidReferenceDecoder
and
HaploidReferenceEncoder
.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetHaploidReferenceDecoder
(Bundle inputBundle) Get aHaploidReferenceDecoder
for the given input Bundle.getHaploidReferenceDecoder
(Bundle inputBundle, HaploidReferenceDecoderOptions HaploidReferenceDecoderOptions) Get aHaploidReferenceDecoder
suitable for decodinginputBundle
using options inHaploidReferenceDecoderOptions
.getHaploidReferenceDecoder
(IOPath inputPath) Get aHaploidReferenceDecoder
for the given inputPath.getHaploidReferenceDecoder
(IOPath inputPath, HaploidReferenceDecoderOptions HaploidReferenceDecoderOptions) Get aHaploidReferenceDecoder
suitable for decodinginputPath
using options inHaploidReferenceDecoderOptions
.Methods inherited from class htsjdk.beta.plugin.registry.HtsCodecResolver
getCodecs, registerCodec, resolveForDecoding, resolveForEncoding, resolveForEncoding, resolveForFormat, resolveFormatAndVersion
-
Constructor Details
-
HaploidReferenceResolver
public HaploidReferenceResolver()Create a new HaploidReferenceResolver.
-
-
Method Details
-
getHaploidReferenceDecoder
Get aHaploidReferenceDecoder
for the given inputPath.- Parameters:
inputPath
- the path to the resource to be decoded- Returns:
- a HaploidReferenceDecoder for the given inputPath
- 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.
-
getHaploidReferenceDecoder
public HaploidReferenceDecoder getHaploidReferenceDecoder(IOPath inputPath, HaploidReferenceDecoderOptions HaploidReferenceDecoderOptions) Get aHaploidReferenceDecoder
suitable for decodinginputPath
using options inHaploidReferenceDecoderOptions
. TheinputPath
is inspected to determine the appropriate file format/version. The index is automatically resolved. To bypass index resolution, usegetHaploidReferenceDecoder(htsjdk.io.IOPath)
.- Parameters:
inputPath
- the IOPath to be decodedHaploidReferenceDecoderOptions
- options to use- Returns:
- a
HaploidReferenceDecoder
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.
-
getHaploidReferenceDecoder
Get aHaploidReferenceDecoder
for the given input Bundle.- Parameters:
inputBundle
- the path to the bundle containing the resource to be decoded- Returns:
- a HaploidReferenceDecoder for the given inputPath
- 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.
-
getHaploidReferenceDecoder
public HaploidReferenceDecoder getHaploidReferenceDecoder(Bundle inputBundle, HaploidReferenceDecoderOptions HaploidReferenceDecoderOptions) Get aHaploidReferenceDecoder
suitable for decodinginputBundle
using options inHaploidReferenceDecoderOptions
. TheinputBundle
is inspected to determine the appropriate file format/version.- Parameters:
inputBundle
- the bundle to be decodedHaploidReferenceDecoderOptions
-HaploidReferenceDecoderOptions
options to be used by the decoder- Returns:
- a
HaploidReferenceDecoder
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.
-