Skip to content

Commit

Permalink
Merge pull request #215 from oncokb/update-clinical-header
Browse files Browse the repository at this point in the history
Support Tumor_Sample_Barcode as column name in clinical file
  • Loading branch information
zhx828 authored Feb 14, 2024
2 parents 77b8e63 + 879c9c4 commit b3c8f0f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions AnnotatorCore.py
Original file line number Diff line number Diff line change
Expand Up @@ -1286,7 +1286,7 @@ def process_clinical_data(annotatedmutfiles, clinicalfile, outfile):
outf.write('\tHIGHEST_PX_LEVEL')
outf.write(
'\tONCOGENIC_MUTATIONS\t#ONCOGENIC_MUTATIONS\tRESISTANCE_MUTATIONS\t#RESISTANCE_MUTATIONS\t#MUTATIONS_WITH_SENSITIVE_THERAPEUTIC_IMPLICATIONS\t#MUTATIONS_WITH_RESISTANCE_THERAPEUTIC_IMPLICATIONS\t#MUTATIONS_WITH_DIAGNOSTIC_IMPLICATIONS\t#MUTATIONS_WITH_PROGNOSTIC_IMPLICATIONS\t#MUTATIONS\n')
isample = headers['SAMPLE_ID']
isample = geIndexOfHeader(headers, SAMPLE_HEADERS)

for row in reader:
sample = row[isample]
Expand Down Expand Up @@ -1912,8 +1912,8 @@ def readCancerTypes(clinicalFile, data):
reader = csv.reader(infile, delimiter='\t')
headers = readheaders(reader)

iSample = geIndexOfHeader(headers, ['SAMPLE_ID'])
iCancerType = geIndexOfHeader(headers, ['ONCOTREE_CODE', 'CANCER_TYPE'])
iSample = geIndexOfHeader(headers, SAMPLE_HEADERS)
iCancerType = geIndexOfHeader(headers, CANCER_TYPE_HEADERS)

for row in reader:
data[row[iSample]] = row[iCancerType]
Expand Down

0 comments on commit b3c8f0f

Please sign in to comment.