Commit 281565b2 authored by Hanna  JULIENNE's avatar Hanna JULIENNE

ref/zscore align

parent d8571017
Pipeline #44876 passed with stages
in 1 minute and 4 seconds
......@@ -35,12 +35,12 @@ def realigned_zfiles_on_panel(ref_panel, zscore):
inter_id = zscore.index.intersection(ref_panel.index)
zscore = zscore.loc[inter_id]
sub_ref_panel = ref_panel.loc[inter_id]
print(sub_ref_panel.head())
print(zscore.head())
print(sub_ref_panel.Ref_all)
print(zscore.A0)
zscore.sort_index(inplace=True)
sub_ref_panel.sort_index(inplace=True)
allele_inverted = (sub_ref_panel['Ref_all'] != zscore.A0)
allele_inverted = (sub_ref_panel.Ref_all != zscore.A0)
zscore.loc[allele_inverted, "A0"] = sub_ref_panel.loc[allele_inverted].Ref_all
zscore.loc[allele_inverted, "A1"] = sub_ref_panel.loc[allele_inverted].alt_all
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment