StringBuffer buf = new StringBuffer();
buf.append(getName());
buf.append("<br>");
if (showPeaks) {
List<Peak> scores = getFilteredPeaks(chr);
LocusScore score = getLocusScoreAt(scores, position, frame);
if (score != null) {
foundValue = true;
buf.append(score.getValueString(position, getWindowFunction()));
if (showSignals) {
buf.append("<br>");
}
}
}
final WrappedDataSource signalSource = getSignalSource();
if (showSignals && signalSource != null) {
List<LocusScore> scores = signalSource.getSummaryScoresForRange(chr, (int) frame.getOrigin(), (int) frame.getEnd(), frame.getZoom());
LocusScore score = getLocusScoreAt(scores, position, frame);
if (score != null) {
foundValue = true;
buf.append("Score = " + score.getScore());
}
}
return foundValue ? buf.toString() : null;
} catch (IOException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.