Add some todos for future optimization to LIBS
This commit is contained in:
parent
e88dae2758
commit
f204908a94
|
|
@ -84,6 +84,7 @@ class ReadStateManager {
|
||||||
* @return Iterator over the reads associated with that sample.
|
* @return Iterator over the reads associated with that sample.
|
||||||
*/
|
*/
|
||||||
public Iterator<AlignmentStateMachine> iterator(final String sample) {
|
public Iterator<AlignmentStateMachine> iterator(final String sample) {
|
||||||
|
// TODO -- why is this wrapped?
|
||||||
return new Iterator<AlignmentStateMachine>() {
|
return new Iterator<AlignmentStateMachine>() {
|
||||||
private Iterator<AlignmentStateMachine> wrappedIterator = readStatesBySample.get(sample).iterator();
|
private Iterator<AlignmentStateMachine> wrappedIterator = readStatesBySample.get(sample).iterator();
|
||||||
|
|
||||||
|
|
@ -138,6 +139,18 @@ class ReadStateManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
// fast testing of position
|
// fast testing of position
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO -- this function needs to be optimized
|
||||||
|
*
|
||||||
|
* Notes:
|
||||||
|
* -- the only place where it's called is in a block where we know isEmpty is false
|
||||||
|
* -- getFirst() is quite expensive, and it seems that we could cache this value in the outer
|
||||||
|
* block, and then pass this in as an argument
|
||||||
|
*
|
||||||
|
* @param read
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
private boolean readIsPastCurrentPosition(GATKSAMRecord read) {
|
private boolean readIsPastCurrentPosition(GATKSAMRecord read) {
|
||||||
if (isEmpty())
|
if (isEmpty())
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue