Skip to content

Commit 7bd06a1

Browse files
authored
Add new variables to Birmingham germline importer (#180)
* new indications added to constants to import missing SRIs following casref * Added test in for new PC indication, 3 possible teststatus scenarios * re-adding test method that was deleted in error * added a missed addition to constants file * Added comments on new test and added additional test for BAP1 indication * edited tests and added new moleculartestingtype * corrected BAP1 test * Update gene in test method
1 parent fb6af9f commit 7bd06a1

File tree

3 files changed

+138
-7
lines changed

3 files changed

+138
-7
lines changed

lib/import/helpers/colorectal/providers/rq3/rq3_constants.rb

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,22 @@ module Rq3Constants
1818
'indirect testing' => :full_screen,
1919
'pold1/ pole analysis' => :full_screen,
2020
'prenatal diagnosis' => :targeted_mutation,
21-
'presymptomatic' => :targeted_mutation }.freeze
21+
'presymptomatic' => :targeted_mutation,
22+
'mainstreaming' => :full_screen }.freeze
2223

2324
COLORECTAL_GENES_MAP = { 'PJS' => %w[STK11],
2425
'PHTS' => %w[PTEN],
2526
'MAP' => %w[MUTYH],
2627
'FAP' => %w[APC],
2728
'PPAP' => %w[POLE POLD1],
2829
'COCA' => %w[MLH1 MSH2],
29-
'POLY' => %w[APC MUTYH],
30-
'NGS_COLON' => %w[MLH1 MSH2 MSH6 APC MUTYH],
30+
'POLY' => %w[APC MUTYH NTHL1],
31+
'NGS_COLON' => %w[MLH1 MSH2 MSH6 APC MUTYH NTHL1],
3132
'COLON' => %w[MLH1 MSH2 MSH6 PMS2 APC MUTYH PTEN
32-
SMAD4 BMPR1A STK11],
33-
'HNPCC' => %w[MLH1 MSH2 MSH6 PMS2 EPCAM] }.freeze
33+
SMAD4 BMPR1A STK11 NTHL1],
34+
'HNPCC' => %w[MLH1 MSH2 MSH6 PMS2 EPCAM],
35+
'PC' => %w[BRCA1 BRCA2 ATM CHEK2 PALB2 MLH1 MLH2 MSH6], #contents of the R430 panel
36+
'BAP1' => %w[BAP1]}.freeze
3437

3538
COLORECTAL_GENES_REGEX = /(?<colorectal>APC|
3639
BMPR1A|
@@ -45,7 +48,16 @@ module Rq3Constants
4548
PTEN|
4649
SMAD4|
4750
STK11|
48-
TACSTD1)/xi.freeze
51+
TACSTD1|
52+
BAP1|
53+
NTHL1|
54+
GREM1|
55+
RNF43|
56+
BRCA1|
57+
BRCA2|
58+
ATM|
59+
CHEK2|
60+
PALB2)/xi.freeze
4961

5062
CDNA_REGEX = /c\.(?<cdna>([0-9]+[^[:alnum:]][0-9][^[:alnum:]][0-9]+
5163
[^[:alnum:]][0-9][a-z]+)|

lib/import/helpers/colorectal/providers/rq3/rq3_helper.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,8 @@ def sometimes_tested?(record)
275275
record.raw_fields['indication'] == 'HNPCC' ||
276276
record.raw_fields['indication'] == 'COLON' ||
277277
record.raw_fields['indication'] == 'NGS_COLON' ||
278-
record.raw_fields['indication'] == 'POLY'
278+
record.raw_fields['indication'] == 'POLY' ||
279+
record.raw_fields['indication'] == 'PC'
279280
end
280281

281282
def process_testresult_multiple_cdnavariant

test/lib/import/colorectal/providers/birmingham/birmingham_handler_colorectal_test.rb

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ def setup
1616
@record.raw_fields['moleculartestingtype'] = 'RNA studies'
1717
@handler.process_genetictestscope(@genotype, @record)
1818
assert_equal 'Unable to assign Colorectal Lynch or MMR genetictestscope', @genotype.attribute_map['genetictestscope']
19+
@record.raw_fields['moleculartestingtype'] = 'Mainstreaming'
20+
@handler.process_genetictestscope(@genotype, @record)
21+
assert_equal 'Full screen Colorectal Lynch or MMR', @genotype.attribute_map['genetictestscope']
1922
end
2023

2124
test 'process_multiple_tests_from_fullscreen' do
@@ -176,6 +179,121 @@ def setup
176179
assert_equal 62, genocolorectals[0].attribute_map['gene']
177180
end
178181

182+
test 'process_variants_from_report_new_pc_indication_two_genes' do
183+
# where 2 genes are indicated in the report field
184+
pathogenic_record = build_raw_record('pseudo_id1' => 'bob')
185+
pathogenic_record.raw_fields['indication'] = 'PC'
186+
pathogenic_record.raw_fields['report'] = 'Next Generation Sequencing of coding regions in BRCA1 (NM_007294.4) and BRCA2 (NM_000059.3) (Illumina TruSight Hereditary Cancer Panel)'
187+
pathogenic_record.raw_fields['overall2'] = 'Pathogenic'
188+
pathogenic_record.raw_fields['teststatus'] = 'Heterozygous pathogenic variant c.1234_5678del p.(Asn1234Lysfs*3) identified in the BRCA2 gene in germline blood DNA'
189+
processor = variant_processor_for(pathogenic_record)
190+
genocolorectals = processor.process_variants_from_report
191+
assert_equal 1, genocolorectals[0].attribute_map['teststatus']
192+
assert_equal 7, genocolorectals[0].attribute_map['gene']
193+
assert_equal 2, genocolorectals[1].attribute_map['teststatus']
194+
assert_equal 'p.Asn1234LysfsTer3', genocolorectals[1].attribute_map['proteinimpact']
195+
assert_equal 'c.1234_5678delp', genocolorectals[1].attribute_map['codingdnasequencechange']
196+
assert_equal 8, genocolorectals[1].attribute_map['gene']
197+
198+
normal_record = build_raw_record('pseudo_id1' => 'bob')
199+
normal_record.raw_fields['indication'] = 'PC'
200+
normal_record.raw_fields['report'] = 'Next Generation Sequencing of coding regions in BRCA1 (NM_007294.4) and BRCA2 (NM_000059.3) (Illumina TruSight Hereditary Cancer Panel)'
201+
normal_record.raw_fields['overall2'] = 'Normal'
202+
normal_record.raw_fields['teststatus'] = 'No evidence of a pathogenic variant in BRCA1 or BRCA2'
203+
processor = variant_processor_for(normal_record)
204+
genocolorectals2 = processor.process_variants_from_report
205+
assert_equal 1, genocolorectals2[0].attribute_map['teststatus']
206+
assert_equal 7, genocolorectals2[0].attribute_map['gene']
207+
assert_equal 1, genocolorectals2[1].attribute_map['teststatus']
208+
assert_equal 8, genocolorectals2[1].attribute_map['gene']
209+
end
210+
211+
test 'process_variants_from_report_new_pc_indication_8_standard_genes' do
212+
# where 8 genes are indicated in the report field
213+
normal_record = build_raw_record('pseudo_id1' => 'bob')
214+
normal_record.raw_fields['indication'] = 'PC'
215+
normal_record.raw_fields['report'] = 'Next Generation Sequencing of coding regions in ATM (NM_000051.3), BRCA1 (NM_007294.4),
216+
BRCA2 (NM_000059.3), CHEK2 exons 2-10 plus codon 367 (NM_007194.4), MLH1 (NM_000249.4),
217+
MSH2 (NM_000251.3), MSH6 (NM_000179.3) and PALB2 (NM_024675.4) (Illumina TruSight Hereditary Cancer Panel)'
218+
normal_record.raw_fields['overall2'] = 'Normal'
219+
normal_record.raw_fields['teststatus'] = 'No evidence of a pathogenic variant in BRCA1, BRCA2, MLH1, MSH2, MSH6 or PALB2.'
220+
processor = variant_processor_for(normal_record)
221+
genocolorectals = processor.process_variants_from_report
222+
assert_equal 8, genocolorectals.size
223+
assert(genocolorectals.all? { |g| g.attribute_map['teststatus'] == 1 })
224+
225+
normal_record = build_raw_record('pseudo_id1' => 'bob')
226+
normal_record.raw_fields['indication'] = 'PC'
227+
normal_record.raw_fields['report'] = 'Next Generation Sequencing of coding regions in ATM (NM_000051.3), BRCA1 (NM_007294.4),
228+
BRCA2 (NM_000059.3), CHEK2 exons 2-10 plus codon 367 (NM_007194.4), MLH1 (NM_000249.4),
229+
MSH2 (NM_000251.3), MSH6 (NM_000179.3) and PALB2 (NM_024675.4) (Illumina TruSight Hereditary Cancer Panel)'
230+
normal_record.raw_fields['overall2'] = 'Normal'
231+
normal_record.raw_fields['teststatus'] = 'HHeterozygous pathogenic variant c.1447C>T p.(Gln483*) identified in the MLH1 gene.'
232+
processor = variant_processor_for(normal_record)
233+
genocolorectals2 = processor.process_variants_from_report
234+
assert_equal 8, genocolorectals2.size
235+
assert_equal 1, genocolorectals2[4].attribute_map['teststatus']
236+
assert_nil genocolorectals2[4].attribute_map['codingdnasequencechange']
237+
assert_nil genocolorectals2[4].attribute_map['proteinimpact']
238+
assert_equal 2744, genocolorectals2[4].attribute_map['gene']
239+
end
240+
241+
test 'process_variants_from_report_new_pc_indication_nine_genes' do
242+
# where 9 genes are indicated in the report field
243+
uv_record = build_raw_record('pseudo_id1' => 'bob')
244+
uv_record.raw_fields['indication'] = 'PC'
245+
uv_record.raw_fields['overall2'] = 'UV'
246+
uv_record.raw_fields['report'] = 'Next Generation Sequencing of coding regions in ATM (NM_000051.3), BRCA1 (NM_007294.4),
247+
BRCA2 (NM_000059.3), CHEK2 exons 2-10 plus codon 367 (NM_007194.4), MLH1 (NM_000249.4),
248+
MSH2 (NM_000251.3), MSH6 (NM_000179.3) and PALB2 (NM_024675.4). MLPA of EPCAM.'
249+
uv_record.raw_fields['teststatus'] = 'Heterozygous inframe deletion variant of uncertain significance c.12_34del p.(Asp12_Leu17del) detected in the MLH1 gene'
250+
processor = variant_processor_for(uv_record)
251+
genocolorectals = processor.process_variants_from_report
252+
assert_equal 9, genocolorectals.size
253+
assert_equal 2744, genocolorectals[8].attribute_map['gene']
254+
assert_equal 2, genocolorectals[8].attribute_map['teststatus']
255+
assert_equal 3, genocolorectals[8].attribute_map['variantpathclass']
256+
assert_equal 'c.12_34delp', genocolorectals[8].attribute_map['codingdnasequencechange']
257+
258+
normal_record = build_raw_record('pseudo_id1' => 'bob')
259+
normal_record.raw_fields['indication'] = 'PC'
260+
normal_record.raw_fields['overall2'] = 'Normal'
261+
normal_record.raw_fields['report'] = 'Next Generation Sequencing of coding regions in ATM (NM_000051.3), BRCA1 (NM_007294.4),
262+
BRCA2 (NM_000059.3), CHEK2 exons 2-10 plus codon 367 (NM_007194.4), MLH1 (NM_000249.4),
263+
MSH2 (NM_000251.3), MSH6 (NM_000179.3) and PALB2 (NM_024675.4). MLPA of EPCAM.'
264+
normal_record.raw_fields['teststatus'] = 'No evidence of a pathogenic variant in BRCA1, BRCA2, MLH1, MSH2, MSH6 or PALB2.'
265+
processor = variant_processor_for(normal_record)
266+
genocolorectals = processor.process_variants_from_report
267+
assert_equal 9, genocolorectals.size
268+
assert(genocolorectals.all? { |g| g.attribute_map['teststatus'] == 1 })
269+
end
270+
271+
272+
test 'process_variants_from_report_new_bap1_indication' do
273+
pathogenic_record = build_raw_record('pseudo_id1' => 'bob')
274+
pathogenic_record.raw_fields['indication'] = 'BAP1'
275+
pathogenic_record.raw_fields['report'] = 'Sanger sequencing analysis was used to detect the familial variant in the BAP1 gene. '
276+
pathogenic_record.raw_fields['overall2'] = 'Pathogenic'
277+
pathogenic_record.raw_fields['teststatus'] = 'Molecular analysis shows the presence of the familial pathogenic variant c.123-1G>A in the BAP1 gene'
278+
processor = variant_processor_for(pathogenic_record)
279+
genocolorectal = processor.process_variants_from_report
280+
assert_equal 1, genocolorectal.size
281+
assert_equal 2, genocolorectal[0].attribute_map['teststatus']
282+
assert_equal 'c.123-1G>A', genocolorectal[0].attribute_map['codingdnasequencechange']
283+
assert_equal 517, genocolorectal[0].attribute_map['gene']
284+
285+
normal_record = build_raw_record('pseudo_id1' => 'bob')
286+
normal_record.raw_fields['indication'] = 'BAP1'
287+
normal_record.raw_fields['report'] = 'Next Generation Sequencing of coding regions in BAP1 (NM_004656.4) (Illumina TruSight Hereditary Cancer Panel'
288+
normal_record.raw_fields['overall2'] = 'Normal'
289+
normal_record.raw_fields['teststatus'] = 'Molecular analysis shows no evidence of the familial pathogenic variant in the BAP1 gene'
290+
processor = variant_processor_for(normal_record)
291+
genocolorectal2 = processor.process_variants_from_report
292+
assert_equal 1, genocolorectal2.size
293+
assert_equal 1, genocolorectal2[0].attribute_map['teststatus']
294+
assert_equal 517, genocolorectal2[0].attribute_map['gene']
295+
end
296+
179297
private
180298

181299
def variant_processor_for(record)

0 commit comments

Comments
 (0)