Skip to content
Permalink
Browse files

augur/titer_model.py: define attribute of subs_model in constructor t…

…o avoid missing attribute errors later
  • Loading branch information...
rneher committed May 22, 2019
1 parent d8f0e61 commit 8a06c6cfab4ae11e27c196efa04318a19e019455
Showing with 1 addition and 1 deletion.
  1. +1 −1 augur/titer_model.py
@@ -947,6 +947,7 @@ def __init__(self, alignments, titers, *args, **kwargs):
super(SubstitutionModel, self).__init__(*args, **kwargs)
self.sequences = defaultdict(dict)
self.proteins = list(alignments.keys())
self.substitution_effect={}
for gene, aln in alignments.items():
for x in aln:
self.sequences[x.name][gene] = str(x.seq)
@@ -1113,7 +1114,6 @@ def train(self,**kwargs):
Description
'''
self._train(**kwargs)
self.substitution_effect={}
for mi, mut in enumerate(self.relevant_muts):
self.substitution_effect[mut] = self.model_params[mi]

0 comments on commit 8a06c6c

Please sign in to comment.
You can’t perform that action at this time.