Link FindStocks and FindComboPublications identifiers out - #105
Closed
Robbie1977 wants to merge 1 commit into
Closed
Link FindStocks and FindComboPublications identifiers out#105Robbie1977 wants to merge 1 commit into
Robbie1977 wants to merge 1 commit into
Conversation
The stock and publication reports rendered every identifier as dead text, so getting from a result to the stock centre or the paper meant copying a number into a search box. FindStocks now emits three links, matching what FlyBase's own stock report offers: the FBst id resolves to its FlyBase report, the stock number resolves to the centre's own catalogue entry, and the collection name resolves to the centre's homepage. FindComboPublications gets the same treatment for the FBrf, DOI, PMID and PMCID. Genotype, title and citation stay plain text -- FlyBase notation is full of brackets and must not be parsed as markdown. The centre URLs come from chado's stockcollectionprop (homepage_url, order_url), read once per process, so the list cannot drift from FlyBase. Only Bloomington's per-stock pattern is hard-coded: its order_url is the batch-order cart, not a per-stock page. FlyORF's order_url is a per-line query prefix, so the stock number appends to it. The other five centres offer only a search box and FlyBase leaves their stock numbers unlinked too, so we do the same rather than invent URL patterns that would rot. Parentheses are percent-encoded in link targets: MarkdownLinkComponent constrains the target to [^()[\]] so that labels may contain brackets, and a DOI like 10.1002/(SICI)... would otherwise terminate the match early. Verified against chado for one stock per collection and for FBgn0020238.
Contributor
Author
|
Reopening from a slash-free branch: the Docker Image CI job tags the image with the branch name, and |
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 stock and publication reports rendered every identifier as dead text, so getting from a result to the stock centre or the paper meant copying a number into a search box.
FindStocks now emits three links, matching what FlyBase's own stock report offers: the FBst id resolves to its FlyBase report, the stock number resolves to the centre's own catalogue entry, and the collection name resolves to the centre's homepage. FindComboPublications gets the same treatment for the FBrf, DOI, PMID and PMCID. Genotype, title and citation stay plain text — FlyBase notation is full of brackets and must not be parsed as markdown.
The centre URLs come from chado's
stockcollectionprop(homepage_url,order_url), read once per process, so the list cannot drift from FlyBase. Only Bloomington's per-stock pattern is hard-coded: itsorder_urlis the batch-order cart, not a per-stock page. FlyORF'sorder_urlis a per-line query prefix, so the stock number appends to it. The other five centres offer only a search box and FlyBase leaves their stock numbers unlinked too, so we do the same rather than invent URL patterns that would rot.Parentheses are percent-encoded in link targets:
MarkdownLinkComponentconstrains the target to[^()[\]]so labels may contain brackets, and a DOI like10.1002/(SICI)...would otherwise terminate the match early.How to test
Verified against chado for one stock per collection: BDSC and FlyORF stock numbers deep-link, the other five stay plain text, and all seven collections link to their homepage.
Follow-ups
force_refreshafter release.