@@ -125,8 +125,9 @@ def inithotspots():
125
125
curatedgenes |= set (_3dhotspots .keys ())
126
126
127
127
128
- def processalterationevents (eventfile , outfile , previousoutfile , defaultCancerType , cancerTypeMap , retainonlycuratedgenes ):
129
- inithotspots ()
128
+ def processalterationevents (eventfile , outfile , previousoutfile , defaultCancerType , cancerTypeMap , retainonlycuratedgenes , annotatehotspots ):
129
+ if annotatehotspots :
130
+ inithotspots ()
130
131
if os .path .isfile (previousoutfile ):
131
132
cacheannotated (previousoutfile , defaultCancerType , cancerTypeMap )
132
133
outf = open (outfile , 'w+' , 1000 )
@@ -139,8 +140,9 @@ def processalterationevents(eventfile, outfile, previousoutfile, defaultCancerTy
139
140
140
141
outf .write (headers ['^-$' ])
141
142
142
- outf .write ("\t is-a-hotspot" )
143
- outf .write ("\t is-a-3d-hotspot" )
143
+ if annotatehotspots :
144
+ outf .write ("\t is-a-hotspot" )
145
+ outf .write ("\t is-a-3d-hotspot" )
144
146
145
147
outf .write ("\t mutation_effect" )
146
148
outf .write ("\t oncogenic" )
@@ -232,11 +234,12 @@ def processalterationevents(eventfile, outfile, previousoutfile, defaultCancerTy
232
234
if start is not None and end is None :
233
235
end = start
234
236
235
- hotspot = pullsinglehotspots (hugo , hgvs , None , consequence , start , end , cancertype )
236
- row .append (hotspot )
237
+ if annotatehotspots :
238
+ hotspot = pullsinglehotspots (hugo , hgvs , None , consequence , start , end , cancertype )
239
+ row .append (hotspot )
237
240
238
- _3dhotspot = pull3dhotspots (hugo , hgvs , None , consequence , start , end , cancertype )
239
- row .append (_3dhotspot )
241
+ _3dhotspot = pull3dhotspots (hugo , hgvs , None , consequence , start , end , cancertype )
242
+ row .append (_3dhotspot )
240
243
241
244
oncokbinfo = pulloncokb (hugo , hgvs , None , consequence , start , end , cancertype )
242
245
row .append (oncokbinfo )
0 commit comments