* Also separate data into chromosomes
* @param valueList
* @param genome
*/
private DownsampledDoubleArrayList sampleValues(List<? extends LocusScore> valueList, Genome genome){
DownsampledDoubleArrayList sampledData = new DownsampledDoubleArrayList(5000, 10000);
for (LocusScore val : valueList) {
String chr = val.getChr();
List<LocusScore> chrValues = values.get(chr);
if (chrValues == null) {
chrValues = new ArrayList<LocusScore>();
values.put(chr, chrValues);
if (genome != null) {
String alias = genome.getChromosomeAlias(chr);
chrAliasMap.put(alias, chr);
}
}
sampledData.add(val.getScore());
chrValues.add(val);
}
return sampledData;
}