public ParsingResult parse(List<String> strings) {
    List<double[]> matrix = new ArrayList<double[]>();

    strings = InputExtensions.trimAll(strings);
    int start = strings.lastIndexOf("OUTC|" + section);
    if (start == -1) {
      throw new RuntimeException("Corrupted ChIPMunk output detected.");
    }
    for (int lineNumber = start; lineNumber < strings.size(); ++lineNumber) {
      if (StringExtensions.startWith(strings.get(lineNumber), matrix_start)) {
        int lengthOfMotif = strings.get(lineNumber).split("\\s+").length;
        for (int positionIndex = 0; positionIndex < lengthOfMotif; ++positionIndex) {
          matrix.add(new double[alphabet_size]);
        }

        for (int letterIndex = 0; letterIndex < alphabet_size; ++letterIndex) {
          String[] weights = strings.get(letterIndex + lineNumber).split("\\|")[1].split("\\s+");
          for (int positionIndex = 0; positionIndex < lengthOfMotif; ++positionIndex) {
            matrix.get(positionIndex)[letterIndex] = Double.parseDouble(weights[positionIndex]);
          }
        }
        break;
      }
    }
    if (matrix.size() == 0) {
      throw new RuntimeException("Corrupted ChIPMunk output detected.");
    }
    return new ParsingResult(matrix, null);
  }