@Override public T readNext() { T geneProfile; do { if (!baselineExpressionsKryoReader.readLine()) { return null; } geneProfile = buildObjectFromValues( baselineExpressionsKryoReader.getGeneId(), baselineExpressionsKryoReader.getGeneName(), baselineExpressionsKryoReader.getExpressions()); } while (geneProfile == null); return geneProfile; }
protected KryoInputStream( BaselineExpressionsKryoReader baselineExpressionsKryoReader, String experimentAccession, ExpressionsRowDeserializerBuilder expressionsRowDeserializerBuilder) { this.baselineExpressionsKryoReader = baselineExpressionsKryoReader; String[] firstLine = baselineExpressionsKryoReader.rewindAndReadAssays(); String[] headersWithoutGeneIdColumn = removeGeneIDAndNameColumns(firstLine); expressionsRowRawDeserializer = expressionsRowDeserializerBuilder .forExperiment(experimentAccession) .withHeaders(headersWithoutGeneIdColumn) .build(); }
@Override public void close() throws IOException { baselineExpressionsKryoReader.close(); }