Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 6 additions & 0 deletions backend/src/routes/elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ class SemanticInput(BaseModel):
data_type: str
unit: str | None = None
constraints: dict | None = None
# reproschema-aligned fields:
response_options: list[dict] | None = None
question_text: str | None = None
value_domain: str | None = None
min_value: float | None = None
max_value: float | None = None


class ProvenanceInput(BaseModel):
Expand Down
48 changes: 47 additions & 1 deletion frontend/components/ElementDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,43 @@ export function ElementDetail({ element }: ElementDetailProps) {
</>
)}

{semantic.min_value != null && (
<>
<dt className="text-muted-foreground">Range</dt>
<dd>
{String(semantic.min_value)} –{" "}
{String(semantic.max_value)}
</dd>
</>
)}

{semantic.question_text && (
<>
<dt className="text-muted-foreground">Question</dt>
<dd className="italic">
{String(semantic.question_text)}
</dd>
</>
)}

{Array.isArray(semantic.response_options) &&
(semantic.response_options as Array<Record<string, string>>).length > 0 && (
<>
<dt className="text-muted-foreground">Response Options</dt>
<dd>
<div className="flex flex-wrap gap-1">
{(semantic.response_options as Array<Record<string, string>>).map(
(opt, i) => (
<Badge key={i} variant="outline" className="text-xs">
{opt.label || opt.value}
</Badge>
),
)}
</div>
</dd>
</>
)}

{semantic.constraints && Object.keys(semantic.constraints).length > 0 && (
<>
<dt className="text-muted-foreground">Constraints</dt>
Expand Down Expand Up @@ -93,9 +130,18 @@ export function ElementDetail({ element }: ElementDetailProps) {
{p.description}
</p>
)}
<div className="mt-1 flex gap-3 text-xs text-muted-foreground">
<div className="mt-1 flex flex-wrap gap-3 text-xs text-muted-foreground">
{p.required && <span>required</span>}
{p.multivalued && <span>multivalued</span>}
{p.activity && (
<span>{String(p.activity)}</span>
)}
{p.generated_at && (
<span>{String(p.generated_at).slice(0, 10)}</span>
)}
{p.attributed_to && (
<span className="font-mono">{String(p.attributed_to)}</span>
)}
</div>
</div>
))}
Expand Down
11 changes: 11 additions & 0 deletions frontend/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ export interface SemanticIdentity {
data_type: string;
unit: string | null;
constraints: Record<string, unknown> | null;
// reproschema-aligned fields:
response_options: Array<{ value: string; label?: string; ontology_term?: string }> | null;
question_text: string | null;
value_domain: string | null;
min_value: number | null;
max_value: number | null;
}

export interface ProvenanceEntry {
Expand All @@ -14,6 +20,11 @@ export interface ProvenanceEntry {
description: string | null;
required: boolean | null;
multivalued: boolean | null;
// W3C PROV-O fields:
generated_at: string | null;
attributed_to: string | null;
activity: string | null;
derived_from: string | null;
}

export interface DataElement {
Expand Down
11 changes: 6 additions & 5 deletions library/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ Identity ≠ provenance — two sources defining the same concept produce one el

## Contents

- **5,345 data elements** (content-addressed, class-scoped)
- **862 class schemas** with property membership from BIDS, DANDI, NWB, AIND, openMINDS
- **295 value concepts** — categorical/enum values as semantic entities (e.g., `male` → `PATO:0000384`)
- **2,697 data elements** (content-addressed, reproschema-aligned)
- **482 class schemas** with property membership from BIDS, DANDI, NWB, AIND, openMINDS
- **1,207 value concepts** — categorical/enum values as semantic entities
- **Enriched model**: response_options, min/max ranges, question_text, W3C PROV-O provenance
- **Ontology verification**: offline cache + OLS refresh for NCIT, PATO, HP, OBI, NCBITaxon
- **Alias detection**: semantic similarity with SKOS mapping relations
- **Content-addressed filenames**: `{attribute}_{6-char-hash}.yaml`
- **LinkML meta-schema**: `library-schema.linkml.yaml`
- **Curated value mappings**: `value-mappings.yaml` (sex, species, handedness, modality)

## Install

Expand Down
4 changes: 4 additions & 0 deletions library/elements/4DBti_w2jrb6.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
semantic:
data_type: string
value_domain: text
provenance:
- source: bids
class: enums
name: 4DBti
description: 'ALS orientation and the origin between the ears.

'
generated_at: '2026-03-20T22:38:30.639874+00:00'
attributed_to: urn:undata:ingestion-pipeline
activity: ingestion
9 changes: 0 additions & 9 deletions library/elements/ACCELChannelCount_1lnurv.yaml

This file was deleted.

4 changes: 4 additions & 0 deletions library/elements/ACCEL_1r3jbh.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
semantic:
data_type: string
value_domain: text
provenance:
- source: bids
class: enums
Expand All @@ -10,3 +11,6 @@ provenance:
y, or z).

'
generated_at: '2026-03-20T22:38:30.639874+00:00'
attributed_to: urn:undata:ingestion-pipeline
activity: ingestion
4 changes: 4 additions & 0 deletions library/elements/ACPC_1g8w4j.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
semantic:
data_type: string
value_domain: text
provenance:
- source: bids
class: enums
Expand All @@ -21,3 +22,6 @@ provenance:
toolbox wiki.

'
generated_at: '2026-03-20T22:38:30.639874+00:00'
attributed_to: urn:undata:ingestion-pipeline
activity: ingestion
4 changes: 4 additions & 0 deletions library/elements/ADC_4xu9ao.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
semantic:
data_type: string
value_domain: text
provenance:
- source: bids
class: enums
name: ADC
description: 'Analog to Digital input.

'
generated_at: '2026-03-20T22:38:30.639874+00:00'
attributed_to: urn:undata:ingestion-pipeline
activity: ingestion
4 changes: 4 additions & 0 deletions library/elements/ADC_v54ciw.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
semantic:
data_type: string
value_domain: text
provenance:
- source: bids
class: suffixes
name: ADC
description: Apparent diffusion coefficient (ADC) map
generated_at: '2026-03-20T22:38:30.639874+00:00'
attributed_to: urn:undata:ingestion-pipeline
activity: ingestion
9 changes: 0 additions & 9 deletions library/elements/ANGACCELChannelCount_zpe6v1.yaml

This file was deleted.

4 changes: 4 additions & 0 deletions library/elements/ANGACCEL_16u2ym.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
semantic:
data_type: string
value_domain: text
provenance:
- source: bids
class: enums
Expand All @@ -10,3 +11,6 @@ provenance:
y, or z).

'
generated_at: '2026-03-20T22:38:30.639874+00:00'
attributed_to: urn:undata:ingestion-pipeline
activity: ingestion
4 changes: 4 additions & 0 deletions library/elements/AUDIO_ppfnl9.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
semantic:
data_type: string
value_domain: text
provenance:
- source: bids
class: enums
name: AUDIO
description: 'Audio signal.

'
generated_at: '2026-03-20T22:38:30.639874+00:00'
attributed_to: urn:undata:ingestion-pipeline
activity: ingestion
4 changes: 4 additions & 0 deletions library/elements/Absent_xstkyt.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
semantic:
data_type: string
value_domain: text
provenance:
- source: bids
class: enums
name: Absent
description: 'No specific M0 information is present.

'
generated_at: '2026-03-20T22:38:30.639874+00:00'
attributed_to: urn:undata:ingestion-pipeline
activity: ingestion
3 changes: 3 additions & 0 deletions library/elements/AbstractFeatureSeries_1wgh43.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ provenance:
to persist until the next set of features is defined. The final set of features
stored should be the null set. This is useful when storing the raw stimulus is
impractical.
generated_at: '2026-03-20T22:38:36.731646+00:00'
attributed_to: urn:undata:ingestion-pipeline
activity: ingestion
4 changes: 4 additions & 0 deletions library/elements/Acknowledgements_q9bkw1.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
semantic:
data_type: string
value_domain: text
provenance:
- source: bids
class: metadata
Expand All @@ -9,3 +10,6 @@ provenance:
those listed in Authors or Funding.

'
generated_at: '2026-03-20T22:38:30.639874+00:00'
attributed_to: urn:undata:ingestion-pipeline
activity: ingestion
4 changes: 4 additions & 0 deletions library/elements/AcquisitionDuration_uec024.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
semantic:
data_type: float
value_domain: numeric
provenance:
- source: bids
class: metadata
Expand All @@ -12,3 +13,6 @@ provenance:
`Acquisition Duration`.

'
generated_at: '2026-03-20T22:38:30.639874+00:00'
attributed_to: urn:undata:ingestion-pipeline
activity: ingestion
4 changes: 4 additions & 0 deletions library/elements/AcquisitionMode_1s47vz.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
semantic:
data_type: string
value_domain: text
provenance:
- source: bids
class: metadata
name: AcquisitionMode
description: 'Type of acquisition of the PET data (for example, `"list mode"`).

'
generated_at: '2026-03-20T22:38:30.639874+00:00'
attributed_to: urn:undata:ingestion-pipeline
activity: ingestion
3 changes: 3 additions & 0 deletions library/elements/AcquisitionVoxelSize_9bdbbi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ provenance:
that would decrease the effective resolution are not considered here.

'
generated_at: '2026-03-20T22:38:30.639874+00:00'
attributed_to: urn:undata:ingestion-pipeline
activity: ingestion
4 changes: 4 additions & 0 deletions library/elements/Anaesthesia_ik8l1c.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
semantic:
data_type: string
value_domain: text
provenance:
- source: bids
class: metadata
name: Anaesthesia
description: 'Details of anaesthesia used, if any.

'
generated_at: '2026-03-20T22:38:30.639874+00:00'
attributed_to: urn:undata:ingestion-pipeline
activity: ingestion
4 changes: 4 additions & 0 deletions library/elements/AnalyticalApproach_qpa0vb.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
semantic:
data_type: string
value_domain: text
provenance:
- source: bids
class: metadata
Expand All @@ -17,3 +18,6 @@ provenance:
Methylation (CpG).

'
generated_at: '2026-03-20T22:38:30.639874+00:00'
attributed_to: urn:undata:ingestion-pipeline
activity: ingestion
4 changes: 4 additions & 0 deletions library/elements/AnatomicalImage_xfbs95.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
semantic:
data_type: string
value_domain: text
provenance:
- source: bids
class: metadata
Expand All @@ -11,3 +12,6 @@ provenance:
Contains one or more [BIDS URIs](SPEC_ROOT/common-principles.md#bids-uri).

'
generated_at: '2026-03-20T22:38:30.639874+00:00'
attributed_to: urn:undata:ingestion-pipeline
activity: ingestion
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
semantic:
data_type: string
value_domain: text
provenance:
- source: bids
class: metadata
Expand All @@ -11,3 +12,6 @@ provenance:
system in greater detail.

'
generated_at: '2026-03-20T22:38:30.639874+00:00'
attributed_to: urn:undata:ingestion-pipeline
activity: ingestion
Loading
Loading