1111
1212PREFERRED_GENE_SOURCE = "#39:5" # HGNC
1313
14- BASE_RETURN_PROPERTIES = [' @rid' , ' @class' ]
14+ BASE_RETURN_PROPERTIES = [" @rid" , " @class" ]
1515
1616GENERIC_RETURN_PROPERTIES = [
17- ' name' ,
18- ' sourceId' ,
19- ' sourceIdVersion' ,
20- ' source.name' ,
21- ' source.@rid' ,
22- ' displayName' ,
23- ' deprecated' ,
17+ " name" ,
18+ " sourceId" ,
19+ " sourceIdVersion" ,
20+ " source.name" ,
21+ " source.@rid" ,
22+ " displayName" ,
23+ " deprecated" ,
2424] + BASE_RETURN_PROPERTIES
2525
26- GENE_RETURN_PROPERTIES = [' biotype' ] + GENERIC_RETURN_PROPERTIES
26+ GENE_RETURN_PROPERTIES = [" biotype" ] + GENERIC_RETURN_PROPERTIES
2727
2828VARIANT_RETURN_PROPERTIES = (
2929 BASE_RETURN_PROPERTIES
30- + [f' type.{ p } ' for p in GENERIC_RETURN_PROPERTIES ]
31- + [f' reference1.{ p } ' for p in GENE_RETURN_PROPERTIES ]
32- + [f' reference2.{ p } ' for p in GENE_RETURN_PROPERTIES ]
33- + [' zygosity' , ' germline' , ' displayName' ]
30+ + [f" type.{ p } " for p in GENERIC_RETURN_PROPERTIES ]
31+ + [f" reference1.{ p } " for p in GENE_RETURN_PROPERTIES ]
32+ + [f" reference2.{ p } " for p in GENE_RETURN_PROPERTIES ]
33+ + [" zygosity" , " germline" , " displayName" ]
3434)
3535
3636POS_VARIANT_RETURN_PROPERTIES = VARIANT_RETURN_PROPERTIES + [
37- ' break1Start' ,
38- ' break1End' ,
39- ' break2Start' ,
40- ' break2End' ,
41- ' break1Repr' ,
42- ' break2Repr' ,
43- ' refSeq' ,
44- ' untemplatedSeq' ,
45- ' untemplatedSeqSize' ,
46- ' truncation' ,
47- ' assembly' ,
37+ " break1Start" ,
38+ " break1End" ,
39+ " break2Start" ,
40+ " break2End" ,
41+ " break1Repr" ,
42+ " break2Repr" ,
43+ " refSeq" ,
44+ " untemplatedSeq" ,
45+ " untemplatedSeqSize" ,
46+ " truncation" ,
47+ " assembly" ,
4848]
4949
5050STATEMENT_RETURN_PROPERTIES = (
5151 BASE_RETURN_PROPERTIES
52- + [' displayNameTemplate' , ' sourceId' , ' source.name' , ' source.displayName' ]
53- + [f' conditions.{ p } ' for p in GENERIC_RETURN_PROPERTIES ]
54- + [f' subject.{ p } ' for p in GENERIC_RETURN_PROPERTIES ]
55- + [f' evidence.{ p } ' for p in GENERIC_RETURN_PROPERTIES ]
56- + [f' relevance.{ p } ' for p in GENERIC_RETURN_PROPERTIES ]
57- + [f' evidenceLevel.{ p } ' for p in GENERIC_RETURN_PROPERTIES ]
58- + [' reviewStatus' ]
52+ + [" displayNameTemplate" , " sourceId" , " source.name" , " source.displayName" ]
53+ + [f" conditions.{ p } " for p in GENERIC_RETURN_PROPERTIES ]
54+ + [f" subject.{ p } " for p in GENERIC_RETURN_PROPERTIES ]
55+ + [f" evidence.{ p } " for p in GENERIC_RETURN_PROPERTIES ]
56+ + [f" relevance.{ p } " for p in GENERIC_RETURN_PROPERTIES ]
57+ + [f" evidenceLevel.{ p } " for p in GENERIC_RETURN_PROPERTIES ]
58+ + [" reviewStatus" ]
5959)
6060
6161
62- ONCOKB_SOURCE_NAME = ' oncokb'
63- ONCOGENE = ' oncogenic'
64- TUMOUR_SUPPRESSIVE = ' tumour suppressive'
65- FUSION_NAMES = [' structural variant' , ' fusion' ]
62+ ONCOKB_SOURCE_NAME = " oncokb"
63+ ONCOGENE = " oncogenic"
64+ TUMOUR_SUPPRESSIVE = " tumour suppressive"
65+ FUSION_NAMES = [" structural variant" , " fusion" ]
6666
6767PHARMACOGENOMIC_SOURCE_EXCLUDE_LIST = ["cancer genome interpreter" , "civic" ]
6868
69- BASE_THERAPEUTIC_TERMS = [' therapeutic efficacy' , ' eligibility' ]
69+ BASE_THERAPEUTIC_TERMS = [" therapeutic efficacy" , " eligibility" ]
7070# the order here is the order these are applied, the first category matched is returned
7171RELEVANCE_BASE_TERMS : CategoryBaseTermMapping = [
72- (' therapeutic' , BASE_THERAPEUTIC_TERMS ),
73- (' diagnostic' , [' diagnostic indicator' ]),
74- (' prognostic' , [' prognostic indicator' ]),
75- (' pharmacogenomic' , [' metabolism' , ' toxicity' , ' dosage' ]),
76- (' cancer predisposition' , [' pathogenic' ]),
77- (' biological' , [' functional effect' , ' tumourigenesis' , ' predisposing' ]),
72+ (" therapeutic" , BASE_THERAPEUTIC_TERMS ),
73+ (" diagnostic" , [" diagnostic indicator" ]),
74+ (" prognostic" , [" prognostic indicator" ]),
75+ (" pharmacogenomic" , [" metabolism" , " toxicity" , " dosage" ]),
76+ (" cancer predisposition" , [" pathogenic" ]),
77+ (" biological" , [" functional effect" , " tumourigenesis" , " predisposing" ]),
7878]
79- FAILED_REVIEW_STATUS = ' failed'
79+ FAILED_REVIEW_STATUS = " failed"
8080
81- CHROMOSOMES_HG38 = [f"chr{ i } " for i in range (1 , 23 )] + [' chrX' , ' chrY' , ' chrM' ]
82- CHROMOSOMES_HG19 = [str (i ) for i in range (1 , 23 )] + ['x' , 'y' , 'mt' ]
81+ CHROMOSOMES_HG38 = [f"chr{ i } " for i in range (1 , 23 )] + [" chrX" , " chrY" , " chrM" ]
82+ CHROMOSOMES_HG19 = [str (i ) for i in range (1 , 23 )] + ["x" , "y" , "mt" ]
8383CHROMOSOMES = CHROMOSOMES_HG38 + CHROMOSOMES_HG19
8484
85- AMBIGUOUS_AA = ['x' , '?' , 'X' ]
85+ AMBIGUOUS_AA = ["x" , "?" , "X" ]
8686AA_3to1_MAPPING = {
87- ' Ala' : 'A' ,
88- ' Arg' : 'R' ,
89- ' Asn' : 'N' ,
90- ' Asp' : 'D' ,
91- ' Asx' : 'B' ,
92- ' Cys' : 'C' ,
93- ' Glu' : 'E' ,
94- ' Gln' : 'Q' ,
95- ' Glx' : 'Z' ,
96- ' Gly' : 'G' ,
97- ' His' : 'H' ,
98- ' Ile' : 'I' ,
99- ' Leu' : 'L' ,
100- ' Lys' : 'K' ,
101- ' Met' : 'M' ,
102- ' Phe' : 'F' ,
103- ' Pro' : 'P' ,
104- ' Ser' : 'S' ,
105- ' Thr' : 'T' ,
106- ' Trp' : 'W' ,
107- ' Tyr' : 'Y' ,
108- ' Val' : 'V' ,
109- ' Ter' : '*' ,
87+ " Ala" : "A" ,
88+ " Arg" : "R" ,
89+ " Asn" : "N" ,
90+ " Asp" : "D" ,
91+ " Asx" : "B" ,
92+ " Cys" : "C" ,
93+ " Glu" : "E" ,
94+ " Gln" : "Q" ,
95+ " Glx" : "Z" ,
96+ " Gly" : "G" ,
97+ " His" : "H" ,
98+ " Ile" : "I" ,
99+ " Leu" : "L" ,
100+ " Lys" : "K" ,
101+ " Met" : "M" ,
102+ " Phe" : "F" ,
103+ " Pro" : "P" ,
104+ " Ser" : "S" ,
105+ " Thr" : "T" ,
106+ " Trp" : "W" ,
107+ " Tyr" : "Y" ,
108+ " Val" : "V" ,
109+ " Ter" : "*" ,
110110}
111111
112112
@@ -128,47 +128,89 @@ def __getitem__(self, key):
128128
129129
130130INPUT_COPY_CATEGORIES = IterableNamespace (
131- AMP = ' amplification' ,
132- ANY_GAIN = ' copy gain' ,
133- ANY_LOSS = ' copy loss' ,
134- DEEP = ' deep deletion' ,
135- GAIN = ' low level copy gain' ,
136- LOSS = ' shallow deletion' ,
131+ AMP = " amplification" ,
132+ ANY_GAIN = " copy gain" ,
133+ ANY_LOSS = " copy loss" ,
134+ DEEP = " deep deletion" ,
135+ GAIN = " low level copy gain" ,
136+ LOSS = " shallow deletion" ,
137137)
138138INPUT_EXPRESSION_CATEGORIES = IterableNamespace (
139- UP = ' increased expression' , DOWN = ' reduced expression'
139+ UP = " increased expression" , DOWN = " reduced expression"
140140)
141141
142142# From: https://github.com/bcgsc/pori_graphkb_parser/blob/ae3738842a4c208ab30f58c08ae987594d632504/src/constants.ts#L33-L80
143143TYPES_TO_NOTATION : Dict [str , str ] = {
144- ' acetylation' : 'ac' ,
145- ' copy gain' : ' copygain' ,
146- ' copy loss' : ' copyloss' ,
147- ' deletion' : ' del' ,
148- ' duplication' : ' dup' ,
149- ' extension' : ' ext' ,
150- ' frameshift' : 'fs' ,
151- ' fusion' : ' fusion' ,
152- ' indel' : ' delins' ,
153- ' insertion' : ' ins' ,
154- ' inversion' : ' inv' ,
155- ' inverted translocation' : ' itrans' ,
156- ' methylation' : 'me' ,
157- ' missense mutation' : ' mis' ,
158- ' mutation' : ' mut' ,
159- ' nonsense mutation' : '>' ,
160- ' phosphorylation' : ' phos' ,
161- ' splice-site' : ' spl' ,
162- ' substitution' : '>' ,
163- ' translocation' : ' trans' ,
164- ' truncating frameshift mutation' : 'fs' ,
165- ' ubiquitination' : 'ub' ,
144+ " acetylation" : "ac" ,
145+ " copy gain" : " copygain" ,
146+ " copy loss" : " copyloss" ,
147+ " deletion" : " del" ,
148+ " duplication" : " dup" ,
149+ " extension" : " ext" ,
150+ " frameshift" : "fs" ,
151+ " fusion" : " fusion" ,
152+ " indel" : " delins" ,
153+ " insertion" : " ins" ,
154+ " inversion" : " inv" ,
155+ " inverted translocation" : " itrans" ,
156+ " methylation" : "me" ,
157+ " missense mutation" : " mis" ,
158+ " mutation" : " mut" ,
159+ " nonsense mutation" : ">" ,
160+ " phosphorylation" : " phos" ,
161+ " splice-site" : " spl" ,
162+ " substitution" : ">" ,
163+ " translocation" : " trans" ,
164+ " truncating frameshift mutation" : "fs" ,
165+ " ubiquitination" : "ub" ,
166166 # deprecated forms and aliases
167- ' frameshift mutation' : 'fs' ,
168- ' frameshift truncation' : 'fs' ,
169- ' missense variant' : ' mis' ,
170- ' truncating frameshift' : 'fs' ,
171- ' missense' : ' mis' ,
172- ' mutations' : ' mut' ,
173- ' nonsense' : '>' ,
167+ " frameshift mutation" : "fs" ,
168+ " frameshift truncation" : "fs" ,
169+ " missense variant" : " mis" ,
170+ " truncating frameshift" : "fs" ,
171+ " missense" : " mis" ,
172+ " mutations" : " mut" ,
173+ " nonsense" : ">" ,
174174}
175+
176+ # For match.type_screening() [KBDEV-1056]
177+ DEFAULT_NON_STRUCTURAL_VARIANT_TYPE = 'mutation'
178+ STRUCTURAL_VARIANT_SIZE_THRESHOLD = 48 # bp
179+ STRUCTURAL_VARIANT_TYPES = [
180+ "structural variant" ,
181+ "insertion" ,
182+ "in-frame insertion" ,
183+ "deletion" ,
184+ "deletion polymorphism" ,
185+ "in-frame deletion" ,
186+ "translocation" ,
187+ "inverted translocation" ,
188+ "inversion" ,
189+ "indel" ,
190+ "fusion" ,
191+ "out-of-frame fusion" ,
192+ "oncogenic fusion" ,
193+ "in-frame fusion" ,
194+ "disruptive fusion" ,
195+ "duplication" ,
196+ "internal duplication" ,
197+ "tandem duplication" ,
198+ "internal tandem duplication" ,
199+ "itd" ,
200+ "domain duplication" ,
201+ "kinase domain duplication" ,
202+ "copy variant" ,
203+ "copy number variation" ,
204+ "copy number variant" ,
205+ "copy loss" ,
206+ "copy number loss" ,
207+ "shallow deletion" ,
208+ "deep deletion" ,
209+ "gene deletion" ,
210+ "copy gain" ,
211+ "copy number gain" ,
212+ "low level copy gain" ,
213+ "amplification" ,
214+ "focal amplification" ,
215+ "rearrangement" ,
216+ ]
0 commit comments