public FastaItem getNextFastaItem() throws IOException {
    String line;
    String headerRow;
    String acNum;
    int counter = 0;
    FastaItem fastaItem = null;
    while ((line = reader.readLine()) != null) {
      if (line.charAt(0) == '>' && counter == 0) {
        headerRow = line;
        acNum = line.split("\\|")[1];
        fastaItem = new FastaItem(headerRow, acNum);
        ++counter;
      }
      else if(line.charAt(0) != '>' && counter == 0){
        headerRow = nextHeaderRow;
        acNum = nextHeaderRow.split("\\|")[1];
        fastaItem = new FastaItem(headerRow, acNum);
        fastaItem.addSeqRow(line);
        ++counter;
      }
      else if (line.charAt(0) == '>' && counter == 1){
        nextHeaderRow = line;
        return fastaItem;
      }
      else {
       fastaItem.addSeqRow(line); 
      }
    }
    return fastaItem;
  }