added str.strip() instead of str.lstrip()

This commit is contained in:
Tanushree Tunstall 2022-04-08 17:05:24 +01:00
parent ac78fe16cd
commit 2518556c96

View file

@ -572,7 +572,8 @@ print ('Firstly, applying tidy split on dr muts df', meta_gene_dr.shape
# apply tidy_split() # apply tidy_split()
dr_WF0 = tidy_split(meta_gene_dr, col_to_split1, sep = ';') dr_WF0 = tidy_split(meta_gene_dr, col_to_split1, sep = ';')
# remove leading white space else these are counted as distinct mutations as well # remove leading white space else these are counted as distinct mutations as well
dr_WF0[dr_muts_col] = dr_WF0[dr_muts_col].str.lstrip() #dr_WF0[dr_muts_col] = dr_WF0[dr_muts_col].str.lstrip()
dr_WF0[dr_muts_col] = dr_WF0[dr_muts_col].str.strip()
# extract only the samples/rows with nssnp_match # extract only the samples/rows with nssnp_match
#dr_gene_WF0 = dr_WF0.loc[dr_WF0[dr_muts_col].str.contains(gene_match)] #dr_gene_WF0 = dr_WF0.loc[dr_WF0[dr_muts_col].str.contains(gene_match)]