public class OpticalDuplicateFinder extends ReadNameParser
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BIG_DUPLICATE_SET_SIZE |
static int |
DEFAULT_OPTICAL_DUPLICATE_DISTANCE |
int |
opticalDuplicatePixelDistance |
DEFAULT_READ_NAME_REGEX
Constructor and Description |
---|
OpticalDuplicateFinder()
Uses the default duplicate distance and the default read name regex
ReadNameParser.DEFAULT_READ_NAME_REGEX . |
OpticalDuplicateFinder(java.lang.String readNameRegex,
int opticalDuplicatePixelDistance,
htsjdk.samtools.util.Log log) |
Modifier and Type | Method and Description |
---|---|
boolean[] |
findOpticalDuplicates(java.util.List<? extends PhysicalLocation> list,
PhysicalLocation keeper)
Finds which reads within the list of duplicates that are likely to be optical/co-localized duplicates of
one another.
|
void |
setBigDuplicateSetSize(int bigDuplicateSetSize)
Sets the size of a set that is big enough to log progress about.
|
addLocationInformation, getLastThreeFields, rapidParseInt
public int opticalDuplicatePixelDistance
public static final int DEFAULT_OPTICAL_DUPLICATE_DISTANCE
public static final int DEFAULT_BIG_DUPLICATE_SET_SIZE
public OpticalDuplicateFinder()
ReadNameParser.DEFAULT_READ_NAME_REGEX
.public OpticalDuplicateFinder(java.lang.String readNameRegex, int opticalDuplicatePixelDistance, htsjdk.samtools.util.Log log)
readNameRegex
- see ReadNameParser.DEFAULT_READ_NAME_REGEX
.opticalDuplicatePixelDistance
- the optical duplicate pixel distancelog
- the log to which to write messages.public void setBigDuplicateSetSize(int bigDuplicateSetSize)
bigDuplicateSetSize
- the size of a set that is big enough to log progress aboutpublic boolean[] findOpticalDuplicates(java.util.List<? extends PhysicalLocation> list, PhysicalLocation keeper)
list
- a list of reads that are determined to be duplicates of one anotherkeeper
- a single PhysicalLocation that is the one being kept as non-duplicate, and thus should never be
annotated as an optical duplicate. May in some cases be null, or a PhysicalLocation not
contained within the list!