public class DuplicateSet extends Object
Constructor and Description |
---|
DuplicateSet()
Sets the duplicate flag by default
|
DuplicateSet(boolean setDuplicateFlag) |
DuplicateSet(boolean setDuplicateFlag,
SAMRecordDuplicateComparator comparator) |
DuplicateSet(SAMRecordDuplicateComparator comparator) |
Modifier and Type | Method and Description |
---|---|
int |
add(SAMRecord record)
Adds a record to the set and returns zero if either the set is empty, or it is a duplicate of the records already in the set.
|
List<SAMRecord> |
getRecords()
Gets the list of records from this set.
|
List<SAMRecord> |
getRecords(boolean sort)
Gets the list of records from this set.
|
SAMRecord |
getRepresentative()
Gets the representative record according to the duplicate comparator.
|
boolean |
isEmpty() |
int |
numDuplicates()
Returns the number of duplicates in this set, including the representative record.
|
void |
setDuplicateFlag(boolean setDuplicateFlag)
Controls if we should update the duplicate flag of the records in this set.
|
int |
size()
Returns the number of records in this set.
|
public DuplicateSet()
public DuplicateSet(boolean setDuplicateFlag)
public DuplicateSet(SAMRecordDuplicateComparator comparator)
public DuplicateSet(boolean setDuplicateFlag, SAMRecordDuplicateComparator comparator)
public int add(SAMRecord record)
record
- the record to add.public List<SAMRecord> getRecords(boolean sort)
sort
- true if we want the records in the duplicate set sorted by duplicate order, false if we do not care about the order.public SAMRecord getRepresentative()
public int size()
public int numDuplicates()
public boolean isEmpty()
public void setDuplicateFlag(boolean setDuplicateFlag)