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
Original file line number Diff line number Diff line change
Expand Up @@ -219,17 +219,19 @@ def no_scope?(genocolorectal)

def process_fullscreen_records(genocolorectal, record, genocolorectals)
genotype_str = record.raw_fields['genotype']
if normal?(genotype_str)
process_normal_full_screen(genocolorectal, genocolorectals)
elsif positive_cdna?(genotype_str) || positive_exonvariant?(genotype_str)
if positive_cdna?(genotype_str) || positive_exonvariant?(genotype_str)
process_variant_fs_records(genocolorectal, record, genocolorectals)
elsif only_protein_impact?(genotype_str)
process_only_protein_rec(genocolorectal, record, genocolorectals)
positive_gene = get_gene(record)
negative_genes = @genes_set - positive_gene
add_other_genes_with_status(negative_genes, genocolorectal, genocolorectals, 1)
elsif normal?(genotype_str)
process_normal_full_screen(genocolorectal, genocolorectals)
elsif genotype_str.scan(/see\sbelow|comments/ix).size.positive?
add_other_genes_with_status(@genes_set, genocolorectal, genocolorectals, 4)
else # else give a test status of 4 (unknown)
add_other_genes_with_status(@genes_set, genocolorectal, genocolorectals, 4)
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/import/helpers/colorectal/providers/rcu/constants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ module Constants

# rubocop:disable Lint/MixedRegexpCaptureTypes
NORMAL_VAR_REGEX = %r{(?<not>no|not)[a-z /]+
(?<det>detected|reported|deteected|deteceted|present)+}ix.freeze
(?<det>detected|reported|deteected|deteceted|present|identified)+}ix.freeze

CDNA_REGEX = /c\.\[?(?<cdna>
([0-9]+[+>_-][0-9][+>_-][0-9]+[+>_-][0-9][ACGTdelinsup]+)|
Expand Down
16 changes: 16 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 @@ -78,6 +78,22 @@ def setup
assert_nil genotypes[1].attribute_map['codingdnasequencechange']
end

test 'normal_full_screen_new_variable' do
normal_fs_record = build_raw_record('pseudo_id1' => 'bob')
normal_fs_record.raw_fields['genetictestscope'] = 'Breast & Ovarian cancer panel'
normal_fs_record.raw_fields['karyotypingmethod'] = 'BRCA1 and BRCA2'
normal_fs_record.raw_fields['genotype'] = 'A genetic cause for this individuals clinical presentation has not been identified'
@handler.add_test_scope_from_geno_karyo(@genotype, normal_fs_record)
genotypes = @handler.process_variants_from_record(@genotype, normal_fs_record)
assert_equal 2, genotypes.size
assert_equal 1, genotypes[0].attribute_map['teststatus']
assert_equal 1, genotypes[1].attribute_map['teststatus']
assert_equal 7, genotypes[0].attribute_map['gene']
assert_equal 8, genotypes[1].attribute_map['gene']
assert_nil genotypes[0].attribute_map['proteinimpact']
assert_nil genotypes[1].attribute_map['codingdnasequencechange']
end

test 'failed_full_screen' do
fail_fs_record = build_raw_record('pseudo_id1' => 'bob')
fail_fs_record.raw_fields['genetictestscope'] = 'Breast & Ovarian cancer panel'
Expand Down
Loading