Skip to content

Commit

Permalink
snp_to_observations
Browse files Browse the repository at this point in the history
  • Loading branch information
rbpisupati committed May 9, 2021
1 parent b33ada0 commit f16e98a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion snpmatch/core/infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def snp_to_observations(input_snps, snpsP1_gt, snpsP2_gt, polarize = None):
else:
ebPolarised[np.where((np.equal( input_snps_mask, snpsP1_gt_mask )) )[0] ] = 0 ## 00
ebPolarised[np.where((np.equal( input_snps_mask, snpsP2_gt_mask )) )[0] ] = 2 ## 11
ebPolarised[np.where( np.equal( input_snps_mask, np.repeat(2, num_snps)) | (snpsP1_gt_mask != snpsP2_gt_mask ) )[0] ] = 1
ebPolarised[np.where( np.equal( input_snps_mask, np.repeat(2, num_snps)) & (snpsP1_gt_mask != snpsP2_gt_mask ) )[0] ] = 1
return(ebPolarised)


Expand Down

0 comments on commit f16e98a

Please sign in to comment.