diff --git a/lib/import/brca/providers/st_george_old/st_george_handler_old.rb b/lib/import/brca/providers/st_george_old/st_george_handler_old.rb index 171c74c9..a9e1353f 100644 --- a/lib/import/brca/providers/st_george_old/st_george_handler_old.rb +++ b/lib/import/brca/providers/st_george_old/st_george_handler_old.rb @@ -1,5 +1,4 @@ require 'possibly' -require 'pry' module Import module Brca @@ -11,7 +10,10 @@ class StGeorgeHandlerOld < Import::Germline::ProviderHandler PASS_THROUGH_FIELDS = %w[age sex consultantcode collecteddate receiveddate authoriseddate servicereportidentifier providercode receiveddate sampletype].freeze - CDNA_REGEX = /c\.(?[0-9]+[^\s)]+)|c\.\[(?.*?)\]/i.freeze + + CDNA_REGEX = /c\.(?[0-9]+[^\s)]+)| + c\.\[(?.*?)\]| + c\.\*?\s?(?[0-9]+[^\s)]+)/ix.freeze PROTEIN_REGEX = /p\.(?[a-z]+[0-9]+[a-z]+)| p\.(?\[)?(?\()?(?[a-z]+[0-9]+[a-z]+) @@ -22,7 +24,8 @@ class StGeorgeHandlerOld < Import::Germline::ProviderHandler 'BRCA 1' => 'BRCA1', 'BR2' => 'BRCA2', 'B2' => 'BRCA2', - 'BRCA 2' => 'BRCA2' }.freeze + 'BRCA 2' => 'BRCA2', + 'Br2' => 'BRCA2' }.freeze BRCA_GENES_REGEX = /(?BRCA1| BRCA2| @@ -39,20 +42,21 @@ class StGeorgeHandlerOld < Import::Germline::ProviderHandler SMARCB1| LZTR1)/xi.freeze - EXON_VARIANT_REGEX = /(?del|dup|ins).+ex(?on)?(?s)?\s - (?[0-9]+(?-[0-9]+)?)| - ex(?on)?(?s)?\s(?[0-9]+(?-[0-9]+)?)\s - (?del|dup|ins)| - (?del|dup|ins)\sexon(?s)?\s - (?[0-9]+(?\sto\s[0-9]+))| - (?del|dup|ins)(?\s)?(?[0-9]+(?-[0-9]+)?)| - ex(?on)?(?s)?\s(?[0-9]+(?\sto\s[0-9]+)?)\s - (?del|dup|ins)/ix.freeze + EXON_VARIANT_REGEX = /(?del|dup|ins).+ex(?on)?(?s)?\s(?[0-9]+(?-[0-9]+)?)| + ex(?on)?(?s)?\s(?[0-9]+(?-[0-9]+)?)\s(?del|dup|ins)| + (?del|dup|ins)\sexon(?s)?\s(?[0-9]+(?\sto\s[0-9]+))| + (?del|dup|ins)(?\s)?(?[0-9]+(?-[0-9]+)?)| + ex(?on)?(?s)?\s?(?[0-9]+(?\sto\s[0-9]+)?)\s(?del|dup|ins)| + (?dup|del|ins)\s?(x|ex|exon)\s?(?[0-9]+(-|_)[0-9]+)| + (?ivs.*-ivs.*del|dup|ins)(?~?[0-9]+)| + (?dup|del|ins)\s?(ex|x)\s?(?[0-9]+)| + (x|ex|exon)\s?(?[0-9]+(-|_)[0-9]+)\s(?dup|del|ins)/ix.freeze DEPRECATED_BRCA_NAMES_REGEX = /B1|BR1|BRCA\s1|B2|BR2|BRCA\s2/i.freeze DELIMETER_REGEX = /[&\n+,;]|and|IFD/i.freeze + def process_fields(record) # records using new importer should only have SRIs starting with D return unless record.raw_fields['servicereportidentifier'].start_with?('D') @@ -148,6 +152,10 @@ def process_fullscreen_records(genotype, record, positive_genes, genotypes) else single_variant_full_screen(genotype, genotypes, positive_genes, record) end + elsif ucs_variant?(record) + record_basic_full_screen_ucs(genotype, genotypes, positive_genes, record) + else + unknown_status(genotype, genotypes, positive_genes, record) end genotypes end @@ -189,6 +197,10 @@ def process_targeted_records(positive_genes, genotype, record, genotypes) process_failed_targeted(genotype, record, genotypes) elsif positive_cdna?(record) || positive_exonvariant?(record) process_positive_targeted(record, positive_genes, genotype, genotypes) + elsif ucs_variant?(record) + record_basic_targeted_ucs(genotype, genotypes, record) + else + unknown_status(genotype, genotypes, positive_genes, record) end genotypes end @@ -216,6 +228,49 @@ def process_positive_targeted(record, positive_genes, genotype, genotypes) end end + def record_basic_full_screen_ucs(genotype, genotypes, positive_genes, _record) + # record with just a gene and 'UCS' - no specific variant mentioned but we know it should be teststatus 10 + if positive_genes.size == 1 + process_single_ucs_gene(positive_genes, genotype, genotypes) + elsif positive_genes.size > 1 + positive_genes.each do |gene| + genotype.add_gene(gene) + genotype.add_status(10) + genotypes.append(genotype) + end + else + create_empty_brca_tests(genotype, genotypes) + end + end + + def process_single_ucs_gene(positive_genes, genotype, genotypes) + negative_gene = %w[BRCA1 BRCA2] - positive_genes + genotype_dup = genotype.dup + genotype_dup.add_gene(negative_gene.join) + genotype_dup.add_status(1) + genotypes.append(genotype_dup) + genotype.add_gene(positive_genes.join) + genotype.add_status(10) + genotypes.append(genotype) + end + + def record_basic_targeted_ucs(genotype, genotypes, record) + process_single_gene(genotype, record) + genotype.add_status(10) + genotypes.append(genotype) + end + + def unknown_status(genotype, genotypes, positive_genes, record) + # where there is nothing definitive written in the genotype field but there may be a gene + if ashkenazi?(record) || polish?(record) || full_screen?(record) + create_empty_brca_tests(genotype, genotypes) + else + genotype.add_gene(positive_genes.join) if !positive_genes.nil? + genotype.add_status(4) + genotypes.append(genotype) + end + end + # Ordering here is important so duplicate branches are required # rubocop:disable Lint/DuplicateBranch def process_single_gene(genotype, record) @@ -270,13 +325,39 @@ def process_multiple_positive_variants(positive_genes, genotype, record, genotyp variants = process_multi_genes_rec(record, positive_genes) elsif positive_genes.flatten.uniq.size == 1 variants = process_uniq_gene_rec(record, positive_genes) + elsif positive_genes.empty? + process_multi_variants_no_gene(record, genotype, genotypes) end - add_variants_multiple_results(variants, genotype, genotypes) unless variants.nil? - genotypes end + def ucs_variant?(record) + record.raw_fields['genotype'].scan(/ucs/i).size.positive? + end + + def process_multi_variants_no_gene(record, genotype, genotypes) + return if record.raw_fields['genotype'].nil? + + raw_genotypes = record.raw_fields['genotype'].scan(CDNA_REGEX).flatten.compact + raw_genotypes.each do |raw_genotype| + genotype_dup = genotype.dup + genotype_dup.add_gene_location(raw_genotype) unless raw_genotype.nil? + ucs_variant?(record) ? genotype_dup.add_status(10) : genotype_dup.add_status(2) + genotypes.append(genotype_dup) + end + create_empty_brca_tests(genotype, genotypes) if full_screen?(record) + end + + def create_empty_brca_tests(genotype, genotypes) + %w[BRCA1 BRCA2].each do |fs_gene| + genotype_dup = genotype.dup + genotype_dup.add_gene(fs_gene) + genotype_dup.add_status(4) + genotypes.append(genotype_dup) + end + end + def process_multi_genes_rec(record, positive_genes) if record.raw_fields['genotype'].scan(DELIMETER_REGEX).size > 1 variants = process_single_variant(record, positive_genes) @@ -360,7 +441,7 @@ def process_exonic_variant(genotype, record) genotype.add_exon_location($LAST_MATCH_INFO[:exons]) genotype.add_variant_type($LAST_MATCH_INFO[:variant]) - genotype.add_status(2) + ucs_variant?(record) ? genotype.add_status(10) : genotype.add_status(2) @logger.debug "SUCCESSFUL exon variant parse for: #{record.raw_fields['genotype']}" # end end @@ -369,7 +450,7 @@ def process_cdna_variant(genotype, record) return unless record.raw_fields['genotype'].scan(CDNA_REGEX).size.positive? genotype.add_gene_location($LAST_MATCH_INFO[:cdna]) - genotype.add_status(2) + ucs_variant?(record) ? genotype.add_status(10) : genotype.add_status(2) @logger.debug "SUCCESSFUL cdna change parse for: #{$LAST_MATCH_INFO[:cdna]}" # end end @@ -382,7 +463,7 @@ def process_normal_record(genotype, record) def normal?(record) variant = record.raw_fields['genotype'] moltesttype = record.raw_fields['moleculartestingtype'] - variant.scan(%r{NO PATHOGENIC|Normal|N/N|NOT DETECTED}i).size.positive? || + variant.scan(%r{NO PATHOGENIC|Normal|N/N|NOT DETECTED|FALSE POSITIVE| N$}i).size.positive? || variant == 'N' || moltesttype.scan(/unaffected/i).size.positive? end @@ -434,11 +515,12 @@ def void_genetictestscope?(record) return if record.raw_fields['moleculartestingtype'].nil? record.raw_fields['moleculartestingtype'].empty? || - record.raw_fields['moleculartestingtype'] == 'Store' + record.raw_fields['moleculartestingtype'] == 'Store' || + record.raw_fields['moleculartestingtype'] == 'Reclassification of previous result' end end # rubocop:enable Metrics/ClassLength end end end -end \ No newline at end of file +end diff --git a/test/lib/import/brca/providers/st_george_old/st_george_handler_old_test.rb b/test/lib/import/brca/providers/st_george_old/st_george_handler_old_test.rb index 9bb67c25..0bd9751d 100644 --- a/test/lib/import/brca/providers/st_george_old/st_george_handler_old_test.rb +++ b/test/lib/import/brca/providers/st_george_old/st_george_handler_old_test.rb @@ -7,7 +7,6 @@ def setup @importer_stdout, @importer_stderr = capture_io do @handler = Import::Brca::Providers::StGeorgeOld::StGeorgeHandlerOld.new(EBatch.new) end - @logger = Import::Log.get_logger end test 'process_fields' do @@ -50,7 +49,6 @@ def setup void_record = build_raw_record('pseudo_id1' => 'bob') void_record.raw_fields['moleculartestingtype'] = '' assert_equal true, @handler.void_genetictestscope?(void_record) - @logger.expects(:debug).with('Unknown moleculartestingtype') @handler.process_genetictestcope(@genotype, void_record) assert_equal 'Unable to assign BRCA genetictestscope', @genotype.attribute_map['genetictestscope'] @@ -81,6 +79,7 @@ def setup assert_equal true, @handler.targeted_test?(targeted_record) @handler.process_genetictestcope(@genotype, targeted_record) assert_equal 'Targeted BRCA mutation test', @genotype.attribute_map['genetictestscope'] + full_screen_record = build_raw_record('pseudo_id1' => 'bob') full_screen_record.raw_fields['moleculartestingtype'] = 'Full Screen' @@ -96,29 +95,71 @@ def setup end test 'process_single_record' do - @logger.expects(:debug).with('SUCCESSFUL gene parse for BRCA2') - @logger.expects(:debug).with('SUCCESSFUL cdna change parse for: 6165_6166delAA') - @logger.expects(:debug).with('FAILED protein parse for: BR2 c.6165_6166delAA') @handler.process_variants_from_record(@genotype, @record) assert_equal 2, @genotype.attribute_map['teststatus'] assert_equal 'c.6165_6166del', @genotype.attribute_map['codingdnasequencechange'] + assert_equal 8, @genotype.attribute_map['gene'] fullscreen_record = build_raw_record('pseudo_id1' => 'bob') fullscreen_record.raw_fields['moleculartestingtype'] = 'Full Screen' assert_equal true, @handler.full_screen?(fullscreen_record) + # Test for full screen record - @logger.expects(:debug).with('SUCCESSFUL gene parse for BRCA1') - @logger.expects(:debug).with('SUCCESSFUL gene parse for BRCA2') - @logger.expects(:debug).with('SUCCESSFUL cdna change parse for: 6165_6166delAA') - @logger.expects(:debug).with('FAILED protein parse for: BR2 c.6165_6166delAA') variants = @handler.process_variants_from_record(@genotype, fullscreen_record) assert_equal 2, variants.size assert_equal 1, variants[0].attribute_map['teststatus'] assert_equal 2, variants[1].attribute_map['teststatus'] + assert_equal 7, variants[0].attribute_map['gene'] + assert_equal 8, variants[1].attribute_map['gene'] + assert_equal 'c.6165_6166del', variants[1].attribute_map['codingdnasequencechange'] + assert_nil(variants[1].attribute_map['proteinimpact']) + broken_record = build_raw_record('pseudo_id1' => 'bob') broken_record.raw_fields['genotype'] = 'Cabbage' - @logger.expects(:debug).with('Unable to extract gene') variants = @handler.process_variants_from_record(@genotype, broken_record) assert true, variants.empty? + + # UCS full screen variant + full_screen_ucs_record = build_raw_record('pseudo_id1' => 'bob') + full_screen_ucs_record.raw_fields['moleculartestingtype'] = 'Full Screen' + full_screen_ucs_record.raw_fields['genotype'] = 'BR2 UCS' + variants = @handler.process_variants_from_record(@genotype, full_screen_ucs_record) + assert_equal 2, variants.size + assert_equal 1, variants[0].attribute_map['teststatus'] + assert_equal 10, variants[1].attribute_map['teststatus'] + assert_equal 7, variants[0].attribute_map['gene'] + assert_equal 8, variants[1].attribute_map['gene'] + + # UCS full screen variant wirh 2 genes + full_screen_ucs_record_2_genes = build_raw_record('pseudo_id1' => 'bob') + full_screen_ucs_record_2_genes.raw_fields['moleculartestingtype'] = 'Full Screen' + full_screen_ucs_record_2_genes.raw_fields['genotype'] = 'BR1 BR2 UCS' + variants = @handler.process_variants_from_record(@genotype, full_screen_ucs_record_2_genes) + assert_equal 2, variants.size + assert_equal 10, variants[1].attribute_map['teststatus'] + assert_equal 8, variants[1].attribute_map['gene'] + + # UCS full screen variant with no gene + full_screen_ucs_record_no_gene = build_raw_record('pseudo_id1' => 'bob') + full_screen_ucs_record_no_gene.raw_fields['moleculartestingtype'] = 'Full Screen' + full_screen_ucs_record_no_gene.raw_fields['genotype'] = 'UCS' + variants = @handler.process_variants_from_record(@genotype, full_screen_ucs_record_no_gene) + assert_equal 2, variants.size + assert_equal 4, variants[0].attribute_map['teststatus'] + assert_equal 4, variants[1].attribute_map['teststatus'] + assert_equal 7, variants[0].attribute_map['gene'] + assert_equal 8, variants[1].attribute_map['gene'] + + + # #test unknown status for full screen + unknown_test_status_fs_record = build_raw_record('pseudo_id1' => 'bob') + unknown_test_status_fs_record.raw_fields['moleculartestingtype'] = 'Full Screen' + unknown_test_status_fs_record.raw_fields['genotype'] = 'M' + variants = @handler.process_variants_from_record(@genotype, unknown_test_status_fs_record) + assert_equal 2, variants.size + assert_equal 4, variants[0].attribute_map['teststatus'] + assert_equal 4, variants[0].attribute_map['teststatus'] + assert_equal 7, variants[0].attribute_map['gene'] + assert_equal 8, variants[1].attribute_map['gene'] end test 'process_multiple_cdnavariants' do @@ -134,6 +175,61 @@ def setup assert_equal 'c.6275_6276del', variants[1].attribute_map['codingdnasequencechange'] end + test 'record_basic_full_screen_ucs' do + full_screen_ucs_record = build_raw_record('pseudo_id1' => 'bob') + full_screen_ucs_record.raw_fields['genotype'] = 'BR2 UCS' + full_screen_ucs_record.raw_fields['moleculartestingtype'] = 'Full Screen' + variants = @handler.process_variants_from_record(@genotype, full_screen_ucs_record) + assert_equal 2, variants.size + assert_equal 1, variants[0].attribute_map['teststatus'] + assert_equal 10, variants[1].attribute_map['teststatus'] + assert_equal 7, variants[0].attribute_map['gene'] + assert_equal 8, variants[1].attribute_map['gene'] + end + + test 'record_basic_targeted_ucs' do + targeted_ucs_record = build_raw_record('pseudo_id1' => 'bob') + targeted_ucs_record.raw_fields['genotype'] = 'BR2 UCS' + genotypes=[] + variants = @handler.record_basic_targeted_ucs(@genotype,genotypes, targeted_ucs_record) + assert_equal 1, variants.size + assert_equal 10, variants[0].attribute_map['teststatus'] + assert_equal 8, variants[0].attribute_map['gene'] + end + + test 'unknown_status' do + unknown_test_status_targeted = build_raw_record('pseudo_id1' => 'bob') + unknown_test_status_targeted.raw_fields['moleculartestingtype'] = 'Targeted' + unknown_test_status_targeted.raw_fields['genotype'] = 'BR2 M' + positive_genes=['BRCA2'] + genotypes=[] + variants_targ = @handler.unknown_status(@genotype, genotypes, positive_genes, unknown_test_status_targeted) + assert_equal 1, variants_targ.size + assert_equal 4, variants_targ[0].attribute_map['teststatus'] + assert_equal 8, variants_targ[0].attribute_map['gene'] + + unknown_test_status_fs = build_raw_record('pseudo_id1' => 'bob') + unknown_test_status_fs.raw_fields['moleculartestingtype'] = 'Full Screen' + unknown_test_status_fs.raw_fields['genotype'] = 'M' + positive_genes=[] + genotypes=[] + variants_fs = @handler.unknown_status(@genotype, genotypes, positive_genes, unknown_test_status_fs) + assert_equal 2, variants_fs.size + end + + test 'process_multi_variants_no_gene' do + multiple_cdnavariants_record_no_gene_record = build_raw_record('pseudo_id1' => 'bob') + multiple_cdnavariants_record_no_gene_record.raw_fields['genotype'] = 'c.5266dup c.1258G>T' + variants = @handler.process_variants_from_record(@genotype, multiple_cdnavariants_record_no_gene_record) + assert_equal 2, variants.size + assert_equal 2, variants[0].attribute_map['teststatus'] + assert_equal 2, variants[1].attribute_map['teststatus'] + assert_nil(variants[0].attribute_map['gene']) + assert_nil(variants[1].attribute_map['gene']) + assert_equal 'c.5266dup', variants[0].attribute_map['codingdnasequencechange'] + assert_equal 'c.1258G>T', variants[1].attribute_map['codingdnasequencechange'] + end + test 'process_multiple_cdnavariants_protein_for_same_gene' do multiple_cdnavariants_record = build_raw_record('pseudo_id1' => 'bob') multiple_cdnavariants_record.raw_fields['genotype'] = 'BR1 c.3005delA, c.3119G>A (p.Ser1040Asn)' @@ -151,8 +247,6 @@ def setup test 'process_multiple_cdnavariants_for_same_gene' do multiple_cdnavariants_record = build_raw_record('pseudo_id1' => 'bob') multiple_cdnavariants_record.raw_fields['genotype'] = 'BR1 c.3052ins5 (c.3048dupTGAGA)' - @logger.expects(:debug).with('SUCCESSFUL gene parse for BRCA1') - @logger.expects(:debug).with('SUCCESSFUL gene parse for BRCA1') variants = @handler.process_variants_from_record(@genotype, multiple_cdnavariants_record) assert_equal 2, variants.size assert_equal 2, variants[0].attribute_map['teststatus'] @@ -192,9 +286,6 @@ def setup test 'process_single_exonvariant' do single_exon_variant_record = build_raw_record('pseudo_id1' => 'bob') single_exon_variant_record.raw_fields['genotype'] = 'Dup 13 BR1' - @logger.expects(:debug).with('SUCCESSFUL gene parse for BRCA1') - @logger.expects(:debug).with('SUCCESSFUL exon variant parse for: Dup 13 BR1') - @logger.expects(:debug).with('FAILED protein parse for: Dup 13 BR1') @handler.process_variants_from_record(@genotype, single_exon_variant_record) assert_equal 2, @genotype.attribute_map['teststatus'] assert_equal '13', @genotype.attribute_map['exonintroncodonnumber'] @@ -203,10 +294,6 @@ def setup fullscreen_exon_variant_record.raw_fields['moleculartestingtype'] = 'Full Screen' fullscreen_exon_variant_record.raw_fields['genotype'] = 'Dup 13 BR1' assert_equal true, @handler.full_screen?(fullscreen_exon_variant_record) - @logger.expects(:debug).with('SUCCESSFUL gene parse for BRCA2') - @logger.expects(:debug).with('SUCCESSFUL gene parse for BRCA1') - @logger.expects(:debug).with('SUCCESSFUL exon variant parse for: Dup 13 BR1') - @logger.expects(:debug).with('FAILED protein parse for: Dup 13 BR1') variants = @handler.process_variants_from_record(@genotype, fullscreen_exon_variant_record) assert_equal 1, variants[0].attribute_map['teststatus'] assert_equal 8, variants[0].attribute_map['gene'] @@ -217,22 +304,16 @@ def setup test 'process_failed_record' do failed_record_nogene = build_raw_record('pseudo_id1' => 'bob') failed_record_nogene.raw_fields['genotype'] = 'Failed' - @logger.expects(:debug).with('Unable to extract gene') - @logger.expects(:debug).with('FAILED gene parse for: Failed') @handler.process_variants_from_record(@genotype, failed_record_nogene) assert_equal 9, @genotype.attribute_map['teststatus'] failed_record_gene = build_raw_record('pseudo_id1' => 'bob') failed_record_gene.raw_fields['genotype'] = 'Failed BR1' - @logger.expects(:debug).with('SUCCESSFUL gene parse for BRCA1') @handler.process_variants_from_record(@genotype, failed_record_gene) assert_equal 9, @genotype.attribute_map['teststatus'] assert_equal 7, @genotype.attribute_map['gene'] fullscreen_failed_record = build_raw_record('pseudo_id1' => 'bob') fullscreen_failed_record.raw_fields['genotype'] = 'Failed' fullscreen_failed_record.raw_fields['moleculartestingtype'] = 'Full Screen' - @logger.expects(:debug).with('Unable to extract gene') - @logger.expects(:debug).with('SUCCESSFUL gene parse for BRCA1') - @logger.expects(:debug).with('SUCCESSFUL gene parse for BRCA2') variants = @handler.process_variants_from_record(@genotype, fullscreen_failed_record) assert_equal 2, variants.size assert_equal 9, variants[0].attribute_map['teststatus'] @@ -245,17 +326,12 @@ def setup no_gene_normal_genotype_record = build_raw_record('pseudo_id1' => 'bob') no_gene_normal_genotype_record.raw_fields['genotype'] = 'Normal' assert_equal true, @handler.normal?(no_gene_normal_genotype_record) - @logger.expects(:debug).with('Unable to extract gene') - @logger.expects(:debug).with('FAILED gene parse for: Normal') @handler.process_variants_from_record(@genotype, no_gene_normal_genotype_record) assert_equal 1, @genotype.attribute_map['teststatus'] assert_nil(@genotype.attribute_map['gene']) normal_genotype_record_with_gene = build_raw_record('pseudo_id1' => 'bob') normal_genotype_record_with_gene.raw_fields['genotype'] = 'N' normal_genotype_record_with_gene.raw_fields['moleculartestingtype'] = 'BRCA1 predictive test' - @logger.expects(:debug).with('Unable to extract gene') - @logger.expects(:debug).with('SUCCESSFUL gene parse for BRCA1') - @logger.expects(:debug).with('SUCCESSFUL gene parse for: BRCA1') @handler.process_variants_from_record(@genotype, normal_genotype_record_with_gene) assert_equal true, @handler.normal?(no_gene_normal_genotype_record) assert_equal 7, @genotype.attribute_map['gene'] @@ -263,7 +339,6 @@ def setup normal_mtype_record_with_gene = build_raw_record('pseudo_id1' => 'bob') normal_mtype_record_with_gene.raw_fields['genotype'] = 'BR1 c.68_69delAG' normal_mtype_record_with_gene.raw_fields['moleculartestingtype'] = 'Predictive - unaffected' - @logger.expects(:debug).with('SUCCESSFUL gene parse for BRCA1') @handler.process_variants_from_record(@genotype, normal_mtype_record_with_gene) assert_equal true, @handler.normal?(no_gene_normal_genotype_record) assert_equal 7, @genotype.attribute_map['gene'] @@ -271,9 +346,6 @@ def setup fs_normal_mtype_record_with_gene = build_raw_record('pseudo_id1' => 'bob') fs_normal_mtype_record_with_gene.raw_fields['genotype'] = 'N' fs_normal_mtype_record_with_gene.raw_fields['moleculartestingtype'] = 'Full Screen - unaffected' - @logger.expects(:debug).with('Unable to extract gene') - @logger.expects(:debug).with('SUCCESSFUL gene parse for BRCA1') - @logger.expects(:debug).with('SUCCESSFUL gene parse for BRCA2') variants = @handler.process_variants_from_record(@genotype, fs_normal_mtype_record_with_gene) assert_equal true, @handler.normal?(fs_normal_mtype_record_with_gene) assert_equal true, @handler.full_screen?(fs_normal_mtype_record_with_gene)