HungryTorch commited on
Commit
0dd12d9
·
verified ·
1 Parent(s): ae8192e

Clarify Boards disclosure and label casing

Browse files
Files changed (3) hide show
  1. boards.py +8 -7
  2. primo.css +2 -2
  3. render.py +2 -2
boards.py CHANGED
@@ -38,13 +38,13 @@ METRIC_LABEL = {
38
  "centered_spearman": "Centered Spearman score",
39
  }
40
  MODALITY_LABEL = {
41
- "bulk RNA": "bulk RNAseq",
42
- "single-cell RNA": "single-cell RNAseq",
43
  }
44
 
45
  MODALITY_GROUP = "Per modality"
46
  AREA_GROUP = "Per therapeutic areas"
47
- CATEGORY_GROUP = "Task category"
48
 
49
  GROUP_NOTE = {
50
  MODALITY_GROUP: "Every task of one omics layer",
@@ -177,7 +177,8 @@ def _cohort_stats(tasks: list[dict]) -> tuple[int, int, int]:
177
 
178
  def _blurb(group: str, name: str, tasks: list[dict]) -> str:
179
  if group == MODALITY_GROUP:
180
- return f"Every PRIMO task, scored from {modality_label(name)} profiles."
 
181
  if group == CATEGORY_GROUP:
182
  return CATEGORY_BLURB.get(name, label(name))
183
  families = [label(c) for c in distinct(tasks, "category")]
@@ -240,17 +241,17 @@ class OpenBoard:
240
  OPEN_BOARDS: tuple[OpenBoard, ...] = (
241
  OpenBoard(
242
  MODALITY_GROUP,
243
- "single-cell RNAseq",
244
  "Dissociated tissue, labelled at the patient level. No cohort yet.",
245
  ),
246
  OpenBoard(
247
  MODALITY_GROUP,
248
- "proteomics",
249
  "Plasma or tissue proteins paired with clinical follow-up. No cohort yet.",
250
  ),
251
  OpenBoard(
252
  MODALITY_GROUP,
253
- "spatial transcriptomics",
254
  "Expression kept in place in the tissue, with patient outcomes. No cohort yet.",
255
  ),
256
  OpenBoard(
 
38
  "centered_spearman": "Centered Spearman score",
39
  }
40
  MODALITY_LABEL = {
41
+ "bulk RNA": "Bulk RNAseq",
42
+ "single-cell RNA": "Single-cell RNAseq",
43
  }
44
 
45
  MODALITY_GROUP = "Per modality"
46
  AREA_GROUP = "Per therapeutic areas"
47
+ CATEGORY_GROUP = "Task Category"
48
 
49
  GROUP_NOTE = {
50
  MODALITY_GROUP: "Every task of one omics layer",
 
177
 
178
  def _blurb(group: str, name: str, tasks: list[dict]) -> str:
179
  if group == MODALITY_GROUP:
180
+ display = modality_label(name)
181
+ return f"Every PRIMO task, scored from {display[:1].lower()}{display[1:]} profiles."
182
  if group == CATEGORY_GROUP:
183
  return CATEGORY_BLURB.get(name, label(name))
184
  families = [label(c) for c in distinct(tasks, "category")]
 
241
  OPEN_BOARDS: tuple[OpenBoard, ...] = (
242
  OpenBoard(
243
  MODALITY_GROUP,
244
+ "Single-cell RNAseq",
245
  "Dissociated tissue, labelled at the patient level. No cohort yet.",
246
  ),
247
  OpenBoard(
248
  MODALITY_GROUP,
249
+ "Proteomics",
250
  "Plasma or tissue proteins paired with clinical follow-up. No cohort yet.",
251
  ),
252
  OpenBoard(
253
  MODALITY_GROUP,
254
+ "Spatial transcriptomics",
255
  "Expression kept in place in the tissue, with patient outcomes. No cohort yet.",
256
  ),
257
  OpenBoard(
primo.css CHANGED
@@ -98,12 +98,12 @@ footer { display: none !important; }
98
  .pm-rail-summary::-webkit-details-marker { display: none; }
99
  .pm-rail-summary:hover { background: var(--sidebar-highlight); }
100
  .pm-rail-summary.pm-active { background: var(--sidebar-accent); color: #fff; }
101
- .pm-rail-summary .pm-chevron { flex: none; color: var(--sidebar-sub-fg); transition: transform .15s ease; }
102
  .pm-rail-section[open] > .pm-rail-summary .pm-chevron { transform: rotate(90deg); }
103
 
104
  .pm-rail-group { padding: 8px 16px 0; }
105
  .pm-rail-label { display: flex; align-items: center; height: 2.5rem; padding: 8px;
106
- font: 400 10px/1 var(--font-mono); letter-spacing: .08em; color: var(--sidebar-sub-fg); }
107
 
108
  /* board links are Gradio buttons, restyled */
109
  #pm-rail .pm-link {
 
98
  .pm-rail-summary::-webkit-details-marker { display: none; }
99
  .pm-rail-summary:hover { background: var(--sidebar-highlight); }
100
  .pm-rail-summary.pm-active { background: var(--sidebar-accent); color: #fff; }
101
+ .pm-rail-summary .pm-chevron { flex: none; color: #fff; transition: transform .15s ease; }
102
  .pm-rail-section[open] > .pm-rail-summary .pm-chevron { transform: rotate(90deg); }
103
 
104
  .pm-rail-group { padding: 8px 16px 0; }
105
  .pm-rail-label { display: flex; align-items: center; height: 2.5rem; padding: 8px;
106
+ font: 400 10px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--sidebar-sub-fg); }
107
 
108
  /* board links are Gradio buttons, restyled */
109
  #pm-rail .pm-link {
render.py CHANGED
@@ -68,9 +68,9 @@ METRIC_GUIDES = {
68
  }
69
 
70
  CHEVRON = (
71
- '<svg class="pm-chevron" viewBox="0 0 16 16" width="12" height="12" '
72
  'aria-hidden="true"><path d="M6 4l4 4-4 4" fill="none" stroke="currentColor" '
73
- 'stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>'
74
  )
75
 
76
 
 
68
  }
69
 
70
  CHEVRON = (
71
+ '<svg class="pm-chevron" viewBox="0 0 16 16" width="16" height="16" '
72
  'aria-hidden="true"><path d="M6 4l4 4-4 4" fill="none" stroke="currentColor" '
73
+ 'stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>'
74
  )
75
 
76