@Override
 public FastqRecordsForCluster decode() {
   if (!reader.hasNext()) return null;
   final FastqRecordsForCluster ret =
       new FastqRecordsForCluster(numTemplates, numSampleBarcodes, numMolecularBarcodes);
   decodeArray(ret.templateRecords);
   decodeArray(ret.sampleBarcodeRecords);
   decodeArray(ret.molecularBarcodeRecords);
   return ret;
 }
Esempio n. 2
0
    @Override
    public Iterator<String> iterator() {
      if (sfr != null) {
        sri = sfr.iterator();
      } else if (fqr != null) {
        fri = fqr.iterator();
      } else if (fsr != null) {
        fsi = fss.iterator();
      }

      return this;
    }
 private void decodeArray(final FastqRecord[] recs) {
   for (int i = 0; i < recs.length; ++i) {
     recs[i] = reader.next();
   }
 }