Archive 4 checkpoints (1-4)
Browse files- .gitattributes +1 -0
- paper-releases/pbisc-diffusion/updates/20261012T233237Z-figure-layout-todo/diffusion/dataset/server_1/model8/plans/paper_figures_strictpairs_20261012/layout_preview_20261013/build_layout.py +269 -0
- paper-releases/pbisc-diffusion/updates/20261012T233237Z-figure-layout-todo/diffusion/dataset/server_1/model8/plans/paper_figures_strictpairs_20261012/layout_preview_20261013/panels/Figure_1_layout.pdf +3 -0
- paper-releases/pbisc-diffusion/updates/20261012T233237Z-figure-layout-todo/diffusion/dataset/server_1/model8/plans/paper_figures_strictpairs_20261012/layout_preview_20261013/panels/Figure_1_layout.png +3 -0
- paper-releases/pbisc-diffusion/updates/20261012T233237Z-figure-layout-todo/diffusion/dataset/server_1/model8/plans/paper_figures_strictpairs_20261012/layout_preview_20261013/panels/Figure_1_layout.svg +0 -0
.gitattributes
CHANGED
|
@@ -224,3 +224,4 @@ paper-releases/pbisc-diffusion/updates/20261012T130738Z-strictpairs-implementati
|
|
| 224 |
paper-releases/pbisc-diffusion/updates/20261012T130738Z-strictpairs-implementation/diffusion/dataset/server_1/model8/plans/paper_figures_strictpairs_20261012/scsemi/ye2026_sepsis/disease/draw4/adopted_legacy/scsemi_project/models/fastreconst2_Skin-S46 filter=lfs diff=lfs merge=lfs -text
|
| 225 |
paper-releases/pbisc-diffusion/updates/20261012T233237Z-figure-layout-todo/diffusion/dataset/server_1/model8/plans/paper_figures_strictpairs_20261012/layout_preview_20261013/PBISC_Figure_layout_TODO_20261013.pdf filter=lfs diff=lfs merge=lfs -text
|
| 226 |
paper-releases/pbisc-diffusion/updates/20261012T233237Z-figure-layout-todo/diffusion/dataset/server_1/model8/plans/paper_figures_strictpairs_20261012/layout_preview_20261013/PBISC_Figure_layout_TODO_20261013.pptx filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 224 |
paper-releases/pbisc-diffusion/updates/20261012T130738Z-strictpairs-implementation/diffusion/dataset/server_1/model8/plans/paper_figures_strictpairs_20261012/scsemi/ye2026_sepsis/disease/draw4/adopted_legacy/scsemi_project/models/fastreconst2_Skin-S46 filter=lfs diff=lfs merge=lfs -text
|
| 225 |
paper-releases/pbisc-diffusion/updates/20261012T233237Z-figure-layout-todo/diffusion/dataset/server_1/model8/plans/paper_figures_strictpairs_20261012/layout_preview_20261013/PBISC_Figure_layout_TODO_20261013.pdf filter=lfs diff=lfs merge=lfs -text
|
| 226 |
paper-releases/pbisc-diffusion/updates/20261012T233237Z-figure-layout-todo/diffusion/dataset/server_1/model8/plans/paper_figures_strictpairs_20261012/layout_preview_20261013/PBISC_Figure_layout_TODO_20261013.pptx filter=lfs diff=lfs merge=lfs -text
|
| 227 |
+
paper-releases/pbisc-diffusion/updates/20261012T233237Z-figure-layout-todo/diffusion/dataset/server_1/model8/plans/paper_figures_strictpairs_20261012/layout_preview_20261013/panels/Figure_1_layout.pdf filter=lfs diff=lfs merge=lfs -text
|
paper-releases/pbisc-diffusion/updates/20261012T233237Z-figure-layout-todo/diffusion/dataset/server_1/model8/plans/paper_figures_strictpairs_20261012/layout_preview_20261013/build_layout.py
ADDED
|
@@ -0,0 +1,269 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Arrange approved paper figures with explicit unfinished-experiment panels.
|
| 2 |
+
|
| 3 |
+
Reads stable existing vector figures and small status receipts. Writes only this
|
| 4 |
+
versioned layout package; does not score, generate cells, or modify manuscripts.
|
| 5 |
+
"""
|
| 6 |
+
from pathlib import Path
|
| 7 |
+
from datetime import datetime, timezone, timedelta
|
| 8 |
+
import csv
|
| 9 |
+
import hashlib
|
| 10 |
+
import json
|
| 11 |
+
import os
|
| 12 |
+
import shutil
|
| 13 |
+
|
| 14 |
+
if os.environ.get('CUDA_VISIBLE_DEVICES') != '':
|
| 15 |
+
raise SystemExit('CPU-only layout builder requires CUDA_VISIBLE_DEVICES empty')
|
| 16 |
+
import fitz
|
| 17 |
+
from pptx import Presentation
|
| 18 |
+
from pptx.util import Pt
|
| 19 |
+
from pptx.dml.color import RGBColor
|
| 20 |
+
from pptx.enum.shapes import MSO_SHAPE
|
| 21 |
+
|
| 22 |
+
OUT = Path(__file__).resolve().parent
|
| 23 |
+
ROOT = OUT.parent
|
| 24 |
+
W, H = 510.24, 680.32 # 180 x 240 mm; one paper figure per portrait slide.
|
| 25 |
+
INK = '#233647'
|
| 26 |
+
MUTED = '#617183'
|
| 27 |
+
TEAL = '#087E78'
|
| 28 |
+
AMBER = '#A66A0C'
|
| 29 |
+
LIGHT = '#FFF6E5'
|
| 30 |
+
GREY = '#E0E6EC'
|
| 31 |
+
FONTS = Path('/usr/share/fonts/truetype/dejavu')
|
| 32 |
+
PDF = fitz.open()
|
| 33 |
+
PPT = Presentation()
|
| 34 |
+
PPT.slide_width, PPT.slide_height = Pt(W), Pt(H)
|
| 35 |
+
PAGE = SLIDE = None
|
| 36 |
+
MAP = []
|
| 37 |
+
ASSETS = []
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
def sha(path):
|
| 41 |
+
with Path(path).open('rb') as stream:
|
| 42 |
+
return hashlib.file_digest(stream, 'sha256').hexdigest()
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
def color(value):
|
| 46 |
+
return tuple(int(value[i:i+2], 16) / 255 for i in (1, 3, 5))
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
def rgb(value):
|
| 50 |
+
return RGBColor.from_string(value[1:])
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
def box(x, y, w, h, fill='#FFFFFF', border=GREY):
|
| 54 |
+
PAGE.draw_rect(fitz.Rect(x, y, x+w, y+h), color=color(border), fill=color(fill), width=.65)
|
| 55 |
+
shape = SLIDE.shapes.add_shape(MSO_SHAPE.RECTANGLE, Pt(x), Pt(y), Pt(w), Pt(h))
|
| 56 |
+
shape.fill.solid(); shape.fill.fore_color.rgb = rgb(fill)
|
| 57 |
+
shape.line.color.rgb = rgb(border); shape.line.width = Pt(.65)
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
def text(x, y, w, h, value, size=9, bold=False, ink=INK):
|
| 61 |
+
font = 'DB' if bold else 'DR'
|
| 62 |
+
for fs in (size, size-.3, size-.6):
|
| 63 |
+
result = PAGE.insert_textbox(fitz.Rect(x, y, x+w, y+h), value,
|
| 64 |
+
fontname=font, fontsize=fs, color=color(ink), lineheight=1.12)
|
| 65 |
+
if result >= 0:
|
| 66 |
+
break
|
| 67 |
+
else:
|
| 68 |
+
raise ValueError(f'text overflow: {value[:70]}')
|
| 69 |
+
shape = SLIDE.shapes.add_textbox(Pt(x), Pt(y), Pt(w), Pt(h))
|
| 70 |
+
frame = shape.text_frame
|
| 71 |
+
frame.margin_left = frame.margin_right = frame.margin_top = frame.margin_bottom = 0
|
| 72 |
+
frame.word_wrap = True
|
| 73 |
+
for i, line in enumerate(value.split('\n')):
|
| 74 |
+
p = frame.paragraphs[0] if i == 0 else frame.add_paragraph()
|
| 75 |
+
p.text = line; p.font.name = 'DejaVu Sans'; p.font.size = Pt(fs)
|
| 76 |
+
p.font.bold = bold; p.font.color.rgb = rgb(ink)
|
| 77 |
+
p.space_after = Pt(0); p.line_spacing = 1.12
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
def page(number, title, subtitle):
|
| 81 |
+
global PAGE, SLIDE
|
| 82 |
+
PAGE = PDF.new_page(width=W, height=H)
|
| 83 |
+
PAGE.insert_font(fontname='DR', fontfile=str(FONTS/'DejaVuSans.ttf'))
|
| 84 |
+
PAGE.insert_font(fontname='DB', fontfile=str(FONTS/'DejaVuSans-Bold.ttf'))
|
| 85 |
+
SLIDE = PPT.slides.add_slide(PPT.slide_layouts[6])
|
| 86 |
+
text(14, 12, 482, 25, title, 16, True)
|
| 87 |
+
text(14, 39, 482, 24, subtitle, 8.2, ink=MUTED)
|
| 88 |
+
PAGE.draw_line((14, 65), (496, 65), color=color(GREY), width=.8)
|
| 89 |
+
text(14, 650, 418, 18, 'PBISC-Diffusion | Figure placement preview | '+SNAPSHOT['as_of_kst'], 6.8, ink=MUTED)
|
| 90 |
+
text(457, 650, 39, 18, str(number), 7, ink=MUTED)
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
def asset(stem, x, y, w, h, clip=None):
|
| 94 |
+
source = OUT/'sources'/f'{stem}.pdf'
|
| 95 |
+
doc = fitz.open(source)
|
| 96 |
+
rect = doc[0].rect
|
| 97 |
+
if clip is not None:
|
| 98 |
+
rect = fitz.Rect(rect.x0, rect.height*clip[0], rect.x1, rect.height*clip[1])
|
| 99 |
+
ratio = rect.width/rect.height
|
| 100 |
+
aw, ah = min(w, h*ratio), min(h, w/ratio)
|
| 101 |
+
xx, yy = x+(w-aw)/2, y+(h-ah)/2
|
| 102 |
+
PAGE.show_pdf_page(fitz.Rect(xx, yy, xx+aw, yy+ah), doc, 0, clip=rect)
|
| 103 |
+
suffix = '' if clip is None else '-'+str(clip[0])+'-'+str(clip[1])
|
| 104 |
+
rendered = OUT/'sources'/f'{stem}{suffix}.png'
|
| 105 |
+
doc[0].get_pixmap(matrix=fitz.Matrix(3, 3), clip=rect, alpha=False).save(rendered)
|
| 106 |
+
SLIDE.shapes.add_picture(str(rendered), Pt(xx), Pt(yy), width=Pt(aw), height=Pt(ah))
|
| 107 |
+
ASSETS.append({'page':len(PDF), 'source':str(source), 'sha256':sha(source), 'clip_y_fraction':clip})
|
| 108 |
+
|
| 109 |
+
|
| 110 |
+
def todo(fig, panel, x, y, w, h, title, body):
|
| 111 |
+
box(x, y, w, h, LIGHT, '#D6AD69')
|
| 112 |
+
text(x+8, y+7, w-16, 30, f'{panel} TODO | {title}', 9.5, True, AMBER)
|
| 113 |
+
text(x+8, y+41, w-16, h-46, body, 8.2, ink=MUTED)
|
| 114 |
+
MAP.append({'figure':fig, 'panel':panel, 'title':title, 'state':'TODO', 'dependency':body})
|
| 115 |
+
|
| 116 |
+
|
| 117 |
+
def ready(fig, panel, title, source, state='AVAILABLE'):
|
| 118 |
+
MAP.append({'figure':fig, 'panel':panel, 'title':title, 'state':state, 'dependency':source})
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
def snapshot():
|
| 122 |
+
units = []
|
| 123 |
+
for path in sorted((ROOT/'protocol/splits').glob('**/support.json')):
|
| 124 |
+
relative = path.parent.relative_to(ROOT/'protocol/splits')
|
| 125 |
+
name = '-'.join(relative.parts)
|
| 126 |
+
record = json.loads(path.read_text())
|
| 127 |
+
score = ROOT/'receipts'/f'{name}-score.json'
|
| 128 |
+
completed = score.is_file() and json.loads(score.read_text()).get('state') == 'completed'
|
| 129 |
+
units.append({'unit':name, 'cohort':record['cohort'], 'n_pairs':record['n_pairs'],
|
| 130 |
+
'score_completed':completed, 'support_sha256':record['sha256']})
|
| 131 |
+
remote = json.loads((ROOT/'recoveries/two_host/STATUS.json').read_text())
|
| 132 |
+
return {'as_of_kst':datetime.now(timezone(timedelta(hours=9))).strftime('%Y-%m-%d %H:%M KST'),
|
| 133 |
+
'units':units, 'scored_units':sum(x['score_completed'] for x in units),
|
| 134 |
+
'remote_generated_verified':remote['remote_imported'],
|
| 135 |
+
'campaign_state':remote['state'], 'figure6':'waiting_user_prepared_data',
|
| 136 |
+
'scope':'figure layout only; no new scientific analysis or manuscript edits'}
|
| 137 |
+
|
| 138 |
+
|
| 139 |
+
def main():
|
| 140 |
+
global SNAPSHOT
|
| 141 |
+
SNAPSHOT = snapshot()
|
| 142 |
+
(OUT/'STATUS_SNAPSHOT.json').write_text(json.dumps(SNAPSHOT, indent=2)+'\n')
|
| 143 |
+
names = ['fig1_overview','fig2_ablation_and_support','fig4_historical_5fold_separate','fig5_behcet_rules_diagnostic']
|
| 144 |
+
sources = []
|
| 145 |
+
for stem in names:
|
| 146 |
+
for suffix in ['pdf','svg']:
|
| 147 |
+
source = ROOT/'figures'/f'{stem}.{suffix}'
|
| 148 |
+
target = OUT/'sources'/source.name
|
| 149 |
+
if target.exists():
|
| 150 |
+
assert sha(target) == sha(source)
|
| 151 |
+
else:
|
| 152 |
+
shutil.copy2(source, target)
|
| 153 |
+
sources.append({'original':str(source), 'snapshot':str(target), 'sha256':sha(target)})
|
| 154 |
+
healthy = sum(x['score_completed'] for x in SNAPSHOT['units'] if x['cohort']=='immicro')
|
| 155 |
+
n5 = sum(x['score_completed'] for x in SNAPSHOT['units'] if x['cohort']=='immicro' and x['n_pairs']==5)
|
| 156 |
+
|
| 157 |
+
page(1, 'Figures first: Results layout', 'Existing evidence is placed now. Amber TODO boxes reserve unfinished experiments and derived panels.')
|
| 158 |
+
rows = [
|
| 159 |
+
('01','Training and inference concept','Complete concept, architecture and corpus panels.','AVAILABLE'),
|
| 160 |
+
('02','Settings and paired-data budget','Native-pseudobulk ablations + real-bulk rank selection. Strict-n curves remain TODO.','PARTIAL'),
|
| 161 |
+
('03','Healthy single-cell reconstruction','UMAP, marker profiles, composition and quality; operating-time inset.','TODO'),
|
| 162 |
+
('04','Disease signal in paired cohorts','Historical five-fold evidence; exact-five-pair contrasts and deconvolution remain TODO.','PARTIAL'),
|
| 163 |
+
('05','Rare-cell and state reproduction','Strict paired validation remains TODO. Behcet is a separate descriptive case.','PARTIAL'),
|
| 164 |
+
('06','Bulk-only reproduction','Reserved until the user-prepared data are available.','WAITING')]
|
| 165 |
+
for i,(n,title,body,state) in enumerate(rows):
|
| 166 |
+
y=80+i*76
|
| 167 |
+
box(14,y,482,67,'#F5F7FA')
|
| 168 |
+
text(25,y+10,35,24,n,16,True,TEAL)
|
| 169 |
+
text(69,y+9,326,23,title,11,True)
|
| 170 |
+
text(69,y+32,326,29,body,8.1,ink=MUTED)
|
| 171 |
+
text(409,y+11,76,18,state,7.3,True,TEAL if state=='AVAILABLE' else AMBER)
|
| 172 |
+
text(14,554,482,54,f'Snapshot: {SNAPSHOT["scored_units"]}/40 units have completed scoring; '
|
| 173 |
+
f'{len(SNAPSHOT["remote_generated_verified"])} additional remote units have verified generated outputs.\n'
|
| 174 |
+
'The figure package is a layout review, not a claim that the experimental campaign is complete.',9,ink=MUTED)
|
| 175 |
+
|
| 176 |
+
page(2,'Figure 1 | Training and inference','a Workflow b Model c Condition d Independent draws e Corpus')
|
| 177 |
+
asset('fig1_overview',14,72,482,568)
|
| 178 |
+
ready(1,'a-e','Complete training-to-inference concept','fig1_overview.pdf')
|
| 179 |
+
|
| 180 |
+
page(3,'Figure 2 | Settings and data efficiency','Ablations use native pseudobulk. LoRA selection uses healthy real-bulk paired data.')
|
| 181 |
+
asset('fig2_ablation_and_support',14,72,482,357,clip=(.035,.68))
|
| 182 |
+
ready(2,'a-c','Architecture and gene-panel comparisons','fig2_ablation_and_support.pdf, top row')
|
| 183 |
+
ready(2,'d-f','Full fine-tuning and LoRA rank selection','fig2_ablation_and_support.pdf, middle row','HISTORICAL 5-FOLD')
|
| 184 |
+
for j,(panel,title) in enumerate([('g','Precision curve'),('h','Coverage curve'),('i','Composition curve')]):
|
| 185 |
+
todo(2,panel,14+j*164,443,154,154,title,
|
| 186 |
+
f'Exact n = 5 / 10 / 20 / 40\nFive outer folds\n{healthy}/20 units scored\nLoRA, same-n calibration and scSemiProfiler; raw/ref-cal control lines.')
|
| 187 |
+
text(14,612,482,28,'Two gene-selection floors stay separate. The incomplete G-I points from the earlier preview are replaced by TODO slots.',8,ink=MUTED)
|
| 188 |
+
|
| 189 |
+
page(4,'Figure 3 | Healthy cell reconstruction','Strict five-pair out-of-fold evaluation. The complete five-fold set will populate this layout.')
|
| 190 |
+
todo(3,'a',14,75,482,137,'Common-reference UMAP',
|
| 191 |
+
'Real | PBISC-LoRA | scSemiProfiler | external ref-cal | same-pair calibration\nReal-reference coordinates only; shared cell-type colors; no forced integration.')
|
| 192 |
+
todo(3,'b',14,222,236,119,'Canonical marker profiles','Heatmap + dot plot\nFixed marker list, gene order and expression scale; dot size = detection fraction.')
|
| 193 |
+
todo(3,'c',260,222,236,119,'Cell-type composition','Observed and generated fractions\nPer-donor composition error, with the same cell-type ordering across methods.')
|
| 194 |
+
todo(3,'d',14,351,236,108,'Primary quality metrics','Precision | coverage | composition L1\nMatched reference, donors and output cell budget.')
|
| 195 |
+
todo(3,'e',260,351,236,108,'Additional realism','C2ST | MMD2 | E_N\nReal-versus-real control; no interpretation of UMAP overlap as a score.')
|
| 196 |
+
todo(3,'f',14,469,482,104,'Operating time and compute','Small supporting panel: adaptation time + target-generation time.\nExclude the supplied pretraining cost, GPU queue waits and evaluation time.')
|
| 197 |
+
text(14,592,482,42,f'{n5}/5 healthy strict-five-pair folds scored at this snapshot.\nGeneration completion alone does not fill a quantitative or UMAP panel.',9,ink=MUTED)
|
| 198 |
+
|
| 199 |
+
page(5,'Figure 4 | Disease signal','Sepsis | Imperial | Giroux | Ji. Exact-five-pair and five-fold designs occupy separate blocks.')
|
| 200 |
+
todo(4,'a',14,75,482,113,'Exact-five-pair comparison','Five draws per cohort; one pair per donor.\nPearson / Spearman logFC, partial correlation and top-DEG overlap; patient-level uncertainty.')
|
| 201 |
+
text(14,202,482,24,'b Historical five-fold | original sample-level estimator',10,True)
|
| 202 |
+
for j,name in enumerate(['Sepsis','Imperial','Giroux','Ji']):text(42+j*117,230,110,18,name,8.7,True)
|
| 203 |
+
asset('fig4_historical_5fold_separate',14,248,482,282,clip=(.385,1))
|
| 204 |
+
ready(4,'b','Existing disease five-fold contrasts','fig4_historical_5fold_separate.pdf, logFC + partial-r rows','HISTORICAL ESTIMATOR')
|
| 205 |
+
todo(4,'c',14,539,236,99,'Gene-level validation','Observed-generated scatter / heatmap, CAT curves and patient-aware DEG sensitivity.')
|
| 206 |
+
todo(4,'d',260,539,236,99,'Matched deconvolution','BayesPrism / CIBERSORTx on the same support pairs; supported expression/composition endpoints.')
|
| 207 |
+
|
| 208 |
+
page(6,'Figure 5 | Rare cells and states','Four paired disease cohorts for quantitative validation; Behcet shown as a separate descriptive case.')
|
| 209 |
+
todo(5,'a',14,75,482,86,'State-frequency and detection map','All predefined state x cohort combinations; observed frequency, donor support and explicit zero detections.')
|
| 210 |
+
todo(5,'b',14,171,236,103,'State identity and location','Common UMAP with rare-state zoom; marker heatmap, dot plot and same-cell co-detection.')
|
| 211 |
+
todo(5,'c',260,171,236,103,'Patient-level reproduction','Observed-generated abundance scatter, missed-state frequency and disease direction.')
|
| 212 |
+
todo(5,'d',14,284,482,73,'All-state robustness','Retain zero draws and real donor IDs; common-depth / equal-cell-budget sensitivity; required markers.')
|
| 213 |
+
text(14,369,482,25,'e Behcet C1Q | descriptive evidence already available',10,True)
|
| 214 |
+
asset('fig5_behcet_rules_diagnostic',14,395,482,217)
|
| 215 |
+
ready(5,'e','Any C1Q versus multi-gene C1Q rule','fig5_behcet_rules_diagnostic.pdf','DESCRIPTIVE')
|
| 216 |
+
text(14,617,482,25,'Unmatched reference includes training donors; 2 identity-pass + 1 uncertain candidate pairs. Calibration uses the same three pairs.',7.6,ink=MUTED)
|
| 217 |
+
|
| 218 |
+
page(7,'Figure 6 | Reserved','Bulk-only reproduction of a published finding; awaiting the user-prepared dataset.')
|
| 219 |
+
todo(6,'a',14,88,482,180,'Dataset and reproduction design','Place the cohort, published target finding, paired-adaptation subset and held-out evaluation here after data preparation.')
|
| 220 |
+
todo(6,'b',14,282,482,180,'Reproduction and validation','Place the reproduction result and independent supporting evidence here. No Figure 6 analysis is started by this layout task.')
|
| 221 |
+
text(14,490,482,68,'Reserved layout only.\nThe new Figure 6 data are not replaced by the earlier exploratory bulk-only screen.',11,ink=MUTED)
|
| 222 |
+
|
| 223 |
+
page(8,'Panel TODO register','Pending panels remain visible in the figure order so they can be replaced as results become available.')
|
| 224 |
+
grouped=[('Figure 2 g-i','Finish 20 healthy strict-n settings; build the three matched-budget curves.'),
|
| 225 |
+
('Figure 3 a-f','Complete five-fold scoring; export real-only UMAP, markers, composition, realism and runtime.'),
|
| 226 |
+
('Figure 4 a,c,d','Complete 20 exact-five disease settings; aggregate patient-aware contrasts and matched deconvolution.'),
|
| 227 |
+
('Figure 5 a-d','Build 20 strict rare-state caches; zero-aware metrics, common-depth checks and marker visuals.'),
|
| 228 |
+
('Figure 6 a-b','Wait for the user-prepared bulk-only reproduction data.')]
|
| 229 |
+
for i,(label,detail) in enumerate(grouped):
|
| 230 |
+
y=85+i*89;box(14,y,482,76,LIGHT,'#D6AD69')
|
| 231 |
+
text(25,y+10,132,28,label,11,True,AMBER)
|
| 232 |
+
text(164,y+10,319,57,detail,9,ink=MUTED)
|
| 233 |
+
text(14,550,482,66,'Available assets: Figure 1; Figure 2 a-f; historical Figure 4 b; descriptive Figure 5 e.\nAll TODO text and panel boxes are editable in the PPTX. Existing plots retain their original data and source labels.',9,ink=MUTED)
|
| 234 |
+
|
| 235 |
+
target=OUT/'PBISC_Figure_layout_TODO_20261013'
|
| 236 |
+
PDF.set_metadata({'title':'PBISC-Diffusion Figure placement with TODO panels','subject':'Layout preview; running experiments are explicitly pending'})
|
| 237 |
+
PDF.save(target.with_suffix('.pdf'),garbage=4,deflate=True)
|
| 238 |
+
PPT.save(target.with_suffix('.pptx'))
|
| 239 |
+
(OUT/'panels').mkdir(exist_ok=True)
|
| 240 |
+
for figure,index in [(1,1),(2,2),(3,3),(4,4),(5,5),(6,6)]:
|
| 241 |
+
one=fitz.open();one.insert_pdf(PDF,from_page=index,to_page=index)
|
| 242 |
+
one.save(OUT/'panels'/f'Figure_{figure}_layout.pdf',garbage=4,deflate=True)
|
| 243 |
+
PDF[index].get_pixmap(matrix=fitz.Matrix(2,2),alpha=False).save(OUT/'panels'/f'Figure_{figure}_layout.png')
|
| 244 |
+
(OUT/'panels'/f'Figure_{figure}_layout.svg').write_text(PDF[index].get_svg_image())
|
| 245 |
+
(OUT/'PANEL_MAP.json').write_text(json.dumps(MAP,indent=2)+'\n')
|
| 246 |
+
with (OUT/'PANEL_MAP.csv').open('w',newline='') as f:
|
| 247 |
+
writer=csv.DictWriter(f,fieldnames=['figure','panel','title','state','dependency']);writer.writeheader();writer.writerows(MAP)
|
| 248 |
+
provenance={'schema':'pbisc.figure-layout-preview.v1','as_of_kst':SNAPSHOT['as_of_kst'],
|
| 249 |
+
'status':'layout_preview_with_todos','sources':sources,'placements':ASSETS,
|
| 250 |
+
'pdf_sha256':sha(target.with_suffix('.pdf')),'pptx_sha256':sha(target.with_suffix('.pptx')),
|
| 251 |
+
'manuscript_modified':False,'experiments_started':False,'panels':MAP}
|
| 252 |
+
(OUT/'PROVENANCE.json').write_text(json.dumps(provenance,indent=2)+'\n')
|
| 253 |
+
(OUT/'README.md').write_text('# PBISC Figure placement preview\n\n'
|
| 254 |
+
'Figure 1–5 placement first, with explicit TODO slots for running experiments; Figure 6 is reserved.\n\n'
|
| 255 |
+
'- `PBISC_Figure_layout_TODO_20261013.pdf`: eight-page vector review package.\n'
|
| 256 |
+
'- `PBISC_Figure_layout_TODO_20261013.pptx`: same layout, editable labels and TODO boxes.\n'
|
| 257 |
+
'- `panels/`: individual figure PDF/SVG/PNG exports.\n'
|
| 258 |
+
'- `PANEL_MAP.csv`: available panels and experiment TODOs.\n'
|
| 259 |
+
'- `STATUS_SNAPSHOT.json`: point-in-time execution counts, not live status.\n'
|
| 260 |
+
'- `PROVENANCE.json`: stable source copies and file hashes.\n\n'
|
| 261 |
+
'No new experiment or statistical analysis was run. The incomplete strict curves were replaced by TODO boxes. '
|
| 262 |
+
'Historical five-fold and descriptive Behcet evidence retain their scope labels. '
|
| 263 |
+
'This package is separate from the running campaign outputs and does not modify manuscript source.\n')
|
| 264 |
+
print(json.dumps({'pdf':str(target.with_suffix('.pdf')),'pptx':str(target.with_suffix('.pptx')),
|
| 265 |
+
'pages':len(PDF),'todo_panels':sum(x['state']=='TODO' for x in MAP)},indent=2))
|
| 266 |
+
|
| 267 |
+
|
| 268 |
+
if __name__=='__main__':
|
| 269 |
+
main()
|
paper-releases/pbisc-diffusion/updates/20261012T233237Z-figure-layout-todo/diffusion/dataset/server_1/model8/plans/paper_figures_strictpairs_20261012/layout_preview_20261013/panels/Figure_1_layout.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c855271cab20679ffb935c5a50dbbe4c50c6e5d1f2d49541f2bb79dc2b035a72
|
| 3 |
+
size 819351
|
paper-releases/pbisc-diffusion/updates/20261012T233237Z-figure-layout-todo/diffusion/dataset/server_1/model8/plans/paper_figures_strictpairs_20261012/layout_preview_20261013/panels/Figure_1_layout.png
ADDED
|
Git LFS Details
|
paper-releases/pbisc-diffusion/updates/20261012T233237Z-figure-layout-todo/diffusion/dataset/server_1/model8/plans/paper_figures_strictpairs_20261012/layout_preview_20261013/panels/Figure_1_layout.svg
ADDED
|
|