if (!(file.exists() && file.isFile())) {
file = downloadMsDaplChartRef(chartDataRef, file);
}
final Gson gson = new GsonBuilder().serializeSpecialFloatingPointValues().create();
try {
MsDaplChartInfoDTO info = gson.fromJson(new FileReader(file), MsDaplChartInfoDTO.class);
final String sequence = searchResult.getPeptide().getSequence();
float[][] isotopeDistr = webService.isotopeDistribution(info.getMonoMz(), searchResult.getCharge());
final Map<String, Double> modParams = parseModParams(newLinkedList(searchRun.getSearch().getData().getParams().getCometParams().getModificationParams()));
final List<VariableModItem> vmts = getDynamicModificationsForPeptideSequence(searchResult.getSequenceWithModifications(), modParams);
final List<Map<String, ?>> staticMods = new LinkedList<Map<String, ?>>();
return new MsDaplChartItem(scan.getScanNumber(), fileName, info.getPeaks(), staticMods, vmts, info.getMonoMz(), info.getPrecursorMz(),
transform(info.getRtGoals(), RANGE_PAIR_TRANSFORM), transform(info.getMzGoals(), RANGE_PAIR_TRANSFORM), info.getStartMzRange(), info.getEndMzRange(), info.getStartRtRange(), info.getEndRtRange(),
sequence, searchResult.getCharge(), isotopeDistr[1]);
} catch (FileNotFoundException e) {
LOG.error(e);
return null;
}