ran mcsm format for embb
This commit is contained in:
parent
4eaa0b5d2b
commit
cee10cc540
3 changed files with 12 additions and 10 deletions
|
@ -243,7 +243,7 @@ def format_mcsm_output(mcsm_outputcsv):
|
||||||
mcsm_data = mcsm_data.drop_duplicates(['mutationinformation'])
|
mcsm_data = mcsm_data.drop_duplicates(['mutationinformation'])
|
||||||
print('Dim of data after removing duplicate muts:', mcsm_data.shape
|
print('Dim of data after removing duplicate muts:', mcsm_data.shape
|
||||||
, '\n===========================================================')
|
, '\n===========================================================')
|
||||||
#%%=====================================================================
|
#%%=====================================================================
|
||||||
#############
|
#############
|
||||||
# Create col: duet_outcome
|
# Create col: duet_outcome
|
||||||
#############
|
#############
|
||||||
|
|
|
@ -79,13 +79,13 @@ gene_match = gene + '_p.'
|
||||||
# directories
|
# directories
|
||||||
#============
|
#============
|
||||||
if not datadir:
|
if not datadir:
|
||||||
datadir = homedir + '/' + 'git/Data'
|
datadir = homedir + '/git/Data/'
|
||||||
|
|
||||||
if not indir:
|
if not indir:
|
||||||
indir = datadir + '/' + drug + '/input'
|
indir = datadir + drug + 'input/'
|
||||||
|
|
||||||
if not outdir:
|
if not outdir:
|
||||||
outdir = datadir + '/' + drug + '/output'
|
outdir = datadir + drug + 'output/'
|
||||||
|
|
||||||
#=======
|
#=======
|
||||||
# input
|
# input
|
||||||
|
@ -95,7 +95,7 @@ if pdb_filename:
|
||||||
else:
|
else:
|
||||||
in_filename_pdb = gene.lower() + '_complex.pdb'
|
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)
|
#in_filename_snps = gene.lower() + '_mcsm_snps.csv' #(outfile_mcsm_snps, from data_extraction.py)
|
||||||
#infile_snps = outdir + '/' + in_filename_snps
|
#infile_snps = outdir + '/' + in_filename_snps
|
||||||
|
@ -105,7 +105,7 @@ if mutation_filename:
|
||||||
else:
|
else:
|
||||||
in_filename_snps = gene.lower() + '_mcsm_formatted_snps.csv'
|
in_filename_snps = gene.lower() + '_mcsm_formatted_snps.csv'
|
||||||
|
|
||||||
infile_snps = outdir + '/' + in_filename_snps
|
infile_snps = outdir + in_filename_snps
|
||||||
|
|
||||||
#=======
|
#=======
|
||||||
# output
|
# output
|
||||||
|
@ -113,13 +113,13 @@ infile_snps = outdir + '/' + in_filename_snps
|
||||||
# mcsm_results globals
|
# mcsm_results globals
|
||||||
if not result_urls:
|
if not result_urls:
|
||||||
result_urls_filename = gene.lower() + '_result_urls.txt'
|
result_urls_filename = gene.lower() + '_result_urls.txt'
|
||||||
result_urls = outdir + '/' + result_urls_filename
|
result_urls = outdir + result_urls_filename
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
print('DEBUG: Result URLs:', result_urls)
|
print('DEBUG: Result URLs:', result_urls)
|
||||||
|
|
||||||
if not mcsm_output:
|
if not mcsm_output:
|
||||||
mcsm_output_filename = gene.lower() + '_mcsm_output.csv'
|
mcsm_output_filename = gene.lower() + '_mcsm_output.csv'
|
||||||
mcsm_output = outdir + '/' + mcsm_output_filename
|
mcsm_output = outdir + mcsm_output_filename
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
print('DEBUG: mCSM output CSV file:', mcsm_output)
|
print('DEBUG: mCSM output CSV file:', mcsm_output)
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ if not mcsm_output:
|
||||||
#out_filename_format = gene.lower() + '_mcsm_processed.csv'
|
#out_filename_format = gene.lower() + '_mcsm_processed.csv'
|
||||||
if not outfile_format:
|
if not outfile_format:
|
||||||
out_filename_format = gene.lower() + '_complex_mcsm_norm.csv'
|
out_filename_format = gene.lower() + '_complex_mcsm_norm.csv'
|
||||||
outfile_format = outdir + '/' + out_filename_format
|
outfile_format = outdir + out_filename_format
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
print('DEBUG: formatted CSV output:', outfile_format)
|
print('DEBUG: formatted CSV output:', outfile_format)
|
||||||
#%%=====================================================================
|
#%%=====================================================================
|
||||||
|
|
|
@ -122,7 +122,9 @@ if gene.lower() == "gid":
|
||||||
in_filename_mcsm = gene.lower() + '_complex_mcsm_norm_SRY.csv' # was incorrectly SAM previously
|
in_filename_mcsm = gene.lower() + '_complex_mcsm_norm_SRY.csv' # was incorrectly SAM previously
|
||||||
if gene.lower() == "embb":
|
if gene.lower() == "embb":
|
||||||
print("\nReading mCSM file for gene:", gene)
|
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:
|
if gene.lower() in gene_list_normal:
|
||||||
print("\nReading mCSM file for gene:", gene)
|
print("\nReading mCSM file for gene:", gene)
|
||||||
in_filename_mcsm = gene.lower() + '_complex_mcsm_norm.csv'
|
in_filename_mcsm = gene.lower() + '_complex_mcsm_norm.csv'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue