Exemplo n.º 1
0
def test_run_fit():
    pso_parameter_file_in = '/home/mrama/Dropbox/Kinetics/Enzymes_new/G6PDH2r_dKd/Parameter_Fitting/Development/psoParameters.txt'
    lma_parameter_file_in = '/home/mrama/Dropbox/Kinetics/Enzymes_new/G6PDH2r_dKd/Parameter_Fitting/Development/lmlaParameters.txt'

    ## File Pathways for Recording Information
    pso_summary_file_name = '/home/mrama/Dropbox/Kinetics/Enzymes_new/G6PDH2r_dKd/Parameter_Fitting/Development/psoSummary.txt'
    pso_ultimate_result_file_name = '/home/mrama/Dropbox/Kinetics/Enzymes_new/G6PDH2r_dKd/Parameter_Fitting/Development/psoResults.txt'
    lma_candidates_import_path = pso_ultimate_result_file_name
    lma_candidates_export_path = '/home/mrama/Dropbox/Kinetics/Enzymes_new/G6PDH2r_dKd/Parameter_Fitting/Development/lmaResults.txt'
    pso_num_trials = 1  # Final candidate values
    data_file_name = '/home/mrama/Dropbox/Kinetics/Enzymes_new/G6PDH2r_dKd/Parameter_Fitting/Development/G6PDH2r.dat'  # path to file with the data to be fit

    # run pso
    pso_parameters = _parse_function_parameters(pso_parameter_file_in)
    pso_num_trials = 1
    for i in range(pso_num_trials):
        run_pso(pso_parameters, data_file_name, pso_summary_file_name,
                pso_ultimate_result_file_name)
Exemplo n.º 2
0
    return parameter


if __name__ == '__main__':

    pso_parameter_file_in = sys.argv[1]  # parameter file for pso
    lma_parameter_file_in = sys.argv[2]  # parameter file for lma

    ## File Pathways for Recording Information
    pso_summary_file_name = sys.argv[3]  # summary of each pso trial
    pso_ultimate_result_file_name = sys.argv[
        4]  # final pso candidate values, same as initial candidates for lma
    lma_candidates_import_path = pso_ultimate_result_file_name
    lma_candidates_export_path = sys.argv[5]
    pso_num_trials = int(sys.argv[6])  # Final candidate values
    # data_file_name = sys.argv[7]        # path to file with the data to be fit

    for data_file_name in sys.argv[7:]:

        # run pso
        pso_parameters = _parse_pso_parameters(pso_parameter_file_in)
        for i in range(pso_num_trials):
            run_pso(pso_parameters, data_file_name, pso_summary_file_name,
                    pso_ultimate_result_file_name)

        # run lma
        lma_parameters = _parse_pso_parameters(lma_parameter_file_in)
        run_lma(lma_parameters, data_file_name, lma_candidates_import_path,
                lma_candidates_export_path)