public class ReadClipper
extends java.lang.Object
Constructor and Description |
---|
ReadClipper(GATKRead read)
Initializes a ReadClipper object.
|
Modifier and Type | Method and Description |
---|---|
void |
addOp(ClippingOp op)
Add clipping operation to the read.
|
protected GATKRead |
clipByReferenceCoordinates(int refStart,
int refStop,
ClippingRepresentation clippingOp)
Generic functionality to clip a read, used internally by hardClipByReferenceCoordinatesLeftTail
and hardClipByReferenceCoordinatesRightTail.
|
static GATKRead |
clipLowQualEnds(GATKRead read,
byte lowQual,
ClippingRepresentation algorithm) |
GATKRead |
clipRead(ClippingRepresentation algorithm)
Clips a read according to ops and the chosen algorithm.
|
java.util.List<ClippingOp> |
getOps()
Check the list of operations set up for this read.
|
GATKRead |
getRead()
The original read.
|
static GATKRead |
hardClipAdaptorSequence(GATKRead read) |
static GATKRead |
hardClipBothEndsByReferenceCoordinates(GATKRead read,
int left,
int right) |
protected GATKRead |
hardClipByReferenceCoordinates(int refStart,
int refStop) |
static GATKRead |
hardClipByReferenceCoordinatesLeftTail(GATKRead read,
int refStop) |
static GATKRead |
hardClipByReferenceCoordinatesRightTail(GATKRead read,
int refStart) |
static GATKRead |
hardClipLowQualEnds(GATKRead read,
byte lowQual) |
static GATKRead |
hardClipSoftClippedBases(GATKRead read) |
static GATKRead |
hardClipToRegion(GATKRead read,
int refStart,
int refStop)
Hard clip the read to the variable region (from refStart to refStop)
|
static GATKRead |
revertSoftClippedBases(GATKRead read)
Reverts ALL soft-clipped bases
|
static GATKRead |
softClipBothEndsByReferenceCoordinates(GATKRead read,
int left,
int right) |
static GATKRead |
softClipByReadCoordinates(GATKRead read,
int start,
int stop) |
protected GATKRead |
softClipByReferenceCoordinates(int refStart,
int refStop)
Generic functionality to soft clip a read (is analogous to hardClipByReferenceCoordinates())
Note, it REQUIRES you to give the directionality of your soft clip (i.e.
|
static GATKRead |
softClipToRegionIncludingClippedBases(GATKRead read,
int refStart,
int refStop)
Soft clip the read to the variable region (from refStart to refStop) processing also the clipped bases
|
boolean |
wasClipped()
Check whether or not this read has been clipped.
|
public ReadClipper(GATKRead read)
read
- the read to clippublic void addOp(ClippingOp op)
op
- a ClippingOp object describing the area you want to clip.public java.util.List<ClippingOp> getOps()
public boolean wasClipped()
public GATKRead getRead()
public GATKRead clipRead(ClippingRepresentation algorithm)
algorithm
- What mode of clipping do you want to apply for the stacked operations.public static GATKRead hardClipByReferenceCoordinatesLeftTail(GATKRead read, int refStop)
public static GATKRead hardClipByReferenceCoordinatesRightTail(GATKRead read, int refStart)
public static GATKRead hardClipBothEndsByReferenceCoordinates(GATKRead read, int left, int right)
public static GATKRead clipLowQualEnds(GATKRead read, byte lowQual, ClippingRepresentation algorithm)
public static GATKRead hardClipToRegion(GATKRead read, int refStart, int refStop)
read
- the read to be clippedrefStart
- the beginning of the variant region (inclusive)refStop
- the end of the variant region (inclusive)public static GATKRead revertSoftClippedBases(GATKRead read)
read
- the readprotected GATKRead hardClipByReferenceCoordinates(int refStart, int refStop)
protected GATKRead clipByReferenceCoordinates(int refStart, int refStop, ClippingRepresentation clippingOp)
refStart
- first base to clip (inclusive)refStop
- last base to clip (inclusive)clippingOp
- clipping operation to be performedpublic static GATKRead softClipToRegionIncludingClippedBases(GATKRead read, int refStart, int refStop)
read
- the read to be clippedrefStart
- the beginning of the variant region (inclusive)refStop
- the end of the variant region (inclusive)public static GATKRead softClipBothEndsByReferenceCoordinates(GATKRead read, int left, int right)
protected GATKRead softClipByReferenceCoordinates(int refStart, int refStop)
refStart
- first base to clip (inclusive)refStop
- last base to clip (inclusive)