tidy code and renamed kd.py to kd_df.py

This commit is contained in:
Tanushree Tunstall 2020-03-26 15:43:13 +00:00
parent 4c2fa2b600
commit 0b7a938fbd
6 changed files with 156 additions and 194 deletions

View file

@ -439,11 +439,11 @@ dr_WF0['dr_mutations_pyrazinamide'] = dr_WF0['dr_mutations_pyrazinamide'].str.ls
# extract only the samples/rows with pncA_p.
dr_pnca_WF0 = dr_WF0.loc[dr_WF0.dr_mutations_pyrazinamide.str.contains(gene_match)]
print('lengths after tidy split and extracting', gene_match, 'muts:',
'\nold length:' , len(meta_pnca_dr),
'\nlen after split:', len(dr_WF0),
'\ndr_pnca_WF0 length:', len(dr_pnca_WF0),
'\nexpected len:', dr_pnca_count)
print('lengths after tidy split and extracting', gene_match, 'muts:'
, '\nold length:' , len(meta_pnca_dr)
, '\nlen after split:', len(dr_WF0)
, '\ndr_pnca_WF0 length:', len(dr_pnca_WF0)
, '\nexpected len:', dr_pnca_count)
if len(dr_pnca_WF0) == dr_pnca_count:
print('PASS: length of dr_pnca_WF0 match with expected length')