This repository was archived by the owner on Sep 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,6 +79,135 @@ def test_checks_by_source_id_kras(self, conn):
7979 ]
8080 assert "KRAS" in kras
8181
82+ # KBDEV-1163
83+ # Testing if the addition of Ensembl protein Features are limiting results
84+ # returned by get_equivalent_features() since SimilatTo queryType queries
85+ # aren't traversing the graph to it's whole depth.
86+ @pytest .mark .skipif (EXCLUDE_INTEGRATION_TESTS , reason = "excluding data-specific test" )
87+ def test_ensembl_protein (self , conn ):
88+ for feature , expected in [
89+ # Sample
90+ (
91+ 'EGFR' ,
92+ [
93+ 'EGFR' ,
94+ 'ERBB' ,
95+ 'ENSG00000146648' ,
96+ 'ENSG00000146648.17' ,
97+ 'ENST00000275493' ,
98+ 'ENST00000275493.6' ,
99+ 'NM_001346897' ,
100+ 'NM_001346897.2' ,
101+ 'NP_001333826' ,
102+ 'NP_001333826.1' ,
103+ ],
104+ ),
105+ (
106+ 'NM_001346897' ,
107+ [
108+ 'EGFR' ,
109+ 'ERBB' ,
110+ 'ENSG00000146648' ,
111+ 'ENSG00000146648.17' ,
112+ 'NM_001346897' ,
113+ 'NM_001346897.2' ,
114+ 'NP_001333826' ,
115+ 'NP_001333826.1' ,
116+ ],
117+ ),
118+ (
119+ 'NM_001346897.2' ,
120+ [
121+ 'EGFR' ,
122+ 'ERBB' ,
123+ 'ENSG00000146648' ,
124+ 'ENSG00000146648.17' ,
125+ 'NM_001346897' ,
126+ 'NM_001346897.2' ,
127+ 'NP_001333826' ,
128+ 'NP_001333826.1' ,
129+ ],
130+ ),
131+ (
132+ 'NP_001333826' ,
133+ [
134+ 'EGFR' ,
135+ 'ERBB' ,
136+ 'ENSG00000146648' , # Warn: Versionized ENSG won't be returned due to API limitations
137+ 'NM_001346897' ,
138+ 'NM_001346897.2' ,
139+ 'NP_001333826' ,
140+ 'NP_001333826.1' ,
141+ ],
142+ ),
143+ (
144+ 'NP_001333826.1' ,
145+ [
146+ 'EGFR' ,
147+ 'ERBB' ,
148+ 'ENSG00000146648' , # Warn: Versionized ENSG won't be returned due to API limitations
149+ 'NM_001346897' ,
150+ 'NM_001346897.2' ,
151+ 'NP_001333826' ,
152+ 'NP_001333826.1' ,
153+ ],
154+ ),
155+ (
156+ 'ENSG00000146648' ,
157+ [
158+ 'EGFR' ,
159+ 'ERBB' ,
160+ 'ENSG00000146648' ,
161+ 'ENSG00000146648.17' ,
162+ 'ENST00000275493' ,
163+ 'ENST00000275493.6' ,
164+ 'NM_001346897' ,
165+ 'NM_001346897.2' ,
166+ 'NP_001333826' , # Warn: Versionized NP won't be returned due to API limitations
167+ ],
168+ ),
169+ (
170+ 'ENSG00000146648.17' ,
171+ [
172+ 'EGFR' ,
173+ 'ERBB' ,
174+ 'ENSG00000146648' ,
175+ 'ENSG00000146648.17' ,
176+ 'ENST00000275493' ,
177+ 'ENST00000275493.6' ,
178+ 'NM_001346897' ,
179+ 'NM_001346897.2' ,
180+ 'NP_001333826' , # Warn: Versionized NP won't be returned due to API limitations
181+ ],
182+ ),
183+ (
184+ 'ENST00000275493' ,
185+ [
186+ 'EGFR' ,
187+ 'ERBB' ,
188+ 'ENSG00000146648' ,
189+ 'ENSG00000146648.17' ,
190+ 'ENST00000275493' ,
191+ 'ENST00000275493.6' ,
192+ ],
193+ ),
194+ (
195+ 'ENST00000275493.6' ,
196+ [
197+ 'EGFR' ,
198+ 'ERBB' ,
199+ 'ENSG00000146648' ,
200+ 'ENSG00000146648.17' ,
201+ 'ENST00000275493' ,
202+ 'ENST00000275493.6' ,
203+ ],
204+ ),
205+ ]:
206+ equivalent_features = match .get_equivalent_features (conn , feature )
207+ equivalent_features = [el ['displayName' ] for el in equivalent_features ]
208+ for equivalent_feature in expected :
209+ assert equivalent_feature in equivalent_features
210+
82211
83212class TestMatchCopyVariant :
84213 def test_bad_category (self , conn ):
You can’t perform that action at this time.
0 commit comments