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 HaploidReferenceCodecs (see HtsCodecRegistry.getHaploidReferenceResolver()).
Provides typesafe conversion of argument and return types to types that conform to those used by
HaploidReferenceCodecs, such as HaploidReferenceDecoder and
HaploidReferenceEncoder.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetHaploidReferenceDecoder(Bundle inputBundle) Get aHaploidReferenceDecoderfor the given input Bundle.getHaploidReferenceDecoder(Bundle inputBundle, HaploidReferenceDecoderOptions HaploidReferenceDecoderOptions) Get aHaploidReferenceDecodersuitable for decodinginputBundleusing options inHaploidReferenceDecoderOptions.getHaploidReferenceDecoder(IOPath inputPath) Get aHaploidReferenceDecoderfor the given inputPath.getHaploidReferenceDecoder(IOPath inputPath, HaploidReferenceDecoderOptions HaploidReferenceDecoderOptions) Get aHaploidReferenceDecodersuitable for decodinginputPathusing 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 aHaploidReferenceDecoderfor 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 aHaploidReferenceDecodersuitable for decodinginputPathusing options inHaploidReferenceDecoderOptions. TheinputPathis 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
HaploidReferenceDecodersuitable 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 aHaploidReferenceDecoderfor 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 aHaploidReferenceDecodersuitable for decodinginputBundleusing options inHaploidReferenceDecoderOptions. TheinputBundleis inspected to determine the appropriate file format/version.- Parameters:
inputBundle- the bundle to be decodedHaploidReferenceDecoderOptions-HaploidReferenceDecoderOptionsoptions to be used by the decoder- Returns:
- a
HaploidReferenceDecodersuitable 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.
-