Commit 65444d0b authored by Mikaël Salson's avatar Mikaël Salson Check key existence as all may not be filled all the time

parent c65f84e5
......@@ -92,6 +92,9 @@ class Result(VDJ_Formatter):
def __contains__ (self, key):
return key in self.d
def __getitem__(self, key):
return self.d[key]
......@@ -160,10 +163,14 @@ class MiXCR_Result(Result):
self.vdj[D] = [self['bestDHit']]
self.vdj[J] = [self['bestJHit']]
if 'nSeqVDJunction' in self:
self.vdj[N1] = self['nSeqVDJunction']
if 'nSeqDJJunction' in self:
self.vdj[N2] = self['nSeqDJJunction']
if 'nSeqVJJunction' in self:
self.vdj[N] = self['nSeqVJJunction']
if 'aaSeqCDR3' in self:
self.vdj[JUNCTION] = self['aaSeqCDR3']
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