#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Feb 12 12:15:26 2021 @author: tanu """ #%% load packages import os homedir = os.path.expanduser('~') os.chdir (homedir + '/git/LSHTM_analysis/mcsm_na') from format_results_mcsm_na import * ######################################################################## # variables # TODO: add cmd line args #gene = 'gid' drug = 'streptomycin' datadir = homedir + '/git/Data' indir = datadir + '/' + drug + '/input' outdir = datadir + '/' + drug + '/output' outdir_na = outdir + '/mcsm_na_results/' # Input file infile_mcsm_na = outdir_na + 'gid_output_combined_clean.tsv' # Formatted output file outfile_mcsm_na_f = outdir_na + 'gid_complex_mcsm_na_norm.csv' #========================== # CALL: format_results_mcsm_na() # Data: gid+streptomycin #========================== print('Formatting results for:', infile_mcsm_na) mcsm_na_df_f = format_mcsm_na_output(mcsm_na_output_tsv = infile_mcsm_na) # writing file print('Writing formatted df to csv') mcsm_na_df_f.to_csv(outfile_mcsm_na_f, index = False) print('Finished writing file:' , '\nFile:', outfile_mcsm_na_f , '\nExpected no. of rows:', len(mcsm_na_df_f) , '\nExpected no. of cols:', len(mcsm_na_df_f.columns) , '\n=============================================================') #%%#####################################################################