Skip to content

Link FindStocks and FindComboPublications identifiers out - #105

Closed
Robbie1977 wants to merge 1 commit into
mainfrom
feat/flybase-stock-linkouts
Closed

Link FindStocks and FindComboPublications identifiers out#105
Robbie1977 wants to merge 1 commit into
mainfrom
feat/flybase-stock-linkouts

Conversation

@Robbie1977

Copy link
Copy Markdown
Contributor

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 labels may contain brackets, and a DOI like 10.1002/(SICI)... would otherwise terminate the match early.

How to test

run_query?query_type=FindStocks&id=FBgn0020238
run_query?query_type=FindComboPublications&id=FBco0000052

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

  • Cached FindStocks / FindComboPublications results need a force_refresh after release.
  • The website side needs geppetto-vfb fix/stock-and-pub-linkouts to render an external target as a link rather than dead text.

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.
@Robbie1977

Copy link
Copy Markdown
Contributor Author

Reopening from a slash-free branch: the Docker Image CI job tags the image with the branch name, and feat/flybase-stock-linkouts is not a valid Docker tag. Same commit, no content change.

@Robbie1977 Robbie1977 closed this Sep 3, 2026
@Robbie1977
Robbie1977 deleted the feat/flybase-stock-linkouts branch September 3, 2026 23:02
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