Package picard.sam.markduplicates.util
Class MemoryBasedReadEndsForMarkDuplicatesMap
java.lang.Object
picard.sam.markduplicates.util.MemoryBasedReadEndsForMarkDuplicatesMap
- All Implemented Interfaces:
ReadEndsForMarkDuplicatesMap
public class MemoryBasedReadEndsForMarkDuplicatesMap
extends Object
implements ReadEndsForMarkDuplicatesMap
Map from String to ReadEnds object. Memory-based implementation. Used for MarkDuplicates.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
put
(int mateSequenceIndex, String key, ReadEndsForMarkDuplicates readEnds) Store the element in the map with the given key.Remove element with given key from the map.int
size()
int
-
Constructor Details
-
MemoryBasedReadEndsForMarkDuplicatesMap
public MemoryBasedReadEndsForMarkDuplicatesMap()
-
-
Method Details
-
remove
Description copied from interface:ReadEndsForMarkDuplicatesMap
Remove element with given key from the map. Because an implementation may be disk-based, the object returned may not be the same object that was put into the map- Specified by:
remove
in interfaceReadEndsForMarkDuplicatesMap
- Parameters:
mateSequenceIndex
- must agree with the value used when the object was put into the mapkey
- typically, concatenation of read group ID and read name- Returns:
- null if the key is not found, otherwise the object removed.
-
put
Description copied from interface:ReadEndsForMarkDuplicatesMap
Store the element in the map with the given key. It is assumed that the element is not already present in the map.- Specified by:
put
in interfaceReadEndsForMarkDuplicatesMap
- Parameters:
mateSequenceIndex
- use to optimize storage & retrieval. The same value must be used when trying to remove this element. It is not valid to store the same key with two different mateSequenceIndexes.key
- typically, concatenation of read group ID and read namereadEnds
- the object to be stored
-
size
public int size()- Specified by:
size
in interfaceReadEndsForMarkDuplicatesMap
- Returns:
- number of elements stored in map
-
sizeInRam
public int sizeInRam()- Specified by:
sizeInRam
in interfaceReadEndsForMarkDuplicatesMap
- Returns:
- number of elements stored in RAM. Always <= size()
-