Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/import/brca/providers/sheffield/sheffield_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -391,12 +391,12 @@ def process_fullscreen_records(genotype, record, genotypes)
genotype_str = record.raw_fields['genotype']
if mlpa_fail?(record)
process_mlpa_fail_full_screen(genotype, record, genotypes)
elsif positive_cdna?(genotype_str) || positive_exonvariant?(genotype_str)
process_variant_fs_records(genotype, record, genotypes)
elsif normal?(record)
process_normal_full_screen(genotype, record, genotypes)
elsif failed_test?(record)
process_failed_full_screen(genotype, record, genotypes)
elsif positive_cdna?(genotype_str) || positive_exonvariant?(genotype_str)
process_variant_fs_records(genotype, record, genotypes)
else
# else give a test status of 4 (unknown)
add_other_genes_with_status(@genes_set, genotype, genotypes, 4)
Expand Down
2 changes: 1 addition & 1 deletion lib/import/helpers/brca/providers/rcu/rcu_constants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ module RcuConstants
([a-z\s]+(?<mutationtype>del(etion)?|duplicati?on|dup(licated)?))?/ix

NORMAL_VAR_REGEX = %r{(?<not>no|not)[a-z /]+
(?<det>detect|report|detet|mutation)+}ix
(?<det>detect|report|detet|mutation|identified)+}ix
# rubocop:enable Lint/MixedRegexpCaptureTypes
end
end
Expand Down
18 changes: 18 additions & 0 deletions test/lib/import/brca/providers/sheffield/sheffield_handler_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,24 @@ def setup
assert_equal 'Targeted BRCA mutation test', genotypes[0].attribute_map['genetictestscope']
end

test 'normal_full_screen_not_identified_case' do
normal_fs_not_identfied_record = build_raw_record('pseudo_id1' => 'bob')
normal_fs_not_identfied_record.raw_fields['genetictestscope'] = 'R208 :: BRCA1 and BRCA2 testing at high familial risk'
normal_fs_not_identfied_record.raw_fields['karyotypingmethod'] = 'R208.1 :: NGS in Leeds'
normal_fs_not_identfied_record.raw_fields['genotype'] = 'A hereditary (germline) genetic cause for this individual’s cancer has not been identified;'
@handler.add_test_scope_from_geno_karyo(@genotype, normal_fs_not_identfied_record)
genotypes = @handler.process_variants_from_record(@genotype, normal_fs_not_identfied_record)
assert_equal 3, genotypes.size
assert_equal 1, genotypes[0].attribute_map['teststatus']
assert_equal 1, genotypes[1].attribute_map['teststatus']
assert_equal 1, genotypes[2].attribute_map['teststatus']
assert_equal 7, genotypes[0].attribute_map['gene']
assert_equal 8, genotypes[1].attribute_map['gene']
assert_equal 3186, genotypes[2].attribute_map['gene']
assert_nil genotypes[0].attribute_map['proteinimpact']
assert_nil genotypes[1].attribute_map['codingdnasequencechange']
end

private

def clinical_json
Expand Down
Loading