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 TypeMethodDescriptionvoidput(int mateSequenceIndex, String key, ReadEndsForMarkDuplicates readEnds) Store the element in the map with the given key.Remove element with given key from the map.intsize()int
-
Constructor Details
-
MemoryBasedReadEndsForMarkDuplicatesMap
public MemoryBasedReadEndsForMarkDuplicatesMap()
-
-
Method Details
-
remove
Description copied from interface:ReadEndsForMarkDuplicatesMapRemove 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:
removein 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:ReadEndsForMarkDuplicatesMapStore the element in the map with the given key. It is assumed that the element is not already present in the map.- Specified by:
putin interfaceReadEndsForMarkDuplicatesMap- Parameters:
mateSequenceIndex- use to optimize storage invalid input: '&' 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:
sizein interfaceReadEndsForMarkDuplicatesMap- Returns:
- number of elements stored in map
-
sizeInRam
public int sizeInRam()- Specified by:
sizeInRamin interfaceReadEndsForMarkDuplicatesMap- Returns:
- number of elements stored in RAM. Always invalid input: '<'= size()
-