@@ -44,18 +44,14 @@ describe('getFlagsForContext', () => {
44
44
'should be included only if there are LOFTEE annotated consequences in the specified gene, none of them are annotated HC, the highest ranked transcript is LOFTEE annotated, and the highest ranked transcript is not OS' ,
45
45
( geneId , expected ) => {
46
46
expect (
47
- getFlagsForContext ( { type : 'gene' , geneId } , variant ) [ 'variantFlags' ] . includes (
48
- 'lc_lof'
49
- )
47
+ getFlagsForContext ( { type : 'gene' , geneId } , variant ) . variantFlags . includes ( 'lc_lof' )
50
48
) . toBe ( expected )
51
49
}
52
50
)
53
51
54
52
it ( 'should not be included for variants without consequences' , ( ) => {
55
53
expect (
56
- getFlagsForContext ( { type : 'gene' , geneId : 'G1' } , { } ) [ 'variantFlags' ] . includes (
57
- 'lc_lof'
58
- )
54
+ getFlagsForContext ( { type : 'gene' , geneId : 'G1' } , { } ) . variantFlags . includes ( 'lc_lof' )
59
55
) . toBe ( false )
60
56
} )
61
57
} )
@@ -115,7 +111,7 @@ describe('getFlagsForContext', () => {
115
111
'should be included only if there are LOFTEE annotated consequences, none of them are annotated HC, the highest ranked transcript is LOFTEE annotated, and the highest ranked transcript is not OS' ,
116
112
( variant , expected ) => {
117
113
expect (
118
- getFlagsForContext ( { type : 'region' } , variant ) [ ' variantFlags' ] . includes ( 'lc_lof' )
114
+ getFlagsForContext ( { type : 'region' } , variant ) . variantFlags . includes ( 'lc_lof' )
119
115
) . toBe ( expected )
120
116
}
121
117
)
@@ -141,18 +137,20 @@ describe('getFlagsForContext', () => {
141
137
'should be included only if the consequence in the specified transcript is LOFTEE annotated LC' ,
142
138
( transcriptId , expected ) => {
143
139
expect (
144
- getFlagsForContext ( { type : 'transcript' , transcriptId } , variant ) [
145
- 'variantFlags'
146
- ] . includes ( 'lc_lof' )
140
+ getFlagsForContext (
141
+ { type : 'transcript' , transcriptId } ,
142
+ variant
143
+ ) . variantFlags . includes ( 'lc_lof' )
147
144
) . toBe ( expected )
148
145
}
149
146
)
150
147
151
148
it ( 'should not be included for variants without consequences' , ( ) => {
152
149
expect (
153
- getFlagsForContext ( { type : 'transcript' , transcriptId : 'T1' } , { } ) [
154
- 'variantFlags'
155
- ] . includes ( 'lc_lof' )
150
+ getFlagsForContext (
151
+ { type : 'transcript' , transcriptId : 'T1' } ,
152
+ { }
153
+ ) . variantFlags . includes ( 'lc_lof' )
156
154
) . toBe ( false )
157
155
} )
158
156
} )
@@ -187,7 +185,7 @@ describe('getFlagsForContext', () => {
187
185
'should be included only if there are LOFTEE annotated consequences in the specified gene and all of them are LOFTEE flagged' ,
188
186
( geneId , expected ) => {
189
187
expect (
190
- getFlagsForContext ( { type : 'gene' , geneId } , variant ) [ ' variantFlags' ] . includes (
188
+ getFlagsForContext ( { type : 'gene' , geneId } , variant ) . variantFlags . includes (
191
189
'lof_flag'
192
190
)
193
191
) . toBe ( expected )
@@ -196,9 +194,7 @@ describe('getFlagsForContext', () => {
196
194
197
195
it ( 'should not be included for variants without consequences' , ( ) => {
198
196
expect (
199
- getFlagsForContext ( { type : 'gene' , geneId : 'G1' } , { } ) [ 'variantFlags' ] . includes (
200
- 'lof_flag'
201
- )
197
+ getFlagsForContext ( { type : 'gene' , geneId : 'G1' } , { } ) . variantFlags . includes ( 'lof_flag' )
202
198
) . toBe ( false )
203
199
} )
204
200
} )
@@ -248,7 +244,7 @@ describe('getFlagsForContext', () => {
248
244
'should be included only if there are LOFTEE annotated consequences and all of them are LOFTEE flagged' ,
249
245
( variant , expected ) => {
250
246
expect (
251
- getFlagsForContext ( { type : 'region' } , variant ) [ ' variantFlags' ] . includes ( 'lof_flag' )
247
+ getFlagsForContext ( { type : 'region' } , variant ) . variantFlags . includes ( 'lof_flag' )
252
248
) . toBe ( expected )
253
249
}
254
250
)
@@ -272,18 +268,20 @@ describe('getFlagsForContext', () => {
272
268
'should be included only if the consequence in the specified transcript is LOFTEE annotated and LOFTEE flagged' ,
273
269
( transcriptId , expected ) => {
274
270
expect (
275
- getFlagsForContext ( { type : 'transcript' , transcriptId } , variant ) [
276
- 'variantFlags'
277
- ] . includes ( 'lof_flag' )
271
+ getFlagsForContext (
272
+ { type : 'transcript' , transcriptId } ,
273
+ variant
274
+ ) . variantFlags . includes ( 'lof_flag' )
278
275
) . toBe ( expected )
279
276
}
280
277
)
281
278
282
279
it ( 'should not be included for variants without consequences' , ( ) => {
283
280
expect (
284
- getFlagsForContext ( { type : 'transcript' , transcriptId : 'T1' } , { } ) [
285
- 'variantFlags'
286
- ] . includes ( 'lof_flag' )
281
+ getFlagsForContext (
282
+ { type : 'transcript' , transcriptId : 'T1' } ,
283
+ { }
284
+ ) . variantFlags . includes ( 'lof_flag' )
287
285
) . toBe ( false )
288
286
} )
289
287
} )
@@ -312,7 +310,7 @@ describe('getFlagsForContext', () => {
312
310
'it should be included only if the most severe consequence in the specified gene is pLoF according to VEP but not LOFTEE annotated' ,
313
311
( geneId , expected ) => {
314
312
expect (
315
- getFlagsForContext ( { type : 'gene' , geneId } , variant ) [ ' variantFlags' ] . includes (
313
+ getFlagsForContext ( { type : 'gene' , geneId } , variant ) . variantFlags . includes (
316
314
'nc_transcript'
317
315
)
318
316
) . toBe ( expected )
@@ -321,7 +319,7 @@ describe('getFlagsForContext', () => {
321
319
322
320
it ( 'should not be included for variants without consequences' , ( ) => {
323
321
expect (
324
- getFlagsForContext ( { type : 'gene' , geneId : 'G1' } , { } ) [ ' variantFlags' ] . includes (
322
+ getFlagsForContext ( { type : 'gene' , geneId : 'G1' } , { } ) . variantFlags . includes (
325
323
'nc_transcript'
326
324
)
327
325
) . toBe ( false )
@@ -362,9 +360,7 @@ describe('getFlagsForContext', () => {
362
360
'it should be included only if the most severe consequence is pLoF according to VEP but not LOFTEE annotated' ,
363
361
( variant , expected ) => {
364
362
expect (
365
- getFlagsForContext ( { type : 'region' } , variant ) [ 'variantFlags' ] . includes (
366
- 'nc_transcript'
367
- )
363
+ getFlagsForContext ( { type : 'region' } , variant ) . variantFlags . includes ( 'nc_transcript' )
368
364
) . toBe ( expected )
369
365
}
370
366
)
@@ -403,18 +399,20 @@ describe('getFlagsForContext', () => {
403
399
'it should be included only if the consequence in the specified transcript is pLoF according to VEP but not LOFTEE annotated' ,
404
400
( transcriptId , expected ) => {
405
401
expect (
406
- getFlagsForContext ( { type : 'transcript' , transcriptId } , variant ) [
407
- 'variantFlags'
408
- ] . includes ( 'nc_transcript' )
402
+ getFlagsForContext (
403
+ { type : 'transcript' , transcriptId } ,
404
+ variant
405
+ ) . variantFlags . includes ( 'nc_transcript' )
409
406
) . toBe ( expected )
410
407
}
411
408
)
412
409
413
410
it ( 'should not be included for variants without consequences' , ( ) => {
414
411
expect (
415
- getFlagsForContext ( { type : 'transcript' , transcriptId : 'T1' } , { } ) [
416
- 'variantFlags'
417
- ] . includes ( 'nc_transcript' )
412
+ getFlagsForContext (
413
+ { type : 'transcript' , transcriptId : 'T1' } ,
414
+ { }
415
+ ) . variantFlags . includes ( 'nc_transcript' )
418
416
) . toBe ( false )
419
417
} )
420
418
} )
@@ -446,18 +444,14 @@ describe('getFlagsForContext', () => {
446
444
'it should be included only if the most severe consequence in the specified gene is LOFTEE annotated OS' ,
447
445
( geneId , expected ) => {
448
446
expect (
449
- getFlagsForContext ( { type : 'gene' , geneId } , variant ) [ 'variantFlags' ] . includes (
450
- 'os_lof'
451
- )
447
+ getFlagsForContext ( { type : 'gene' , geneId } , variant ) . variantFlags . includes ( 'os_lof' )
452
448
) . toBe ( expected )
453
449
}
454
450
)
455
451
456
452
it ( 'should not be included for variants without consequences' , ( ) => {
457
453
expect (
458
- getFlagsForContext ( { type : 'gene' , geneId : 'G1' } , { } ) [ 'variantFlags' ] . includes (
459
- 'os_lof'
460
- )
454
+ getFlagsForContext ( { type : 'gene' , geneId : 'G1' } , { } ) . variantFlags . includes ( 'os_lof' )
461
455
) . toBe ( false )
462
456
} )
463
457
} )
@@ -488,7 +482,7 @@ describe('getFlagsForContext', () => {
488
482
'it should be included only if the most severe consequence is LOFTEE annotated OS' ,
489
483
( variant , expected ) => {
490
484
expect (
491
- getFlagsForContext ( { type : 'region' } , variant ) [ ' variantFlags' ] . includes ( 'os_lof' )
485
+ getFlagsForContext ( { type : 'region' } , variant ) . variantFlags . includes ( 'os_lof' )
492
486
) . toBe ( expected )
493
487
}
494
488
)
@@ -514,18 +508,20 @@ describe('getFlagsForContext', () => {
514
508
'it should be included only if the consequence in the specified transcript is LOFTEE annotated OS' ,
515
509
( transcriptId , expected ) => {
516
510
expect (
517
- getFlagsForContext ( { type : 'transcript' , transcriptId } , variant ) [
518
- 'variantFlags'
519
- ] . includes ( 'os_lof' )
511
+ getFlagsForContext (
512
+ { type : 'transcript' , transcriptId } ,
513
+ variant
514
+ ) . variantFlags . includes ( 'os_lof' )
520
515
) . toBe ( expected )
521
516
}
522
517
)
523
518
524
519
it ( 'should not be included for variants without consequences' , ( ) => {
525
520
expect (
526
- getFlagsForContext ( { type : 'transcript' , transcriptId : 'T1' } , { } ) [
527
- 'variantFlags'
528
- ] . includes ( 'os_lof' )
521
+ getFlagsForContext (
522
+ { type : 'transcript' , transcriptId : 'T1' } ,
523
+ { }
524
+ ) . variantFlags . includes ( 'os_lof' )
529
525
) . toBe ( false )
530
526
} )
531
527
} )
0 commit comments