Skip to content

Commit

Permalink
Merge pull request #170 from oncokb/fix-missing-columns
Browse files Browse the repository at this point in the history
Check whether level exists in the input file
  • Loading branch information
zhx828 committed Apr 27, 2022
2 parents 1458c17 + 13ad23c commit 7f6913b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions AnnotatorCore.py
Expand Up @@ -976,8 +976,8 @@ def processclinicaldata(annotatedmutfiles, clinicalfile, outfile):
sampledrivers[sample].append(variant)

for l in levels:
il = headers[l]
if il < len(row) and row[il] != '':
il = geIndexOfHeader(headers, [l])
if 0 <= il < len(row) and row[il] != '':
if l not in samplelevels[sample]:
samplelevels[sample][l] = []
sampleleveltreatments[sample][l] = []
Expand All @@ -988,15 +988,15 @@ def processclinicaldata(annotatedmutfiles, clinicalfile, outfile):
sampleactionablecount[sample][variant] = True

for l in dxLevels:
il = headers[l]
if il < len(row) and row[il] != '':
il = geIndexOfHeader(headers, [l])
if 0 <= il < len(row) and row[il] != '':
if l not in samplelevels[sample]:
samplelevels[sample][l] = []
samplelevels[sample][l].append(row[il] + "(" + variant + ")")

for l in pxLevels:
il = headers[l]
if il < len(row) and row[il] != '':
il = geIndexOfHeader(headers, [l])
if 0 <= il < len(row) and row[il] != '':
if l not in samplelevels[sample]:
samplelevels[sample][l] = []
samplelevels[sample][l].append(row[il] + "(" + variant + ")")
Expand Down

0 comments on commit 7f6913b

Please sign in to comment.