Search in sources :

Example 1 with FrequencyByRaceComparator

use of org.dash.valid.race.FrequencyByRaceComparator in project ImmunogeneticDataTools by nmdp-bioinformatics.

the class HLAFrequenciesLoader method loadFrequencyAndRank.

/**
 * @param row
 * @param frequenciesByRace
 * @param cell
 * @param idx
 */
private static List<FrequencyByRace> loadFrequencyAndRank(Row row, Cell cell, List<FrequencyByRace> frequenciesByRace, List<String> raceHeaders) {
    Double freq = cell.getNumericCellValue();
    if (freq != 0) {
        FrequencyByRace frequencyByRace = new FrequencyByRace(freq, ((Double) row.getCell(cell.getColumnIndex() + 1).getNumericCellValue()).toString(), raceHeaders.get(cell.getColumnIndex()));
        frequenciesByRace.add(frequencyByRace);
    }
    Collections.sort(frequenciesByRace, new FrequencyByRaceComparator());
    return frequenciesByRace;
}
Also used : FrequencyByRaceComparator(org.dash.valid.race.FrequencyByRaceComparator) FrequencyByRace(org.dash.valid.race.FrequencyByRace)

Aggregations

FrequencyByRace (org.dash.valid.race.FrequencyByRace)1 FrequencyByRaceComparator (org.dash.valid.race.FrequencyByRaceComparator)1