Repository navigation
Conversation
Part of #527 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Deploy Preview for strchive ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| "type": ["string"], | ||
| "pattern": "^[\\S]+_[\\S]+$" | ||
| }, | ||
| "previous_ids": { |
There was a problem hiding this comment.
My first thought was to do something like this, but are you sure this is the right way to go? To me, this sort of defeats the purpose of having the loci tracked in git. Git already gives you the previous history of everything, and this feels like a duplication of that. Also, the primary purpose of this seems to be for the website, so it feels like leaking irrelevant implementation details of the website into the actual data.
There was a problem hiding this comment.
I figured it was analogous to genes having previous IDs listed e.g. Alternative titles; symbols in https://omim.org/entry/615813
Although, to be fair, the changes in STRchive are a mix of typos e.g.
"RAME8_RAI1" -> "FAME8_RAI1"
And real name change decisions when we report a disease before it is officially named, so switch from a generic name to a specific one:
"OPDM_ABCD3" -> "OPDM5_ABCD3"
Totally open to other suggestions.
|
I can take a closer look at this on Monday and we can discuss, but my idea was something like this: An |
Description
Renamed loci and criTRia curations currently leave broken links. This matters more now that other resources (gnomAD, the UCSC genome browser) link to STRchive pages. This PR keeps old IDs in the data and uses them to generate permanent (301) redirects, and adds a check so future renames don't break links.
Fixes: #527
Major Changes
New
previous_idsfield on loci: former IDs for the locus or its criTRia curation. Filled for the 10 loci renamed so far:Netlify 301 redirects are generated from
previous_idsat build time (site/redirects.mjswritesdist/_redirects). Each old ID redirects/loci/OLD,/loci/OLD/*(e.g. the edit page), and/critria/OLDif the locus has a curation.New PR check (
scripts/check-redirects.py, run by thecheck-redirectsworkflow):previous_idsLocus_IDmatches no locus (currently FXTAS,POF1_FMR1 and OPML1_NUTM2B_AS1)/database/<GENE>.html→ the gene's locus page (or/locifor genes with several loci), plus/about.html,/contribute.html,/resources.html,/plots.html(→/loci#plots),/table.htmland/index.htmlMinor Changes
previous_ids.previous_idsadded tocheck-loci.pylist fields.Notes for reviewers
mondoPR will fail the new check untilSD5_HOXD13(→ SPD1_HOXD13) andOPML1_NUTM2B_AS1(→ OPML1_NUTM2B-AS1) are added toprevious_ids./loci/XLMR_SOX3, returns a 301 to/loci/XLID_SOX3, with and without a trailing slashChecklist
CITATION.cff, format X.Y.Z. If any major changes, increment Y. If only minor changes, increment Z. If the breaking change (rare), increment X.🤖 Co-authored with Claude Code