calculateWholeGenomeScores(genome);
}
private void calculateWholeGenomeScores(Genome genome){
GenomeSummaryData genomeSummaryData = new GenomeSummaryData(genome, new String[]{"*"});
for (Map.Entry<String, List<LocusScore>> entry : values.entrySet()) {
String chr = entry.getKey();
List<LocusScore> scores = entry.getValue();
int[] positions = new int[scores.size()];
float[] values = new float[scores.size()];
for (int i = 0; i < scores.size(); i++) {
LocusScore s = scores.get(i);
positions[i] = s.getStart();
values[i] = s.getScore();
}
Map<String, float[]> tmp = new HashMap<String, float[]>(1);
tmp.put("*", values);
genomeSummaryData.addData(chr, positions, tmp);
}
int[] positions = genomeSummaryData.getLocations();
float[] values = genomeSummaryData.getData("*");
wholeGenomeScores = new ArrayList<LocusScore>(positions.length);
for (int i = 0; i < positions.length; i++) {
wholeGenomeScores.add(new BasicScore(positions[i], positions[i] + 1, values[i]));
}