reader.readLine();
rowCounter++;
// Parse data
// parameters to track chromosome breaks. Used in wholeGenome case.
GisticTrack track = new GisticTrack(locator);
track.setName(locator.getTrackName());
List<GisticScore> scores = new ArrayList();
nextLine = reader.readLine();
rowCounter++;
while ((nextLine != null) && (nextLine.length() > 0)) {
String[] tokens = nextLine.split("\t");
GisticScore.Type type = getType(tokens[0].trim());
String chr = genome.getChromosomeAlias(tokens[1].trim());
int start = -1;
try {
start = Integer.parseInt(tokens[2]);
}
catch (NumberFormatException ne) {
throw new ParserException("Column 3 must be a numeric value.", rowCounter, nextLine);
}
int end = -1;
try {
end = Integer.parseInt(tokens[3]);
}
catch (NumberFormatException ne) {
throw new ParserException("Column 4 must be a numeric value.", rowCounter, nextLine);
}
float qValue = 0;
try {
qValue = Float.parseFloat(tokens[4]);
} catch (NumberFormatException numberFormatException) {
if (tokens[4].toLowerCase().equals("inf")) {
qValue = Float.POSITIVE_INFINITY;
} else {
qValue = Float.NaN;
}
}
try {
float gScore = Float.parseFloat(tokens[5]);
scores.add(new GisticScore(chr, start, end, qValue, gScore, type));
}
catch (Exception ex) {
log.error("Skipping line: " + nextLine, ex);
}
nextLine = reader.readLine();
rowCounter++;
}
if (scores.isEmpty()) {
throw new RuntimeException("No gistic scores were found.");
} else {
track.setScores(scores);
computeWholeGenome(track, genome);
return track;
}
} catch (FileNotFoundException e) {