def main():
    args = parse_args()
    cell_lines = CCLE_Info.read_cell_lines(args.cell_lines)
    rnaseq_raw = pd.read_csv(args.input,
                             sep='\t',
                             header=0,
                             skiprows=range(0, 2))
    truncated = restrict_to_cell_lines(rnaseq_raw, cell_lines)
    truncated.to_csv(args.output, sep='\t')
def main():
    args = parse_args()
    df = pd.read_csv(args.input, header=0, sep='\t')
    ccle = CCLE_Info(args.ccle_metadata)
    cell_lines = CCLE_Info.read_cell_lines(args.cell_lines)
    nonsense_df = extract_mutations_of_type(['Nonsense_Mutation'], df, ccle, cell_lines)
    missense_df = extract_mutations_of_type(['Missense_Mutation'], df, ccle, cell_lines)
    nm_df = extract_mutations_of_type(['Missense_Mutation', 'Nonsense_Mutation'], df, ccle, cell_lines)
    
    # Save the dataframe
    missense_df.to_csv(args.missense_output, sep='\t', header=True, index=True)
    nonsense_df.to_csv(args.nonsense_output, sep='\t', header=True, index=True)
    nm_df.to_csv(args.combined_output, sep='\t', header=True, index=True)
Exemplo n.º 3
0
def main():
    args = parse_args()
    df = pd.read_csv(args.input, header=0)
    cell_lines = CCLE_Info.read_cell_lines(args.cell_lines)

    df = df[['Cell_Line', 'Tissue', 'Perturbagen', 'GRinf', 'GR_AOC']]
    df = df.rename(columns={'Perturbagen': 'Drug'})

    # restrict to cell line
    df = df[df.Cell_Line.isin(cell_lines)]

    print('* Number of drugs:', len(args.drugs))
    print('\tDrugs:', args.drugs)

    for drug, output in zip(args.drugs, args.outputs):
        dr_df = get_drug_response_df(df, drug, cell_lines)
        dr_df.to_csv(output, sep='\t', header=True, index=True)