Hide high-fanout PMIDs from the gene Record Literature table#189
Open
stubrown wants to merge 1 commit intoVEuPathDB:masterfrom
Open
Hide high-fanout PMIDs from the gene Record Literature table#189stubrown wants to merge 1 commit intoVEuPathDB:masterfrom
stubrown wants to merge 1 commit intoVEuPathDB:masterfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.