Skip to content

Commit

Permalink
Check whether level exists in the input file
Browse files Browse the repository at this point in the history
  • Loading branch information
zhx828 committed Apr 27, 2022
1 parent 1458c17 commit 13ad23c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions AnnotatorCore.py
Original file line number Diff line number Diff line change
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 13ad23c

Please sign in to comment.