Package htsjdk.samtools
Class DuplicateScoringStrategy
java.lang.Object
htsjdk.samtools.DuplicateScoringStrategy
This class helps us compute and compare duplicate scores, which are used for selecting the non-duplicate
during duplicate marking (see MarkDuplicates).
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
compare
(SAMRecord rec1, SAMRecord rec2, DuplicateScoringStrategy.ScoringStrategy scoringStrategy) Compare two records based on their duplicate scores.static int
compare
(SAMRecord rec1, SAMRecord rec2, DuplicateScoringStrategy.ScoringStrategy scoringStrategy, boolean assumeMateCigar) Compare two records based on their duplicate scores.static short
computeDuplicateScore
(SAMRecord record, DuplicateScoringStrategy.ScoringStrategy scoringStrategy) Returns the duplicate score computed from the given fragment.static short
computeDuplicateScore
(SAMRecord record, DuplicateScoringStrategy.ScoringStrategy scoringStrategy, boolean assumeMateCigar) Returns the duplicate score computed from the given fragment.
-
Constructor Details
-
DuplicateScoringStrategy
public DuplicateScoringStrategy()
-
-
Method Details
-
computeDuplicateScore
public static short computeDuplicateScore(SAMRecord record, DuplicateScoringStrategy.ScoringStrategy scoringStrategy) Returns the duplicate score computed from the given fragment. -
computeDuplicateScore
public static short computeDuplicateScore(SAMRecord record, DuplicateScoringStrategy.ScoringStrategy scoringStrategy, boolean assumeMateCigar) Returns the duplicate score computed from the given fragment. value should be capped by Short.MAX_VALUE/2 since the score from two reads will be added and an overflow will be If true is given to assumeMateCigar, then any score that can use the mate cigar to compute the mate's score will return the score computed on both ends. -
compare
public static int compare(SAMRecord rec1, SAMRecord rec2, DuplicateScoringStrategy.ScoringStrategy scoringStrategy, boolean assumeMateCigar) Compare two records based on their duplicate scores. If the scores are equal, we break ties based on mapping quality (added to the mate's mapping quality if paired and mapped), then library/read name. If true is given to assumeMateCigar, then any score that can use the mate cigar to to compute the mate's score will return the score computed on both ends. We allow different scoring strategies. We return <0 if rec1 has a better strategy than rec2. -
compare
public static int compare(SAMRecord rec1, SAMRecord rec2, DuplicateScoringStrategy.ScoringStrategy scoringStrategy) Compare two records based on their duplicate scores. The duplicate scores for each record is assumed to be pre-computed by computeDuplicateScore and stored in the "DS" tag. If the scores are equal, we break ties based on mapping quality (added to the mate's mapping quality if paired and mapped), then library/read name. We allow different scoring strategies. We return <0 if rec1 has a better strategy than rec2.
-