Class BaseQualityClipReadTransformer
java.lang.Object
org.broadinstitute.hellbender.transformers.BaseQualityClipReadTransformer
- All Implemented Interfaces:
Serializable
,Function<GATKRead,
,GATKRead> UnaryOperator<GATKRead>
,ReadTransformer
,SerializableFunction<GATKRead,
GATKRead>
Clips reads on both ends using base quality scores
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionClip bases on the right end of the read fromint
getLeftClipPoint
(byte[] quals) Returns left clip point or -1 if no clipint
getRightClipPoint
(byte[] quals) Returns right clip point or -1 if no clipMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.broadinstitute.hellbender.transformers.ReadTransformer
andThen, compose
-
Constructor Details
-
BaseQualityClipReadTransformer
public BaseQualityClipReadTransformer(int trim_thresh)
-
-
Method Details
-
apply
Clip bases on the right end of the read from argmax_x{ \sum{i = x + 1}^l (qTrimmingThreshold - qual). Walk through the read from the right end (in machine cycle order) to the left end, calculating the running sum of qTrimmingThreshold - qual. While we do this, we track the maximum value of this sum where the delta > 0. After the loop, clipPoint is either -1 (don't do anything) or the clipping index in the read (from the end). Repeat in reverse to clip the left end of the read. -
getRightClipPoint
public int getRightClipPoint(byte[] quals) Returns right clip point or -1 if no clip -
getLeftClipPoint
public int getLeftClipPoint(byte[] quals) Returns left clip point or -1 if no clip
-