prefix table: 774 redundant rows, and 3 prefixes carrying another resource's base
还没有人认领这个 Issue。
评估
调研方向
首先针对 ncbitaxon.db 和 envo.db 重现所提供的查询,重点关注 prefix table 以及列出的重复映射和跨资源映射。将生成的 prefix 数据与预期的资源归属和扩展行为进行比较,然后验证两个数据库中均不存在重复行和非预期映射。
由索引模型根据 Issue 内容生成。
描述
The prefix table ships 1,275 rows that reduce to 489 distinct prefixes. Two separable problems: redundant rows, and prefixes with more than one expansion.
Identical in every build checked, so this is the shipped map rather than ontology content.
SELECT COUNT(*) AS rows, COUNT(DISTINCT prefix) AS distinct_prefixes,
COUNT(DISTINCT prefix||' '||base) AS distinct_pairs FROM prefix;
| rows | distinct_prefixes | distinct_pairs |
|---|---|---|
| 1275 | 489 | 501 |
1. Redundant rows: 774 of 1,275
Same prefix, same base, repeated.
SELECT SUM(extra) AS exact_duplicate_rows FROM
(SELECT COUNT(*)-1 AS extra FROM prefix GROUP BY prefix, base HAVING COUNT(*)>1);
774. 247 prefixes appear exactly 4 times, one appears 8 times.
2. Twelve prefixes have two different expansions
SELECT prefix, COUNT(DISTINCT base) AS n_bases FROM prefix
GROUP BY prefix HAVING n_bases > 1 ORDER BY prefix;
Nine are alternate expansions of the same resource, which may be intended:
| prefix | expansions |
|---|---|
| CHEMINF | obo/CHEMINF_, semanticscience.org/resource/CHEMINF_ |
| FMA | obo/FMA_, purl.org/sig/ont/fma/fma |
| MESH | id.nlm.nih.gov/mesh/, identifiers.org/mesh/ |
| RESID | obo/RESID_, proteininformationresource.org/cgi-bin/resid?id= |
| SWO | obo/SWO_, ebi.ac.uk/swo/SWO_ |
| dbpedia | dbpedia.org/, dbpedia.org/resource/ |
| qudt | qudt.org/schema/qudt#, qudt.org/schema/qudt/ |
| reactome.biopax | reactome.org/biopax/77/48887#, .../81/48887# |
| schema | http://schema.org/, https://schema.org/ |
None collapse under case normalisation (still 12 with lower(base)).
3. Three prefixes carry a different resource's base
| prefix | own base | also mapped to |
|---|---|---|
| complexportal | obo/complexportal_ |
obo/wikipathways_ |
| drugbank | obo/drugbank_ |
obo/drugcentral_ |
| pathbank | obo/pathbank_ |
obo/kegg.genome_ |
wikipathways, drugcentral and kegg.genome have no prefix rows of their own:
SELECT DISTINCT prefix, base FROM prefix
WHERE prefix IN ('wikipathways','drugcentral','kegg.genome');
Returns nothing. Each of those three resources exists in the table only as a base attached to a different prefix.
This resembles the symptom reported in https://github.com/INCATools/semantic-sql/issues/71 (a prefix picking up a neighbouring entry's expansion), which was closed by shipping a newer semsql through ODK rather than by changing the table. I am not claiming the same root cause, only that the shape is still present in current builds.
Relevant because the map is not configurable: https://github.com/INCATools/semantic-sql/issues/51 is still open.
Impact
Any lookup of the form SELECT base FROM prefix WHERE prefix = ? can return either expansion, decided by row order. For the three above it can return a different resource entirely.
Checked against
ncbitaxon.db (downloaded 2026-05-19) and envo.db (downloaded 2026-09-01) from the SemanticSQL CDN. Both give byte-identical prefix sets and the same 1,275 rows, so this is not specific to one ontology or one build date.
- 主要语言
- Python
- 星标
- 70
- 派生
- 7
- 平均合并
- 4 小时 18 分钟
- 30 天内合并 PR
- 1
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
INCATools/semantic-sql 的其他 Issue
-
Migrate direct raw-S3 bbop-sqlite consumers to the semanticsql CDN可能重新可做 @caufieldjh 于 91 天前认领,目前没有进行中的 PR。 未关闭help wanted
INCATools/semantic-sql#115 · 7 条评论 · 已指派 1 人 ·
-
[bot] Cut a semsql release including the semanticsql.berkeleybop.io default可能重新可做 @caufieldjh 于 91 天前认领,目前没有进行中的 PR。 未关闭enhancement
INCATools/semantic-sql#114 · 2 条评论 · 1 个 reaction · 已指派 1 人 ·
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
INCATools/semantic-sql#111 · 1 条评论 ·
-
Integrate ENERO Foundry ontologies into Semantic-SQL可能已有人在做 @cmungall 于 197 天前认领。 未关闭enhancement
难度 4/5 3-5 天 新手友好度 48/100
INCATools/semantic-sql#107 ·
-
documentation
难度 3/5 1-2 天 新手友好度 45/100
INCATools/semantic-sql#106 · 3 条评论 ·
查看 INCATools/semantic-sql 的全部 Issue
相似的 Issue
-
python triage
难度 2/5 1-3 小时 新手友好度 82/100
microsoft/semantic-kernel#14590 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
pinterest/pymemcache#662 ·
维护者通常 1 天内回复
-
难度 2/5 半天 新手友好度 62/100
gnocchixyz/gnocchi#1527 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 64/100
tenstorrent/tt-model-manager#181 ·
维护者通常 1 天内回复