Skip to content

Hide high-fanout PMIDs from the gene Record Literature table#189

Open
stubrown wants to merge 1 commit intoVEuPathDB:masterfrom
stubrown:hide-high-fanout-pmids
Open

Hide high-fanout PMIDs from the gene Record Literature table#189
stubrown wants to merge 1 commit intoVEuPathDB:masterfrom
stubrown:hide-high-fanout-pmids

Conversation

@stubrown
Copy link
Copy Markdown
Member

@stubrown stubrown commented May 1, 2026

pubmed citations from Entrez by gene2pubmed are mostly of low quality - being assigned to huge numbers of genes contributing noise but no biological insight to the Literature section of gene pages.

The PubMed query in the gene Record reads from
ApidbTuning.GenePubmed_p, a denormalized cache of all gene <-> PMID associations across every PubMed-source ExternalDatabase (gene2pubmed, PMID, PubMed, etc.).

This change adds a NOT IN subquery to the existing PubMed query that excludes any pubmed_id whose distinct-gene fanout in ApidbTuning.GenePubmed_p is greater than 100. The data is not modified — the filter is purely at presentation time.

The threshold applies to every PMID in the cache regardless of source. Curator- and Apollo-submitted citations are typically single-gene or low-fanout and pass through; the rare curator entry with >100 gene fanout is filtered alongside the bulk-import noise, which is the intended behavior since high fanout means low per-gene specificity regardless of provenance.

Performance: the subquery operates on ApidbTuning.GenePubmed_p, whose indexes (gpm_gene_idx, gpm_tx_idx) cover pubmed_id and gene_source_id, so the GROUP BY can be index-scanned. If page load latency becomes a concern on larger sites, a follow-up PR can promote the high-fanout PMID list to its own tuning table.

The PubMed query in the gene Record reads from
ApidbTuning.GenePubmed_p, a denormalized cache of all gene <-> PMID
associations across every PubMed-source ExternalDatabase
(gene2pubmed, PMID, PubMed, etc.). A large fraction of these are
high-fanout citations — typically NCBI gene2pubmed bulk-import rows
where the same paper is auto-attached to many unrelated genes,
contributing noise but no biological insight to the Literature
section of gene pages.

This change adds a NOT IN subquery to the existing PubMed query
that excludes any pubmed_id whose distinct-gene fanout in
ApidbTuning.GenePubmed_p is greater than 100. The data is not
modified — the filter is purely at presentation time.

The threshold applies to every PMID in the cache regardless of
source. Curator- and Apollo-submitted citations are typically
single-gene or low-fanout and pass through; the rare curator entry
with >100 gene fanout is filtered alongside the bulk-import noise,
which is the intended behavior since high fanout means low
per-gene specificity regardless of provenance.

Performance: the subquery operates on ApidbTuning.GenePubmed_p,
whose indexes (gpm_gene_idx, gpm_tx_idx) cover pubmed_id and
gene_source_id, so the GROUP BY can be index-scanned. If page
load latency becomes a concern on larger sites, a follow-up PR
can promote the high-fanout PMID list to its own tuning table.
@stubrown stubrown requested review from jbrestel and sufenhu May 1, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant