This is based on the redux-bundler example application
npm i
This hack is necessary to get Parcel to transpile imported node modules correctly.
Edit node_modules/@parcel/core/lib/summarizeRequest.js
Change return !filePath.includes(NODE_MODULES);
to return true;
npm run build
compiles js for use in the sorghum-webapp assuming you have cloned that in the same parent directory
npm run start-maize launches the maize pangenome subsite
The Primers gene-detail tab embeds PrimerDesigner from
gramene-primers: PCR/qPCR primer design,
a genome specificity check and a pan-genome coverage check, served by the gramene-swagger
/primers endpoints. It appears after Sequences only on sites that set
details.primers:
primers: trueuses the site'sgrameneDataAPI.primers: {apiBase: 'https://data.sorghumbase.org/sorghum_v11', pangenome: false}points the tab at another swagger base URL (it must serve/primers);pangenome: falsehides the pan-genome check.
Leave the key unset (or false) where the API has no /primers endpoints.
The designer state is kept in uiViewState.byGene[geneId].primers and saved with
shared views; a restored view re-runs the design, and an expired check job shows "Re-run check".
A pasted sequence stays in that store, so it survives switching detail tabs, but it is left out
of saved views; design responses and check results are not saved either.
Gene links in check results open in a new tab, so the design and a running check stay put.
Styles are injected at runtime, so no CSS import is needed.
gramene-primers is a dependency (^0.2.0). To try unreleased gramene-primers changes,
install a packed tarball over it (not npm link or file:, which load a second React);
the next npm install puts the registry version back.
cd ../gramene-primers && npm run pack:local # gramene-primers-0.2.0.tgz
cd ../gramene-search && npm install --no-save ../gramene-primers/gramene-primers-0.2.0.tgz && rm -rf .parcel-cacheRun the sorghum demo against a swagger that serves /primers:
PRIMERS_API=https://data.sorghumbase.org/sorghum_v11a SUBSITE=sorghum npx parcel src/sorghum.html --port 1234In the sorghum demo (src/demo.js) the tab is shown only when PRIMERS_API is set;
it becomes details.primers.apiBase.