From 69b8ba9d0803917ee1744b6d4a44b5f8249d4927 Mon Sep 17 00:00:00 2001 From: Tanushree Tunstall Date: Sat, 13 Nov 2021 09:43:56 +0000 Subject: [PATCH] ran mcsm format for embb --- mcsm/mcsm.py | 2 +- mcsm/run_mcsm.py | 16 ++++++++-------- scripts/combining_dfs.py | 4 +++- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/mcsm/mcsm.py b/mcsm/mcsm.py index 817089c..f992c04 100644 --- a/mcsm/mcsm.py +++ b/mcsm/mcsm.py @@ -243,7 +243,7 @@ def format_mcsm_output(mcsm_outputcsv): mcsm_data = mcsm_data.drop_duplicates(['mutationinformation']) print('Dim of data after removing duplicate muts:', mcsm_data.shape , '\n===========================================================') -#%%===================================================================== +#%%===================================================================== ############# # Create col: duet_outcome ############# diff --git a/mcsm/run_mcsm.py b/mcsm/run_mcsm.py index dd0e150..dbb7076 100755 --- a/mcsm/run_mcsm.py +++ b/mcsm/run_mcsm.py @@ -79,13 +79,13 @@ gene_match = gene + '_p.' # directories #============ if not datadir: - datadir = homedir + '/' + 'git/Data' + datadir = homedir + '/git/Data/' if not indir: - indir = datadir + '/' + drug + '/input' + indir = datadir + drug + 'input/' if not outdir: - outdir = datadir + '/' + drug + '/output' + outdir = datadir + drug + 'output/' #======= # input @@ -95,7 +95,7 @@ if pdb_filename: else: in_filename_pdb = gene.lower() + '_complex.pdb' -infile_pdb = indir + '/' + in_filename_pdb +infile_pdb = indir + in_filename_pdb #in_filename_snps = gene.lower() + '_mcsm_snps.csv' #(outfile_mcsm_snps, from data_extraction.py) #infile_snps = outdir + '/' + in_filename_snps @@ -105,7 +105,7 @@ if mutation_filename: else: in_filename_snps = gene.lower() + '_mcsm_formatted_snps.csv' -infile_snps = outdir + '/' + in_filename_snps +infile_snps = outdir + in_filename_snps #======= # output @@ -113,13 +113,13 @@ infile_snps = outdir + '/' + in_filename_snps # mcsm_results globals if not result_urls: result_urls_filename = gene.lower() + '_result_urls.txt' - result_urls = outdir + '/' + result_urls_filename + result_urls = outdir + result_urls_filename if DEBUG: print('DEBUG: Result URLs:', result_urls) if not mcsm_output: mcsm_output_filename = gene.lower() + '_mcsm_output.csv' - mcsm_output = outdir + '/' + mcsm_output_filename + mcsm_output = outdir + mcsm_output_filename if DEBUG: print('DEBUG: mCSM output CSV file:', mcsm_output) @@ -127,7 +127,7 @@ if not mcsm_output: #out_filename_format = gene.lower() + '_mcsm_processed.csv' if not outfile_format: out_filename_format = gene.lower() + '_complex_mcsm_norm.csv' - outfile_format = outdir + '/' + out_filename_format + outfile_format = outdir + out_filename_format if DEBUG: print('DEBUG: formatted CSV output:', outfile_format) #%%===================================================================== diff --git a/scripts/combining_dfs.py b/scripts/combining_dfs.py index cb47d50..a0c570b 100755 --- a/scripts/combining_dfs.py +++ b/scripts/combining_dfs.py @@ -122,7 +122,9 @@ if gene.lower() == "gid": in_filename_mcsm = gene.lower() + '_complex_mcsm_norm_SRY.csv' # was incorrectly SAM previously if gene.lower() == "embb": print("\nReading mCSM file for gene:", gene) - in_filename_mcsm = gene.lower() + '_complex_mcsm_norm1.csv' + #in_filename_mcsm = gene.lower() + '_complex_mcsm_norm1.csv' + in_filename_mcsm = gene.lower() + '_complex_mcsm_norm2.csv' + if gene.lower() in gene_list_normal: print("\nReading mCSM file for gene:", gene) in_filename_mcsm = gene.lower() + '_complex_mcsm_norm.csv'