Failed to commit changes to the GATKReport required for more easy access when using the files as data sources (read: histograms) for walkers
This commit is contained in:
parent
1b47dcb1b5
commit
faff6e4019
|
|
@ -24,12 +24,14 @@
|
||||||
|
|
||||||
package org.broadinstitute.sting.gatk.report;
|
package org.broadinstitute.sting.gatk.report;
|
||||||
|
|
||||||
|
import org.broadinstitute.sting.utils.collections.Pair;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tracks a linked list of GATKReportColumn in order by name.
|
* Tracks a linked list of GATKReportColumn in order by name.
|
||||||
*/
|
*/
|
||||||
public class GATKReportColumns extends LinkedHashMap<String, GATKReportColumn> {
|
public class GATKReportColumns extends LinkedHashMap<String, GATKReportColumn> implements Iterable<GATKReportColumn> {
|
||||||
private List<String> columnNames = new ArrayList<String>();
|
private List<String> columnNames = new ArrayList<String>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -52,4 +54,14 @@ public class GATKReportColumns extends LinkedHashMap<String, GATKReportColumn> {
|
||||||
columnNames.add(key);
|
columnNames.add(key);
|
||||||
return super.put(key, value);
|
return super.put(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Iterator<GATKReportColumn> iterator() {
|
||||||
|
return new Iterator<GATKReportColumn>() {
|
||||||
|
int offset = 0;
|
||||||
|
public boolean hasNext() { return offset < columnNames.size() ; }
|
||||||
|
public GATKReportColumn next() { return getByIndex(offset++); }
|
||||||
|
public void remove() { throw new UnsupportedOperationException("Cannot remove from a GATKReportColumn iterator"); }
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -286,6 +286,10 @@ public class GATKReportTable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean containsKey(Object primaryKey) {
|
||||||
|
return primaryKeyColumn.contains(primaryKey);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value for a given position in the table
|
* Set the value for a given position in the table
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue