ZFIN-10010: Fix duplicate genome location rows on mapping detail page#1803
Open
rtaylorzfin wants to merge 3 commits intoZFIN:mainfrom
Open
ZFIN-10010: Fix duplicate genome location rows on mapping detail page#1803rtaylorzfin wants to merge 3 commits intoZFIN:mainfrom
rtaylorzfin wants to merge 3 commits intoZFIN:mainfrom
Conversation
The mapping detail page showed duplicate rows in the genome browser table due to two issues: 1. markerAssemblyUpdate.sql inserted NCBILoader and ZFIN rows without checking for existing records, creating true duplicates across runs. Added NOT EXISTS guards to both inserts. 2. The UCSC loader creates one row per RefSeq accession per gene, which appear identical on-screen since accession isn't displayed. Added deduplication by (entity, chromosome, start, end, source, assembly) in MappingService.sortAndFilterGenomeBrowserLocations(). Includes a Liquibase cleanup script to remove existing NCBILoader and ZFIN duplicate rows.
Add NOT EXISTS guard to NCBIStartEnd.sql add path to prevent inserting rows when the gene/accession already has an NCBIStartEndLoader record. Expand cleanup script to also remove NCBIStartEndLoader duplicates, and group by all non-PK columns to ensure only truly identical rows are removed.
Collaborator
Author
|
Can we add a uniqueness constraint here? |
…me_location_generated Clean up duplicate rows in sequence_feature_chromosome_location_generated and add a unique constraint to prevent future duplicates.
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.
The mapping detail page showed duplicate rows in the genome browser table due to two issues:
markerAssemblyUpdate.sql inserted NCBILoader and ZFIN rows without checking for existing records, creating true duplicates across runs. Added NOT EXISTS guards to both inserts.
The UCSC loader creates one row per RefSeq accession per gene, which appear identical on-screen since accession isn't displayed. Added deduplication by (entity, chromosome, start, end, source, assembly) in MappingService.sortAndFilterGenomeBrowserLocations().
Includes a Liquibase cleanup script to remove existing NCBILoader and ZFIN duplicate rows.