When published data stop at a spreadsheet limit
A cross-sectional audit of supplementary data in one million PubMed Central articles
-Benjamin Guo · Hraness
+Benjamin Guo · Hraness · hraness.com · Correspondence to hraness@pm.me
Working paper · Audit release v0.3.0
Abstract
Background. A spreadsheet can lose whole rows or columns when a table exceeds the worksheet’s capacity. A gene name can also change within a cell. For example, Excel can display the gene symbol SEPT2 as the date 2-Sep. We asked how often supplementary tables showed signs of missing records and whether the loss affected published results. Separately, we looked for signs that gene symbols had been converted to dates.
@@ -16,7 +16,8 @@ Abstract
Conclusions. Missing records can change a published result. Before sharing a spreadsheet, authors can compare its row and column counts with the original data. Checking gene symbols against the original list can also reveal names that the software changed.
Introduction
In 2016, Leung and colleagues issued an erratum for a skin microbiome spreadsheet that stopped at row 65,536, the row limit of older versions of Excel. The journal’s replacement contained 85,332 more numerical entries in total than the shortened file we retrieved from PubMed Central (PMC). In a melanoma study, a correction identified a mutation table that stopped at the same row and replaced it with a table of 122,339 rows. These corrections establish that the shared files were incomplete. Evidence about the files used for a published result can establish whether the missing data also affected that result. Leung et al., erratum · Farshidfar et al., correction · Versioned file comparisons
-Worksheet limits depend on the Excel format. Worksheets in Excel 5 and 95 held up to 16,384 rows. Excel 97–2003 worksheets hold up to 65,536 rows and 256 columns. The current Excel format holds up to 1,048,576 rows and 16,384 columns. Headings occupy part of that space. If an earlier export lost records, moving the shortened table to a larger file carries over the records that survived. A limit of the older Excel format also delayed contact tracing for 15,841 people with positive COVID-19 tests in England in 2020. Historical specification · Microsoft compatibility guidance · Fetzer and Graeber
+Worksheet limits depend on the Excel format. Worksheets in Excel 5 and 95 held up to 16,384 rows. Excel 97–2003 worksheets hold up to 65,536 rows and 256 columns. The current Excel format holds up to 1,048,576 rows and 16,384 columns per worksheet. Column headings occupy part of that space.
+A newer file can carry the effects of an earlier limit. If a table lost rows when saved in an older format, copying the shortened table into a larger worksheet carries over only the rows that survived. This problem has also affected public health reporting. In England in 2020, a limit of the older Excel format delayed contact tracing for 15,841 people with positive COVID-19 tests. Historical specification · Microsoft compatibility guidance · Fetzer and Graeber
Earlier studies documented a second spreadsheet error. Excel can interpret a gene symbol such as SEPT2 as a date and display it as 2-Sep. We included a separate screen for date-like entries in gene columns. The main audit examined missing rows or columns. Ziemann et al. · Abeysooriya et al.
For the missing-record analysis, we counted each article once and checked whether a shortened table could explain a particular figure or calculation. For the gene-name analysis, we counted articles with a date-like entry in a column of gene symbols. A flagged entry tells a reader where to check the original gene list.
Methods
@@ -224,7 +225,7 @@ Reuse in citing publications
In SPARK-X, 57,584 of 103,602 locations carried one of 25 cell-type labels missing from the published reference spreadsheet. The later study’s archived assignments included those labels. For plasmaCHORD, all 1,418 variant-origin labels matched unique records in a separate workbook. These included 1,190 labels from chromosomes missing from the shorter file. In a dental plaque study, an earlier count matrix reproduced the mean abundances of the five leading genera. Substituting the short spreadsheet changed all five means while preserving their order. We found 12 indexed records citing the ovarian study. Use of its affected 500-gene set was unconfirmed in all 12. Spatial analysis · Plasma study · Plaque study · Ovarian citing contexts
Distribution by worksheet capacity and publication period
Seventy-two articles matched an older worksheet limit and 17 matched a current one. At the older limits, 34 reached 65,536 rows, 28 reached 256 columns and 11 reached 16,384 rows. One article reached two older limits. At current limits, 14 reached 1,048,576 rows and four reached 16,384 columns, with one article reaching both. Five of the 34 cases at the 65,536-row limit and eight of the 28 at the 256-column limit were deposited as XLSX. File extensions identify the format of the shared copy. The program and version used for the original export remained unknown. Counts by worksheet limit and file format
-Figure 4. File-screen positives per thousand articles with a measurable table, by publication period. The four periods contain 16/3,205, 18/7,540, 17/15,525 and 33/24,186 cases. The comparison omits 380 measured articles dated 2000–2008 and 833 without a parsable publication year, including five positive cases. The last period ends on 30 November 2026. Year and denominator data
+Figure 4. File-screen positives per thousand articles with a measurable table, by publication period. Rates per 1,000 were 4.99 in 2009–2014 (16/3,205), 2.39 in 2015–2018 (18/7,540), 1.10 in 2019–2022 (17/15,525) and 1.36 in 2023–2026 (33/24,186). The comparison omits 380 measured articles dated 2000–2008 and 833 without a parsable publication year, including five positive cases. The last period ends on 30 November 2026. Year and denominator data
The proportion of articles with signs of missing data fell from 4.99 per thousand articles with a readable table in 2009–2014 to 1.10 per thousand in 2019–2022. It was 1.36 per thousand in 2023–2026, when 20 affected articles reached an older limit and 13 reached a current one.
Possible changes to gene names
diff --git a/docs/paper.pdf b/docs/paper.pdf
index 864698a..ae1813b 100644
Binary files a/docs/paper.pdf and b/docs/paper.pdf differ
diff --git a/paper/figures/boundary.svg b/paper/figures/boundary.svg
index e2992eb..2936271 100644
--- a/paper/figures/boundary.svg
+++ b/paper/figures/boundary.svg
@@ -2,10 +2,13 @@
+ Table endings around the 65,536-row limit; 113 tables ended at the limit.
+ Table endings around the 65,536-row limit; 113 tables ended at the limit.
+ Table endings around the 65,536-row limit; 113 tables ended at the limit.
image/svg+xml
@@ -20,19 +23,19 @@
-
-
@@ -40,1730 +43,2980 @@ z
- 65,436
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- 65,536
+
+
+
+
+
+
+
+
+
- 65,636
+
+
+
+
+
+
+
+
+
- Last populated row
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
- 0
+
+
+
+
+
+
+
-
+
- 20
+
+
+
+
+
+
+
+
-
+
- 40
+
+
+
+
+
-
+
- 60
+
+
+
+
+
-
+
- 80
+
+
+
+
+
+
+
+
-
+
- 100
+
+
+
+
+
+
+
+
+
-
+
- 120
+
+
+
+
+
+
- Worksheets and text tables
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #a74824"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
+" clip-path="url(#pe64cffb663)" style="fill: #17646c"/>
-
- All 201 lengths
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
@@ -1771,205 +3024,534 @@ z
- 65,534
+
+
+
+
+
+
+
+
+
- 65,536
+
+
+
+
+
+
+
+
+
- 65,538
+
+
+
+
+
+
+
+
+
- 65,540
+
+
+
+
+
+
+
+
+
- Last populated row
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
- 0
+
+
+
+
-
+
- 20
+
+
+
+
+
-
+
- 40
+
+
+
+
+
-
+
- 60
+
+
+
+
+
-
+
- 80
+
+
+
+
+
-
+
- 100
+
+
+
+
+
+
-
+
- 120
+
+
+
+
+
+
-
+" clip-path="url(#pcb9a1cff91)" style="fill: #17646c"/>
-
+" clip-path="url(#pcb9a1cff91)" style="fill: #17646c"/>
-
+" clip-path="url(#pcb9a1cff91)" style="fill: #17646c"/>
-
+" clip-path="url(#pcb9a1cff91)" style="fill: #a74824"/>
-
+" clip-path="url(#pcb9a1cff91)" style="fill: #17646c"/>
-
+" clip-path="url(#pcb9a1cff91)" style="fill: #17646c"/>
-
+" clip-path="url(#pcb9a1cff91)" style="fill: #17646c"/>
-
+" clip-path="url(#pcb9a1cff91)" style="fill: #17646c"/>
-
- 5
+
+
+
+
- 113
+
+
+
+
+
+
- 46
+
+
+
+
+
- 41
+
+
+
+
+
- 11
+
+
+
+
+
- Eight lengths near the limit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
diff --git a/paper/figures/pathway-sensitivity.svg b/paper/figures/pathway-sensitivity.svg
index df923be..a4bd30c 100644
--- a/paper/figures/pathway-sensitivity.svg
+++ b/paper/figures/pathway-sensitivity.svg
@@ -1,11 +1,14 @@
-
+
+ Two reconstructed pathway ranges lie above the study cutoff of 0.01.
+ Two reconstructed pathway ranges lie above the study cutoff of 0.01.
+ Two reconstructed pathway ranges lie above the study cutoff of 0.01.
image/svg+xml
@@ -20,19 +23,19 @@
-
-
@@ -40,126 +43,1660 @@ z
- 0.005
+
+
+
+
+
+
+
+
+
+
+
+
+
- 0.010
+
+
+
+
+
+
+
+
+
+
+
- 0.015
+
+
+
+
+
+
+
+
- 0.020
+
+
+
+
+
+
+
+
+
+
+
- Benjamini–Hochberg adjusted P
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
- Response to estrogen
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
- Negative regulation of hydrolase
- activity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
+
+
-
+
-
-
+
+
-
+
- Study cutoff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
- Published adjusted P
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- Full-matrix range
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
diff --git a/paper/figures/periods.svg b/paper/figures/periods.svg
index 0be73bd..ef05df4 100644
--- a/paper/figures/periods.svg
+++ b/paper/figures/periods.svg
@@ -1,11 +1,14 @@
-
+
+ Probable losses per 1,000 articles by publication period: 2009–2014, 4.99; 2015–2018, 2.39; 2019–2022, 1.10; 2023–2026, 1.36.
+ Probable losses per 1,000 articles by publication period: 2009–2014, 4.99; 2015–2018, 2.39; 2019–2022, 1.10; 2023–2026, 1.36.
+ Probable losses per 1,000 articles by publication period: 2009–2014, 4.99; 2015–2018, 2.39; 2019–2022, 1.10; 2023–2026, 1.36.
image/svg+xml
@@ -20,174 +23,1281 @@
-
-
-
-
- 2009–2014
+
+
-
-
-
- 2015–2018
+
+
+
+
+
+
+
+
-
-
-
- 2019–2022
+
+
+
-
-
-
- 2023–2026
+
+
+
+
+
+
+
+
-
-
-
+
-
+
-
- 0
+
+
+
+
+
+
+
+
-
+
-
+
-
- 1
+
+
+
+
+
+
+
+
-
+
-
+
-
- 2
+
+
+
+
+
+
+
+
-
+
-
+
-
- 3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
- 5
+
+
+
+
+
+
+
+
+
+
+
+
-
- Probable losses per 1,000
- articles with a measured table
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+" clip-path="url(#p1961c11a43)" style="fill: #17646c"/>
-
+" clip-path="url(#p1961c11a43)" style="fill: #17646c"/>
-
+" clip-path="url(#p1961c11a43)" style="fill: #17646c"/>
-
+" clip-path="url(#p1961c11a43)" style="fill: #17646c"/>
-
+
- 4.99
+
+
+
+
+
+
+
+
+
+
- 2.39
+
+
+
+
+
+
+
- 1.10
+
+
+
+
+
+
+
- 1.36
+
+
+
+
+
+
+
-
-
+
+
diff --git a/paper/figures/projection.svg b/paper/figures/projection.svg
index 0354586..665f969 100644
--- a/paper/figures/projection.svg
+++ b/paper/figures/projection.svg
@@ -1,11 +1,14 @@
-
+
+ Projected articles with probable loss and 95% sampling intervals under two review rules.
+ Projected articles with probable loss and 95% sampling intervals under two review rules.
+ Projected articles with probable loss and 95% sampling intervals under two review rules.
image/svg+xml
@@ -20,304 +23,1787 @@
-
-
-
+
- 0
+
+
+
+
+
+
+
-
+
- 200
+
+
+
+
+
+
+
+
+
-
+
- 400
+
+
+
+
+
+
+
+
+
-
+
- 600
+
+
+
+
+
+
+
+
+
-
+
- 800
+
+
+
+
+
+
+
+
+
-
+
- 1000
+
+
+
+
+
+
+
+
+
+
- Projected articles in the PMC inventory
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- 65,536 rows
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- 256 columns
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- 16,384 rows
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Current limits
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Any limit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
+
-
+
- First reader
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
+
-
+
- Both original readers
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
diff --git a/paper/manuscript.md b/paper/manuscript.md
index 9a5fc8f..a403610 100644
--- a/paper/manuscript.md
+++ b/paper/manuscript.md
@@ -2,7 +2,7 @@
*A cross-sectional audit of supplementary data in one million PubMed Central articles*
-**Benjamin Guo · Hraness**
+**Benjamin Guo** · Hraness · [hraness.com](https://hraness.com) · Correspondence to [hraness@pm.me](mailto:hraness@pm.me)
Working paper · Audit release v0.3.0
@@ -24,7 +24,9 @@ In the separate gene-name analysis, 779 of 2,910 articles with detected gene lis
In 2016, Leung and colleagues issued an erratum for a skin microbiome spreadsheet that stopped at row 65,536, the row limit of older versions of Excel. The journal’s replacement contained 85,332 more numerical entries in total than the shortened file we retrieved from PubMed Central (PMC). In a melanoma study, a correction identified a mutation table that stopped at the same row and replaced it with a table of 122,339 rows. These corrections establish that the shared files were incomplete. Evidence about the files used for a published result can establish whether the missing data also affected that result. [Leung et al., erratum](https://doi.org/10.1038/srep21355) · [Farshidfar et al., correction](https://doi.org/10.1038/s41467-022-30446-w) · [Versioned file comparisons](../analysis/exhibits/README.md)
-Worksheet limits depend on the Excel format. Worksheets in Excel 5 and 95 held up to 16,384 rows. Excel 97–2003 worksheets hold up to 65,536 rows and 256 columns. The current Excel format holds up to 1,048,576 rows and 16,384 columns. Headings occupy part of that space. If an earlier export lost records, moving the shortened table to a larger file carries over the records that survived. A limit of the older Excel format also delayed contact tracing for 15,841 people with positive COVID-19 tests in England in 2020. [Historical specification](https://ftp.zx.net.nz/pub/archive/ftp.microsoft.com/MISC/KB/en-us/179/824.HTM) · [Microsoft compatibility guidance](https://support.microsoft.com/en-us/excel/worksheet-compatibility-issues) · [Fetzer and Graeber](https://doi.org/10.1073/pnas.2100814118)
+Worksheet limits depend on the Excel format. Worksheets in Excel 5 and 95 held up to 16,384 rows. Excel 97–2003 worksheets hold up to 65,536 rows and 256 columns. The current Excel format holds up to 1,048,576 rows and 16,384 columns per worksheet. Column headings occupy part of that space.
+
+A newer file can carry the effects of an earlier limit. If a table lost rows when saved in an older format, copying the shortened table into a larger worksheet carries over only the rows that survived. This problem has also affected public health reporting. In England in 2020, a limit of the older Excel format delayed contact tracing for 15,841 people with positive COVID-19 tests. [Historical specification](https://ftp.zx.net.nz/pub/archive/ftp.microsoft.com/MISC/KB/en-us/179/824.HTM) · [Microsoft compatibility guidance](https://support.microsoft.com/en-us/excel/worksheet-compatibility-issues) · [Fetzer and Graeber](https://doi.org/10.1073/pnas.2100814118)
Earlier studies documented a second spreadsheet error. Excel can interpret a gene symbol such as SEPT2 as a date and display it as 2-Sep. We included a separate screen for date-like entries in gene columns. The main audit examined missing rows or columns. [Ziemann et al.](https://doi.org/10.1186/s13059-016-1044-7) · [Abeysooriya et al.](https://doi.org/10.1371/journal.pcbi.1008984)
@@ -148,7 +150,7 @@ In SPARK-X, 57,584 of 103,602 locations carried one of 25 cell-type labels missi
Seventy-two articles matched an older worksheet limit and 17 matched a current one. At the older limits, 34 reached 65,536 rows, 28 reached 256 columns and 11 reached 16,384 rows. One article reached two older limits. At current limits, 14 reached 1,048,576 rows and four reached 16,384 columns, with one article reaching both. Five of the 34 cases at the 65,536-row limit and eight of the 28 at the 256-column limit were deposited as XLSX. File extensions identify the format of the shared copy. The program and version used for the original export remained unknown. [Counts by worksheet limit and file format](../analysis/result-impact/formats.tsv)
-**Figure 4. File-screen positives per thousand articles with a measurable table, by publication period.** The four periods contain 16/3,205, 18/7,540, 17/15,525 and 33/24,186 cases. The comparison omits 380 measured articles dated 2000–2008 and 833 without a parsable publication year, including five positive cases. The last period ends on 30 November 2026. [Year and denominator data](../analysis/periods.tsv)
+**Figure 4. File-screen positives per thousand articles with a measurable table, by publication period.** Rates per 1,000 were 4.99 in 2009–2014 (16/3,205), 2.39 in 2015–2018 (18/7,540), 1.10 in 2019–2022 (17/15,525) and 1.36 in 2023–2026 (33/24,186). The comparison omits 380 measured articles dated 2000–2008 and 833 without a parsable publication year, including five positive cases. The last period ends on 30 November 2026. [Year and denominator data](../analysis/periods.tsv)

diff --git a/paper/pdf-checksums.tsv b/paper/pdf-checksums.tsv
index 0b0de3c..28e0d47 100644
--- a/paper/pdf-checksums.tsv
+++ b/paper/pdf-checksums.tsv
@@ -1,11 +1,21 @@
path sha256
-docs/paper.html 571c2392b01e95561394e1c028c0cdd06fcbafe252f38ef56ce020e089d59c70
+docs/paper.html d0a7a88e7d9e64e790c9bf35de3ee66edf30873f3bbe513ac0dd5358a8bc51ef
+site/paper.lua 86c65d5a3516a9af60dd2232133f189d7ecb4c9d90018cd5abe3fc5a02aba1e4
+site/paper.tex bb019488df64fc24993a74957e3ad99a076cb95ddbf0a5fed312ea2489669d8f
+site/pdf.mjs a8a69880ffa2a5598e48a7f20bbdcaf01a09c3e9be886b05489f5a9daebb2579
+scripts/figures.py 4428ffcb35616db292a3c1b3ec3733477741fdf354a781890799ed92c2bec6b8
+docs/fonts/STIXTwoText.ttf 7962b8b7811e6a896c9a91a0bccbb5241047770eb24d4997c5cb5fe21d5c0df2
+analysis/pileup.tsv 683945bbec91147977157156ffa2042d5d25cc4834631a155276af11859b3462
+analysis/estimates.tsv 1f886addb756b3fc60305f87170621ae3b98e6b91d276c64bc6b712aadda5bec
+analysis/periods.tsv 775e22aee8628c9f085ef15751c1c2aac4066ede1398417fe0daf8629bb99342
+analysis/citation-trace/ovarian/annotation-results.json 1ef57d22ec6721b9e21589e9c964713c0c2967978a3743d678ccbc4308c5ca1a
+docs/figures/boundary.svg 7517974c6781f1204c6d0a53d23f80e3a622fed063cc3b94a261ec4b91147b55
+docs/figures/pathway-sensitivity.svg 972737d4605ec3c56e1e971e8ad3a79ffc40a2e104ad6f83e6d79cdaca6d5f26
+docs/figures/periods.svg 6b5d2f0abdec911d5be156ceb4473addcf2b58ca679f267d9f6ffb8bc5fdcf01
+docs/figures/projection.svg 1cfe04b2ef9953434b82ff15cd0fd4de03d705bda54435b30c63e69f1c2fe537
+site/tagged-pdf.mjs f7131e411f41f71aaf858685cd6023b7a72a09aa750687689995d02c43c094d1
+site/style.css 310bddafc307cddaf7e6b9ca8b35645fc7aaae130e5231be3869cf6df951ba6a
docs/style.css 310bddafc307cddaf7e6b9ca8b35645fc7aaae130e5231be3869cf6df951ba6a
-docs/figures/boundary.svg 9cb754c6348e9a67c5ea8618882d6bc3eb3c8b12460bf37068da729554eecf20
-docs/figures/pathway-sensitivity.svg 9034cfbbeeb7cee12baace69e2b03eb5b93401ece2b8a1364b0ec45d56a0fba7
-docs/figures/periods.svg d51c243d23a2666727cf6d5f2631c34ada8da4019e9f0ed15924487bb36c6db2
-docs/figures/projection.svg 43c4dcf5e0d167d40847a62343df767de5c934256291f17bf3e8eeea325e164e
docs/fonts/DMSans.ttf 8cd08d97e89c24d0aa92edd2f0f4c8ee6195eee9b7c9f154865a58b02f0c1c0d
-docs/fonts/STIXTwoText.ttf 7962b8b7811e6a896c9a91a0bccbb5241047770eb24d4997c5cb5fe21d5c0df2
-site/pdf.mjs 4db372c27a0d5aafc69ce364fa87ce0e08e77f19854d2c5ffb9a8a16b925137b
-docs/paper.pdf 67be731ea86b1565d168ab366eb298d788e2206471c3c5881e4b79c8c3f9341e
+docs/paper.pdf eab1cdcb34915d04b7c81198884c4f2d9f487064342ff769683813b13362ac72
+docs/paper-typeset.pdf d39af838068b06959e21157c677c06eb9a1ea2e2abf3e5b8fb536ad10d41e78e
diff --git a/ra.journeys.json b/ra.journeys.json
index 3301241..11d111f 100644
--- a/ra.journeys.json
+++ b/ra.journeys.json
@@ -22,7 +22,7 @@
},
{
"action": "Open the paper and download the evidence table.",
- "expect": "The paper contains the estimates and the download has one row per adjudicated article."
+ "expect": "The paper offers typeset and tagged PDFs, and the evidence download has one row per adjudicated article."
},
{
"action": "From a citation-ordered list, open the most-cited source paper on a phone with JavaScript disabled.",
diff --git a/scripts/figures.py b/scripts/figures.py
index d97b8b5..91a6911 100644
--- a/scripts/figures.py
+++ b/scripts/figures.py
@@ -1,5 +1,7 @@
"""Render the manuscript figures from the frozen tables and numerical replays, with no network access."""
+import argparse
import json
+from pathlib import Path
import os
os.environ.setdefault("SOURCE_DATE_EPOCH", "1796212800")
from common import ROOT, rows
@@ -7,19 +9,36 @@
matplotlib.use("Agg")
import matplotlib.pyplot as plt
from matplotlib.ticker import StrMethodFormatter
+from matplotlib import font_manager
-plt.rcParams.update({"font.family":"DejaVu Sans","svg.fonttype":"none","svg.hashsalt":"spreadsheet-limits-v1",
- "font.size":10,"axes.spines.right":False,"axes.spines.top":False,
- "axes.labelcolor":"#293c44","xtick.color":"#405760","ytick.color":"#405760"})
-DEST=ROOT/"paper/figures"
-DEST.mkdir(exist_ok=True)
+# Outline the journal typeface so SVG importers never have to reconstruct
+# rotated text, glyph positions or font metrics from the local system.
+font_manager.fontManager.addfont(ROOT / "docs/fonts/STIXTwoText.ttf")
+plt.rcParams.update({
+ "font.family": "STIX Two Text", "font.size": 11, "svg.fonttype": "path",
+ "svg.hashsalt": "spreadsheet-limits-v1", "pdf.fonttype": 42, "axes.spines.right": False,
+ "axes.spines.top": False, "axes.labelcolor": "#192b32",
+ "text.color": "#192b32", "xtick.color": "#35474d", "ytick.color": "#35474d",
+})
+parser = argparse.ArgumentParser(description=__doc__)
+parser.add_argument("--pdf-dir", type=Path, help="write the same plots as vector PDFs with searchable labels")
+args = parser.parse_args()
+DEST = args.pdf_dir or ROOT / "paper/figures"
+DEST.mkdir(parents=True, exist_ok=True)
BLUE="#17646c"
GRAY="#78898e"
ORANGE="#a74824"
-def write(fig,name):
- fig.savefig(DEST/(name+".svg"),format="svg",bbox_inches="tight",metadata={"Creator":"Hraness","Date":None})
+def write(fig, name, description):
+ metadata = {"Creator": "Hraness", "Title": description}
+ if args.pdf_dir:
+ fig.savefig(DEST / (name + ".pdf"), bbox_inches="tight", metadata=metadata)
+ else:
+ svg = DEST / (name + ".svg")
+ fig.savefig(svg, bbox_inches="tight",
+ metadata={**metadata, "Date": None, "Description": description})
+ svg.write_text("\n".join(line.rstrip() for line in svg.read_text(encoding="utf-8").splitlines()) + "\n", encoding="utf-8")
plt.close(fig)
@@ -40,14 +59,14 @@ def grid(ax):
ax.set_ylim(0,132);grid(ax)
ax.set_xlabel("Last populated row")
ax.xaxis.set_major_formatter(StrMethodFormatter("{x:,.0f}"))
-wide.set_title("All 201 lengths",loc="left",weight="bold");wide.set_ylabel("Worksheets and text tables")
+wide.set_title("A All 201 lengths",loc="left",weight="bold");wide.set_ylabel("Worksheets and text tables")
wide.set_xticks([65436,65536,65636])
-detail.set_title("Eight lengths near the limit",loc="left",weight="bold")
+detail.set_title("B Eight lengths near the limit",loc="left",weight="bold")
detail.set_xticks([65534,65536,65538,65540])
for row in [65535,65536,65537,65538,65539]:
y=next(int(i["tables"]) for i in r if int(i["last_filled_row"])==row)
detail.text(row,y+4,str(y),ha="center",size=9,weight="bold",color=ORANGE if row==65536 else BLUE)
-write(fig,"boundary")
+write(fig,"boundary","Table endings around the 65,536-row limit; 113 tables ended at the limit.")
r=rows(ROOT/"analysis/estimates.tsv")
fig,ax=plt.subplots(figsize=(8.1,3.45),layout="constrained")
@@ -57,17 +76,29 @@ def grid(ax):
ax.errorbar(vals,y,xerr=[lower,upper],fmt=mark,color=color,markersize=5,capsize=3,
label=["First reader","Both original readers"][j])
ax.set_yticks(range(4,-1,-1),[x["limit"] for x in r]);ax.set_xlabel("Projected articles in the PMC inventory")
-ax.grid(axis="x",color="#d9e3e4");ax.legend(loc="upper right",frameon=False);ax.set_xlim(0,1120)
+ax.grid(axis="x",color="#d9e3e4");ax.legend(loc="lower left",bbox_to_anchor=(0,1.02),ncol=2,borderaxespad=0,frameon=False);ax.set_xlim(0,1120)
ax.tick_params(length=0);ax.spines["left"].set_visible(False)
-write(fig,"projection")
+write(fig,"projection","Projected articles with probable loss and 95% sampling intervals under two review rules.")
r=rows(ROOT/"analysis/periods.tsv")
-fig,ax=plt.subplots(figsize=(7.6,2.85),layout="constrained")
-for i,x in enumerate(r):
- rate=float(x["per_1000"]);ax.bar(i,rate,color=BLUE,width=.52)
- ax.text(i,rate+.13,f"{rate:.2f}",ha="center",weight="bold")
-ax.set_xticks(range(4),[x["period"] for x in r]);ax.set_ylim(0,5.7);ax.set_ylabel("Probable losses per 1,000\narticles with a measured table");grid(ax)
-write(fig,"periods")
+fig, ax = plt.subplots(figsize=(7.1, 2.65), layout="constrained")
+rates = [float(row["per_1000"]) for row in r]
+positions = range(len(r))
+ax.barh(positions, rates, height=.48, color=BLUE)
+ax.set_yticks(positions, [row["period"] for row in r])
+ax.invert_yaxis()
+ax.set_xlim(0, 5.65)
+ax.set_xticks(range(6))
+ax.set_xlabel("Probable losses per 1,000 articles with a measurable table")
+ax.tick_params(length=0, pad=6)
+ax.spines["left"].set_color("#697b7e")
+ax.spines["bottom"].set_visible(False)
+ax.grid(axis="x", color="#d9e3e4", linewidth=.65)
+ax.set_axisbelow(True)
+for position, rate in enumerate(rates):
+ ax.text(rate + .09, position, f"{rate:.2f}", va="center")
+write(fig, "periods", "Probable losses per 1,000 articles by publication period: " +
+ "; ".join(f"{row['period']}, {rate:.2f}" for row, rate in zip(r, rates)) + ".")
# The two S8 terms that exceed the published BH cutoff under every full-input
# reconstruction. These ranges span compatible inputs and filters, not sampling error.
@@ -95,4 +126,4 @@ def grid(ax):
ax.set_xlabel("Benjamini–Hochberg adjusted P")
grid(ax)
ax.legend(loc="lower left", bbox_to_anchor=(0,1.02), ncol=2, frameon=False, fontsize=9)
-write(fig, "pathway-sensitivity")
+write(fig, "pathway-sensitivity", "Two reconstructed pathway ranges lie above the study cutoff of 0.01.")
diff --git a/site/build.mjs b/site/build.mjs
index 25a5aa6..28a08c3 100644
--- a/site/build.mjs
+++ b/site/build.mjs
@@ -343,7 +343,7 @@ article(
"paper.html",
"paper/manuscript.md",
title,
- '',
+ '',
);
article("methods.html", "review/protocol.md", "Methods and reproduction");
article("corrections.html", "analysis/corrections/README.md", "Published corrections to shortened tables");
diff --git a/site/paper.lua b/site/paper.lua
new file mode 100644
index 0000000..8dfee52
--- /dev/null
+++ b/site/paper.lua
@@ -0,0 +1,82 @@
+-- Use Pandoc's LaTeX writer for the manuscript text, including all link targets.
+local function latex(blocks)
+ return pandoc.write(pandoc.Pandoc(blocks), "latex"):gsub("%s+$", "")
+end
+
+local function raw(s)
+ return pandoc.RawBlock("latex", s)
+end
+
+local function typeset_table(tbl, caption)
+ -- Allocate space by content: the last column of the case table contains prose.
+ local widths = { [2]={.75,.25}, [3]={.21,.30,.49},
+ [4]={.42,.14,.15,.29}, [6]={.25,.14,.12,.19,.12,.18} }
+ local columns = {}
+ local n = #tbl.colspecs
+ for i, spec in ipairs(tbl.colspecs) do
+ local align = spec[1] == "AlignRight" and "\\raggedleft" or "\\raggedright"
+ columns[i] = string.format(">{%s\\arraybackslash}p{%.3f\\tablewidth}", align, widths[n][i])
+ end
+ local parts = {"\\begin{table}[!htbp]\\centering\\small"}
+ if caption then table.insert(parts, "\\parbox{\\linewidth}{" .. latex({caption}) .. "}\\par\\smallskip") end
+ table.insert(parts, string.format("\\setlength{\\tablewidth}{\\dimexpr\\linewidth-%d\\tabcolsep\\relax}", 2*(n-1)))
+ table.insert(parts, "\\begin{tabular}{@{}" .. table.concat(columns) .. "@{}}\\toprule")
+ local function row(r, head)
+ local cells = {}
+ for i, cell in ipairs(r.cells) do
+ local s = latex(cell.contents)
+ cells[i] = head and ("\\textbf{" .. s .. "}") or s
+ end
+ table.insert(parts, table.concat(cells, " & ") .. " \\\\")
+ end
+ for _,r in ipairs(tbl.head.rows) do row(r, true) end
+ table.insert(parts, "\\midrule")
+ for _,body in ipairs(tbl.bodies) do
+ for _,r in ipairs(body.body) do row(r, false) end
+ end
+ table.insert(parts, "\\bottomrule\\end{tabular}\\end{table}")
+ return raw(table.concat(parts, "\n"))
+end
+
+-- Preserve scientific notation when the text font lacks Unicode modifier glyphs.
+function Str(word)
+ if not word.text:match("⁻⁹") and not word.text:match("₂") then return end
+ local text = word.text:gsub("⁻⁹", "−9 "):gsub("₂", "2 ")
+ return pandoc.read(text, "html").blocks[1].content
+end
+
+function Pandoc(doc)
+ local blocks = doc.blocks
+ local out = {}
+ local function add(s) table.insert(out, s) end
+ doc.meta.author = pandoc.MetaInlines(blocks[1].content)
+ local i = 2
+ while i <= #blocks do
+ local b, following = blocks[i], blocks[i+1]
+ local prefix = b.t == "Para" and pandoc.utils.stringify(b) or ""
+ if b.t == "Header" and b.identifier == "references" then
+ add(raw("\\FloatBarrier"))
+ add(b)
+ add(raw("\\small\\setlength{\\parindent}{-1em}\\setlength{\\leftskip}{1em}\\setlength{\\parskip}{3pt}"))
+ elseif prefix:match("^Figure %d+%.") then
+ local pic = following and following.content and following.content[1]
+ assert(pic and pic.t == "Image", "Figure caption must precede its image")
+ add(raw("\\begin{figure}[!htbp]\\centering\n\\includegraphics[width=\\linewidth]{" ..
+ pic.src .. "}\\par\\smallskip\n\\parbox{\\linewidth}{\\small " .. latex({b}) .. "}\\end{figure}"))
+ i = i + 1
+ if blocks[i+1] and blocks[i+1].t == "Para" and not pandoc.utils.stringify(blocks[i+1]):match("^Table %d+%.") then
+ add(raw("\\FloatBarrier"))
+ end
+ elseif prefix:match("^Table %d+%.") then
+ assert(following and following.t == "Table", "Table caption must precede its table")
+ add(typeset_table(following, b))
+ i = i + 1
+ elseif b.t == "Table" then
+ add(typeset_table(b))
+ else
+ add(b)
+ end
+ i = i + 1
+ end
+ return pandoc.Pandoc(out, doc.meta)
+end
diff --git a/site/paper.tex b/site/paper.tex
new file mode 100644
index 0000000..b9f99bb
--- /dev/null
+++ b/site/paper.tex
@@ -0,0 +1,37 @@
+\documentclass[11pt,a4paper]{article}
+\usepackage{graphicx,xcolor,booktabs,array,placeins}
+\usepackage[left=28mm,right=28mm,top=24mm,bottom=25mm,footskip=12mm]{geometry}
+\usepackage{microtype}
+\usepackage[unicode,breaklinks=true]{hyperref}
+\definecolor{linkink}{HTML}{205960}
+\hypersetup{colorlinks=true,urlcolor=linkink,linkcolor=linkink,pdfauthor={Benjamin Guo},pdftitle={$title$}}
+\urlstyle{same}
+\setlength{\parindent}{1.15em}
+\setlength{\parskip}{0pt plus .8pt}
+\setlength{\tabcolsep}{3.5pt}
+\renewcommand{\arraystretch}{1.16}
+\renewcommand{\topfraction}{.92}
+\renewcommand{\bottomfraction}{.85}
+\renewcommand{\textfraction}{.07}
+\renewcommand{\floatpagefraction}{.82}
+\newlength{\tablewidth}
+\setcounter{secnumdepth}{0}
+\setlength{\emergencystretch}{1.8em}
+\raggedbottom
+\makeatletter
+\def\@oddfoot{\small\normalfont\textsc{Guo}\hfill\thepage}
+\let\@evenfoot\@oddfoot
+\makeatother
+\begin{document}
+\begin{center}
+\parbox{.80\linewidth}{\centering\fontsize{21}{24}\selectfont\bfseries $title$}\par
+\vspace{.45em}
+{\large $subtitle$\par}
+\vspace{1em}
+$author$\par
+\vspace{.3em}
+{\small $date$\par}
+\end{center}
+\vspace{.4em}
+$body$
+\end{document}
diff --git a/site/pdf.mjs b/site/pdf.mjs
index 5e9af77..a511ddd 100644
--- a/site/pdf.mjs
+++ b/site/pdf.mjs
@@ -1,31 +1,50 @@
import crypto from "node:crypto";
import fs from "node:fs";
+import os from "node:os";
import path from "node:path";
-import {fileURLToPath} from "node:url";
-import {chromium} from "playwright-core";
-import {serve} from "./serve.mjs";
+import { execFileSync } from "node:child_process";
+import { fileURLToPath } from "node:url";
+
+import { renderTaggedPdf } from "./tagged-pdf.mjs";
+
+const root = fileURLToPath(new URL("../", import.meta.url));
+const work = fs.mkdtempSync(path.join(os.tmpdir(), "spreadsheet-paper-"));
+const docs = path.join(root, "docs");
+const pageURL = "https://hraness.github.io/spreadsheet-limits/paper.html";
-const root=fileURLToPath(new URL("../",import.meta.url));
-const {server,origin}=await serve();
-let browser;
try {
- browser=await chromium.launch({headless:true});
- const page=await browser.newPage();
- await page.goto(origin+"/paper.html",{waitUntil:"networkidle"});
- await page.evaluate(async()=>{
- await document.fonts.ready;
- for(const a of document.querySelectorAll("a[href]")){
- const raw=a.getAttribute("href");
- if (!raw.startsWith("#") && !/^[a-z]+:/i.test(raw)) a.href=new URL(raw,"https://hraness.github.io/spreadsheet-limits/").href;
- }
- });
- await page.pdf({
- path:path.join(root,"docs/paper.pdf"),format:"A4",preferCSSPageSize:true,printBackground:true,tagged:true,outline:true,
- displayHeaderFooter:true,headerTemplate:" ",
- footerTemplate:'Hraness Research · Spreadsheet limits · v0.3.0 |
'
- });
- const inputs=["docs/paper.html","docs/style.css",...fs.readdirSync(path.join(root,"docs/figures")).sort().map(f=>"docs/figures/"+f),...fs.readdirSync(path.join(root,"docs/fonts")).filter(f=>f.endsWith(".ttf")).sort().map(f=>"docs/fonts/"+f),"site/pdf.mjs","docs/paper.pdf"];
- fs.writeFileSync(path.join(root,"paper/pdf-checksums.tsv"),"path\tsha256\n"+inputs.map(p=>p+"\t"+crypto.createHash("sha256").update(fs.readFileSync(path.join(root,p))).digest("hex")).join("\n")+"\n");
+ const page = fs.readFileSync(path.join(docs, "paper.html"), "utf8");
+ let [, article] = page.match(/([\s\S]*?)<\/article>/);
+ article = article.replace(/href="([^"]+)"/g, (_, href) =>
+ 'href="' + (/^[a-z]+:/i.test(href) ? href : new URL(href, pageURL).href) + '"');
+ // Remove the scrolling wrappers used by the online tables and reuse all content.
+ article = article.replace(/]*>/g, "").replaceAll("
", "");
+ const [, title, subtitle, byline, version, body] = article.match(
+ /^\s*(.*?)<\/h1>\s* (.*?)<\/em><\/p>\s*(.*?)<\/p>\s*
(.*?)<\/p>([\s\S]*)$/,
+ );
+ const inputs = ["docs/paper.html", "site/paper.lua", "site/paper.tex", "site/pdf.mjs", "scripts/figures.py", "docs/fonts/STIXTwoText.ttf",
+ "analysis/pileup.tsv", "analysis/estimates.tsv", "analysis/periods.tsv", "analysis/citation-trace/ovarian/annotation-results.json"];
+ const figures = fs.readdirSync(path.join(docs, "figures")).filter(f => f.endsWith(".svg")).sort();
+ inputs.push(...figures.map(filename => "docs/figures/" + filename));
+ execFileSync("python3", [path.join(root, "scripts/figures.py"), "--pdf-dir", path.join(work, "figures")], {stdio: "inherit"});
+ const tex = execFileSync("pandoc", ["-f", "html", "-t", "latex", "--wrap=none", "--shift-heading-level-by=-1",
+ "--lua-filter", path.join(root, "site/paper.lua"), "--template", path.join(root, "site/paper.tex"),
+ "-M", "title=" + title, "-M", "subtitle=" + subtitle, "-M", "date=" + version],
+ {input: "
" + byline + "
" + body.replaceAll('.svg" alt=', '.pdf" alt='), encoding: "utf8"});
+ fs.writeFileSync(path.join(work, "paper.tex"), tex);
+ execFileSync("tectonic", ["--keep-logs", "paper.tex"], {cwd: work, stdio: "inherit"});
+ await renderTaggedPdf(path.join(work, "tagged.pdf"));
+ if (process.argv[2]) {
+ const sourceDir = path.resolve(process.argv[2]);
+ fs.mkdirSync(sourceDir, {recursive: true});
+ fs.copyFileSync(path.join(work, "paper.tex"), path.join(sourceDir, "paper.tex"));
+ fs.cpSync(path.join(work, "figures"), path.join(sourceDir, "figures"), {recursive: true});
+ }
+ fs.copyFileSync(path.join(work, "paper.pdf"), path.join(docs, "paper-typeset.pdf"));
+ fs.copyFileSync(path.join(work, "tagged.pdf"), path.join(docs, "paper.pdf"));
+ inputs.push("site/tagged-pdf.mjs", "site/style.css", "docs/style.css", "docs/fonts/DMSans.ttf", "docs/paper.pdf", "docs/paper-typeset.pdf");
+ const checksums = inputs.map(p => p + "\t" + crypto.createHash("sha256").update(fs.readFileSync(path.join(root, p))).digest("hex"));
+ fs.writeFileSync(path.join(root, "paper/pdf-checksums.tsv"), "path\tsha256\n" + checksums.join("\n") + "\n");
} finally {
- await browser?.close();server.close();
+ fs.rmSync(work, {recursive: true, force: true});
}
diff --git a/site/tagged-pdf.mjs b/site/tagged-pdf.mjs
new file mode 100644
index 0000000..c7e3029
--- /dev/null
+++ b/site/tagged-pdf.mjs
@@ -0,0 +1,28 @@
+import {chromium} from "playwright-core";
+import {serve} from "./serve.mjs";
+
+// Preserve the tagged, bookmarkable print edition at its original public URL.
+export async function renderTaggedPdf(destination) {
+ const {server, origin} = await serve();
+ let browser;
+ try {
+ browser=await chromium.launch({headless:true});
+ const page=await browser.newPage();
+ await page.goto(origin+"/paper.html",{waitUntil:"networkidle"});
+ await page.evaluate(async()=>{
+ await document.fonts.ready;
+ for(const a of document.querySelectorAll("a[href]")){
+ const raw=a.getAttribute("href");
+ if (!raw.startsWith("#") && !/^[a-z]+:/i.test(raw)) a.href=new URL(raw,"https://hraness.github.io/spreadsheet-limits/").href;
+ }
+ });
+ await page.pdf({
+ path:destination,format:"A4",preferCSSPageSize:true,printBackground:true,tagged:true,outline:true,
+ displayHeaderFooter:true,headerTemplate:" ",
+ footerTemplate:'Hraness Research · Spreadsheet limits · v0.3.0 |
'
+ });
+ } finally {
+ await browser?.close();
+ server.close();
+ }
+}
diff --git a/site/walk.mjs b/site/walk.mjs
index f2a18c1..220347e 100644
--- a/site/walk.mjs
+++ b/site/walk.mjs
@@ -68,10 +68,11 @@ try {
),
true,
);
- const pdf = await page.request.get(origin + "/paper.pdf");
- assert.ok(
- pdf.ok() && (await pdf.body()).subarray(0, 5).toString() === "%PDF-",
- );
+ for (const name of ["Typeset paper (PDF)", "Tagged PDF"]) {
+ const href = await page.getByRole("link", {name, exact: true}).getAttribute("href");
+ const pdf = await page.request.get(new URL(href, page.url()).href);
+ assert.ok(pdf.ok() && (await pdf.body()).subarray(0, 5).toString() === "%PDF-");
+ }
const plain = await browser.newContext({
javaScriptEnabled: false,
viewport: { width: 390, height: 844 },