@@ -110,6 +110,7 @@ def __init__(self, net=None,config=None, count_by_prob=None, verbose=False):
110110 self .populations = config ["pops" ]
111111 self .netGraph = net
112112 self .priorMatrix = np .ones ((len (self .populations ), len (self .populations )))
113+ self .unk_priors = config ["UNK_priors" ]
113114
114115 # For plan b
115116 #self.full_loci = config["full_loci"]
@@ -1419,7 +1420,11 @@ def call_comp_phase_prob(self, epsilon, n, phases, chr, MUUG_output, planb):
14191420 # no plan b
14201421 for level in range (2 ):
14211422 if level == 1 :
1422- self .priorMatrix = np .ones ((len (self .populations ), len (self .populations ))) ####
1423+ if self .unk_priors == "MR" :
1424+ self .priorMatrix = np .ones ((len (self .populations ), len (self .populations )))
1425+ else :
1426+ self .priorMatrix = np .identity (len (self .populations ))
1427+ #self.priorMatrix = np.ones((len(self.populations), len(self.populations))) ####
14231428 if planb and len (res ['Haps' ]) == 0 :
14241429 self .plan = 'b'
14251430 epsilon = 1e-14
@@ -1615,7 +1620,10 @@ def update_prob_by_priority(self, res, race1, race2, priority):
16151620
16161621 def impute_one (self , subject_id , gl , binary , race1 , race2 , priority , epsilon , n , MUUG_output , haps_output , planb , em ):#em
16171622 clean_gl = clean_up_gl (gl )
1618- self .priorMatrix = np .ones ((len (self .populations ), len (self .populations )))
1623+ if self .unk_priors == "MR" :
1624+ self .priorMatrix = np .ones ((len (self .populations ), len (self .populations )))
1625+ else :
1626+ self .priorMatrix = np .identity (len (self .populations ))
16191627 to_calc_prior_matrix = False
16201628 if race1 or race2 :
16211629 race1 = race1 .split (';' )
0 commit comments