Class HaploidReferenceResolver

java.lang.Object
htsjdk.beta.plugin.registry.HtsCodecResolver<HaploidReferenceCodec>
htsjdk.beta.plugin.registry.HaploidReferenceResolver

public class HaploidReferenceResolver extends HtsCodecResolver<HaploidReferenceCodec>
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 Details

    • HaploidReferenceResolver

      public HaploidReferenceResolver()
      Create a new HaploidReferenceResolver.
  • Method Details

    • getHaploidReferenceDecoder

      public HaploidReferenceDecoder getHaploidReferenceDecoder(IOPath inputPath)
      Get a HaploidReferenceDecoder 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 resource
      HtsjdkPluginException - 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 a HaploidReferenceDecoder suitable for decoding inputPath using options in HaploidReferenceDecoderOptions. The inputPath is inspected to determine the appropriate file format/version. The index is automatically resolved. To bypass index resolution, use getHaploidReferenceDecoder(htsjdk.io.IOPath).
      Parameters:
      inputPath - the IOPath to be decoded
      HaploidReferenceDecoderOptions - options to use
      Returns:
      a HaploidReferenceDecoder suitable for decoding inputPath
      Throws:
      HtsjdkException - if no registered codecs can handle the resource
      HtsjdkPluginException - 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)
      Get a HaploidReferenceDecoder 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 resource
      HtsjdkPluginException - 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 a HaploidReferenceDecoder suitable for decoding inputBundle using options in HaploidReferenceDecoderOptions. The inputBundle is inspected to determine the appropriate file format/version.
      Parameters:
      inputBundle - the bundle to be decoded
      HaploidReferenceDecoderOptions - HaploidReferenceDecoderOptions options to be used by the decoder
      Returns:
      a HaploidReferenceDecoder suitable for decoding inputBundle
      Throws:
      HtsjdkException - if no registered codecs can handle the resource
      HtsjdkPluginException - if more than one codec claims to handle the resource. this usually indicates that the registry contains an incorrectly written codec.