String chr = roi.getChr();
int start = roi.getStart();
int end = roi.getEnd();
String frameName = frame != null ? frame.getName() : null;
Track lastTrack = null;
int count = 0;
for (int ii = 0; ii < tracks.size(); ii++) {
Track track = tracks.get(ii);
if (track.isRegionScoreType(type)) {
String name = track.getName().toLowerCase();
if (name.contains("reference")
|| name.contains("refseq")) {
continue;
}
count++;
if (lastTrack == null) {
lastTrack = track;
continue;
}
// Test sort order -- by default tracks should be sorted in descending value
float s2 = track.getRegionScore(chr, start, end, zoom, type, frameName);
float s1 = lastTrack.getRegionScore(chr, start, end, zoom, type, frameName);
assertTrue("Track named " + track.getName() + ", " + s2 + " and " + lastTrack.getName() + ", " + s1 + " out of order type " + type, s2 <= s1);
lastTrack = track;
}
}