Biomarker charts · every test computed by R
bio.viz 0.2.0
Charts for comparing groups and relating variables in biomarker data. They run beside safety.viz and reuse its shared parts. The library computes no statistical test itself: each one is asked of R.
This build
- Library
- bio.viz
- Version in package.json
- 0.2.0
- Version reported by the bundle this page loaded
not loaded- Bundle
dist/bio.viz-0.2.0/bio.viz.js
What is in it
Library core
The entry point and the two committed bundles, each reporting the package version, and the two steps every chart shares before anything is drawn: a variable named one way, and named variables resolved to one row per participant with what was left out counted.
71 requirements · 163 of 163 test records passing · Requirement matrix
Connection to R
The one call a chart makes to get a statistic from R, answered from results shipped with the page or by R started in the browser on first use, and the shared rule for printing a p-value with its method and counts.
80 requirements · 175 of 175 test records passing · Requirement matrix
Getting results out
What every chart does so that what it shows can leave the browser and still say what it is: a title, a subtitle and footnotes written with placeholders filled from the view drawn, as text and never evaluated, and one footnote every chart writes last, with the date, the bio.viz version, and R's method and counts behind each statistic printed, naming the R and gsm.bio versions of a stored result; under the chart, a PNG of it with its title and footnotes drawn in, the statistics R returned and the table it drew from as CSV; and a specification, the chart's settings and filters as JSON data, that rebuilds the same chart.
63 requirements · 163 of 163 test records passing · Requirement matrix
Group comparison
Does this biomarker differ between these groups? One value across the levels of a category at chosen visits, as boxes, violins or points with the number in each group beneath, a second grouping by colour, panels by one further variable and a logarithmic scale. It opens on every biomarker at every visit, and a click on a biomarker opens it alone, with R's test of the groups under each visit. Click a box or a point to list its participants and open a participant's profile.
148 requirements · 256 of 256 test records passing · Requirement matrix
Association scatter
Do these two variables move together? One point per participant, with either axis a biomarker at a visit or a participant-level number, coloured by a group, in panels by one further variable, each axis linear or logarithmic. Under it R's Pearson or Spearman coefficient with its interval and p-value, for everyone drawn and within each colour; over it the line y = x, or R's linear fit or smooth with its band. Drag across the points to list the participants in a region, and click a point to open that participant's profile.
87 requirements · 181 of 181 test records passing · Requirement matrix
Correlation matrix
Which of these biomarkers, or which visits of one biomarker, are related? A grid over a set of variables: below the diagonal a mark sized and coloured by R's coefficient, above it the number, with the pair count of every cell, for Pearson or Spearman on the participants who have both values. It prints no p-value. It opens on every biomarker at the first visit, and a click on a cell opens that pair in the association scatter, with a way back.
74 requirements · 169 of 169 test records passing · Requirement matrix
Biomarker screen
Across every biomarker, where is the signal? One row per biomarker for a comparison chosen once, a standardised difference between two groups or a correlation with one variable, with R's estimate and its interval on one axis without units, and R's p-values beside it, unadjusted and adjusted across the rows by Benjamini-Hochberg or Holm. The rows are sorted by the estimate, and a click on a row opens that biomarker in the group comparison or the association scatter, with a way back.
85 requirements · 180 of 180 test records passing · Requirement matrix
Cross-tabulation
Is this category associated with that one? A two-way table of counts with its row and column totals and percentages, beside stacked bars of the same numbers, and R's chi-square or Fisher's exact test of it, with R's warning when an expected count is too small for chi-square. Either variable is a column or a biomarker cut at its median, tertiles, quartiles or typed points. Click a count to list its participants and open a participant's profile.
31 requirements · 123 of 123 test records passing · Requirement matrix
Stratified survival
Do participants with high and low levels of this biomarker have different outcomes? Kaplan–Meier curves per group, with censor marks and an at-risk strip, above a histogram of the biomarker showing where the cut falls and how many land each side. The groups are a column's or a biomarker cut at its median, tertiles, quartiles or typed points, and the cut line can be dragged: the curves follow at once, and R is asked again when it is let go. Under it R's log-rank test, each group's median survival with its interval and, for two groups, the hazard ratio with its interval. Experimental: the curves are safety.viz's estimator, which awaits its clinical review. Click a curve or a count at risk to list its participants and open a participant's profile.
38 requirements · 130 of 130 test records passing · Requirement matrix
The gallery lists each chart, with the tests that prove it and the reference for calling it.
R in the browser, checked
The R check page runs two real tests through R in this browser, shows each answer beside the one desktop R gives, and reports what starting R costs in megabytes and seconds.
Loading it
The bundle is committed, so a page needs no build step:
<script src="dist/bio.viz-0.2.0/bio.viz.js"></script>
<script>
console.log(BioViz.version);
</script>