Skip to content

mic_50_90: PNG charts and a short answer table - #9093

Open
maciejkochanowski wants to merge 2 commits into
galaxyproject:mainfrom
maciejkochanowski:mic-50-90-png-charts
Open

maciejkochanowski wants to merge 2 commits into
galaxyproject:mainfrom
maciejkochanowski:mic-50-90-png-charts

Conversation

@maciejkochanowski

Copy link
Copy Markdown
Contributor

Follow-up to #9029.

On servers that do not allowlist the tools, the HTML report of mic_50_90_distribution is shown as plain text, so the charts are not visible in Galaxy. This adds two outputs to the distribution tool:

  • charts: a list collection with the report chart of each analysed cohort as PNG. The chart is drawn by the program's own function (mic_50_90.result_view.count_chart, the same SVG as in the report) and only converted with CairoSVG, using the DejaVu Sans fonts bundled with the program.
  • summary: a tabular file with one row per question, with the column names set as Galaxy metadata: possible count and share, the answer, population bounds when requested, the count worth requesting, and the reason for refused cohorts or rejected rank conventions. Every value is copied from results.json.

The program version is unchanged (2.0.0); the version suffix is bumped to galaxy1, and cairosvg and fonttools are added as requirements. Tests for the new outputs are included; planemo lint and planemo test pass for all three tools locally (12 tests).

…n tool

The HTML report is shown as plain text on servers that do not allowlist
the tool. The distribution tool now also returns the report chart of each
cohort as a PNG image, drawn by the program's own chart function with its
bundled DejaVu Sans fonts, and a tab-separated table with one row per
question: possible count and share, the answer, population bounds, the
count worth requesting and notes on refused cohorts and rejected rank
conventions. The program itself is unchanged (2.0.0).
- Sort the imports as flake8-import-order (smarkets) expects.
- Write the suggested count with the numeric upper limit of the last
  recorded group (MIC <= 1 mg/L), not its label (MIC <= <=1 mg/L).
- Give cohorts whose identifiers map to the same file name separate
  charts instead of overwriting one of them.
- Replace tabs and line breaks inside table cells with spaces.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage/Discuss

Development

Successfully merging this pull request may close these issues.

1 participant