removed if clause for filenames
This commit is contained in:
parent
833e599550
commit
805868ce7e
1 changed files with 9 additions and 10 deletions
|
@ -122,7 +122,7 @@ outdir = datadir + '/' + drug + '/' + 'output'
|
||||||
# input
|
# input
|
||||||
#=======
|
#=======
|
||||||
#in_filename_master_master = 'original_tanushree_data_v2.csv' #19k
|
#in_filename_master_master = 'original_tanushree_data_v2.csv' #19k
|
||||||
in_filename_master = 'mtb_gwas_meta_v5.csv' #34k
|
in_filename_master = 'mtb_gwas_meta_v6.csv' #35k
|
||||||
infile_master = datadir + '/' + in_filename_master
|
infile_master = datadir + '/' + in_filename_master
|
||||||
print('Input file: ', infile_master
|
print('Input file: ', infile_master
|
||||||
, '\n============================================================')
|
, '\n============================================================')
|
||||||
|
@ -153,8 +153,7 @@ if in_filename_master == 'original_tanushree_data_v2.csv':
|
||||||
, drug
|
, drug
|
||||||
, dr_muts_col
|
, dr_muts_col
|
||||||
, other_muts_col]]
|
, other_muts_col]]
|
||||||
|
else:
|
||||||
if in_filename_master == 'mtb_gwas_meta_v5.csv':
|
|
||||||
core_cols = ['id'
|
core_cols = ['id'
|
||||||
, 'sample'
|
, 'sample'
|
||||||
, 'patient_id'
|
, 'patient_id'
|
||||||
|
@ -174,12 +173,13 @@ if in_filename_master == 'mtb_gwas_meta_v5.csv':
|
||||||
, 'hiv_status'
|
, 'hiv_status'
|
||||||
, 'HIV_status'
|
, 'HIV_status'
|
||||||
, 'tissue_type'
|
, 'tissue_type'
|
||||||
, 'isolation_source']
|
, 'isolation_source'
|
||||||
|
, resistance_col]
|
||||||
|
|
||||||
variable_based_cols = [drug
|
variable_based_cols = [drug
|
||||||
, dr_muts_col
|
, dr_muts_col
|
||||||
, other_muts_col
|
, other_muts_col]
|
||||||
, resistance_col]
|
#, resistance_col]
|
||||||
|
|
||||||
cols_to_extract = core_cols + variable_based_cols
|
cols_to_extract = core_cols + variable_based_cols
|
||||||
print('Extracting', len(cols_to_extract), 'columns from master data')
|
print('Extracting', len(cols_to_extract), 'columns from master data')
|
||||||
|
@ -343,7 +343,7 @@ if in_filename_master == 'original_tanushree_data_v2.csv':
|
||||||
,'drtype'
|
,'drtype'
|
||||||
, drug
|
, drug
|
||||||
, dr_muts_col]]
|
, dr_muts_col]]
|
||||||
if in_filename_master == 'mtb_gwas_meta_v3.csv':
|
else:
|
||||||
dr_based_cols = [drug, dr_muts_col]
|
dr_based_cols = [drug, dr_muts_col]
|
||||||
cols_to_extract = core_cols + dr_based_cols
|
cols_to_extract = core_cols + dr_based_cols
|
||||||
print('Extracting', len(cols_to_extract), 'columns from meta data')
|
print('Extracting', len(cols_to_extract), 'columns from meta data')
|
||||||
|
@ -393,8 +393,7 @@ if in_filename_master == 'original_tanushree_data_v2.csv':
|
||||||
, 'drtype'
|
, 'drtype'
|
||||||
, drug
|
, drug
|
||||||
, other_muts_col]]
|
, other_muts_col]]
|
||||||
|
else:
|
||||||
if in_filename_master == 'mtb_gwas_meta_v3.csv':
|
|
||||||
other_based_cols = [drug, other_muts_col]
|
other_based_cols = [drug, other_muts_col]
|
||||||
cols_to_extract = core_cols + other_based_cols
|
cols_to_extract = core_cols + other_based_cols
|
||||||
print('Extracting', len(cols_to_extract), 'columns from meta data')
|
print('Extracting', len(cols_to_extract), 'columns from meta data')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue