# Package htsjdk.samtools

package htsjdk.samtools

Related Packages
Package
Description
htsjdk.samtools.apps
htsjdk.samtools.cram
htsjdk.samtools.example
htsjdk.samtools.fastq
htsjdk.samtools.filter
htsjdk.samtools.liftover
htsjdk.samtools.metrics
htsjdk.samtools.reference
htsjdk.samtools.seekablestream
htsjdk.samtools.sra
htsjdk.samtools.util
Class
Description
AbstractBAMFileIndex
Provides basic, generic capabilities to be used reading BAM index files.
AbstractSAMHeaderRecord
Base class for the various concrete records in a SAM header, providing uniform access to the attributes.
AlignmentBlock
Represents the contiguous alignment of a subset of read bases to a reference sequence.
BamFileIoUtils
BAMFileReader
Class for reading and querying BAM files.
BAMFileSpan
An ordered list of chunks, capable of representing a set of discontiguous regions in the BAM file.
BAMFileWriter
Concrete implementation of SAMFileWriter for writing gzipped BAM files.
BAMIndex
A basic interface for querying BAM indices.
BAMIndexer
Class for both constructing BAM index content and writing it out.
BAMIndexMerger
Merges BAM index files for (headerless) parts of a BAM file into a single index file.
BAMIndexMetaData
Metadata about the bam index contained within the bam index.
BamIndexValidator
Class to validate (at two different levels of thoroughness) the index for a BAM file.
BamIndexValidator.IndexValidationStringency
BAMQueryMultipleIntervalsIteratorFilter
Filters out records that do not match any of the given intervals and query type.
BAMRecord
Wrapper class for binary BAM records.
BAMRecordCodec
Class for translating between in-memory and disk representation of BAMRecord.
BAMSBIIndexer
Writes SBI files for BAM files, as understood by `SBIIndex`.
BAMStartingAtIteratorFilter
A decorating iterator that filters out records that do not match the given reference and start position.
BAMStreamWriter
Class for writing SAMRecords in BAM format to an output stream.
Bin
An individual bin in a BAM file.
BinaryTagCodec
Converter between disk and in-memory representation of a SAMRecord tag.
BinList
Provides a list of all bins which could exist in the BAM file.
BinningIndexBuilder
Builder for a BinningIndexContent object.
BinningIndexBuilder.FeatureToBeIndexed
coordinates are 1-based, inclusive
BinningIndexContent
In-memory representation of the binning index for a single reference.
BinningIndexContent.BinList
This class is used to encapsulate the list of Bins store in the BAMIndexContent While it is currently represented as an array, we may decide to change it to an ArrayList or other structure
BinWithOffset
An individual bin of a CSI index for BAM files.
BrowseableBAMIndex
An index interface with additional functionality for querying and inspecting the structure of a BAM index.
Chunk
A [start,stop) file pointer pairing into the BAM file, stored as a BAM file index.
Cigar
A list of CigarElements, which describes how a read aligns with the reference.
CigarElement
One component of a cigar string.
CigarOperator
The operators that can appear in a cigar string, and information about their disk representations.
CoordinateSortedPairInfoMap<KEY,REC>
Holds info about a mate pair for use when processing a coordinate sorted file.
CoordinateSortedPairInfoMap.Codec<KEY,REC>
Client must implement this class, which defines the way in which records are written to and read from file.
CRAMBAIIndexer
Class for both constructing BAM index content and writing it out.
CRAMContainerStreamWriter
Class for writing SAMRecords into a series of CRAM containers on an output stream, with an optional index.
CRAMCRAIIndexer
Indexer for creating/reading/writing a CRAIIndex for a CRAM file/stream.
CRAMFileReader
`BAMFileReader` analogue for CRAM files.
CRAMFileWriter
CRAMIndexer
Interface for indexing CRAM.
CRAMIterator
CSIIndex
Implementation of the CSI index for BAM files.
CustomReaderFactory
Factory for creating custom readers for accessing API based resources, e.g.
CustomReaderFactory.ICustomReaderFactory
Interface to be implemented by custom factory classes that register themselves with this factory and are loaded dynamically.
Defaults
Embodies defaults for global values that affect how the SAM JDK operates.
DefaultSAMRecordFactory
Default factory for creating SAM and BAM records used by the `SamReader` classes.
DiskBasedBAMFileIndex
A class for reading BAM file indices, hitting the disk once per query.
DownsamplingIterator
Abstract base class for all DownsamplingIterators that provides a uniform interface for recording and reporting statistics bout how many records have been kept and discarded.
DownsamplingIteratorFactory
A factory for creating DownsamplingIterators that uses a number of different strategies to achieve downsampling while meeting various criteria.
DownsamplingIteratorFactory.Strategy
Describes the available downsampling strategies.
DuplicateScoringStrategy
This class helps us compute and compare duplicate scores, which are used for selecting the non-duplicate during duplicate marking (see MarkDuplicates).
DuplicateScoringStrategy.ScoringStrategy
DuplicateSet
Stores a set of records that are duplicates of each other.
DuplicateSetIterator
An iterator of sets of duplicates.
FileTruncatedException
Thrown when it is possible to detect that a SAM or BAM file is truncated.
GenomicIndexUtil
Constants and methods used by BAM and Tribble indices
HtsgetBAMFileReader
Class for reading and querying BAM files from an htsget source
HtsgetBAMFileReader.BAMQueryMultipleIntervalsIteratorFilter
Filters out records that do not match any of the given intervals and query type.
IndexMerger<T>
Merges index files for (headerless) parts of a partitioned main file into a single index file.
LinearIndex
The linear index associated with a given reference in a BAM index.
MergingSamRecordIterator
Provides an iterator interface for merging multiple underlying iterators into a single iterable stream.
NotPrimarySkippingIterator
Deprecated.
use `SecondaryAlignmentSkippingIterator` instead.
QueryInterval
Interval relative to a reference, for querying a BAM file.
ReservedTagConstants
Constants for tags used in our SAM/BAM files
SAMBinaryTagAndUnsignedArrayValue
Simple extension to SAMBinaryTagAndValue in order to distinguish unsigned array values, because signedness cannot be determined by introspection of value.
SAMBinaryTagAndValue
Holds a SAMRecord attribute and the tagname (in binary form) for that attribute.
SAMException
SAMFileHeader
Header information from a SAM or BAM file.
SAMFileHeader.GroupOrder
SAMFileHeader.PgIdGenerator
Little class to generate program group IDs
SAMFileHeader.SortOrder
Ways in which a SAM or BAM may be sorted.
SamFileHeaderMerger
Merges SAMFileHeaders that have the same sequences into a single merged header object while providing read group translation for cases where read groups clash across input headers.
SamFiles
SAMFileSource
Represents the origin of a SAM record.
SAMFileSpan
A interface representing a collection of (possibly) discontinuous segments in the BAM file, possibly representing the results of an index query.
SamFileValidator
Validates SAM files as follows: checks sam file header for sequence dictionary checks sam file header for read groups for each sam record reports error detected by SAMRecord.isValid() validates NM (nucleotide differences) exists and matches reality validates mate fields agree with data in the mate record
SamFileValidator.ValidationMetrics
SAMFileWriter
Interface for SAMText and BAM file writers.
SAMFileWriterFactory
Create a writer for writing SAM, BAM, or CRAM files.
SAMFileWriterImpl
Base class for implementing SAM writer with any underlying format.
SAMFlag
SAM flags as enum, to be used in GUI, menu, etc...
SamFlagField
This determines how flag fields are represented in the SAM file.
SAMFormatException
Thrown when a SAM file being read or decoded (text or binary) looks bad.
SAMHeaderRecordComparator<T extends AbstractSAMHeaderRecord>
Provides ordering based on SAM header records' attribute values.
SamIndexes
A helper class to read BAI and CRAI indexes.
SamInputResource
Describes a SAM-like resource, including its data (where the records are), and optionally an index.
SAMLineParser
This class enables creation of a SAMRecord object from a String in SAM text format.
SamPairUtil
Utility methods for pairs of SAMRecords
SamPairUtil.PairOrientation
The possible orientations of paired reads.
SamPairUtil.SetMateInfoIterator
A class to iterate through SAMRecords and set mate information on the given records, and optionally set the mate cigar tag (true by default).
SAMProgramRecord
In-memory representation of @PG SAM header record.
SamReader
Describes functionality for objects that produce `SAMRecord`s and associated information.
SamReader.AssertingIterator
SamReader.Indexing
Facet for index-related operations.
SamReader.PrimitiveSamReader
The minimal subset of functionality needed for a `SAMRecord` data source.
SamReader.PrimitiveSamReaderToSamReaderAdapter
Decorator for a `SamReader.PrimitiveSamReader` that expands its functionality into a `SamReader`, given the backing `SamInputResource`.
SamReader.ReaderImplementation
Internal interface for SAM/BAM/CRAM file reader implementations, as distinct from non-file-based readers.
SamReader.Type
Describes a type of SAM file.
SamReaderFactory
Describes the functionality for producing `SamReader`, and offers a handful of static generators.
SamReaderFactory.Option
A collection of binary `SamReaderFactory` options.
SAMReadGroupRecord
Header information about a read group.
SAMReadGroupRecord.PlatformValue
SAMRecord
Java binding for a SAM file record.
SAMRecord.SAMTagAndValue
Tag name and value of an attribute, for getAttributes() method.
SAMRecordComparator
Interface for comparators that define the various SAM sort orders.
SAMRecordCoordinateComparator
Comparator for sorting SAMRecords by coordinate.
SAMRecordDuplicateComparator
Compares records based on if they should be considered PCR Duplicates (see MarkDuplicates).
SAMRecordFactory
Factory interface which allows plugging in of different classes for generating instances of SAMRecord and BAMRecord when reading from SAM/BAM files.
SAMRecordIterator
A general interface that adds functionality to a CloseableIterator of SAMRecords.
SAMRecordQueryHashComparator
SAMRecord comparator that provides an ordering based on a hash of the queryname.
SAMRecordQueryNameComparator
Comparator for "queryname" ordering of SAMRecords.
SAMRecordSetBuilder
Factory class for creating SAMRecords for testing purposes.
SAMSequenceDictionary
Collection of SAMSequenceRecords.
SAMSequenceDictionaryCodec
"On the fly" codec SAMSequenceDictionaryCodec.
SAMSequenceRecord
Header information about a reference sequence.
SAMSortOrderChecker
Encapsulates simple check for SAMRecord order.
SamStreams
Utilities related to processing of `InputStream`s encoding SAM data
SAMTag
The standard tags for a SAM record that are defined in the SAM spec.
SAMTagUtil
Deprecated.
as of 11/2018, the functions in this class have been absorbed by the `SAMTag` enum.
SAMTestUtil
Misc methods for SAM-related unit tests.
SAMTestUtil.SanityCheckFailedException
Indicates that a required sanity-check condition was not met.
SAMTextHeaderCodec
Parser for a SAM text header, and a generator of SAM text header.
SAMTextWriter
Writer for text-format SAM files.
SAMUtils
Utilty methods.
SAMValidationError
Class that encapsulates a validation error message as well as a type code so that errors can be aggregated by type.
SAMValidationError.Severity
SAMValidationError.Type
SBIIndex
SBI is an index into BGZF-compressed data files, which has an entry for the file position of the start of every nth record.
SBIIndex.Header
SBIIndexMerger
Merges SBI files for parts of a file that have been concatenated.
SBIIndexWriter
Writes SBI files as understood by `SBIIndex`.
SecondaryAlignmentSkippingIterator
Wrapper around SAMRecord iterator that skips over secondary elements.
SecondaryOrSupplementarySkippingIterator
Wrapper around SAMRecord iterator that skips over secondary and supplementary elements.
SQTagUtil
Deprecated.
since 11/2018.
SQTagUtil.SQBase
The ordinals of these are stored in the high-order 2 bits of each byte of the SQ tag.
SRAFileReader
SRAIndex
Emulates BAM index so that we can request chunks of records from SRAFileReader Here is how it works: SRA allows reading of alignments by Reference position fast, so we divide our "file" range for alignments as a length of all references.
SRAIterator
SRA iterator which returns SAMRecords for requested list of chunks
SRAIterator.RecordRangeInfo
Describes record ranges info needed for emulating BAM index
TagValueAndUnsignedArrayFlag
CVO to use as a method return value.
TextCigarCodec
Convert between String and Cigar class representations of CIGAR.
TextTagCodec
Converter between SAM text representation of a tag, and in-memory Object representation.
ValidationStringency
How strict to be when reading a SAM or BAM, beyond bare minimum validation.