Skip to content

Commit

Permalink
Support Tumor_Sample_Barcode as column name in clinical file
Browse files Browse the repository at this point in the history
  • Loading branch information
zhx828 committed Feb 14, 2024
1 parent 77b8e63 commit 879c9c4
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 879c9c4

Please sign in to comment.