4646 get_kb_disease_matches ,
4747 get_kb_matches_sections ,
4848 select_expression_plots ,
49- get_variant_flags
49+ get_variant_flags ,
5050)
5151from .summary import auto_analyst_comments , get_ipr_analyst_comments
5252from .therapeutic_options import create_therapeutic_options
@@ -528,7 +528,7 @@ def ipr_report(
528528 gkb_matches , all_variants , kb_matched_sections ['kbMatches' ]
529529 )
530530
531- if True :
531+ if False :
532532
533533 def extract_flags (variant_list ):
534534 # convert item to list of str, if it's just a str
@@ -541,12 +541,14 @@ def ensure_list(val):
541541
542542 # extract only the relevant fields for creating an observed variant annotation record
543543 flags = [
544- {'variant' : item ['key' ],
545- 'variantType' : item ['variantType' ],
546- 'flags' : ensure_list (item ['flags' ])
544+ {
545+ 'variant' : item ['key' ],
546+ 'variantType' : item ['variantType' ],
547+ 'flags' : ensure_list (item ['flags' ]),
547548 }
548- for item in variant_list if item ['flags' ] is not None and item ['flags' ] != ''
549- ]
549+ for item in variant_list
550+ if item ['flags' ] is not None and item ['flags' ] != ''
551+ ]
550552 _ = [item .pop ('flags' , '' ) for item in variant_list ]
551553
552554 return flags
@@ -556,11 +558,13 @@ def ensure_list(val):
556558 flags = extract_flags ([item for item in varlist if item ['gene' ] in genes_with_variants ])
557559 observed_vars_section .extend (flags )
558560 observed_vars_section .extend (extract_flags (signature_variants ))
559- observed_vars_section .extend (extract_flags (filter_structural_variants (
560- structural_variants , gkb_matches , gene_information
561- )))
561+ observed_vars_section .extend (
562+ extract_flags (
563+ filter_structural_variants (structural_variants , gkb_matches , gene_information )
564+ )
565+ )
562566
563- if False :
567+ if True :
564568 variant_sources = [
565569 v
566570 for source in [
@@ -606,7 +610,7 @@ def ensure_list(val):
606610 'variantCounts' : variant_counts ,
607611 'analystComments' : comments ,
608612 'therapeuticTarget' : targets ,
609- 'observedVariantAnnotations' : observed_vars_section
613+ 'observedVariantAnnotations' : observed_vars_section ,
610614 }
611615 )
612616
0 commit comments