import json


def data_for_alignment(path_to_data):
    """
    Return data, needed to test the correct alignment
      - input data, expected output (alignment and score), matrix and monomers table"""
    input_path = path_to_data + "align_input.txt"
    output_path = path_to_data + "align_output.json"

    matrix = path_to_data + "ROCS"
    monomers = path_to_data + "monomers_map.txt"

    with open(input_path)as inp_file, open(output_path) as out_file:
        input_data = inp_file.readlines()
        data = ""
        for line in input_data:
            data += line

        # Expected output is generated with the help of ginsi method
        expected_alignment = json.load(out_file)
        expected_score = {"PEPTIDE1": -1.1537037037037037, "CHEM1": -19.375, "PEPTIDE2": -7.532608695652174,
                          "CHEM2": 0.0, "CHEM3": None}

        return data, expected_alignment, expected_score, matrix, monomers