}
public List<LocusScore> getSummaryScoresForRange(String chr, int startLocation, int endLocation, int zoom) {
Chromosome chromosome = genome.getChromosome(chr);
String tmp = chrNameMap.get(chr);
String querySeq = tmp == null ? chr : tmp;
// If we are in gene list view bypass caching.
if (Globals.isHeadless() || FrameManager.isGeneListMode() || FrameManager.isExomeMode()) {
return getSummaryScores(querySeq, startLocation, endLocation, zoom);
} else {
ArrayList scores = new ArrayList();
// TODO -- this whole section could be computed once and stored, it is only a function of the genome, chr, and zoom level.
double tileWidth = 0;
if (chr.equals(Globals.CHR_ALL)) {
tileWidth = (genome.getNominalLength() / 1000.0);
} else {
if (chromosome != null) {
tileWidth = chromosome.getLength() / ((int) Math.pow(2.0, zoom));
}
}
if (tileWidth == 0) {
return null;
}