Package picard.sam.SamErrorMetric
Class ReadBaseStratification
java.lang.Object
picard.sam.SamErrorMetric.ReadBaseStratification
Classes, methods, and enums that deal with the stratification of read bases and reference information.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Stratifies into quintiles of read cycle.static class
Stratifies according to the number of matching cigar operators (from CIGAR string) that the read has.static class
A CollectionStratifier is a stratifier that uses a collection of stratifiers to inform the stratification.static enum
Types of consensus reads as determined by the number of duplicates used from first and second strands.static class
Stratify by tags used during duplex and single index consensus calling.static enum
An enum designed to hold a binned version of any probability-like number (between 0 and 1) in quintilesstatic class
Stratifies base into their read's tile which is parsed from the read-name.static class
Stratifies base into their read's X coordinate which is parsed from the read-name.static class
Stratifies base into their read's Y coordinate which is parsed from the read-name.static class
A stratifier that uses GC (of the read) to stratify.static class
Stratifies according to the length of an insertion or deletion.static class
Stratifies according to the number of indel bases (from CIGAR string) that the read has.static enum
static class
Stratify bases according to the type of Homopolymer that they belong to (repeating element, final reference base and whether the length is "long" or not).static class
Stratifies according to the overall mismatches (fromSAMTag.NM
) that the read has against the reference, NOT including the current base.static class
Stratify by the number of Ns found in the read.static enum
An enum for holding a reads read-pair's Orientation (i.e.static class
ReadBaseStratification.PairStratifier<T extends Comparable<T>,
R extends Comparable<R>> A PairStratifier is a stratifier that uses two other stratifiers to inform the stratification.static enum
An enum to hold information about the "properness" of a read pairstatic enum
An enum for holding the direction for a read (positive strand or negative strandstatic enum
An enum to hold the ordinality of a readstatic interface
The main interface for a stratifier. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ReadBaseStratification.RecordAndOffsetStratifier<Integer>
Get the one-based cycle number of the base, taking the direction of the read into accountstatic final ReadBaseStratification.RecordAndOffsetStratifier<Byte>
Stratifies into the base-quality of the base under considerationstatic final htsjdk.samtools.util.Lazy<ReadBaseStratification.PairStratifier<ReadBaseStratification.LongShortHomopolymer,
Pair<Character, Character>>> Stratifies a base onto the make up (repeating base and following reference base) and length-scale of the homopolymer from whence it came.static final ReadBaseStratification.BinnedReadCycleStratifier
Stratifies into quintiles of read cycle.static final ReadBaseStratification.ConsensusStratifier
Stratify by tags used during duplex and single index consensus calling.static final ReadBaseStratification.RecordAndOffsetStratifier<Character>
Stratifies bases into the current (uppercase) base as it was read from the sequencer (i.e.Stratify by Deletions in the read cigars.static final ReadBaseStratification.FlowCellTileStratifier
Stratifies base into their read's tile which is parsed from the read-name.static final ReadBaseStratification.FlowCellXStratifier
Stratifies base into their read's tile which is parsed from the read-name.static final ReadBaseStratification.FlowCellYStratifier
Stratifies base into their read's tile which is parsed from the read-name.static final ReadBaseStratification.GCContentStratifier
A stratifier that uses GC (of the read) to stratify.static final ReadBaseStratification.RecordAndOffsetStratifier<Integer>
Stratifies a base onto the length of the homopolymer preceding it (in the read direction).static final ReadBaseStratification.PairStratifier<Integer,
Pair<Character, Character>> Stratifies a base onto the make up (repeating base and following reference base) and length of the homopolymer from whence it came.static final ReadBaseStratification.IndelLengthStratifier
Stratifies into the number of bases in an insertionstatic final ReadBaseStratification.IndelsInReadStratifier
Stratify by Indels in the read cigars.Stratify by Insertions in the read cigars.static final ReadBaseStratification.RecordAndOffsetStratifier<Integer>
Stratifies into the read-pairs estimated insert-length, as long as it isn't larger than 10x the length of the readstatic final ReadBaseStratification.RecordAndOffsetStratifier<Integer>
Stratifies into the mapping-quality of the read under considerationstatic final ReadBaseStratification.MismatchesInReadStratifier
Stratifies according to the overall mismatches (from NM) that the read has against the reference, NOT including the current base.static final ReadBaseStratification.RecordAndOffsetStratifier<Character>
Stratifies bases into the following (uppercase) base as it was read from the sequencer (i.e.static final picard.sam.SamErrorMetric.ReadBaseStratification.RecordStratifier<String>
A constant stratifier which places all the reads into a single stratum.static final int
static final ReadBaseStratification.NsInReadStratifier
Stratify by the number of Ns found in the read.static final ReadBaseStratification.RecordAndOffsetStratifier<String>
Stratifies into the one base context of the base, which includes one read-base on each side and the reference base from where the current base is the bases will be reverse-complemented so that the bases are in the original order they were read from the sequencerstatic final ReadBaseStratification.PairStratifier<Character,
Character> Stratifies a base onto the reference base that it covers and the following base, possibly reverse complemented if the read has been reversed by the aligner.static final ReadBaseStratification.PairStratifier<Character,
Character> Stratifies a base onto the reference base that it covers and the preceding base, possibly reverse complemented if the read has been reversed by the aligner.static final ReadBaseStratification.RecordAndOffsetStratifier<Character>
Stratifies bases into the previous (uppercase) base as it was read from the sequencer (i.e.Stratifies bases into their read's Direction (i.e.static final picard.sam.SamErrorMetric.ReadBaseStratification.RecordStratifier<String>
Stratifies to the readgroup id of the read.static final ReadBaseStratification.RecordAndOffsetStratifier<ReadBaseStratification.ReadOrdinality>
Stratifies bases into their read's Ordinality (i.e.static final ReadBaseStratification.RecordAndOffsetStratifier<ReadBaseStratification.PairOrientation>
Stratifies bases into their read-pair's Orientation (i.e.Stratifies bases into their read's Proper-pairednessstatic final ReadBaseStratification.RecordAndOffsetStratifier<Character>
Stratifies a base onto the reference base that it covers, possibly reverse complemented if the read has been reversed by the aligner.static final ReadBaseStratification.RecordAndOffsetStratifier<Integer>
Stratifies into the number of soft-clipped bases that the read has in its alignment, or -1 if not aligned.static final ReadBaseStratification.RecordAndOffsetStratifier<String>
Stratifies into the two base context of the base, which includes two read-bases on each side and the reference base from where the current base is the bases will be reverse-complemented so that the bases are in the original order they were read from the sequencer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic htsjdk.samtools.CigarElement
getIndelElement
(htsjdk.samtools.util.SamLocusIterator.RecordAndOffset recordAndOffset) static <T extends Comparable<T>,
S extends Comparable<S>>
ReadBaseStratification.PairStratifier<T,S> PairStratifierFactory
(ReadBaseStratification.RecordAndOffsetStratifier<T> leftStratifier, ReadBaseStratification.RecordAndOffsetStratifier<S> rightStratifier, String suffix) A factory for generating "pair" stratifier instances from two stratifiers and a stringstatic void
setGcCacheSize
(int gcCacheSize) static void
setLocationBinSize
(int locationBinSize) defaults to 2500static void
setLongHomopolymer
(int longHomopolymer) defaults to 6
-
Field Details
-
currentReadBaseStratifier
public static final ReadBaseStratification.RecordAndOffsetStratifier<Character> currentReadBaseStratifierStratifies bases into the current (uppercase) base as it was read from the sequencer (i.e. complemented if needed) -
previousReadBaseStratifier
public static final ReadBaseStratification.RecordAndOffsetStratifier<Character> previousReadBaseStratifierStratifies bases into the previous (uppercase) base as it was read from the sequencer (i.e. complemented if needed) -
nextReadBaseStratifier
public static final ReadBaseStratification.RecordAndOffsetStratifier<Character> nextReadBaseStratifierStratifies bases into the following (uppercase) base as it was read from the sequencer (i.e. complemented if needed) -
referenceBaseStratifier
public static final ReadBaseStratification.RecordAndOffsetStratifier<Character> referenceBaseStratifierStratifies a base onto the reference base that it covers, possibly reverse complemented if the read has been reversed by the aligner. -
postDiNucleotideStratifier
public static final ReadBaseStratification.PairStratifier<Character,Character> postDiNucleotideStratifierStratifies a base onto the reference base that it covers and the following base, possibly reverse complemented if the read has been reversed by the aligner. -
preDiNucleotideStratifier
public static final ReadBaseStratification.PairStratifier<Character,Character> preDiNucleotideStratifierStratifies a base onto the reference base that it covers and the preceding base, possibly reverse complemented if the read has been reversed by the aligner. -
homoPolymerLengthStratifier
public static final ReadBaseStratification.RecordAndOffsetStratifier<Integer> homoPolymerLengthStratifierStratifies a base onto the length of the homopolymer preceding it (in the read direction). Read direction and only the preceding bases are taken into account (i.e. ignoring reference and current base). -
homopolymerStratifier
public static final ReadBaseStratification.PairStratifier<Integer,Pair<Character, homopolymerStratifierCharacter>> Stratifies a base onto the make up (repeating base and following reference base) and length of the homopolymer from whence it came. Read direction and only the preceding bases are taken into account. -
binnedHomopolymerStratifier
public static final htsjdk.samtools.util.Lazy<ReadBaseStratification.PairStratifier<ReadBaseStratification.LongShortHomopolymer,Pair<Character, binnedHomopolymerStratifierCharacter>>> Stratifies a base onto the make up (repeating base and following reference base) and length-scale of the homopolymer from whence it came. Read direction and only the preceding bases are taken into account.This is done with a Lazy wrapper since it requires access to
LONG_HOMOPOLYMER
which can be set withsetLongHomopolymer(int)
. -
oneBasePaddedContextStratifier
public static final ReadBaseStratification.RecordAndOffsetStratifier<String> oneBasePaddedContextStratifierStratifies into the one base context of the base, which includes one read-base on each side and the reference base from where the current base is the bases will be reverse-complemented so that the bases are in the original order they were read from the sequencer -
twoBasePaddedContextStratifier
public static final ReadBaseStratification.RecordAndOffsetStratifier<String> twoBasePaddedContextStratifierStratifies into the two base context of the base, which includes two read-bases on each side and the reference base from where the current base is the bases will be reverse-complemented so that the bases are in the original order they were read from the sequencer -
nonStratifier
public static final picard.sam.SamErrorMetric.ReadBaseStratification.RecordStratifier<String> nonStratifierA constant stratifier which places all the reads into a single stratum. -
gcContentStratifier
A stratifier that uses GC (of the read) to stratify. Since the reads are expected to be seen over and over again, the GC is cachedStratification happens into (integer) percents.
-
flowCellTileStratifier
Stratifies base into their read's tile which is parsed from the read-name. -
flowCellXStratifier
Stratifies base into their read's tile which is parsed from the read-name. -
flowCellYStratifier
Stratifies base into their read's tile which is parsed from the read-name. -
readgroupStratifier
public static final picard.sam.SamErrorMetric.ReadBaseStratification.RecordStratifier<String> readgroupStratifierStratifies to the readgroup id of the read. -
readOrdinalityStratifier
public static final ReadBaseStratification.RecordAndOffsetStratifier<ReadBaseStratification.ReadOrdinality> readOrdinalityStratifierStratifies bases into their read's Ordinality (i.e. First or Second) -
readPairednessStratifier
public static final ReadBaseStratification.RecordAndOffsetStratifier<ReadBaseStratification.ProperPaired> readPairednessStratifierStratifies bases into their read's Proper-pairedness -
readDirectionStratifier
public static final ReadBaseStratification.RecordAndOffsetStratifier<ReadBaseStratification.ReadDirection> readDirectionStratifierStratifies bases into their read's Direction (i.e. forward or reverse) -
readOrientationStratifier
public static final ReadBaseStratification.RecordAndOffsetStratifier<ReadBaseStratification.PairOrientation> readOrientationStratifierStratifies bases into their read-pair's Orientation (i.e. F1R2, F2R1, F1F2 or R1R2) -
binnedReadCycleStratifier
Stratifies into quintiles of read cycle. -
baseCycleStratifier
Get the one-based cycle number of the base, taking the direction of the read into account -
insertLengthStratifier
public static final ReadBaseStratification.RecordAndOffsetStratifier<Integer> insertLengthStratifierStratifies into the read-pairs estimated insert-length, as long as it isn't larger than 10x the length of the read -
softClipsLengthStratifier
public static final ReadBaseStratification.RecordAndOffsetStratifier<Integer> softClipsLengthStratifierStratifies into the number of soft-clipped bases that the read has in its alignment, or -1 if not aligned. -
baseQualityStratifier
Stratifies into the base-quality of the base under consideration -
mappingQualityStratifier
public static final ReadBaseStratification.RecordAndOffsetStratifier<Integer> mappingQualityStratifierStratifies into the mapping-quality of the read under consideration -
mismatchesInReadStratifier
Stratifies according to the overall mismatches (from NM) that the read has against the reference, NOT including the current base. -
consensusStratifier
Stratify by tags used during duplex and single index consensus calling. -
nsInReadStratifier
Stratify by the number of Ns found in the read. This is particularly useful for data that has been consensus-called (a process that can add 'N' bases when there is no consensus) -
insertionsInReadStratifier
public static final ReadBaseStratification.CigarOperatorsInReadStratifier insertionsInReadStratifierStratify by Insertions in the read cigars. -
deletionsInReadStratifier
Stratify by Deletions in the read cigars. -
indelsInReadStratifier
Stratify by Indels in the read cigars. -
indelLengthStratifier
Stratifies into the number of bases in an insertion -
NOT_ALIGNED_ERROR
public static final int NOT_ALIGNED_ERROR- See Also:
-
-
Constructor Details
-
ReadBaseStratification
public ReadBaseStratification()
-
-
Method Details
-
setGcCacheSize
public static void setGcCacheSize(int gcCacheSize) -
setLongHomopolymer
public static void setLongHomopolymer(int longHomopolymer) defaults to 6 -
setLocationBinSize
public static void setLocationBinSize(int locationBinSize) defaults to 2500 -
PairStratifierFactory
public static <T extends Comparable<T>,S extends Comparable<S>> ReadBaseStratification.PairStratifier<T,S> PairStratifierFactory(ReadBaseStratification.RecordAndOffsetStratifier<T> leftStratifier, ReadBaseStratification.RecordAndOffsetStratifier<S> rightStratifier, String suffix) A factory for generating "pair" stratifier instances from two stratifiers and a string- Type Parameters:
T
- the type of the left StratifierS
- the type of the right Stratifier- Parameters:
leftStratifier
- aReadBaseStratification.RecordAndOffsetStratifier
to userightStratifier
- aReadBaseStratification.RecordAndOffsetStratifier
to usesuffix
- the suffix to use for the new stratifier- Returns:
- an instance of
ReadBaseStratification.PairStratifier
that will stratify according to bothleftStratifier
andrightStratifier
-
getIndelElement
public static htsjdk.samtools.CigarElement getIndelElement(htsjdk.samtools.util.SamLocusIterator.RecordAndOffset recordAndOffset)
-