コード例 #1
0
ファイル: fit_kd_curve.py プロジェクト: raywangyr/scripts
            try:
                col_mapping[ ls[0] ]  = ls[1]
            except IndexError:
                pass

    return col_mapping

if __name__=="__main__":
    parser = ArgumentParser()
    parser.add_argument("-f", "--platereader_data", required=True, help="")
    parser.add_argument("-m", "--col_mapping_file", required=True, help="")
    parser.add_argument("-i", "--idx", type=int, help="")
    parser.add_argument("-p", "--pts", default=5, type=int, help="last number of points taken")
    opts = parser.parse_args()

    df = parse_platereader_data.read_data( opts.platereader_data )
    if opts.idx:
        print "Time point taken:", df.Time[opts.idx]
        df = df[:opts.idx]

    data_Dict = np.mean( df.tail( opts.pts ) ).to_dict() # col:mP_value
    #print data_Dict
    col_mapping_dict = get_col_mapping( opts.col_mapping_file )

    x = []
    y = []
    to_plot_Dict = {}

    # get a dict, { conc:mp_value }
    for col in col_mapping_dict.keys():
        conc = float( col_mapping_dict[col] )
コード例 #2
0
ファイル: xy_plot.py プロジェクト: raywangyr/scripts
            print ls
            try:
                col_mapping[ ls[0] ]  = ls[1]
            except IndexError:
                pass

    return col_mapping

if __name__=="__main__":
    parser = ArgumentParser()
    parser.add_argument("-f", "--table", required=True, help="")
    parser.add_argument("-m", "--col_mapping_file", help="")
    parser.add_argument("--sep", default="\t", help="")
    opts = parser.parse_args()

    data_frame = parse_platereader_data.read_data( opts.table )
    print len(data_frame.columns), data_frame.columns


    x = np.array( map( float, data_frame.Time ) )
    colors = iter(cm.rainbow(np.linspace(0, 1, len(data_frame.columns))))
    #inhib_x = []
    inhib_y = []
    if opts.col_mapping_file:
        col_mapping_dict = get_col_mapping( opts.col_mapping_file )
    for col, data in data_frame.iteritems():
        if col=="Time":
            continue
        if col[0] in ["C", "D", "E", "F", "G"]:
            continue
        y = np.array( data_frame[col] )