public class ReadsResolver extends HtsCodecResolver<ReadsCodec>
Provides a convenient typesafe layer over the HtsCodecResolver used by an
HtsCodecRegistry to manage ReadsCodecs
(see HtsCodecRegistry.getHaploidReferenceResolver()).
Provides typesafe conversion of argument and return types to types that conform to those used with
ReadsCodecs, such as ReadsDecoder, ReadsEncoder,
ReadsDecoderOptions.
| Constructor and Description |
|---|
ReadsResolver()
Create a ReadsResolver.
|
| Modifier and Type | Method and Description |
|---|---|
ReadsDecoder |
getReadsDecoder(Bundle inputBundle)
Get a
ReadsDecoder suitable for decoding inputBundle. |
ReadsDecoder |
getReadsDecoder(Bundle inputBundle,
ReadsDecoderOptions readsDecoderOptions)
|
ReadsDecoder |
getReadsDecoder(IOPath inputPath)
Get a
ReadsDecoder suitable for decoding inputPath. |
ReadsDecoder |
getReadsDecoder(IOPath inputPath,
ReadsDecoderOptions readsDecoderOptions)
|
ReadsEncoder |
getReadsEncoder(Bundle outputBundle,
ReadsEncoderOptions readsEncoderOptions)
|
ReadsEncoder |
getReadsEncoder(Bundle outputBundle,
ReadsEncoderOptions readsEncoderOptions,
java.lang.String readsFormat,
HtsVersion formatVersion)
Get a
ReadsEncoder suitable for encoding to outputBundle, using the options
in readsEncoderOptions, and the file format and version specified in readsFormat and formatVersion. |
ReadsEncoder |
getReadsEncoder(IOPath outputPath)
Get a
ReadsEncoder suitable for encoding to outputPath. |
ReadsEncoder |
getReadsEncoder(IOPath outputPath,
ReadsEncoderOptions readsEncoderOptions)
|
getCodecs, registerCodec, resolveForDecoding, resolveForEncoding, resolveForEncoding, resolveForFormat, resolveFormatAndVersionpublic ReadsDecoder getReadsDecoder(IOPath inputPath)
ReadsDecoder suitable for decoding inputPath. The inputPath is
inspected to determine the appropriate file format/version. The index is automatically resolved.
To bypass index resolution, use getReadsDecoder(htsjdk.io.IOPath).inputPath - the IOPath to be decodedReadsDecoder suitable for decoding inputPathHtsjdkException - 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.public ReadsDecoder getReadsDecoder(IOPath inputPath, ReadsDecoderOptions readsDecoderOptions)
ReadsDecoder suitable for decoding inputPath using options in
readsDecoderOptions. The inputPath is inspected to determine the appropriate
file format/version. The index is automatically resolved. To bypass index resolution, use
getReadsDecoder(htsjdk.io.IOPath).inputPath - the IOPath to be decodedreadsDecoderOptions - options to useReadsDecoder suitable for decoding inputPathHtsjdkException - 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.public ReadsDecoder getReadsDecoder(Bundle inputBundle)
ReadsDecoder suitable for decoding inputBundle. The inputBundle is
inspected to determine the appropriate file format/version.inputBundle - the bundle to be decodedReadsDecoder suitable for decoding inputBundleHtsjdkException - 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.public ReadsDecoder getReadsDecoder(Bundle inputBundle, ReadsDecoderOptions readsDecoderOptions)
ReadsDecoder suitable for decoding inputBundle using options in
readsDecoderOptions. The inputBundle is inspected to determine the appropriate
file format/version.inputBundle - the bundle to be decodedreadsDecoderOptions - ReadsDecoderOptions options to be used by the decoderReadsDecoder suitable for decoding inputBundleHtsjdkException - 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.public ReadsEncoder getReadsEncoder(IOPath outputPath)
ReadsEncoder suitable for encoding to outputPath. The path must include
a file extension suitable for determining the appropriate file format to use; the newest version
of the file format available will be used. To request a specific file format and/or version, use
getReadsEncoder(Bundle, ReadsEncoderOptions, String, HtsVersion).outputPath - the IOPath target for encodingReadsEncoder suitable for encoding to outputPathHtsjdkException - 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.public ReadsEncoder getReadsEncoder(IOPath outputPath, ReadsEncoderOptions readsEncoderOptions)
ReadsEncoder suitable for encoding to outputPath, using the options
in readsEncoderOptions. The path must include a file extension suitable for determining
the appropriate file format to use; the newest version of the file format available will be used.
To request a specific file format and/or version, use
getReadsEncoder(Bundle, ReadsEncoderOptions, String, HtsVersion).outputPath - target path to encodereadsEncoderOptions - ReadsEncoderOptions options to be used by the encoderReadsEncoder suitable for encoding to outputPathHtsjdkException - 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.public ReadsEncoder getReadsEncoder(Bundle outputBundle, ReadsEncoderOptions readsEncoderOptions)
ReadsEncoder suitable for encoding to outputBundle, using the options
in readsEncoderOptions. The outputBundle must include a primary resource with a file
extension suitable for determining the appropriate file format to use; or the resource must include
a format. The newest version of the selected file format available will be used.
To request a specific file format and/or version, use
getReadsEncoder(Bundle, ReadsEncoderOptions, String, HtsVersion).outputBundle - target output to encode toreadsEncoderOptions - ReadsEncoderOptions to be used by the encoderReadsEncoder suitable for encoding to outputPathHtsjdkException - 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.public ReadsEncoder getReadsEncoder(Bundle outputBundle, ReadsEncoderOptions readsEncoderOptions, java.lang.String readsFormat, HtsVersion formatVersion)
ReadsEncoder suitable for encoding to outputBundle, using the options
in readsEncoderOptions, and the file format and version specified in readsFormat and formatVersion.outputBundle - target output bundlereadsEncoderOptions - encode options to be used by the encoderreadsFormat - target file formatformatVersion - target file format versionReadsEncoder suitable for encoding to outputBundleHtsjdkException - 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.