updating ambiguous muts manipulation section in data_extraction_v2
This commit is contained in:
parent
6330a2e716
commit
e6faf80c20
1 changed files with 12 additions and 0 deletions
|
@ -959,6 +959,18 @@ foo = bar.iloc[ambig_muts_rev_df.index]
|
|||
foo[['mutation', 'mutation_info', 'mutation_info_old']]
|
||||
|
||||
# CHECK if there are still any ambiguous muts
|
||||
muts_split_rev = list(bar.groupby('mutation_info'))
|
||||
dr_muts_rev = muts_split_rev[0][1].mutation
|
||||
other_muts_rev = muts_split_rev[1][1].mutation
|
||||
print('splitting muts by mut_info:', muts_split_rev)
|
||||
print('no.of dr_muts samples:', len(dr_muts_rev))
|
||||
print('no. of other_muts samples', len(other_muts_rev))
|
||||
|
||||
if not dr_muts_rev.isin(other_muts_rev).sum() & other_muts_rev.isin(dr_muts_rev).sum() > 0:
|
||||
print('\nAmbiguous muts corrected. Proceeding with downstream analysis')
|
||||
else:
|
||||
print('\nAmbiguous muts corrected. Quitting!')
|
||||
sys.exit()
|
||||
|
||||
#%% ROUND THE HOUSES: DELETE
|
||||
foo = ambig_muts_rev_df[['mutation', 'mutation_info_REV']]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue