# Package htsjdk.samtools.util

package htsjdk.samtools.util

Related Packages
Package
Description
htsjdk.samtools
htsjdk.samtools.util.ftp
htsjdk.samtools.util.htsget
htsjdk.samtools.util.nio
htsjdk.samtools.util.zip
Class
Description
AbstractAsyncWriter<T>
Abstract class that is designed to be extended and specialized to provide an asynchronous wrapper around any kind of Writer class that takes an object and writes it out somehow.
AbstractIterator<E>
Base class of implementing iterators.
AbstractLocusInfo<E extends AbstractRecordAndOffset>
The unit of iteration for AbstractLocusIterator.
AbstractLocusIterator<T extends AbstractRecordAndOffset,K extends AbstractLocusInfo<T>>
Iterator that traverses a SAM File, accumulating information on a per-locus basis.
AbstractProgressLogger
Abstract implementation of a Little progress logging class to facilitate consistent output of useful information when progressing through a stream of SAM records.
AbstractRecordAndOffset
Holds a SAMRecord plus the zero-based offset into that SAMRecord's bases and quality scores that corresponds to the base and quality at the genomic position described the containing AbstractLocusInfo.
AbstractRecordAndOffset.AlignmentType
Classifies whether the given event is a match, insertion, or deletion.
AsciiWriter
Fast (I hope) buffered Writer that converts char to byte merely by casting, rather than charset conversion.
AsyncBlockCompressedInputStream
Asynchronous read-ahead implementation of `BlockCompressedInputStream`.
AsyncBufferedIterator<T>
Iterator that uses a dedicated background thread to perform read-ahead to improve throughput at the expense of increased latency.
BinaryCodec
Encapsulates file representation of various primitive data types.
BlockCompressedFilePointerUtil
Static for manipulating virtual file pointers in BGZF files.
BlockCompressedInputStream
Utility class for reading BGZF block compressed files.
BlockCompressedInputStream.DecompressedBlock
BlockCompressedInputStream.FileTermination
BlockCompressedOutputStream
Writer for a file that is a series of gzip blocks (BGZF format).
BlockCompressedStreamConstants
Constants shared by BlockCompressed{Input,Output}Stream classes
BlockGunzipper
Alternative to GZIPInputStream, for decompressing GZIP blocks that are already loaded into a byte[].
BufferedLineReader
Implementation of LineReader that is a thin wrapper around BufferedReader.
CigarUtil
CloseableIterator<T>
This interface is used by iterators that use releasable resources during iteration.
CloserUtil
Utility to close things that implement Closeable WARNING: This should only be used for Closeable things open for read, because it ignores exceptions, and the caller will probably want to know about exceptions when closing a file being written to, because this may indicate a failure to flush.
CodeUtil
Miscellaneous util methods that don't fit anywhere else.
CollectionUtil
Small utility methods for dealing with collection classes.
CollectionUtil.DefaultingMap<K,V>
A defaulting map, which returns a default value when a value that does not exist in the map is looked up.
CollectionUtil.DefaultingMap.Factory<V,K>
CollectionUtil.MultiMap<K,V>
Simple multi-map for convenience of storing collections in map values.
CollectionUtil.Partitioner<V,K>
Deprecated.
use Collectors.groupingBy instead
ComparableTuple<A extends Comparable<A>,B extends Comparable<B>>
A simple extension of the Tuple class that, for comparable Types, allows comparing Tuples of non-null elements.
CoordMath
Static methods that encapsulate the standard SAM way of storing ranges: one-based, with both ends inclusive.
CoordSpanInputSteam
An input stream that wraps a `SeekableStream` to produce only bytes specified within coordinates.
CustomGzipOutputStream
Hacky little class used to allow us to set the compression level on a GZIP output stream which, for some bizarre reason, is not exposed in the standard API.
DateParser
NOTE: This code has been taken from w3.org, and modified slightly to handle timezones of the form [-+]DDDD, and also to fix a bug in the application of time zone to the parsed date.
DateParser.InvalidDateException
DelegatingIterator<T>
Simple iterator class that delegates all method calls to an underlying iterator.
DiskBackedQueue<E>
A single-ended FIFO queue.
EdgeReadIterator
Iterator that traverses a SAM File, accumulating information on a per-locus basis.
EdgingRecordAndOffset
Holds a SAMRecord plus the zero-based offset into that SAMRecord's bases and quality scores that corresponds to the base and quality for the start of alignment block at the genomic position described by the AbstractLocusInfo.
EdgingRecordAndOffset.Type
Describes the type of `TypedRecordAndOffset`, whether it represents the start or the end of an alignment block.
FastLineReader
Line-oriented InputStream reader that uses one buffer for disk buffering and line-termination-finding, in order to improve performance.
FastqQualityFormat
Enumeration for FastQ quality score formats formats.
FileAppendStreamLRUCache
LRU cache of OutputStreams to handle situation in which it is necessary to have more FileOutputStreams than resource limits will allow.
FileExtensions
Contains file extension constants for read, alignment, variant and annotation files
FormatUtil
Simple class used to format object values into a standard format for printing.
GZIIndex
Represents a .gzi index of a block-compressed file.
GZIIndex.GZIIndexer
Helper class for constructing the GZIindex.
GZIIndex.IndexEntry
Index entry mapping the block-offset (compressed offset) to the uncompressed offset where the block starts.
Histogram<K extends Comparable>
Class for computing and accessing histogram type data.
Histogram.Bin<K extends Comparable>
Represents a bin in the Histogram.
HttpUtils
User: jrobinso Date: Sep 23, 2009
Interval
Represents a simple interval on a sequence.
IntervalCodec
IntervalCoordinateComparator
Comparator that orders intervals based on their sequence index, by coordinate then by strand and finally by name.
IntervalList
Represents a list of intervals against a reference sequence that can be written to and read from a file.
IntervalList.IntervalMergerIterator
An iterator that feeds on an `Iterator<Interval>` and combines consecutive intervals that need merging.
IntervalListReferenceSequenceMask
Serve up loci of interest based on an interval list.
IntervalListWriter
Writes out the list of intervals to the supplied file.
IntervalTree<V>
A Red-Black tree with intervals for keys.
IntervalTree.Node<V1>
IntervalTree.ValuesIterator<V1>
IntervalTreeMap<T>
Utility class that implements an interval map.
IntervalUtil
IntervalUtil.IntervalCombiner
IOUtil
Miscellaneous stateless static IO-oriented methods.
Iso8601Date
Use this type rather than java.util.Date in command-line options in order to get ISO 8601 parsing.
IterableAdapter<T>
Provides an adapter to wrap an Iterator with an Iterable, allowing it to be run through a foreach loop.
IterableOnceIterator<T>
Abstract implementation of an iterator that also implements Iterable (to return itself) so that it can be used if for() loops.
Iterables
Lazy<T>
Simple utility for building an on-demand (lazy) object-initializer.
Lazy.LazyInitializer<T>
Deprecated.
since 1/2017 use a `Supplier` instead
LineReader
Interface allows for implementations that read lines from a String, an ASCII file, or somewhere else.
ListMap<K,V>
A Map class that holds a list of entries under each key instead of a single entry, and provides utility methods for adding an entry under a key.
Locatable
Any class that has a single logical mapping onto the genome should implement Locatable positions should be reported as 1-based and closed at both ends
LocationAware
Describes API for getting current position in a stream, writer, or underlying file.
Locus
Location info about a locus.
LocusComparator<T extends Locus>
compares first by sequence index then by position
LocusImpl
Simple implementation of Locus interface for ease of passing as an arg and comparing with other Locus implementations.
Log
A wafer thin wrapper around System.err that uses var-args to make it much more efficient to call the logging methods in without having to surround every call site with calls to Log.isXXXEnabled().
Log.LogLevel
Enumeration for setting log levels.
Md5CalculatingInputStream
Class to generate an MD5 string for a file as it is being read
Md5CalculatingOutputStream
Class to generate an MD5 string for a file as it is being read
MergingIterator<T>
An iterator over Iterators that return Ts.
Murmur3
Provides an implementation of the Murmur3_32 hash algorithm that has desirable properties in terms of randomness and uniformity of the distribution of output values that make it a useful hashing algorithm for downsampling.
OverlapDetector<T>
Utility class to efficiently do in memory overlap detection between a large set of mapping like objects, and one or more candidate mappings.
PeekableIterator<Object>
Generic Closable Iterator that allows you to peek at the next value before calling next
PeekIterator<T>
Wrapper around an iterator that enables non-destructive peeking at the next element that would be returned by next()
PositionalOutputStream
Wraps output stream in a manner which keeps track of the position within the file and allowing writes at arbitrary points
ProcessExecutor
Utility class that will execute sub processes via Runtime.getRuntime().exec(...) and read off the output from stderr and stdout of the sub process.
ProcessExecutor.ExitStatusAndOutput
ProgressLogger
Little progress logging class to facilitate consistent output of useful information when progressing through a stream of SAM records.
ProgressLoggerInterface
An interface defining the record() methods of the Picard-public ProgressLogger implementation.
QualityEncodingDetector
Utility for determining the type of quality encoding/format (see `FastqQualityFormat`) used in a SAM/BAM or Fastq.
QualityEncodingDetector.FileContext
QualityUtil
Utility class for working with quality scores and error probabilities.
ReferenceSequenceMask
Interface for specifying loci of interest for genotype calling and other operations.
RelativeIso8601Date
Like `Iso8601Date`, but also comes in a "lazy now" flavor.
ResourceLimitedMap<Key,Value>
LRU collection class for managing objects that place some resource burden such that not too many of them can existing in the VM at one time, but they can be reconstructed ias necessary.
ResourceLimitedMapFunctor<Key,Value>
c.f.
RuntimeEOFException
Thrown by various codecs to indicate EOF without having to clutter the API with throws clauses
RuntimeIOException
Thrown by various IO classes to indicate IOException without having to clutter the API with throws clauses
RuntimeScriptException
Thrown by classes handling script engines like the javascript-based filters for SAM/VCF
SamConstants
A set of constants defined in the sam-spec (https://github.com/samtools/hts-specs) that need to be referenced in code.
SamLocusIterator
Iterator that traverses a SAM File, accumulating information on a per-locus basis.
SamLocusIterator.LocusInfo
The unit of iteration.
SamLocusIterator.RecordAndOffset
Implementation of `AbstractRecordAndOffset` class for `SamLocusIterator`.
SamRecordIntervalIteratorFactory
Create an iterator over a `SamReader` that only returns reads that overlap one of the intervals in an interval list.
SAMRecordPrefetchingIterator
Iterator that uses a dedicated background thread to prefetch SAMRecords, reading ahead by a set number of bases to improve throughput.
SamRecordTrackingBuffer<T extends SamRecordWithOrdinal>
This class stores SAMRecords for return.
SamRecordWithOrdinal
A little class to store the unique index associated with this record.
SequenceUtil
SequenceUtil.SequenceListsDifferException
SnappyLoader
Checks if Snappy is available, and provides methods for wrapping InputStreams and OutputStreams with Snappy if it is.
SolexaQualityConverter
Optimized method for converting Solexa ASCII qualities into Phred scores.
SortingCollection<T>
Collection to which many records can be added.
SortingCollection.Codec<T>
Client must implement this class, which defines the way in which records are written to and read from file.
SortingLongCollection
Accumulate a list of longs that can then be sorted in natural order and iterated over.
StopWatch
Utility to help in performance testing.
StringLineReader
Deprecated.
use `BufferedLineReader.fromString(String)`.
StringUtil
Grab-bag of stateless String-oriented utilities.
TempStreamFactory
Factory class for wrapping input and output streams for temporary files.
TerminatorlessBlockCompressedOutputStream
An extension of `BlockCompressedOutputStream` that doesn't write an empty BGZF block at the end of the stream.
TestUtil
TrimmingUtil
Utility code for performing quality trimming.
Tuple<A,B>
A simple tuple class.
WholeGenomeReferenceSequenceMask
Implementation of ReferenceSequenceMask that indicates that all the loci in the sequence dictionary are of interest.