continue;
} else {
identifier = identifiers[0];
}
NamedFeature gene = FeatureDB.getFeature(identifier.toUpperCase());
if (gene == null) {
log.debug("Unknown identifier: " + identifier);
continue;
}
for (int i = 0; i < nColumns; i++) {
try {
int dataIndex = dataStartColumn + i * skip;
// If we are out of value tokens, or the cell is blank, assign NAN to the cell.
if ((dataIndex >= nTokens) || (tokens[dataIndex].length() == 0)) {
values[i] = Float.NaN;
} else {
values[i] = Float.parseFloat(tokens[dataIndex]);
}
String sample = columnHeadings[i];
RNAIHairpinValue hairpin = new RNAIHairpinValue(probeId, values[i]);
RNAIHairpinCache.getInstance().addHairpinScore(sample, gene.getName(),
hairpin);
HashMap<String, Float> geneScoreMap = sampleGeneScoreMap.get(sample);
if (geneScoreMap == null) {
geneScoreMap = new HashMap();
sampleGeneScoreMap.put(sample, geneScoreMap);
}
Float geneScore = geneScoreMap.get(gene.getName());
if (geneScore == null) {
geneScore = values[i];
geneScoreMap.put(gene.getName(), geneScore);
} else {
geneScore = new Float(Math.min(values[i], geneScore.floatValue()));
geneScoreMap.put(gene.getName(), geneScore);
}
} catch (NumberFormatException numberFormatException) {
// This is an expected condition. IGV uses NaN to
// indicate non numbers (missing data values)