diff --git a/.github/workflows/kg.yml b/.github/workflows/kg.yml index a75744e6..54e1e4cb 100644 --- a/.github/workflows/kg.yml +++ b/.github/workflows/kg.yml @@ -55,6 +55,19 @@ jobs: if: steps.scope.outputs.run == 'true' run: python kg/ci_check.py --check-generated + # kg/bbqs_kg.py's export() against a stand-in for Supabase's REST API: no network, no key. + - name: Exporter tests + if: steps.scope.outputs.run == 'true' + run: python kg/test_exporter.py + + # kg/mcp_server.py: the traversal answers, the read-only guarantee, and the protocol itself + # (a real server process over stdio and HTTP). Adds the MCP SDK to the environment above. + - name: MCP server tests + if: steps.scope.outputs.run == 'true' + run: | + pip install -r kg/requirements-mcp.txt + python kg/test_mcp_server.py + - name: Quality summary if: steps.scope.outputs.run == 'true' && always() run: | diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 93989c9d..39587ce0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -77,6 +77,11 @@ jobs: pip install -r kg/requirements.txt if python kg/export.py /tmp/live.ttl; then data=/tmp/live.ttl; src="live anon export (daily build)" + # The graph itself -> dist/kg/bbqs.ttl, the default source of kg/mcp_server.py. The same + # anon export the Inspector embeds, so it publishes nothing that page does not. Only a + # live export goes out: the file's date is how a reader knows the age of the data, and + # the committed fallback would carry today's date on old data. + mkdir -p dist/kg && cp "$data" dist/kg/bbqs.ttl || echo "::warning::kg/bbqs.ttl was not published" else data=kg/export/bbqs.ttl; src="committed kg/export/bbqs.ttl (live export failed)" fi diff --git a/.gitignore b/.gitignore index e191d9f7..168c7fcf 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,12 @@ supabase/.temp/ # The weekly digest the progress builder writes next to its JSON snapshot; only the JSON is served. public/data/progress.md + +# Internal: the working-group notes and the device list, and what kg/meetings.py and kg/devices.py +# build from them, live outside the repo (tests/guards/inspector-internal-data checks for them too). +meetings_extracted.json +meetings_flat.csv +person_roles.csv +device_evidence.csv +device_discussion_crosscutting.csv +bbqs_devices_kg.json diff --git a/DATABASE_DESIGN.md b/DATABASE_DESIGN.md index 091bd67f..55c8709b 100644 --- a/DATABASE_DESIGN.md +++ b/DATABASE_DESIGN.md @@ -137,10 +137,23 @@ Consortium project metadata. Each project is linked to a grant via `grant_id`. | `study_species` | `text[]` | Yes | `{}` | Species studied | | `study_human` | `boolean` | Yes | `false` | Human subjects flag | | `website` | `text` | Yes | — | Project website | -| `last_edited_by` | `text` | Yes | — | Email of last editor | +| `last_edited_by` | `text` | Yes | — | Email, auth user id or actor label of the last editor. **Not readable by anon** | +| `questionnaire_submitted_by` | `text` | Yes | — | Email of the Data Questionnaire respondent. **Not readable by anon** | +| `questionnaire_submitted_at` | `timestamptz` | Yes | — | When that response was submitted. **Not readable by anon** | +| `questionnaire_response_id` | `text` | Yes | — | Google Forms responseId. **Not readable by anon** | | `created_at` | `timestamptz` | No | `now()` | — | | `updated_at` | `timestamptz` | No | `now()` | — | +**Anon reads named columns only** (20261117190000): anon may SELECT every column above except the four +marked, so an anonymous `select=*` is refused. The questionnaire attribution was three keys inside +`metadata` until then; `trg_aa_keep_questionnaire_attribution_private` moves them into the columns on +every write. The same column-by-column rule covers `investigators_public` (no `user_id`, `pending_role`), +`feature_suggestions_public` (no `submitter_name`, `github_username`), `resources.created_by`, +`announcements.posted_by`, `entity_comments.user_id`, `dandisets` (`raw`, `hidden_reason`, `hidden_by`, +`hidden_at`), `harvester_relations.approved_by` and `harvester_settings.updated_by`; anon may not read +`project_questionnaire_status` at all. A column added later is hidden from anon until a migration runs +`GRANT SELECT () ON public. TO anon` (tests/guards/anon-private-columns). + ### `investigators` Principal investigators and co-PIs across the consortium. diff --git a/README.md b/README.md index afcfe107..ea0d5657 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,110 @@ Green badge = live, red = dead. | **Tutorials** | Learning materials for consortium tools and workflows | | **Job Board & Calendar** | Community job postings and upcoming events | +## Knowledge graph over MCP + +The consortium's public knowledge graph (projects, people, working groups, organizations, species, publications) can be read by Claude and other AI clients through a small read-only [MCP](https://modelcontextprotocol.io) server, [`kg/mcp_server.py`](kg/mcp_server.py). It loads the exported graph into memory and answers from that: no database, no sign-in, no write path. What is related to what is ranked by spreading activation, the account in psychology of how one idea brings up another; [`kg/README.md`](kg/README.md#how-it-decides-what-is-related) states the rule and works an example by hand. + +Check that it loads, then ask it the consortium's own questions: + +```bash +uv run kg/mcp_server.py --check +``` + +```bash +uv run kg/bench_mcp_server.py +``` + +The second command starts the server the way a client does and asks it the [42 competency questions the graph is scored on](kg/competency_questions.yaml) (CQ20-CQ42 adopted from #441). Each is asked twice, once as SPARQL and once without SPARQL through the graph tools, and both are checked against the export queried directly. It then measures the ranking and the speed. `--show CQ04` prints one question's rows; `--only questions` skips the measurements. Without [uv](https://docs.astral.sh/uv/), run `pip install -r kg/requirements.txt -r kg/requirements-mcp.txt` and use `python` in place of `uv run`. + +To talk to it from Claude Code (give the full path to your checkout): + +```bash +claude mcp add bbqs-kg -- uv run /path/to/bbqs-app/kg/mcp_server.py +``` + +Or, with no checkout at all, straight from GitHub: + +```bash +claude mcp add bbqs-kg -- uv run https://raw.githubusercontent.com/brain-bbqs/bbqs-app/main/kg/mcp_server.py +``` + +To serve it on a public URL for a claude.ai connector, see [On a public URL](kg/README.md#on-a-public-url). + +### Benchmark + + +Graph: 653 nodes, 973 links, export of 2026-11-18. Server 0.2.0. + +| | Result | +|---|---| +| Competency questions that return rows on this export | **34 of 42** | +| Those 34, asked as SPARQL through the server: same rows as the export queried directly | **34 of 34** | +| Those 34, asked without SPARQL through the graph tools: same rows again | **34 of 34** | +| The other 8 (3 need the full export, 5 find none in this export): no rows either way | **8 of 8** | +| Hide a real tie: the hidden end is among the first ten `find_related` lists after the start's direct ties (1,696 cases) | **67%** (68% looking up to 8 links) | +| The same for `get_neighbors`, which lists by distance alone | 50% (52% walking through hubs) | +| Strengths equal to a slow second version of the rule, exactly | **581 of 581** starting nodes | +| A `find_related` call (median; 95th percentile) | 12 ms; 18 ms | +| A `find_paths` call | 7 ms; 15 ms | +| A `find_related` reply (median; largest of the 117 timed) | 13.9 kB; 18.4 kB | + +
All 42 questions, both ways + +| | Question | Rows | As SPARQL | Without SPARQL | How, without SPARQL | +|---|---|---:|:---:|:---:|---| +| CQ01 | Which projects are in the consortium, with grant number and mechanism? | 33 | same | same | list the projects; read each one's properties | +| CQ02 | What is the total award amount per mechanism? | 5 | same | same | list the projects; add up their awards by mechanism | +| CQ03 | Which institution hosts each project? | 3 | same | same | from each project, the organization one link away | +| CQ04 | Who holds a role on R34DA059723, and what role? | 2 | same | same | find the project by grant number; its people, with the role on each link | +| CQ05 | Which investigators hold roles on more than one project? | 7 | same | same | from each project, its people; count the projects per person | +| CQ06 | Which organization is each investigator affiliated with? | 165 | same | same | from each organization, the people one link away | +| CQ07 | Which investigators have an ORCID? | 112 | same | same | list the investigators; read each one's ORCID | +| CQ08 | Who are the members of WG-Devices? | 66 | same | same | find the working group by name; from it, the people one link away | +| CQ09 | Which projects study the house mouse? | 7 | same | same | find the species by its common name; from it, the projects one link away | +| CQ10 | Which projects study mammals? | 25 | same | same | find the mammal species; from each, its projects | +| CQ11 | Which projects name no resolvable species, and is that by design? | 4 | same | same | list the projects; keep those with no species named | +| CQ12 | Which publications came out of which project? | 89 | same | same | from each project, the publications one link away | +| CQ13 | Which datasets were produced under which project? | 5 | same | same | from each project, the datasets one link away | +| CQ14 | Which device categories does each project use? | 127 | same | same | from each project, the device categories one link away | +| CQ15 | Which devices does each manufacturer make, by category? | 35 | same | same | from each device, its maker and its category | +| CQ16 | Which software tools does the consortium provide, with their repositories? | 18 | same | same | list the software tools; read each one's repository | +| CQ17 | Which funding opportunities are still open (expiration after 2026-09-29)? | 10 | same | same | list the funding calls; keep those still open | +| CQ18 | Which jobs are posted, and by which institution? | 6 | same | same | list the jobs; from each, its organization's name, or the institution it names if it has none | +| CQ19 | Where did R34DA059723's title come from (source class and grade)? *(needs the full export)* | 0 | none | none | list the provenance records; keep the project's title; read the source's grade | +| CQ20 | Which investigators are on more than one project, and which projects? | 7 | same | same | from each project, its people; keep those on more than one | +| CQ21 | Which investigators have no ORCID recorded? | 134 | same | same | list the investigators; keep those with no ORCID | +| CQ22 | Which organization is each investigator tied to, directly or through a project? | 168 | same | same | from each person, their organization, and their projects' organizations | +| CQ23 | Who is in each working group, and on which projects are they? | 272 | same | same | from each working group, its members; from each member, their projects | +| CQ24 | Which investigators hold more than one kind of role? *(none in this export)* | 0 | none | none | from each project, its people and the role on each link | +| CQ25 | Which projects study the house mouse, whichever of its names is used? | 14 | same | same | find the species by any of its names; from it, its projects | +| CQ26 | How many projects study each species? | 13 | same | same | from each project, its species; count the projects per species | +| CQ27 | Which projects name a species in free text that is not resolved to a species node? *(none in this export)* | 0 | none | none | list the projects' species claims that no species node matches | +| CQ28 | How many publications, datasets, tools and models did each project produce? | 33 | same | same | from each project, count what it produced, by type | +| CQ29 | How many publications came out of each investigator's projects, and which projects? | 83 | same | same | from each project, its people and its publications | +| CQ30 | Which produced datasets have no provenance recorded? *(needs the full export)* | 0 | none | none | list the datasets; keep the produced ones no provenance record names | +| CQ31 | Which benchmarks is each ML model evaluated by, and which project produced it? *(none in this export)* | 0 | none | none | from each model, its benchmarks and the project that produced it | +| CQ32 | How many members does each organization have? | 59 | same | same | from each organization, count the members one link away | +| CQ33 | Which organizations have no members recorded? | 17 | same | same | list the organizations; keep those with no member | +| CQ34 | Which organizations have investigators on more than one project? | 10 | same | same | from each organization, its members; from each member, their projects | +| CQ35 | Which jobs does each institution advertise? | 4 | same | same | list the jobs; group them by organization, or by the institution named | +| CQ36 | Which kinds of role are being advertised? *(none in this export)* | 0 | none | none | list the jobs; count them by kind | +| CQ37 | Who posted each job? | 2 | same | same | list the jobs; from each, the person who posted it | +| CQ38 | Which projects have no outputs recorded? | 12 | same | same | list the projects; keep those that produced nothing | +| CQ39 | Which funding opportunities expire between 2026-10-14 and 2027-04-14? | 4 | same | same | list the funding calls; keep those expiring in the window | +| CQ40 | How many values come from a source graded below 3, by source and table? *(needs the full export)* | 0 | none | none | list the provenance records; read each source's grade | +| CQ41 | Which datasets did each grant fund, and who are its PIs? | 7 | same | same | from each project, the datasets it funded and its PIs | +| CQ42 | Which working groups have no member with a role on any project? *(none in this export)* | 0 | none | none | from each working group, its members; see whether any has a project | + +All 42 are the questions the knowledge graph is scored on ([`kg/competency_questions.yaml`](kg/competency_questions.yaml)). A question of the form "which X has no Y" lists every X with no Y *recorded*, which in a graph still being linked is not the same as having none. + +
+ +Times are over stdio on one machine (Linux x86_64, Python 3.10.20) and will differ on yours. Everything else is the same wherever it is run. + + +Regenerate this block with `uv run kg/bench_mcp_server.py --update README.md`. + ## Tech Stack - React 18 + TypeScript + Vite diff --git a/e2e/data.spec.ts b/e2e/data.spec.ts index 8a27d9ee..f73cdcc8 100644 --- a/e2e/data.spec.ts +++ b/e2e/data.spec.ts @@ -24,8 +24,10 @@ test.describe("tables load with data", () => { for (const table of CORE_TABLES) { test(`table has rows: ${table}`, async ({ request }) => { + // select=id, not *: anon may read only the public columns of resources and announcements + // (20261117190000), and select=* asks for every column, so it is refused (401) there. const res = await request.head( - `${SUPABASE_URL}/rest/v1/${table}?select=*&limit=1`, + `${SUPABASE_URL}/rest/v1/${table}?select=id&limit=1`, { headers: { ...AUTH_HEADERS, diff --git a/kg/README.md b/kg/README.md index 38099bd8..a86c21d7 100644 --- a/kg/README.md +++ b/kg/README.md @@ -15,10 +15,10 @@ This table is the running status of the whole effort, updated as each phase land |---|---|---|---| | 0 | Foundations & decisions — consistency-not-enrichment; LinkML master = source of truth; `resources` spine = node backbone; SHACL-first then OWL; Project=Grant; ontology alignments chosen | — | **done** | | 1 | Schema authored — `bbqs.linkml.yaml`, DB-grounded, 31 classes, Marr stubbed | — | **done** (v0.3 — keep-list from #397: schema hygiene + `Algorithm`; `title`/DANDI kept, device/SOSA deferred) | -| 2 | Consistency invariants — the 19-row catalogue below; RED/GREEN fixtures; schema↔DB drift guard | — | **done** (16 shapes + 2 guards; on the anon export 7 shapes have data to check — see [QA](#quality-evaluation)) | +| 2 | Consistency invariants — the catalogue below; RED/GREEN fixtures; schema↔DB drift guards | — | **done** (21 shapes + the `kg-*` guards; on the anon export 16 shapes have data to check — see [QA](#quality-evaluation)) | | 3 | Exporter — `resources` spine → instance TTL; grants⋈projects; ProjectRole; `species_aliases` resolver; `field_provenance`→PROV | **A** | **done**: 5,039 triples, 868 links of ten kinds; 189 of 808 nodes (23%) still isolated, mostly records with nothing to link to (#421) | | 4 | Generate OWL + boilerplate SHACL from the LinkML (`gen-owl`/`gen-shacl`) | **B** | **done**, with a gap: generated SHACL uses `slot_uri` IRIs the export doesn't, so it targets nothing (#422); `disjoint_with` → `owl:disjointWith` didn't emit | -| 5 | Backfill migration — extend `resource_type` + add `resource_id` (species/devices/working-groups/funding/events/orgs/pubs) | **C** | **in progress** (backfill landed via #386; exporter now spine-sources every entity and the `project` double-node is resolved; remaining: orphan cleanup, `types.ts` regen → promote the 6 enum values, insert trigger) | +| 5 | Backfill migration — extend `resource_type` + add `resource_id` (species/devices/working-groups/funding/events/orgs/pubs) | **C** | **in progress** (backfill landed via #386; exporter now spine-sources every entity and the `project` double-node is resolved; the orphan spine rows were deleted by `20261116150000`; remaining: `types.ts` regen → promote the 6 enum values; no insert trigger, see [Not yet built](#not-yet-built)) | | QA | Quality evaluation — the six [QA steps](#qa-steps): competency questions, structure, conformance, consistency, accuracy, coverage | — | **in progress** (steps 1, 2 and shape coverage live in `quality.py`, #420; 3 → #422; 5 and 6 planned) | | 6 | Full-access export + OWL reasoning — light up shapes #5/#12/#14–#19; HermiT consistency pass | — | **partial** (`reason()` added in #417; not gating, needs a Java runtime, no `owl:disjointWith` axioms yet; full-access export not run) | | 7 | CI gate — run the harness on fixtures now, the exported graph later | **D** | **done** (`.github/workflows/kg.yml` + `ci_check.py`; the `dev` ruleset requires a PR, code-owner review for `kg/`, and the `kg` check, for everyone including admins, #423) | @@ -44,7 +44,7 @@ This table is the running status of the whole effort, updated as each phase land One `BBQSKnowledgeGraph` object (`bbqs_kg.py`), one command, four steps in order: 1. **`export()`** — pull from Supabase into instance Turtle (`kg/export/bbqs.ttl`). -2. **`validate()`** — check that export against the SHACL consistency shapes. +2. **`validate()`** — check that export against the SHACL validation shapes. 3. **`reason()`** — check the export + the OWL TBox (`bbqs.owl.ttl`) for logical contradictions with a DL reasoner (HermiT, via `owlready2`): disjoint classes and literals outside their datatype, which SHACL's shape checks can't catch. @@ -86,18 +86,42 @@ holding a sentence. Those are Supabase data-entry mistakes to fix upstream, not `.github/workflows/kg.yml` runs `ci_check.py` on every PR that touches `kg/` (other PRs pass in seconds, so the `kg` check can be required). It fails on a **regression**, never on a known gap: -1. every consistency shape still fires on `fixtures/contradictions.ttl` (RED); -2. `fixtures/clean.ttl` still conforms (GREEN); -3. no shape fires on `export/bbqs.ttl` more often than `quality_baseline.json` allows; -4. every competency question answered in the baseline still answers, and every shape that had data - to check still does; -5. `bbqs.owl.ttl` / `bbqs.shapes.gen.ttl` are what the pinned `gen-owl` / `gen-shacl` produce - from `bbqs.linkml.yaml` (`--check-generated`). +1. on `fixtures/contradictions.ttl` (RED) every validation shape reports exactly the focus nodes and + values planted for it, `quality.py` `duplicates()` exactly the groups planted, each with its kind + (a pair of every identifier it compares written two ways: an ORCID with x and with X, a DOI with + and without its resolver, a FON without hyphens, ...; unlinked preprint + published pairs; the + same-title groups no link resolves), and `revision_links()` exactly the links planted + (`ci_check.py` `RED_EXPECTED`). "Fires at least once" is not enough: a shape keyed on the wrong + slot still fires, on another shape's pair; +2. `fixtures/clean.ttl` still conforms (GREEN), with no possible duplicate, no pair left to link and + no `revision_of` to check: its same-title pairs are linked by `revision_of`, and its records that + share only a URL are advisory (`GREEN_EXPECTED`); +3. `identity_keys.py` gives every vector's `want` in `identity_keys.json`, and its preprint lists + and Greek table are the JSON's; +4. no shape fires on `export/bbqs.ttl` more often than `quality_baseline.json` allows; +5. every competency question answered in the baseline still answers, every shape that had data + to check still does, and there are no more possible duplicates (to merge), unlinked preprint + + published pairs (to link), same-title versions to check (a link from the preprint, or a + preprint later than its paper: to correct, never to merge), or `revision_of` links to check + (from a preprint, or between two titles) than the baseline has; +6. `bbqs.owl.ttl` / `bbqs.shapes.gen.ttl` say what the pinned `gen-owl` / `gen-shacl` produce + from `bbqs.linkml.yaml` (`--check-generated`), statement for statement, each blank node written + out in full; a stale file prints the statements that differ. It also posts the `quality.py` summary to the run, and validates a fresh anon export without blocking (live data can change under a PR). When a change makes things better, the gate says so; run `python kg/ci_check.py --update-baseline` and commit the baseline so it can't slip back. -Proven RED: dropping the #19 `FILTER EXISTS` guard fails it (`NodeHasProvenanceShape fires 34x`). +Proven RED: dropping the #19 `FILTER EXISTS` guard fails it (`NodeHasProvenanceShape fires 34x`). A +unique key moved to another slot (`owl:hasKey ( bbqs:scholar_id )` where it was `( bbqs:orcid )`) +with the OWL left stale passed the comparison this gate used before (triple counts and the triples +without a blank node) and fails this one; so does a vector changed in `identity_keys.json`, a folded +pair dropped from the RED fixture, and a sixth unlinked preprint + published pair in an export. +With the per-node expectations, each of 21 mutations of the shapes, `version_kind()`, +`revision_links()`, `duplicates()` and `identity_keys.py` fails it (2026-11-17), where the gate that +only asked each shape to fire passed 9 of the 10 the review tried: #21 keyed on `pmid`, #22 on `doi`, +any one of #25's branches removed, `version_kind()` without its DOI/PMID check, with two published +records allowed, or resolving a group on any one link, and `external_url` / `repo_url` dropped from +`IDENTIFIERS`. `.github/CODEOWNERS` makes `kg/` changes need the KG owner's review. The `dev` ruleset makes both binding: every change to `dev` goes through a PR, the `kg` check must pass, and a PR touching `kg/` needs code-owner approval. Repo admins are not exempt. @@ -112,6 +136,10 @@ PYTHONUTF8=1 kg/.venv/Scripts/gen-owl kg/bbqs.linkml.yaml > kg/bbqs.owl.ttl PYTHONUTF8=1 kg/.venv/Scripts/gen-shacl kg/bbqs.linkml.yaml > kg/bbqs.shapes.gen.ttl ``` +A unique key changes only `bbqs.owl.ttl` (an `owl:hasKey` axiom); gen-shacl writes nothing for keys. +The generators order their output differently on every run, so a regenerated file's text diff is +large even when little changed: `ci_check.py --check-generated` compares statements, not text. + `validate()` does not run `bbqs.shapes.gen.ttl` by default (it reads `shapes/*.ttl`). Running it wouldn't check anything yet either: its paths use the LinkML `slot_uri` IRIs (`schema:*`, `prov:*`) while the export writes `bbqs:`, so only 9 of 139 paths match (#422). @@ -121,16 +149,21 @@ while the export writes `bbqs:`, so only 9 of 139 paths match (#422). | Path | What it is | |---|---| | `bbqs.linkml.yaml` | **Authoring source of truth.** LinkML vocabulary → generates the OWL TBox and structural SHACL (no JSON-LD context generated yet). | +| `identity_keys.json` | **The identity keys**: one rule per key (ORCID, DOI, PMID, FON, award, organization name), the URL fold (compared, never a key), and the pairing rule's parts (title, preprint, chronology), with the vectors every implementation must pass, and which database index, LinkML key, shape and `quality.py` identifier carries each (see [Modelling rule](#modelling-rule-link-dont-copy)). | +| `identity_keys.py` | Those rules in Python (stdlib only), for `quality.py` and the exporter; the SQL and TypeScript copies are held to the same vectors. `python kg/identity_keys.py` checks it. | | `bbqs_kg.py` | `BBQSKnowledgeGraph` — one class wrapping the exporter, validator and reasoner as methods (`export()`, `validate()`, `reason()`, `run()`), taking/returning `pathlib.Path`. `export.py`/`validate.py`/`reason.py`/`main.py` are thin `click` CLIs over it (each also takes `--help`). | | `export.py` | Exporter CLI: Supabase `resources` spine → instance TTL (`export/bbqs.ttl`, tracked; commit anon exports only). | +| `test_exporter.py` | The exporter's tests, against a stand-in for Supabase's REST API (no network): jobs from `public_jobs`, posters from `public_job_posters`, the institution rule, nothing private written, a missing or refused view skipped. | | `requirements.txt` / `requirements-generate.txt` | Pinned deps: the harness (export, validate, quality) / plus linkml for the CI drift check. | | `roundtrip.py` | Round trip: how much of the database a (fresh) export carries, cell by cell → `export/roundtrip.json` (see [Round trip](#round-trip-the-graph-must-be-able-to-rebuild-the-database)). | | `ci_check.py` | The CI gate: fixtures, export vs `quality_baseline.json`, generated-artifact drift (see [CI gate](#ci-gate)). | | `quality.py` | Quality evaluation: structure metrics, competency questions, shape coverage, violations → `export/quality.json` + `browser/index.html` (see [Quality evaluation](#quality-evaluation)). | -| `competency_questions.yaml` | The fixed questions the graph must answer, each with its SPARQL and the access level it needs. | +| `competency_questions.yaml` | The 42 fixed questions the graph must answer (CQ20-CQ42 adopted from #441), each with its SPARQL and the access level it needs. | | `browser/template.html` | Graph Inspector page; `quality.py` inlines the report into it to make the self-contained `browser/index.html`. | -| `shapes/consistency.shapes.ttl` | Hand-written SHACL for the cross-field/cross-node **contradiction** checks (what gen-shacl can't produce). | -| `fixtures/contradictions.ttl` | A graph seeded with one violation per consistency shape (the RED case). | +| `meetings.py` | Working-group meeting notes → the Inspector's Meetings records (who each point is tied to). Internal: reads and writes files outside the repo only. | +| `devices.py` | The consortium device list → the Inspector's Devices records (by award, each line with its tier: slide, workshop, notes, AI-predicted). Internal: reads and writes files outside the repo only. | +| `shapes/validation.shapes.ttl` | Hand-written SHACL validation for the cross-field/cross-node **contradiction** checks and dangling claims (what gen-shacl can't produce). | +| `fixtures/contradictions.ttl` | A graph seeded with one violation per validation shape (the RED case). | | `fixtures/clean.ttl` | The same graph corrected (the GREEN case). | | `validate.py` | pyshacl runner CLI: `python kg/validate.py [shapes…]`. | | `reason.py` | HermiT (via `owlready2`) DL-reasoner CLI: `python kg/reason.py [data.ttl] [--owl bbqs.owl.ttl]`. | @@ -141,13 +174,138 @@ while the export writes `bbqs:`, so only 9 of 139 paths match (#422). | `explorer.py` | Builds `bbqs_explorer.json` for `explorer/index.html`: `BBQSKnowledgeGraph.export_explorer_json()` CLI. | | `explorer_geocode.py` | Curated `org name -> (lat, lng)` table for the Explorer's globe/map views. | | `explorer/index.html` | **BBQS Explorer** — single-file D3 v7 app: draggable globe → US map → triple/relationship panel. No build step. | +| `mcp_server.py` | **MCP server**: read-only traversal of an exported graph for AI clients, over stdio or HTTP. No database, no credentials (see [MCP server](#mcp-server-read-the-graph-from-an-ai-client)). | +| `test_mcp_server.py` | Its tests: a hand-built graph with known answers, the competency questions through the server, cross-file guards, and the protocol over stdio and HTTP. | +| `requirements-mcp.txt` | Pinned deps for the server alone: `rdflib` and the MCP SDK. | +| `bench_mcp_server.py` | Benchmark for the server: all 42 competency questions asked over MCP, as SPARQL and without it; the ranking against distance alone; the speed. Writes the results block in the main `README.md`. | ## The three validation layers -1. **Guards (Node, runnable now, zero-dep)** — schema↔DB drift, e.g. `tests/guards/kg-resource-type-parity.test.mjs` ties this schema's `resource_type_enum` to the live Postgres enum. Runs under `npm run test:guards`. +1. **Guards (Node, runnable now, zero-dep)** — schema↔DB drift, e.g. `tests/guards/kg-resource-type-parity.test.mjs` ties this schema's `resource_type_enum` to the live Postgres enum, `kg-identity-keys` holds each identity key equal across the database migration, the LinkML keys, the shapes and `quality.py`, and `kg-resource-links-parity` the `resource_links` predicates across the database, the exporter and the schema. Runs under `npm run test:guards`. 2. **SHACL (pyshacl)** — contradiction checks over an instance graph, in `shapes/`. The generated structural shapes (`bbqs.shapes.gen.ttl`) are not run yet; they don't match the export's IRIs (#422). 3. **OWL reasoning (`reason()`, partial)** — a DL reasoner (HermiT, via `owlready2`; needs a separately installed Java runtime) checks disjoint classes and literals outside their datatype. It cannot catch cardinality or range mismatches between IRIs (no unique-name assumption, open world). Class-level disjointness is a no-op until `bbqs.owl.ttl` gets `owl:disjointWith` axioms (tracked in "Not yet built"). +## Modelling rule: link, don't copy + +When a value names another node, the export writes the link and not the name again: the name lives on +that node, and a second copy would only drift from it. A project's species is the `studies_species` +link to the Species node, not also its name as text. Text is written only when there is nothing to +link to yet, in a slot that says so (`studies_species_unresolved`); a curator clears it by adding the +node or an alias, and the next export turns it into a link. A job's institution is the same: the +`part_of_org` link to its organization, and the institution as the posting writes it +(`job_institution`) only for a job no organization node stands for. A field that is the record's +own data stays text: a paper's printed author list, a species' common name. Settled 2026-11-17 on +Tek's review: a graph has to pick one way and keep to it. + +**One thing, one record.** The same reasoning applies to duplicates: a graph built from a database +inherits its duplicate rows, and cleaning them gets harder as the graph grows. So a duplicate is +refused when it is written, not found later. What makes two records one thing is an *identity key*, +and each key has one rule, stated once in `identity_keys.json` with the vectors that pin it down (a +tab, a no-break space, the Kelvin sign, ß, İ, full-width digits, markup in a title): + +| Key | Rule | Declared (`bbqs.linkml.yaml` unique_keys) | Refused in the database | Checked (export) | +|---|---|---|---|---| +| ORCID | the iD anywhere in the value, X in capitals | `Investigator.investigator_orcid` (its `owl:hasKey` is declarative only: the export writes an ORCID iD as an IRI, `orcid` is a datatype property) | `uq_investigators_orcid_key`: planned (`20261117181500`, not applied) | #14, `duplicates()` | +| DOI | resolver (`https://doi.org/`, `doi.org/`, `www.doi.org/`, `dx.doi.org/`) or `doi:` / `doi ` off, lower-case, trailing `/` off | `Publication.publication_doi` | `uq_publications_doi_key`: planned (`20261117181500`, not applied) | #21, `duplicates()` | +| PMID | `PMID:` / `PMID ` off, digits only, no leading zeros | `Publication.publication_pmid` | `uq_publications_pmid_key`: planned (`20261117181500`, not applied) | #22, `duplicates()` | +| FON | letters and digits, capitals | `FundingOpportunity.funding_fon` | `uq_funding_opportunities_fon_key`: planned (`20261117181500`, not applied); the exact `funding_opportunities_fon_key` is in force | #23, `duplicates()` | +| award | the NIH core: `1R34DA059723-01` is `R34DA059723` | `Project.project_award` | `uq_grants_award_key`, `uq_projects_award_key`: planned (`20261117181500`, not applied) | #24, `duplicates()` | +| organization name | NFKD, Greek letters by name, then a-z and 0-9 only: it folds case, punctuation, spacing and accents, never wording | `ResearchOrganization.organization_name` | `uq_organizations_name_key`: planned (`20261117181500`, not applied) | `duplicates()` name groups, by its own fold (`fold_label`, which also folds ß to ss), not by this key | +| email | `lower(btrim(email))` | `Investigator.investigator_email` | `investigators_email_unique_ci`: in force (`20260807190000`) | #15 (full-access export) | +| dandiset | archive and id | `Dandiset.dandiset_archive_id` | `UNIQUE (instance, dandiset_id)`: in force (`20260524231145`) | — | +| ROR | declared for when organizations has a ROR column: an organization's identity, which the name key is not | `ResearchOrganization.organization_ror` | — | — | + +A URL is no key. A funding call's notice URL can be a landing page (an NIH highlighted-topic page) +that lists several calls, and a lab's homepage serves several tools, so nothing refuses a second +record with a URL another holds. `identity_keys.json` still states how a URL is folded (scheme and +`www.` off, with or without a scheme, trailing `/` off, lower-case): the write paths look up by it, +and `duplicates()` counts a shared URL as a possible duplicate only when the records share a name as +well; a shared URL alone is listed as *advisory* and not counted. + +Each rule is implemented three times, identically: in SQL (`public.kg__key`), in TypeScript +(`supabase/functions/_shared/identity-keys.ts`, what the write paths look up by) and in Python +(`identity_keys.py`). Case and whitespace are ASCII-only, the one definition Postgres (`COLLATE +"C"`), JavaScript and Python share, and a missing value is no key, so it never collides. Once +`20261117181500_prevent_duplicates` is applied (planned, not applied yet: it ships as a dry run), +the database refuses a second row with an equal key: an expression unique index on the key +function, which that script creates only where the live rows satisfy it already. A group of rows +that share a key skips its index and is listed for a curator to merge; until the next run after +the merge, that key is not enforced. A write path looks up by the same key first and reuses the +row it finds ("already in the KG"). The export is checked: the SHACL shapes compare exact terms, +which is what the exporter writes for one key, and `quality.py` `duplicates()` folds each +identifier by its key, or, where the rule cannot read a value (a DOI with a space inside), as it is +written (trimmed, lower-cased), so the same spelling twice is still found; `ci_check.py` fails +when that count rises above the baseline. A node has one detail row per table, too +(`uq__resource_id`, catalogue #2: planned, not applied), which once applied stops the +exporter folding two rows into one node. Names of people are not a key: namesakes exist, and +`duplicates()` reports a shared name for a person to look at. + +The organization name key catches spelling: case, punctuation, spacing, accents ("UNIVERSITY OF +CALIFORNIA, SAN DIEGO" is "University of California San Diego"). It does not catch wording, +abbreviations or stop words, and is not meant to: the 2026-11-17 export holds "STATE UNIVERSITY NEW +YORK STONY BROOK" (4 members) and "State University of New York at Stony Brook" (one `part_of_org` +link) as two nodes of one institution. That is a **known duplicate, for a curator to merge**; no key +or check here reports it. An organization's ROR id is its identity, declared (`organization_ror`) +for when `organizations` has a ROR column. + +Before the database step, every write path that will meet these indexes has to expect 23505 (the +migration's PRECONDITIONS name each). The order is: the site first (`dev` merged to `main`, which +`publish.yml` deploys to Pages), then the six edge functions that import +`supabase/functions/_shared/kg-write.ts` (and, through it, `identity-keys.ts`), none deployed since +those modules were written: `add-project-by-grant`, `bbqs-mcp`, `import-grant-publications`, +`nih-grants`, `seed-consortium` and `verify-affiliations`, each with `supabase functions deploy + --project-ref vpexxhfpvghlejljwpvt`; then `../bbqs-agent`, which shares the database, checked +for direct writes to the keyed columns; then the script, dry run first. Each step works with or +without the next. In this repository every writer of a keyed column says a 23505 as what it is: the +edge functions look up by the key first; `member_self_update()` itself still refuses its whole +statement when the ORCID iD sent is on another record, and its two callers, the profile editor +(`saveOwnProfile`) and the MCP's `update_my_profile` (`saveProfileLeavingOutHeldOrcid`), save the other +fields again without the ORCID and say it was left out; the site's other writers +(InvestigatorSummary's inline edit, the Publications page, `AddFundingOpportunityDialog.tsx`, +`useProjectProfileEditor`, AdminUsers, AdminAccessRequests) go through `src/lib/alreadyInKg.ts`, and +`tests/guards/write-paths-get-or-create` holds every src write of a keyed column to that. The +`create_grant` and `repoint_grant` RPCs from callers besides the MCP still see the raw 23505. + +**Versions are linked, never merged.** A preprint and its published version share a title but have +two PMIDs, two DOIs and two dates: two records of one work. They are linked with `revision_of`, from +the published paper to its preprint (PROV's newer `prov:wasRevisionOf` older), a `resource_links` +row the exporter writes as `bbqs:revision_of`. The pairing rule is written once, in SQL +(`public.kg_link_publication_versions`): the same title (`kg_title_key`, at least 20 characters; a +Greek letter is spelled out, so α-synuclein and β-synuclein are two titles), one of the two a +preprint (`kg_is_preprint`: by venue, DOI prefix, or the shape of a bioRxiv/medRxiv DOI, `10.1101/` +then an optional date and six or more digits, since Genome Res, Genes Dev and Learn Mem publish +under `10.1101/` too), exactly one record of that title that is not, the preprint not later than +the paper (`kg_preprint_is_later`: by PubMed id, which numbers records in the order PubMed adds them; +without two PubMed ids, by the posting date a bioRxiv/medRxiv DOI carries, else the preprint's year, +against the paper's year. A preprint's year is its latest version's, so it drifts later as versions +are posted, and only breaks a tie. A later "preprint" is another work with the same title, or a +record with a wrong PMID, DOI or year: the function skips it, and its skipped row gives the SQL a +curator runs to link the two by hand if they are one work), and a project that credits both (`project_publications`, the +RePORTER credit). The importer runs it for new papers. `duplicates()` only detects, grouping +publications by `title_key` of their `bbqs:title` as the database pairs them: a group with one +published record whose `revision_of` links all run from it to its preprints, each linked, is +resolved (`linked_versions`); the same not all linked yet, each preprint still to link no later +than the paper, is a pair to link (`versions`; the gate fails when there are more than the +baseline's); one published record and its preprints whose link runs from a preprint, or whose +preprint still to link is later than the paper, is a link or a value to correct, never a merge +(`versions_to_check`; gated against the baseline's 0, with that advice); any other same-title group +is a possible duplicate, to merge: two published records, or none. A pair a curator linked by hand +is resolved whatever its order says, as the database reports it. Two records with one DOI or one +PMID are one record whatever links them. `revision_links()` checks each link on its own: one that +runs from a preprint to a published paper, or between two titles, is a link to correct, and the +gate fails when there are more than the baseline's (0). + +Keeping the copies equal is a machine's job, not a reviewer's: `tests/guards/kg-identity-keys` +holds the LinkML keys, the shapes, `quality.py` and the migration (its key functions, its indexes and +its self-test vectors) to `identity_keys.json`; `tests/guards/identity-normalization` runs the +TypeScript on the vectors, `ci_check.py` the Python, and the migration's self-test the SQL when it is +applied; `tests/guards/kg-resource-links-parity` holds the `resource_links` predicates equal across +the table's CHECK, its type trigger, the exporter and the schema. + +**Wording.** The shapes in `shapes/` are SHACL *validation* checks, and the Inspector calls them that. +"Consistency" in the strict, logical sense (a reasoner finding the ontology and data contradictory) +is the separate OWL pass, layer 3 above. + ## Consistency-invariant catalog The convergence target: the invariants a generated graph must satisfy to be *consistent*, each mapped @@ -156,12 +314,12 @@ device" are **out of scope** (that's missing data, not a contradiction). Tracked [#386](https://github.com/brain-bbqs/bbqs-app/issues/386). **live** means the shape exists and runs. It does not mean the export contains anything for it to -check; see [shape coverage](#quality-evaluation). Today 7 of 16 shapes have data to check. +check; see [shape coverage](#quality-evaluation). Today 16 of 21 shapes have data to check. | # | Invariant (must hold) | Contradiction it catches | Enforced by | Status | |---|---|---|---|---| | 1 | One node has one `resource_type`, matching the table it came from | a `grants` node also typed `investigator`; a `grant` resource with no `grants` row | SHACL (`OneClassPerNodeShape`, `ProjectIsAnAwardShape`) | **live** (1 hit: Psych-DS, a data standard filed as a `grant`) | -| 2 | One IRI per entity; no two typed rows share a `resource_id` | two rows collapse into one node | SHACL / guard | planned | +| 2 | One IRI per entity; no two typed rows share a `resource_id` | two rows collapse into one node | DB (`uq_
_resource_id` on the 13 node tables, `20261117181500`) | planned (`20261117181500`, not applied): the exporter would merge two such rows into one node without a word, so the database is to refuse the second; a table whose rows collide already keeps no index until a curator resolves them | | 3 | Core classes mutually disjoint (Person/Org/Dataset/Project/Species/Event) | a node typed Person and Product | SHACL (`OneClassPerNodeShape`: the export mints one class per node, so any second class is a clash) | **live** (0 hits) | | 4 | `ProjectRole.project_role` is a canonical token | role = "Principal Investigator" free text | SHACL `sh:in` | **live** | | 5 | PI standing comes only from `ProjectRole` (roster), never `consortium_role` | free-text label asserts PI with no roster row (#283) | SHACL SPARQL (`ConsortiumRoleNotAProjectRoleShape`): a machine role token in the label, or a PI label with no PI `ProjectRole` | **live** (0 hits: all 73 people labelled "Principal Investigator (PI)" are PIs on a roster) | @@ -173,13 +331,18 @@ check; see [shape coverage](#quality-evaluation). Today 7 of 16 shapes have data | 11 | Numeric/temporal sanity: amount >= 0, budget_floor <= ceiling, open <= expiration | expiration date before open date | SHACL SPARQL | planned | | 12 | No two *verified* sources disagree on one field | two trusted `field_provenance` rows conflict | SHACL SPARQL | **live** | | 13 | Schema `resource_type_enum` == the DB enum | schema/DB drift ("code shipped, migration didn't") | Node guard | **live** | -| 14 | One ORCID → one Investigator node | two Investigator nodes share an `orcid` | SHACL SPARQL | **live** (0 hits on 111 ORCIDs) | +| 14 | One ORCID → one Investigator node | two Investigator nodes share an `orcid` | SHACL SPARQL, which names the twin; DB (`uq_investigators_orcid_key`) planned (`20261117181500`, not applied) | **live** in SHACL (0 hits on 112 ORCIDs; a hit names the other node, to merge) | | 15 | One email (primary or secondary) → one Investigator node | same address as one node's `email` and another's `secondary_emails` (the `lyc5332@psu.edu` failure) | SHACL SPARQL | **live** (no targets — `email`/`secondary_emails` are PII, restricted from anon export) | | 16 | One person has one role per grant (per-edge role is fine across *different* grants) | two `ProjectRole` edges for the same `held_by`+`on_project` pair assert different `project_role` values | SHACL SPARQL | **live** | | 17 | `Publication.author_orcids` resolves to an Investigator node | an author ORCID with no matching Investigator (graded, not dropped — mirrors #7) | SHACL SPARQL, **warning** | **live**, as a warning (147 hits: author lists name outside co-authors, and only 3 of 126 author ORCIDs are BBQS investigators, 2026-10-21) | | 18 | A grade-1 (curator) provenance claim is never contradicted by a grade-3 (harvested) claim on the same field | harvested value disagrees with a manually-verified one (field_provenance is append-only) | SHACL SPARQL | **live** (no targets — same RLS gate as #12) | | 20 | Every award identifier on a Project names the same award as its `grant_number` (`name`, `reporter_project_num`, `nih_link`, `external_url`) | a renumbering updated `grants` but not `resources` | SHACL SPARQL | **live** (2 hits: BARD.CC's `name` and `external_url` still say U24MH136628) | | 19 | A node cannot exist with zero provenance claims | a node with no `field_provenance` row at all ("unknown" is a value, not an absence) | SHACL SPARQL | **live** (scoped to `Project`; no targets on anon export — same RLS gate as #12) | +| 21 | One DOI → one Publication node | two Publication nodes share a `doi` (a preprint and its published version have two DOIs: they are linked, #25) | SHACL SPARQL (`DoiUniquePerPublicationShape`); DB (`uq_publications_doi_key`) planned (`20261117181500`, not applied) | **live** in SHACL (0 hits on 78 DOIs) | +| 22 | One PMID → one Publication node | two Publication nodes share a `pmid` | SHACL SPARQL (`PmidUniquePerPublicationShape`); DB (`uq_publications_pmid_key`) planned (`20261117181500`, not applied) | **live** in SHACL (0 hits on 89 PMIDs) | +| 23 | One FON → one FundingOpportunity node | two calls share a `fon`; a final notice supersedes its forecast in place instead | SHACL SPARQL (`FonUniquePerCallShape`); DB: the exact `funding_opportunities_fon_key` in force, the folded `uq_funding_opportunities_fon_key` planned (`20261117181500`, not applied) | **live** in SHACL (0 hits on 13 calls) | +| 24 | One award → one Project node | two Project nodes share a `grant_number` (the database compares NIH cores) | SHACL SPARQL (`AwardUniquePerProjectShape`); DB (`uq_grants_award_key`, `uq_projects_award_key`) planned (`20261117181500`, not applied) | **live** in SHACL (0 hits on 33 projects) | +| 25 | `revision_of` links one Publication to another, one way, from the published paper to an earlier preprint of the same title | a `revision_of` to or from a node that is not a Publication, to itself, or both ways (SHACL); from a preprint to a published paper, or between two titles (`quality.py` `revision_links()`) | SHACL SPARQL (`RevisionOfLinksTwoPublicationsShape`, four disjoint branches) + `revision_links()`, gated; DB (`resource_links_check_types`) planned (`20261117181500`, not applied) | **live** (no targets yet: the first export after `20261117181500` carries its 5 links) | ## Quality evaluation @@ -194,10 +357,10 @@ built one at a time, and each gets a board issue under #386 while it's in progre | # | Step | Question it answers | How | Status | |---|---|---|---|---| -| 1 | **Competency questions** | Can the graph answer what it's for? | `competency_questions.yaml`: 19 SPARQL questions pinned to real entities (R34DA059723, House Mouse, WG-Devices). Each is *answered*, *empty* (exporter gap), *n/a* (RLS-gated on anon) or *unmodeled* (schema gap). | **live** (`quality.py`) | +| 1 | **Competency questions** | Can the graph answer what it's for? | `competency_questions.yaml`: 42 SPARQL questions pinned to real entities (R34DA059723, House Mouse, WG-Devices). Each is *answered*, *empty* (exporter gap), *n/a* (RLS-gated on anon) or *unmodeled* (schema gap); a "which X has no Y" question is *none* when nothing is missing. | **live** (`quality.py`) | | 2 | **Structural metrics** | Is it one graph or a pile of records? | Nodes and links per class, isolated nodes, connected pieces, dangling links, and the class→predicate→class link matrix. | **live** (`quality.py`) | | 3 | **Cross-artifact conformance** | Do the export, the OWL and the generated SHACL use the same terms? | Every predicate and class the export emits must be declared in `bbqs.owl.ttl` *and* be a path in `bbqs.shapes.gen.ttl`. Today they disagree: the export and OWL use `bbqs:`, gen-shacl uses the mapped `slot_uri` (`schema:*`, `prov:*`), so the generated shapes target nothing. | planned (needs one IRI convention) | -| 4 | **Consistency** | Does any part contradict another, and did each check have data? | Node guards (schema↔DB drift), SHACL consistency shapes (the catalog above), the OWL reasoner, plus **shape coverage**: which shapes had inputs to check, so a vacuous pass is visible. | **live**: guards, SHACL, reasoner; shape coverage in `quality.py` | +| 4 | **Consistency** | Does any part contradict another, and did each check have data? | Node guards (schema↔DB drift), SHACL validation shapes (the catalog above), the OWL reasoner, plus **shape coverage**: which shapes had inputs to check, so a vacuous pass is visible. | **live**: guards, SHACL, reasoner; shape coverage in `quality.py` | | 5 | **Accuracy and round trip** | Does the graph say everything the database says, and could the database be rebuilt from it? | `roundtrip.py`: every non-null fact cell of every KG-backed table is checked against its row's node in a fresh export (*carried* or *dropped*), plus a person's review of entity cards against the site (the Inspector's review flags). | **live** (DB half: 71.7% of fact cells carried, anon) | | 6 | **Coverage** | How much of each record made it in? | Per-class fill rates and external-ID coverage (ORCID, DOI, NCBITaxon). Informational only: it guides enrichment and is not a consistency goal. | planned | @@ -221,6 +384,67 @@ its facts and links. The Flags tab compares that with the build on screen and ma *looks resolved*, *changed, recheck* or *unchanged*. It never clears a flag; removing one is the reviewer's call. +**Graph tab.** Built for looking around: the big picture first, then step in. It opens on the map: +every node, laid out so each kind of thing gathers in its own region, with the main network and the +separate pieces named and the nodes nothing links to drawn hollow at the edge, by kind. Hover a dot to +see its links as arrows; click it, or search (`/`), to step in: the view glides to that node and its +neighbours move onto a ring around it, each link an arrow named by its predicate. Hover a neighbour to +peek at where it leads; click it to step there. Every step is a history entry: ← and → (the buttons or +the keys) go back and forward, the trail jumps to any step, Esc returns to the map, and an inset map +shows where you are. The card beside it says what the node is, sums up its links by kind and lists its +neighbours as chips (hovering one lights it up in the drawing); "How does it connect to…" finds the +shortest path to another node, avoiding the hubs (nodes with more than 30 links: today the four +working groups, which nearly everyone belongs to) unless asked. Role records are drawn as +person–project links carrying the role, the way the MCP server folds them, so the tab counts the nodes +less the role records. Layout, animation, pan and zoom are written into the page (the layout is +d3-force's algorithm with a fixed seed), so no library is fetched and the map is the same every time. + +**Publications tab.** One row per paper: the project and grant it is credited to (the `produced` +link the exporter writes from `project_publications`, which is the NIH award credited on the paper's +PubMed record), its PMID and DOI, its other versions (*Revision of*, *Revised by*: the `revision_of` +links), and what the export lets us check about that tie: no project, more than one project, a +preprint and its published version not linked yet, a title that appears twice otherwise (possibly a +duplicate), and whether any author is on the project's roster, by ORCID. Only 21 of the 89 papers carry author +ORCIDs, and for 11 of those no one on the roster has an ORCID to compare with (*roster has no +ORCIDs*), so most ties can't be checked that way. The full text is in no export: +`publication_fulltext` is admin-only and its licences are still `unknown` (#444). In the artifact +viewer an admin can read it through their own BBQS-MCP connector (`kg_query`, run as them, so the +database's row-level security decides what they see); nothing read that way is stored in the page. + +**Meetings tab (artifact copy only).** The working-group meeting notes as `meetings.py` reads them: +every lesson, agreement, disagreement, decision and action, by meeting and date, tied to the people +the notes attribute it to (*said*), give it to (*owns*) or mention (*named*). Each name is resolved +from the first name the notes use, from the meeting's own speakers first, and linked to the +Investigator node where one matches; the page says how each match was made. The notes are summaries, +not transcripts: only the words in quotation marks are quoted. They are internal, so they never go +in the repo or on the public site: + +```bash +python kg/meetings.py /path/to/meetings_extracted.json --out /outside/the/repo/meetings.json +python kg/quality.py --fragment /outside/the/repo/inspector.html --internal /outside/the/repo/meetings.json +``` + +**Devices tab (artifact copy only).** The consortium device list (*BBQS Device List, Who Said What, +with References*) as `devices.py` reads it: every device and sensor each team listed for the Data +Blitz, by award, with what backs each line, kept apart by tier. **T1** is the team's own slide; +**T2** the workshop summary, which was written from the transcripts and names who spoke to a device, +but has not been checked against them; **T3** a line of working-group notes; **U** a manufacturer or +model that only the AI-assembled device list gives. A U entry is shown as *AI-predicted, unverified* +and never as the device's model: it counts only where the list records it as a guess. Each award is +linked to its Project node, each named speaker to their Investigator node (a name the source marks +for checking is left unlinked), and a maker or model to the device catalog node of the same name. A +reviewer can flag a line to confirm or correct it. The list names people, so it is internal too: + +```bash +python kg/devices.py /path/to/device_list_folder --out /outside/the/repo/devices.json +python kg/quality.py --fragment /outside/the/repo/inspector.html \ + --internal /outside/the/repo/meetings.json --internal /outside/the/repo/devices.json +``` + +`quality.py` refuses any of these paths inside the repository and never puts the records in `--html` +or `--json`. `tests/guards/inspector-internal-data.test.mjs` checks the committed copy, the +workflows and the tree, including for the raw files by name. + **Online: https://brain-bbqs.org/kg/inspector/**. `publish.yml` rebuilds it on every deploy of `main` and daily at 06:17 UTC, from a fresh anon export. If that export fails it falls back to the committed one, and it never blocks the site deploy. The header stamp shows when it was built, from @@ -229,14 +453,15 @@ in the sitemap or navigation), but anyone with the link can open it, so it only anon view. The data is live, but the exporter and quality code come from `main`: a change on `dev` shows up after `dev` → `main`. -**Latest run (anon export, 2026-10-21, after #421):** +**Latest run (anon export, 2026-11-18, after `20261116150000_link_isolated_nodes`, `20261117160000_funding_call_expiration_dates` and `20261117170000_public_job_posters`):** | Measure | Result | |---|---| -| Structure | 808 nodes, 868 links. **189 isolated (23%)**, in 214 connected pieces (largest 516). Links: `member_of_group` 268, `members` 136, `on_project` 128, `held_by` 126, `produced` 89, `manufacturer` 35, `device_category` 35, `studies_species` 32, `part_of_org` 15, `funded_datasets` 4. On 2026-09-30 it was 453 of 693 isolated (65%), with only the last four kinds. | -| Competency questions | **16 of 19 answered** (was 6), 2 n/a on anon (jobs, provenance), 1 unmodeled (CQ14) | -| Shape coverage | **12 of 16 shapes have data to check** (was 7). The other 4 need what anon can't read: `email` (#15) and provenance (#12, #18, #19). | -| Violations | 11: #7 ×6 (species), #20 ×2 and #1 ×1 (project identity), #10 ×2 (URLs). Plus 147 warnings from #17 (author ORCIDs outside BBQS), which are reported but don't fail the gate. | +| Structure | 758 nodes, 1,050 links. **73 isolated (10%)**, in 101 connected pieces (largest 575). Links: `member_of_group` 268, `members` 165, `on_project` 128, `uses_device_category` 127, `held_by` 126, `produced` 90, `part_of_org` 36, `device_category` 35, `manufacturer` 35, `studies_species` 32, `funded_datasets` 5, `posted_by` 2, `evaluates` 1 (the last two and one `produced` are new: the job posters, and the two curated `resource_links`). On 2026-11-17 it was 76 isolated; on 2026-11-04 it was 189 of 808 isolated (23%); on 2026-09-30, 453 of 693 (65%), with only the last four kinds. | +| Competency questions | **36 of 42 answered** as the KG gate counts: 34 return rows and 2 "which ... has no ..." questions (CQ27, CQ42) find none missing. New in this export: CQ37 (who posted each job) and CQ39 (calls expiring in the window, now that their dates are filled). 3 need what anon can't read, provenance (CQ19, CQ30, CQ40); CQ24 and CQ31 find nothing in this export, and CQ36 nothing yet: the live `public_jobs` view gave anon no rows, so no job carries a `job_type` (see [Jobs](#jobs)). | +| Shape coverage | **16 of 21 shapes have data to check** (12 of 16 before #21-#25; 7 on 2026-09-30). Of the other 5, four need what anon can't read, `email` (#15) and provenance (#12, #18, #19), and #25 has no `revision_of` link to check before the export after `20261117181500`. | +| Possible duplicates | **0** (14 on 2026-11-04, all removed by `20261116150000_link_isolated_nodes`), with a call's FON and a project's grant number now compared too, and a call's notice page as a signal (a shared URL alone is advisory: 0). Not counted, as no key or check sees other wording: the two Stony Brook organization nodes, a known duplicate to merge. 5 preprint + published pairs are not linked yet: `20261117181500_prevent_duplicates` links them (`revision_of`) once applied, and the gate fails if more appear. | +| Violations | 0. On 2026-11-18 the export had one, #4 `ProjectRoleTokenShape` (issue #283): a curator had chosen `collaborator`, which the roster screens offer but `normalize_grant_role` did not list. It is a project role since `20261118140000_role_vocabulary_collaborator`, and `tests/guards/role-ui-vocabulary` now holds every role menu to the function. Plus 147 warnings from #17 (author ORCIDs outside BBQS), which are reported but don't fail the gate. | On 2026-09-30, ten questions came back empty because the exporter didn't turn anon-readable data into links. #421 wrote these links: @@ -253,8 +478,29 @@ into links. #421 wrote these links: | CQ12 publications per project | `produced` | `project_publications` (2 rows; RePORTER is the live source, see the importer) | | CQ13 datasets per project | `funded_datasets` | `grant_dandisets` (2) + `dandisets.award_numbers` (3) | -CQ14 (device categories per project) is **unmodeled**: `project_device_usage` has 131 anon rows, -but the schema has no Project → DeviceCategory slot. +CQ14 (device categories per project) was **unmodeled**: `project_device_usage` has 131 anon rows, +but the schema had no Project → DeviceCategory slot. It has one now, `uses_device_category`, which +the exporter writes from that view. The export of 2026-11-17 is the first to carry it: 127 links, +and CQ14 has rows. The exporter also writes the rest of what the device catalog declares: a model's +aliases, output signals, price tier, regulatory class and product, manual and SDK links; a +category's typical use cases and schema.org type; a maker's country. + +#### Jobs + +The four job questions (CQ18, CQ35, CQ36, CQ37) were marked full-access until 2026-11-17, as if only +the `jobs` table, which anon cannot read, held what they ask, and they returned nothing. The job +board shows anyone the `public_jobs` view: every column but the contact fields and `posted_by`, +which 20260515233153 hid. The exporter reads that view now. Each row's kind (`job_type`), place, +department, expiry, application link and whether it is active go onto its Job node. Its +institution is the `part_of_org` link, from the job's spine row or its own `organization_id`; the +institution as written goes in `job_institution` only for a job with no organization to link (see +the [modelling rule](#modelling-rule-link-dont-copy)). Who posted it comes from +`public_job_posters` (migration `20261117170000`, applied by hand), which pairs the job's spine row +with the poster's investigator spine row and holds nothing else; the exporter writes it as a +`posted_by` link to the Investigator node. Contact fields are never read. Either view missing or +refused leaves its facts out, with a note, and the export goes on. So all four are anon questions. +CQ18 and CQ35 already have rows on the committed export (6 and 4), through `part_of_org`; CQ36 and +CQ37 get theirs from the next export, CQ37 once the migration is applied. ### Round trip: the graph must be able to rebuild the database @@ -272,8 +518,10 @@ counts as carried when the linked node's name, or the IRI's id, equals the value | `grants`, `grant_investigators`, `organizations`; nearly: `investigators_public` 99%, `software_tools` 99% | `device_manufacturers` 95%, `resources` 80% (`metadata`), `projects` 71%, `device_categories` 67%, `funding_opportunities` 66%, `publications` 62% (authors, citations, keywords) | `announcements` 43%, `species` 41% (order/family/genus), `device_models` 27%, `dandisets` 23% | — | The join tables (`investigator_organizations`, `project_publications`, `grant_dandisets`) are now -written as links (`members` 95, `produced` 89, `funded_datasets` 2). `roundtrip.py` doesn't count -links yet: their columns are all keys, so they show no fact cells. +written as links (`members` 95, `produced` 89, `funded_datasets` 2). `roundtrip.py` counts +`resource_links` as links: a row is carried when its triple is in the export, and links are counted +apart from fact cells (`LINKS`, one line per link table that names both ends by `resources.id`). The +older join tables name their ends by detail-table ids, so they still show no fact cells. It also finds facts stored twice that disagree, which no lossless graph can reconcile: `species.name` differs from the spine's `resources.name` for 11 of 15 species ("Mouse" vs "House Mouse"), and a few @@ -281,9 +529,378 @@ investigator, dandiset and software names or descriptions differ between their d spine. On an anon key this covers the public projection only; RLS-hidden rows and columns need a full-access run. +## MCP server: read the graph from an AI client + +`mcp_server.py` puts the exported graph behind the Model Context Protocol, so Claude (or any MCP +client) can search it, walk it, and ask what is most closely tied to something and how two things +are connected. It loads one Turtle file into +memory and answers from that. Nothing else is involved: no Supabase, no edge function, no sign-in, +no key, and no write path. + +It is a different thing from `supabase/functions/bbqs-mcp`, and shares no code with it: + +| | `bbqs-mcp` (edge function) | `kg/mcp_server.py` | +|---|---|---| +| Reads | the live database, as the signed-in caller | an exported graph (a snapshot) | +| Writes | yes: member self-service and curator tools | never | +| Sign-in | on demand (OAuth) | none, so it is only given data anyone may read | +| Runs on | Supabase | anywhere Python runs | + +### Run it + +```bash +pip install -r kg/requirements-mcp.txt +python kg/mcp_server.py --check # load the graph, print what it holds, exit +python kg/mcp_server.py # serve over stdio +``` + +With [uv](https://docs.astral.sh/uv/) there is nothing to install; the script header names its +dependencies: + +```bash +uv run kg/mcp_server.py --check +``` + +Claude Code (give the absolute path to your checkout): + +```bash +claude mcp add bbqs-kg -- uv run /path/to/bbqs-app/kg/mcp_server.py +``` + +Claude Desktop and other clients that take a JSON entry: + +```json +{ "mcpServers": { "bbqs-kg": { "command": "uv", "args": ["run", "/path/to/bbqs-app/kg/mcp_server.py"] } } } +``` + +No checkout is needed: the script names its own dependencies, so uv runs it from GitHub, and it +then reads the export the site publishes, or the one committed to `main`: + +```bash +claude mcp add bbqs-kg -- uv run https://raw.githubusercontent.com/brain-bbqs/bbqs-app/main/kg/mcp_server.py +``` + +### On a public URL + +A client that cannot start a local process (a claude.ai connector) needs a URL. GitHub Pages +serves files and cannot run it, so it needs a host that runs a Python process from the repository. +There: install `kg/requirements-mcp.txt`, and start it with + +```bash +python kg/mcp_server.py --http --host 0.0.0.0 --no-sparql --allow-host neuromcp.brain-bbqs.org +``` + +It serves MCP at `/mcp` and a health check at `/health`, on `$PORT` (8000 if the host sets none). +Point a CNAME record for `neuromcp` at the address the host gives, let the host provide HTTPS, and +add `https://neuromcp.brain-bbqs.org/mcp` as a connector. Nothing in this repo deploys it. + +There is no sign-in: anyone who can reach it can read whatever the served file holds, which is why +it should only ever serve the public export (see below), and why SPARQL is left off. `--allow-host` +(or `BBQS_KG_ALLOWED_HOSTS`, comma-separated) names the public host names; it keeps the MCP SDK +checking each request to `/mcp` for its `Host` and `Origin`, which stops a page on another site, or +one using DNS rebinding, from calling it through a browser. Without it the SDK checks only when the +server listens on `127.0.0.1` (the default), `localhost` or `::1`, and then a request forwarded by a +proxy or a tunnel for the public name is refused. `/health` is never checked. + +### Tools + +All seven are reads, and say so to the client (`readOnlyHint`). Every answer carries `snapshot`: +which copy of the graph it came from, that copy's date, and its age in days. + +| Tool | What it answers | +|---|---| +| `describe_graph` | The map: node types with counts and how full each property is, link types with their endpoints, and which copy of the graph is being served and how old it is. With a `type`, that type in full: the schema's definition of it and of each property, the values a property takes when they are few, and its links. | +| `search_nodes` | Find nodes by text (names, grant numbers, ORCID, DOI, abstracts, keywords), or list them by type and exact property values. | +| `get_node` | One node in full: every property, and every link grouped by type and direction. | +| `get_neighbors` | Everything within 1 to 4 links of a node, nearest first, each with the link that reached it. Filter by link type, direction and the type of node returned. Does not walk through hubs unless asked. It lists; it does not rank. | +| `find_related` | What is most closely tied to a node, or to several at once (what they have in common), each type of node ranked on its own, up to four links away unless asked. See [how it decides](#how-it-decides-what-is-related). | +| `find_paths` | How two nodes are connected: the shortest chains first, strongest first among them, then longer ones, a page at a time. | +| `sparql_query` | SPARQL `SELECT` / `ASK` over the graph as exported, for counts and aggregates. | + +A node can be named by the short id another tool returned, its IRI, or an exact name, grant +number, ORCID, DOI or PMID, so `find_paths("House Mouse", "WG-Devices")` works without a search +first. An ambiguous name comes back as an error listing the candidates, however it was written +(quoted, bracketed, or in a list). An argument a tool does not take is refused, not dropped: a +misspelt `max_hop` would otherwise answer a different question without a word. So is a list that +names nothing, such as `type: "["`. + +### What a hop is + +Nodes are the typed resources in the export; a link is a triple between two of them. The server +changes two things, so that a hop means something: + +- **The roster is folded.** A `ProjectRole` record is one `grant_investigators` row, exported as a + node between a person and a project. Here it is one `has_role` link from the person to the + project, carrying the role and where it came from. It stays the only authority for a role on a + project (#283); `consortium_role` is shown as the free-text label it is. +- **A shared outside identifier is a node.** When two or more nodes carry the same ORCID iD (an + investigator, and a paper's author list), that iD becomes an `External` node joining them. This + is the only authorship link the graph has today: 23 shared iDs in the export of 2026-11-05, 3 of + them a BBQS investigator's. An iD only one node carries stays a property. + +Hubs get care in every tool that walks, because "both are in WG-Analytics" is true of over a +hundred people and says little: + +- `get_neighbors` reaches a hub (a node with more than 30 links; today, the four working groups) + but does not walk through it, and lists it in the reply. Two links from a linked investigator is + a median of 9 nodes this way, against 114 (export of 2026-11-05). Naming the links to follow + (`edge`) or setting `through_hubs` walks through. +- `find_related` and `find_paths` walk through hubs. A hub passes on little, by the rule in the + next section, so what lies behind it comes after anything at the same distance that is reached by + a more exclusive route. What limits them is distance: `max_hops`, 4 by default for `find_related` + and 6 for `find_paths`, at most 8. Where a working group is all a person has, its members are the list, all + equal, and the reply says so. `find_paths` also leaves out any chain that goes the long way round + a direct link. `avoid_edges` drops a link type altogether, in both. + +### How it decides what is related + +Put plainly: nodes are still listed by how many links away they are, as `get_neighbors` lists +them. What is new is the order among nodes equally far away, and a number that says why. + +That order comes from **spreading activation**, the account in psychology of how one idea brings +up another: think of *doctor*, and *nurse* comes to mind faster. It is used here because it is a +theory about a network of concepts, which is what this graph is, and because the rule is short +enough to state and to check. + +Activation starts at one node and spreads outward. Three rules, each from the published theory: + +1. **It moves one link at a time**, so what is nearer is reached sooner (Collins & Quillian 1969 + found that people take longer the more links lie between two concepts). +2. **A node splits what it received equally among the nodes it is linked to.** This is the usual + account of the fan effect: the more a concept is linked to, the less each link carries + (Anderson 1974). A project with 5 neighbours passes on a fifth to each. A working group with + 114 members passes on 1/114. +3. **Amounts that arrive together add up** (Collins & Loftus 1975), so two routes to a node count + for more than one. + +The number that comes out is **strength**. A direct link is 1. Otherwise it is the sum, over the +shortest routes, of 1/neighbours for each node in between, multiplied along the route. There is +nothing to tune. Worked by hand, for a species studied by two projects, one with 5 neighbours and +one with 2: + +| Node | How activation gets there | Strength | +|---|---|---| +| The two projects | a direct link each | 1 | +| A person on both projects | 1/5 through the first, 1/2 through the second | 0.7 | +| A person on the first project only | 1/5 | 0.2 | + +The person on both ranks first for two reasons the arithmetic keeps apart: two routes instead of +one, and one of them through a project with little else attached to it. On the real graph (export +of 2026-11-05), `find_related("House Mouse", type="Investigator")` puts first the one person on two +House Mouse projects, which have 6 and 9 neighbours (1/6 + 1/9 = 0.28), then the three people on +its smallest project, which has 4 (0.25 each). + +Strength is a sum, so it has no ceiling. WG-Analytics and WG-Devices share 57 members and are tied +by 17.8, two links apart. That does not make them closer than a direct link: strength compares +nodes the same distance away, and distance comes first. + +How answers are ordered: + +- **Each type of node is ranked on its own**: people against people, projects against projects. + Size goes with type. A working group collects activation from a hundred members and a paper from + one project, so a single list of both mostly sorts them by size. +- **Nearest first, as in `get_neighbors`, then strongest.** A node three links away never comes + before one two links away of the same type, however much reaches it. This is the server's rule, + not the theory's, and it is what keeps the big working groups in their place: ordered by amount + alone, in one list of everything, a working group the person is not in reaches the first ten for + 172 of 210 people, and nearest first holds that to 15. +- **Four links away, unless asked.** `max_hops` goes up to 8. Per type, `within` counts the + nodes within reach and `beyond` those farther, which are counted, not listed. +- **Up to 25 per type** when up to three types are named, 10 otherwise: every type at once is + twenty lists, and at 25 each a reply came to 72 kB. +- **Several starting nodes** ask what they have in common. Only nodes that every one of them + reaches are returned, each placed by its worst tie (the farthest starting node, and of those the + weakest), then by its next worst. +- **Ties are said, not hidden.** When a list is cut among equals, `tied` gives how many there are + and how many were listed, and within a tie the order is by name and means nothing. With several + starting nodes, two nodes are equals when their worst ties are equal, then their next worst, and + so on, whichever starting node each tie is to. It is common: + 274 of the 421 default lists of people end that way (export of 2026-11-05), because everyone who + shares only a working group with someone is tied to them equally. +- **Two nodes are one tie**, however many links record it. A person recorded on a grant twice is + not twice as close to it. + +What a reply carries. A row one link away has `link`, the link itself. A row farther away has +`through`, the strongest route to it (the path `find_paths` lists first), each node on it with +`splits`, the number of neighbours it divided among; where there is more than one route the row +also has `routes`, how many, and `share`, the part of the strength the route shown brings. Where +two nodes are joined by more than one link, `link` is one and `also` the others, each with its own +direction. With several starting nodes a row has `per_start` instead, one tie per starting node. +`find_paths` lists the paths between two nodes shortest first, and +the strongest first among paths of one length (a longer path can be stronger than a shorter one), up +to 25 at a time (`offset` for the next page) and up to 8 links long, each with its own strength; +its `routes` and `strength` are the number and the sum of the shortest ones, which are the figures +`find_related` shows for the pair, `shortest` is their length and `listed` the paths on the page. +A path's `text` draws each link the way it points. A page so deep that finding it would take more +than 50,000 steps is cut short and says `partial`. The two tools are one calculation read two ways, and give the +same answer whichever end the question starts from. + +So a nearby answer can be redone by hand from what the reply shows. A far one adds up hundreds of +routes, and `routes` says how many. + +For those who know the names: this is a breadth-first search that carries one number, the chance +that a random walker leaving the starting node stands on a given node after as many steps as it is links away, times +the starting node's neighbours. Two links out it is the Resource Allocation index used to predict +missing links (Zhou, Lü & Zhang 2009). The psychology supplies the reasons and the vocabulary. The +arithmetic is ordinary. + +What it does not do: + +- **Only the first wave is read.** In the full theory activation keeps spreading and echoing until + it settles, fades a little with every link, and the starting concept divides its own activation + too. Here a node is read once, when it is first reached, with nothing fading. That buys exact + fractions and no fading constant or stopping point to choose. It does not buy a better ranking: + type by type, letting it settle finds hidden ties about as often (64% against 65%). +- **Nearest first is not in the theory**, where what is most active comes to mind first. +- **All link types count the same.** A role on a project and membership of a working group are one + link each. +- **Strength reads the data as recorded.** A node in the middle with a record missing has fewer + neighbours and so passes on more: a person with a project and a working group passes on 1/2, and + 1/3 once their organization is recorded too. 87 of the 210 linked investigators have no + organization recorded (export of 2026-11-05). Read a difference of that size as noise. +- **It is a ranking rule, not a claim about anyone's memory.** Whether activation really spreads + across several links in people is still argued over (Ratcliff & McKoon 1988). + +How it was chosen. Five natural processes were built and run on the real graph: spreading +activation left to settle, an animal foraging from a home base, slime-mould tubes, ant trails, and +a pulse travelling a spider's web. Three reviewers scored them separately and a fourth tried to +break the winner. The web pulse scored highest, with two of the three: it was exact by hand, had +nothing to tune, and never put a far or merely popular node ahead of a near one. Spreading +activation as built came second, because its lists could not be redone by hand and the working +groups rose in them. What is here is the web pulse's arithmetic (a node passing on 1/neighbours +where a junction of threads passes 2/threads, which orders nodes the same way), told as the first +wave of spreading activation, because that is the theory that is about networks of concepts. + +Whether it earns its place is measured, and the measure runs with the tests: hide one real tie, +start from one of its ends, ask for nodes of the hidden end's type, and see whether the hidden end +is among the first ten listed after the ones the start is still linked to directly (those come +first in either tool, and are not news). `find_related` has it there 62% of the time (65% when +asked to look up to eight links away). `get_neighbors`, asked for the same type, 45 to 47%. That shows strength is worth +having over distance alone. It does not defend the details of the rule: the hand-worked tests do. + +Sources: Quillian (1967), *Behavioral Science* 12, 410-430, where a connection between two +concepts is found where the waves from each meet. Collins & Quillian (1969), *J. Verbal Learning +and Verbal Behavior* 8, 240-247. Anderson (1974), *Cognitive Psychology* 6, 451-474. Collins & +Loftus (1975), *Psychological Review* 82, 407-428. Ratcliff & McKoon (1988), *Psychological +Review* 95, 385-408. Zhou, Lü & Zhang (2009), *European Physical Journal B* 71, 623-630. + +A link to a node the export does not contain is shown as an `Unresolved` node rather than dropped, +and a roster record with an end missing is counted in `describe_graph`'s notes (2 in the export of +2026-11-05). + +`sparql_query` sees the graph exactly as exported, with neither change. It refuses everything that +is not a read of the loaded graph (updates, `CONSTRUCT`, `DESCRIBE`, `SERVICE`, `FROM`) and stops a +query after 10 seconds. `--no-sparql` leaves the tool out, which is the safer choice for an endpoint +anyone can reach: a stopped query still cost 10 seconds of CPU. Nothing the server tells a client +then mentions SPARQL. + +What the view leaves out, it mostly counts in `describe_graph`'s notes rather than dropping in +silence: a roster record with an end missing, or with a person, project, role or role's source +given more than once (no link is made of it); a link to a roster record, and what a record says +besides those, its other types included (records are folded into links, not kept as nodes); a +node's second type (it is listed under the first); and blank nodes, which are not nodes here. Two +things are dropped without a count: a text's language tag, and a value's datatype (the text is +kept). Of all these, the export of 2026-11-05 has two roster records with an end missing, and +datatypes: `xsd:anyURI` on 477 values and `xsd:date` on 27, which no question tells apart. + +### Which graph, and how old + +`--source` (or `BBQS_KG_SOURCE`) takes a path or a URL. With neither, the server reads the copy +`publish.yml` puts at `https://brain-bbqs.org/kg/bbqs.ttl` whenever its live export succeeds (every +deploy of `main`, and once a day), and falls back to the committed `export/bbqs.ttl`. It re-reads +the source every `--refresh` hours (default 1), and keeps the graph it has when a re-read fails or +comes back with most of the graph missing. + +Either way it is a copy, not the database. `describe_graph` reports the source, its date and its +age in days, and says so when it is serving the fallback, so a stale answer is visible. The +committed export is dated by its commit: a checkout stamps every file with the time of the +checkout. + +It serves whatever file it is given and has no access control of its own. Give it an anon export +unless every client is entitled to more. + +### Benchmark + +```bash +python kg/bench_mcp_server.py +``` + +This starts the server the way a client does (a process, JSON-RPC over stdio) and asks it the 42 +competency questions in `competency_questions.yaml` that the graph is scored on (CQ20-CQ42 adopted +from #441). Each is asked twice: as SPARQL +through `sparql_query`, and without SPARQL through `search_nodes`, `get_node` and `find_related`. +Both must return the rows the export gives when it is queried directly, and the command fails if +either does not. Questions that return nothing are compared too, and must return nothing both ways. It then measures the ranking +(the hidden-tie measure above, with the tools' real output) and the speed of each tool. The results +are in the main [`README.md`](../README.md#benchmark); `--update README.md` rewrites them there. +`--show CQ04` prints one question's rows each way, `--only questions` leaves the measurements out, +and `--source` takes another export (with `--access full` if it is a full one, so that a question +with no rows there is not reported as needing the full export). The reference is the file queried +directly by rdflib, with each cell written out by the benchmark's own rules, so a fault in how the +server writes a value would show as a difference. Four things are evened out because they are not +part of an answer: numbers, whole or not, are compared to 12 significant digits (a sum's last digits +depend on the order it is taken in); an IRI and the same text compare equal, however each is +written (``, `bbqs:Foo`), because the graph tools give an IRI that is not a node as text; +blank nodes compare equal, because each reading of a file labels them afresh; and the order of the +parts of a cell that joins several. CQ17 and CQ39 compare dates as ISO text, which is what an +`xsd:date` is. A question with rows counts as answered even if it uses a term the schema does not +declare; one the export queried directly refuses (text where a sum needs a number, say) is shown +apart, as could not be asked, and fails the run. + +On the public export 10 of the 42 return no rows, for three reasons. Three ask about provenance, +which only a full-access export carries (CQ19, CQ30, CQ40). Two ask for what the committed export +predates: a job's kind (CQ36, `job_type`) and who posted it (CQ37, `posted_by`), which the exporter +writes from `public_jobs` and `public_job_posters` since 2026-11-17 (see [Jobs](#jobs)). Five are +understood and have nothing to list today: nobody holds two kinds of role (CQ24), no species claim +is left unresolved (CQ27), no model has a benchmark linked (CQ31), no funding call expires in +CQ39's window, and every working group has a member with a role (CQ42). A question of the form +"which X has no Y" (CQ21, CQ27, CQ30, CQ33, CQ38, CQ42) lists every X with no Y *recorded*, which in +a graph still being linked is not the same as having none. + +A walk without SPARQL sees the graph as the server shows it, which differs from the file where the +view leaves something out (above): a roster record it could not fold or a link to one, a second +type, a blank node, a language tag or datatype. SPARQL reads the file as it is, so a question that +can tell is reported as different, which is right. The export of 2026-11-05 has two roster records with an end missing, +and no question can tell. A question that cannot be walked in full (a node with more than 500 links +of one kind, more than `get_node` lists at once) fails on its own and says why; the others are +still asked. + +### Tests + +```bash +pip install -r kg/requirements.txt -r kg/requirements-mcp.txt +python kg/test_mcp_server.py +python kg/test_exporter.py # the exporter's own; needs kg/requirements.txt only +``` + +The KG gate runs them on every PR that touches `kg/`. They cover a hand-built graph whose answers +were worked out by hand, strengths included; every competency question the baseline says is +answered, asked through the server; the walking tools against SPARQL on the committed export; and +the protocol itself, by a raw JSON-RPC client against a real process over stdio and over HTTP. The +ranking has checks of its own: the code gives exactly what spreading with nothing left out +delivers first (a second, slower version of the process, written without the shortcuts); the paths +between two nodes add up to the strength shown for them; the worked example in the tool +descriptions is built and run, so what a client is told is what the server does; replies stay a +size a client can take; and the hidden-tie measure above. Every argument of every tool is shown to +reach the graph: each is set away from its default, the answer compared with the method called +directly, and shown to change when that argument alone is reset. The benchmark's 42 questions are +run here too: on the committed export; on a graph in miniature in which every one of them has +rows, the number of rows worked out by hand; and on one built from the shapes an export could take +and today's does not (ids nothing describes, a property given twice or not at all, the same two +nodes linked twice, two things with one name, amounts with cents), each of which once led a walk +astray. The benchmark's own measure is run on a graph whose every case was worked out by hand, +and its command line end to end. Three guards hold across files: every +schema term the server or its descriptions name is declared in `bbqs.owl.ttl`, the pins in the +script header match `requirements*.txt`, and no call that writes to a graph appears outside the +one that loads it. The suite was shown able to fail: the server was broken 128 ways in a +scratch copy, one at a time (100 of them in the ranking), and every break turned it red. The +benchmark's walks were broken 62 ways in the same way, and its tests caught every one. + ## Not yet built -- **Phase 5 cleanup**: remove the orphan `resources` rows the backfill left (~14 `investigator` + 1 `grant` that point at no table row); add an insert trigger so new rows get a `resource_id` automatically; and once `types.ts` is regenerated, promote the 6 backfilled `resource_type` values from PROPOSED → shipped in the LinkML (the parity guard will flag it). +- **Phase 5 cleanup**: the orphan `investigator` spine rows the backfill left (14, each next to the real person) were deleted by `20261116150000_link_isolated_nodes`, and `20261117181500_prevent_duplicates` lists any new orphan on every run (block orphans-01). Still not built: a database mechanism that stops one. Each was weighed and set aside for now: a delete trigger for a person's spine row has to repeat the dynamic foreign-key checks and embedding cleanup of `20261106130000`, cascades curated `resource_links`, and breaks the AdminUsers undo; an insert trigger that mints spine rows doubles the ones the deployed functions write, and makes every onboarded person a public node, a visibility decision of its own; a deferred "every spine row has a person" check needs an RPC, since PostgREST commits each request on its own. Instead the write paths insert the person first and attach the spine row after (`supabase/functions/_shared/kg-write.ts`). And once `types.ts` is regenerated, promote the 6 backfilled `resource_type` values from PROPOSED → shipped in the LinkML (the parity guard will flag it). - **Full-access export**: run with a key that can read investigators / field_provenance / working-group detail; map `field_provenance` → PROV (needed by shapes 5 and 12). - **`owl:disjointWith` axioms**: no longer needed for #1/#3, which SHACL now enforces (`OneClassPerNodeShape`). #411's axioms, the distinct-node declaration and its reasoner failing cases are the starting point if the reasoner gets a real job, e.g. once the Marr layer adds inference chains. - **Data fixes in Supabase, not exporter changes:** the two non-URI values in URI fields (`Job.external_url` with two links; EMBER's `Project.website` holding a sentence — see above), and one investigator whose `name` has an email address appended, which puts the address in the public export. +- **Known duplicate, to merge by hand:** "STATE UNIVERSITY NEW YORK STONY BROOK" and "State University of New York at Stony Brook" are two `ResearchOrganization` nodes of one institution (2026-11-17 export). The name key folds spelling, not wording, so neither the planned `uq_organizations_name_key` nor `duplicates()` reports them. An `organizations.ror_id` column, filled and keyed (`organization_ror`), is what would. +- **The ORCID `owl:hasKey`** is declarative only: gen-owl makes `orcid` a datatype property (range `xsd:anyURI`) while the exporter writes an ORCID iD as an IRI, so a reasoner never applies the key. Modelling `orcid` as an object property would make it apply; the checks that act on it today are #14, `duplicates()` and (planned) `uq_investigators_orcid_key`. diff --git a/kg/bbqs.linkml.yaml b/kg/bbqs.linkml.yaml index c0059e18..2d1556a1 100644 --- a/kg/bbqs.linkml.yaml +++ b/kg/bbqs.linkml.yaml @@ -13,6 +13,18 @@ # what returns 200. Every BBQS class/slot IRI hangs off it and must outlive the # hosting. LOVABLE IS DECOMMISSIONED (week of 2026-09-01): do NOT repoint these # at any *.lovable.app host. (See public/bbqs-schema.linkml.yaml header.) +# +# ── IDENTITY KEYS: LINK, DON'T COPY ─────────────────────────────────────────── +# A class's unique_keys say what makes two records one thing: an ORCID, a DOI, a FON. Each key's +# normalization rule is stated once, in kg/identity_keys.json (with the vectors that pin it), and +# the same rule is looked up by the write paths (supabase/functions/_shared/identity-keys.ts), +# checked in the export (SHACL #14, #21-#24; kg/quality.py duplicates()) and, once +# 20261117181500_prevent_duplicates is applied (planned, not applied yet), refused in the database +# by uq_* indexes on public.kg_*_key: that script builds each index only where the live rows do not +# collide already, and lists the rows that do. gen-owl writes each key as owl:hasKey; gen-shacl +# writes nothing for them. tests/guards/kg-identity-keys keeps these keys equal to the JSON's. A +# missing value never collides (consider_nulls_inequal), as in Postgres and OWL. A URL is no key: a +# notice or a tool's homepage can be a landing page that several records share. id: https://brain-bbqs.org/schema/bbqs name: bbqs title: BBQS Knowledge Graph Schema @@ -123,6 +135,25 @@ classes: - held_project_roles # → ProjectRole (reified per-project role) slot_usage: email: { description: "PII — restricted in the public API/graph export." } + unique_keys: + investigator_orcid: + unique_key_slots: [orcid] + consider_nulls_inequal: true + description: >- + One ORCID iD, one person (rule "orcid" in kg/identity_keys.json). Refused in the database + by uq_investigators_orcid_key on public.kg_orcid_key(orcid) (20261117181500, planned, not + applied yet); found in an export by OrcidUniquePerPersonShape (#14) and kg/quality.py + duplicates(). Its owl:hasKey is declarative only: gen-owl makes orcid a datatype property + (range xsd:anyURI), while the exporter writes each ORCID iD as an IRI + (), so a reasoner never applies the key to an export. The checks + that act on it are the database index, #14 and duplicates(). + investigator_email: + unique_key_slots: [email] + consider_nulls_inequal: true + description: >- + One email address, one person. Refused in the database, in force since 20260807190000, + by investigators_email_unique_ci on lower(btrim(email)); found in a full-access export by + EmailUniquePerPersonShape (#15), which compares secondary_emails too. ResearchOrganization: is_a: Entity @@ -131,6 +162,28 @@ classes: description: A university, institute, or lab participating in BBQS. exact_mappings: ["ror:"] slots: [ror_id, members] + unique_keys: + organization_ror: + unique_key_slots: [ror_id] + consider_nulls_inequal: true + description: >- + One ROR id, one organization. ROR is an organization's identity; the name key below only + catches spelling variants of one name. Declared so the rule is stated when organizations + gets a ROR column; it has none yet, so nothing enforces this key today. + organization_name: + unique_key_slots: [name] + consider_nulls_inequal: true + description: >- + One organization per name, compared without case, punctuation, spacing or accents, with + Greek letters by name (rule "name"). It catches "UNIVERSITY OF CALIFORNIA, SAN DIEGO" = + "University of California San Diego"; it misses other wording, abbreviations and stop + words: "STATE UNIVERSITY NEW YORK STONY BROOK" and "State University of New York at Stony + Brook" are two name keys, and the 2026-11-17 export holds both as two nodes of one + institution, a known duplicate for a curator to merge. ROR (organization_ror) is the + identity for that. Refused in the database by uq_organizations_name_key on + public.kg_name_key(name) (20261117181500, planned, not applied yet); in an export, + kg/quality.py duplicates() groups organization names with its own fold (fold_label, which + also folds ß to ss), not with this key. Consortium: is_a: Entity @@ -198,7 +251,7 @@ classes: - website - keywords - studies_species # study_species[] → Species (resolved) - - studies_species_name # study_species[] raw claim, verbatim + - studies_species_unresolved # a study_species[] claim no Species matches yet - study_scope # study_species[] value that names no species by design - studies_human - metadata_completeness @@ -208,6 +261,17 @@ classes: - funded_datasets # grant_dandisets → Dandiset - has_model # → MarrModel (RESERVED stub) - produced # → any Artifact (dataset/software/publication/model…) + - uses_device_category # project_device_usage → DeviceCategory + unique_keys: + project_award: + unique_key_slots: [grant_number] + consider_nulls_inequal: true + description: >- + One NIH award, one project: grant numbers compared by their NIH core, so 1R34DA059723-01 + and R34DA059723 are one award (rule "award"). Refused in the database by + uq_grants_award_key and uq_projects_award_key on public.kg_award_key(grant_number) + (20261117181500, planned, not applied yet); found in an export by + AwardUniquePerProjectShape (#24) and kg/quality.py duplicates(). ProjectRole: class_uri: prov:Association @@ -226,9 +290,27 @@ classes: is_a: Entity mixins: [CreativeWork] class_uri: schema:ScholarlyArticle - slots: [authors, author_orcids, doi, pmid, pubmed_link, journal, year, citations, rcr, keywords] + slots: [authors, author_orcids, doi, pmid, pubmed_link, journal, year, citations, rcr, keywords, revision_of] slot_usage: authors: { description: "Free-text author string; ORCIDs in author_orcids. Not an FK to Investigator." } + unique_keys: + publication_doi: + unique_key_slots: [doi] + consider_nulls_inequal: true + description: >- + One DOI, one publication (rule "doi"). Refused in the database by uq_publications_doi_key + on public.kg_doi_key(doi) (20261117181500, planned, not applied yet); found in an export + by DoiUniquePerPublicationShape (#21) and kg/quality.py duplicates(). A preprint and its + published version have two DOIs: they are two records linked by revision_of, never one + record. + publication_pmid: + unique_key_slots: [pmid] + consider_nulls_inequal: true + description: >- + One PubMed id, one publication (rule "pmid"). Refused in the database by + uq_publications_pmid_key on public.kg_pmid_key(pmid) (20261117181500, planned, not + applied yet); found in an export by PmidUniquePerPublicationShape (#22) and kg/quality.py + duplicates(). Dataset: is_a: Entity @@ -245,6 +327,13 @@ classes: description: A DANDI-archived dataset (NWB). Linked to grants via award_numbers[]. exact_mappings: ["dandi:"] slots: [dandiset_id, api_url, draft_url, neurosift_url, file_count, size_bytes, dandi_instance, award_numbers] + unique_keys: + dandiset_archive_id: + unique_key_slots: [dandi_instance, dandiset_id] + consider_nulls_inequal: true + description: >- + One dandiset per archive and id. Refused in the database, in force since 20260524231145, + by the dandisets UNIQUE (instance, dandiset_id). Benchmark: is_a: Dataset @@ -365,6 +454,19 @@ classes: slots: [fon, activity_code, eligible_activity_codes, opportunity_type, budget_floor, budget_ceiling, due_dates, open_date, posted_date, expiration_date, participating_orgs, purpose, relevance_tags, status, url] + unique_keys: + funding_fon: + unique_key_slots: [fon] + consider_nulls_inequal: true + description: >- + One funding opportunity number, one call, compared by letters and digits only (rule "fon"). + Refused in the database by uq_funding_opportunities_fon_key on public.kg_fon_key(fon) + (20261117181500, planned, not applied yet), beside the exact funding_opportunities_fon_key + (in force); found in an export by FonUniquePerCallShape (#23) and kg/quality.py + duplicates(). A final notice supersedes its forecast in place: the call keeps its node and + takes the new FON. A call's URL is no key: a notice URL can be a landing page (an NIH + highlighted-topic page, a programme page) that lists several calls, so kg/quality.py + compares it as a signal only, a possible duplicate when the names match as well. Event: is_a: Entity @@ -466,7 +568,7 @@ slots: slot_uri: bbqs:resourceType range: resource_type_enum description: The rdf:type discriminator, from resources.resource_type. - part_of_org: { slot_uri: schema:parentOrganization, range: ResearchOrganization, description: "resources.organization_id." } + part_of_org: { slot_uri: schema:parentOrganization, range: ResearchOrganization, description: "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." } metadata: { slot_uri: bbqs:metadata, description: "resources.metadata JSON overflow — un-promoted fields." } created_at: { slot_uri: schema:dateCreated, range: datetime } updated_at: { slot_uri: schema:dateModified, range: datetime } @@ -502,7 +604,7 @@ slots: website: { slot_uri: schema:url, range: uriorcurie } keywords: { slot_uri: schema:keywords, multivalued: true } studies_species: { slot_uri: schema:about, range: Species, multivalued: true, description: "study_species[] names → Species nodes (resolved)." } - studies_species_name: { multivalued: true, description: "Raw study_species[] free-text claim, verbatim. Must resolve to a Species via studies_species (#7)." } + studies_species_unresolved: { multivalued: true, description: "A species named in the project's study_species[] that no Species node matches yet, as written. Only these are written as text: a claim that resolves is a studies_species link and is not repeated as a name (link, do not copy). A curator clears one by adding the species or an alias for the name (#7)." } study_scope: { multivalued: true, description: "A study_species[] value that names no species by design (e.g. 'All Species' for infrastructure awards). Recorded as scope, not a species claim, so #7 does not flag it." } studies_human: { range: boolean } metadata_completeness: { range: float } @@ -538,6 +640,7 @@ slots: year: { slot_uri: schema:datePublished, range: integer } citations: { range: integer } rcr: { range: float, description: "Relative Citation Ratio." } + revision_of: { slot_uri: bbqs:revision_of, exact_mappings: [prov:wasRevisionOf], range: Publication, multivalued: true, description: "The earlier version this publication revises: a published paper points at its preprint(s), as PROV's newer prov:wasRevisionOf older. Two records linked, never merged, so each keeps its own PMID, DOI and date. Written from resource_links (predicate revision_of), where public.kg_link_publication_versions records a pair: the same title, one of them a preprint that is not later than the other (by PubMed id, else by the posting date in a bioRxiv/medRxiv DOI, else by year), both credited to one project." } # ---- datasets / software / models ---------------------------------------- license: { slot_uri: schema:license } @@ -578,6 +681,7 @@ slots: typical_use_cases: { multivalued: true } schema_org_type: { description: "device_categories.schema_org_type — the schema.org type this category maps to." } uses_device: { slot_uri: schema:instrument, range: Device, multivalued: true } + uses_device_category: { slot_uri: bbqs:usesDeviceCategory, range: DeviceCategory, multivalued: true, description: "A kind of instrument the project's methods evidence names (the project_device_usage view): a category, not a model." } measures_construct: { slot_uri: bbqs:measuresConstruct, range: BehavioralConstruct, multivalued: true } # ---- community / notices -------------------------------------------------- @@ -585,8 +689,8 @@ slots: link: { slot_uri: schema:url, range: uriorcurie } link_text: { description: "Display text for `link`, when the announcement points off-site." } is_external_link: { range: boolean } - posted_by: { slot_uri: schema:author, range: Investigator } - job_institution: { slot_uri: schema:hiringOrganization } + posted_by: { slot_uri: schema:author, range: Investigator, description: "Who posted it, as a link to their Investigator node (for a job: the public_job_posters view, 20261117170000). Never the poster's auth user id (jobs.posted_by) or email." } + job_institution: { slot_uri: schema:hiringOrganization, description: "The institution a job posting names, as written (jobs.institution), for a job with no organization node to link. A job whose organization resolves has the part_of_org link instead, and the name is not repeated as text (link, do not copy). A curator clears one by setting the job's organization." } job_type: { slot_uri: schema:employmentType } department: { description: "Posting lab's department, as free text (jobs.department)." } location: { slot_uri: schema:jobLocation } @@ -594,8 +698,8 @@ slots: # P01 (OOPS): Event must not reuse Job's `location` (schema:jobLocation) for a venue. venue: { slot_uri: schema:location, description: "Physical or virtual venue for the workshop/convening." } application_url: { slot_uri: schema:url, range: uriorcurie } - contact_name: { description: "Name of the person to contact about the posting." } - contact_email: { description: "Email address to contact about the posting." } + contact_name: { description: "Name of the person to contact about the posting. Restricted: public_jobs leaves it out (20260515233153), so the public export never carries it." } + contact_email: { description: "Email address to contact about the posting. PII, restricted the same way: never in the public export." } expires_at: { slot_uri: schema:validThrough, range: datetime } is_active: { range: boolean } fon: { slot_uri: schema:identifier, description: "Funding Opportunity Number." } @@ -692,16 +796,19 @@ enums: project_role_enum: description: >- - Every token normalize_grant_role (20260811120000_canonical_role_vocabulary.sql) can store in - grant_investigators.role, plus trainee, which it deliberately passes through unmapped. - tests/guards/role-vocabulary-parity holds the two equal. NB: the separator is inconsistent -- - co-investigator is hyphenated while co_pi/contact_pi use underscores -- and PI is upper case. + Every token normalize_grant_role (20260811120000_canonical_role_vocabulary.sql, with collaborator + since 20261118140000) can store in grant_investigators.role, plus trainee, which it deliberately + passes through unmapped. tests/guards/kg-role-vocabulary-parity holds the two equal, and + tests/guards/role-ui-vocabulary holds every role menu to the function. NB: the separator is + inconsistent -- co-investigator is hyphenated while co_pi/contact_pi use underscores -- and PI is + upper case. permissible_values: PI: {} contact_pi: {} co_pi: {} mpi: {} co-investigator: {} + collaborator: {} trainee: {} postdoc: {} graduate_student: {} diff --git a/kg/bbqs.owl.ttl b/kg/bbqs.owl.ttl index b7c01f96..df6c42e5 100644 --- a/kg/bbqs.owl.ttl +++ b/kg/bbqs.owl.ttl @@ -42,50 +42,50 @@ bbqs:Algorithm a owl:Class ; bbqs:Announcement a owl:Class ; rdfs:label "Announcement" ; rdfs:subClassOf [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom xsd:anyURI ; + owl:onProperty bbqs:link ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; owl:onProperty bbqs:posted_by ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:maxCardinality 1 ; owl:onProperty bbqs:is_external_link ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:minCardinality 0 ; owl:onProperty bbqs:is_external_link ], [ a owl:Restriction ; - owl:allValuesFrom bbqs:Investigator ; + owl:minCardinality 0 ; owl:onProperty bbqs:posted_by ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom xsd:string ; owl:onProperty bbqs:link_text ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:minCardinality 0 ; owl:onProperty bbqs:content ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:link_text ], + owl:onProperty bbqs:content ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty bbqs:link ], [ a owl:Restriction ; - owl:allValuesFrom xsd:anyURI ; + owl:minCardinality 0 ; owl:onProperty bbqs:link ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:boolean ; - owl:onProperty bbqs:is_external_link ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty bbqs:link_text ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:content ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:posted_by ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; owl:onProperty bbqs:content ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:link ], + owl:onProperty bbqs:link_text ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:boolean ; + owl:onProperty bbqs:is_external_link ], + [ a owl:Restriction ; + owl:allValuesFrom bbqs:Investigator ; + owl:onProperty bbqs:posted_by ], bbqs:CreativeWork, bbqs:Entity ; skos:definition "A consortium news post or announcement. `news`, funding blurbs, etc." ; @@ -95,11 +95,8 @@ bbqs:Announcement a owl:Class ; bbqs:Consortium a owl:Class ; rdfs:label "Consortium" ; rdfs:subClassOf [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom bbqs:Investigator ; owl:onProperty bbqs:members ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:funder ], [ a owl:Restriction ; owl:allValuesFrom bbqs:FundingAgency ; owl:onProperty bbqs:funder ], @@ -107,7 +104,10 @@ bbqs:Consortium a owl:Class ; owl:maxCardinality 1 ; owl:onProperty bbqs:funder ], [ a owl:Restriction ; - owl:allValuesFrom bbqs:Investigator ; + owl:minCardinality 0 ; + owl:onProperty bbqs:funder ], + [ a owl:Restriction ; + owl:minCardinality 0 ; owl:onProperty bbqs:members ], bbqs:Entity, bbqs:Organization ; @@ -118,37 +118,37 @@ bbqs:Consortium a owl:Class ; bbqs:Event a owl:Class ; rdfs:label "Event" ; rdfs:subClassOf [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:start_date ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:date ; - owl:onProperty bbqs:start_date ], - [ a owl:Restriction ; - owl:allValuesFrom bbqs:Investigator ; + owl:minCardinality 0 ; owl:onProperty bbqs:attendees ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty bbqs:end_date ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:end_date ], + owl:onProperty bbqs:venue ], + [ a owl:Restriction ; + owl:allValuesFrom bbqs:Investigator ; + owl:onProperty bbqs:attendees ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; owl:onProperty bbqs:venue ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:minCardinality 0 ; owl:onProperty bbqs:venue ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:start_date ], [ a owl:Restriction ; owl:allValuesFrom xsd:date ; owl:onProperty bbqs:end_date ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:venue ], + owl:allValuesFrom xsd:date ; + owl:onProperty bbqs:start_date ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:attendees ], + owl:maxCardinality 1 ; + owl:onProperty bbqs:end_date ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:maxCardinality 1 ; owl:onProperty bbqs:start_date ], bbqs:Entity, bbqs:EventAnchor ; @@ -160,82 +160,58 @@ bbqs:FundingOpportunity a owl:Class ; rdfs:label "FundingOpportunity" ; rdfs:subClassOf [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:participating_orgs ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:opportunity_type ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:opportunity_type ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:fon ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; owl:onProperty bbqs:activity_code ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:fon ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:fon ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:anyURI ; - owl:onProperty bbqs:url ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty bbqs:url ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty bbqs:budget_ceiling ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:status ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:open_date ], + owl:onProperty bbqs:expiration_date ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:purpose ], + owl:onProperty bbqs:opportunity_type ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:maxCardinality 1 ; owl:onProperty bbqs:posted_date ], [ a owl:Restriction ; - owl:allValuesFrom xsd:date ; - owl:onProperty bbqs:expiration_date ], + owl:minCardinality 0 ; + owl:onProperty bbqs:participating_orgs ], [ a owl:Restriction ; owl:allValuesFrom xsd:date ; owl:onProperty bbqs:open_date ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:url ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:expiration_date ], + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:due_dates ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty bbqs:status ], [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:opportunity_type ], + owl:minCardinality 0 ; + owl:onProperty bbqs:fon ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:status ], + owl:onProperty bbqs:url ], [ a owl:Restriction ; owl:allValuesFrom xsd:float ; owl:onProperty bbqs:budget_ceiling ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:posted_date ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:open_date ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:budget_floor ], + owl:onProperty bbqs:due_dates ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:participating_orgs ], + owl:onProperty bbqs:purpose ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:purpose ], + owl:onProperty bbqs:status ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty bbqs:activity_code ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty bbqs:due_dates ], @@ -247,44 +223,69 @@ bbqs:FundingOpportunity a owl:Class ; owl:onProperty bbqs:purpose ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:due_dates ], - [ a owl:Restriction ; - owl:minCardinality 0 ; owl:onProperty bbqs:relevance_tags ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:status ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty bbqs:budget_floor ], [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:activity_code ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:float ; + owl:minCardinality 0 ; owl:onProperty bbqs:budget_floor ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:due_dates ], + owl:minCardinality 0 ; + owl:onProperty bbqs:purpose ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:open_date ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:date ; + owl:onProperty bbqs:expiration_date ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty bbqs:eligible_activity_codes ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:anyURI ; + owl:onProperty bbqs:url ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty bbqs:fon ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:float ; + owl:onProperty bbqs:budget_floor ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:relevance_tags ], + owl:onProperty bbqs:opportunity_type ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:expiration_date ], + owl:onProperty bbqs:budget_ceiling ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:fon ], [ a owl:Restriction ; owl:allValuesFrom xsd:date ; owl:onProperty bbqs:posted_date ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom xsd:string ; owl:onProperty bbqs:activity_code ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:budget_ceiling ], + owl:onProperty bbqs:posted_date ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty bbqs:opportunity_type ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty bbqs:open_date ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:relevance_tags ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:expiration_date ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:participating_orgs ], bbqs:Entity ; + owl:hasKey ( bbqs:fon ) ; skos:definition "An NIH (or other) funding call — the \"funding calls\" surface (funding_opportunities: fon/activity_code/due_dates…). resource_type=funding. NB: table needs resource_id backfill to enter the spine." ; skos:exactMatch ; skos:inScheme . @@ -292,104 +293,104 @@ bbqs:FundingOpportunity a owl:Class ; bbqs:Job a owl:Class ; rdfs:label "Job" ; rdfs:subClassOf [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty bbqs:description_text ], + [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:job_type ], + owl:onProperty bbqs:job_institution ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; owl:onProperty bbqs:contact_name ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:department ], + owl:onProperty bbqs:job_type ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; owl:onProperty bbqs:description_text ], [ a owl:Restriction ; - owl:allValuesFrom xsd:anyURI ; + owl:maxCardinality 1 ; owl:onProperty bbqs:application_url ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:expires_at ], + owl:minCardinality 0 ; + owl:onProperty bbqs:contact_email ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:department ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:posted_by ], + owl:onProperty bbqs:job_type ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:contact_name ], + owl:onProperty bbqs:application_url ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:job_type ], + owl:onProperty bbqs:department ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom xsd:dateTime ; owl:onProperty bbqs:expires_at ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:posted_by ], + owl:allValuesFrom xsd:boolean ; + owl:onProperty bbqs:is_active ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:job_institution ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:location ], + owl:onProperty bbqs:contact_email ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:department ], + owl:maxCardinality 1 ; + owl:onProperty bbqs:contact_name ], [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; + owl:maxCardinality 1 ; owl:onProperty bbqs:location ], [ a owl:Restriction ; - owl:allValuesFrom xsd:boolean ; + owl:maxCardinality 1 ; owl:onProperty bbqs:is_active ], [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:job_type ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:contact_email ], + owl:maxCardinality 1 ; + owl:onProperty bbqs:posted_by ], [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:contact_email ], + owl:maxCardinality 1 ; + owl:onProperty bbqs:expires_at ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:job_institution ], + owl:onProperty bbqs:is_active ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:is_active ], + owl:onProperty bbqs:job_institution ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:application_url ], + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:job_institution ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty bbqs:description_text ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:is_active ], + owl:onProperty bbqs:contact_name ], [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:job_institution ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:allValuesFrom xsd:anyURI ; owl:onProperty bbqs:application_url ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:contact_email ], + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:department ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:location ], + owl:minCardinality 0 ; + owl:onProperty bbqs:department ], [ a owl:Restriction ; - owl:allValuesFrom xsd:dateTime ; - owl:onProperty bbqs:expires_at ], + owl:minCardinality 0 ; + owl:onProperty bbqs:posted_by ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:location ], [ a owl:Restriction ; owl:allValuesFrom bbqs:Investigator ; owl:onProperty bbqs:posted_by ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:contact_name ], + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:contact_email ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:description_text ], + owl:minCardinality 0 ; + owl:onProperty bbqs:expires_at ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:job_type ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:location ], bbqs:Entity, bbqs:JobPosting ; skos:definition "A postdoc, staff, or trainee position posted by a BBQS lab." ; @@ -400,25 +401,25 @@ bbqs:MLModel a owl:Class ; rdfs:label "MLModel" ; rdfs:subClassOf [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:evaluated_by ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:anyURI ; owl:onProperty bbqs:repo_url ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom bbqs:Dataset ; owl:onProperty bbqs:trained_on ], [ a owl:Restriction ; - owl:allValuesFrom bbqs:Benchmark ; - owl:onProperty bbqs:evaluated_by ], + owl:allValuesFrom xsd:anyURI ; + owl:onProperty bbqs:repo_url ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty bbqs:repo_url ], [ a owl:Restriction ; - owl:allValuesFrom bbqs:Dataset ; + owl:allValuesFrom bbqs:Benchmark ; + owl:onProperty bbqs:evaluated_by ], + [ a owl:Restriction ; + owl:minCardinality 0 ; owl:onProperty bbqs:trained_on ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:repo_url ], + owl:onProperty bbqs:evaluated_by ], bbqs:CreativeWork, bbqs:Entity ; skos:definition "A trained/released machine-learning model (resource_type ml_model)." ; @@ -428,16 +429,16 @@ bbqs:MLModel a owl:Class ; bbqs:Protocol a owl:Class ; rdfs:label "Protocol" ; rdfs:subClassOf [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:uses_device ], + [ a owl:Restriction ; owl:allValuesFrom bbqs:BehavioralConstruct ; owl:onProperty bbqs:measures_construct ], - [ a owl:Restriction ; - owl:allValuesFrom bbqs:Device ; - owl:onProperty bbqs:uses_device ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty bbqs:measures_construct ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom bbqs:Device ; owl:onProperty bbqs:uses_device ], bbqs:CreativeWork, bbqs:Entity ; @@ -446,110 +447,31 @@ bbqs:Protocol a owl:Class ; skos:exactMatch ; skos:inScheme . -bbqs:Publication a owl:Class ; - rdfs:label "Publication" ; +bbqs:SoftwareTool a owl:Class ; + rdfs:label "SoftwareTool" ; rdfs:subClassOf [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:authors ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:author_orcids ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:journal ], - [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:authors ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:integer ; - owl:onProperty bbqs:year ], + owl:onProperty bbqs:software_license ], [ a owl:Restriction ; owl:allValuesFrom xsd:anyURI ; - owl:onProperty bbqs:pubmed_link ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:year ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:float ; - owl:onProperty bbqs:rcr ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:journal ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:rcr ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:citations ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:author_orcids ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:journal ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:pmid ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:citations ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:pmid ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:authors ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:rcr ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:pubmed_link ], + owl:onProperty bbqs:docs_url ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:pmid ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:anyURI ; - owl:onProperty bbqs:doi ], + owl:onProperty bbqs:language ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:year ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:keywords ], + owl:onProperty bbqs:software_license ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:keywords ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:pubmed_link ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:integer ; - owl:onProperty bbqs:citations ], + owl:onProperty bbqs:language ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:doi ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:author_orcids ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:doi ], - bbqs:CreativeWork, - bbqs:Entity ; - skos:exactMatch ; - skos:inScheme . - -bbqs:SoftwareTool a owl:Class ; - rdfs:label "SoftwareTool" ; - rdfs:subClassOf [ a owl:Restriction ; - owl:maxCardinality 1 ; owl:onProperty bbqs:language ], [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; + owl:minCardinality 0 ; owl:onProperty bbqs:software_license ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:minCardinality 0 ; owl:onProperty bbqs:repo_url ], [ a owl:Restriction ; owl:minCardinality 0 ; @@ -559,31 +481,16 @@ bbqs:SoftwareTool a owl:Class ; owl:onProperty bbqs:docs_url ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:software_license ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:software_license ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:repo_url ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; owl:onProperty bbqs:version ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:language ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:language ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:version ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:anyURI ; - owl:onProperty bbqs:docs_url ], + owl:onProperty bbqs:repo_url ], [ a owl:Restriction ; owl:allValuesFrom xsd:anyURI ; owl:onProperty bbqs:repo_url ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:version ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty bbqs:docs_url ], @@ -598,46 +505,46 @@ bbqs:Standard a owl:Class ; rdfs:label "Standard" ; rdfs:subClassOf [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:award_numbers ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:award_numbers ], + owl:onProperty bbqs:license ], [ a owl:Restriction ; owl:minCardinality 0 ; + owl:onProperty bbqs:version ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:string ; owl:onProperty bbqs:license ], [ a owl:Restriction ; - owl:allValuesFrom xsd:anyURI ; + owl:minCardinality 0 ; owl:onProperty bbqs:repo_url ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty bbqs:docs_url ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:repo_url ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; + owl:maxCardinality 1 ; owl:onProperty bbqs:version ], [ a owl:Restriction ; - owl:allValuesFrom xsd:anyURI ; - owl:onProperty bbqs:docs_url ], + owl:minCardinality 0 ; + owl:onProperty bbqs:award_numbers ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty bbqs:license ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:version ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:license ], + owl:allValuesFrom xsd:anyURI ; + owl:onProperty bbqs:repo_url ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom xsd:anyURI ; owl:onProperty bbqs:docs_url ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:version ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty bbqs:repo_url ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:award_numbers ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:version ], + owl:onProperty bbqs:docs_url ], bbqs:CreativeWork, bbqs:Entity ; skos:definition "A data or metadata standard (resource_type standard), e.g. Psych-DS for behavioral datasets. Not a BBQS award: an award that funds it is recorded in award_numbers, never as a Project." ; @@ -669,75 +576,76 @@ bbqs:Benchmark a owl:Class ; bbqs:Dandiset a owl:Class ; rdfs:label "Dandiset" ; rdfs:subClassOf [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:draft_url ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:size_bytes ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:anyURI ; - owl:onProperty bbqs:neurosift_url ], - [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:dandi_instance ], + owl:onProperty bbqs:award_numbers ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty bbqs:dandiset_id ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:neurosift_url ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:api_url ], + owl:onProperty bbqs:dandi_instance ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; owl:onProperty bbqs:dandi_instance ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:neurosift_url ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:integer ; - owl:onProperty bbqs:size_bytes ], [ a owl:Restriction ; owl:allValuesFrom xsd:anyURI ; owl:onProperty bbqs:api_url ], [ a owl:Restriction ; owl:minCardinality 0 ; + owl:onProperty bbqs:draft_url ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:string ; owl:onProperty bbqs:award_numbers ], [ a owl:Restriction ; - owl:allValuesFrom xsd:integer ; + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:dandiset_id ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; owl:onProperty bbqs:file_count ], [ a owl:Restriction ; owl:minCardinality 0 ; + owl:onProperty bbqs:file_count ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:integer ; owl:onProperty bbqs:size_bytes ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:draft_url ], + owl:maxCardinality 1 ; + owl:onProperty bbqs:neurosift_url ], [ a owl:Restriction ; owl:minCardinality 0 ; + owl:onProperty bbqs:dandi_instance ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; owl:onProperty bbqs:api_url ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:dandiset_id ], + owl:onProperty bbqs:size_bytes ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:file_count ], + owl:onProperty bbqs:api_url ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:dandi_instance ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:neurosift_url ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; owl:onProperty bbqs:dandiset_id ], [ a owl:Restriction ; owl:allValuesFrom xsd:anyURI ; owl:onProperty bbqs:draft_url ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:allValuesFrom xsd:integer ; owl:onProperty bbqs:file_count ], [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:award_numbers ], + owl:minCardinality 0 ; + owl:onProperty bbqs:size_bytes ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:anyURI ; + owl:onProperty bbqs:neurosift_url ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty bbqs:draft_url ], bbqs:Dataset ; + owl:hasKey ( bbqs:dandi_instance bbqs:dandiset_id ) ; skos:definition "A DANDI-archived dataset (NWB). Linked to grants via award_numbers[]." ; skos:exactMatch , dandi: ; @@ -783,6 +691,10 @@ bbqs:ProjectAnchor a owl:Class ; rdfs:label "co_pi" ; rdfs:subClassOf bbqs:ProjectRoleEnum . + a owl:Class ; + rdfs:label "collaborator" ; + rdfs:subClassOf bbqs:ProjectRoleEnum . + a owl:Class ; rdfs:label "contact_pi" ; rdfs:subClassOf bbqs:ProjectRoleEnum . @@ -826,140 +738,140 @@ bbqs:ProjectAnchor a owl:Class ; bbqs:ProvenanceRecord a owl:Class ; rdfs:label "ProvenanceRecord" ; rdfs:subClassOf [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:prov_entity_id ], + owl:maxCardinality 1 ; + owl:onProperty bbqs:prov_confidence ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:prov_entity_column ], + owl:onProperty bbqs:prov_agent_label ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:prov_evidence ], + owl:onProperty bbqs:prov_agent_id ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:prov_authored_at ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:prov_value_text ], + owl:onProperty bbqs:prov_source_class ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:prov_model_id ], + owl:maxCardinality 1 ; + owl:onProperty bbqs:prov_source_ref ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom xsd:string ; owl:onProperty bbqs:prov_evidence ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:prov_value_text ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:prov_recorded_by ], + owl:onProperty bbqs:prov_authored_at ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:maxCardinality 1 ; owl:onProperty bbqs:prov_entity_id ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:prov_activity ], + owl:onProperty bbqs:prov_recorded_at ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:prov_model_id ], + owl:allValuesFrom xsd:float ; + owl:onProperty bbqs:prov_confidence ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:prov_evidence ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:prov_agent_id ], + owl:onProperty bbqs:prov_value_text ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:prov_agent_label ], - [ a owl:Restriction ; - owl:minCardinality 0 ; owl:onProperty bbqs:prov_recorded_by ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:prov_source_class ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:prov_value_text ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; owl:onProperty bbqs:prov_model_id ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:maxCardinality 1 ; owl:onProperty bbqs:prov_authored_at ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:prov_agent_label ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:prov_recorded_at ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:prov_recorded_at ], + owl:onProperty bbqs:prov_agent_label ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty bbqs:prov_entity_column ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:prov_entity_id ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; owl:onProperty bbqs:prov_source_ref ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:prov_entity_table ], + owl:onProperty bbqs:prov_model_id ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:prov_model_id ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:prov_recorded_by ], + [ a owl:Restriction ; + owl:allValuesFrom bbqs:SourceClass ; owl:onProperty bbqs:prov_source_class ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:prov_confidence ], + owl:minCardinality 0 ; + owl:onProperty bbqs:prov_evidence ], [ a owl:Restriction ; - owl:allValuesFrom xsd:dateTime ; - owl:onProperty bbqs:prov_authored_at ], + owl:maxCardinality 1 ; + owl:onProperty bbqs:prov_entity_table ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:prov_agent_label ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:dateTime ; - owl:onProperty bbqs:prov_recorded_at ], + owl:onProperty bbqs:prov_entity_column ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:prov_source_ref ], + owl:minCardinality 0 ; + owl:onProperty bbqs:prov_agent_id ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:prov_source_ref ], + owl:onProperty bbqs:prov_recorded_at ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:prov_activity ], + owl:onProperty bbqs:prov_entity_table ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:maxCardinality 1 ; owl:onProperty bbqs:prov_activity ], [ a owl:Restriction ; - owl:allValuesFrom bbqs:SourceClass ; + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:prov_recorded_by ], + [ a owl:Restriction ; + owl:minCardinality 0 ; owl:onProperty bbqs:prov_source_class ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:prov_confidence ], + owl:onProperty bbqs:prov_activity ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:minCardinality 0 ; owl:onProperty bbqs:prov_entity_table ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:prov_recorded_by ], + owl:minCardinality 0 ; + owl:onProperty bbqs:prov_entity_column ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:prov_agent_id ], + owl:minCardinality 0 ; + owl:onProperty bbqs:prov_entity_id ], [ a owl:Restriction ; - owl:allValuesFrom xsd:float ; - owl:onProperty bbqs:prov_confidence ], + owl:allValuesFrom xsd:dateTime ; + owl:onProperty bbqs:prov_recorded_at ], [ a owl:Restriction ; owl:maxCardinality 1 ; + owl:onProperty bbqs:prov_evidence ], + [ a owl:Restriction ; + owl:minCardinality 0 ; owl:onProperty bbqs:prov_value_text ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:prov_agent_id ], + owl:onProperty bbqs:prov_source_ref ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:prov_entity_column ], + owl:onProperty bbqs:prov_confidence ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:prov_entity_id ], + owl:onProperty bbqs:prov_agent_id ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:prov_entity_table ] ; + owl:onProperty bbqs:prov_activity ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:dateTime ; + owl:onProperty bbqs:prov_authored_at ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:prov_agent_label ] ; skos:definition "Field-level provenance (field_provenance): one assertion that a given (entity_table, entity_column, entity_id) value was generated by an activity, attributed to an agent, from a graded source_class, with confidence/evidence. Reifies PROV onto individual cell writes." ; skos:exactMatch prov:Activity ; skos:inScheme . @@ -1072,32 +984,29 @@ bbqs:ProvenanceRecord a owl:Class ; bbqs:SourceClass a owl:Class ; rdfs:label "SourceClass" ; rdfs:subClassOf [ a owl:Restriction ; - owl:allValuesFrom xsd:integer ; - owl:onProperty bbqs:grade ], - [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:label ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:boolean ; - owl:onProperty bbqs:is_verified ], + owl:onProperty bbqs:source_code ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:agent_kind ], + owl:maxCardinality 1 ; + owl:onProperty bbqs:description ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom xsd:string ; owl:onProperty bbqs:source_code ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty bbqs:agent_kind ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:label ], + owl:onProperty bbqs:agent_kind ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:is_verified ], + owl:onProperty bbqs:description ], [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:source_code ], + owl:minCardinality 0 ; + owl:onProperty bbqs:agent_kind ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:description ], + owl:allValuesFrom xsd:integer ; + owl:onProperty bbqs:grade ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty bbqs:is_verified ], @@ -1109,22 +1018,25 @@ bbqs:SourceClass a owl:Class ; owl:onProperty bbqs:label ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:agent_kind ], + owl:onProperty bbqs:description ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:grade ], + owl:allValuesFrom xsd:boolean ; + owl:onProperty bbqs:is_verified ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:source_code ], + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:label ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:agent_kind ], + owl:minCardinality 0 ; + owl:onProperty bbqs:is_verified ], [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:description ], + owl:maxCardinality 1 ; + owl:onProperty bbqs:source_code ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:description ] ; + owl:onProperty bbqs:label ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty bbqs:grade ] ; skos:definition "A provenance source category (source_classes) graded by reliability — whether the who/what behind a value is human, agent, harvester, RePORTER, etc., and how much it is trusted." ; skos:exactMatch skos:Concept ; skos:inScheme . @@ -1243,6 +1155,13 @@ bbqs:research_areas a owl:DatatypeProperty ; rdfs:label "research_areas" ; skos:inScheme . +bbqs:revision_of a owl:ObjectProperty ; + rdfs:label "revision_of" ; + rdfs:range bbqs:Publication ; + skos:definition "The earlier version this publication revises: a published paper points at its preprint(s), as PROV's newer prov:wasRevisionOf older. Two records linked, never merged, so each keeps its own PMID, DOI and date. Written from resource_links (predicate revision_of), where public.kg_link_publication_versions records a pair: the same title, one of them a preprint that is not later than the other (by PubMed id, else by the posting date in a bioRxiv/medRxiv DOI, else by year), both credited to one project." ; + skos:exactMatch prov:wasRevisionOf ; + skos:inScheme . + bbqs:sdk_urls a owl:DatatypeProperty ; rdfs:label "sdk_urls" ; rdfs:range xsd:anyURI ; @@ -1256,9 +1175,9 @@ bbqs:skills a owl:DatatypeProperty ; rdfs:label "skills" ; skos:inScheme . -bbqs:studies_species_name a owl:DatatypeProperty ; - rdfs:label "studies_species_name" ; - skos:definition "Raw study_species[] free-text claim, verbatim. Must resolve to a Species via studies_species (#7)." ; +bbqs:studies_species_unresolved a owl:DatatypeProperty ; + rdfs:label "studies_species_unresolved" ; + skos:definition "A species named in the project's study_species[] that no Species node matches yet, as written. Only these are written as text: a claim that resolves is a studies_species link and is not repeated as a name (link, do not copy). A curator clears one by adding the species or an alias for the name (#7)." ; skos:inScheme . bbqs:study_scope a owl:DatatypeProperty ; @@ -1280,6 +1199,12 @@ bbqs:uses_device a owl:ObjectProperty ; rdfs:range bbqs:Device ; skos:inScheme . +bbqs:uses_device_category a owl:ObjectProperty ; + rdfs:label "uses_device_category" ; + rdfs:range bbqs:DeviceCategory ; + skos:definition "A kind of instrument the project's methods evidence names (the project_device_usage view): a category, not a model." ; + skos:inScheme . + bbqs:was_generated_by a owl:ObjectProperty ; rdfs:label "was_generated_by" ; rdfs:range bbqs:ProvenanceRecord ; @@ -1301,78 +1226,32 @@ bbqs:CognitiveTask a owl:Class ; cogatlas: ; skos:inScheme . -bbqs:DeviceCategory a owl:Class ; - rdfs:label "DeviceCategory" ; +bbqs:DeviceManufacturer a owl:Class ; + rdfs:label "DeviceManufacturer" ; rdfs:subClassOf [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:category_key ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:measures ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:label ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:measures ], + owl:onProperty bbqs:country ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:typical_use_cases ], + owl:onProperty bbqs:aliases ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:category_key ], + owl:onProperty bbqs:aliases ], [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:schema_org_type ], + owl:allValuesFrom xsd:anyURI ; + owl:onProperty bbqs:homepage_url ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:schema_org_type ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:schema_org_type ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:typical_use_cases ], + owl:onProperty bbqs:homepage_url ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:label ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:category_key ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:label ], - bbqs:Entity ; - skos:definition "One of the ~32 canonical BBQS device categories (device_categories: key/label/measures[]/typical_use_cases[]). A SKOS concept scheme; each maps to a schema.org type and (via device_class_crosswalk) to external classes." ; - skos:exactMatch skos:Concept ; - skos:inScheme . - -bbqs:DeviceManufacturer a owl:Class ; - rdfs:label "DeviceManufacturer" ; - rdfs:subClassOf [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; owl:onProperty bbqs:country ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:allValuesFrom xsd:string ; owl:onProperty bbqs:country ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:homepage_url ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty bbqs:homepage_url ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:aliases ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:aliases ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:country ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:anyURI ; - owl:onProperty bbqs:homepage_url ], bbqs:Entity, bbqs:Organization ; skos:definition "A maker of neural/behavioral/physiological instruments. Sourced from device_manufacturers (NB: needs resource_id backfill to enter the spine)." ; @@ -1392,14 +1271,116 @@ bbqs:Product a owl:Class ; skos:exactMatch ; skos:inScheme . +bbqs:Publication a owl:Class ; + rdfs:label "Publication" ; + rdfs:subClassOf [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty bbqs:rcr ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:integer ; + owl:onProperty bbqs:citations ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:keywords ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty bbqs:authors ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:author_orcids ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty bbqs:citations ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:year ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:journal ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:pmid ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:float ; + owl:onProperty bbqs:rcr ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:citations ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty bbqs:year ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty bbqs:journal ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:authors ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:doi ], + [ a owl:Restriction ; + owl:allValuesFrom bbqs:Publication ; + owl:onProperty bbqs:revision_of ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:anyURI ; + owl:onProperty bbqs:pubmed_link ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:anyURI ; + owl:onProperty bbqs:doi ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:pubmed_link ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:author_orcids ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:authors ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty bbqs:author_orcids ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:keywords ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:revision_of ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty bbqs:pubmed_link ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:pmid ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty bbqs:doi ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:journal ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:integer ; + owl:onProperty bbqs:year ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty bbqs:pmid ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:rcr ], + bbqs:CreativeWork, + bbqs:Entity ; + owl:hasKey ( bbqs:pmid ), + ( bbqs:doi ) ; + skos:exactMatch ; + skos:inScheme . + bbqs:ResearchOrganization a owl:Class ; rdfs:label "ResearchOrganization" ; rdfs:subClassOf [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:members ], + [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty bbqs:ror_id ], - [ a owl:Restriction ; - owl:allValuesFrom bbqs:Investigator ; - owl:onProperty bbqs:members ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty bbqs:ror_id ], @@ -1407,10 +1388,12 @@ bbqs:ResearchOrganization a owl:Class ; owl:allValuesFrom xsd:anyURI ; owl:onProperty bbqs:ror_id ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom bbqs:Investigator ; owl:onProperty bbqs:members ], bbqs:Entity, bbqs:Organization ; + owl:hasKey ( bbqs:ror_id ), + ( bbqs:name ) ; skos:definition "A university, institute, or lab participating in BBQS." ; skos:exactMatch , ror: ; @@ -1499,12 +1482,12 @@ bbqs:consortium_role a owl:DatatypeProperty ; bbqs:contact_email a owl:DatatypeProperty ; rdfs:label "contact_email" ; - skos:definition "Email address to contact about the posting." ; + skos:definition "Email address to contact about the posting. PII, restricted the same way: never in the public export." ; skos:inScheme . bbqs:contact_name a owl:DatatypeProperty ; rdfs:label "contact_name" ; - skos:definition "Name of the person to contact about the posting." ; + skos:definition "Name of the person to contact about the posting. Restricted: public_jobs leaves it out (20260515233153), so the public export never carries it." ; skos:inScheme . bbqs:content a owl:DatatypeProperty ; @@ -1520,14 +1503,6 @@ bbqs:created_at a owl:DatatypeProperty ; rdfs:range xsd:dateTime ; skos:inScheme . -bbqs:dandi_instance a owl:DatatypeProperty ; - rdfs:label "dandi_instance" ; - skos:inScheme . - -bbqs:dandiset_id a owl:DatatypeProperty ; - rdfs:label "dandiset_id" ; - skos:inScheme . - bbqs:dashboard_widgets a owl:DatatypeProperty ; rdfs:label "dashboard_widgets" ; skos:definition "working_group_dashboard_defaults.widgets JSON." ; @@ -1553,11 +1528,6 @@ bbqs:device_category a owl:ObjectProperty ; skos:definition "device_models.device_class → DeviceCategory.key." ; skos:inScheme . -bbqs:doi a owl:DatatypeProperty ; - rdfs:label "doi" ; - rdfs:range xsd:anyURI ; - skos:inScheme . - bbqs:draft_url a owl:DatatypeProperty ; rdfs:label "draft_url" ; rdfs:range xsd:anyURI ; @@ -1568,10 +1538,6 @@ bbqs:due_dates a owl:DatatypeProperty ; skos:definition "JSON of application due dates." ; skos:inScheme . -bbqs:email a owl:DatatypeProperty ; - rdfs:label "email" ; - skos:inScheme . - bbqs:end_date a owl:DatatypeProperty ; rdfs:label "end_date" ; rdfs:range xsd:date ; @@ -1603,22 +1569,12 @@ bbqs:fiscal_year a owl:DatatypeProperty ; rdfs:range xsd:integer ; skos:inScheme . -bbqs:fon a owl:DatatypeProperty ; - rdfs:label "fon" ; - skos:definition "Funding Opportunity Number." ; - skos:inScheme . - bbqs:grade a owl:DatatypeProperty ; rdfs:label "grade" ; rdfs:range xsd:integer ; skos:definition "Source reliability grade." ; skos:inScheme . -bbqs:grant_number a owl:DatatypeProperty ; - rdfs:label "grant_number" ; - skos:definition "NIH grant number; encodes mechanism." ; - skos:inScheme . - bbqs:has_model a owl:ObjectProperty ; rdfs:label "has_model" ; rdfs:range bbqs:MarrModel ; @@ -1676,6 +1632,7 @@ bbqs:is_verified a owl:DatatypeProperty ; bbqs:job_institution a owl:DatatypeProperty ; rdfs:label "job_institution" ; + skos:definition "The institution a job posting names, as written (jobs.institution), for a job with no organization node to link. A job whose organization resolves has the part_of_org link instead, and the name is not repeated as text (link, do not copy). A curator clears one by setting the job's organization." ; skos:inScheme . bbqs:job_type a owl:DatatypeProperty ; @@ -1728,10 +1685,6 @@ bbqs:model_name a owl:DatatypeProperty ; rdfs:label "model_name" ; skos:inScheme . -bbqs:name a owl:DatatypeProperty ; - rdfs:label "name" ; - skos:inScheme . - bbqs:ncbi_taxon_id a owl:DatatypeProperty ; rdfs:label "ncbi_taxon_id" ; rdfs:range xsd:anyURI ; @@ -1763,20 +1716,10 @@ bbqs:opportunity_type a owl:DatatypeProperty ; skos:definition "funding_opportunities.announcement_type — the notice type (e.g. NOFO, RFA, PA), not a category of the Announcement class." ; skos:inScheme . -bbqs:orcid a owl:DatatypeProperty ; - rdfs:label "orcid" ; - rdfs:range xsd:anyURI ; - skos:definition "ORCID iD (orcid: prefix)." ; - skos:inScheme . - bbqs:part_of_org a owl:ObjectProperty ; rdfs:label "part_of_org" ; rdfs:range bbqs:ResearchOrganization ; - skos:definition "resources.organization_id." ; - skos:inScheme . - -bbqs:pmid a owl:DatatypeProperty ; - rdfs:label "pmid" ; + skos:definition "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; skos:inScheme . bbqs:posted_date a owl:DatatypeProperty ; @@ -1908,11 +1851,6 @@ bbqs:role_source a owl:ObjectProperty ; skos:definition "Where the role came from -- provenance of the role assignment." ; skos:inScheme . -bbqs:ror_id a owl:DatatypeProperty ; - rdfs:label "ror_id" ; - rdfs:range xsd:anyURI ; - skos:inScheme . - bbqs:sampling_rate_hz a owl:DatatypeProperty ; rdfs:label "sampling_rate_hz" ; rdfs:range xsd:float ; @@ -2020,65 +1958,65 @@ bbqs:FundingAgency a owl:Class ; bbqs:MarrModel a owl:Class ; rdfs:label "MarrModel" ; rdfs:subClassOf [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:implementational_level ], - [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:implementational_level ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:algorithmic_level ], - [ a owl:Restriction ; - owl:allValuesFrom bbqs:AnatomicalSite ; owl:onProperty bbqs:about_anatomy ], [ a owl:Restriction ; - owl:allValuesFrom bbqs:ExperimentalData ; - owl:onProperty bbqs:has_experimental_data ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:has_experimental_data ], + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:computational_level ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:maxCardinality 1 ; owl:onProperty bbqs:computational_level ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:maxCardinality 1 ; owl:onProperty bbqs:describes_project ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:about_task ], + owl:onProperty bbqs:describes_project ], + [ a owl:Restriction ; + owl:allValuesFrom bbqs:AnatomicalSite ; + owl:onProperty bbqs:about_anatomy ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:algorithmic_level ], + owl:onProperty bbqs:has_experimental_data ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:computational_level ], + owl:allValuesFrom bbqs:BehavioralConstruct ; + owl:onProperty bbqs:about_construct ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty bbqs:implementational_level ], + [ a owl:Restriction ; + owl:allValuesFrom bbqs:Project ; + owl:onProperty bbqs:describes_project ], + [ a owl:Restriction ; + owl:allValuesFrom bbqs:ExperimentalData ; + owl:onProperty bbqs:has_experimental_data ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:about_task ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty bbqs:algorithmic_level ], [ a owl:Restriction ; - owl:allValuesFrom bbqs:Project ; - owl:onProperty bbqs:describes_project ], + owl:minCardinality 0 ; + owl:onProperty bbqs:about_construct ], [ a owl:Restriction ; owl:allValuesFrom bbqs:CognitiveTask ; owl:onProperty bbqs:about_task ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:about_anatomy ], + owl:onProperty bbqs:algorithmic_level ], [ a owl:Restriction ; - owl:allValuesFrom bbqs:BehavioralConstruct ; - owl:onProperty bbqs:about_construct ], + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:implementational_level ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:algorithmic_level ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:about_construct ], + owl:onProperty bbqs:implementational_level ], [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; + owl:minCardinality 0 ; owl:onProperty bbqs:computational_level ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:describes_project ], bbqs:Entity ; skos:definition "RESERVED STUB. The BBQS-Marr object: the causal / conceptual-neuroscience graph for a project, spanning Marr's computational, algorithmic, and implementational levels. Developed separately (Nader's causal-KG) and NOT ready — modeled here only as a node Project.has_model can point at, plus the hooks below. Do not flesh out until the causal-KG lands." ; skos:exactMatch bbqs:MarrModel ; @@ -2087,29 +2025,26 @@ bbqs:MarrModel a owl:Class ; bbqs:ProjectRole a owl:Class ; rdfs:label "ProjectRole" ; rdfs:subClassOf [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:held_by ], + owl:allValuesFrom bbqs:ProjectRoleEnum ; + owl:onProperty bbqs:project_role ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:role_source ], + owl:onProperty bbqs:on_project ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:project_role ], - [ a owl:Restriction ; - owl:allValuesFrom bbqs:RoleSourceEnum ; - owl:onProperty bbqs:role_source ], + owl:onProperty bbqs:held_by ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty bbqs:on_project ], [ a owl:Restriction ; - owl:allValuesFrom bbqs:Investigator ; - owl:onProperty bbqs:held_by ], + owl:allValuesFrom bbqs:Project ; + owl:onProperty bbqs:on_project ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty bbqs:project_role ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:on_project ], + owl:allValuesFrom bbqs:Investigator ; + owl:onProperty bbqs:held_by ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty bbqs:role_source ], @@ -2117,11 +2052,14 @@ bbqs:ProjectRole a owl:Class ; owl:minCardinality 0 ; owl:onProperty bbqs:held_by ], [ a owl:Restriction ; - owl:allValuesFrom bbqs:Project ; - owl:onProperty bbqs:on_project ], + owl:maxCardinality 1 ; + owl:onProperty bbqs:role_source ], [ a owl:Restriction ; - owl:allValuesFrom bbqs:ProjectRoleEnum ; - owl:onProperty bbqs:project_role ] ; + owl:maxCardinality 1 ; + owl:onProperty bbqs:project_role ], + [ a owl:Restriction ; + owl:allValuesFrom bbqs:RoleSourceEnum ; + owl:onProperty bbqs:role_source ] ; skos:definition "Reified project↔investigator role (grant_investigators). THE authority for \"role on this project\" — canonical tokens only (trg_normalize_grant_role), with role_source provenance. A scalar on Investigator cannot express a role that varies per project (issue #283)." ; skos:exactMatch prov:Association ; skos:inScheme . @@ -2131,22 +2069,68 @@ bbqs:award_numbers a owl:DatatypeProperty ; skos:definition "Award number(s) behind this resource: a dandiset's grants, a standard's funding award." ; skos:inScheme . -bbqs:held_by a owl:ObjectProperty ; - rdfs:label "held_by" ; - rdfs:range bbqs:Investigator ; - owl:inverseOf bbqs:held_project_roles ; +bbqs:dandi_instance a owl:DatatypeProperty ; + rdfs:label "dandi_instance" ; + skos:inScheme . + +bbqs:dandiset_id a owl:DatatypeProperty ; + rdfs:label "dandiset_id" ; + skos:inScheme . + +bbqs:doi a owl:DatatypeProperty ; + rdfs:label "doi" ; + rdfs:range xsd:anyURI ; + skos:inScheme . + +bbqs:email a owl:DatatypeProperty ; + rdfs:label "email" ; + skos:inScheme . + +bbqs:fon a owl:DatatypeProperty ; + rdfs:label "fon" ; + skos:definition "Funding Opportunity Number." ; + skos:inScheme . + +bbqs:grant_number a owl:DatatypeProperty ; + rdfs:label "grant_number" ; + skos:definition "NIH grant number; encodes mechanism." ; + skos:inScheme . + +bbqs:held_by a owl:ObjectProperty ; + rdfs:label "held_by" ; + rdfs:range bbqs:Investigator ; + owl:inverseOf bbqs:held_project_roles ; skos:inScheme . bbqs:keywords a owl:DatatypeProperty ; rdfs:label "keywords" ; skos:inScheme . +bbqs:name a owl:DatatypeProperty ; + rdfs:label "name" ; + skos:inScheme . + bbqs:on_project a owl:ObjectProperty ; rdfs:label "on_project" ; rdfs:range bbqs:Project ; owl:inverseOf bbqs:has_project_role ; skos:inScheme . +bbqs:orcid a owl:DatatypeProperty ; + rdfs:label "orcid" ; + rdfs:range xsd:anyURI ; + skos:definition "ORCID iD (orcid: prefix)." ; + skos:inScheme . + +bbqs:pmid a owl:DatatypeProperty ; + rdfs:label "pmid" ; + skos:inScheme . + +bbqs:ror_id a owl:DatatypeProperty ; + rdfs:label "ror_id" ; + rdfs:range xsd:anyURI ; + skos:inScheme . + bbqs:studies_species a owl:ObjectProperty ; rdfs:label "studies_species" ; rdfs:range bbqs:Species ; @@ -2172,35 +2156,35 @@ bbqs:BehavioralConstruct a owl:Class ; bbqs:Dataset a owl:Class ; rdfs:label "Dataset" ; rdfs:subClassOf [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; + owl:minCardinality 0 ; owl:onProperty bbqs:access ], [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; + owl:maxCardinality 1 ; + owl:onProperty bbqs:access ], + [ a owl:Restriction ; + owl:minCardinality 0 ; owl:onProperty bbqs:license ], [ a owl:Restriction ; - owl:allValuesFrom bbqs:Device ; + owl:minCardinality 0 ; owl:onProperty bbqs:measurement_technique ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:license ], + owl:allValuesFrom bbqs:Device ; + owl:onProperty bbqs:measurement_technique ], [ a owl:Restriction ; owl:allValuesFrom bbqs:Species ; owl:onProperty bbqs:dataset_species ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:measurement_technique ], - [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom xsd:string ; owl:onProperty bbqs:license ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:access ], + owl:onProperty bbqs:dataset_species ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:access ], + owl:onProperty bbqs:license ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:dataset_species ], + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:access ], bbqs:CreativeWork, bbqs:Entity ; skos:definition "A released dataset. Distinct from a project's Marr-layer ExperimentalData." ; @@ -2213,95 +2197,141 @@ bbqs:Device a owl:Class ; rdfs:label "Device" ; rdfs:subClassOf [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:device_category ], + owl:onProperty bbqs:output_signals ], [ a owl:Restriction ; owl:allValuesFrom xsd:anyURI ; owl:onProperty bbqs:manual_urls ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty bbqs:price_tier ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:model_name ], + owl:onProperty bbqs:regulatory_class ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:product_url ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:output_signals ], + owl:onProperty bbqs:model_name ], [ a owl:Restriction ; - owl:allValuesFrom bbqs:DeviceManufacturer ; - owl:onProperty bbqs:manufacturer ], + owl:minCardinality 0 ; + owl:onProperty bbqs:model_name ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:sdk_urls ], + owl:onProperty bbqs:manual_urls ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:allValuesFrom bbqs:DeviceManufacturer ; owl:onProperty bbqs:manufacturer ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:device_category ], + owl:onProperty bbqs:regulatory_class ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:regulatory_class ], + owl:onProperty bbqs:manufacturer ], [ a owl:Restriction ; - owl:allValuesFrom xsd:anyURI ; - owl:onProperty bbqs:product_url ], + owl:maxCardinality 1 ; + owl:onProperty bbqs:sampling_rate_hz ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:regulatory_class ], + owl:allValuesFrom bbqs:DeviceCategory ; + owl:onProperty bbqs:device_category ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:price_tier ], [ a owl:Restriction ; owl:allValuesFrom xsd:float ; owl:onProperty bbqs:sampling_rate_hz ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:anyURI ; - owl:onProperty bbqs:sdk_urls ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:manual_urls ], + owl:onProperty bbqs:regulatory_class ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:price_tier ], + owl:onProperty bbqs:device_category ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:product_url ], + owl:onProperty bbqs:sampling_rate_hz ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom xsd:string ; owl:onProperty bbqs:output_signals ], [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:aliases ], + owl:maxCardinality 1 ; + owl:onProperty bbqs:device_category ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:price_tier ], + owl:onProperty bbqs:model_name ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:aliases ], + owl:onProperty bbqs:sdk_urls ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:anyURI ; + owl:onProperty bbqs:product_url ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:aliases ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:manufacturer ], + [ a owl:Restriction ; + owl:minCardinality 0 ; owl:onProperty bbqs:price_tier ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:anyURI ; + owl:onProperty bbqs:sdk_urls ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty bbqs:product_url ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:manufacturer ], + owl:onProperty bbqs:aliases ], + bbqs:Entity, + bbqs:Product ; + skos:definition "A physical instrument model used in BBQS data collection (device_models). Its kind is a DeviceCategory (the ~32 canonical categories), NOT a subclass tree. NB: device_models needs resource_id backfill to enter the spine." ; + skos:exactMatch ; + skos:inScheme . + +bbqs:DeviceCategory a owl:Class ; + rdfs:label "DeviceCategory" ; + rdfs:subClassOf [ a owl:Restriction ; + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:category_key ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:model_name ], + owl:onProperty bbqs:label ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:typical_use_cases ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:schema_org_type ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:label ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:sampling_rate_hz ], + owl:onProperty bbqs:category_key ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:model_name ], + owl:onProperty bbqs:category_key ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:sampling_rate_hz ], + owl:minCardinality 0 ; + owl:onProperty bbqs:typical_use_cases ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:regulatory_class ], + owl:onProperty bbqs:measures ], [ a owl:Restriction ; - owl:allValuesFrom bbqs:DeviceCategory ; - owl:onProperty bbqs:device_category ], - bbqs:Entity, - bbqs:Product ; - skos:definition "A physical instrument model used in BBQS data collection (device_models). Its kind is a DeviceCategory (the ~32 canonical categories), NOT a subclass tree. NB: device_models needs resource_id backfill to enter the spine." ; - skos:exactMatch ; + owl:maxCardinality 1 ; + owl:onProperty bbqs:schema_org_type ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:measures ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty bbqs:label ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:schema_org_type ], + bbqs:Entity ; + skos:definition "One of the ~32 canonical BBQS device categories (device_categories: key/label/measures[]/typical_use_cases[]). A SKOS concept scheme; each maps to a schema.org type and (via device_class_crosswalk) to external classes." ; + skos:exactMatch skos:Concept ; skos:inScheme . bbqs:Organization a owl:Class ; @@ -2313,175 +2343,182 @@ bbqs:Organization a owl:Class ; bbqs:Project a owl:Class ; rdfs:label "Project" ; rdfs:subClassOf [ a owl:Restriction ; - owl:allValuesFrom bbqs:Entity ; - owl:onProperty bbqs:produced ], - [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:has_project_role ], + owl:onProperty bbqs:reporter_project_num ], [ a owl:Restriction ; - owl:allValuesFrom xsd:float ; - owl:onProperty bbqs:metadata_completeness ], + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:mechanism ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:keywords ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:has_model ], + owl:onProperty bbqs:mechanism ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:study_scope ], + owl:onProperty bbqs:keywords ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:studies_species ], + owl:onProperty bbqs:award_amount ], [ a owl:Restriction ; - owl:allValuesFrom bbqs:MarrModel ; + owl:minCardinality 0 ; owl:onProperty bbqs:has_model ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:anyURI ; - owl:onProperty bbqs:nih_link ], [ a owl:Restriction ; owl:maxCardinality 1 ; + owl:onProperty bbqs:metadata_completeness ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:title ], + [ a owl:Restriction ; + owl:minCardinality 0 ; owl:onProperty bbqs:website ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:reporter_project_num ], + owl:onProperty bbqs:mechanism ], [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:keywords ], + owl:maxCardinality 1 ; + owl:onProperty bbqs:funder ], [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:reporter_project_num ], + owl:allValuesFrom bbqs:ProjectRole ; + owl:onProperty bbqs:has_project_role ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:onboarding_status ], - [ a owl:Restriction ; - owl:allValuesFrom bbqs:Species ; - owl:onProperty bbqs:studies_species ], + owl:onProperty bbqs:study_scope ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:onboarding_status ], + owl:onProperty bbqs:website ], [ a owl:Restriction ; owl:minCardinality 0 ; + owl:onProperty bbqs:metadata_completeness ], + [ a owl:Restriction ; + owl:allValuesFrom bbqs:MarrModel ; owl:onProperty bbqs:has_model ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:fiscal_year ], + owl:onProperty bbqs:funded_datasets ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty bbqs:reporter_project_num ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:study_scope ], + owl:onProperty bbqs:keywords ], [ a owl:Restriction ; - owl:allValuesFrom bbqs:FundingAgency ; - owl:onProperty bbqs:funder ], + owl:minCardinality 0 ; + owl:onProperty bbqs:onboarding_status ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:mechanism ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:title ], + owl:onProperty bbqs:grant_number ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:grant_number ], + owl:onProperty bbqs:nih_link ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom xsd:float ; owl:onProperty bbqs:metadata_completeness ], [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:studies_species_name ], + owl:maxCardinality 1 ; + owl:onProperty bbqs:grant_number ], [ a owl:Restriction ; - owl:allValuesFrom xsd:boolean ; + owl:allValuesFrom bbqs:DeviceCategory ; + owl:onProperty bbqs:uses_device_category ], + [ a owl:Restriction ; + owl:minCardinality 0 ; owl:onProperty bbqs:studies_human ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:grant_number ], + owl:onProperty bbqs:studies_species ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:abstract ], + owl:allValuesFrom xsd:anyURI ; + owl:onProperty bbqs:nih_link ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:mechanism ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:float ; - owl:onProperty bbqs:award_amount ], + owl:onProperty bbqs:fiscal_year ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:funder ], + owl:maxCardinality 1 ; + owl:onProperty bbqs:studies_human ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:award_amount ], + owl:onProperty bbqs:onboarding_status ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:nih_link ], + owl:onProperty bbqs:abstract ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:funded_datasets ], + owl:onProperty bbqs:funder ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:mechanism ], + owl:onProperty bbqs:grant_number ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:abstract ], + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:onboarding_status ], [ a owl:Restriction ; - owl:allValuesFrom xsd:integer ; + owl:minCardinality 0 ; owl:onProperty bbqs:fiscal_year ], [ a owl:Restriction ; owl:allValuesFrom bbqs:Dandiset ; owl:onProperty bbqs:funded_datasets ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:fiscal_year ], + owl:allValuesFrom xsd:boolean ; + owl:onProperty bbqs:studies_human ], [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:onboarding_status ], + owl:minCardinality 0 ; + owl:onProperty bbqs:uses_device_category ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:title ], + owl:onProperty bbqs:has_model ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:studies_human ], + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:reporter_project_num ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:studies_human ], + owl:allValuesFrom bbqs:FundingAgency ; + owl:onProperty bbqs:funder ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:grant_number ], + owl:onProperty bbqs:study_scope ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:integer ; + owl:onProperty bbqs:fiscal_year ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:reporter_project_num ], + owl:onProperty bbqs:studies_species_unresolved ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:nih_link ], + owl:minCardinality 0 ; + owl:onProperty bbqs:title ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:funder ], + owl:onProperty bbqs:award_amount ], [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; + owl:allValuesFrom bbqs:Species ; + owl:onProperty bbqs:studies_species ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; owl:onProperty bbqs:abstract ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:produced ], + owl:onProperty bbqs:nih_link ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:metadata_completeness ], + owl:onProperty bbqs:title ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:website ], + owl:allValuesFrom xsd:float ; + owl:onProperty bbqs:award_amount ], [ a owl:Restriction ; - owl:allValuesFrom bbqs:ProjectRole ; - owl:onProperty bbqs:has_project_role ], + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:abstract ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:title ], + owl:onProperty bbqs:studies_species_unresolved ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:produced ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:studies_species_name ], + owl:onProperty bbqs:has_project_role ], + [ a owl:Restriction ; + owl:allValuesFrom bbqs:Entity ; + owl:onProperty bbqs:produced ], [ a owl:Restriction ; owl:allValuesFrom xsd:anyURI ; owl:onProperty bbqs:website ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:award_amount ], bbqs:Entity, bbqs:ProjectAnchor ; + owl:hasKey ( bbqs:grant_number ) ; skos:definition "A BBQS project — the funded scientific work and its NIH award as one node, keyed by grant_number. The Marr/causal model plugs in via has_model." ; skos:exactMatch ; skos:inScheme ; @@ -2499,12 +2536,6 @@ bbqs:RoleSourceEnum a owl:Class ; bbqs:WorkingGroup a owl:Class ; rdfs:label "WorkingGroup" ; rdfs:subClassOf [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:dashboard_widgets ], - [ a owl:Restriction ; - owl:allValuesFrom bbqs:Investigator ; - owl:onProperty bbqs:members ], - [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty bbqs:dashboard_widgets ], [ a owl:Restriction ; @@ -2513,6 +2544,12 @@ bbqs:WorkingGroup a owl:Class ; [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty bbqs:members ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:dashboard_widgets ], + [ a owl:Restriction ; + owl:allValuesFrom bbqs:Investigator ; + owl:onProperty bbqs:members ], bbqs:Entity ; skos:definition "A BBQS working group. Currently stored as a controlled tag on investigators.working_groups[] + canonical_working_group(); promoted here to a first-class node. Membership is the inverse of Investigator.member_of_group." ; skos:exactMatch ; @@ -2521,47 +2558,35 @@ bbqs:WorkingGroup a owl:Class ; bbqs:Species a owl:Class ; rdfs:label "Species" ; rdfs:subClassOf [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:aliases ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:taxonomy_family ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:allValuesFrom xsd:string ; owl:onProperty bbqs:common_name ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty bbqs:taxonomy_order ], [ a owl:Restriction ; - owl:allValuesFrom xsd:anyURI ; - owl:onProperty bbqs:ncbi_taxon_id ], + owl:minCardinality 0 ; + owl:onProperty bbqs:taxonomy_family ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty bbqs:taxonomy_class ], [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:aliases ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:ncbi_taxon_id ], + owl:minCardinality 0 ; + owl:onProperty bbqs:common_name ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty bbqs:taxonomy_order ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:taxonomy_genus ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:taxonomy_class ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; owl:onProperty bbqs:taxonomy_genus ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:taxonomy_family ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; owl:onProperty bbqs:taxonomy_order ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:taxonomy_class ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty bbqs:common_name ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty bbqs:taxonomy_family ], @@ -2569,17 +2594,29 @@ bbqs:Species a owl:Class ; owl:allValuesFrom xsd:string ; owl:onProperty bbqs:taxonomy_class ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:common_name ], + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:taxonomy_genus ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty bbqs:ncbi_taxon_id ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:common_name ], + owl:onProperty bbqs:taxonomy_family ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:maxCardinality 1 ; owl:onProperty bbqs:taxonomy_genus ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty bbqs:ncbi_taxon_id ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:anyURI ; + owl:onProperty bbqs:ncbi_taxon_id ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:aliases ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:aliases ], bbqs:Entity, bbqs:Taxon ; skos:definition "A species studied in a BBQS project. Align identifiers to NCBITaxon." ; @@ -2616,6 +2653,7 @@ bbqs:license a owl:DatatypeProperty ; bbqs:posted_by a owl:ObjectProperty ; rdfs:label "posted_by" ; rdfs:range bbqs:Investigator ; + skos:definition "Who posted it, as a link to their Investigator node (for a job: the public_job_posters view, 20261117170000). Never the poster's auth user id (jobs.posted_by) or email." ; skos:inScheme . bbqs:version a owl:DatatypeProperty ; @@ -2647,110 +2685,113 @@ bbqs:Thing a owl:Class ; bbqs:Investigator a owl:Class ; rdfs:label "Investigator" ; rdfs:subClassOf [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:secondary_emails ], + owl:allValuesFrom bbqs:ProjectRole ; + owl:onProperty bbqs:held_project_roles ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:consortium_role ], + owl:allValuesFrom xsd:integer ; + owl:onProperty bbqs:reporter_profile_id ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:orcid ], + owl:onProperty bbqs:scholar_id ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:institution ], + owl:minCardinality 0 ; + owl:onProperty bbqs:member_of_group ], [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:skills ], + owl:allValuesFrom xsd:anyURI ; + owl:onProperty bbqs:orcid ], [ a owl:Restriction ; - owl:allValuesFrom xsd:integer ; + owl:allValuesFrom bbqs:WorkingGroup ; + owl:onProperty bbqs:member_of_group ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; owl:onProperty bbqs:reporter_profile_id ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:member_of_group ], + owl:onProperty bbqs:skills ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:held_project_roles ], - [ a owl:Restriction ; - owl:allValuesFrom bbqs:ProjectRole ; - owl:onProperty bbqs:held_project_roles ], + owl:onProperty bbqs:scholar_id ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:requested_groups ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:anyURI ; - owl:onProperty bbqs:orcid ], + owl:onProperty bbqs:research_areas ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; owl:onProperty bbqs:email ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:scholar_id ], + owl:onProperty bbqs:reporter_profile_id ], [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; + owl:maxCardinality 1 ; owl:onProperty bbqs:institution ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:research_areas ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:scholar_id ], + owl:onProperty bbqs:held_project_roles ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty bbqs:institution ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:orcid ], + owl:onProperty bbqs:consortium_role ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty bbqs:consortium_role ], [ a owl:Restriction ; owl:minCardinality 0 ; + owl:onProperty bbqs:secondary_emails ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:string ; owl:onProperty bbqs:skills ], [ a owl:Restriction ; - owl:allValuesFrom bbqs:WorkingGroup ; - owl:onProperty bbqs:member_of_group ], + owl:maxCardinality 1 ; + owl:onProperty bbqs:orcid ], [ a owl:Restriction ; owl:allValuesFrom bbqs:WorkingGroup ; owl:onProperty bbqs:requested_groups ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty bbqs:requested_groups ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:consortium_role ], + owl:onProperty bbqs:secondary_emails ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:email ], + owl:onProperty bbqs:orcid ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:research_areas ], + owl:onProperty bbqs:institution ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:secondary_emails ], + owl:onProperty bbqs:scholar_id ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom xsd:string ; owl:onProperty bbqs:consortium_role ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:reporter_profile_id ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:reporter_profile_id ], + owl:onProperty bbqs:email ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:scholar_id ], + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:research_areas ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:minCardinality 0 ; owl:onProperty bbqs:email ], bbqs:Entity, bbqs:Person ; + owl:hasKey ( bbqs:orcid ), + ( bbqs:email ) ; skos:definition "A consortium member. May be a PI, co-I, trainee, collaborator, or a member who is on NO project (III. Live State — membership is not project-derived). Per-project role lives on the ProjectRole edge, NOT here (issue #283)." ; skos:exactMatch ; skos:inScheme . bbqs:ProjectRoleEnum a owl:Class ; rdfs:label "project_role_enum" ; - owl:unionOf ( ) ; - skos:definition "Every token normalize_grant_role (20260811120000_canonical_role_vocabulary.sql) can store in grant_investigators.role, plus trainee, which it deliberately passes through unmapped. tests/guards/role-vocabulary-parity holds the two equal. NB: the separator is inconsistent -- co-investigator is hyphenated while co_pi/contact_pi use underscores -- and PI is upper case." ; + owl:unionOf ( ) ; + skos:definition "Every token normalize_grant_role (20260811120000_canonical_role_vocabulary.sql, with collaborator since 20261118140000) can store in grant_investigators.role, plus trainee, which it deliberately passes through unmapped. tests/guards/kg-role-vocabulary-parity holds the two equal, and tests/guards/role-ui-vocabulary holds every role menu to the function. NB: the separator is inconsistent -- co-investigator is hyphenated while co_pi/contact_pi use underscores -- and PI is upper case." ; skos:inScheme ; linkml:permissible_values , , , , + , , , , @@ -2792,108 +2833,108 @@ bbqs:ResourceTypeEnum a owl:Class ; bbqs:Entity a owl:Class ; rdfs:label "Entity" ; rdfs:subClassOf [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:metadata ], + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:name ], [ a owl:Restriction ; - owl:allValuesFrom bbqs:ResearchOrganization ; - owl:onProperty bbqs:part_of_org ], + owl:allValuesFrom xsd:string ; + owl:onProperty bbqs:metadata ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:minCardinality 0 ; owl:onProperty bbqs:resource_type ], [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:metadata ], + owl:allValuesFrom xsd:dateTime ; + owl:onProperty bbqs:created_at ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:allValuesFrom xsd:dateTime ; + owl:onProperty bbqs:updated_at ], + [ a owl:Restriction ; + owl:minCardinality 0 ; owl:onProperty bbqs:was_attributed_to ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty bbqs:updated_at ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:created_at ], + owl:minCardinality 0 ; + owl:onProperty bbqs:updated_at ], [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty bbqs:id ], + owl:maxCardinality 1 ; + owl:onProperty bbqs:part_of_org ], + [ owl:unionOf ( bbqs:Algorithm bbqs:Announcement bbqs:Consortium bbqs:Dataset bbqs:Device bbqs:DeviceCategory bbqs:DeviceManufacturer bbqs:Event bbqs:ExperimentalData bbqs:FundingAgency bbqs:FundingOpportunity bbqs:Investigator bbqs:Job bbqs:MLModel bbqs:MarrModel bbqs:Project bbqs:Protocol bbqs:Publication bbqs:ResearchOrganization bbqs:SoftwareTool bbqs:Species bbqs:Standard bbqs:Tool bbqs:WorkingGroup ) ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:resource_type ], + owl:onProperty bbqs:metadata ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty bbqs:was_attributed_to ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; owl:onProperty bbqs:description ], [ a owl:Restriction ; - owl:allValuesFrom bbqs:ProvenanceRecord ; - owl:onProperty bbqs:was_generated_by ], + owl:allValuesFrom bbqs:ResearchOrganization ; + owl:onProperty bbqs:part_of_org ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:was_generated_by ], + owl:maxCardinality 1 ; + owl:onProperty bbqs:external_url ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:created_at ], + owl:allValuesFrom bbqs:Agent ; + owl:onProperty bbqs:was_attributed_to ], [ a owl:Restriction ; - owl:allValuesFrom xsd:dateTime ; - owl:onProperty bbqs:updated_at ], + owl:maxCardinality 1 ; + owl:onProperty bbqs:metadata ], [ a owl:Restriction ; - owl:allValuesFrom xsd:anyURI ; + owl:minCardinality 1 ; owl:onProperty bbqs:id ], [ a owl:Restriction ; owl:allValuesFrom bbqs:ResourceTypeEnum ; owl:onProperty bbqs:resource_type ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:part_of_org ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:metadata ], + owl:onProperty bbqs:dc_source ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:name ], + owl:onProperty bbqs:part_of_org ], [ a owl:Restriction ; - owl:allValuesFrom bbqs:Agent ; - owl:onProperty bbqs:was_attributed_to ], + owl:allValuesFrom bbqs:ProvenanceRecord ; + owl:onProperty bbqs:was_generated_by ], [ a owl:Restriction ; - owl:allValuesFrom xsd:dateTime ; - owl:onProperty bbqs:created_at ], + owl:maxCardinality 1 ; + owl:onProperty bbqs:id ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:external_url ], + owl:onProperty bbqs:description ], [ a owl:Restriction ; - owl:allValuesFrom xsd:anyURI ; - owl:onProperty bbqs:dc_source ], + owl:minCardinality 0 ; + owl:onProperty bbqs:external_url ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:id ], + owl:onProperty bbqs:resource_type ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty bbqs:name ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:was_attributed_to ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:description ], + owl:onProperty bbqs:name ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty bbqs:description ], + owl:onProperty bbqs:created_at ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty bbqs:external_url ], + owl:allValuesFrom xsd:anyURI ; + owl:onProperty bbqs:dc_source ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:dc_source ], - [ owl:unionOf ( bbqs:Algorithm bbqs:Announcement bbqs:Consortium bbqs:Dataset bbqs:Device bbqs:DeviceCategory bbqs:DeviceManufacturer bbqs:Event bbqs:ExperimentalData bbqs:FundingAgency bbqs:FundingOpportunity bbqs:Investigator bbqs:Job bbqs:MLModel bbqs:MarrModel bbqs:Project bbqs:Protocol bbqs:Publication bbqs:ResearchOrganization bbqs:SoftwareTool bbqs:Species bbqs:Standard bbqs:Tool bbqs:WorkingGroup ) ], + owl:onProperty bbqs:created_at ], [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty bbqs:name ], + owl:allValuesFrom xsd:anyURI ; + owl:onProperty bbqs:external_url ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty bbqs:part_of_org ], + owl:minCardinality 0 ; + owl:onProperty bbqs:description ], [ a owl:Restriction ; owl:allValuesFrom xsd:anyURI ; - owl:onProperty bbqs:external_url ], + owl:onProperty bbqs:id ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty bbqs:updated_at ] ; + owl:onProperty bbqs:was_generated_by ] ; skos:definition "Anything with a row in the `resources` spine — the abstract base of every first-class BBQS node. IRI = resources.id; class = resources.resource_type." ; skos:exactMatch ; skos:inScheme . diff --git a/kg/bbqs.shapes.gen.ttl b/kg/bbqs.shapes.gen.ttl index 023d28ba..5ea381b1 100644 --- a/kg/bbqs.shapes.gen.ttl +++ b/kg/bbqs.shapes.gen.ttl @@ -16,111 +16,116 @@ dcterms:Standard a sh:NodeShape ; sh:nodeKind sh:Literal ; sh:order 7 ; sh:path ], - [ sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 2 ; - sh:path ], - [ sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 1 ; - sh:path ], [ sh:datatype xsd:string ; - sh:description "resources.metadata JSON overflow — un-promoted fields." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 11 ; - sh:path bbqs:metadata ], - [ sh:datatype xsd:string ; + sh:order 6 ; + sh:path ], + [ sh:description "resources.external_url — canonical off-graph URL." ; sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 3 ; - sh:path ], + sh:nodeKind sh:IRI ; + sh:order 8 ; + sh:path ], + [ sh:description "The node IRI — minted from resources.id." ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 5 ; + sh:path ], + [ sh:class ; + sh:description "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 10 ; + sh:path ], [ sh:description "The rdf:type discriminator, from resources.resource_type." ; sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; sh:maxCount 1 ; sh:order 9 ; sh:path bbqs:resourceType ], - [ sh:description "The node IRI — minted from resources.id." ; + [ sh:datatype xsd:string ; + sh:description "resources.metadata JSON overflow — un-promoted fields." ; sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 11 ; + sh:path bbqs:metadata ], + [ sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 5 ; - sh:path ], + sh:order 2 ; + sh:path ], [ sh:class prov:Agent ; sh:maxCount 1 ; sh:nodeKind sh:BlankNodeOrIRI ; sh:order 15 ; sh:path prov:wasAttributedTo ], - [ sh:datatype xsd:dateTime ; + [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 13 ; - sh:path ], - [ sh:class ; - sh:description "resources.organization_id." ; - sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 10 ; - sh:path ], - [ sh:nodeKind sh:IRI ; - sh:order 16 ; - sh:path dcterms:source ], - [ sh:description "resources.external_url — canonical off-graph URL." ; + sh:order 4 ; + sh:path ], + [ sh:datatype xsd:string ; sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 8 ; - sh:path ], + sh:nodeKind sh:Literal ; + sh:order 3 ; + sh:path ], [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 12 ; sh:path ], + [ sh:class prov:Activity ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 14 ; + sh:path prov:wasGeneratedBy ], [ sh:datatype xsd:string ; sh:description "Award number(s) behind this resource: a dandiset's grants, a standard's funding award." ; sh:nodeKind sh:Literal ; sh:order 0 ; sh:path bbqs:award_numbers ], - [ sh:datatype xsd:string ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path ], - [ sh:datatype xsd:string ; + [ sh:nodeKind sh:IRI ; + sh:order 16 ; + sh:path dcterms:source ], + [ sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 1 ; + sh:path ], + [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 4 ; - sh:path ], - [ sh:class prov:Activity ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 14 ; - sh:path prov:wasGeneratedBy ] ; + sh:order 13 ; + sh:path ] ; sh:targetClass dcterms:Standard . a sh:NodeShape ; rdfs:comment "A consortium news post or announcement. `news`, funding blurbs, etc." ; sh:closed true ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:datatype xsd:string ; + sh:property [ sh:datatype xsd:boolean ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 7 ; - sh:path ], - [ sh:description "resources.external_url — canonical off-graph URL." ; + sh:order 3 ; + sh:path bbqs:is_external_link ], + [ sh:datatype xsd:string ; + sh:description "resources.metadata JSON overflow — un-promoted fields." ; sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 11 ; + sh:path bbqs:metadata ], + [ sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 8 ; + sh:order 1 ; sh:path ], - [ sh:description "The node IRI — minted from resources.id." ; + [ sh:datatype xsd:string ; sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 5 ; - sh:path ], - [ sh:datatype xsd:boolean ; + sh:nodeKind sh:Literal ; + sh:order 6 ; + sh:path ], + [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 3 ; - sh:path bbqs:is_external_link ], + sh:order 12 ; + sh:path ], [ sh:class ; - sh:description "resources.organization_id." ; + sh:description "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; sh:order 10 ; @@ -130,59 +135,55 @@ dcterms:Standard a sh:NodeShape ; sh:nodeKind sh:Literal ; sh:order 0 ; sh:path ], + [ sh:nodeKind sh:IRI ; + sh:order 16 ; + sh:path dcterms:source ], + [ sh:description "resources.external_url — canonical off-graph URL." ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 8 ; + sh:path ], + [ sh:class prov:Activity ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 14 ; + sh:path prov:wasGeneratedBy ], + [ sh:class ; + sh:description "Who posted it, as a link to their Investigator node (for a job: the public_job_posters view, 20261117170000). Never the poster's auth user id (jobs.posted_by) or email." ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 4 ; + sh:path ], [ sh:datatype xsd:string ; sh:description "Display text for `link`, when the announcement points off-site." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 2 ; sh:path bbqs:link_text ], - [ sh:datatype xsd:dateTime ; + [ sh:description "The node IRI — minted from resources.id." ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 5 ; + sh:path ], + [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 13 ; - sh:path ], + sh:order 7 ; + sh:path ], [ sh:description "The rdf:type discriminator, from resources.resource_type." ; sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; sh:maxCount 1 ; sh:order 9 ; sh:path bbqs:resourceType ], - [ sh:nodeKind sh:IRI ; - sh:order 16 ; - sh:path dcterms:source ], - [ sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 1 ; - sh:path ], [ sh:class prov:Agent ; sh:maxCount 1 ; sh:nodeKind sh:BlankNodeOrIRI ; sh:order 15 ; sh:path prov:wasAttributedTo ], - [ sh:class prov:Activity ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 14 ; - sh:path prov:wasGeneratedBy ], - [ sh:datatype xsd:string ; - sh:description "resources.metadata JSON overflow — un-promoted fields." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 11 ; - sh:path bbqs:metadata ], - [ sh:datatype xsd:string ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path ], [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 12 ; - sh:path ], - [ sh:class ; - sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 4 ; - sh:path ] ; + sh:order 13 ; + sh:path ] ; sh:targetClass . a sh:NodeShape ; @@ -198,270 +199,270 @@ dcterms:Standard a sh:NodeShape ; sh:property [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 10 ; + sh:order 23 ; sh:path ], - [ sh:datatype xsd:string ; + [ sh:description "resources.external_url — canonical off-graph URL." ; sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 2 ; - sh:path ], + sh:nodeKind sh:IRI ; + sh:order 4 ; + sh:path ], + [ sh:class prov:Activity ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 11 ; + sh:path prov:wasGeneratedBy ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 3 ; sh:path ], [ sh:datatype xsd:string ; + sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 2 ; - sh:path bbqs:eligible_activity_codes ], - [ sh:datatype xsd:date ; + sh:path ], + [ sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 14 ; + sh:path ], + [ sh:nodeKind sh:IRI ; + sh:order 26 ; + sh:path dcterms:source ], + [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 9 ; - sh:path bbqs:expiration_date ], + sh:order 10 ; + sh:path ], [ sh:datatype xsd:string ; - sh:description "resources.metadata JSON overflow — un-promoted fields." ; + sh:description "JSON of application due dates." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 21 ; - sh:path bbqs:metadata ], + sh:order 6 ; + sh:path bbqs:due_dates ], [ sh:datatype xsd:string ; - sh:description "funding_opportunities.announcement_type — the notice type (e.g. NOFO, RFA, PA), not a category of the Announcement class." ; + sh:description "Current lifecycle status of the funding opportunity (e.g. open, closed, forecasted)." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 3 ; - sh:path bbqs:opportunity_type ], - [ sh:description "resources.external_url — canonical off-graph URL." ; + sh:order 13 ; + sh:path bbqs:status ], + [ sh:datatype xsd:date ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 8 ; + sh:path bbqs:posted_date ], + [ sh:class ; + sh:description "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 5 ; - sh:path ], + sh:order 6 ; + sh:path ], + [ sh:class prov:Agent ; + sh:maxCount 1 ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 12 ; + sh:path prov:wasAttributedTo ], [ sh:nodeKind sh:IRI ; sh:order 12 ; sh:path dcterms:source ], - [ sh:class prov:Activity ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 11 ; - sh:path prov:wasGeneratedBy ], - [ sh:class skos:Concept ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 1 ; - sh:path bbqs:measuresConstruct ], - [ sh:description "The rdf:type discriminator, from resources.resource_type." ; - sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; + [ sh:datatype xsd:string ; + sh:nodeKind sh:Literal ; + sh:order 2 ; + sh:path bbqs:eligible_activity_codes ], + [ sh:datatype xsd:string ; sh:maxCount 1 ; - sh:order 6 ; - sh:path bbqs:resourceType ], + sh:nodeKind sh:Literal ; + sh:order 17 ; + sh:path ], [ sh:class prov:Agent ; sh:maxCount 1 ; sh:nodeKind sh:BlankNodeOrIRI ; sh:order 25 ; sh:path prov:wasAttributedTo ], - [ sh:datatype xsd:float ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path bbqs:budget_ceiling ], - [ sh:datatype xsd:float ; + [ sh:class prov:Activity ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 24 ; + sh:path prov:wasGeneratedBy ], + [ sh:description "resources.external_url — canonical off-graph URL." ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 5 ; + sh:path ], + [ sh:datatype xsd:string ; + sh:description "resources.metadata JSON overflow — un-promoted fields." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 4 ; - sh:path bbqs:budget_floor ], + sh:order 8 ; + sh:path bbqs:metadata ], [ sh:datatype xsd:string ; + sh:description "funding_opportunities.announcement_type — the notice type (e.g. NOFO, RFA, PA), not a category of the Announcement class." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 3 ; - sh:path ], - [ sh:description "The node IRI — minted from resources.id." ; - sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 1 ; - sh:path ], - [ sh:nodeKind sh:IRI ; - sh:order 26 ; - sh:path dcterms:source ], - [ sh:class ; - sh:description "resources.organization_id." ; - sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 7 ; - sh:path ], + sh:path bbqs:opportunity_type ], [ sh:datatype xsd:date ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 8 ; - sh:path bbqs:posted_date ], - [ sh:class prov:Agent ; + sh:order 9 ; + sh:path bbqs:expiration_date ], + [ sh:datatype xsd:string ; sh:maxCount 1 ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 11 ; - sh:path prov:wasAttributedTo ], + sh:nodeKind sh:Literal ; + sh:order 3 ; + sh:path ], [ sh:datatype xsd:string ; + sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 10 ; - sh:path bbqs:participating_orgs ], + sh:order 16 ; + sh:path ], [ sh:description "The node IRI — minted from resources.id." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 2 ; + sh:order 1 ; sh:path ], [ sh:nodeKind sh:IRI ; sh:order 13 ; sh:path dcterms:source ], - [ sh:datatype xsd:dateTime ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 22 ; - sh:path ], - [ sh:datatype xsd:dateTime ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 9 ; - sh:path ], [ sh:description "The node IRI — minted from resources.id." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 15 ; + sh:order 2 ; sh:path ], - [ sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 14 ; - sh:path ], - [ sh:datatype xsd:string ; - sh:nodeKind sh:Literal ; - sh:order 12 ; - sh:path bbqs:relevance_tags ], [ sh:class ; - sh:description "resources.organization_id." ; + sh:description "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; sh:order 20 ; sh:path ], - [ sh:datatype xsd:string ; + [ sh:description "The rdf:type discriminator, from resources.resource_type." ; + sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 17 ; - sh:path ], - [ sh:datatype xsd:string ; - sh:description "Current lifecycle status of the funding opportunity (e.g. open, closed, forecasted)." ; + sh:order 19 ; + sh:path bbqs:resourceType ], + [ sh:datatype xsd:date ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 13 ; - sh:path bbqs:status ], - [ sh:datatype xsd:dateTime ; + sh:order 7 ; + sh:path bbqs:open_date ], + [ sh:datatype xsd:string ; + sh:description "NIH activity code for the funding opportunity (e.g. R01, U01)." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 9 ; - sh:path ], + sh:order 1 ; + sh:path bbqs:activity_code ], + [ sh:class ; + sh:nodeKind sh:IRI ; + sh:order 0 ; + sh:path ], [ sh:description "The rdf:type discriminator, from resources.resource_type." ; sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; sh:maxCount 1 ; - sh:order 19 ; + sh:order 5 ; sh:path bbqs:resourceType ], [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 23 ; + sh:order 9 ; sh:path ], + [ sh:datatype xsd:string ; + sh:nodeKind sh:Literal ; + sh:order 10 ; + sh:path bbqs:participating_orgs ], [ sh:datatype xsd:string ; sh:description "resources.metadata JSON overflow — un-promoted fields." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 7 ; + sh:order 21 ; sh:path bbqs:metadata ], - [ sh:datatype xsd:date ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 7 ; - sh:path bbqs:open_date ], - [ sh:class prov:Activity ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 24 ; - sh:path prov:wasGeneratedBy ], - [ sh:class ; + [ sh:class ; + sh:description "study_species[] names → Species nodes (resolved)." ; sh:nodeKind sh:IRI ; sh:order 0 ; - sh:path ], - [ sh:datatype xsd:string ; - sh:description "Funding Opportunity Number." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path ], - [ sh:class prov:Activity ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 10 ; - sh:path prov:wasGeneratedBy ], + sh:path ], [ sh:class ; - sh:description "resources.organization_id." ; + sh:description "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 6 ; + sh:order 7 ; sh:path ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 4 ; sh:path ], - [ sh:datatype xsd:string ; - sh:description "JSON of application due dates." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path bbqs:due_dates ], - [ sh:datatype xsd:string ; - sh:description "NIH activity code for the funding opportunity (e.g. R01, U01)." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 1 ; - sh:path bbqs:activity_code ], - [ sh:datatype xsd:string ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 16 ; - sh:path ], [ sh:class prov:Agent ; sh:maxCount 1 ; sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 12 ; + sh:order 11 ; sh:path prov:wasAttributedTo ], [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 8 ; + sh:order 22 ; + sh:path ], + [ sh:datatype xsd:dateTime ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 9 ; sh:path ], + [ sh:description "The rdf:type discriminator, from resources.resource_type." ; + sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; + sh:maxCount 1 ; + sh:order 6 ; + sh:path bbqs:resourceType ], [ sh:description "resources.external_url — canonical off-graph URL." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; sh:order 18 ; sh:path ], - [ sh:class ; - sh:description "study_species[] names → Species nodes (resolved)." ; + [ sh:class skos:Concept ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 1 ; + sh:path bbqs:measuresConstruct ], + [ sh:datatype xsd:dateTime ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 8 ; + sh:path ], + [ sh:description "The node IRI — minted from resources.id." ; + sh:maxCount 1 ; sh:nodeKind sh:IRI ; + sh:order 15 ; + sh:path ], + [ sh:datatype xsd:string ; + sh:description "Funding Opportunity Number." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; sh:order 0 ; - sh:path ], + sh:path ], [ sh:datatype xsd:string ; - sh:description "Free-text statement of the funding opportunity's purpose." ; + sh:description "resources.metadata JSON overflow — un-promoted fields." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 11 ; - sh:path bbqs:purpose ], - [ sh:description "The rdf:type discriminator, from resources.resource_type." ; - sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; + sh:order 7 ; + sh:path bbqs:metadata ], + [ sh:datatype xsd:float ; sh:maxCount 1 ; + sh:nodeKind sh:Literal ; sh:order 5 ; - sh:path bbqs:resourceType ], - [ sh:description "resources.external_url — canonical off-graph URL." ; + sh:path bbqs:budget_ceiling ], + [ sh:datatype xsd:string ; + sh:description "Free-text statement of the funding opportunity's purpose." ; sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 4 ; - sh:path ], + sh:nodeKind sh:Literal ; + sh:order 11 ; + sh:path bbqs:purpose ], [ sh:datatype xsd:string ; - sh:description "resources.metadata JSON overflow — un-promoted fields." ; + sh:nodeKind sh:Literal ; + sh:order 12 ; + sh:path bbqs:relevance_tags ], + [ sh:datatype xsd:float ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 8 ; - sh:path bbqs:metadata ] ; + sh:order 4 ; + sh:path bbqs:budget_floor ], + [ sh:class prov:Activity ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 10 ; + sh:path prov:wasGeneratedBy ] ; sh:targetClass . a sh:NodeShape ; @@ -470,66 +471,54 @@ dcterms:Standard a sh:NodeShape ; true ; sh:ignoredProperties ( rdf:type ), ( rdf:type ) ; - sh:property [ sh:class prov:Agent ; - sh:maxCount 1 ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 14 ; - sh:path prov:wasAttributedTo ], - [ sh:description "The rdf:type discriminator, from resources.resource_type." ; + sh:property [ sh:description "The rdf:type discriminator, from resources.resource_type." ; sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; sh:maxCount 1 ; sh:order 8 ; sh:path bbqs:resourceType ], - [ sh:datatype xsd:date ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 1 ; - sh:path ], - [ sh:datatype xsd:string ; - sh:description "Physical or virtual venue for the workshop/convening." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 2 ; - sh:path ], [ sh:class prov:Activity ; sh:nodeKind sh:BlankNodeOrIRI ; sh:order 13 ; sh:path prov:wasGeneratedBy ], - [ sh:class ; - sh:description "resources.organization_id." ; - sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 9 ; - sh:path ], - [ sh:datatype xsd:string ; - sh:description "resources.metadata JSON overflow — un-promoted fields." ; + [ sh:nodeKind sh:IRI ; + sh:order 15 ; + sh:path dcterms:source ], + [ sh:datatype xsd:date ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 10 ; - sh:path bbqs:metadata ], + sh:order 0 ; + sh:path ], [ sh:description "resources.external_url — canonical off-graph URL." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; sh:order 7 ; sh:path ], - [ sh:datatype xsd:string ; + [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path ], - [ sh:datatype xsd:date ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path ], + sh:order 12 ; + sh:path ], [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 11 ; sh:path ], - [ sh:nodeKind sh:IRI ; - sh:order 15 ; - sh:path dcterms:source ], + [ sh:datatype xsd:string ; + sh:description "resources.metadata JSON overflow — un-promoted fields." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 10 ; + sh:path bbqs:metadata ], + [ sh:class prov:Agent ; + sh:maxCount 1 ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 14 ; + sh:path prov:wasAttributedTo ], + [ sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 5 ; + sh:path ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; @@ -540,15 +529,27 @@ dcterms:Standard a sh:NodeShape ; sh:nodeKind sh:IRI ; sh:order 4 ; sh:path ], - [ sh:datatype xsd:dateTime ; + [ sh:datatype xsd:string ; + sh:description "Physical or virtual venue for the workshop/convening." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 12 ; - sh:path ], + sh:order 2 ; + sh:path ], + [ sh:class ; + sh:description "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 9 ; + sh:path ], [ sh:class ; sh:nodeKind sh:IRI ; sh:order 3 ; - sh:path ] ; + sh:path ], + [ sh:datatype xsd:date ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 1 ; + sh:path ] ; sh:targetClass . a sh:NodeShape ; @@ -557,122 +558,124 @@ dcterms:Standard a sh:NodeShape ; true ; sh:ignoredProperties ( rdf:type ), ( rdf:type ) ; - sh:property [ sh:datatype xsd:string ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path ], - [ sh:description "resources.external_url — canonical off-graph URL." ; - sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 14 ; - sh:path ], - [ sh:datatype xsd:string ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 13 ; - sh:path ], - [ sh:class ; + sh:property [ sh:class ; + sh:description "Who posted it, as a link to their Investigator node (for a job: the public_job_posters view, 20261117170000). Never the poster's auth user id (jobs.posted_by) or email." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; sh:order 10 ; sh:path ], - [ sh:datatype xsd:boolean ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 9 ; - sh:path bbqs:is_active ], + [ sh:nodeKind sh:IRI ; + sh:order 22 ; + sh:path dcterms:source ], + [ sh:class prov:Activity ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 20 ; + sh:path prov:wasGeneratedBy ], [ sh:maxCount 1 ; sh:nodeKind sh:IRI ; sh:order 5 ; sh:path ], - [ sh:class prov:Agent ; - sh:maxCount 1 ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 21 ; - sh:path prov:wasAttributedTo ], [ sh:datatype xsd:string ; + sh:description "Email address to contact about the posting. PII, restricted the same way: never in the public export." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 4 ; - sh:path ], - [ sh:datatype xsd:dateTime ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 18 ; - sh:path ], - [ sh:class prov:Activity ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 20 ; - sh:path prov:wasGeneratedBy ], - [ sh:nodeKind sh:IRI ; - sh:order 22 ; - sh:path dcterms:source ], - [ sh:datatype xsd:dateTime ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 19 ; - sh:path ], + sh:order 7 ; + sh:path bbqs:contact_email ], [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 8 ; sh:path ], [ sh:datatype xsd:string ; - sh:description "Posting lab's department, as free text (jobs.department)." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 2 ; - sh:path bbqs:department ], + sh:order 4 ; + sh:path ], + [ sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 3 ; + sh:path ], [ sh:description "The rdf:type discriminator, from resources.resource_type." ; sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; sh:maxCount 1 ; sh:order 15 ; sh:path bbqs:resourceType ], + [ sh:datatype xsd:dateTime ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 19 ; + sh:path ], [ sh:description "The node IRI — minted from resources.id." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; sh:order 11 ; sh:path ], + [ sh:datatype xsd:boolean ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 9 ; + sh:path bbqs:is_active ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 3 ; - sh:path ], + sh:order 12 ; + sh:path ], [ sh:datatype xsd:string ; - sh:description "Name of the person to contact about the posting." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path bbqs:contact_name ], + sh:order 13 ; + sh:path ], [ sh:datatype xsd:string ; - sh:description "resources.metadata JSON overflow — un-promoted fields." ; + sh:description "Posting lab's department, as free text (jobs.department)." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 17 ; - sh:path bbqs:metadata ], + sh:order 2 ; + sh:path bbqs:department ], + [ sh:class prov:Agent ; + sh:maxCount 1 ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 21 ; + sh:path prov:wasAttributedTo ], + [ sh:class ; + sh:description "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 16 ; + sh:path ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 1 ; sh:path ], - [ sh:datatype xsd:string ; + [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 12 ; - sh:path ], + sh:order 18 ; + sh:path ], [ sh:datatype xsd:string ; - sh:description "Email address to contact about the posting." ; + sh:description "Name of the person to contact about the posting. Restricted: public_jobs leaves it out (20260515233153), so the public export never carries it." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 7 ; - sh:path bbqs:contact_email ], - [ sh:class ; - sh:description "resources.organization_id." ; + sh:order 6 ; + sh:path bbqs:contact_name ], + [ sh:description "resources.external_url — canonical off-graph URL." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 16 ; - sh:path ] ; + sh:order 14 ; + sh:path ], + [ sh:datatype xsd:string ; + sh:description "resources.metadata JSON overflow — un-promoted fields." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 17 ; + sh:path bbqs:metadata ], + [ sh:datatype xsd:string ; + sh:description "The institution a job posting names, as written (jobs.institution), for a job with no organization node to link. A job whose organization resolves has the part_of_org link instead, and the name is not repeated as text (link, do not copy). A curator clears one by setting the job's organization." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 0 ; + sh:path ] ; sh:targetClass . a sh:NodeShape ; @@ -680,131 +683,130 @@ dcterms:Standard a sh:NodeShape ; sh:ignoredProperties ( rdf:type ) ; sh:targetClass . - a sh:NodeShape ; + a sh:NodeShape ; + rdfs:comment "A software package, pipeline, or analysis library released by BBQS.", + "A trained/released machine-learning model (resource_type ml_model)." ; sh:closed true ; - sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:description "The rdf:type discriminator, from resources.resource_type." ; - sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; - sh:maxCount 1 ; - sh:order 14 ; - sh:path bbqs:resourceType ], - [ sh:datatype xsd:string ; - sh:description "resources.metadata JSON overflow — un-promoted fields." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; + sh:ignoredProperties ( rdf:type ), + ( rdf:type ) ; + sh:property [ sh:class prov:Activity ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 12 ; + sh:path prov:wasGeneratedBy ], + [ sh:nodeKind sh:IRI ; sh:order 16 ; - sh:path bbqs:metadata ], - [ sh:description "The node IRI — minted from resources.id." ; - sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 10 ; - sh:path ], - [ sh:datatype xsd:float ; - sh:description "Relative Citation Ratio." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 8 ; - sh:path bbqs:rcr ], - [ sh:datatype xsd:integer ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 7 ; - sh:path bbqs:citations ], - [ sh:datatype xsd:integer ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path ], + sh:path dcterms:source ], [ sh:nodeKind sh:IRI ; - sh:order 21 ; + sh:order 14 ; sh:path dcterms:source ], [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 18 ; - sh:path ], + sh:order 10 ; + sh:path ], + [ sh:description "The rdf:type discriminator, from resources.resource_type." ; + sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; + sh:maxCount 1 ; + sh:order 7 ; + sh:path bbqs:resourceType ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 11 ; - sh:path ], - [ sh:maxCount 1 ; + sh:order 4 ; + sh:path ], + [ sh:class ; + sh:nodeKind sh:IRI ; + sh:order 1 ; + sh:path bbqs:trainedOn ], + [ sh:class ; sh:nodeKind sh:IRI ; sh:order 2 ; - sh:path ], + sh:path bbqs:evaluatedBy ], + [ sh:class prov:Activity ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 14 ; + sh:path prov:wasGeneratedBy ], [ sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 4 ; + sh:order 1 ; sh:path ], - [ sh:class prov:Agent ; - sh:maxCount 1 ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 20 ; - sh:path prov:wasAttributedTo ], - [ sh:class ; - sh:description "resources.organization_id." ; - sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 15 ; - sh:path ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 12 ; + sh:order 7 ; sh:path ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 3 ; - sh:path ], - [ sh:datatype xsd:dateTime ; + sh:path ], + [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 17 ; - sh:path ], - [ sh:class prov:Activity ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 19 ; - sh:path prov:wasGeneratedBy ], - [ sh:datatype xsd:string ; + sh:order 5 ; + sh:path ], + [ sh:description "The node IRI — minted from resources.id." ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 3 ; + sh:path ], + [ sh:class ; + sh:description "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 8 ; + sh:path ], + [ sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 0 ; + sh:path ], + [ sh:class prov:Agent ; + sh:maxCount 1 ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 15 ; + sh:path prov:wasAttributedTo ], + [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path ], + sh:order 13 ; + sh:path ], + [ sh:datatype xsd:dateTime ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 12 ; + sh:path ], [ sh:description "resources.external_url — canonical off-graph URL." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 13 ; + sh:order 8 ; sh:path ], [ sh:datatype xsd:string ; - sh:nodeKind sh:Literal ; - sh:order 9 ; - sh:path ], - [ sh:datatype xsd:string ; - sh:description "JSON of author ORCIDs." ; + sh:description "resources.metadata JSON overflow — un-promoted fields." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 1 ; - sh:path ], + sh:order 11 ; + sh:path bbqs:metadata ], + [ sh:description "The node IRI — minted from resources.id." ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 5 ; + sh:path ], [ sh:datatype xsd:string ; - sh:description "Free-text author string; ORCIDs in author_orcids. Not an FK to Investigator." ; + sh:description "resources.metadata JSON overflow — un-promoted fields." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path ] ; - sh:targetClass . - - a sh:NodeShape ; - rdfs:comment "A software package, pipeline, or analysis library released by BBQS.", - "A trained/released machine-learning model (resource_type ml_model)." ; - sh:closed true ; - sh:ignoredProperties ( rdf:type ), - ( rdf:type ) ; - sh:property [ sh:datatype xsd:string ; + sh:order 9 ; + sh:path bbqs:metadata ], + [ sh:description "resources.external_url — canonical off-graph URL." ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 6 ; + sh:path ], + [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path ], + sh:order 11 ; + sh:path ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; @@ -815,170 +817,162 @@ dcterms:Standard a sh:NodeShape ; sh:maxCount 1 ; sh:order 9 ; sh:path bbqs:resourceType ], - [ sh:datatype xsd:string ; + [ sh:class prov:Agent ; sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 3 ; - sh:path ], + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 13 ; + sh:path prov:wasAttributedTo ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 4 ; sh:path ], - [ sh:class ; - sh:nodeKind sh:IRI ; - sh:order 1 ; - sh:path bbqs:trainedOn ], [ sh:class ; - sh:description "resources.organization_id." ; + sh:description "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 8 ; + sh:order 10 ; sh:path ], - [ sh:class ; - sh:nodeKind sh:IRI ; - sh:order 2 ; - sh:path bbqs:evaluatedBy ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 4 ; - sh:path ], - [ sh:description "The node IRI — minted from resources.id." ; - sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 5 ; - sh:path ], + sh:order 2 ; + sh:path ], [ sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 1 ; - sh:path ], - [ sh:datatype xsd:string ; + sh:order 0 ; + sh:path ] ; + sh:targetClass . + + a sh:NodeShape ; + sh:closed true ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:nodeKind sh:IRI ; + sh:order 22 ; + sh:path dcterms:source ], + [ sh:datatype xsd:integer ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 7 ; - sh:path ], - [ sh:datatype xsd:dateTime ; + sh:order 6 ; + sh:path ], + [ sh:datatype xsd:string ; + sh:description "JSON of author ORCIDs." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 12 ; - sh:path ], + sh:order 1 ; + sh:path ], + [ sh:class ; + sh:description "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 16 ; + sh:path ], + [ sh:class ; + sh:description "The earlier version this publication revises: a published paper points at its preprint(s), as PROV's newer prov:wasRevisionOf older. Two records linked, never merged, so each keeps its own PMID, DOI and date. Written from resource_links (predicate revision_of), where public.kg_link_publication_versions records a pair: the same title, one of them a preprint that is not later than the other (by PubMed id, else by the posting date in a bioRxiv/medRxiv DOI, else by year), both credited to one project." ; + sh:nodeKind sh:IRI ; + sh:order 10 ; + sh:path bbqs:revision_of ], [ sh:datatype xsd:string ; sh:description "resources.metadata JSON overflow — un-promoted fields." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 9 ; + sh:order 17 ; sh:path bbqs:metadata ], [ sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 0 ; - sh:path ], - [ sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 0 ; - sh:path ], - [ sh:description "The rdf:type discriminator, from resources.resource_type." ; - sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; + sh:order 4 ; + sh:path ], + [ sh:datatype xsd:string ; + sh:description "Free-text author string; ORCIDs in author_orcids. Not an FK to Investigator." ; sh:maxCount 1 ; - sh:order 7 ; - sh:path bbqs:resourceType ], - [ sh:description "resources.external_url — canonical off-graph URL." ; + sh:nodeKind sh:Literal ; + sh:order 0 ; + sh:path ], + [ sh:description "The node IRI — minted from resources.id." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 6 ; - sh:path ], + sh:order 11 ; + sh:path ], + [ sh:datatype xsd:string ; + sh:nodeKind sh:Literal ; + sh:order 9 ; + sh:path ], + [ sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 2 ; + sh:path ], [ sh:class prov:Agent ; sh:maxCount 1 ; sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 15 ; + sh:order 21 ; sh:path prov:wasAttributedTo ], - [ sh:datatype xsd:dateTime ; + [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 13 ; - sh:path ], - [ sh:datatype xsd:dateTime ; + sh:path ], + [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 10 ; - sh:path ], - [ sh:nodeKind sh:IRI ; - sh:order 16 ; - sh:path dcterms:source ], + sh:order 3 ; + sh:path ], + [ sh:description "The rdf:type discriminator, from resources.resource_type." ; + sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; + sh:maxCount 1 ; + sh:order 15 ; + sh:path bbqs:resourceType ], [ sh:class prov:Activity ; sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 14 ; + sh:order 20 ; sh:path prov:wasGeneratedBy ], - [ sh:nodeKind sh:IRI ; - sh:order 14 ; - sh:path dcterms:source ], - [ sh:class ; - sh:description "resources.organization_id." ; + [ sh:description "resources.external_url — canonical off-graph URL." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 10 ; - sh:path ], + sh:order 14 ; + sh:path ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 2 ; - sh:path ], - [ sh:datatype xsd:dateTime ; + sh:order 12 ; + sh:path ], + [ sh:datatype xsd:integer ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 11 ; - sh:path ], - [ sh:description "resources.external_url — canonical off-graph URL." ; + sh:order 7 ; + sh:path bbqs:citations ], + [ sh:datatype xsd:float ; + sh:description "Relative Citation Ratio." ; sh:maxCount 1 ; - sh:nodeKind sh:IRI ; + sh:nodeKind sh:Literal ; sh:order 8 ; - sh:path ], - [ sh:datatype xsd:string ; - sh:description "resources.metadata JSON overflow — un-promoted fields." ; + sh:path bbqs:rcr ], + [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 11 ; - sh:path bbqs:metadata ], - [ sh:description "The node IRI — minted from resources.id." ; + sh:order 19 ; + sh:path ], + [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 3 ; - sh:path ], - [ sh:class prov:Agent ; + sh:nodeKind sh:Literal ; + sh:order 18 ; + sh:path ], + [ sh:datatype xsd:string ; sh:maxCount 1 ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 13 ; - sh:path prov:wasAttributedTo ], - [ sh:class prov:Activity ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 12 ; - sh:path prov:wasGeneratedBy ] ; - sh:targetClass . + sh:nodeKind sh:Literal ; + sh:order 5 ; + sh:path ] ; + sh:targetClass . prov:Entity a sh:NodeShape ; rdfs:comment "RESERVED STUB. The empirical experiment/model data that grounds a MarrModel — explicitly DISTINCT from a released Dataset artifact. Belongs to the Marr layer; wait for the causal-KG." ; sh:closed true ; sh:ignoredProperties ( rdf:type ) ; sh:property [ sh:class ; - sh:description "resources.organization_id." ; + sh:description "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; sh:order 5 ; sh:path ], - [ sh:datatype xsd:string ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 2 ; - sh:path ], - [ sh:class prov:Agent ; - sh:maxCount 1 ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 10 ; - sh:path prov:wasAttributedTo ], - [ sh:class prov:Activity ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 9 ; - sh:path prov:wasGeneratedBy ], [ sh:datatype xsd:string ; sh:description "resources.metadata JSON overflow — un-promoted fields." ; sh:maxCount 1 ; @@ -990,8 +984,35 @@ prov:Entity a sh:NodeShape ; sh:nodeKind sh:Literal ; sh:order 8 ; sh:path ], - [ sh:description "The node IRI — minted from resources.id." ; - sh:maxCount 1 ; + [ sh:nodeKind sh:IRI ; + sh:order 11 ; + sh:path dcterms:source ], + [ sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 2 ; + sh:path ], + [ sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 1 ; + sh:path ], + [ sh:class prov:Activity ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 9 ; + sh:path prov:wasGeneratedBy ], + [ sh:description "resources.external_url — canonical off-graph URL." ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 3 ; + sh:path ], + [ sh:class prov:Agent ; + sh:maxCount 1 ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 10 ; + sh:path prov:wasAttributedTo ], + [ sh:description "The node IRI — minted from resources.id." ; + sh:maxCount 1 ; sh:nodeKind sh:IRI ; sh:order 0 ; sh:path ], @@ -1000,144 +1021,126 @@ prov:Entity a sh:NodeShape ; sh:nodeKind sh:Literal ; sh:order 7 ; sh:path ], - [ sh:nodeKind sh:IRI ; - sh:order 11 ; - sh:path dcterms:source ], [ sh:description "The rdf:type discriminator, from resources.resource_type." ; sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; sh:maxCount 1 ; sh:order 4 ; - sh:path bbqs:resourceType ], - [ sh:description "resources.external_url — canonical off-graph URL." ; - sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 3 ; - sh:path ], - [ sh:datatype xsd:string ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 1 ; - sh:path ] ; + sh:path bbqs:resourceType ] ; sh:targetClass prov:Entity . bbqs:MarrModel a sh:NodeShape ; rdfs:comment "RESERVED STUB. The BBQS-Marr object: the causal / conceptual-neuroscience graph for a project, spanning Marr's computational, algorithmic, and implementational levels. Developed separately (Nader's causal-KG) and NOT ready — modeled here only as a node Project.has_model can point at, plus the hooks below. Do not flesh out until the causal-KG lands." ; sh:closed true ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:class prov:Agent ; + sh:property [ sh:description "resources.external_url — canonical off-graph URL." ; sh:maxCount 1 ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 18 ; - sh:path prov:wasAttributedTo ], - [ sh:nodeKind sh:IRI ; - sh:order 19 ; - sh:path dcterms:source ], - [ sh:class prov:Entity ; sh:nodeKind sh:IRI ; - sh:order 4 ; - sh:path bbqs:has_experimental_data ], - [ sh:class skos:Concept ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 5 ; - sh:path bbqs:about_construct ], + sh:order 11 ; + sh:path ], [ sh:datatype xsd:string ; - sh:description "resources.metadata JSON overflow — un-promoted fields." ; + sh:description "Marr level 3 — physical realization. RESERVED." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 14 ; - sh:path bbqs:metadata ], + sh:order 3 ; + sh:path bbqs:implementational_level ], + [ sh:nodeKind sh:IRI ; + sh:order 19 ; + sh:path dcterms:source ], [ sh:class ; - sh:description "resources.organization_id." ; + sh:description "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; sh:order 13 ; sh:path ], + [ sh:datatype xsd:string ; + sh:description "Marr level 1 — the problem/goal. RESERVED." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 1 ; + sh:path bbqs:computational_level ], + [ sh:class prov:Agent ; + sh:maxCount 1 ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 18 ; + sh:path prov:wasAttributedTo ], + [ sh:class skos:Concept ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 6 ; + sh:path bbqs:about_anatomy ], [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 16 ; sh:path ], - [ sh:description "resources.external_url — canonical off-graph URL." ; + [ sh:class skos:Concept ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 5 ; + sh:path bbqs:about_construct ], + [ sh:description "The node IRI — minted from resources.id." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 11 ; - sh:path ], + sh:order 8 ; + sh:path ], + [ sh:datatype xsd:dateTime ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 15 ; + sh:path ], + [ sh:class prov:Entity ; + sh:nodeKind sh:IRI ; + sh:order 4 ; + sh:path bbqs:has_experimental_data ], + [ sh:class prov:Activity ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 17 ; + sh:path prov:wasGeneratedBy ], [ sh:datatype xsd:string ; - sh:description "Marr level 2 — representation & algorithm. RESERVED." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 2 ; - sh:path bbqs:algorithmic_level ], + sh:order 9 ; + sh:path ], [ sh:class skos:Concept ; sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 6 ; - sh:path bbqs:about_anatomy ], + sh:order 7 ; + sh:path bbqs:about_task ], [ sh:description "The rdf:type discriminator, from resources.resource_type." ; sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; sh:maxCount 1 ; sh:order 12 ; sh:path bbqs:resourceType ], [ sh:datatype xsd:string ; + sh:description "Marr level 2 — representation & algorithm. RESERVED." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 9 ; - sh:path ], - [ sh:datatype xsd:dateTime ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 15 ; - sh:path ], + sh:order 2 ; + sh:path bbqs:algorithmic_level ], [ sh:datatype xsd:string ; - sh:description "Marr level 1 — the problem/goal. RESERVED." ; + sh:description "resources.metadata JSON overflow — un-promoted fields." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 1 ; - sh:path bbqs:computational_level ], - [ sh:description "The node IRI — minted from resources.id." ; - sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 8 ; - sh:path ], - [ sh:class skos:Concept ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 7 ; - sh:path bbqs:about_task ], + sh:order 14 ; + sh:path bbqs:metadata ], [ sh:class ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; sh:order 0 ; sh:path ], - [ sh:class prov:Activity ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 17 ; - sh:path prov:wasGeneratedBy ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 10 ; - sh:path ], - [ sh:datatype xsd:string ; - sh:description "Marr level 3 — physical realization. RESERVED." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 3 ; - sh:path bbqs:implementational_level ] ; + sh:path ] ; sh:targetClass bbqs:MarrModel . a sh:NodeShape ; rdfs:comment "An organization that funds BBQS research (typically an NIH institute)." ; sh:closed true ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:datatype xsd:dateTime ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 7 ; - sh:path ], - [ sh:description "resources.external_url — canonical off-graph URL." ; + sh:property [ sh:description "The rdf:type discriminator, from resources.resource_type." ; + sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 3 ; - sh:path ], + sh:order 4 ; + sh:path bbqs:resourceType ], [ sh:class prov:Activity ; sh:nodeKind sh:BlankNodeOrIRI ; sh:order 9 ; @@ -1145,29 +1148,29 @@ bbqs:MarrModel a sh:NodeShape ; [ sh:nodeKind sh:IRI ; sh:order 11 ; sh:path dcterms:source ], - [ sh:description "The rdf:type discriminator, from resources.resource_type." ; - sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; - sh:maxCount 1 ; - sh:order 4 ; - sh:path bbqs:resourceType ], - [ sh:description "The node IRI — minted from resources.id." ; + [ sh:datatype xsd:string ; + sh:description "resources.metadata JSON overflow — un-promoted fields." ; sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 0 ; - sh:path ], + sh:nodeKind sh:Literal ; + sh:order 6 ; + sh:path bbqs:metadata ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 2 ; sh:path ], - [ sh:datatype xsd:string ; - sh:description "resources.metadata JSON overflow — un-promoted fields." ; + [ sh:description "resources.external_url — canonical off-graph URL." ; sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path bbqs:metadata ], + sh:nodeKind sh:IRI ; + sh:order 3 ; + sh:path ], + [ sh:class prov:Agent ; + sh:maxCount 1 ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 10 ; + sh:path prov:wasAttributedTo ], [ sh:class ; - sh:description "resources.organization_id." ; + sh:description "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; sh:order 5 ; @@ -1175,140 +1178,163 @@ bbqs:MarrModel a sh:NodeShape ; [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 8 ; - sh:path ], + sh:order 7 ; + sh:path ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 1 ; sh:path ], - [ sh:class prov:Agent ; + [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 10 ; - sh:path prov:wasAttributedTo ] ; + sh:nodeKind sh:Literal ; + sh:order 8 ; + sh:path ], + [ sh:description "The node IRI — minted from resources.id." ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 0 ; + sh:path ] ; sh:targetClass . a sh:NodeShape ; rdfs:comment "A BBQS project — the funded scientific work and its NIH award as one node, keyed by grant_number. The Marr/causal model plugs in via has_model." ; sh:closed true ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:datatype xsd:string ; + sh:property [ sh:nodeKind sh:IRI ; + sh:order 33 ; + sh:path dcterms:source ], + [ sh:datatype xsd:dateTime ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 30 ; + sh:path ], + [ sh:description "resources.external_url — canonical off-graph URL." ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 25 ; + sh:path ], + [ sh:datatype xsd:string ; sh:description "R61/R34/RF1/U01… — DERIVED from grant_number, not stored." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 7 ; sh:path bbqs:mechanism ], - [ sh:datatype xsd:string ; + [ sh:description "The rdf:type discriminator, from resources.resource_type." ; + sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 3 ; - sh:path ], + sh:order 26 ; + sh:path bbqs:resourceType ], [ sh:datatype xsd:string ; - sh:description "NIH grant number; encodes mechanism." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path ], - [ sh:datatype xsd:string ; - sh:description "Project's onboarding/setup progress in the consortium intake workflow." ; + sh:order 2 ; + sh:path ], + [ sh:class ; + sh:description "Artifacts produced by the project." ; + sh:nodeKind sh:IRI ; + sh:order 20 ; + sh:path ], + [ sh:datatype xsd:integer ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 16 ; - sh:path bbqs:onboarding_status ], - [ sh:datatype xsd:float ; + sh:order 5 ; + sh:path bbqs:fiscal_year ], + [ sh:class ; + sh:description "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 4 ; - sh:path ], - [ sh:class prov:Activity ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 30 ; - sh:path prov:wasGeneratedBy ], - [ sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 6 ; - sh:path ], - [ sh:description "The rdf:type discriminator, from resources.resource_type." ; - sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; - sh:maxCount 1 ; - sh:order 25 ; - sh:path bbqs:resourceType ], - [ sh:nodeKind sh:IRI ; - sh:order 32 ; - sh:path dcterms:source ], - [ sh:class ; - sh:description "resources.organization_id." ; - sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 26 ; + sh:order 27 ; sh:path ], - [ sh:datatype xsd:dateTime ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 29 ; - sh:path ], + [ sh:class skos:Concept ; + sh:description "A kind of instrument the project's methods evidence names (the project_device_usage view): a category, not a model." ; + sh:nodeKind sh:IRI ; + sh:order 21 ; + sh:path bbqs:usesDeviceCategory ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 23 ; - sh:path ], + sh:path ], [ sh:datatype xsd:string ; + sh:description "A study_species[] value that names no species by design (e.g. 'All Species' for infrastructure awards). Recorded as scope, not a species claim, so #7 does not flag it." ; + sh:nodeKind sh:Literal ; + sh:order 13 ; + sh:path bbqs:study_scope ], + [ sh:datatype xsd:float ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 2 ; - sh:path ], - [ sh:class ; - sh:description "study_species[] names → Species nodes (resolved)." ; - sh:nodeKind sh:IRI ; - sh:order 11 ; - sh:path ], + sh:order 4 ; + sh:path ], [ sh:datatype xsd:float ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 15 ; sh:path bbqs:metadata_completeness ], - [ sh:class bbqs:MarrModel ; - sh:description "→ the project's Marr/causal model (RESERVED)." ; - sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 19 ; - sh:path bbqs:hasModel ], - [ sh:description "resources.external_url — canonical off-graph URL." ; - sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 24 ; - sh:path ], [ sh:class prov:Association ; sh:description "ProjectRole edges assigned under this project." ; sh:nodeKind sh:BlankNodeOrIRI ; sh:order 17 ; sh:path bbqs:has_project_role ], [ sh:datatype xsd:string ; - sh:description "Raw study_species[] free-text claim, verbatim. Must resolve to a Species via studies_species (#7)." ; + sh:description "Project's onboarding/setup progress in the consortium intake workflow." ; + sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 12 ; - sh:path bbqs:studies_species_name ], - [ sh:description "The node IRI — minted from resources.id." ; + sh:order 16 ; + sh:path bbqs:onboarding_status ], + [ sh:class bbqs:MarrModel ; + sh:description "→ the project's Marr/causal model (RESERVED)." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 21 ; - sh:path ], - [ sh:class ; - sh:description "Artifacts produced by the project." ; - sh:nodeKind sh:IRI ; - sh:order 20 ; - sh:path ], + sh:order 19 ; + sh:path bbqs:hasModel ], [ sh:class ; sh:nodeKind sh:IRI ; sh:order 18 ; sh:path bbqs:funded_datasets ], + [ sh:class ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 8 ; + sh:path ], + [ sh:class ; + sh:description "study_species[] names → Species nodes (resolved)." ; + sh:nodeKind sh:IRI ; + sh:order 11 ; + sh:path ], + [ sh:datatype xsd:string ; + sh:description "A species named in the project's study_species[] that no Species node matches yet, as written. Only these are written as text: a claim that resolves is a studies_species link and is not repeated as a name (link, do not copy). A curator clears one by adding the species or an alias for the name (#7)." ; + sh:nodeKind sh:Literal ; + sh:order 12 ; + sh:path bbqs:studies_species_unresolved ], + [ sh:datatype xsd:string ; + sh:nodeKind sh:Literal ; + sh:order 10 ; + sh:path ], + [ sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 3 ; + sh:path ], + [ sh:class prov:Agent ; + sh:maxCount 1 ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 32 ; + sh:path prov:wasAttributedTo ], [ sh:datatype xsd:string ; sh:description "resources.metadata JSON overflow — un-promoted fields." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 27 ; + sh:order 28 ; sh:path bbqs:metadata ], + [ sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 6 ; + sh:path ], + [ sh:class prov:Activity ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 31 ; + sh:path prov:wasGeneratedBy ], [ sh:maxCount 1 ; sh:nodeKind sh:IRI ; sh:order 9 ; @@ -1316,60 +1342,53 @@ bbqs:MarrModel a sh:NodeShape ; [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 28 ; + sh:order 29 ; sh:path ], [ sh:datatype xsd:string ; - sh:description "A study_species[] value that names no species by design (e.g. 'All Species' for infrastructure awards). Recorded as scope, not a species claim, so #7 does not flag it." ; - sh:nodeKind sh:Literal ; - sh:order 13 ; - sh:path bbqs:study_scope ], - [ sh:class prov:Agent ; sh:maxCount 1 ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 31 ; - sh:path prov:wasAttributedTo ], + sh:nodeKind sh:Literal ; + sh:order 24 ; + sh:path ], [ sh:datatype xsd:string ; + sh:description "Full per-year RePORTER project_num (not the core)." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 22 ; - sh:path ], - [ sh:class ; + sh:order 1 ; + sh:path bbqs:reporter_project_num ], + [ sh:description "The node IRI — minted from resources.id." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 8 ; - sh:path ], - [ sh:datatype xsd:integer ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path bbqs:fiscal_year ], + sh:order 22 ; + sh:path ], [ sh:datatype xsd:string ; + sh:description "NIH grant number; encodes mechanism." ; + sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 10 ; - sh:path ], + sh:order 0 ; + sh:path ], [ sh:datatype xsd:boolean ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 14 ; - sh:path bbqs:studies_human ], - [ sh:datatype xsd:string ; - sh:description "Full per-year RePORTER project_num (not the core)." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 1 ; - sh:path bbqs:reporter_project_num ] ; + sh:path bbqs:studies_human ] ; sh:targetClass . a sh:NodeShape ; rdfs:comment "Anything with a row in the `resources` spine — the abstract base of every first-class BBQS node. IRI = resources.id; class = resources.resource_type." ; sh:closed false ; - sh:ignoredProperties ( bbqs:research_areas bbqs:evaluatedBy bbqs:about_task bbqs:participating_orgs bbqs:trainedOn bbqs:department bbqs:reporter_profile_id bbqs:has_project_role bbqs:relevance_tags rdf:type skos:prefLabel bbqs:studies_species_name bbqs:eligible_activity_codes bbqs:sampling_rate_hz skos:notation bbqs:funded_datasets bbqs:has_experimental_data bbqs:held_project_roles bbqs:typical_use_cases bbqs:output_signals bbqs:requested_groups bbqs:rcr bbqs:taxonomy_order bbqs:about_construct bbqs:taxonomy_genus bbqs:purpose bbqs:dashboardWidgets bbqs:citations bbqs:draft_url bbqs:expiration_date bbqs:contact_email bbqs:regulatory_class bbqs:open_date bbqs:neurosift_url bbqs:studies_human bbqs:measures bbqs:schema_org_type bbqs:award_numbers bbqs:contact_name bbqs:file_count bbqs:about_anatomy bbqs:manual_urls bbqs:implementational_level bbqs:skills bbqs:computational_level bbqs:hasModel bbqs:dandi_instance bbqs:onboarding_status bbqs:scholar_id bbqs:sdk_urls bbqs:evaluates bbqs:measuresConstruct bbqs:is_external_link bbqs:reporter_project_num bbqs:budget_ceiling bbqs:activity_code bbqs:metadata_completeness bbqs:taxonomy_family bbqs:price_tier bbqs:link_text bbqs:is_active bbqs:budget_floor bbqs:algorithmic_level bbqs:posted_date bbqs:status bbqs:due_dates bbqs:fiscal_year bbqs:mechanism bbqs:opportunity_type bbqs:study_scope ), - ( rdf:type ) ; - sh:property [ sh:datatype xsd:dateTime ; + sh:ignoredProperties ( rdf:type ), + ( bbqs:taxonomy_genus bbqs:hasModel bbqs:evaluatedBy bbqs:rcr bbqs:metadata_completeness bbqs:measuresConstruct bbqs:measures bbqs:participating_orgs bbqs:dandi_instance bbqs:trainedOn bbqs:price_tier bbqs:about_task bbqs:skills bbqs:is_active bbqs:revision_of bbqs:purpose bbqs:output_signals bbqs:algorithmic_level bbqs:about_construct bbqs:file_count bbqs:studies_human bbqs:is_external_link skos:notation bbqs:neurosift_url bbqs:eligible_activity_codes bbqs:studies_species_unresolved bbqs:budget_ceiling bbqs:draft_url bbqs:taxonomy_family bbqs:implementational_level bbqs:link_text bbqs:typical_use_cases bbqs:reporter_project_num bbqs:sdk_urls bbqs:fiscal_year bbqs:sampling_rate_hz bbqs:schema_org_type bbqs:contact_email bbqs:study_scope bbqs:onboarding_status rdf:type bbqs:dashboardWidgets bbqs:regulatory_class bbqs:budget_floor bbqs:manual_urls bbqs:research_areas bbqs:scholar_id bbqs:held_project_roles bbqs:due_dates bbqs:taxonomy_order skos:prefLabel bbqs:opportunity_type bbqs:reporter_profile_id bbqs:department bbqs:evaluates bbqs:has_project_role bbqs:computational_level bbqs:contact_name bbqs:expiration_date bbqs:has_experimental_data bbqs:requested_groups bbqs:status bbqs:funded_datasets bbqs:open_date bbqs:citations bbqs:mechanism bbqs:award_numbers bbqs:relevance_tags bbqs:activity_code bbqs:posted_date bbqs:usesDeviceCategory bbqs:about_anatomy ) ; + sh:property [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 8 ; - sh:path ], + sh:order 2 ; + sh:path ], + [ sh:datatype xsd:string ; + sh:description "resources.metadata JSON overflow — un-promoted fields." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 6 ; + sh:path bbqs:metadata ], [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; @@ -1380,10 +1399,6 @@ bbqs:MarrModel a sh:NodeShape ; sh:maxCount 1 ; sh:order 4 ; sh:path bbqs:resourceType ], - [ sh:class prov:Activity ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 9 ; - sh:path prov:wasGeneratedBy ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; @@ -1394,62 +1409,60 @@ bbqs:MarrModel a sh:NodeShape ; sh:nodeKind sh:IRI ; sh:order 0 ; sh:path ], - [ sh:description "resources.external_url — canonical off-graph URL." ; + [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 3 ; - sh:path ], + sh:nodeKind sh:Literal ; + sh:order 8 ; + sh:path ], [ sh:class prov:Agent ; sh:maxCount 1 ; sh:nodeKind sh:BlankNodeOrIRI ; sh:order 10 ; sh:path prov:wasAttributedTo ], + [ sh:nodeKind sh:IRI ; + sh:order 11 ; + sh:path dcterms:source ], [ sh:class ; - sh:description "resources.organization_id." ; + sh:description "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; sh:order 5 ; sh:path ], - [ sh:nodeKind sh:IRI ; - sh:order 11 ; - sh:path dcterms:source ], - [ sh:datatype xsd:string ; - sh:description "resources.metadata JSON overflow — un-promoted fields." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path bbqs:metadata ], - [ sh:datatype xsd:string ; + [ sh:class prov:Activity ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 9 ; + sh:path prov:wasGeneratedBy ], + [ sh:description "resources.external_url — canonical off-graph URL." ; sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 2 ; - sh:path ] ; + sh:nodeKind sh:IRI ; + sh:order 3 ; + sh:path ] ; sh:targetClass . prov:Association a sh:NodeShape ; rdfs:comment "Reified project↔investigator role (grant_investigators). THE authority for \"role on this project\" — canonical tokens only (trg_normalize_grant_role), with role_source provenance. A scalar on Investigator cannot express a role that varies per project (issue #283)." ; sh:closed true ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:description "Canonical token (trg_normalize_grant_role enforces)." ; - sh:in ( "PI" "contact_pi" "co_pi" "mpi" "co-investigator" "trainee" "postdoc" "graduate_student" "research_staff" "data_manager" "project_manager" "nih_program" "admin" "other" ) ; - sh:maxCount 1 ; - sh:order 2 ; - sh:path ], - [ sh:class ; - sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 1 ; - sh:path prov:agent ], - [ sh:class ; + sh:property [ sh:class ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; sh:order 0 ; sh:path prov:hadPlan ], + [ sh:description "Canonical token (trg_normalize_grant_role enforces)." ; + sh:in ( "PI" "contact_pi" "co_pi" "mpi" "co-investigator" "collaborator" "trainee" "postdoc" "graduate_student" "research_staff" "data_manager" "project_manager" "nih_program" "admin" "other" ) ; + sh:maxCount 1 ; + sh:order 2 ; + sh:path ], [ sh:description "Where the role came from -- provenance of the role assignment." ; sh:in ( "reporter" "curator" "funder_notice" ) ; sh:maxCount 1 ; sh:order 3 ; - sh:path bbqs:role_source ] ; + sh:path bbqs:role_source ], + [ sh:class ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 1 ; + sh:path prov:agent ] ; sh:targetClass prov:Association . a sh:NodeShape ; @@ -1458,38 +1471,32 @@ prov:Association a sh:NodeShape ; "An evaluation dataset/task used to score models or algorithms." ; sh:closed true ; sh:ignoredProperties ( rdf:type ), - ( bbqs:neurosift_url bbqs:file_count bbqs:evaluates bbqs:draft_url bbqs:award_numbers rdf:type bbqs:dandi_instance ), + ( bbqs:neurosift_url bbqs:award_numbers bbqs:draft_url rdf:type bbqs:dandi_instance bbqs:file_count bbqs:evaluates ), ( rdf:type ) ; - sh:property [ sh:datatype xsd:integer ; + sh:property [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path ], + sh:order 1 ; + sh:path ], [ sh:datatype xsd:string ; - sh:description "resources.metadata JSON overflow — un-promoted fields." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 10 ; - sh:path bbqs:metadata ], - [ sh:description "The rdf:type discriminator, from resources.resource_type." ; - sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; - sh:maxCount 1 ; - sh:order 9 ; - sh:path bbqs:resourceType ], - [ sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 3 ; - sh:path bbqs:neurosift_url ], - [ sh:class prov:Agent ; + sh:order 0 ; + sh:path ], + [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 14 ; - sh:path prov:wasAttributedTo ], + sh:nodeKind sh:Literal ; + sh:order 19 ; + sh:path ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 2 ; sh:path ], + [ sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 3 ; + sh:path bbqs:neurosift_url ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; @@ -1497,242 +1504,248 @@ prov:Association a sh:NodeShape ; sh:path bbqs:dandi_instance ], [ sh:class ; sh:nodeKind sh:IRI ; - sh:order 4 ; + sh:order 11 ; sh:path ], + [ sh:class ; + sh:nodeKind sh:IRI ; + sh:order 3 ; + sh:path ], + [ sh:nodeKind sh:IRI ; + sh:order 16 ; + sh:path dcterms:source ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 14 ; - sh:path ], - [ sh:class ; - sh:description "resources.organization_id." ; + sh:order 6 ; + sh:path ], + [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 10 ; - sh:path ], - [ sh:class prov:Agent ; + sh:nodeKind sh:Literal ; + sh:order 20 ; + sh:path ], + [ sh:nodeKind sh:IRI ; + sh:order 23 ; + sh:path dcterms:source ], + [ sh:datatype xsd:string ; + sh:description "Award number(s) behind this resource: a dandiset's grants, a standard's funding award." ; + sh:nodeKind sh:Literal ; + sh:order 7 ; + sh:path bbqs:award_numbers ], + [ sh:datatype xsd:string ; sh:maxCount 1 ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 15 ; - sh:path prov:wasAttributedTo ], + sh:nodeKind sh:Literal ; + sh:order 8 ; + sh:path ], [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 11 ; + sh:order 12 ; sh:path ], - [ sh:class ; - sh:nodeKind sh:IRI ; + [ sh:datatype xsd:string ; + sh:description "resources.metadata JSON overflow — un-promoted fields." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; sh:order 11 ; - sh:path ], - [ sh:class prov:Activity ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 13 ; - sh:path prov:wasGeneratedBy ], - [ sh:class ; - sh:description "resources.organization_id." ; + sh:path bbqs:metadata ], + [ sh:datatype xsd:string ; sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 9 ; - sh:path ], + sh:nodeKind sh:Literal ; + sh:order 13 ; + sh:path ], [ sh:description "resources.external_url — canonical off-graph URL." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; sh:order 15 ; sh:path ], - [ sh:class ; - sh:nodeKind sh:IRI ; - sh:order 2 ; - sh:path ], - [ sh:description "The rdf:type discriminator, from resources.resource_type." ; - sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; + [ sh:class prov:Agent ; sh:maxCount 1 ; - sh:order 8 ; - sh:path bbqs:resourceType ], + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 15 ; + sh:path prov:wasAttributedTo ], [ sh:class ; - sh:description "resources.organization_id." ; + sh:description "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; sh:order 17 ; sh:path ], - [ sh:description "The node IRI — minted from resources.id." ; - sh:maxCount 1 ; + [ sh:class ; sh:nodeKind sh:IRI ; - sh:order 12 ; - sh:path ], + sh:order 3 ; + sh:path ], [ sh:class prov:Agent ; sh:maxCount 1 ; sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 22 ; + sh:order 14 ; sh:path prov:wasAttributedTo ], + [ sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 7 ; + sh:path ], + [ sh:class ; + sh:nodeKind sh:IRI ; + sh:order 4 ; + sh:path ], [ sh:description "resources.external_url — canonical off-graph URL." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; sh:order 7 ; sh:path ], - [ sh:class ; - sh:description "What the benchmark scores (model/algorithm/tool)." ; - sh:nodeKind sh:IRI ; - sh:order 0 ; - sh:path bbqs:evaluates ], - [ sh:nodeKind sh:IRI ; - sh:order 16 ; - sh:path dcterms:source ], - [ sh:nodeKind sh:IRI ; - sh:order 23 ; - sh:path dcterms:source ], + [ sh:description "The rdf:type discriminator, from resources.resource_type." ; + sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; + sh:maxCount 1 ; + sh:order 9 ; + sh:path bbqs:resourceType ], + [ sh:datatype xsd:integer ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 4 ; + sh:path bbqs:file_count ], + [ sh:class prov:Activity ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 21 ; + sh:path prov:wasGeneratedBy ], [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 12 ; - sh:path ], - [ sh:datatype xsd:string ; + sh:path ], + [ sh:class prov:Agent ; sh:maxCount 1 ; - sh:nodeKind sh:Literal ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 22 ; + sh:path prov:wasAttributedTo ], + [ sh:description "resources.external_url — canonical off-graph URL." ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; sh:order 8 ; - sh:path ], - [ sh:datatype xsd:dateTime ; + sh:path ], + [ sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 2 ; + sh:path bbqs:draft_url ], + [ sh:class prov:Activity ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 14 ; + sh:path prov:wasGeneratedBy ], + [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 19 ; - sh:path ], + sh:order 6 ; + sh:path ], [ sh:description "The rdf:type discriminator, from resources.resource_type." ; sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; sh:maxCount 1 ; sh:order 16 ; sh:path bbqs:resourceType ], - [ sh:description "The node IRI — minted from resources.id." ; + [ sh:class ; + sh:description "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 5 ; - sh:path ], - [ sh:datatype xsd:string ; + sh:order 10 ; + sh:path ], + [ sh:class ; + sh:description "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path ], + sh:nodeKind sh:IRI ; + sh:order 9 ; + sh:path ], [ sh:description "The node IRI — minted from resources.id." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 4 ; + sh:order 12 ; sh:path ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path ], + sh:order 14 ; + sh:path ], + [ sh:nodeKind sh:IRI ; + sh:order 15 ; + sh:path dcterms:source ], [ sh:datatype xsd:string ; + sh:description "resources.metadata JSON overflow — un-promoted fields." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 1 ; - sh:path ], - [ sh:class prov:Activity ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 21 ; - sh:path prov:wasGeneratedBy ], + sh:order 18 ; + sh:path bbqs:metadata ], [ sh:datatype xsd:integer ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 4 ; - sh:path bbqs:file_count ], - [ sh:class ; - sh:nodeKind sh:IRI ; - sh:order 3 ; - sh:path ], - [ sh:nodeKind sh:IRI ; - sh:order 15 ; - sh:path dcterms:source ], + sh:order 5 ; + sh:path ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 0 ; sh:path ], - [ sh:datatype xsd:dateTime ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 20 ; - sh:path ], + [ sh:class prov:Activity ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 13 ; + sh:path prov:wasGeneratedBy ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 1 ; - sh:path ], - [ sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 2 ; - sh:path bbqs:draft_url ], - [ sh:class ; - sh:nodeKind sh:IRI ; - sh:order 3 ; - sh:path ], - [ sh:datatype xsd:string ; - sh:description "Award number(s) behind this resource: a dandiset's grants, a standard's funding award." ; - sh:nodeKind sh:Literal ; - sh:order 7 ; - sh:path bbqs:award_numbers ], - [ sh:datatype xsd:string ; + sh:path ], + [ sh:description "The node IRI — minted from resources.id." ; sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 13 ; - sh:path ], - [ sh:datatype xsd:string ; - sh:description "resources.metadata JSON overflow — un-promoted fields." ; + sh:nodeKind sh:IRI ; + sh:order 4 ; + sh:path ], + [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 11 ; - sh:path bbqs:metadata ], + sh:path ], + [ sh:class ; + sh:description "What the benchmark scores (model/algorithm/tool)." ; + sh:nodeKind sh:IRI ; + sh:order 0 ; + sh:path bbqs:evaluates ], + [ sh:description "The rdf:type discriminator, from resources.resource_type." ; + sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; + sh:maxCount 1 ; + sh:order 8 ; + sh:path bbqs:resourceType ], + [ sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 1 ; + sh:path ], [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 12 ; + sh:order 13 ; sh:path ], - [ sh:datatype xsd:string ; + [ sh:description "The node IRI — minted from resources.id." ; sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path ], + sh:nodeKind sh:IRI ; + sh:order 5 ; + sh:path ], [ sh:class ; sh:nodeKind sh:IRI ; - sh:order 10 ; + sh:order 2 ; sh:path ], [ sh:datatype xsd:string ; sh:description "resources.metadata JSON overflow — un-promoted fields." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 18 ; + sh:order 10 ; sh:path bbqs:metadata ], - [ sh:class prov:Activity ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 14 ; - sh:path prov:wasGeneratedBy ], - [ sh:description "resources.external_url — canonical off-graph URL." ; - sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 8 ; - sh:path ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 7 ; - sh:path ], - [ sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 1 ; - sh:path ], + sh:order 5 ; + sh:path ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 9 ; sh:path ], - [ sh:datatype xsd:dateTime ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 13 ; - sh:path ], - [ sh:datatype xsd:string ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path ] ; + [ sh:class ; + sh:nodeKind sh:IRI ; + sh:order 10 ; + sh:path ] ; sh:targetClass . a sh:NodeShape ; @@ -1745,215 +1758,215 @@ prov:Association a sh:NodeShape ; ( rdf:type ), ( rdf:type ), ( rdf:type ) ; - sh:property [ sh:nodeKind sh:IRI ; - sh:order 14 ; - sh:path dcterms:source ], + sh:property [ sh:datatype xsd:dateTime ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 9 ; + sh:path ], [ sh:maxCount 1 ; sh:nodeKind sh:IRI ; sh:order 2 ; sh:path ], + [ sh:class prov:Activity ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 11 ; + sh:path prov:wasGeneratedBy ], + [ sh:class prov:Activity ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 11 ; + sh:path prov:wasGeneratedBy ], [ sh:datatype xsd:string ; + sh:description "resources.metadata JSON overflow — un-promoted fields." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 3 ; - sh:path ], + sh:order 8 ; + sh:path bbqs:metadata ], + [ sh:class ; + sh:description "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 8 ; + sh:path ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 1 ; - sh:path ], + sh:order 4 ; + sh:path ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 4 ; - sh:path ], - [ sh:datatype xsd:dateTime ; + sh:path ], + [ sh:datatype xsd:string ; + sh:description "resources.metadata JSON overflow — un-promoted fields." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 10 ; - sh:path ], - [ sh:nodeKind sh:IRI ; - sh:order 13 ; - sh:path dcterms:source ], + sh:order 8 ; + sh:path bbqs:metadata ], [ sh:datatype xsd:string ; sh:description "resources.metadata JSON overflow — un-promoted fields." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 9 ; sh:path bbqs:metadata ], - [ sh:description "The rdf:type discriminator, from resources.resource_type." ; - sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; + [ sh:class prov:Agent ; sh:maxCount 1 ; - sh:order 6 ; - sh:path bbqs:resourceType ], - [ sh:class ; - sh:description "resources.organization_id." ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 12 ; + sh:path prov:wasAttributedTo ], + [ sh:nodeKind sh:IRI ; + sh:order 13 ; + sh:path dcterms:source ], + [ sh:datatype xsd:string ; sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 7 ; - sh:path ], + sh:nodeKind sh:Literal ; + sh:order 5 ; + sh:path ], + [ sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 1 ; + sh:path ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 4 ; sh:path ], + [ sh:class ; + sh:nodeKind sh:IRI ; + sh:order 0 ; + sh:path ], + [ sh:description "The rdf:type discriminator, from resources.resource_type." ; + sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; + sh:maxCount 1 ; + sh:order 6 ; + sh:path bbqs:resourceType ], + [ sh:nodeKind sh:IRI ; + sh:order 13 ; + sh:path dcterms:source ], [ sh:description "resources.external_url — canonical off-graph URL." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; sh:order 5 ; sh:path ], - [ sh:datatype xsd:dateTime ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 9 ; - sh:path ], - [ sh:datatype xsd:string ; - sh:description "working_group_dashboard_defaults.widgets JSON." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 1 ; - sh:path bbqs:dashboardWidgets ], [ sh:class ; - sh:description "resources.organization_id." ; + sh:description "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; sh:order 7 ; sh:path ], [ sh:class prov:Activity ; sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 11 ; + sh:order 12 ; sh:path prov:wasGeneratedBy ], + [ sh:class ; + sh:nodeKind sh:IRI ; + sh:order 0 ; + sh:path ], [ sh:class ; - sh:description "resources.organization_id." ; + sh:description "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 8 ; + sh:order 7 ; sh:path ], [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 10 ; sh:path ], - [ sh:class ; - sh:nodeKind sh:IRI ; - sh:order 0 ; - sh:path ], - [ sh:description "The rdf:type discriminator, from resources.resource_type." ; - sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; - sh:maxCount 1 ; - sh:order 7 ; - sh:path bbqs:resourceType ], - [ sh:description "The rdf:type discriminator, from resources.resource_type." ; - sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; - sh:maxCount 1 ; - sh:order 6 ; - sh:path bbqs:resourceType ], [ sh:description "resources.external_url — canonical off-graph URL." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 5 ; + sh:order 6 ; sh:path ], [ sh:datatype xsd:string ; - sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path ], - [ sh:class prov:Activity ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 11 ; - sh:path prov:wasGeneratedBy ], - [ sh:class prov:Activity ; + sh:order 0 ; + sh:path ], + [ sh:class prov:Agent ; + sh:maxCount 1 ; sh:nodeKind sh:BlankNodeOrIRI ; sh:order 12 ; - sh:path prov:wasGeneratedBy ], - [ sh:datatype xsd:string ; + sh:path prov:wasAttributedTo ], + [ sh:datatype xsd:dateTime ; + sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path ], + sh:order 11 ; + sh:path ], + [ sh:description "The rdf:type discriminator, from resources.resource_type." ; + sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; + sh:maxCount 1 ; + sh:order 7 ; + sh:path bbqs:resourceType ], [ sh:datatype xsd:string ; - sh:description "resources.metadata JSON overflow — un-promoted fields." ; + sh:description "working_group_dashboard_defaults.widgets JSON." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 8 ; - sh:path bbqs:metadata ], + sh:order 1 ; + sh:path bbqs:dashboardWidgets ], [ sh:nodeKind sh:IRI ; - sh:order 13 ; + sh:order 14 ; sh:path dcterms:source ], - [ sh:class prov:Agent ; + [ sh:description "The node IRI — minted from resources.id." ; sh:maxCount 1 ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 13 ; - sh:path prov:wasAttributedTo ], + sh:nodeKind sh:IRI ; + sh:order 2 ; + sh:path ], [ sh:description "The node IRI — minted from resources.id." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; sh:order 2 ; sh:path ], + [ sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 3 ; + sh:path ], [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 9 ; + sh:order 10 ; sh:path ], + [ sh:description "The rdf:type discriminator, from resources.resource_type." ; + sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; + sh:maxCount 1 ; + sh:order 6 ; + sh:path bbqs:resourceType ], [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 11 ; - sh:path ], - [ sh:class prov:Agent ; + sh:order 9 ; + sh:path ], + [ sh:description "The node IRI — minted from resources.id." ; sh:maxCount 1 ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 12 ; - sh:path prov:wasAttributedTo ], - [ sh:datatype xsd:string ; - sh:description "resources.metadata JSON overflow — un-promoted fields." ; + sh:nodeKind sh:IRI ; + sh:order 3 ; + sh:path ], + [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 8 ; - sh:path bbqs:metadata ], + sh:order 10 ; + sh:path ], [ sh:description "resources.external_url — canonical off-graph URL." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 6 ; + sh:order 5 ; sh:path ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 3 ; sh:path ], - [ sh:class prov:Agent ; - sh:maxCount 1 ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 12 ; - sh:path prov:wasAttributedTo ], [ sh:class ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; sh:order 1 ; sh:path ], - [ sh:datatype xsd:string ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 4 ; - sh:path ], - [ sh:datatype xsd:dateTime ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 10 ; - sh:path ], - [ sh:description "The node IRI — minted from resources.id." ; - sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 2 ; - sh:path ], - [ sh:class ; - sh:nodeKind sh:IRI ; - sh:order 0 ; - sh:path ], - [ sh:description "The node IRI — minted from resources.id." ; + [ sh:class prov:Agent ; sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 3 ; - sh:path ] ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 13 ; + sh:path prov:wasAttributedTo ] ; sh:targetClass . a sh:NodeShape ; @@ -1964,135 +1977,125 @@ prov:Association a sh:NodeShape ; sh:ignoredProperties ( rdf:type ), ( rdf:type ), ( rdf:type ) ; - sh:property [ sh:description "resources.external_url — canonical off-graph URL." ; - sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 14 ; - sh:path ], - [ sh:description "resources.external_url — canonical off-graph URL." ; - sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 3 ; - sh:path ], - [ sh:datatype xsd:dateTime ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 7 ; - sh:path ], - [ sh:nodeKind sh:IRI ; + sh:property [ sh:nodeKind sh:IRI ; sh:order 22 ; sh:path dcterms:source ], - [ sh:class ; - sh:description "resources.organization_id." ; - sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 5 ; - sh:path ], [ sh:datatype xsd:string ; - sh:description "resources.metadata JSON overflow — un-promoted fields." ; + sh:description "Relative cost tier (device_models.price_tier) — a bucket, not a currency amount." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 6 ; - sh:path bbqs:metadata ], - [ sh:class prov:Activity ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 20 ; - sh:path prov:wasGeneratedBy ], - [ sh:datatype xsd:string ; - sh:description "Relative cost tier (device_models.price_tier) — a bucket, not a currency amount." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path bbqs:price_tier ], + sh:path bbqs:price_tier ], [ sh:datatype xsd:string ; + sh:description "Regulatory classification (e.g. an FDA device class), where applicable." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 13 ; - sh:path ], + sh:order 7 ; + sh:path bbqs:regulatory_class ], [ sh:datatype xsd:string ; - sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 2 ; - sh:path ], - [ sh:datatype xsd:string ; - sh:description "resources.metadata JSON overflow — un-promoted fields." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 17 ; - sh:path bbqs:metadata ], - [ sh:description "The node IRI — minted from resources.id." ; - sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 11 ; - sh:path ], - [ sh:class skos:Concept ; - sh:description "device_models.device_class → DeviceCategory.key." ; + sh:order 0 ; + sh:path ], + [ sh:description "The rdf:type discriminator, from resources.resource_type." ; + sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; sh:maxCount 1 ; + sh:order 4 ; + sh:path bbqs:resourceType ], + [ sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 1 ; - sh:path ], + sh:order 8 ; + sh:path ], + [ sh:nodeKind sh:IRI ; + sh:order 10 ; + sh:path bbqs:sdk_urls ], [ sh:nodeKind sh:IRI ; sh:order 9 ; sh:path bbqs:manual_urls ], [ sh:datatype xsd:string ; + sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 4 ; - sh:path bbqs:output_signals ], - [ sh:description "The rdf:type discriminator, from resources.resource_type." ; - sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; + sh:order 13 ; + sh:path ], + [ sh:class prov:Agent ; sh:maxCount 1 ; - sh:order 4 ; - sh:path bbqs:resourceType ], + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 21 ; + sh:path prov:wasAttributedTo ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 12 ; sh:path ], [ sh:datatype xsd:string ; - sh:description "Regulatory classification (e.g. an FDA device class), where applicable." ; - sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 7 ; - sh:path bbqs:regulatory_class ], - [ sh:description "The node IRI — minted from resources.id." ; - sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 0 ; - sh:path ], - [ sh:class prov:Agent ; + sh:order 4 ; + sh:path bbqs:output_signals ], + [ sh:description "resources.external_url — canonical off-graph URL." ; sh:maxCount 1 ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 21 ; - sh:path prov:wasAttributedTo ], - [ sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 8 ; + sh:order 3 ; sh:path ], - [ sh:datatype xsd:dateTime ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 8 ; - sh:path ], [ sh:description "The rdf:type discriminator, from resources.resource_type." ; sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; sh:maxCount 1 ; sh:order 15 ; sh:path bbqs:resourceType ], + [ sh:class ; + sh:description "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 16 ; + sh:path ], + [ sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 2 ; + sh:path ], [ sh:class prov:Activity ; sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 9 ; + sh:order 20 ; sh:path prov:wasGeneratedBy ], + [ sh:datatype xsd:dateTime ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 8 ; + sh:path ], [ sh:class ; - sh:description "resources.organization_id." ; + sh:description "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 16 ; + sh:order 5 ; sh:path ], - [ sh:datatype xsd:float ; + [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path bbqs:sampling_rate_hz ], + sh:order 18 ; + sh:path ], + [ sh:description "The node IRI — minted from resources.id." ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 11 ; + sh:path ], + [ sh:datatype xsd:string ; + sh:description "resources.metadata JSON overflow — un-promoted fields." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 6 ; + sh:path bbqs:metadata ], + [ sh:class prov:Activity ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 9 ; + sh:path prov:wasGeneratedBy ], + [ sh:class prov:Agent ; + sh:maxCount 1 ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 10 ; + sh:path prov:wasAttributedTo ], + [ sh:class ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 2 ; + sh:path ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; @@ -2104,35 +2107,45 @@ prov:Association a sh:NodeShape ; sh:order 19 ; sh:path ], [ sh:datatype xsd:string ; + sh:description "resources.metadata JSON overflow — un-promoted fields." ; + sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path ], - [ sh:class ; + sh:order 17 ; + sh:path bbqs:metadata ], + [ sh:description "resources.external_url — canonical off-graph URL." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 2 ; - sh:path ], + sh:order 14 ; + sh:path ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 1 ; sh:path ], - [ sh:nodeKind sh:IRI ; - sh:order 10 ; - sh:path bbqs:sdk_urls ], - [ sh:class prov:Agent ; + [ sh:class skos:Concept ; + sh:description "device_models.device_class → DeviceCategory.key." ; sh:maxCount 1 ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 10 ; - sh:path prov:wasAttributedTo ], - [ sh:nodeKind sh:IRI ; - sh:order 11 ; - sh:path dcterms:source ], + sh:nodeKind sh:IRI ; + sh:order 1 ; + sh:path ], [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 18 ; - sh:path ] ; + sh:order 7 ; + sh:path ], + [ sh:datatype xsd:float ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 5 ; + sh:path bbqs:sampling_rate_hz ], + [ sh:description "The node IRI — minted from resources.id." ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 0 ; + sh:path ], + [ sh:nodeKind sh:IRI ; + sh:order 11 ; + sh:path dcterms:source ] ; sh:targetClass . a sh:NodeShape ; @@ -2141,81 +2154,68 @@ prov:Association a sh:NodeShape ; true ; sh:ignoredProperties ( rdf:type ), ( rdf:type ) ; - sh:property [ sh:nodeKind sh:IRI ; - sh:order 18 ; - sh:path dcterms:source ], - [ sh:datatype xsd:string ; + sh:property [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 2 ; - sh:path ], + sh:order 15 ; + sh:path ], + [ sh:datatype xsd:dateTime ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 14 ; + sh:path ], [ sh:class prov:Activity ; sh:nodeKind sh:BlankNodeOrIRI ; sh:order 16 ; sh:path prov:wasGeneratedBy ], [ sh:datatype xsd:string ; + sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 6 ; + sh:order 0 ; sh:path ], - [ sh:description "The node IRI — minted from resources.id." ; + [ sh:datatype xsd:string ; + sh:description "Linnaean family for the species (e.g. Muridae)." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 4 ; + sh:path bbqs:taxonomy_family ], + [ sh:description "NCBITaxon IRI (align species to NCBI)." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 7 ; + sh:order 1 ; sh:path ], - [ sh:datatype xsd:dateTime ; + [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 14 ; - sh:path ], - [ sh:description "The rdf:type discriminator, from resources.resource_type." ; - sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; - sh:maxCount 1 ; - sh:order 11 ; - sh:path bbqs:resourceType ], - [ sh:description "resources.external_url — canonical off-graph URL." ; - sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 10 ; - sh:path ], + sh:order 9 ; + sh:path ], [ sh:datatype xsd:string ; sh:description "Linnaean order for the species (e.g. Rodentia)." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 3 ; sh:path bbqs:taxonomy_order ], - [ sh:datatype xsd:dateTime ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 15 ; - sh:path ], - [ sh:class ; - sh:description "resources.organization_id." ; - sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 12 ; - sh:path ], - [ sh:datatype xsd:string ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 8 ; - sh:path ], [ sh:datatype xsd:string ; - sh:description "Linnaean family for the species (e.g. Muridae)." ; - sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 4 ; - sh:path bbqs:taxonomy_family ], + sh:order 6 ; + sh:path ], [ sh:datatype xsd:string ; sh:description "Linnaean genus for the species (e.g. Mus)." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 5 ; sh:path bbqs:taxonomy_genus ], - [ sh:description "NCBITaxon IRI (align species to NCBI)." ; + [ sh:class ; + sh:description "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 1 ; - sh:path ], + sh:order 12 ; + sh:path ], + [ sh:class prov:Agent ; + sh:maxCount 1 ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 17 ; + sh:path prov:wasAttributedTo ], [ sh:datatype xsd:string ; sh:description "resources.metadata JSON overflow — un-promoted fields." ; sh:maxCount 1 ; @@ -2225,404 +2225,402 @@ prov:Association a sh:NodeShape ; [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 9 ; - sh:path ], - [ sh:class prov:Agent ; + sh:order 2 ; + sh:path ], + [ sh:description "The node IRI — minted from resources.id." ; sh:maxCount 1 ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 17 ; - sh:path prov:wasAttributedTo ], + sh:nodeKind sh:IRI ; + sh:order 7 ; + sh:path ], + [ sh:description "resources.external_url — canonical off-graph URL." ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 10 ; + sh:path ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path ] ; + sh:order 8 ; + sh:path ], + [ sh:nodeKind sh:IRI ; + sh:order 18 ; + sh:path dcterms:source ], + [ sh:description "The rdf:type discriminator, from resources.resource_type." ; + sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; + sh:maxCount 1 ; + sh:order 11 ; + sh:path bbqs:resourceType ] ; sh:targetClass . -skos:Concept a sh:NodeShape ; - rdfs:comment "A behavior or behavioral phenotype under study. RESERVED hook.", - "A cognitive task/paradigm or construct. RESERVED hook.", - "A nervous-system structure a signal is recorded from. RESERVED hook.", - "A provenance source category (source_classes) graded by reliability — whether the who/what behind a value is human, agent, harvester, RePORTER, etc., and how much it is trusted.", - "One of the ~32 canonical BBQS device categories (device_categories: key/label/measures[]/typical_use_cases[]). A SKOS concept scheme; each maps to a schema.org type and (via device_class_crosswalk) to external classes." ; - sh:closed true ; + a sh:NodeShape ; + rdfs:comment "A consortium member. May be a PI, co-I, trainee, collaborator, or a member who is on NO project (III. Live State — membership is not project-derived). Per-project role lives on the ProjectRole edge, NOT here (issue #283)." ; + sh:closed false, + true ; sh:ignoredProperties ( rdf:type ), - ( rdf:type ), - ( rdf:type ), - ( rdf:type ), ( rdf:type ) ; - sh:property [ sh:class prov:Activity ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 14 ; - sh:path prov:wasGeneratedBy ], - [ sh:datatype xsd:string ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path skos:notation ], - [ sh:datatype xsd:string ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 1 ; - sh:path skos:prefLabel ], - [ sh:datatype xsd:dateTime ; + sh:property [ sh:datatype xsd:integer ; + sh:description "NIH RePORTER profile id." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 13 ; - sh:path ], + sh:order 10 ; + sh:path bbqs:reporter_profile_id ], [ sh:datatype xsd:string ; - sh:description "human | agent | harvester | reporter …" ; + sh:description "Google Scholar id." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 3 ; - sh:path bbqs:agent_kind ], - [ sh:datatype xsd:string ; - sh:description "What this device category measures (behavior/neural/physio…)." ; - sh:nodeKind sh:Literal ; - sh:order 2 ; - sh:path bbqs:measures ], + sh:path bbqs:scholar_id ], [ sh:class prov:Agent ; sh:maxCount 1 ; sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 15 ; + sh:order 22 ; sh:path prov:wasAttributedTo ], [ sh:datatype xsd:string ; + sh:description "investigators.role — ONE free-text label; never a machine token (issue #283)." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path ], + sh:order 5 ; + sh:path ], + [ sh:class prov:Association ; + sh:description "ProjectRole edges this investigator holds, across all projects." ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 11 ; + sh:path bbqs:held_project_roles ], [ sh:datatype xsd:string ; - sh:description "device_categories.key." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path skos:notation ], - [ sh:datatype xsd:dateTime ; + sh:order 14 ; + sh:path ], + [ sh:class ; + sh:nodeKind sh:IRI ; + sh:order 8 ; + sh:path ], + [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 12 ; - sh:path ], - [ sh:datatype xsd:string ; + sh:order 13 ; + sh:path ], + [ sh:description "resources.external_url — canonical off-graph URL." ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 15 ; + sh:path ], + [ sh:class ; + sh:nodeKind sh:IRI ; + sh:order 9 ; + sh:path bbqs:requested_groups ], + [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 7 ; - sh:path ], + sh:order 19 ; + sh:path ], [ sh:description "The rdf:type discriminator, from resources.resource_type." ; sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; sh:maxCount 1 ; - sh:order 9 ; + sh:order 16 ; sh:path bbqs:resourceType ], - [ sh:datatype xsd:string ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 2 ; - sh:path ], - [ sh:class ; - sh:description "resources.organization_id." ; + [ sh:description "ORCID iD (orcid: prefix)." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 10 ; - sh:path ], - [ sh:datatype xsd:boolean ; + sh:order 2 ; + sh:path ], + [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path bbqs:is_verified ], + sh:order 4 ; + sh:path ], [ sh:nodeKind sh:IRI ; - sh:order 16 ; + sh:order 23 ; sh:path dcterms:source ], + [ sh:class prov:Activity ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 21 ; + sh:path prov:wasGeneratedBy ], + [ sh:description "The node IRI — minted from resources.id." ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 12 ; + sh:path ], [ sh:datatype xsd:string ; + sh:nodeKind sh:Literal ; + sh:order 7 ; + sh:path bbqs:skills ], + [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 1 ; - sh:path skos:prefLabel ], - [ sh:datatype xsd:integer ; - sh:description "Source reliability grade." ; + sh:order 20 ; + sh:path ], + [ sh:class ; + sh:description "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 17 ; + sh:path ], + [ sh:datatype xsd:string ; + sh:description "resources.metadata JSON overflow — un-promoted fields." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 4 ; - sh:path bbqs:grade ], + sh:order 18 ; + sh:path bbqs:metadata ], [ sh:datatype xsd:string ; sh:nodeKind sh:Literal ; - sh:order 3 ; - sh:path bbqs:typical_use_cases ], + sh:order 1 ; + sh:path ], [ sh:datatype xsd:string ; - sh:description "device_categories.schema_org_type — the schema.org type this category maps to." ; + sh:description "PII — restricted in the public API/graph export." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 4 ; - sh:path bbqs:schema_org_type ], - [ sh:description "The node IRI — minted from resources.id." ; - sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 5 ; - sh:path ], - [ sh:description "resources.external_url — canonical off-graph URL." ; - sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 8 ; - sh:path ], + sh:order 0 ; + sh:path ], [ sh:datatype xsd:string ; - sh:description "resources.metadata JSON overflow — un-promoted fields." ; - sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 11 ; - sh:path bbqs:metadata ] ; - sh:targetClass skos:Concept . + sh:order 6 ; + sh:path bbqs:research_areas ] ; + sh:targetClass . - a sh:NodeShape ; - rdfs:comment "A consortium member. May be a PI, co-I, trainee, collaborator, or a member who is on NO project (III. Live State — membership is not project-derived). Per-project role lives on the ProjectRole edge, NOT here (issue #283)." ; - sh:closed false, - true ; +skos:Concept a sh:NodeShape ; + rdfs:comment "A behavior or behavioral phenotype under study. RESERVED hook.", + "A cognitive task/paradigm or construct. RESERVED hook.", + "A nervous-system structure a signal is recorded from. RESERVED hook.", + "A provenance source category (source_classes) graded by reliability — whether the who/what behind a value is human, agent, harvester, RePORTER, etc., and how much it is trusted.", + "One of the ~32 canonical BBQS device categories (device_categories: key/label/measures[]/typical_use_cases[]). A SKOS concept scheme; each maps to a schema.org type and (via device_class_crosswalk) to external classes." ; + sh:closed true ; sh:ignoredProperties ( rdf:type ), + ( rdf:type ), + ( rdf:type ), + ( rdf:type ), ( rdf:type ) ; sh:property [ sh:datatype xsd:string ; sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path bbqs:research_areas ], + sh:order 3 ; + sh:path bbqs:typical_use_cases ], + [ sh:class prov:Activity ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 14 ; + sh:path prov:wasGeneratedBy ], [ sh:datatype xsd:string ; - sh:description "investigators.role — ONE free-text label; never a machine token (issue #283)." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path ], - [ sh:datatype xsd:string ; - sh:description "Google Scholar id." ; + sh:order 2 ; + sh:path ], + [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 3 ; - sh:path bbqs:scholar_id ], + sh:order 12 ; + sh:path ], [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 19 ; - sh:path ], + sh:order 13 ; + sh:path ], + [ sh:class prov:Agent ; + sh:maxCount 1 ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 15 ; + sh:path prov:wasAttributedTo ], [ sh:datatype xsd:string ; + sh:description "What this device category measures (behavior/neural/physio…)." ; + sh:nodeKind sh:Literal ; + sh:order 2 ; + sh:path bbqs:measures ], + [ sh:datatype xsd:boolean ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 4 ; - sh:path ], - [ sh:description "ORCID iD (orcid: prefix)." ; - sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 2 ; - sh:path ], - [ sh:description "resources.external_url — canonical off-graph URL." ; + sh:order 5 ; + sh:path bbqs:is_verified ], + [ sh:datatype xsd:string ; sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 15 ; - sh:path ], + sh:nodeKind sh:Literal ; + sh:order 1 ; + sh:path skos:prefLabel ], [ sh:class ; - sh:description "resources.organization_id." ; + sh:description "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 17 ; + sh:order 10 ; sh:path ], - [ sh:class ; - sh:nodeKind sh:IRI ; - sh:order 9 ; - sh:path bbqs:requested_groups ], - [ sh:datatype xsd:integer ; - sh:description "NIH RePORTER profile id." ; + [ sh:datatype xsd:string ; + sh:description "human | agent | harvester | reporter …" ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 10 ; - sh:path bbqs:reporter_profile_id ], - [ sh:class prov:Activity ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 21 ; - sh:path prov:wasGeneratedBy ], + sh:order 3 ; + sh:path bbqs:agent_kind ], + [ sh:datatype xsd:string ; + sh:description "resources.metadata JSON overflow — un-promoted fields." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 11 ; + sh:path bbqs:metadata ], [ sh:datatype xsd:string ; + sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 7 ; - sh:path bbqs:skills ], + sh:path ], [ sh:datatype xsd:string ; + sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 1 ; - sh:path ], - [ sh:datatype xsd:dateTime ; + sh:path skos:prefLabel ], + [ sh:description "resources.external_url — canonical off-graph URL." ; sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 20 ; - sh:path ], + sh:nodeKind sh:IRI ; + sh:order 8 ; + sh:path ], [ sh:nodeKind sh:IRI ; - sh:order 23 ; + sh:order 16 ; sh:path dcterms:source ], [ sh:datatype xsd:string ; - sh:description "PII — restricted in the public API/graph export." ; + sh:description "device_categories.schema_org_type — the schema.org type this category maps to." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path ], - [ sh:class ; - sh:nodeKind sh:IRI ; - sh:order 8 ; - sh:path ], - [ sh:class prov:Association ; - sh:description "ProjectRole edges this investigator holds, across all projects." ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 11 ; - sh:path bbqs:held_project_roles ], + sh:order 4 ; + sh:path bbqs:schema_org_type ], [ sh:description "The rdf:type discriminator, from resources.resource_type." ; sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; sh:maxCount 1 ; - sh:order 16 ; + sh:order 9 ; sh:path bbqs:resourceType ], - [ sh:datatype xsd:string ; - sh:description "resources.metadata JSON overflow — un-promoted fields." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 18 ; - sh:path bbqs:metadata ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 14 ; - sh:path ], - [ sh:datatype xsd:string ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 13 ; + sh:order 6 ; sh:path ], [ sh:description "The node IRI — minted from resources.id." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 12 ; + sh:order 5 ; sh:path ], - [ sh:class prov:Agent ; + [ sh:datatype xsd:string ; + sh:description "device_categories.key." ; sh:maxCount 1 ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 22 ; - sh:path prov:wasAttributedTo ] ; - sh:targetClass . + sh:nodeKind sh:Literal ; + sh:order 0 ; + sh:path skos:notation ], + [ sh:datatype xsd:integer ; + sh:description "Source reliability grade." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 4 ; + sh:path bbqs:grade ], + [ sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 0 ; + sh:path skos:notation ] ; + sh:targetClass skos:Concept . a sh:NodeShape ; rdfs:comment "A university, institute, or lab participating in BBQS." ; sh:closed true ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:description "The rdf:type discriminator, from resources.resource_type." ; + sh:property [ sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 0 ; + sh:path ], + [ sh:description "The rdf:type discriminator, from resources.resource_type." ; sh:in ( "investigator" "organization" "grant" "publication" "software" "tool" "dataset" "protocol" "benchmark" "ml_model" "job" "announcement" "funding" "species" "algorithm" "device" "device_category" "device_manufacturer" "working_group" "event" "standard" ) ; sh:maxCount 1 ; sh:order 6 ; sh:path bbqs:resourceType ], - [ sh:class ; - sh:nodeKind sh:IRI ; - sh:order 1 ; - sh:path ], + [ sh:nodeKind sh:IRI ; + sh:order 13 ; + sh:path dcterms:source ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 4 ; sh:path ], - [ sh:datatype xsd:dateTime ; + [ sh:description "resources.external_url — canonical off-graph URL." ; sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 10 ; - sh:path ], - [ sh:class prov:Activity ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 11 ; - sh:path prov:wasGeneratedBy ], - [ sh:maxCount 1 ; sh:nodeKind sh:IRI ; - sh:order 0 ; - sh:path ], - [ sh:datatype xsd:dateTime ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 9 ; - sh:path ], - [ sh:datatype xsd:string ; - sh:description "resources.metadata JSON overflow — un-promoted fields." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 8 ; - sh:path bbqs:metadata ], - [ sh:class prov:Agent ; - sh:maxCount 1 ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 12 ; - sh:path prov:wasAttributedTo ], + sh:order 5 ; + sh:path ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 3 ; sh:path ], [ sh:class ; - sh:description "resources.organization_id." ; + sh:description "resources.organization_id, or the organization_id of a project's or job's own row (projects, public_jobs). For a job, this link is its institution." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; sh:order 7 ; sh:path ], - [ sh:description "resources.external_url — canonical off-graph URL." ; + [ sh:class prov:Agent ; sh:maxCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 5 ; - sh:path ], - [ sh:nodeKind sh:IRI ; - sh:order 13 ; - sh:path dcterms:source ], + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 12 ; + sh:path prov:wasAttributedTo ], [ sh:description "The node IRI — minted from resources.id." ; sh:maxCount 1 ; sh:nodeKind sh:IRI ; sh:order 2 ; - sh:path ] ; + sh:path ], + [ sh:datatype xsd:string ; + sh:description "resources.metadata JSON overflow — un-promoted fields." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 8 ; + sh:path bbqs:metadata ], + [ sh:class prov:Activity ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 11 ; + sh:path prov:wasGeneratedBy ], + [ sh:class ; + sh:nodeKind sh:IRI ; + sh:order 1 ; + sh:path ], + [ sh:datatype xsd:dateTime ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 10 ; + sh:path ], + [ sh:datatype xsd:dateTime ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 9 ; + sh:path ] ; sh:targetClass . prov:Activity a sh:NodeShape ; rdfs:comment "Field-level provenance (field_provenance): one assertion that a given (entity_table, entity_column, entity_id) value was generated by an activity, attributed to an agent, from a graded source_class, with confidence/evidence. Reifies PROV onto individual cell writes." ; sh:closed true ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:datatype xsd:string ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 8 ; - sh:path bbqs:prov_source_ref ], - [ sh:datatype xsd:string ; + sh:property [ sh:datatype xsd:float ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 3 ; - sh:path bbqs:prov_value_text ], + sh:order 9 ; + sh:path bbqs:prov_confidence ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 14 ; - sh:path bbqs:prov_model_id ], + sh:order 6 ; + sh:path prov:agent ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path bbqs:prov_agent_id ], + sh:order 2 ; + sh:path bbqs:prov_entity_id ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 12 ; sh:path bbqs:prov_recorded_by ], - [ sh:class skos:Concept ; - sh:maxCount 1 ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 7 ; - sh:path prov:hadPrimarySource ], - [ sh:datatype xsd:dateTime ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 11 ; - sh:path bbqs:prov_recorded_at ], - [ sh:datatype xsd:float ; + [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 9 ; - sh:path bbqs:prov_confidence ], + sh:order 14 ; + sh:path bbqs:prov_model_id ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 2 ; - sh:path bbqs:prov_entity_id ], + sh:order 1 ; + sh:path bbqs:prov_entity_column ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 13 ; - sh:path bbqs:prov_evidence ], + sh:order 5 ; + sh:path bbqs:prov_agent_id ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; @@ -2631,23 +2629,38 @@ prov:Activity a sh:NodeShape ; [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 1 ; - sh:path bbqs:prov_entity_column ], + sh:order 8 ; + sh:path bbqs:prov_source_ref ], + [ sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 13 ; + sh:path bbqs:prov_evidence ], [ sh:datatype xsd:dateTime ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 10 ; - sh:path bbqs:prov_authored_at ], + sh:order 11 ; + sh:path bbqs:prov_recorded_at ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path prov:agent ], + sh:order 3 ; + sh:path bbqs:prov_value_text ], + [ sh:class skos:Concept ; + sh:maxCount 1 ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 7 ; + sh:path prov:hadPrimarySource ], [ sh:datatype xsd:string ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 4 ; - sh:path prov:activity ] ; + sh:path prov:activity ], + [ sh:datatype xsd:dateTime ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 10 ; + sh:path bbqs:prov_authored_at ] ; sh:targetClass prov:Activity . prov:Agent a sh:NodeShape ; diff --git a/kg/bbqs_kg.py b/kg/bbqs_kg.py index f280b824..c9ff9bd7 100644 --- a/kg/bbqs_kg.py +++ b/kg/bbqs_kg.py @@ -26,10 +26,17 @@ from rdflib import Graph, Literal, Namespace, URIRef from rdflib.namespace import RDF, XSD +from identity_keys import nih_award_core, orcid_key + HERE = Path(__file__).resolve().parent BBQS = Namespace("https://brain-bbqs.org/schema#") BID = Namespace("https://brain-bbqs.org/id/") +# The resource_links predicates the exporter writes, each a kg/bbqs.linkml.yaml slot: the predicates +# resource_links_predicate_check lets the table hold (tests/guards/kg-resource-links-parity holds +# the two equal). A row with any other predicate is never written. +RESOURCE_LINK_SLOTS = frozenset({"trained_on", "evaluates", "was_attributed_to", "produced", "revision_of"}) + # resources.resource_type -> bbqs class local name. A type absent here (e.g. deprecated `project`) # is NOT minted as a node. TYPE_CLASS = { @@ -41,6 +48,27 @@ "working_group": "WorkingGroup", "event": "Event", "standard": "Standard", } +# The columns anon may read of the objects whose anon access is column by column (migration +# 20261117190000_hide_private_columns_from_anon). PostgREST runs select=* as SELECT *, which needs +# every column, so anon is refused it on these: fetch() asks for these columns instead. None is a +# private column (auth user id, e-mail address, review note); tests/guards/anon-private-columns +# checks that against the migration, and test_exporter.py serves these objects the way PostgREST +# does after it. Every column here exists live (types.ts), so the lists work before the migration too. +# projects.metadata, every questionnaire answer, is not anon's since 20261118120000_privacy_round_two, +# and the export writes nothing from it, so it is not asked for. +PUBLIC_COLUMNS = { + "resources": "id,name,resource_type,description,external_url,metadata,organization_id,created_at,updated_at", + "projects": "id,grant_number,grant_id,organization_id,resource_id,metadata_completeness,keywords," + "study_species,study_human,website,onboarding_status,created_at,updated_at", + "investigators_public": "id,name,orcid,profile_url,role,working_groups,research_areas,skills,resource_id," + "scholar_id,created_at,updated_at,onboarded", + "dandisets": "id,resource_id,instance,dandiset_id,name,description,contact_name,file_count,size_bytes," + "license,access,species,award_numbers,draft_url,api_url,neurosift_url,last_synced_at," + "created_at,updated_at", + "announcements": "id,title,content,link,link_text,is_external_link,organization_id,resource_id," + "created_at,updated_at", +} + def _shown(path) -> str: """A path for log lines, relative to kg/ when it can be (relpath fails across Windows drives).""" @@ -51,7 +79,7 @@ def _shown(path) -> str: class BBQSKnowledgeGraph: - """Exports the BBQS KG from Supabase and validates it against the SHACL consistency shapes.""" + """Exports the BBQS KG from Supabase and validates it against the SHACL validation shapes.""" DEFAULT_EXPORT_PATH = HERE / "export" / "bbqs.ttl" DEFAULT_SHAPES_DIR = HERE / "shapes" @@ -67,6 +95,8 @@ def __init__(self, url=None, key=None): self.graph = Graph() self.graph.bind("bbqs", BBQS) self.graph.bind("bid", BID) + self.unreadable = {} # table -> why fetch() got no rows (HTTP status, PostgREST code) + self.missing_columns = {} # table -> PUBLIC_COLUMNS entries this database does not have (42703) @staticmethod def _client_default(js_const): @@ -79,17 +109,46 @@ def _client_default(js_const): return m.group(1) if m else None def fetch(self, table, select="*"): - """All rows of a table via PostgREST (tables here are < 1000 rows, so one request).""" - req = urllib.request.Request( - f"{self.url}/rest/v1/{table}?select={select}", - headers={"apikey": self.key, "Authorization": f"Bearer {self.key}", "Range": "0-9999"}, - ) - try: - with urllib.request.urlopen(req, timeout=60) as r: - return json.loads(r.read() or "[]") - except urllib.error.HTTPError as e: - print(f" ! {table}: HTTP {e.code} (RLS hidden or missing)", file=sys.stderr) - return [] + """All rows of a table via PostgREST (tables here are < 1000 rows, so one request). + + "*" means every column anon may read: PUBLIC_COLUMNS for an object anon reads column by column. + + A table or view this key may not read, or that does not exist (a migration not applied yet), + gives no rows: the export goes on without it, and the reason is printed and kept in + self.unreadable, e.g. "HTTP 404 42P01" (missing) or "HTTP 401 42501" (refused).""" + if select == "*": + select = PUBLIC_COLUMNS.get(table, "*") + columns = None if select == "*" else [c.strip() for c in select.split(",") if c.strip()] + if columns: # a column found missing earlier in this run: not asked again + columns = [c for c in columns if c not in self.missing_columns.get(table, ())] or columns + while True: + req = urllib.request.Request( + f"{self.url}/rest/v1/{table}?select={','.join(columns) if columns else '*'}", + headers={"apikey": self.key, "Authorization": f"Bearer {self.key}", "Range": "0-9999"}, + ) + try: + with urllib.request.urlopen(req, timeout=60) as r: + return json.loads(r.read() or "[]") + except urllib.error.HTTPError as e: + try: # PostgREST names the cause in the body: 42P01, PGRST205, 42501 + body = json.loads(e.read() or b"{}") + code, message = body.get("code") or "", body.get("message") or "" + except (AttributeError, OSError, TypeError, ValueError): + code, message = "", "" + # A column this database does not have (42703: an older or newer schema than the one + # PUBLIC_COLUMNS names) costs that one column, not the whole table: drop it, say so, and + # ask again. Anything else still gives no rows. + gone = re.search(r'column (?:"?\w+"?\.)?"?(\w+)"? does not exist', message) + if code == "42703" and columns and gone and gone.group(1) in columns: + columns.remove(gone.group(1)) + self.missing_columns.setdefault(table, []).append(gone.group(1)) + print(f" ! {table}: column {gone.group(1)} does not exist in this database; " + "exported without it", file=sys.stderr) + if columns: + continue + self.unreadable[table] = f"HTTP {e.code}" + (f" {code}" if code else "") + print(f" ! {table}: {self.unreadable[table]} (RLS hidden or missing)", file=sys.stderr) + return [] @staticmethod def mechanism(grant_number): @@ -99,15 +158,25 @@ def mechanism(grant_number): @staticmethod def orcid_iri(value): - """An ORCID iD in any common form ('0000-...', 'orcid.org/...', a full URL) -> its IRI.""" - m = re.search(r"(\d{4}-\d{4}-\d{4}-\d{3}[\dX])", str(value or "")) - return URIRef(f"https://orcid.org/{m.group(1)}") if m else None + """An ORCID iD in any common form ('0000-...', 'orcid.org/...', a full URL, a lower-case x) -> + its one IRI, by the ORCID key (kg/identity_keys.py) the database's unique index uses.""" + key = orcid_key(value) if value else None + return URIRef(f"https://orcid.org/{key}") if key else None @staticmethod def core_award(value): - """'1R34DA059723-01' / 'R34DA059723' -> 'R34DA059723', the form grants.grant_number holds.""" - m = re.search(r"[A-Z][A-Z0-9]{2}[A-Z]{2}\d{6}", str(value or "").upper()) - return m.group(0) if m else None + """'1R34DA059723-01' / 'R34DA059723' -> 'R34DA059723', the form grants.grant_number holds + (the NIH core, kg/identity_keys.py's nih_award_core).""" + return nih_award_core(value) if value else None + + @staticmethod + def timestamp(value): + """A timestamptz as PostgREST writes it ('2026-12-31T23:59:59+00:00') -> an xsd:dateTime literal. + Anything else -> None: not written, rather than written as a literal of the wrong type.""" + text = str(value or "").strip() + if re.fullmatch(r"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})?", text): + return Literal(text, datatype=XSD.dateTime) + return None def add(self, subj, pred, value, cast=str, datatype=None): if value is not None and value != "": @@ -134,6 +203,7 @@ def id_map(table): # resource_id, so every role holder resolves either way. inv_node = {**id_map("investigators_public"), **id_map("investigators")} grant_node, gn_node, cat_node, wg_node, proj_node, pub_node = {}, {}, {}, {}, {}, {} + spine_class = {} # spine node -> its class, to attach detail rows by type # ---- 1. Node spine: one node per resources row, typed by resource_type ---- skipped = collections.Counter() @@ -143,6 +213,7 @@ def id_map(table): skipped[r["resource_type"]] += 1 continue n = BID[r["id"]] + spine_class[n] = cls g.add((n, RDF.type, BBQS[cls])) if cls == "WorkingGroup" and r.get("name"): wg_node[r["name"].strip().lower()] = n @@ -246,11 +317,13 @@ def resolve_species(value): if str(name).strip().lower() in not_applicable: self.add(n, "study_scope", name) # names no species by design (e.g. infra awards) continue - self.add(n, "studies_species_name", name) # the raw claim, verbatim + # Link, don't copy: a claim that resolves is the studies_species link alone (the name + # is the Species node's); only a claim with no node to link to is kept as text. target = resolve_species(name) if target is not None: g.add((n, BBQS["studies_species"], target)) else: + self.add(n, "studies_species_unresolved", name) dangling_species.append((p["grant_number"], name)) # Device categories (build key -> node for device_models), then models and manufacturers. @@ -264,6 +337,9 @@ def resolve_species(value): self.add(n, "label", cat.get("label")) for meas in cat.get("measures") or []: self.add(n, "measures", meas) + for use in cat.get("typical_use_cases") or []: + self.add(n, "typical_use_cases", use) + self.add(n, "schema_org_type", cat.get("schema_org_type")) for dm in self.fetch("device_models"): rid = dm.get("resource_id") if not rid: @@ -275,14 +351,39 @@ def resolve_species(value): if dm.get("manufacturer_id") and dm["manufacturer_id"] in man_node: g.add((n, BBQS["manufacturer"], man_node[dm["manufacturer_id"]])) self.add(n, "sampling_rate_hz", dm.get("sampling_rate_hz"), cast=None) + # The rest of what the catalog says about a model, slot for slot as bbqs.linkml.yaml declares it. + for al in dm.get("aliases") or []: + self.add(n, "aliases", al) + for sig in dm.get("output_signals") or []: + self.add(n, "output_signals", sig) + self.add(n, "price_tier", dm.get("price_tier")) + self.add(n, "regulatory_class", dm.get("regulatory_class")) + self.add(n, "product_url", dm.get("product_url"), datatype=XSD.anyURI) + for url in dm.get("manual_urls") or []: + self.add(n, "manual_urls", url, datatype=XSD.anyURI) + for url in dm.get("sdk_urls") or []: + self.add(n, "sdk_urls", url, datatype=XSD.anyURI) for man in self.fetch("device_manufacturers"): rid = man.get("resource_id") if not rid: continue n = BID[rid] self.add(n, "homepage_url", man.get("homepage_url"), datatype=XSD.anyURI) + self.add(n, "country", man.get("country")) for al in man.get("aliases") or []: self.add(n, "aliases", al) + # Which kinds of instrument each project uses: the project_device_usage view (anon-readable), + # one row per project and device category its methods evidence names. A row whose project or + # category has no node is skipped, not written as a dangling link. + uses = 0 + core = {re.sub(r"^\d|-\w+$", "", k or ""): n for k, n in gn_node.items()} # 1R34DA059723-01 -> R34DA059723 + for u in self.fetch("project_device_usage"): + proj = (proj_node.get(u.get("project_id")) or gn_node.get(u.get("grant_number")) + or core.get(re.sub(r"^\d|-\w+$", "", u.get("grant_number") or ""))) + cat = cat_node.get(u.get("category_key")) + if proj is not None and cat is not None and (proj, BBQS["uses_device_category"], cat) not in g: + g.add((proj, BBQS["uses_device_category"], cat)) + uses += 1 for pub in self.fetch("publications"): rid = pub.get("resource_id") @@ -321,6 +422,37 @@ def resolve_species(value): for code in fo.get("eligible_activity_codes") or []: self.add(n, "eligible_activity_codes", code) + # Jobs: what the job board shows anyone, from the public_jobs view (the jobs table itself is not + # anon-readable; its contact fields and posted_by are hidden on purpose, 20260515233153, and + # are never read here). Each row goes onto its Job spine node; a row with none is skipped. + # Link, don't copy: the institution is the part_of_org link wherever an organization node + # resolves (the spine row's, or the job row's own organization_id), and the text as written + # (job_institution) only for a job with no such link. + job_rows, jobs_unnoded, bad_expiry = [], 0, 0 + for jb in self.fetch("public_jobs"): + n = BID[jb["resource_id"]] if jb.get("resource_id") else None + if spine_class.get(n) != "Job": + jobs_unnoded += 1 + continue + job_rows.append((n, jb)) + for col in ("job_type", "location", "department"): + self.add(n, col, jb.get(col)) + self.add(n, "application_url", jb.get("application_url"), datatype=XSD.anyURI) + expires = self.timestamp(jb.get("expires_at")) + if expires is not None: + g.add((n, BBQS["expires_at"], expires)) + elif jb.get("expires_at"): + bad_expiry += 1 + if jb.get("is_active") is not None: + g.add((n, BBQS["is_active"], Literal(bool(jb["is_active"])))) + if jb.get("organization_id") in org_node: + g.add((n, BBQS["part_of_org"], org_node[jb["organization_id"]])) + jobs_as_text = set() + for n, jb in job_rows: # after every row's link, so row order cannot matter + if (n, BBQS["part_of_org"], None) not in g and str(jb.get("institution") or "").strip(): + self.add(n, "job_institution", jb["institution"]) + jobs_as_text.add(n) + for o in self.fetch("organizations"): # name/description already come from the spine row rid = o.get("resource_id") if rid: @@ -350,6 +482,20 @@ def resolve_species(value): org, inv = org_node.get(io.get("organization_id")), inv_node.get(io.get("investigator_id")) if org is not None and inv is not None: g.add((org, BBQS["members"], inv)) + # Curated links between two spine rows (resource_links, 20261116150000; revision_of since + # 20261117181500): one row is one (subject, bbqs:, object) link. Written only for a + # predicate in RESOURCE_LINK_SLOTS and only between two typed nodes: a row whose end is gone, + # or is a type the spine skips, is left out rather than written as a dangling link. A table + # not there yet (its migration not applied) gives no rows and a note, and the export goes on. + links_written = links_skipped = 0 + for rl in self.fetch("resource_links", "subject_id,predicate,object_id"): + s = BID[rl["subject_id"]] if rl.get("subject_id") else None + o = BID[rl["object_id"]] if rl.get("object_id") else None + if rl.get("predicate") in RESOURCE_LINK_SLOTS and s in spine_class and o in spine_class: + g.add((s, BBQS[rl["predicate"]], o)) + links_written += 1 + else: + links_skipped += 1 for pp in self.fetch("project_publications"): proj, pub = proj_node.get(pp.get("project_id")), pub_node.get(pp.get("publication_id")) if proj is not None and pub is not None: @@ -368,6 +514,16 @@ def resolve_species(value): proj, ds = grant_node.get(gd.get("grant_id")), dandi_node.get(gd.get("dandiset_id")) if proj is not None and ds is not None: g.add((proj, BBQS["funded_datasets"], ds)) + # Who posted each job: public_job_posters (20261117170000) pairs a job's spine row with its + # poster's investigator spine row and holds nothing else; jobs.posted_by, an auth user id, stays + # hidden. Written only as a link between a Job node and an Investigator node. + posted = set() + for jp in self.fetch("public_job_posters"): + job = BID[jp["job_resource_id"]] if jp.get("job_resource_id") else None + person = BID[jp["poster_resource_id"]] if jp.get("poster_resource_id") else None + if spine_class.get(job) == "Job" and spine_class.get(person) == "Investigator": + g.add((job, BBQS["posted_by"], person)) + posted.add((job, person)) # ---- 4. Reified per-project role (grant_investigators) ---- roles = 0 @@ -392,6 +548,18 @@ def resolve_species(value): print(f"Wrote {out_path}: {len(g)} triples") print("Nodes by type: " + ", ".join(f"{k}={v}" for k, v in sorted(counts.items()))) print(f"ProjectRole edges: {roles}") + print(f"uses_device_category edges: {uses}") + print(f"Job details (public_jobs): {len(job_rows)} rows on a Job node" + + (f", {jobs_unnoded} with no Job node (skipped)" if jobs_unnoded else "") + + f"; institution kept as text for {len(jobs_as_text)} jobs (no organization node to link)" + + (f"; {bad_expiry} expires_at not a timestamp (not written)" if bad_expiry else "")) + print(f"posted_by links (public_job_posters): {len(posted)}") + print(f"resource_links: {links_written} written, {links_skipped} skipped") + for table, lost in (("public_jobs", "job details (kind, place, expiry, link, institution text)"), + ("public_job_posters", "posted_by"), + ("resource_links", "curated links (" + ", ".join(sorted(RESOURCE_LINK_SLOTS)) + ")")): + if table in self.unreadable: + print(f" {table} not readable ({self.unreadable[table]}): no {lost} in this export") if skipped: print("Skipped (deprecated/unknown resource_type, not noded): " + ", ".join(f"{k}={v}" for k, v in sorted(skipped.items()))) @@ -442,7 +610,7 @@ def export_explorer_json(self, out_path: Path | str | None = None) -> Path: edges = [] asserted_predicates = {"on_project", "studies_species", "part_of_org", "held_by", - "device_category", "manufacturer"} + "device_category", "manufacturer"} | RESOURCE_LINK_SLOTS for s, p, o in g: local = str(p).rsplit("#", 1)[-1] if local in asserted_predicates and not isinstance(o, Literal): diff --git a/kg/bench_mcp_server.py b/kg/bench_mcp_server.py new file mode 100644 index 00000000..b2799d06 --- /dev/null +++ b/kg/bench_mcp_server.py @@ -0,0 +1,1082 @@ +#!/usr/bin/env python3 +# /// script +# requires-python = ">=3.10" +# dependencies = ["mcp==2.3.0", "rdflib==7.6.0", "PyYAML==6.0.3"] +# /// +"""Benchmark for kg/mcp_server.py: the consortium's own questions, asked the way a client asks. + + python kg/bench_mcp_server.py # run everything, print the report + python kg/bench_mcp_server.py --show CQ04 # one question: the rows each way returned + python kg/bench_mcp_server.py --only questions # one part: questions, ranking or speed + python kg/bench_mcp_server.py --update README.md # rewrite the results block in the main README + python kg/bench_mcp_server.py --json out.json # the numbers, for a machine + python kg/bench_mcp_server.py --source other.ttl # another export than the committed one + uv run kg/bench_mcp_server.py # same, the header above supplies the dependencies + +It starts the real server as a client would (a process, JSON-RPC over stdio) and has three parts. + + questions Every competency question, asked twice over MCP: as SPARQL through sparql_query, and + without SPARQL through the graph tools (search_nodes, get_node, find_related). Each + way must return the rows the export gives when it is queried directly, with no server + in between. Exit code 1 if any does not. The questions are the 42 the KG is scored + on (competency_questions.yaml), CQ20-CQ42 among them as adopted from issue #441. + ranking Is the order find_related gives worth having? Hide one real tie, start at one of its + ends, ask for nodes of the hidden end's type, and see whether the hidden end is among + the first ten returned that the start is not already tied to. The same for + get_neighbors, which lists by distance alone. Also: every strength against a second, + slower version of the rule that leaves nothing out. + speed How long a call takes and how big a reply is, on real nodes, over stdio. + +The questions and the ranking do not depend on the machine; the speed does, and says which it was. +""" +import argparse +import json +import math +import platform +import queue +import re +import statistics +import subprocess +import sys +import threading +import time +from collections import defaultdict +from decimal import Decimal +from fractions import Fraction +from pathlib import Path + +import yaml +from rdflib import BNode, Graph, Literal + +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +import mcp_server as m # noqa: E402 + +SERVER = HERE / "mcp_server.py" +QUESTION_FILES = {"adopted": HERE / "competency_questions.yaml"} # CQ01-CQ42, what quality.py scores (CQ20-CQ42 from #441) +START, END = "", "" +PARTS = ("questions", "ranking", "speed") + + +# ---- the server, as a client sees it --------------------------------------------------------------- + +class Client: + """A raw JSON-RPC client on the server's stdin and stdout: no SDK on this side, so what works + here is what any MCP client gets.""" + + def __init__(self, source: str): + began = time.perf_counter() + self.process = subprocess.Popen([sys.executable, str(SERVER), "--source", source, "--refresh", "0"], + stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, + text=True, encoding="utf-8") + self.lines: queue.Queue = queue.Queue() + threading.Thread(target=lambda: [self.lines.put(line) for line in self.process.stdout], daemon=True).start() + self.number, self.calls, self.cache = 0, 0, {} + hello = self._ask("initialize", {"protocolVersion": "2025-06-18", "capabilities": {}, + "clientInfo": {"name": "kg-benchmark", "version": "0"}}) + self.ready_seconds = time.perf_counter() - began + self.version = hello["serverInfo"]["version"] + self._send({"jsonrpc": "2.0", "method": "notifications/initialized"}) + + def _send(self, message: dict): + self.process.stdin.write(json.dumps(message) + "\n") + self.process.stdin.flush() + + def _ask(self, method: str, params: dict) -> dict: + self.number += 1 + self._send({"jsonrpc": "2.0", "id": self.number, "method": method, "params": params}) + while True: + try: + reply = json.loads(self.lines.get(timeout=120)) + except queue.Empty: + raise SystemExit(f"bench: the server did not answer {method} within two minutes") from None + if reply.get("id") == self.number: + if "error" in reply: + raise SystemExit(f"bench: {method} failed: {reply['error']}") + return reply["result"] + + def timed(self, tool: str, **arguments): + """One tool call: (answer or None, error text or None, seconds, bytes of the reply).""" + began = time.perf_counter() + result = self._ask("tools/call", {"name": tool, "arguments": arguments}) + seconds = time.perf_counter() - began + self.calls += 1 + text = "".join(block["text"] for block in result["content"] if block["type"] == "text") + if result.get("isError"): + return None, text, seconds, len(text.encode("utf-8")) + return json.loads(text), None, seconds, len(text.encode("utf-8")) + + def call(self, tool: str, **arguments) -> dict: + answer, error, _, _ = self.timed(tool, **arguments) + if error: + raise SystemExit(f"bench: {tool}({arguments}) was refused: {error}") + return answer + + def close(self): + self.process.stdin.close() + self.process.wait(timeout=30) + self.process.stdout.close() + + # -- what the graph tools give, in the shapes the questions need -- + + def listed(self, **arguments) -> list: + """Every node search_nodes lists for these arguments, a page at a time; none when the graph + has no such type of node or no such property.""" + found, total = [], None + while total is None or len(found) < total: + page, error, _, _ = self.timed("search_nodes", limit=100, offset=len(found), **arguments) + if error: + if nothing_of_the_kind(error): + return [] + raise SystemExit(f"bench: search_nodes({arguments}) was refused: {error}") + total = page["total"] + found += page["results"] + if not page["results"]: + break + return found + + def all_of(self, kind: str) -> list: + """Every node of one type.""" + if ("all", kind) not in self.cache: + self.cache["all", kind] = self.listed(type=kind) + return self.cache["all", kind] + + def where(self, kind: str, **wanted) -> list: + """Every node of one type holding exactly these property values. search_nodes ignores case + and accents in a value, a question does not, so each node found is read to make sure.""" + return [node for node in self.listed(type=kind, where=wanted) + if all(value in self.values(node["id"], name) for name, value in wanted.items())] + + def node(self, node_id: str) -> dict: + """One node in full (get_node): its properties, and its links with the node at the other end, + up to 500 of each kind (linked() says when that is not all of them).""" + if ("node", node_id) not in self.cache: + self.cache["node", node_id] = self.call("get_node", node=node_id, edge_limit=500) + return self.cache["node", node_id] + + def values(self, node_id: str, name: str) -> list: + """Every value a node has for one property.""" + value = self.node(node_id)["properties"].get(name, []) + return value if isinstance(value, list) else [value] + + def linked(self, node_id: str, edge: str, direction: str) -> list: + """The nodes at the other end of one kind of link, one entry per link (get_node). `direction` + is "out" for links pointing away from the node and "in" for links pointing at it. An entry + carries what its link carries, e.g. the role.""" + groups = [group for group in self.node(node_id)["edges"] if group["edge"] == edge and group["direction"] == direction] + if any("more" in group for group in groups): + raise Unwalkable(f"{node_id} has more {edge} links than get_node lists at once (500)") + return [row for group in groups for row in group["nodes"]] + + def pointed(self, node_id: str, name: str) -> list: + """Everything a node points at through one property, one entry for each: a node (as get_node + lists it) where the other end is one, otherwise the value itself. An identifier that two or + more nodes share is both a value and a node in the server's view; here it is the node.""" + rows, values = self.linked(node_id, name, "out"), list(self.values(node_id, name)) + for row in rows: + if row["type"] in (m.EXTERNAL, m.UNRESOLVED): # the link and one of the values are the same entry + iri = row["id"][4:] if row["type"] == m.EXTERNAL else self.node(row["id"])["iri"] + if iri in values: + values.remove(iri) + return rows + values + + def has(self, node_id: str, name: str) -> bool: + """Whether a node says anything at all under one property, as a link or as a value.""" + full = self.node(node_id) + return any(group["edge"] == name and group["direction"] == "out" for group in full["edges"]) \ + or name in full["properties"] + + def tied(self, node: str, kind: str, edges: set) -> list: + """The nodes of one type directly tied to `node` by one of `edges` (find_related, one link away, + a page at a time), each with the link that ties it. One entry per node, however many links + tie it: where the number of links matters, `linked` is the one to use.""" + found, reached = [], None + while reached is None or len(found) < reached: + reply, error, _, _ = self.timed("find_related", nodes=node, type=kind, max_hops=1, limit=25, offset=len(found)) + if error: + if nothing_of_the_kind(error): + return [] + raise SystemExit(f"bench: find_related({node}, {kind}) was refused: {error}") + group = reply["related"][0] + reached = group["within"] + found += group["nodes"] + if not group["nodes"]: + break + return [row for row in found if {row["link"]["edge"], *(link["edge"] for link in row["link"].get("also", ()))} & edges] + + +class Unwalkable(Exception): + """A question the graph tools cannot answer here in full: it fails on its own, not the run.""" + + +def nothing_of_the_kind(error: str) -> bool: + """A refusal that says only that the graph holds no such type of node, or no such property: an + empty answer, not a failure.""" + return "Unknown node type" in error or "has a property" in error + + +def bid(node_id: str) -> str: + """A node, as sparql_query writes one in a cell: bid: for one of this graph's own ids (a + short id never holds a colon), and any other by its address: bbqs:Name where a declared prefix + fits,
otherwise.""" + iri = node_id[4:] if node_id.startswith("ext:") else node_id + return "bid:" + iri if ":" not in iri else address(iri) + + +def address(iri: str) -> str: + """An IRI that is not one of this graph's nodes, written as a SPARQL cell writes it.""" + for prefix, namespace in m.PREFIXES.items(): + if prefix != "bid" and iri.startswith(namespace) and re.fullmatch(r"\w+", iri[len(namespace):]): + return f"{prefix}:{iri[len(namespace):]}" + return f"<{iri}>" + + +def cell(entry): + """What sparql_query writes for something a node points at (see Client.pointed).""" + return bid(entry["id"]) if isinstance(entry, dict) else entry + + +# ---- the questions, without SPARQL ----------------------------------------------------------------- +# Each takes the client and returns the rows the question's SPARQL would, in the same column order, +# using only search_nodes, get_node and find_related. `how` says in a few words which. +# +# They are written for any export the exporter could write, not only today's: a property may be +# missing or given twice, a link may point at an id nothing describes, the same two nodes may be +# linked twice. What they take for granted is the schema: a link ends at the type its range names. +# +# What a walk cannot see is what the server's view leaves out. describe_graph counts most of it: +# a roster record with an end missing, or with an end, a role or its source given twice (no link is +# made of it); what a record says besides those, its other types, and a link to a record; a node's +# second rdf:type (it is listed under the first); a blank node (not a node of the view). Two are not +# counted: a language tag and a datatype (the text is kept, the tag or type is not). The export does +# carry datatypes (xsd:anyURI on 477 values, xsd:date on 27), and no question tells them apart. +# SPARQL reads the file as it is, so where a question can tell, the comparison below says DIFFERENT. The +# export the exporter writes has none of these but two roster records with an end missing, which +# no question can tell. CQ17 and CQ39 compare xsd:date values as ISO text, which is what they are. + +def cq01(c): + return [[bid(p["id"]), number, mechanism] for p in c.all_of("Project") + for number in c.values(p["id"], "grant_number") for mechanism in c.values(p["id"], "mechanism") or [None]] + + +def cq02(c): + count, total = defaultdict(int), defaultdict(int) + for p in c.all_of("Project"): + for mechanism in c.values(p["id"], "mechanism"): + for amount in c.values(p["id"], "award_amount"): + if isinstance(amount, bool) or not isinstance(amount, (int, float)): + continue # not a number: SPARQL cannot add it either + count[mechanism] += 1 + total[mechanism] += amount + return [[mechanism, count[mechanism], total[mechanism]] for mechanism in count] + + +def cq03(c): + return [[bid(p["id"]), number, name] for p in c.all_of("Project") + for org in c.tied(p["id"], "ResearchOrganization", {"part_of_org"}) + for number in c.values(p["id"], "grant_number") for name in c.values(org["id"], "name")] + + +def cq04(c): + return [[name, person["role"]] for p in c.where("Project", grant_number="R34DA059723") + for person in c.linked(p["id"], "has_role", "in") if "role" in person + for name in c.values(person["id"], "name")] + + +def cq05(c): + projects = defaultdict(set) + for p in c.all_of("Project"): + for person in c.tied(p["id"], "Investigator", {"has_role"}): + projects[person["id"]].add(p["id"]) + return [[name, len(held)] for person, held in projects.items() if len(held) > 1 for name in c.values(person, "name")] + + +def cq06(c): + return [[name, org_name] for org in c.all_of("ResearchOrganization") + for person in c.tied(org["id"], "Investigator", {"members"}) + for name in c.values(person["id"], "name") for org_name in c.values(org["id"], "name")] + + +def cq07(c): + return [[name, cell(orcid)] for person in c.all_of("Investigator") + for name in c.values(person["id"], "name") for orcid in c.pointed(person["id"], "orcid")] + + +def cq08(c): + return [[name] for group in c.where("WorkingGroup", name="WG-Devices") + for person in c.tied(group["id"], "Investigator", {"member_of_group"}) + for name in c.values(person["id"], "name")] + + +def cq09(c): + return [[bid(p["id"]), number] for species in c.where("Species", common_name="House Mouse") + for p in c.tied(species["id"], "Project", {"studies_species"}) + for number in c.values(p["id"], "grant_number")] + + +def cq10(c): + rows = {(bid(p["id"]), number) for species in c.where("Species", taxonomy_class="Mammalia") + for p in c.tied(species["id"], "Project", {"studies_species"}) + for number in c.values(p["id"], "grant_number")} + return [list(row) for row in rows] + + +def cq11(c): + return [[bid(p["id"]), number, scope] for p in c.all_of("Project") + if not c.has(p["id"], "studies_species") # it names no species, resolved to a node or not + for number in c.values(p["id"], "grant_number") for scope in c.values(p["id"], "study_scope") or [None]] + + +def cq12(c): + return [[number, title] for p in c.all_of("Project") for paper in c.tied(p["id"], "Publication", {"produced"}) + for number in c.values(p["id"], "grant_number") for title in c.values(paper["id"], "title")] + + +def cq13(c): + return [[number, name] for p in c.all_of("Project") + for edge in ("funded_datasets", "produced") # a dataset both funded and produced is two rows + for dataset in c.linked(p["id"], edge, "out") if dataset["type"] == "Dataset" + for number in c.values(p["id"], "grant_number") for name in c.values(dataset["id"], "name")] + + +def cq14(c): + return [[number, label] for p in c.all_of("Project") + for category in c.tied(p["id"], "DeviceCategory", {"uses_device_category"}) + for number in c.values(p["id"], "grant_number") for label in c.values(category["id"], "label")] + + +def cq15(c): + rows = [] + for device in c.all_of("Device"): + categories = [cell(category) for category in c.pointed(device["id"], "device_category")] or [None] + rows += [[name, model, category] for maker in c.tied(device["id"], "DeviceManufacturer", {"manufacturer"}) + for name in c.values(maker["id"], "name") for model in c.values(device["id"], "model_name") + for category in categories] + return rows + + +def cq16(c): + return [[name, cell(repo)] for tool in c.all_of("SoftwareTool") + for name in c.values(tool["id"], "name") for repo in c.pointed(tool["id"], "repo_url")] + + +def cq17(c): + return [[name, expires] for call in c.all_of("FundingOpportunity") for name in c.values(call["id"], "name") + for expires in c.values(call["id"], "expiration_date") if expires > "2026-09-29"] + + +def _institutions(c, job_id: str) -> list: + """A job's institution as CQ18 and CQ35 read it, as (organization id or None, institution): the + name of each organization it is part_of_org, or, only when it is part of none, the institution + as the posting writes it (job_institution). A link to an id nothing describes has no name, and + still means the text is not read.""" + if c.has(job_id, "part_of_org"): + return [(org["id"], name) for org in c.linked(job_id, "part_of_org", "out") for name in c.values(org["id"], "name")] + return [(None, cell(text)) for text in c.pointed(job_id, "job_institution")] + + +def cq18(c): + return [[title, institution] for job in c.all_of("Job") for title in c.values(job["id"], "name") + for _, institution in _institutions(c, job["id"])] + + +def _local(c, node_id: str) -> str: + """A node's own id in full, as a provenance record names it.""" + return c.node(node_id)["iri"].partition(m.ID_NS)[2] + + +def cq19(c): + wanted = {_local(c, p["id"]) for p in c.where("Project", grant_number="R34DA059723")} + rows = [] + for record in c.all_of("ProvenanceRecord") if wanted else (): + about = wanted & set(c.values(record["id"], "prov_entity_id")) + if not about or "title" not in c.values(record["id"], "prov_entity_column"): + continue + for source in c.pointed(record["id"], "prov_source_class"): + grades = (c.values(source["id"], "grade") if isinstance(source, dict) else []) or [None] + rows += [[value, cell(source), grade] for _ in about for value in c.values(record["id"], "prov_value_text") + for grade in grades] + return rows + + +# -- CQ20-CQ42, adopted from issue #441 -- + +def _roles_of(c) -> dict: + """person id -> [(project, the role on the link or None), ...], one entry per roster record.""" + held = defaultdict(list) + for p in c.all_of("Project"): + for person in c.linked(p["id"], "has_role", "in"): + held[person["id"]].append((p["id"], person.get("role"))) + return held + + +def cq20(c): + rows = [] + for person, held in _roles_of(c).items(): + numbers = {p: c.values(p, "grant_number") for p, _ in held} + if sum(1 for found in numbers.values() if found) > 1: # a project with no number does not count + grants = sorted({number for found in numbers.values() for number in found}) + rows += [[name, ", ".join(grants)] for name in c.values(person, "name")] + return rows + + +def cq21(c): + return [[name] for person in c.all_of("Investigator") if not c.has(person["id"], "orcid") + for name in c.values(person["id"], "name")] + + +def cq22(c): + rows = set() + for person in c.all_of("Investigator"): + orgs = [org["id"] for org in c.linked(person["id"], "members", "in")] + orgs += [org["id"] for p in c.linked(person["id"], "has_role", "out") for org in c.linked(p["id"], "part_of_org", "out")] + rows |= {(name, org_name) for name in c.values(person["id"], "name") for org in orgs for org_name in c.values(org, "name")} + return [list(row) for row in rows] + + +def cq23(c): + rows = [] + for group in c.all_of("WorkingGroup"): + for person in c.linked(group["id"], "member_of_group", "in"): + grants = [number for p in c.linked(person["id"], "has_role", "out") for number in c.values(p["id"], "grant_number")] + rows += [[group_name, name, grant] for group_name in c.values(group["id"], "name") + for name in c.values(person["id"], "name") for grant in grants or [None]] + return rows + + +def cq24(c): + rows = [] + for person, held in _roles_of(c).items(): + roles = sorted({role for _, role in held if role}) + if len(roles) > 1: + rows += [[name, ", ".join(roles)] for name in c.values(person, "name")] + return rows + + +def cq25(c): + rows = [] + for species in c.all_of("Species"): + named = sum(wanted in c.values(species["id"], name) for name, wanted in + (("name", "Mus musculus"), ("common_name", "House Mouse"), ("aliases", "Mus musculus"))) + for p in c.linked(species["id"], "studies_species", "in") * named: # once for each name that fits + rows += [[number, title] for number in c.values(p["id"], "grant_number") + for title in c.values(p["id"], "title") or [None]] + return rows + + +def cq26(c): + studied = defaultdict(set) + for p in c.all_of("Project"): + for species in c.linked(p["id"], "studies_species", "out"): + for name in c.values(species["id"], "name"): + studied[name].add(p["id"]) + return [[name, len(projects)] for name, projects in studied.items()] + + +def cq27(c): + return [[number, raw] for p in c.all_of("Project") + for number in c.values(p["id"], "grant_number") for raw in c.values(p["id"], "studies_species_unresolved")] + + +def cq28(c): + kinds = ("Publication", "Dataset", "SoftwareTool", "MLModel") + made = defaultdict(lambda: {kind: set() for kind in kinds}) + for p in c.all_of("Project"): + for number in c.values(p["id"], "grant_number"): + made[number] # a project that produced nothing still has a row + for output in c.linked(p["id"], "produced", "out"): + if output["type"] in kinds: + made[number][output["type"]].add(output["id"]) + return [[number] + [len(made[number][kind]) for kind in kinds] for number in made] + + +def cq29(c): + papers, grants = defaultdict(set), defaultdict(set) + for p in c.all_of("Project"): + produced = {output["id"] for output in c.linked(p["id"], "produced", "out") if output["type"] == "Publication"} + numbers = c.values(p["id"], "grant_number") + if produced and numbers: + for person in c.linked(p["id"], "has_role", "in"): + papers[person["id"]] |= produced + grants[person["id"]] |= set(numbers) + return [[name, len(papers[person]), ", ".join(sorted(grants[person]))] for person in papers for name in c.values(person, "name")] + + +def cq30(c): + sourced = {entity for record in c.all_of("ProvenanceRecord") if c.has(record["id"], "prov_source_class") + for entity in c.values(record["id"], "prov_entity_id")} + return [[bid(dataset["id"]), name] for dataset in c.all_of("Dataset") if _local(c, dataset["id"]) not in sourced + for _ in c.linked(dataset["id"], "produced", "in") for name in c.values(dataset["id"], "name")] + + +def cq31(c): + rows = [] + for model in c.all_of("MLModel"): + benches = c.linked(model["id"], "evaluated_by", "out") + c.linked(model["id"], "evaluates", "in") + grants = [number for p in c.linked(model["id"], "produced", "in") for number in c.values(p["id"], "grant_number")] + rows += [[name, bench_name, grant] for bench in benches if bench["type"] == "Benchmark" + for name in c.values(model["id"], "name") for bench_name in c.values(bench["id"], "name") + for grant in grants or [None]] + return rows + + +def cq32(c): + return [[name, len(c.pointed(org["id"], "members"))] for org in c.all_of("ResearchOrganization") + for name in c.values(org["id"], "name")] + + +def cq33(c): + return [[name] for org in c.all_of("ResearchOrganization") if not c.has(org["id"], "members") + for name in c.values(org["id"], "name")] + + +def cq34(c): + rows = [] + for org in c.all_of("ResearchOrganization"): + projects = {p["id"] for person in c.linked(org["id"], "members", "out") for p in c.linked(person["id"], "has_role", "out")} + if len(projects) > 1: + rows += [[name, len(projects)] for name in c.values(org["id"], "name")] + return rows + + +def cq35(c): + titles = defaultdict(list) # by organization and name: two of one name stay two + for job in c.all_of("Job"): + for title in c.values(job["id"], "name"): + for place in _institutions(c, job["id"]): + titles[place].append(title) + return [[institution, len(found), "; ".join(found)] for (_, institution), found in titles.items()] + + +def cq36(c): + postings = defaultdict(int) + for job in c.all_of("Job"): + for kind in c.values(job["id"], "job_type"): + postings[kind] += 1 + return [[kind, count] for kind, count in postings.items()] + + +def cq37(c): + return [[title, name] for job in c.all_of("Job") for title in c.values(job["id"], "name") + for person in c.linked(job["id"], "posted_by", "out") for name in c.values(person["id"], "name")] + + +def cq38(c): + return [[number] for p in c.all_of("Project") if not c.has(p["id"], "produced") + for number in c.values(p["id"], "grant_number")] + + +def cq39(c): + return [[name, expires] for call in c.all_of("FundingOpportunity") for name in c.values(call["id"], "name") + for expires in c.values(call["id"], "expiration_date") if "2026-10-14" <= expires <= "2027-04-14"] + + +def cq40(c): + records = defaultdict(int) + for record in c.all_of("ProvenanceRecord"): + for source in c.linked(record["id"], "prov_source_class", "out"): + for grade in c.values(source["id"], "grade"): + if isinstance(grade, (int, float)) and grade < 3: + for table in c.values(record["id"], "prov_entity_table") or [None]: + records[bid(source["id"]), grade, table] += 1 + return [[*key, count] for key, count in records.items()] + + +def cq41(c): + rows = [] + for p in c.all_of("Project"): + leads = [name for person in c.linked(p["id"], "has_role", "in") if "pi" in person.get("role", "").lower() + for name in c.values(person["id"], "name")] or [None] + for dataset in c.pointed(p["id"], "funded_datasets"): + names = (c.values(dataset["id"], "name") if isinstance(dataset, dict) else []) or [None] + rows += [[number, name, lead] for number in c.values(p["id"], "grant_number") for name in names for lead in leads] + return rows + + +def cq42(c): + return [[name] for group in c.all_of("WorkingGroup") + if not any(c.linked(person["id"], "has_role", "out") for person in c.linked(group["id"], "member_of_group", "in")) + for name in c.values(group["id"], "name")] + + +WALKS = { + "CQ01": (cq01, "list the projects; read each one's properties"), + "CQ02": (cq02, "list the projects; add up their awards by mechanism"), + "CQ03": (cq03, "from each project, the organization one link away"), + "CQ04": (cq04, "find the project by grant number; its people, with the role on each link"), + "CQ05": (cq05, "from each project, its people; count the projects per person"), + "CQ06": (cq06, "from each organization, the people one link away"), + "CQ07": (cq07, "list the investigators; read each one's ORCID"), + "CQ08": (cq08, "find the working group by name; from it, the people one link away"), + "CQ09": (cq09, "find the species by its common name; from it, the projects one link away"), + "CQ10": (cq10, "find the mammal species; from each, its projects"), + "CQ11": (cq11, "list the projects; keep those with no species named"), + "CQ12": (cq12, "from each project, the publications one link away"), + "CQ13": (cq13, "from each project, the datasets one link away"), + "CQ14": (cq14, "from each project, the device categories one link away"), + "CQ15": (cq15, "from each device, its maker and its category"), + "CQ16": (cq16, "list the software tools; read each one's repository"), + "CQ17": (cq17, "list the funding calls; keep those still open"), + "CQ18": (cq18, "list the jobs; from each, its organization's name, or the institution it names if it has none"), + "CQ19": (cq19, "list the provenance records; keep the project's title; read the source's grade"), + "CQ20": (cq20, "from each project, its people; keep those on more than one"), + "CQ21": (cq21, "list the investigators; keep those with no ORCID"), + "CQ22": (cq22, "from each person, their organization, and their projects' organizations"), + "CQ23": (cq23, "from each working group, its members; from each member, their projects"), + "CQ24": (cq24, "from each project, its people and the role on each link"), + "CQ25": (cq25, "find the species by any of its names; from it, its projects"), + "CQ26": (cq26, "from each project, its species; count the projects per species"), + "CQ27": (cq27, "list the projects' species claims that no species node matches"), + "CQ28": (cq28, "from each project, count what it produced, by type"), + "CQ29": (cq29, "from each project, its people and its publications"), + "CQ30": (cq30, "list the datasets; keep the produced ones no provenance record names"), + "CQ31": (cq31, "from each model, its benchmarks and the project that produced it"), + "CQ32": (cq32, "from each organization, count the members one link away"), + "CQ33": (cq33, "list the organizations; keep those with no member"), + "CQ34": (cq34, "from each organization, its members; from each member, their projects"), + "CQ35": (cq35, "list the jobs; group them by organization, or by the institution named"), + "CQ36": (cq36, "list the jobs; count them by kind"), + "CQ37": (cq37, "list the jobs; from each, the person who posted it"), + "CQ38": (cq38, "list the projects; keep those that produced nothing"), + "CQ39": (cq39, "list the funding calls; keep those expiring in the window"), + "CQ40": (cq40, "list the provenance records; read each source's grade"), + "CQ41": (cq41, "from each project, the datasets it funded and its PIs"), + "CQ42": (cq42, "from each working group, its members; see whether any has a project"), +} + + +def joined_cells(sparql: str) -> dict: + """The columns in which a query joins several values into one cell (GROUP_CONCAT), read from its + SELECT clause: column -> separator. SPARQL leaves the order inside such a cell open.""" + select = sparql[:re.search(r"\bWHERE\b|\{", sparql).start()] + columns = re.findall(r"\((?:[^()]|\([^()]*\))*\)|\?\w+", select) + return {at: (re.search(r'separator\s*=\s*"([^"]*)"', column) or [None, " "])[1] + for at, column in enumerate(columns) if "GROUP_CONCAT" in column.upper()} + + +def reference(term, ids: dict): + """One cell of the export queried directly, written out here rather than by the server, so that + a fault in how the server writes a value cannot hide in both the reference and its answer. The + rules are the ones sparql_query's description gives a client (a number as a number, a truth value + as true or false, a date or time as ISO text, any other literal as its text, a node of this graph + as bid:); only the short ids are the server's, because they are names, not values.""" + if term is None: + return None + if isinstance(term, BNode): + return f"_:{term}" + if isinstance(term, Literal): + value = term.toPython() + if isinstance(value, Literal): # ill-typed, e.g. text in a number field + return str(value) + if isinstance(value, Decimal): + return int(value) if value == value.to_integral_value() else float(value) + if isinstance(value, float) and not math.isfinite(value): # JSON has no number for them: as XSD writes them + return "NaN" if math.isnan(value) else ("INF" if value > 0 else "-INF") + if isinstance(value, (int, float, str)): + return value + return value.isoformat() if hasattr(value, "isoformat") else str(term) + iri = str(term) + return "bid:" + ids[iri] if iri in ids else address(iri) + + +def same(rows, joined: dict | None = None) -> list: + """Rows in one order and one spelling, so that two ways of asking can be compared. Duplicate rows + count. Four things are evened out, because none is part of the answer: the order of the values + in a cell that joins several (`joined`, from joined_cells); whether an IRI came back as an IRI + (in angle brackets, or as prefix:name) or as text, which the graph tools do not tell apart; a + number's last digits, which depend on the order a sum was taken in (12 significant digits are + kept, whole numbers or not); and a blank node's label, which each reading of a file makes up.""" + def cell(value, column): + if isinstance(value, (int, float)) and not isinstance(value, bool) and math.isfinite(value): + value = float(f"{value:.12g}") + return int(value) if value.is_integer() else value + if not isinstance(value, str): + return value + if column in (joined or {}): + return (joined[column]).join(sorted(value.split(joined[column]))) + if re.fullmatch(r"_:\S+", value): + return "_:" + if re.fullmatch(r"<[^<>\s]+>", value): + return value[1:-1] + written = re.fullmatch(r"([A-Za-z]\w*):(\w+)", value) + if written and written.group(1) in m.PREFIXES and written.group(1) != "bid": + return m.PREFIXES[written.group(1)] + written.group(2) + return value + return sorted(json.dumps([cell(value, column) for column, value in enumerate(row)], sort_keys=True, default=str, + ensure_ascii=False) for row in rows) + + +def load_questions() -> tuple: + """Every question, each marked with the set it belongs to, and the prefixes its SPARQL assumes.""" + questions, prologue = [], "" + for name, path in QUESTION_FILES.items(): + spec = yaml.safe_load(path.read_text(encoding="utf8")) + prologue = "".join(f"PREFIX {k}: <{v}>\n" for k, v in spec["prefixes"].items()) + questions += [{**question, "set": name} for question in spec["questions"]] + return questions, prologue + + +def ask_questions(client: Client, kg: m.KG, source: str, show: str | None = None, fresh: bool = True, + access: str = "anon") -> dict: + """Every question, three ways: the export queried directly (the reference), sparql_query over MCP, + and the graph tools over MCP. `fresh` forgets, before each question, what earlier ones fetched. + `access` is what the export is: "anon" (the public one), or "full", which also holds provenance.""" + questions, prologue = load_questions() + ids = {iri: node.id for iri, node in kg.nodes.items() if iri.startswith(m.ID_NS)} + plain = Graph().parse(source, format="turtle") # the export itself, with no server in between + schema = {str(s)[len(m.SCHEMA_NS):] for s in Graph().parse(str(m.SCHEMA_FILE), format="turtle").subjects() + if str(s).startswith(m.SCHEMA_NS)} if m.SCHEMA_FILE.exists() else None + rows_out = [] + for question in questions: + joined = joined_cells(question["sparql"]) + problems = [] + try: + direct = same(([reference(term, ids) for term in row] for row in plain.query(prologue + question["sparql"])), + joined) + except Exception as exc: # the file itself cannot answer it, e.g. text in a sum + direct = None + problems.append("the export queried directly: " + " ".join(str(exc).split())[:200]) + reply, error, sparql_seconds, _ = client.timed("sparql_query", query=question["sparql"], limit=m.MAX_ROWS) + by_sparql = same(reply["rows"], joined) if reply else None + walk, how = WALKS[question["id"]] + if fresh: + client.cache = {} # each question from scratch, as a client would ask it + calls, began = client.calls, time.perf_counter() + try: + by_tools = same(walk(client), joined) + except Unwalkable as exc: + by_tools = None + problems.append(f"the graph tools: {exc}") + walk_seconds, calls = time.perf_counter() - began, client.calls - calls + terms = set(re.findall(r"\bbbqs:(\w+)", question["sparql"])) + if direct is None: + status = "could not be asked" # the export queried directly refused it + elif direct: + status = "answered" + elif schema is not None and terms - schema: + status = "not modelled" # the schema has no such term: nothing can answer it yet + elif question["access"] == "full" and access == "anon": + status = "needs the full export" # its source rows are not public + else: + status = "none in this export" # asked and understood: there is nothing of the kind to list + if error: + problems.append(f"sparql_query: {error}") + rows_out.append({"id": question["id"], "set": question["set"], "question": question["question"], + "area": question["area"], "status": status, "rows": None if direct is None else len(direct), + "sparql_agrees": direct is not None and by_sparql == direct, + "tools_agree": direct is not None and by_tools == direct, "how": how, + "tool_calls": calls, "sparql_ms": round(sparql_seconds * 1000, 1), + "tools_ms": round(walk_seconds * 1000, 1), **({"error": "; ".join(problems)} if problems else {})}) + if show == question["id"]: + print(f"{question['id']} {question['question']}\n status: {status}; {len(direct or ())} rows from the export " + "queried directly" + "".join(f"\n problem: {problem}" for problem in problems)) + for name, got in (("sparql_query", by_sparql or []), (f"graph tools ({how})", by_tools or [])): + print(f"\n through {name}: {len(got)} rows, {'the same' if got == direct else 'DIFFERENT'}") + for row in got[:200]: + print(" " + row) + for row in sorted(set(direct or ()) - set(got))[:20]: + print(" MISSING " + row) + asked_ok = [r for r in rows_out if r["rows"] is not None] # a question the file refused is neither + answered, silent = [r for r in asked_ok if r["rows"]], [r for r in asked_ok if not r["rows"]] + adopted = [r for r in rows_out if r["set"] == "adopted"] + + def count(status): + return sum(r["status"] == status for r in silent) + + refused = sum(r["status"] == "could not be asked" for r in rows_out) + + return {"asked": len(rows_out), "adopted": len(adopted), "answered": len(answered), + "answered_adopted": sum(1 for r in adopted if r["rows"]), + "need_the_full_export": count("needs the full export"), "none_in_this_export": count("none in this export"), + "not_modelled": count("not modelled"), "could_not_be_asked": refused, + "sparql_agree": sum(r["sparql_agrees"] for r in answered), "tools_agree": sum(r["tools_agree"] for r in answered), + "silent_agree": sum(r["sparql_agrees"] and r["tools_agree"] for r in silent), + "all_agree": all(r["sparql_agrees"] and r["tools_agree"] for r in rows_out), "questions": rows_out} + + +# ---- the ranking ----------------------------------------------------------------------------------- + +def first_arrivals(kg: m.KG, start: m.Node) -> dict: + """The rule with nothing left out, written without the server's shortcuts: one unit leaves + `start` for each neighbour, and from then on every node, every tick, splits all it holds + equally among all its neighbours, the one it came from included. node -> (first tick it held + anything, how much). The server's strengths must be exactly these.""" + def neighbours(iri): + return sorted({link.other for link in kg.nodes[iri].links if link.other != iri}) + + holding, arrived = {start.iri: Fraction(len(neighbours(start.iri)))}, {start.iri: None} + for tick in range(1, len(kg.nodes) + 1): + moved: dict = {} + for iri, amount in holding.items(): + around = neighbours(iri) + for other in around: + moved[other] = moved.get(other, 0) + amount / len(around) + new = {iri: (tick, amount) for iri, amount in moved.items() if iri not in arrived} + if not new: + break + arrived.update(new) + holding = moved + del arrived[start.iri] + return arrived + + +WAYS = { # the ways of asking for nodes of one type near a start, ten at a time after `skip` of them + "find_related": lambda kg, start, kind, skip: kg.related(start, type=kind, limit=10, offset=skip)["related"][0]["nodes"], + "find_related, up to 8 links": lambda kg, start, kind, skip: kg.related( + start, type=kind, limit=10, offset=skip, max_hops=m.MAX_HOPS)["related"][0]["nodes"], + "get_neighbors": lambda kg, start, kind, skip: kg.neighbors(start, type=kind, depth=4, limit=10, offset=skip)["nodes"], + "get_neighbors, through hubs": lambda kg, start, kind, skip: kg.neighbors( + start, type=kind, depth=4, limit=10, offset=skip, through_hubs=True)["nodes"], +} + + +def look_for(kg: m.KG, start: m.Node, hidden: m.Node) -> dict: + """One case of the measure, with the tie between `start` and `hidden` already hidden: does each + way of asking list `hidden` among the first ten nodes of its type after the ones `start` is + still linked to directly? Those come first in either tool, and are not news.""" + already = sum(1 for iri in start.near if kg.nodes[iri].type == hidden.type) + return {name: hidden.id in [row["id"] for row in ask(kg, start.id, hidden.type, already)] for name, ask in WAYS.items()} + + +def measure_ranking(source: str | None = None, progress=None, kg: m.KG | None = None) -> dict: + """The hidden-tie measure over every tie of the graph at `source` (or of `kg`, which is left as + it was found: each tie is taken out and put back).""" + kg = kg or m.GraphSource(source, 0).current() # a graph of its own: ties are taken out and put back + linked = sorted((node for node in kg.nodes.values() if node.near), key=lambda node: node.iri) + exact = sum({iri: (found.hops, found.strength) for iri, found in kg._wave(start).items() if found.hops} + == first_arrivals(kg, start) for start in linked) + hits, cases = dict.fromkeys(WAYS, 0), 0 + + def rebuild(node): # the neighbours of a node, from its links + near: dict = defaultdict(list) + for link in node.links: + if link.other != node.iri: + near[link.other].append(link) + node.near = {other: tuple(links) for other, links in near.items()} + + pairs = [(node, kg.nodes[other]) for node in linked for other in node.near if node.iri < other] + for done, (node, other) in enumerate(pairs): + kept = list(node.links), list(other.links) + node.links[:] = [link for link in node.links if link.other != other.iri] + other.links[:] = [link for link in other.links if link.other != node.iri] + rebuild(node), rebuild(other) + for start, hidden in ((node, other), (other, node)): + if not start.near: + continue # it was the start's only tie: nothing to go on + cases += 1 + for name, found in look_for(kg, start, hidden).items(): + hits[name] += found + node.links[:], other.links[:] = kept + rebuild(node), rebuild(other) + if progress and done % 100 == 0: + progress(f"ranking: {done} of {len(pairs)} ties hidden and looked for") + lists = tied = 0 + for node in linked: + for group in kg.related(node.id, type="Investigator")["related"]: + if group["nodes"]: + lists, tied = lists + 1, tied + ("tied" in group) + return {"cases": cases, "in_first_ten": {name: round(100 * count / cases, 1) for name, count in hits.items()}, + "starts_checked_against_the_slow_version": len(linked), "starts_exactly_equal": exact, + "lists_of_people": lists, "lists_of_people_cut_among_equals": tied} + + +# ---- the speed ------------------------------------------------------------------------------------- + +def spread(milliseconds: list, sizes: list) -> dict: + """How long a set of calls took and how big the replies were.""" + ordered = sorted(milliseconds) + return {"calls": len(milliseconds), "median_ms": round(statistics.median(milliseconds), 1), + "p95_ms": round(ordered[min(len(ordered) - 1, int(0.95 * len(ordered)))], 1), + "median_bytes": int(statistics.median(sizes)), "largest_bytes": max(sizes)} + + +def measure_speed(client: Client, kg: m.KG, questions: list) -> dict: + linked = sorted((node for node in kg.nodes.values() if node.near), key=lambda node: node.iri) + sample = linked[::5] + calls = { + "find_related": [("find_related", {"nodes": node.id}) for node in sample], + "find_related, one type": [("find_related", {"nodes": node.id, "type": "Investigator"}) for node in sample], + "find_paths": [("find_paths", {"source_node": a.id, "target_node": b.id}) + for a, b in zip(sample, sample[7:] + sample[:7]) if b.iri in kg._wave(a)], + "get_neighbors, two links": [("get_neighbors", {"node": node.id, "depth": 2}) for node in sample], + "get_node": [("get_node", {"node": node.id}) for node in sample], + "search_nodes": [("search_nodes", {"query": node.label.split()[0]}) for node in sample if node.label.split()], + "sparql_query": [("sparql_query", {"query": q["sparql"]}) for q in questions], + } + out = {} + for name, todo in calls.items(): + seconds, sizes = [], [] + for tool, arguments in todo: + _, _, took, size = client.timed(tool, **arguments) + seconds.append(took * 1000) + sizes.append(size) + out[name] = spread(seconds, sizes) + return {"tools": out, "ready_seconds": round(client.ready_seconds, 2), + "machine": f"{platform.system()} {platform.machine()}, Python {platform.python_version()}"} + + +# ---- the report ------------------------------------------------------------------------------------ + +def report(results: dict) -> str: + """The results as plain text, for a terminal.""" + snapshot, out = results["snapshot"], [] + out.append(f"bbqs-kg {results['server']}: {results['nodes']} nodes, {results['links']} links, from " + f"{snapshot['source']}" + (f", dated {snapshot['dated']}" if snapshot.get("dated") else "")) + if "questions" in results: + q = results["questions"] + proposed, silent = q["asked"] - q["adopted"], q["asked"] - q["answered"] - q.get("could_not_be_asked", 0) + out.append(f"\nQUESTIONS {q['asked']} asked ({q['adopted']} the KG is scored on, {proposed} proposed in issue #441); " + f"{q['answered']} return rows on this export. Of those, the same rows as the export queried directly: " + f"{q['sparql_agree']} through sparql_query, {q['tools_agree']} through the graph tools. Of the other " + f"{silent}, {q['silent_agree']} return nothing either way" + + (f"; {q['could_not_be_asked']} could not be asked" if q.get("could_not_be_asked") else "") + + ("." if q["all_agree"] else ": NOT ALL AGREE, see below.")) + for r in q["questions"]: + def mark(ok, rows=r["rows"]): + return "—" if rows is None else "DIFFERENT" if not ok else "same" if rows else "none" + if r["set"] == "proposed" and r["id"] == next(x["id"] for x in q["questions"] if x["set"] == "proposed"): + out.append(" -- proposed in issue #441, not adopted yet --") + out.append(f" {r['id']} {'—' if r['rows'] is None else r['rows']:>4} rows sparql {mark(r['sparql_agrees']):9s} {r['sparql_ms']:7.1f} ms " + f"tools {mark(r['tools_agree']):9s} {r['tools_ms']:7.1f} ms {r['tool_calls']:4d} calls " + f"{r['status']:21s} {r['question']}" + (f"\n {r['error']}" if r.get("error") else "")) + if "ranking" in results: + r = results["ranking"] + out.append(f"\nRANKING {r['cases']} cases: one real tie hidden, the other end looked for among the first ten of its type " + "listed after the start's direct ties") + for name, share in r["in_first_ten"].items(): + out.append(f" {name:30s} {share:5.1f}%") + out.append(f" strengths exactly equal to the slow version of the rule: {r['starts_exactly_equal']} of " + f"{r['starts_checked_against_the_slow_version']} starting nodes") + out.append(f" default lists of people cut among equals: {r['lists_of_people_cut_among_equals']} of {r['lists_of_people']}") + if "speed" in results: + s = results["speed"] + out.append(f"\nSPEED over stdio, {s['machine']}; ready {s['ready_seconds']} s after starting") + for name, t in s["tools"].items(): + out.append(f" {name:26s} {t['calls']:4d} calls median {t['median_ms']:6.1f} ms 95th {t['p95_ms']:6.1f} ms " + f"reply median {t['median_bytes']:6d} bytes, largest {t['largest_bytes']:6d}") + return "\n".join(out) + + +def markdown(results: dict) -> str: + """The results as the block the main README carries, between its two markers.""" + snapshot = results["snapshot"] + q, r, s = results.get("questions"), results.get("ranking"), results.get("speed") + out = [START, f"Graph: {results['nodes']} nodes, {results['links']} links" + + (f", export of {snapshot['dated']}" if snapshot.get("dated") else "") + f". Server {results['server']}.", ""] + if q: + proposed, refused = q["asked"] - q["adopted"], q.get("could_not_be_asked", 0) + silent = q["asked"] - q["answered"] - refused + rest = [f"{q[key]} {what}" for key, what in (("need_the_full_export", "need the full export"), + ("none_in_this_export", "find none in this export"), + ("not_modelled", "not modelled yet")) if q.get(key)] + out += ["| | Result |", "|---|---|", + f"| Competency questions that return rows on this export | **{q['answered']} of {q['asked']}**" + + (f": {q['answered_adopted']} of the {q['adopted']} the KG is scored on, " + f"{q['answered'] - q['answered_adopted']} of the {proposed} proposed in #441" if proposed else "") + " |", + f"| Those {q['answered']}, asked as SPARQL through the server: same rows as the export queried directly | " + f"**{q['sparql_agree']} of {q['answered']}** |", + f"| Those {q['answered']}, asked without SPARQL through the graph tools: same rows again | " + f"**{q['tools_agree']} of {q['answered']}** |"] + if silent: + out.append(f"| The other {silent}" + (f" ({', '.join(rest)})" if rest else "") + ": no rows either way | " + f"**{q['silent_agree']} of {silent}** |") + if refused: + out.append(f"| {refused} could not be asked: the export queried directly refused {'it' if refused == 1 else 'them'} " + "| **not compared** |") + if r: + first = r["in_first_ten"] + out += [f"| Hide a real tie: the hidden end is among the first ten `find_related` lists after the start's direct ties " + f"({r['cases']:,} cases) | **{first['find_related']:.0f}%** " + f"({first['find_related, up to 8 links']:.0f}% looking up to 8 links) |", + f"| The same for `get_neighbors`, which lists by distance alone | {first['get_neighbors']:.0f}% " + f"({first['get_neighbors, through hubs']:.0f}% walking through hubs) |", + f"| Strengths equal to a slow second version of the rule, exactly | **{r['starts_exactly_equal']} of " + f"{r['starts_checked_against_the_slow_version']}** starting nodes |"] + if s: + t = s["tools"] + out += [f"| A `find_related` call (median; 95th percentile) | {t['find_related']['median_ms']:.0f} ms; " + f"{t['find_related']['p95_ms']:.0f} ms |", + f"| A `find_paths` call | {t['find_paths']['median_ms']:.0f} ms; {t['find_paths']['p95_ms']:.0f} ms |", + f"| A `find_related` reply (median; largest of the {t['find_related']['calls']} timed) | " + f"{t['find_related']['median_bytes'] / 1000:.1f} kB; {t['find_related']['largest_bytes'] / 1000:.1f} kB |"] + if q: + out += ["", f"
All {q['asked']} questions, both ways", "", + "| | Question | Rows | As SPARQL | Without SPARQL | How, without SPARQL |", "|---|---|---:|:---:|:---:|---|"] + first_proposed = next((row["id"] for row in q["questions"] if row["set"] == "proposed"), None) + for row in q["questions"]: + if row["id"] == first_proposed: + out.append("| | **Proposed in [#441](https://github.com/brain-bbqs/bbqs-app/issues/441), not adopted yet** | | | | |") + note = "" if row["status"] == "answered" else f" *({row['status']})*" + cells = ["—" if row["rows"] is None else "**differs**" if not ok else "same" if row["rows"] else "none" + for ok in (row["sparql_agrees"], row["tools_agree"])] + shown = "—" if row["rows"] is None else row["rows"] + out.append(f"| {row['id']} | {row['question']}{note} | {shown} | {cells[0]} | {cells[1]} | {row['how']} |") + out += ["", (f"The first {q['adopted']} are" if first_proposed else f"All {q['asked']} are") + + " the questions the knowledge graph is scored on " + "([`kg/competency_questions.yaml`](kg/competency_questions.yaml))." + + (" The rest are the extended set proposed in [#441](https://github.com/brain-bbqs/bbqs-app/issues/441); " + "they count toward nothing until that issue adopts them." if first_proposed else "") + + " A question of the form \"which X has no Y\" lists every X with no Y *recorded*, which in a graph " + "still being linked is not the same as having none.", "", "
"] + if s: + out += ["", f"Times are over stdio on one machine ({s['machine']}) and will differ on yours. Everything else is the " + "same wherever it is run."] + out.append(END) + return "\n".join(out) + + +def main(argv=None) -> int: + parser = argparse.ArgumentParser(description="Benchmark kg/mcp_server.py with the consortium's competency questions.") + parser.add_argument("--source", default=str(m.BUNDLED_EXPORT), metavar="PATH", + help="Turtle file to serve and to check against (default: the committed export).") + parser.add_argument("--only", choices=PARTS, action="append", help="Run only this part (may be repeated).") + parser.add_argument("--show", metavar="ID", help="Print the rows of one question, e.g. CQ04, each way it was asked.") + parser.add_argument("--access", choices=("anon", "full"), default="anon", + help="What the export is: the public one (default) or a full one, with provenance too.") + parser.add_argument("--json", metavar="PATH", help="Also write the results as JSON.") + parser.add_argument("--markdown", action="store_true", help="Print the results as the README block.") + parser.add_argument("--update", metavar="README", help="Rewrite the block between the benchmark markers in this file.") + args = parser.parse_args(argv) + for stream in (sys.stdout, sys.stderr): # names in the graph are not all ASCII + if hasattr(stream, "reconfigure"): + stream.reconfigure(encoding="utf-8", errors="replace") + parts = args.only or (["questions"] if args.show else list(PARTS)) + if args.update and set(parts) != set(PARTS): + parser.error("--update needs every part: leave --only and --show out.") + + def say(text): + print(text, file=sys.stderr, flush=True) + + kg = m.GraphSource(args.source, 0).current() + cite = kg.cite() + results = {"server": m.__version__, "nodes": len(kg.nodes), "links": sum(kg.edge_counts.values()), + "snapshot": {"source": cite["graph"], **({"dated": cite["dated"]} if "dated" in cite else {})}} + client = Client(args.source) + try: + if "questions" in parts: + say("questions: asking each one over MCP, as SPARQL and through the graph tools") + results["questions"] = ask_questions(client, kg, args.source, args.show, access=args.access) + if "speed" in parts: + say("speed: timing calls on real nodes") + results["speed"] = measure_speed(client, kg, load_questions()[0]) + finally: + client.close() + if "ranking" in parts: + say("ranking: hiding each tie in turn (about a minute)") + results["ranking"] = measure_ranking(args.source, say) + if args.json: + Path(args.json).write_text(json.dumps(results, indent=1, ensure_ascii=False) + "\n", encoding="utf8") + if args.update: + readme = Path(args.update) + text = readme.read_text(encoding="utf8") + if START not in text or END not in text: + parser.error(f"{readme} has no benchmark block: it needs the lines {START} and {END}.") + readme.write_text(text[:text.index(START)] + markdown(results) + text[text.index(END) + len(END):], encoding="utf8") + say(f"updated the block in {readme}") + if not args.show: + print(markdown(results) if args.markdown else report(results)) + return 1 if "questions" in results and not results["questions"]["all_agree"] else 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/kg/browser/index.html b/kg/browser/index.html index b9ddb320..21df24c6 100644 --- a/kg/browser/index.html +++ b/kg/browser/index.html @@ -157,12 +157,95 @@ .grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; } .panel { display: grid; gap: 8px; min-width: 0; } + /* Publications and Meetings */ + .intro { margin: 0; max-width: 78ch; } + .chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } + .textbox { background: var(--sunk); border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; max-height: 60vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; line-height: 1.6; max-width: 80ch; } + details.q > summary .right { flex-wrap: wrap; justify-content: flex-end; } + .meet { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: start; } + .facets select.search { padding: 6px 8px; } + .mtg { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px; display: grid; gap: 8px; min-width: 0; } + .mtg header { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; } + .mtg header .pill { white-space: normal; min-width: 0; } + .mtg .date { font-family: var(--f-mono); font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; } + .pt { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 2px 12px; padding-top: 8px; border-top: 1px solid var(--line); } + .pt .kind { display: inline-flex; gap: 6px; align-items: center; align-self: start; font: 600 11px/1.9 var(--f-body); letter-spacing: .06em; text-transform: uppercase; } + mark.q { background: var(--accent-soft); color: inherit; padding: 0 2px; border-radius: 2px; } + .who { display: inline-flex; gap: 6px; align-items: baseline; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 1px 9px; font-size: 12.5px; cursor: pointer; } + .who:hover { border-color: var(--muted); } + .who .how { font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); } + .who[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); } + .who.unres { border-style: dashed; color: var(--warn); cursor: help; } + .linkbtn.quiet { color: var(--muted); font-size: 12px; } + .pill.said { background: transparent; border-color: currentColor; color: var(--c-people); } + details.facetmore > summary { cursor: pointer; font: 600 11px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-bottom: 6px; } + .ai { border: 1px dashed var(--warn); background: var(--warn-soft); border-radius: 4px; padding: 6px 10px; display: grid; gap: 2px; } + .ai b { color: var(--warn); font-weight: 600; } + details.evi > summary { cursor: pointer; font-size: 12.5px; color: var(--accent); } + .evrow { border-left: 2px solid var(--line); padding-left: 8px; font-size: 13px; } + .linkbtn.quiet:hover, .linkbtn.quiet:focus-visible { color: var(--accent); } + + .gx { display: grid; gap: 10px; } + .gbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; } + .gnav { display: flex; gap: 4px; } + .gnav button { width: 38px; height: 34px; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; cursor: pointer; font-size: 17px; line-height: 1; color: var(--fg); } + .gnav button:not(:disabled):hover { border-color: var(--accent); color: var(--accent); } + .gnav button:disabled { opacity: .35; cursor: default; } + .gcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; flex: 1 1 280px; min-width: 0; font-size: 13px; } + .gcrumbs button { background: none; border: 0; padding: 3px 6px; border-radius: 4px; cursor: pointer; color: var(--accent); max-width: 26ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } + .gcrumbs button:hover { background: var(--accent-soft); } + .gcrumbs button[aria-current="page"] { color: var(--fg); font-weight: 600; background: var(--sunk); cursor: default; } + .gcrumbs button.later { color: var(--muted); } + .gcrumbs .sep { color: var(--muted); padding: 0 2px; } + .gsearch { position: relative; flex: 0 1 360px; min-width: min(100%, 220px); } + .gqres { position: absolute; z-index: 6; top: calc(100% + 4px); left: 0; right: 0; display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 28px rgb(0 0 0 / .14); max-height: 340px; overflow: auto; } + .gqres:empty { display: none; } + .gqres button { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; text-align: left; padding: 7px 10px; border: 0; background: none; cursor: pointer; font-size: 13px; color: var(--fg); } + .gqres button span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } + .gqres button[aria-selected="true"], .gqres button:hover { background: var(--accent-soft); } + .gqnone { padding: 8px 10px; font-size: 13px; color: var(--muted); } + .gmain { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; align-items: start; } + .gstage { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; min-width: 0; overflow: hidden; } + .gstage canvas { display: block; width: 100%; height: min(72vh, 760px, calc(100vw + 40px)); min-height: 380px; cursor: grab; touch-action: none; } + .gstage canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; } + .ghint { position: absolute; left: 10px; top: 9px; right: 130px; font-size: 11.5px; color: var(--muted); pointer-events: none; } + .gtip { position: absolute; pointer-events: none; background: var(--fg); color: var(--bg); font-size: 12px; line-height: 1.35; padding: 4px 8px; border-radius: 4px; max-width: 300px; z-index: 3; } + .gzoom { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; } + .gzoom button { min-width: 30px; height: 28px; border: 1px solid var(--line); background: var(--surface); border-radius: 4px; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 8px; color: var(--fg); } + .gzoom button:hover { border-color: var(--accent); color: var(--accent); } + .gcard { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: grid; gap: 14px; min-width: 0; position: sticky; top: env(safe-area-inset-top, 0px); max-height: calc(100vh - 24px); overflow: auto; align-content: start; } + .gcard h2 { overflow-wrap: anywhere; } + .gkinds { display: grid; gap: 2px; } + .gkinds label { display: grid; grid-template-columns: auto 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 3px 4px; border-radius: 4px; cursor: pointer; font-size: 13px; } + .gkinds label:hover { background: var(--sunk); } + .gkinds .c { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); } + .ggroup { display: grid; gap: 5px; } + .ghead { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); } + .ghead .c { font-family: var(--f-mono); } + .gchips { display: flex; flex-wrap: wrap; gap: 5px; } + .gchip { border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } + .gchip:hover, .gchip.hot { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); } + .gchip.more { color: var(--muted); border-style: dashed; } + .gfacts { font-size: 12.5px; } + .gpathbox { display: grid; gap: 6px; padding: 10px; background: var(--sunk); border-radius: 6px; } + .gresults { display: grid; gap: 3px; } + .gpath { margin: 0; padding-left: 18px; display: grid; gap: 5px; } + .gpath li { display: grid; gap: 2px; justify-items: start; } + .gcard kbd { font-family: var(--f-mono); font-size: 11px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 3px; padding: 0 4px; background: var(--sunk); } + .gsr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; } + @media (max-width: 560px) { .ghint { display: none; } .gsearch { flex-basis: 100%; } } + @media (max-width: 1100px) { + .gmain { grid-template-columns: minmax(0, 1fr); } + .gcard { position: static; max-height: none; } .ent { grid-template-columns: 200px minmax(0, 1fr); } + .meet { grid-template-columns: 200px minmax(0, 1fr); } .detail { grid-column: 1 / -1; position: static; max-height: none; } } @media (max-width: 720px) { .ent { grid-template-columns: minmax(0, 1fr); } + .meet { grid-template-columns: minmax(0, 1fr); } + .pt { grid-template-columns: minmax(0, 1fr); } .facets { position: static; } details.q > summary { grid-template-columns: 44px minmax(0, 1fr); } details.q > summary .right { grid-column: 2; } @@ -174,7 +257,8 @@

BBQS Graph Inspector

-

Every node in the exported BBQS knowledge graph, with the structural, competency and consistency checks that kg/quality.py ran on it.

+

Every node in the exported BBQS knowledge graph, with the structural, competency and SHACL validation checks that kg/quality.py ran on it.

+
@@ -187,7 +271,16 @@

BBQS Graph Inspector

diff --git a/kg/browser/template.html b/kg/browser/template.html index 6c95b498..2619e988 100644 --- a/kg/browser/template.html +++ b/kg/browser/template.html @@ -153,12 +153,95 @@ .grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; } .panel { display: grid; gap: 8px; min-width: 0; } + /* Publications and Meetings */ + .intro { margin: 0; max-width: 78ch; } + .chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } + .textbox { background: var(--sunk); border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; max-height: 60vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; line-height: 1.6; max-width: 80ch; } + details.q > summary .right { flex-wrap: wrap; justify-content: flex-end; } + .meet { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: start; } + .facets select.search { padding: 6px 8px; } + .mtg { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px; display: grid; gap: 8px; min-width: 0; } + .mtg header { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; } + .mtg header .pill { white-space: normal; min-width: 0; } + .mtg .date { font-family: var(--f-mono); font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; } + .pt { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 2px 12px; padding-top: 8px; border-top: 1px solid var(--line); } + .pt .kind { display: inline-flex; gap: 6px; align-items: center; align-self: start; font: 600 11px/1.9 var(--f-body); letter-spacing: .06em; text-transform: uppercase; } + mark.q { background: var(--accent-soft); color: inherit; padding: 0 2px; border-radius: 2px; } + .who { display: inline-flex; gap: 6px; align-items: baseline; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 1px 9px; font-size: 12.5px; cursor: pointer; } + .who:hover { border-color: var(--muted); } + .who .how { font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); } + .who[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); } + .who.unres { border-style: dashed; color: var(--warn); cursor: help; } + .linkbtn.quiet { color: var(--muted); font-size: 12px; } + .pill.said { background: transparent; border-color: currentColor; color: var(--c-people); } + details.facetmore > summary { cursor: pointer; font: 600 11px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-bottom: 6px; } + .ai { border: 1px dashed var(--warn); background: var(--warn-soft); border-radius: 4px; padding: 6px 10px; display: grid; gap: 2px; } + .ai b { color: var(--warn); font-weight: 600; } + details.evi > summary { cursor: pointer; font-size: 12.5px; color: var(--accent); } + .evrow { border-left: 2px solid var(--line); padding-left: 8px; font-size: 13px; } + .linkbtn.quiet:hover, .linkbtn.quiet:focus-visible { color: var(--accent); } + + .gx { display: grid; gap: 10px; } + .gbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; } + .gnav { display: flex; gap: 4px; } + .gnav button { width: 38px; height: 34px; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; cursor: pointer; font-size: 17px; line-height: 1; color: var(--fg); } + .gnav button:not(:disabled):hover { border-color: var(--accent); color: var(--accent); } + .gnav button:disabled { opacity: .35; cursor: default; } + .gcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; flex: 1 1 280px; min-width: 0; font-size: 13px; } + .gcrumbs button { background: none; border: 0; padding: 3px 6px; border-radius: 4px; cursor: pointer; color: var(--accent); max-width: 26ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } + .gcrumbs button:hover { background: var(--accent-soft); } + .gcrumbs button[aria-current="page"] { color: var(--fg); font-weight: 600; background: var(--sunk); cursor: default; } + .gcrumbs button.later { color: var(--muted); } + .gcrumbs .sep { color: var(--muted); padding: 0 2px; } + .gsearch { position: relative; flex: 0 1 360px; min-width: min(100%, 220px); } + .gqres { position: absolute; z-index: 6; top: calc(100% + 4px); left: 0; right: 0; display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 28px rgb(0 0 0 / .14); max-height: 340px; overflow: auto; } + .gqres:empty { display: none; } + .gqres button { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; text-align: left; padding: 7px 10px; border: 0; background: none; cursor: pointer; font-size: 13px; color: var(--fg); } + .gqres button span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } + .gqres button[aria-selected="true"], .gqres button:hover { background: var(--accent-soft); } + .gqnone { padding: 8px 10px; font-size: 13px; color: var(--muted); } + .gmain { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; align-items: start; } + .gstage { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; min-width: 0; overflow: hidden; } + .gstage canvas { display: block; width: 100%; height: min(72vh, 760px, calc(100vw + 40px)); min-height: 380px; cursor: grab; touch-action: none; } + .gstage canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; } + .ghint { position: absolute; left: 10px; top: 9px; right: 130px; font-size: 11.5px; color: var(--muted); pointer-events: none; } + .gtip { position: absolute; pointer-events: none; background: var(--fg); color: var(--bg); font-size: 12px; line-height: 1.35; padding: 4px 8px; border-radius: 4px; max-width: 300px; z-index: 3; } + .gzoom { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; } + .gzoom button { min-width: 30px; height: 28px; border: 1px solid var(--line); background: var(--surface); border-radius: 4px; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 8px; color: var(--fg); } + .gzoom button:hover { border-color: var(--accent); color: var(--accent); } + .gcard { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: grid; gap: 14px; min-width: 0; position: sticky; top: env(safe-area-inset-top, 0px); max-height: calc(100vh - 24px); overflow: auto; align-content: start; } + .gcard h2 { overflow-wrap: anywhere; } + .gkinds { display: grid; gap: 2px; } + .gkinds label { display: grid; grid-template-columns: auto 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 3px 4px; border-radius: 4px; cursor: pointer; font-size: 13px; } + .gkinds label:hover { background: var(--sunk); } + .gkinds .c { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); } + .ggroup { display: grid; gap: 5px; } + .ghead { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); } + .ghead .c { font-family: var(--f-mono); } + .gchips { display: flex; flex-wrap: wrap; gap: 5px; } + .gchip { border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } + .gchip:hover, .gchip.hot { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); } + .gchip.more { color: var(--muted); border-style: dashed; } + .gfacts { font-size: 12.5px; } + .gpathbox { display: grid; gap: 6px; padding: 10px; background: var(--sunk); border-radius: 6px; } + .gresults { display: grid; gap: 3px; } + .gpath { margin: 0; padding-left: 18px; display: grid; gap: 5px; } + .gpath li { display: grid; gap: 2px; justify-items: start; } + .gcard kbd { font-family: var(--f-mono); font-size: 11px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 3px; padding: 0 4px; background: var(--sunk); } + .gsr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; } + @media (max-width: 560px) { .ghint { display: none; } .gsearch { flex-basis: 100%; } } + @media (max-width: 1100px) { + .gmain { grid-template-columns: minmax(0, 1fr); } + .gcard { position: static; max-height: none; } .ent { grid-template-columns: 200px minmax(0, 1fr); } + .meet { grid-template-columns: 200px minmax(0, 1fr); } .detail { grid-column: 1 / -1; position: static; max-height: none; } } @media (max-width: 720px) { .ent { grid-template-columns: minmax(0, 1fr); } + .meet { grid-template-columns: minmax(0, 1fr); } + .pt { grid-template-columns: minmax(0, 1fr); } .facets { position: static; } details.q > summary { grid-template-columns: 44px minmax(0, 1fr); } details.q > summary .right { grid-column: 2; } @@ -170,7 +253,8 @@

BBQS Graph Inspector

-

Every node in the exported BBQS knowledge graph, with the structural, competency and consistency checks that kg/quality.py ran on it.

+

Every node in the exported BBQS knowledge graph, with the structural, competency and SHACL validation checks that kg/quality.py ran on it.

+
@@ -184,6 +268,15 @@

BBQS Graph Inspector

diff --git a/kg/ci_check.py b/kg/ci_check.py index c5b269e7..c2838ad4 100644 --- a/kg/ci_check.py +++ b/kg/ci_check.py @@ -1,14 +1,28 @@ #!/usr/bin/env python3 """CI gate for the knowledge graph (build phase 7). Fails on a regression, never on a known gap. - 1. RED -- every consistency shape fires on fixtures/contradictions.ttl - 2. GREEN -- fixtures/clean.ttl conforms - 3. export -- no shape fires on the export more often than quality_baseline.json allows, + 1. RED -- on fixtures/contradictions.ttl each validation shape reports exactly the focus nodes + and values planted for it, kg/quality.py duplicates() exactly the groups planted + (each with its kind: a folded pair for every identifier it checks, an ORCID written + with x and with X, a DOI with and without its resolver, ...; unlinked preprint + + published pairs; same-title groups a link must not resolve), and revision_links() + exactly the links planted (RED_EXPECTED below). "Fires at least once" is not enough: + a shape keyed on the wrong slot still fires, on another shape's pair. + 2. GREEN -- fixtures/clean.ttl conforms, holds no possible duplicate, no unlinked pair and no + revision_of to check; its same-title pairs linked by revision_of count as linked and + its records that share only a URL as advisory (GREEN_EXPECTED) + 3. identity -- kg/identity_keys.py gives every vector's `want` in kg/identity_keys.json + 4. export -- no shape fires on the export more often than quality_baseline.json allows, and no shape that is quiet in the baseline starts firing - 4. quality -- every competency question answered in the baseline still answers, and every shape - that had data to check still does - 5. generated (--check-generated, needs linkml) -- bbqs.owl.ttl and bbqs.shapes.gen.ttl are what - gen-owl / gen-shacl produce from bbqs.linkml.yaml today + 5. quality -- every competency question answered in the baseline still answers, every shape + that had data to check still does, and there are no more possible duplicates, + unlinked preprint + published pairs, same-title versions to check (a link from the + preprint, a preprint later than its paper), or revision_of links to check (reversed, + or between two titles) than the baseline has. Each says what a curator does: a + duplicate is merged; a preprint and its paper are linked or corrected, never merged + 6. generated (--check-generated, needs linkml) -- bbqs.owl.ttl and bbqs.shapes.gen.ttl say what + gen-owl / gen-shacl produce from bbqs.linkml.yaml today, statement for statement, + blank nodes included (an owl:hasKey list, an OWL restriction, a SHACL property shape) python kg/ci_check.py [--export PATH] [--check-generated] python kg/ci_check.py --update-baseline # after a real improvement; commit the new baseline @@ -19,53 +33,283 @@ import json import subprocess import sys -import tempfile from collections import Counter from pathlib import Path import click -from rdflib import BNode, Graph +from rdflib import BNode, Graph, URIRef +from rdflib.collection import Collection +from rdflib.namespace import RDF, SH -from quality import HERE, KGQuality +import identity_keys +from quality import BBQS, BID, FOLD, HERE, IDENTIFIERS, KGQuality, folded BASELINE = HERE / "quality_baseline.json" RED = HERE / "fixtures" / "contradictions.ttl" GREEN = HERE / "fixtures" / "clean.ttl" +# RDF lists whose order means nothing: gen-shacl writes sh:ignoredProperties from a set, so the +# order of its members changes from run to run. They are compared as sets. +UNORDERED = {SH.ignoredProperties} +SHOWN = 10 # differing statements printed for a stale file -def shape_counts(q: KGQuality, severity: str | None = None) -> Counter: - """Results per shape; severity=None counts warnings too (the RED/GREEN fixtures test both).""" - return Counter(v["shape"] for vs in q.violations().values() for v in vs - if severity is None or v["severity"] == severity) +# The identifiers duplicates() must compare, each with a folded pair in the RED fixture. Pinned here +# so that dropping one from quality.py IDENTIFIERS fails the gate instead of shrinking the check. +REQUIRED_IDENTIFIERS = ("orcid", "doi", "pmid", "fon", "grant_number", "url", "external_url", "repo_url") +# What the fixtures must report, node for node: bid: local names, values as the shape reports them +# (a bbqs: class as bbqs:). Edit these by hand with the fixture, never from a run's output: +# each entry is the one result its planted case exists for. A shape keyed on the wrong slot, a +# branch of a shape removed, or a rule of version_kind() loosened changes a row here. +RED_EXPECTED = { + "shapes": { + "AuthorOrcidResolvesShape": {("pub-1", "pub-1")}, + "AwardUniquePerProjectShape": {("proj-a", "proj-b")}, + "ConflictingVerifiedProvenanceShape": {("prov-a", "prov-a")}, + "ConsortiumRoleNotAProjectRoleShape": {("inv-pi-label", "Principal Investigator (PI)"), ("inv-token", "postdoc")}, + "DoiUniquePerPublicationShape": {("pub-doi-a", "pub-doi-b")}, + "EmailUniquePerPersonShape": {("inv-email-a", "inv-email-a")}, + "FonUniquePerCallShape": {("fo-a", "fo-b")}, + "GradedProvenancePrecedenceShape": {("prov-c", "prov-c")}, + "HeldByResolvesShape": {("role-dangling", "ghost-investigator"), ("role-two", "")}, + "MechanismMatchesGrantNumberShape": {("proj-1", "proj-1")}, + "NodeHasProvenanceShape": {("proj-a", "proj-a"), ("proj-b", "proj-b"), ("proj-award-a", "proj-award-a"), + ("proj-award-b", "proj-award-b"), ("proj-no-prov", "proj-no-prov")}, + "OneClassPerNodeShape": {("dual-1", "bbqs:ResearchOrganization")}, + "OneRolePerPersonPerGrantShape": {("role-1", "role-1")}, + "OrcidUniquePerPersonShape": {("inv-dup-a", "inv-dup-b")}, + "PmidUniquePerPublicationShape": {("pub-pmid-a", "pub-pmid-b")}, + "ProjectIdentifiersAgreeShape": {("proj-renumbered", "U24MH136628")}, + "ProjectIsAnAwardShape": {("proj-no-award", "")}, + "ProjectRoleTokenShape": {("role-1", "Principal Investigator")}, + # #25, one row per branch: an object that is no Publication, a subject that is none, a link + # to itself, a link both ways (both ends report it) + "RevisionOfLinksTwoPublicationsShape": {("pub-rev-a", "ds-rev"), ("ds-rev-subject", "pub-rev-target"), + ("pub-rev-self", "pub-rev-self"), ("pub-rev-x", "pub-rev-y"), + ("pub-rev-y", "pub-rev-x")}, + "StudiesSpeciesResolvesShape": {("proj-1", "Freely moving animals")}, + "UrlFieldsAreUrlsShape": {("job-1", "https://jobs.example.org/one ; https://jobs.example.org/two")}, + }, + # (by, kind, nodes) for every group duplicates() reports + "groups": { + ("orcid", "duplicate", ("inv-dup-a", "inv-dup-b")), + ("orcid", "duplicate", ("inv-orcid-X", "inv-orcid-x")), + ("doi", "duplicate", ("pub-doi-a", "pub-doi-b")), + ("doi", "duplicate", ("pub-doi-c", "pub-doi-d")), + ("doi", "duplicate", ("pub-doi-e", "pub-doi-f")), # unreadable, compared as written + ("doi", "duplicate", ("pub-doi-g", "pub-doi-h")), # doi.org/ and www.doi.org/ + ("doi", "duplicate", ("pub-vkd-paper", "pub-vkd-pre1")), + ("pmid", "duplicate", ("pub-pmid-a", "pub-pmid-b")), + ("pmid", "duplicate", ("pub-pmid-c", "pub-pmid-d")), + ("fon", "duplicate", ("fo-a", "fo-b")), + ("fon", "duplicate", ("fo-c", "fo-d")), + ("grant_number", "duplicate", ("proj-a", "proj-b")), + ("grant_number", "duplicate", ("proj-award-a", "proj-award-b")), + ("url", "duplicate", ("fo-e", "fo-f")), # a URL with a name match + ("external_url", "duplicate", ("sw-a", "sw-b")), + ("repo_url", "duplicate", ("sw-c", "sw-d")), + ("title", "versions", ("pub-ver-preprint", "pub-ver-published")), + ("title", "versions", ("pub-lm-paper", "pub-lm-pre")), # 10.1101/lm... is a journal's DOI + ("title", "versions", ("pub-alpha-paper", "pub-alpha-pre")), # by bbqs:title; beta stays out + ("title", "duplicate", ("pub-vk2-a", "pub-vk2-b", "pub-vk2-pre")), # two papers, linked + ("title", "duplicate", ("pub-vk3-a", "pub-vk3-b", "pub-vk3-pre")), # two papers, unlinked + ("title", "duplicate", ("pub-vkd-paper", "pub-vkd-pre1", "pub-vkd-pre2")), # one DOI twice + ("title", "versions_to_check", ("pub-late-paper", "pub-late-pre")), # preprint later + ("title", "versions_to_check", ("pub-wrongway-paper", "pub-wrongway-pre")), # link from the preprint + # chronology, one signal each (PubMed id, then the DOI's posting date, then the year): + ("title", "versions_to_check", ("pub-pmidlate-paper", "pub-pmidlate-pre")), # PubMed id alone: later + ("title", "versions", ("pub-drift-paper", "pub-drift-pre")), # the year alone would say later + ("title", "versions", ("pub-posted-paper", "pub-posted-pre")), # the DOI's date, not the year + ("title", "versions_to_check", ("pub-yearlate-paper", "pub-yearlate-pre")), # the year alone: later + ("title", "versions", ("pub-noyear-paper", "pub-noyear-pre")), # no year, PubMed order kept + }, + # (subject, object, problems) for every link revision_links() reports + "revision_links": { + ("pub-wrongway-pre", "pub-wrongway-paper", ("reversed",)), + ("pub-other-paper", "pub-other-pre", ("titles_differ",)), + ("pub-rev-x", "pub-rev-y", ("titles_differ",)), + ("pub-rev-y", "pub-rev-x", ("titles_differ",)), + }, +} +GREEN_EXPECTED = { + "shapes": {}, + "groups": { + ("title", "linked_versions", ("pub-preprint", "pub-published")), + ("title", "linked_versions", ("pub-lm-preprint", "pub-lm-published")), + ("title", "linked_versions", ("pub-hand-preprint", "pub-hand-published")), # linked by hand, PubMed order aside + ("external_url", "advisory", ("sw-dlc", "sw-dlc-live")), # one lab homepage, two tools + ("url", "advisory", ("fo-topic-1", "fo-topic-2")), # one NIH topic page, two calls + }, + "revision_links": set(), +} -def consistency_shape_names(q: KGQuality) -> set[str]: + +def compact(value: str) -> str: + """A node or value as RED_EXPECTED writes it: bid: local name, bbqs: prefix, literal as is.""" + v = str(value) + if v.startswith(BID): + return v[len(BID):] + return "bbqs:" + v[len(str(BBQS)):] if v.startswith(str(BBQS)) else v + + +def fixture_results(q: KGQuality) -> dict: + """What a fixture reports, in RED_EXPECTED's form.""" + shapes = {} + for focus, results in q.violations().items(): + for r in results: + shapes.setdefault(r["shape"], set()).add((compact(focus), compact(r["value"]))) + groups = {(g["by"], g["kind"], tuple(sorted(compact(n) for n in g["nodes"]))) for g in q.duplicates()["groups"]} + links = {(compact(r["subject"]), compact(r["object"]), tuple(r["problems"])) for r in q.revision_links()["links"]} + return {"shapes": shapes, "groups": groups, "revision_links": links} + + +def compare_fixture(label: str, got: dict, want: dict, errors: list[str]) -> bool: + """Every difference between what a fixture reports and what it must, one error per section.""" + ok = True + for shape in sorted(set(got["shapes"]) | set(want["shapes"])): + have, need = got["shapes"].get(shape, set()), want["shapes"].get(shape, set()) + if have != need: + ok = False + errors.append(f"{label} fixture: {shape} reports {sorted(have) or 'nothing'}, it must report " + f"{sorted(need) or 'nothing'} (missing {sorted(need - have)}, unexpected {sorted(have - need)})") + for section in ("groups", "revision_links"): + missing, unexpected = want[section] - got[section], got[section] - want[section] + if missing or unexpected: + ok = False + errors.append(f"{label} fixture: {'duplicates()' if section == 'groups' else 'revision_links()'} " + f"is missing {sorted(missing)} and reports unexpected {sorted(unexpected)}") + return ok + + +def validation_shape_names(q: KGQuality) -> set[str]: return {r["shape"] for r in q.shape_exercise()} -def ground(graph: Graph) -> tuple[int, set]: - """Triple count plus every triple without a blank node: a cheap stand-in for isomorphism, - which is too slow on the OWL restrictions' blank nodes.""" - return len(graph), {t for t in graph if not any(isinstance(x, BNode) for x in t)} +def statements(graph: Graph) -> Counter: + """Every triple whose subject is not a blank node, each blank-node object written out in full + (a restriction, an RDF list, a property shape), so two files that say the same thing compare + equal whatever labels or order the serializer gave their blank nodes; a blank node no named + subject reaches is written out on its own. Generated OWL and SHACL hang trees of blank nodes off + named terms, so this is exact for them, and quick, where isomorphism is too slow. Triple counts + and the triples without a blank node were compared before, which missed a key that names + another slot: owl:hasKey ( bbqs:orcid ) and ( bbqs:scholar_id ) differ only inside a list.""" + nm = graph.namespace_manager + memo = {} + + def term(t): + if isinstance(t, BNode): + return node(t) + try: + return t.n3(nm) + except Exception: # a term the namespace manager cannot shorten + return t.n3() + + def node(b): + if b in memo: + return memo[b] + memo[b] = "[ ]" + if (b, RDF.first, None) in graph: + items = [term(x) for x in Collection(graph, b)] + if any(p in UNORDERED for _s, p in graph.subject_predicates(b)): + items.sort() + text = "( " + " ".join(items) + " )" + else: + text = "[ " + " ; ".join(sorted(f"{term(p)} {term(o)}" for p, o in graph.predicate_objects(b))) + " ]" + memo[b] = text + return text + + out = Counter(f"{term(s)} {term(p)} {term(o)}" for s, p, o in graph if not isinstance(s, BNode)) + reached, stack = set(), [o for s, _p, o in graph if not isinstance(s, BNode) and isinstance(o, BNode)] + while stack: + b = stack.pop() + if b not in reached: + reached.add(b) + stack += [x for x in graph.objects(b, None) if isinstance(x, BNode)] + for b in {s for s in graph.subjects() if isinstance(s, BNode)} - reached: + out[f"(unreached) {term(b)}"] += 1 + return out + +def generator_error(stderr: str) -> str: + """What a failed generator said: its line naming the error, or else the end of its output (the + start is DeprecationWarnings).""" + named = [line.strip() for line in stderr.splitlines() if "Error" in line] + return named[-1] if named else stderr.strip()[-600:] -def check_generated_artifacts(errors: list[str]): - schema = HERE / "bbqs.linkml.yaml" - for tool, committed in [("gen-owl", HERE / "bbqs.owl.ttl"), ("gen-shacl", HERE / "bbqs.shapes.gen.ttl")]: - out = subprocess.run([tool, str(schema)], capture_output=True, text=True, encoding="utf-8") + +def check_generated_artifacts(errors: list[str], kg_dir: Path = HERE): + schema = kg_dir / "bbqs.linkml.yaml" + for tool, committed in [("gen-owl", kg_dir / "bbqs.owl.ttl"), ("gen-shacl", kg_dir / "bbqs.shapes.gen.ttl")]: + try: + out = subprocess.run([tool, str(schema)], capture_output=True, text=True, encoding="utf-8") + except FileNotFoundError: + errors.append(f"{tool} is not installed: pip install -r kg/requirements-generate.txt") + continue if out.returncode: - errors.append(f"{tool} failed: {out.stderr.strip()[:300]}") + errors.append(f"{tool} failed: {generator_error(out.stderr)}") continue - with tempfile.NamedTemporaryFile("w", suffix=".ttl", delete=False, encoding="utf-8") as f: - f.write(out.stdout) - fresh = ground(Graph().parse(f.name, format="turtle")) - Path(f.name).unlink() - have = ground(Graph().parse(str(committed), format="turtle")) - if fresh != have: - errors.append(f"{committed.name} is stale: regenerate it with {tool} (see kg/README.md) " - f"({have[0]} committed vs {fresh[0]} generated triples)") - else: - print(f"ok {committed.name} matches {tool}") + fresh = statements(Graph().parse(data=out.stdout, format="turtle")) + have = statements(Graph().parse(str(committed), format="turtle")) + if fresh == have: + print(f"ok {committed.name} matches {tool} ({sum(have.values())} statements)") + continue + only_committed, only_fresh = have - fresh, fresh - have + shown = [f"- {s}" for s in sorted(only_committed)] + [f"+ {s}" for s in sorted(only_fresh)] + clip = lambda s: s if len(s) <= 220 else s[:217] + "..." + errors.append(f"{committed.name} is stale: regenerate it with {tool} (see kg/README.md). " + f"{sum(only_committed.values())} statement(s) only in the committed file (-), " + f"{sum(only_fresh.values())} only in what {tool} writes now (+):" + + "".join(f"\n {clip(s)}" for s in shown[:SHOWN]) + + (f"\n ... and {len(shown) - SHOWN} more" if len(shown) > SHOWN else "")) + + +def check_identity(errors: list[str]): + """kg/identity_keys.py against every vector of kg/identity_keys.json (the rules the database, + the write paths and this graph share), and the preprint lists against the JSON's.""" + spec = identity_keys.load_spec() + problems = identity_keys.check(spec) + if problems: + errors.append("identity: kg/identity_keys.py disagrees with kg/identity_keys.json:" + + "".join(f"\n {p}" for p in problems[:SHOWN])) + else: + print(f"ok identity keys: kg/identity_keys.py gives all {sum(len(k['vectors']) for k in spec['keys'].values())} vectors") + + +def check_fixtures(red: KGQuality, green: KGQuality, errors: list[str]): + """Each fixture reports exactly what it must (RED_EXPECTED, GREEN_EXPECTED), every validation + shape has its RED results pinned, and duplicates() folds a pair of every required identifier: a + group whose nodes hold the identifier in different spellings that are one value.""" + shapes = validation_shape_names(red) + unpinned = sorted(shapes - set(RED_EXPECTED["shapes"])) + if unpinned: + errors.append(f"RED fixture: no expected results for {', '.join(unpinned)}: plant a case for each new " + "shape in contradictions.ttl and pin what it must report in ci_check.py RED_EXPECTED") + dropped = [by for by in REQUIRED_IDENTIFIERS if by not in IDENTIFIERS] + if dropped: + errors.append(f"quality.py IDENTIFIERS no longer compares {', '.join(dropped)}") + red_ok = compare_fixture("RED", fixture_results(red), RED_EXPECTED, errors) + folds = set() + for grp in red.duplicates()["groups"]: + by = grp["by"] + if grp["kind"] == "duplicate" and by in FOLD: + spellings = {str(o) for n in grp["nodes"] for o in red.graph.objects(URIRef(n), BBQS[by]) + if folded(by, o) == grp["value"]} + if len(spellings) > 1: + folds.add(by) + unfolded = [by for by in sorted(set(REQUIRED_IDENTIFIERS) | set(IDENTIFIERS)) if by not in folds] + if unfolded: + errors.append(f"RED fixture: duplicates() folds no pair of {', '.join(unfolded)} in contradictions.ttl " + "(two nodes with one identifier spelled two ways)") + if red_ok and not unfolded and not unpinned: + rr = RED_EXPECTED + print(f"ok RED fixture: {len(rr['shapes'])} shapes report their {sum(map(len, rr['shapes'].values()))} planted " + f"results; duplicates() its {len(rr['groups'])} groups (a folded pair of each of " + f"{len(REQUIRED_IDENTIFIERS)} identifiers); revision_links() its {len(rr['revision_links'])} links") + if compare_fixture("GREEN", fixture_results(green), GREEN_EXPECTED, errors): + gg = GREEN_EXPECTED["groups"] + print(f"ok GREEN fixture conforms: no possible duplicate, {sum(k == 'linked_versions' for _b, k, _n in gg)} " + f"pairs linked by revision_of, {sum(k == 'advisory' for _b, k, _n in gg)} shared URLs advisory, " + "no revision_of to check") @click.command() @@ -82,10 +326,19 @@ def main(export_path, check_generated, update_baseline): if v["severity"] == "violation").items())), "warnings": dict(sorted(Counter(v["shape"] for e in report["entities"] for v in e["violations"] if v["severity"] == "warning").items())), - "answered": sorted(c["id"] for c in report["competency"] if c["status"] == "answered"), + # A "which X has no Y" question (reads: absence) answers whether it lists some X or none. + "answered": sorted(c["id"] for c in report["competency"] if c["status"] in ("answered", "none")), "exercised": sorted(s["shape"] for s in report["shapes"] if s["exercised"]), "isolated": report["structure"]["isolated"], "nodes": report["structure"]["nodes"], + # Groups of same-class nodes sharing a name or identifier (kg/quality.py duplicates()). + "duplicates": report["duplicates"]["count"], + # Preprint + published pairs with one title and no revision_of link between them yet. + "versions": report["duplicates"]["versions"], + # Such pairs whose link runs from the preprint, or whose preprint is later than its paper. + "versions_to_check": report["duplicates"]["versions_to_check"], + # revision_of links the pairing rule never makes: from a preprint, or between two titles. + "revision_links": report["revision_links"]["count"], } if update_baseline: BASELINE.write_text(json.dumps(now, indent=2) + "\n", encoding="utf-8") @@ -95,18 +348,9 @@ def main(export_path, check_generated, update_baseline): errors, improved = [], [] base = json.loads(BASELINE.read_text(encoding="utf-8")) - red = shape_counts(KGQuality(RED)) - silent = sorted(consistency_shape_names(q) - set(red)) - if silent: - errors.append(f"RED fixture: these shapes no longer fire on contradictions.ttl: {', '.join(silent)}") - else: - print(f"ok RED fixture fires all {len(red)} shapes") - - green = shape_counts(KGQuality(GREEN)) - if green: - errors.append(f"GREEN fixture no longer conforms: {dict(green)}") - else: - print("ok GREEN fixture conforms") + red_q, green_q = KGQuality(RED), KGQuality(GREEN) + check_fixtures(red_q, green_q, errors) + check_identity(errors) for shape, n in sorted(now["violations"].items()): allowed = base["violations"].get(shape, 0) @@ -127,6 +371,50 @@ def main(export_path, check_generated, update_baseline): improved.append(f"{label} gained: {', '.join(gained)}") print(f"{'ok ' if not lost else 'BAD'} {label}: {len(now[key])} (baseline {len(base[key])})") print(f"-- isolated nodes: {now['isolated']} of {now['nodes']} (baseline {base['isolated']} of {base['nodes']})") + # A duplicate is stopped when it arrives, not cleaned later: more groups than the baseline fails. + if "duplicates" in base: + if now["duplicates"] > base["duplicates"]: + errors.append(f"quality: possible duplicates rose to {now['duplicates']} groups (baseline {base['duplicates']}); " + "merge them in the database, or fix the write path that made them") + elif now["duplicates"] < base["duplicates"]: + improved.append(f"possible duplicates {base['duplicates']} -> {now['duplicates']}") + print(f"{'ok ' if now['duplicates'] <= base['duplicates'] else 'BAD'} possible duplicates: {now['duplicates']} groups (baseline {base['duplicates']})") + # A preprint and its published version are linked (revision_of), never merged and never left apart. + if "versions" in base: + if now["versions"] > base["versions"]: + errors.append(f"quality: unlinked preprint + published pairs rose to {now['versions']} (baseline {base['versions']}); " + "link each with revision_of (public.kg_link_publication_versions, which the importer runs), " + "or merge the duplicate that keeps it from pairing") + elif now["versions"] < base["versions"]: + improved.append(f"unlinked preprint + published pairs {base['versions']} -> {now['versions']}") + print(f"{'ok ' if now['versions'] <= base['versions'] else 'BAD'} unlinked preprint + published pairs: " + f"{now['versions']} (baseline {base['versions']}); {report['duplicates']['linked_versions']} linked") + # A preprint and its paper whose link or order is wrong: a link or a value to correct, never a merge. + allowed = base.get("versions_to_check", 0) + if now["versions_to_check"] > allowed: + groups = [g for g in report["duplicates"]["groups"] if g["kind"] == "versions_to_check"] + errors.append(f"quality: same-title preprint + published records to check rose to {now['versions_to_check']} " + f"(baseline {allowed}): " + "; ".join(", ".join(g["nodes"]) for g in groups[:SHOWN]) + + ". A preprint and its paper are two records of one work: never merge them. Correct the link " + "(revision_of runs from the published paper to its preprint), or the record whose PMID, DOI or " + "year is wrong; a preprint PubMed added after its paper (or posted later, by its DOI) may be " + "another work with the same title") + elif now["versions_to_check"] < allowed: + improved.append(f"same-title versions to check {allowed} -> {now['versions_to_check']}") + print(f"{'ok ' if now['versions_to_check'] <= allowed else 'BAD'} same-title versions to check (a link from the " + f"preprint, or a preprint later than its paper): {now['versions_to_check']} (baseline {allowed})") + # A version link runs from the published paper to its preprint, between two records of one title. + allowed = base.get("revision_links", 0) + if now["revision_links"] > allowed: + errors.append(f"quality: revision_of links to check rose to {now['revision_links']} (baseline {allowed}): " + + "; ".join(f"{r['subject']} -> {r['object']} ({', '.join(r['problems'])})" + for r in report["revision_links"]["links"][:SHOWN]) + + ". Correct or delete each in resource_links: a published paper revises its preprint, of the same title") + elif now["revision_links"] < allowed: + improved.append(f"revision_of links to check {allowed} -> {now['revision_links']}") + print(f"{'ok ' if now['revision_links'] <= allowed else 'BAD'} revision_of links to check (reversed, or two titles): " + f"{now['revision_links']} (baseline {allowed}); shared URL only (advisory, not gated): " + f"{report['duplicates'].get('advisory', 0)}") if check_generated: check_generated_artifacts(errors) diff --git a/kg/competency_questions.yaml b/kg/competency_questions.yaml index 43143280..540c82e8 100644 --- a/kg/competency_questions.yaml +++ b/kg/competency_questions.yaml @@ -4,15 +4,23 @@ # empty -- returned fewer, on an export that should be able to answer it: a real gap # n/a -- `access: full` on an anon export (the source rows are RLS-hidden), not a gap # unmodeled -- the SPARQL uses a bbqs: term the TBox (bbqs.owl.ttl) doesn't declare: a schema gap +# none -- a question with `reads: absence` found nothing missing (see below) # # Every bbqs: term is a LinkML slot/class name, so an empty answer points at the exporter (the slot # exists but isn't emitted) and an unmodeled one points at the schema (the slot doesn't exist). # `access` is the weakest Supabase key whose reads can answer the question -- measured against the -# live tables (e.g. grant_investigators and investigators_public are anon-readable; field_provenance -# and jobs are not), never assumed. +# live tables (e.g. grant_investigators, investigators_public, and the public_jobs and +# public_job_posters views are anon-readable; field_provenance and the jobs table are not), never +# assumed. # # Questions are pinned to real entities (R34DA059723, House Mouse, WG-Devices) so a result is # checkable against the site, not just "non-empty". +# +# CQ01-CQ19 are the first set. CQ20-CQ42 were proposed in #441 with their SPARQL and adopted in full. +# A question of the form "which X has no Y" (CQ21, CQ27, CQ30, CQ33, CQ38, CQ42) carries +# `reads: absence`: it lists every X for which no Y is RECORDED, which in a graph still being linked +# is not the same as "has none", and no rows means nothing is missing. The KG gate counts such a +# question as answering either way, so a gap being closed never fails it. prefixes: bbqs: https://brain-bbqs.org/schema# @@ -160,7 +168,7 @@ questions: - id: CQ14 area: products question: Which device categories does each project use? - access: anon # project_device_usage is anon-readable; the schema has no Project->DeviceCategory slot + access: anon # project_device_usage is anon-readable; exported as Project uses_device_category sparql: | SELECT ?grant_number ?category WHERE { ?project a bbqs:Project ; bbqs:grant_number ?grant_number ; bbqs:uses_device_category ?cat . @@ -201,10 +209,16 @@ questions: - id: CQ18 area: announcements question: Which jobs are posted, and by which institution? - access: full # the jobs table is RLS-hidden; anon sees only the resources row (name) + # The institution is the job's part_of_org link (resources / public_jobs .organization_id), read as + # that organization's name. job_institution, the institution as the posting writes it, is only + # exported for a job with no such link (link, don't copy), so it is read only then. + access: anon sparql: | SELECT ?title ?institution WHERE { - ?job a bbqs:Job ; bbqs:name ?title ; bbqs:job_institution ?institution . + ?job a bbqs:Job ; bbqs:name ?title . + { ?job bbqs:part_of_org ?org . ?org bbqs:name ?institution } + UNION + { ?job bbqs:job_institution ?institution . FILTER NOT EXISTS { ?job bbqs:part_of_org ?linked } } } # ── Provenance ────────────────────────────────────────────────────────────── @@ -221,3 +235,275 @@ questions: bbqs:prov_source_class ?source . OPTIONAL { ?source bbqs:grade ?grade } } + + # ── Investigators and membership ──────────────────────────────────────────── + - id: CQ20 + area: people + question: Which investigators are on more than one project, and which projects? + access: anon + sparql: | + SELECT ?name (GROUP_CONCAT(DISTINCT ?grant; separator=", ") AS ?projects) WHERE { + ?pr a bbqs:ProjectRole ; bbqs:held_by ?person ; bbqs:on_project ?project . + ?person bbqs:name ?name . ?project bbqs:grant_number ?grant . + } GROUP BY ?person ?name HAVING (COUNT(DISTINCT ?project) > 1) ORDER BY ?name + + - id: CQ21 + area: people + question: Which investigators have no ORCID recorded? + access: anon + reads: absence + sparql: | + SELECT ?name WHERE { + ?person a bbqs:Investigator ; bbqs:name ?name . + FILTER NOT EXISTS { ?person bbqs:orcid ?o } + } ORDER BY ?name + + - id: CQ22 + area: people + question: Which organization is each investigator tied to, directly or through a project? + access: anon + sparql: | + SELECT DISTINCT ?name ?org_name WHERE { + ?person a bbqs:Investigator ; bbqs:name ?name . + { ?org bbqs:members ?person } + UNION + { ?pr bbqs:held_by ?person ; bbqs:on_project ?p . ?p bbqs:part_of_org ?org } + ?org bbqs:name ?org_name . + } ORDER BY ?org_name ?name + + - id: CQ23 + area: working_groups + question: Who is in each working group, and on which projects are they? + access: anon + sparql: | + SELECT ?wg_name ?name ?grant WHERE { + ?wg a bbqs:WorkingGroup ; bbqs:name ?wg_name . + ?person bbqs:member_of_group ?wg ; bbqs:name ?name . + OPTIONAL { ?pr bbqs:held_by ?person ; bbqs:on_project ?p . ?p bbqs:grant_number ?grant } + } ORDER BY ?wg_name ?name + + - id: CQ24 + area: people + question: Which investigators hold more than one kind of role? + access: anon + sparql: | + SELECT ?name (GROUP_CONCAT(DISTINCT ?role; separator=", ") AS ?roles) WHERE { + ?pr a bbqs:ProjectRole ; bbqs:held_by ?person ; bbqs:project_role ?role . + ?person bbqs:name ?name . + } GROUP BY ?person ?name HAVING (COUNT(DISTINCT ?role) > 1) ORDER BY ?name + + # ── Species ───────────────────────────────────────────────────────────────── + - id: CQ25 + area: species + question: Which projects study the house mouse, whichever of its names is used? + access: anon + sparql: | + SELECT ?grant ?title WHERE { + ?sp a bbqs:Species . + { ?sp bbqs:name "Mus musculus" } UNION { ?sp bbqs:common_name "House Mouse" } UNION { ?sp bbqs:aliases "Mus musculus" } + ?project bbqs:studies_species ?sp ; bbqs:grant_number ?grant . + OPTIONAL { ?project bbqs:title ?title } + } ORDER BY ?grant + + - id: CQ26 + area: species + question: How many projects study each species? + access: anon + sparql: | + SELECT ?species (COUNT(DISTINCT ?project) AS ?projects) WHERE { + ?project a bbqs:Project ; bbqs:studies_species ?sp . + ?sp bbqs:name ?species . + } GROUP BY ?species ORDER BY DESC(?projects) + + - id: CQ27 + area: species + question: Which projects name a species in free text that is not resolved to a species node? + access: anon + reads: absence + sparql: | + SELECT ?grant ?raw WHERE { + ?project a bbqs:Project ; bbqs:grant_number ?grant ; bbqs:studies_species_unresolved ?raw . + } ORDER BY ?grant ?raw + + # ── Outputs ───────────────────────────────────────────────────────────────── + - id: CQ28 + area: products + question: How many publications, datasets, tools and models did each project produce? + access: anon + sparql: | + SELECT ?grant + (COUNT(DISTINCT ?pub) AS ?publications) (COUNT(DISTINCT ?ds) AS ?datasets) + (COUNT(DISTINCT ?tool) AS ?tools) (COUNT(DISTINCT ?model) AS ?models) WHERE { + ?project a bbqs:Project ; bbqs:grant_number ?grant . + OPTIONAL { ?project bbqs:produced ?pub . ?pub a bbqs:Publication } + OPTIONAL { ?project bbqs:produced ?ds . ?ds a bbqs:Dataset } + OPTIONAL { ?project bbqs:produced ?tool . ?tool a bbqs:SoftwareTool } + OPTIONAL { ?project bbqs:produced ?model . ?model a bbqs:MLModel } + } GROUP BY ?grant ORDER BY ?grant + + - id: CQ29 + area: products + question: How many publications came out of each investigator's projects, and which projects? + access: anon + sparql: | + SELECT ?name (COUNT(DISTINCT ?pub) AS ?publications) (GROUP_CONCAT(DISTINCT ?grant; separator=", ") AS ?projects) WHERE { + ?pr a bbqs:ProjectRole ; bbqs:held_by ?person ; bbqs:on_project ?project . + ?person bbqs:name ?name . ?project bbqs:grant_number ?grant ; bbqs:produced ?pub . + ?pub a bbqs:Publication . + } GROUP BY ?person ?name ORDER BY DESC(?publications) + + - id: CQ30 + area: provenance + question: Which produced datasets have no provenance recorded? + access: full + reads: absence + sparql: | + SELECT ?ds ?name WHERE { + ?project bbqs:produced ?ds . ?ds a bbqs:Dataset ; bbqs:name ?name . + BIND(STRAFTER(STR(?ds), "https://brain-bbqs.org/id/") AS ?localId) + FILTER NOT EXISTS { ?prov a bbqs:ProvenanceRecord ; bbqs:prov_entity_id ?localId ; bbqs:prov_source_class ?sc } + } + + - id: CQ31 + area: products + question: Which benchmarks is each ML model evaluated by, and which project produced it? + access: anon + sparql: | + SELECT ?model_name ?bench_name ?grant WHERE { + ?model a bbqs:MLModel ; bbqs:name ?model_name . + { ?model bbqs:evaluated_by ?bench } UNION { ?bench bbqs:evaluates ?model } + ?bench a bbqs:Benchmark ; bbqs:name ?bench_name . + OPTIONAL { ?project bbqs:produced ?model ; bbqs:grant_number ?grant } + } + + # ── Organizations ─────────────────────────────────────────────────────────── + - id: CQ32 + area: organizations + question: How many members does each organization have? + access: anon + sparql: | + SELECT ?org_name (COUNT(DISTINCT ?person) AS ?members) WHERE { + ?org a bbqs:ResearchOrganization ; bbqs:name ?org_name . + OPTIONAL { ?org bbqs:members ?person } + } GROUP BY ?org ?org_name ORDER BY DESC(?members) + + - id: CQ33 + area: organizations + question: Which organizations have no members recorded? + access: anon + reads: absence + sparql: | + SELECT ?org_name WHERE { + ?org a bbqs:ResearchOrganization ; bbqs:name ?org_name . + FILTER NOT EXISTS { ?org bbqs:members ?p } + } ORDER BY ?org_name + + - id: CQ34 + area: organizations + question: Which organizations have investigators on more than one project? + access: anon + sparql: | + SELECT ?org_name (COUNT(DISTINCT ?project) AS ?projects) WHERE { + ?org a bbqs:ResearchOrganization ; bbqs:name ?org_name ; bbqs:members ?person . + ?pr bbqs:held_by ?person ; bbqs:on_project ?project . + } GROUP BY ?org ?org_name HAVING (COUNT(DISTINCT ?project) > 1) ORDER BY DESC(?projects) + + # ── Jobs ──────────────────────────────────────────────────────────────────── + - id: CQ35 + area: announcements + question: Which jobs does each institution advertise? + # The institution as CQ18 reads it. Grouped by the organization node as well as its name, so two + # organizations of one name stay two, and a name written as text is not taken for the node. + access: anon + sparql: | + SELECT ?institution (COUNT(?job) AS ?jobs) (GROUP_CONCAT(?title; separator="; ") AS ?titles) WHERE { + ?job a bbqs:Job ; bbqs:name ?title . + { ?job bbqs:part_of_org ?org . ?org bbqs:name ?institution } + UNION + { ?job bbqs:job_institution ?institution . FILTER NOT EXISTS { ?job bbqs:part_of_org ?linked } } + } GROUP BY ?org ?institution ORDER BY DESC(?jobs) + + - id: CQ36 + area: announcements + question: Which kinds of role are being advertised? + access: anon # job_type, from the public_jobs view + sparql: | + SELECT ?job_type (COUNT(?job) AS ?postings) WHERE { + ?job a bbqs:Job ; bbqs:job_type ?job_type . + } GROUP BY ?job_type ORDER BY DESC(?postings) + + - id: CQ37 + area: announcements + question: Who posted each job? + # posted_by is a link to the poster's Investigator node, read as their name. Its anon source is + # the public_job_posters view (20261117170000), which pairs spine rows and nothing else: + # jobs.posted_by (an auth user id) and the contact fields stay hidden (20260515233153). + access: anon + sparql: | + SELECT ?title ?poster WHERE { + ?job a bbqs:Job ; bbqs:name ?title ; bbqs:posted_by ?person . + ?person bbqs:name ?poster . + } + + # ── Data quality and diagnostics ──────────────────────────────────────────── + - id: CQ38 + area: diagnostics + question: Which projects have no outputs recorded? + access: anon + reads: absence + sparql: | + SELECT ?grant WHERE { + ?project a bbqs:Project ; bbqs:grant_number ?grant . + FILTER NOT EXISTS { ?project bbqs:produced ?o } + } ORDER BY ?grant + + - id: CQ39 + area: announcements + question: Which funding opportunities expire between 2026-10-14 and 2027-04-14? + access: anon + sparql: | + SELECT ?title ?expires WHERE { + VALUES (?today ?horizon) { ("2026-10-14"^^xsd:date "2027-04-14"^^xsd:date) } + ?fo a bbqs:FundingOpportunity ; bbqs:name ?title ; bbqs:expiration_date ?expires . + FILTER (?expires >= ?today && ?expires <= ?horizon) + } ORDER BY ?expires + + - id: CQ40 + area: provenance + question: How many values come from a source graded below 3, by source and table? + access: full + sparql: | + SELECT ?source ?grade ?type (COUNT(?prov) AS ?records) WHERE { + ?prov a bbqs:ProvenanceRecord ; bbqs:prov_source_class ?source . + ?source bbqs:grade ?grade . + OPTIONAL { ?prov bbqs:prov_entity_table ?type } + FILTER (?grade < 3) + } GROUP BY ?source ?grade ?type ORDER BY ?grade + + - id: CQ41 + area: products + question: Which datasets did each grant fund, and who are its PIs? + access: anon + sparql: | + SELECT ?grant ?ds_name ?pi WHERE { + ?project a bbqs:Project ; bbqs:grant_number ?grant ; bbqs:funded_datasets ?ds . + OPTIONAL { ?ds bbqs:name ?ds_name } + OPTIONAL { + ?pr bbqs:on_project ?project ; bbqs:project_role ?role ; bbqs:held_by ?person . + ?person bbqs:name ?pi . FILTER (CONTAINS(LCASE(STR(?role)), "pi")) + } + } ORDER BY ?grant + + - id: CQ42 + area: diagnostics + question: Which working groups have no member with a role on any project? + access: anon + reads: absence + sparql: | + SELECT ?wg_name WHERE { + ?wg a bbqs:WorkingGroup ; bbqs:name ?wg_name . + FILTER NOT EXISTS { + ?person bbqs:member_of_group ?wg . + ?pr bbqs:held_by ?person ; bbqs:on_project ?p . + } + } diff --git a/kg/devices.py b/kg/devices.py new file mode 100644 index 00000000..8f1f8ef2 --- /dev/null +++ b/kg/devices.py @@ -0,0 +1,145 @@ +#!/usr/bin/env python3 +"""The consortium device list -> the records the Graph Inspector's Devices tab shows. + +The input is the folder of the device list (BBQS Device List -- Who Said What, with References): +devices.csv (one row per device per award), device_evidence.csv (what backs each row), +device_discussion_crosscutting.csv (consortium-wide statements about devices), awards.csv and +bbqs_devices_kg.json (whose schema defines the verification tiers). The output is one JSON +document of awards, devices, evidence and statements, each with its tier. + +The tiers say how far each line can be trusted, and the page keeps them apart: + T1 written on the team's own Data Blitz slide (author not recorded) + T2 from the workshop summary, written from the transcripts: the speaker is named there, but + nobody has checked it against the transcript text + T3 a line from working-group meeting notes (the note-taker's wording) + U unverified: a manufacturer, headquarters or model that only the AI-assembled device list + gives. It is kept as `ai_predicted`, never as the device's model; confirm it with the lab. + +The list names people and what they said, so it is internal like the meeting notes: keep the input +and the output out of this repository; kg/quality.py embeds the output only in a fragment built +for the artifact viewer (`--internal`). + + python kg/devices.py /path/to/device_list_folder --out /somewhere/outside/devices.json +""" +from __future__ import annotations + +import argparse +import csv +import hashlib +import json +import os +import re +import sys +from pathlib import Path + +KIND = "bbqs-devices" # the marker tests/guards/inspector-internal-data looks for, written only here +FILES = ("devices.csv", "device_evidence.csv", "device_discussion_crosscutting.csv", "awards.csv", + "bbqs_devices_kg.json") +TIER_ORDER = ("T1", "T2", "T3", "U") +CAVEAT = ("The devices and what they measure are as each team wrote them on its Data Blitz slide. Who spoke " + "to a device is named in the workshop summary, which was written from the transcripts and has not " + "been checked against them. A model or manufacturer marked AI-predicted comes only from the " + "AI-assembled device list, with nothing on a slide or in the summary behind it: confirm it with the " + "lab before using it.") + + +def _rows(folder: Path, name: str) -> list[dict]: + with open(folder / name, encoding="utf-8", newline="") as handle: + return [{k.strip(): (v or "").strip() for k, v in row.items() if k} for row in csv.DictReader(handle)] + + +def _split(text: str) -> list[str]: + return [part.strip() for part in re.split(r"\s*[,;]\s*", text or "") if part.strip()] + + +def _tiers(text: str) -> list[str]: + found = set(re.findall(r"T\d|U", text or "")) + return [t for t in TIER_ORDER if t in found] + + +def build(folder: Path) -> dict: + spec = json.loads((folder / "bbqs_devices_kg.json").read_text(encoding="utf-8")).get("schema", {}) + tiers = spec.get("verification_tiers") or {} + evidence = [{"id": r["evidence_id"], "device": r.get("device_id", ""), "award": r.get("award", ""), + "tier": r.get("tier", ""), "type": r.get("evidence_type", ""), "text": r.get("text", ""), + "speaker": r.get("speaker", ""), "session": r.get("session", ""), "date": r.get("date", ""), + "source": r.get("source", ""), "url": r.get("url", ""), "note": r.get("note", "")} + for r in _rows(folder, "device_evidence.csv") if r.get("evidence_id")] + by_device: dict[str, list[str]] = {} + for e in evidence: + by_device.setdefault(e["device"], []).append(e["id"]) + devices = [] + for r in _rows(folder, "devices.csv"): + if not r.get("device_id"): + continue + manufacturer, model = r.get("manufacturer_candidate_unverified", ""), r.get("model_candidate_unverified", "") + row_tiers = _tiers(r.get("evidence_tiers", "")) + # A guess counts only where the list itself records it as one (a U record). Without one the + # column holds a placeholder ("Not specified in record"), which the list shows as no guess. + guessed = "U" in row_tiers and (manufacturer or model) + devices.append({ + "id": r["device_id"], "award": r.get("award", ""), "name": r.get("device_as_named", ""), + "kind": r.get("kind", ""), "category": r.get("category", ""), "measures": _split(r.get("measures", "")), + "tools": _split(r.get("tools", "")), "sharing": _split(r.get("sharing", "")), + "presenter": r.get("presenter_per_summary", ""), "brand_stated": r.get("manufacturer_stated", ""), + "ai_predicted": {"manufacturer": manufacturer, "model": model} if guessed else None, + "on_team_slide": r.get("on_team_slide", "").lower().startswith("yes"), + "tiers": row_tiers, "evidence": by_device.get(r["device_id"], []), + }) + awards = [{"award": r["award"], "institution": r.get("institution", ""), "pis": r.get("pis", ""), + "species": r.get("species", ""), "title": r.get("title", ""), "team": r.get("team", ""), + "status": r.get("status_at_blitz", "")} for r in _rows(folder, "awards.csv") if r.get("award")] + discussion = [{"id": r["evidence_id"], "topic": r.get("topic", ""), "tier": r.get("tier", ""), + "speaker": r.get("speaker", ""), "text": r.get("text", ""), "session": r.get("session", ""), + "date": r.get("date", ""), "source": r.get("source", ""), "url": r.get("url", "")} + for r in _rows(folder, "device_discussion_crosscutting.csv") if r.get("evidence_id")] + known = {d["id"] for d in devices} + orphans = sorted({e["device"] for e in evidence if e["device"] and e["device"] not in known}) + return { + "kind": KIND, "version": 1, "caveat": CAVEAT, + "tiers": {t: tiers.get(t, "") for t in TIER_ORDER if t in tiers or any(t in d["tiers"] for d in devices)}, + "rule": spec.get("rule", ""), + "awards": awards, "devices": devices, "evidence": evidence, "discussion": discussion, + "orphan_evidence": orphans, + } + + +def refuse_on_ci(parser) -> None: + """These records are internal: they are built by hand, never on a CI runner.""" + if os.environ.get("GITHUB_ACTIONS") == "true" or os.environ.get("CI"): + parser.error("this runs on CI (GITHUB_ACTIONS or CI is set); internal records are built by hand only") + + +def main(argv=None) -> int: + parser = argparse.ArgumentParser(description=__doc__.split("\n\n")[0], + formatter_class=argparse.RawDescriptionHelpFormatter) + parser.add_argument("folder", type=Path, help="the device list's folder (devices.csv and the rest)") + parser.add_argument("--out", type=Path, required=True, help="where to write the records (outside the repo)") + parser.add_argument("--describe", default="", help="where the list came from, shown on the page") + args = parser.parse_args(argv) + refuse_on_ci(parser) + missing = [name for name in FILES if not (args.folder / name).is_file()] + if missing: + parser.error(f"{args.folder} is missing {', '.join(missing)}") + repo = Path(__file__).resolve().parent.parent + for path in (args.folder, args.out): + try: + path.resolve().relative_to(repo) + except ValueError: + continue + parser.error(f"{path} is inside the repository; the device list names people, keep it elsewhere") + doc = build(args.folder) + doc["source"] = {"description": args.describe, + "files": {name: hashlib.sha256((args.folder / name).read_bytes()).hexdigest() for name in FILES}} + args.out.parent.mkdir(parents=True, exist_ok=True) + args.out.write_text(json.dumps(doc, ensure_ascii=False, indent=1), encoding="utf-8") + ai = sum(1 for d in doc["devices"] if d["ai_predicted"]) + print(f"{len(doc['awards'])} awards, {len(doc['devices'])} devices ({ai} with an AI-predicted model or maker), " + f"{len(doc['evidence'])} evidence records, {len(doc['discussion'])} statements; wrote {args.out}") + if doc["orphan_evidence"]: + print(f"evidence for devices not in devices.csv: {', '.join(doc['orphan_evidence'])}", file=sys.stderr) + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/kg/examples/project-to-triples.md b/kg/examples/project-to-triples.md index 107f4930..29ec7c8c 100644 --- a/kg/examples/project-to-triples.md +++ b/kg/examples/project-to-triples.md @@ -33,7 +33,7 @@ bid:2db5ee93-296a-446a-a3e6-59fd3d28c4a6 a bbqs:Project ; # ← TYPE bbqs:external_url "https://reporter.nih.gov/project-details/5R34DA059723-02" ; bbqs:reporter_project_num "5R34DA059723-02" ; bbqs:studies_human false ; - bbqs:studies_species_name "Freely moving animals" ; # ← raw claim, unresolved + bbqs:studies_species_unresolved "Freely moving animals" ; # ← a claim no Species matches bbqs:keywords "Food-handling", "Foraging", "Kinematics", "Oromanual", "Sensorimotor" ; bbqs:abstract "PROJECT SUMMARY Oromanual food-handling …" . ``` @@ -42,9 +42,10 @@ Every line is one triple: (this project) — (predicate) — (value). The first identity (the subject IRI) + type (`bbqs:Project`). The rest are edges to literal values (text, numbers, booleans). -Notice `studies_species_name "Freely moving animals"` has **no** matching `bbqs:studies_species →` -(a Species node) — one of our 9 dangling #7 cases living in the graph, exactly as designed so SHACL -can flag it. +Notice `studies_species_unresolved "Freely moving animals"`: no Species node matches the claim, so the +exporter keeps it as text, and SHACL flags it (#7). A claim that does match is written only as the +`bbqs:studies_species →` link, never as the name as well: the name belongs to the Species node (link, +don't copy). ## Step 3 — edges to other nodes (relationships), and reification diff --git a/kg/export/bbqs.ttl b/kg/export/bbqs.ttl index a3920eaf..e0cfb8c5 100644 --- a/kg/export/bbqs.ttl +++ b/kg/export/bbqs.ttl @@ -5,32 +5,22 @@ bid:00343fc4-d3b9-4b22-8445-dcef0a11a5e4 a bbqs:Announcement ; bbqs:description "DrivenData has launched the \"On Top of Pasketti\" Children's Speech Recognition Challenge, focused on building open, high-quality ASR models for children's speech. Participants work with ~560K transcribed utterances (519 hours of child speech). Two tracks: Word-level ASR and Phonetic ASR. Open through April 6, 2026." ; bbqs:external_url "https://kidsasr.drivendata.org/"^^xsd:anyURI ; - bbqs:name "Children's Speech Recognition Challenge — $120K Prize Pool" . - -bid:00a0773c-3d61-4450-8256-ab7456c87953 a bbqs:Dataset ; - bbqs:description "This is a synthetic dataset for cell morphology containing mock data for fractal dimension, volume, and surface area." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000468"^^xsd:anyURI ; - bbqs:name "Single Click Science" . - -bid:00b12533-f062-4b07-956e-62cdd5145e49 a bbqs:Dataset ; - bbqs:description "Created by IDP to hold this researcher’s uploaded data." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000612"^^xsd:anyURI ; - bbqs:name "Four-choice reversal digging task (IDP)" . - -bid:00b6e913-54e0-4cb5-bfdb-7c4123de51d6 a bbqs:ResearchOrganization ; - bbqs:name "Society for Neuroscience" . - -bid:013d5512-b094-4603-8eb5-5a4ed578501d a bbqs:Dataset ; - bbqs:description "Created by IDP to hold this researcher’s uploaded data." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000613"^^xsd:anyURI ; - bbqs:name "Four-choice reversal digging task (IDP)" . + bbqs:name "Children's Speech Recognition Challenge — $120K Prize Pool" ; + bbqs:part_of_org bid:766331fd-daea-4a31-86c4-589737e533ea . bid:0285843e-0628-489a-a676-27648d2350a7 a bbqs:Device ; + bbqs:aliases "Avisoft", + "Ultrasonic microphones (Avisoft)", + "avisoft", + "avisoft ultrasonic microphones", + "ultrasonic microphones avisoft" ; bbqs:device_category bid:361a786e-7850-418a-a76a-ea21fc656775 ; bbqs:external_url "https://www.avisoft.com/"^^xsd:anyURI ; bbqs:manufacturer bid:2911be71-0f8a-47d5-9b0b-df9c7e75ce2f ; bbqs:model_name "Avisoft ultrasonic microphones" ; - bbqs:name "Avisoft ultrasonic microphones" . + bbqs:name "Avisoft ultrasonic microphones" ; + bbqs:output_signals "Ultrasonic audio" ; + bbqs:product_url "https://www.avisoft.com/"^^xsd:anyURI . bid:02f970e3-bc54-4d97-b033-fe732d43fbb3 a bbqs:Investigator ; bbqs:consortium_role "con sultant" ; @@ -38,9 +28,6 @@ bid:02f970e3-bc54-4d97-b033-fe732d43fbb3 a bbqs:Investigator ; bbqs:name "Katalin Gothard" ; bbqs:orcid . -bid:0401c6a9-2be9-47e3-981a-72481bd46a08 a bbqs:Investigator ; - bbqs:name "Cristina Savin" . - bid:07448ab8-2717-4b6e-83e0-9abf492240e5 a bbqs:FundingOpportunity ; bbqs:activity_code "R34" ; bbqs:description "This NOFO is intended for investigators at resource-limited institutions to adopt and integrate BRAIN Initiative resources into their research. Supports two-way knowledge transfer between PI and BRAIN disseminator." ; @@ -51,13 +38,11 @@ bid:07448ab8-2717-4b6e-83e0-9abf492240e5 a bbqs:FundingOpportunity ; bbqs:name "BRAIN Initiative: Promoting Health for All Through BRAIN Technology Partnerships" ; bbqs:open_date "2025-05-17"^^xsd:date ; bbqs:opportunity_type "New" ; + bbqs:part_of_org bid:69aa906c-2a0c-4524-8958-4e1009f96060 ; bbqs:posted_date "2024-11-22"^^xsd:date ; bbqs:status "closed" ; bbqs:url "https://grants.nih.gov/grants/guide/rfa-files/RFA-NS-25-016.html"^^xsd:anyURI . -bid:081d2ddb-e2c8-4909-84c4-740582fd757c a bbqs:Investigator ; - bbqs:name "Sima Mofakham" . - bid:0823bcd5-786e-4d68-91b0-95bdec0b5d37 a bbqs:Investigator ; bbqs:consortium_role "Co-Investigator, Data Manager/Submitter" ; bbqs:member_of_group bid:47cf050c-ab07-42fa-b251-d1fecc7ceb40, @@ -68,11 +53,13 @@ bid:0823bcd5-786e-4d68-91b0-95bdec0b5d37 a bbqs:Investigator ; bid:09e37e7e-a6a7-409a-b532-9f000647f007 a bbqs:FundingOpportunity ; bbqs:activity_code "UG3/UH3" ; bbqs:description "Supports academic-industrial partnerships developing Software as a Medical Device (SaMD) multimodal AI clinical decision support tools combining medical imaging with other health data. 8 awards anticipated; foreign organizations eligible." ; + bbqs:expiration_date "2026-10-20"^^xsd:date ; bbqs:external_url "https://simpler.grants.gov/opportunity/d07ebcd7-96cf-40cb-8ae3-f401b6274080"^^xsd:anyURI ; bbqs:fon "RFA-RM-27-012" ; bbqs:name "PRIMED-AI: Data-to-Model Academic-Industrial Partnerships (D2M-AIP) for Precision Medicine with AI: Integrating Imaging with Multimodal Data (UG3/UH3 Clinical Trial Optional)" ; + bbqs:part_of_org bid:2548a017-fd14-4934-9762-b30d7071821a ; bbqs:posted_date "2026-06-30"^^xsd:date ; - bbqs:status "open" ; + bbqs:status "closed" ; bbqs:url "https://simpler.grants.gov/opportunity/d07ebcd7-96cf-40cb-8ae3-f401b6274080"^^xsd:anyURI . bid:0a91143c-35e4-4cf1-a1d5-301b6a8651ae a bbqs:MLModel ; @@ -98,11 +85,6 @@ bid:0c4561e1-221b-4444-ac15-6c2220beb292 a bbqs:Dataset ; bbqs:external_url "https://dandi.emberarchive.org/dandiset/000470"^^xsd:anyURI ; bbqs:name "Pozu: Labels" . -bid:0c87346c-ae43-4e45-8708-682c41353bcc a bbqs:Dataset ; - bbqs:description "test" ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000001"^^xsd:anyURI ; - bbqs:name "test" . - bid:0cdfab9b-92fe-45c6-afbe-9f22d7eda7dd a bbqs:Announcement ; bbqs:external_url "https://go.nih.gov/6sLn5QY"^^xsd:anyURI ; bbqs:name "NIH Common Fund PRIMED-AI — five funding opportunities open" ; @@ -113,10 +95,6 @@ bid:0ded1b71-e572-475b-8457-bf370ed6335f a bbqs:Investigator ; bbqs:member_of_group bid:47cf050c-ab07-42fa-b251-d1fecc7ceb40 ; bbqs:name "Matt Levine" . -bid:0f65886e-44cb-4a8b-88a2-ecb214b0ea99 a bbqs:Investigator ; - bbqs:consortium_role "Research Staff (Scientist and others)" ; - bbqs:name "Yangjia Li" . - bid:0f875168-9793-465b-9ab1-bf8f18492778 a bbqs:Announcement ; bbqs:external_url "https://arxiv.org/abs/2601.19955"^^xsd:anyURI ; bbqs:name "NSF NeuroAI and Beyond Workshop Report (Preprint)" ; @@ -128,24 +106,25 @@ bid:0f8bad99-d648-46e7-97cc-a669746511ee a bbqs:Investigator ; bbqs:name "Michael Genecin" ; bbqs:orcid . -bid:10ceb449-38ab-4e52-9422-39722583f074 a bbqs:Species ; - bbqs:common_name "Acoel Flatworm" ; - bbqs:name "Acoel Flatworm" ; - bbqs:taxonomy_class "Acoela" . - bid:12234308-3c6b-4d75-a135-f8fb127d4389 a bbqs:Job ; bbqs:name "Postdoctoral position in statistical methods for behavioral analysis" ; - bbqs:part_of_org bid:5b794afd-cf08-4107-81c8-522a29714830 . + bbqs:part_of_org bid:5b794afd-cf08-4107-81c8-522a29714830 ; + bbqs:posted_by bid:831a48e1-025d-499a-bf11-83d05285ed4b . bid:130afdbe-9128-4afb-a7cd-f27967d52a7a a bbqs:Device ; + bbqs:aliases "GPS (Garmin)", + "Garmin", + "garmin", + "garmin gps", + "gps garmin" ; bbqs:device_category bid:31b21990-8007-45a0-86e0-d1e9e412d9a7 ; bbqs:external_url "https://www.garmin.com/"^^xsd:anyURI ; bbqs:manufacturer bid:1a3ec6ab-3abd-4da5-b938-e9818c52b95a ; bbqs:model_name "Garmin GPS" ; - bbqs:name "Garmin GPS" . - -bid:164c219c-6bc5-4975-8815-2c2e0dd2f8a1 a bbqs:Investigator ; - bbqs:name "Bijan Pesaran" . + bbqs:name "Garmin GPS" ; + bbqs:output_signals "Latitude/longitude", + "Speed" ; + bbqs:product_url "https://www.garmin.com/"^^xsd:anyURI . bid:16b2b3ec-077a-4101-9a4a-0f85f06b984e a bbqs:SoftwareTool ; bbqs:description "Weakly supervised training and calibration framework that attributes each vocalization to an individual animal, using multi-channel audio aligned with keypoint tracks of freely interacting groups" ; @@ -153,11 +132,16 @@ bid:16b2b3ec-077a-4101-9a4a-0f85f06b984e a bbqs:SoftwareTool ; bbqs:name "Vocalocator-SSL" . bid:16f63350-9197-4e16-8a8c-0f67b2da18df a bbqs:Device ; + bbqs:aliases "Wildlife Acoustics", + "wildlife acoustics", + "wildlife acoustics recorders" ; bbqs:device_category bid:e80e0495-82ff-4d51-995f-36e9349b40fb ; bbqs:external_url "https://www.wildlifeacoustics.com/"^^xsd:anyURI ; bbqs:manufacturer bid:ddff023c-f84e-41b2-aa9e-1e8ee0d743fd ; bbqs:model_name "Wildlife Acoustics recorders" ; - bbqs:name "Wildlife Acoustics recorders" . + bbqs:name "Wildlife Acoustics recorders" ; + bbqs:output_signals "Audio" ; + bbqs:product_url "https://www.wildlifeacoustics.com/"^^xsd:anyURI . bid:178d1833-2f0c-4a20-9f06-c3106f12b21c a bbqs:Investigator ; bbqs:consortium_role "Postdoc/Grad Student" ; @@ -184,16 +168,16 @@ bid:18d4c4a6-7d69-4425-8792-de1e60d0b35f a bbqs:DeviceCategory ; bbqs:measures "ECG waveform", "HRV", "heart rate" ; - bbqs:name "ECG / Heart Rate" . + bbqs:name "ECG / Heart Rate" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Autonomic arousal", + "Stress physiology" . bid:199d9cea-460f-4470-957d-c9f458c237f1 a bbqs:Dataset ; bbqs:description "Mice with implanted Neuropixels electrodes freely locomote in a semicircle apparatus in which 27 choice ports line the rounded rim of the arena. A trial start / reward port in the center of the flat part of the arena provides a liquid sugar water reward probabilistically based on the animals choice." ; bbqs:external_url "https://dandi.emberarchive.org/dandiset/000532"^^xsd:anyURI ; bbqs:name "Mouse Open-Field Semicircle Foraging Task" . -bid:1a88610e-c3bc-41b8-a97e-36698d0b0c28 a bbqs:ResearchOrganization ; - bbqs:name "Simons Foundation" . - bid:1b49aee4-301e-46c9-b22d-209481f68437 a bbqs:Investigator ; bbqs:consortium_role "Co-Investigator" ; bbqs:member_of_group bid:4be84d82-5396-4c3d-907f-8c6e10787cd3 ; @@ -202,7 +186,8 @@ bid:1b49aee4-301e-46c9-b22d-209481f68437 a bbqs:Investigator ; bid:1b79d65a-57fd-455c-96e7-acc3b3eb6c01 a bbqs:Announcement ; bbqs:external_url "https://www.nytimes.com/2026/07/28/science/costa-rica-monkeys-ai.html?unlocked_article_code=1.1VA.toSv.7Q3TKDdHKC0H&smid=url-share"^^xsd:anyURI ; - bbqs:name "In the news: AI is helping scientists eavesdrop on Costa Rica's monkeys" . + bbqs:name "In the news: AI is helping scientists eavesdrop on Costa Rica's monkeys" ; + bbqs:part_of_org bid:766331fd-daea-4a31-86c4-589737e533ea . bid:1c181fed-73e8-46be-8d27-198f64e936ea a bbqs:ResearchOrganization ; bbqs:members bid:22edcc49-fd41-4423-92b6-89e7abba292d, @@ -220,10 +205,6 @@ bid:1cf7c61c-a403-4eb5-8a84-07a1e2da8fb4 a bbqs:Announcement ; bbqs:name "BRAIN NeuroAI Workshop Summary and Program Book Available" ; bbqs:part_of_org bid:208980e9-92b9-447e-a2ca-e83bf61db159 . -bid:1cfe15ec-b6a7-4534-b69d-79bb63b341b6 a bbqs:Investigator ; - bbqs:consortium_role "Postdoc/Grad Student" ; - bbqs:name "Weikang Shi" . - bid:1e988b46-bfe4-4e41-843e-b6b0ae88efcb a bbqs:Dataset ; bbqs:description "A collection of behavioral videos, transcoded into a common space for pose labeling and foundation model training." ; bbqs:external_url "https://dandi.emberarchive.org/dandiset/000471"^^xsd:anyURI ; @@ -234,53 +215,36 @@ bid:1ec93ddb-bb26-4062-9a18-1214bc458102 a bbqs:ResearchOrganization ; bid:b359432d-39e2-4ab8-bb3b-16afe458820c ; bbqs:name "PENNSYLVANIA STATE UNIVERSITY" . -bid:1ee83670-fadd-4744-91bd-17ca61944822 a bbqs:Investigator ; - bbqs:consortium_role "Co-Investigator" ; - bbqs:name "Andrew MacAskill" ; - bbqs:orcid . - -bid:1fb20b4f-fd8c-4e40-a4f4-daaa12bd738a a bbqs:Investigator ; - bbqs:name "TestUser Tier2" . - bid:20adc9fb-c389-48a7-85ec-931501f0ce13 a bbqs:FundingOpportunity ; bbqs:activity_code "Research Grant" ; bbqs:description "Supports cutting-edge mathematics and basic science research that uses Empire AI's multinode GPU clusters and foundational machine learning models, in computational astrophysics, physics, biology, mathematics, neuroscience, or computational physical chemistry. Up to $6M total over two years (2027-06-01 to 2029-05-31), 6-12 awards. PI must be tenure-track/tenured at an Empire AI member institution (Columbia, Cornell, CUNY, SUNY, RPI, NYU, Rochester, RIT, Icahn/Mount Sinai); additional PIs may join by subcontract from outside institutions." ; + bbqs:expiration_date "2026-12-01"^^xsd:date ; bbqs:external_url "https://www.simonsfoundation.org/grant/utilizing-the-full-power-of-empire-ai-request-for-applications/"^^xsd:anyURI ; bbqs:fon "SIMONS-EMPIRE-AI-2026" ; bbqs:name "Utilizing the Full Power of Empire AI — Request for Applications (Simons Foundation)" ; bbqs:open_date "2026-09-01"^^xsd:date ; + bbqs:part_of_org bid:1a88610e-c3bc-41b8-a97e-36698d0b0c28 ; bbqs:posted_date "2026-09-01"^^xsd:date ; bbqs:status "open" ; bbqs:url "https://www.simonsfoundation.org/grant/utilizing-the-full-power-of-empire-ai-request-for-applications/"^^xsd:anyURI . -bid:241a21ae-2f3c-4fce-b11d-d42980ed7209 a bbqs:Dataset ; - bbqs:description "Dedicated collection of reports of video frames missing any subject of any kind within the field of view." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000472"^^xsd:anyURI ; - bbqs:name "Pozu: Missing subjects" . - -bid:24703152-c43b-4f4f-8d73-65f3ef490ff0 a bbqs:Investigator ; - bbqs:name "Ming Zhan" . +bid:24c105cd-2a0b-4a0e-8e6a-67e7a28f7315 a bbqs:ResearchOrganization ; + bbqs:members bid:1ee83670-fadd-4744-91bd-17ca61944822 ; + bbqs:name "University College London" . bid:2538b9fd-01c4-453f-a20b-e7351cfa8c21 a bbqs:Device ; + bbqs:aliases "PPVT", + "ppvt" ; bbqs:device_category bid:829b9463-611f-45d6-bd24-262a5410c325 ; bbqs:manufacturer bid:c42dadeb-bf3c-44fa-baff-92adea2e0185 ; bbqs:model_name "PPVT" ; bbqs:name "PPVT" . -bid:2548a017-fd14-4934-9762-b30d7071821a a bbqs:ResearchOrganization ; - bbqs:name "NIH Office of the Director (Common Fund)" . - -bid:25a4f79c-6020-4074-b501-0114a205175f a bbqs:Investigator ; - bbqs:name "Thomas Heeps" . - bid:2759fdf8-4690-4aea-b5d6-3a44bd3270e4 a bbqs:SoftwareTool ; bbqs:description "Bayesian modeling and inference of dynamical systems from real-world data" ; bbqs:external_url "https://basisresearch.github.io/dynestyx"^^xsd:anyURI ; bbqs:name "Dynestyx" . -bid:28609b98-6f97-4a46-b875-9f5084f1c7cd a bbqs:ResearchOrganization ; - bbqs:name "National Institute of Mental Health" . - bid:292698fe-d705-45ac-a255-3c699228f21a a bbqs:ResearchOrganization ; bbqs:name "Eunice Kennedy Shriver National Institute of Child Health and Human Development" . @@ -289,6 +253,7 @@ bid:29d3cb38-1cbb-43b7-baa6-f413d0a0bdad a bbqs:ResearchOrganization ; bid:4626de5c-667e-4f70-be3e-44dffde3887b, bid:5b057d86-6fdd-4b5e-b2ab-111360c5b537, bid:623a564c-f5bf-4d95-a233-027850148145, + bid:639e73b5-6a6d-46f1-82a8-b466d7e3bdbb, bid:8e52b630-7ecc-4336-9f31-d0b6a1c85100, bid:961fb77d-16c1-4efd-9fc7-ac7bd552c983, bid:98076d7b-270f-4a2a-af91-53d1b7644c90, @@ -301,43 +266,27 @@ bid:29d3cb38-1cbb-43b7-baa6-f413d0a0bdad a bbqs:ResearchOrganization ; bid:fedfc5af-eb8e-4ee5-88e7-a18ab2f00b26 ; bbqs:name "UNIVERSITY OF PENNSYLVANIA" . -bid:29d65027-e638-43f7-b860-9bde457d4830 a bbqs:Dataset ; - bbqs:description "Created by IDP to hold this researcher’s uploaded data." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000617"^^xsd:anyURI ; - bbqs:name "Four-choice reversal digging task (IDP)" . - bid:2a03a500-1fba-4367-85bb-25ce04eaba0e a bbqs:Investigator ; bbqs:name "Latane Bullock" . -bid:2b9b6595-65f5-4f03-b4d4-d6725b6bb1c0 a bbqs:Dataset ; - bbqs:description "For automatic testing of NeuroConv + NWB GUIDE upload. May be removed in the future as staging becomes more persistent." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000431"^^xsd:anyURI ; - bbqs:name "TestNeuroConvUpload" . - bid:2e4c95a3-a0bb-4a43-a647-7077547dedf0 a bbqs:Dataset ; bbqs:description "This dataset holds pose tracking, human-scored behavior bouts and video for 587 videos of freely interacting mice, recorded in 15 labs. It contains 71,870 annotated bouts of 33 scored behavior types. These are the lab-contributed datasets of the MABe-2025 behavior-classification competition, at the cleaned revision (2026-07-18) used to train the HiDRA classifier. The competition's other sources (MABe22, CalMS21 and CRIM13) are published separately and aren't included here. Each video has an MP4, a SLEAP .slp file with its pose tracks and behavior bouts, and the same pose and bouts in the competition's Parquet format (.tracking.pkt, .annotation.pkt). See README.md for details." ; bbqs:external_url "https://dandi.emberarchive.org/dandiset/000564"^^xsd:anyURI ; bbqs:name "Days of our Mice (DooM): a cross-laboratory dataset of mouse social behavior" . -bid:2f334517-3173-4654-987e-dc44e0e94eb2 a bbqs:Investigator ; - bbqs:consortium_role "NIH Program" ; - bbqs:name "Eunyoung Kim" . - bid:2febecec-70dd-4db0-8bed-2060a1d13b5e a bbqs:Investigator ; bbqs:consortium_role "Co-Investigator" ; bbqs:member_of_group bid:4be84d82-5396-4c3d-907f-8c6e10787cd3 ; bbqs:name "Brent Kious" . -bid:307a2853-901d-4ce8-9894-a999868db705 a bbqs:Investigator ; - bbqs:name "Yvonne Bennett" . - bid:30ae82dc-0473-443d-96ae-8bbf8b0206cb a bbqs:Announcement ; bbqs:external_url "mailto:listserv@list.nih.gov"^^xsd:anyURI ; bbqs:name "BRAIN NeuroAI Community Updates Listserv Launched" ; bbqs:part_of_org bid:208980e9-92b9-447e-a2ca-e83bf61db159 . bid:315a0694-ce8d-4010-abca-5438e5f6b560 a bbqs:ResearchOrganization ; - bbqs:members bid:d2f77d44-3a20-4759-be29-69403ae039ef ; + bbqs:members bid:d2f77d44-3a20-4759-be29-69403ae039ef, + bid:eff6d625-81ad-4a38-9f8e-93a2ae06c7af ; bbqs:name "JOHNS HOPKINS UNIVERSITY" . bid:32f14ee1-e0b4-4753-869a-f630f1786682 a bbqs:ResearchOrganization ; @@ -348,17 +297,6 @@ bid:32f14ee1-e0b4-4753-869a-f630f1786682 a bbqs:ResearchOrganization ; bid:e6996650-b858-4ddb-b422-4fd92fdfaac4 ; bbqs:name "UNIVERSITY OF CALIFORNIA LOS ANGELES" . -bid:32f761ce-6857-451c-9eb7-fc5b8b221449 a bbqs:ResearchOrganization ; - bbqs:name "National Institute on Drug Abuse" . - -bid:335d4d23-a7b3-496d-a721-db2f6a68ce07 a bbqs:Investigator ; - bbqs:name "Tim Roberts" . - -bid:33aad87e-eca4-4de4-b67c-425bd39ec168 a bbqs:Dataset ; - bbqs:description "Created by IDP to hold this researcher’s uploaded data." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000628"^^xsd:anyURI ; - bbqs:name "Four-choice reversal digging task (IDP)" . - bid:340ce805-e6f8-454a-bb4b-83ef53e0d444 a bbqs:SoftwareTool ; bbqs:description "Multi-animal pose tracking without markers" ; bbqs:external_url "https://sleap.ai/"^^xsd:anyURI ; @@ -367,25 +305,30 @@ bid:340ce805-e6f8-454a-bb4b-83ef53e0d444 a bbqs:SoftwareTool ; bbqs:repo_url "https://sleap.ai/"^^xsd:anyURI . bid:342800f7-b7b5-4b7e-9f41-d528b68d3c3d a bbqs:Device ; + bbqs:aliases "GSR (Shimmer3 / iMotions)", + "Shimmer3", + "gsr shimmer3 imotions", + "shimmer3", + "shimmer3 gsr" ; bbqs:device_category bid:ac703a69-84bb-4157-b5c9-6d3f4e4d2c49 ; bbqs:external_url "https://shimmersensing.com/"^^xsd:anyURI ; bbqs:manufacturer bid:615d81a2-ce1b-4d1e-8f17-30d97dddb2a0 ; bbqs:model_name "Shimmer3 GSR+" ; - bbqs:name "Shimmer3 GSR+" . + bbqs:name "Shimmer3 GSR+" ; + bbqs:output_signals "Accelerometry", + "GSR", + "PPG" ; + bbqs:product_url "https://shimmersensing.com/"^^xsd:anyURI . bid:34318c67-9a08-4465-8859-5ded31edb62e a bbqs:Species ; bbqs:common_name "Cricket" ; bbqs:name "Cricket" ; bbqs:taxonomy_class "Insecta" . -bid:344938eb-1ef4-4b39-b6e2-a8297f510dbd a bbqs:Dataset ; - bbqs:description "Created by IDP to hold this researcher’s uploaded data." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000620"^^xsd:anyURI ; - bbqs:name "Four-choice reversal digging task (IDP)" . - bid:3533afc4-be44-460c-bada-ab578b028acb a bbqs:Announcement ; bbqs:description "BBQS will be presenting at the Society for Neuroscience Annual Meeting in San Diego. Join us at Booth #3830 and #3831 or attend our symposium." ; - bbqs:name "SFN Annual Meeting 2025" . + bbqs:name "SFN Annual Meeting 2025" ; + bbqs:part_of_org bid:00b6e913-54e0-4cb5-bfdb-7c4123de51d6 . bid:353d2c1b-0f19-47a0-98be-6a721845c0c2 a bbqs:Investigator ; bbqs:consortium_role "Co-Investigator" ; @@ -407,9 +350,6 @@ bid:35e3244e-6533-49e7-b63a-3619d2cf18dc a bbqs:Job ; bbqs:name "Theoretical Understanding of Distributed Neural Population Dynamics (Theory_PD)" ; bbqs:part_of_org bid:8f22c7e2-06f2-4c84-aa53-071dcce8f875 . -bid:36ba050d-e4f4-470c-a780-eddef3b4bab8 a bbqs:Investigator ; - bbqs:name "Farah Bader" . - bid:36f00adf-1d84-4267-85c0-0af7379df8cc a bbqs:Publication ; bbqs:author_orcids , , @@ -422,11 +362,6 @@ bid:36f00adf-1d84-4267-85c0-0af7379df8cc a bbqs:Publication ; bbqs:title "A Multiparadigm Approach to Characterize Dominance Behaviors in CD1 and C57BL6 Male Mice." ; bbqs:year 2024 . -bid:37453416-6149-4fee-b9b9-a427b800ffe7 a bbqs:Investigator ; - bbqs:consortium_role "Admin" ; - bbqs:name "Meaghan Perdue" ; - bbqs:orcid . - bid:38d4f5ae-7854-42cc-ad36-77a89e6205bf a bbqs:SoftwareTool ; bbqs:description "Real-time heterogeneous data stream synchronization and processing" ; bbqs:external_url "https://bonsai-rx.org/"^^xsd:anyURI ; @@ -434,11 +369,6 @@ bid:38d4f5ae-7854-42cc-ad36-77a89e6205bf a bbqs:SoftwareTool ; bbqs:name "Bonsai" ; bbqs:repo_url "https://bonsai-rx.org/"^^xsd:anyURI . -bid:38f4034a-316a-4439-a0d7-161992a8aa67 a bbqs:Dataset ; - bbqs:description "Test for new DANDIset" ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000003"^^xsd:anyURI ; - bbqs:name "Test DANDIset (Brock test)" . - bid:397816f1-2188-4817-af29-e7aa82ef1afb a bbqs:Investigator ; bbqs:consortium_role "NIH Program" ; bbqs:member_of_group bid:4737d7d7-4bbe-4b72-b397-5f341a0dd5dd, @@ -453,14 +383,25 @@ bid:39e960bb-6537-484d-94e9-62dde0ee3680 a bbqs:DeviceCategory ; bbqs:label "OPM-MEG" ; bbqs:measures "Magnetic field", "source-localized activity" ; - bbqs:name "OPM-MEG" . + bbqs:name "OPM-MEG" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Naturalistic neuroimaging", + "Wearable MEG" . bid:3b549548-0ca5-4c7e-91ba-a6a1ed51705e a bbqs:Device ; + bbqs:aliases "EmotiBit", + "Emotibit", + "emotibit" ; bbqs:device_category bid:851882bb-3321-45ed-af75-6ae08836c1fc ; bbqs:external_url "https://www.emotibit.com/"^^xsd:anyURI ; bbqs:manufacturer bid:31c5064c-5df0-4821-9ea7-d3807308ba18 ; bbqs:model_name "EmotiBit" ; - bbqs:name "EmotiBit" . + bbqs:name "EmotiBit" ; + bbqs:output_signals "9-axis IMU", + "EDA", + "PPG", + "Temperature" ; + bbqs:product_url "https://www.emotibit.com/"^^xsd:anyURI . bid:3ba48c59-bb79-44ef-8569-ca644775d73a a bbqs:SoftwareTool ; bbqs:description "Markerless pose estimation tool for neuroscience, published in Nature Methods (2024). Supports single-view and multi-view, single-animal pose estimation with a GUI for multi-view labeling. Developed by Liam Paninski's lab at Columbia University Zuckerman Institute, Center for Theoretical Neuroscience. 280+ GitHub stars." ; @@ -468,6 +409,7 @@ bid:3ba48c59-bb79-44ef-8569-ca644775d73a a bbqs:SoftwareTool ; bbqs:external_url "https://github.com/paninski-lab/lightning-pose"^^xsd:anyURI ; bbqs:language "Python" ; bbqs:name "Lightning Pose" ; + bbqs:part_of_org bid:9f75488b-59d0-4d50-b7db-869f26066743 ; bbqs:repo_url "https://github.com/paninski-lab/lightning-pose"^^xsd:anyURI ; bbqs:software_license "Open Source" . @@ -478,13 +420,6 @@ bid:3be55dd2-fe02-418e-a97b-aa223e988663 a bbqs:Investigator ; bbqs:name "Stephanie Prince" ; bbqs:orcid . -bid:3cae416f-5424-49c3-b7c4-aedb7c53303f a bbqs:Investigator ; - bbqs:name "Charles B Mikell" . - -bid:3cc135af-1424-4cc9-b54b-978d039ad6d1 a bbqs:Investigator ; - bbqs:consortium_role "NIH Program" ; - bbqs:name "Kari Johnson" . - bid:3fb868da-b941-439e-a81e-927a543defd3 a bbqs:FundingOpportunity ; bbqs:activity_code "R01" ; bbqs:description "Supports proof-of-concept testing and development of new technologies and novel approaches for recording and modulation of neural cells and circuits, addressing major challenges in central nervous system research." ; @@ -493,22 +428,11 @@ bid:3fb868da-b941-439e-a81e-927a543defd3 a bbqs:FundingOpportunity ; bbqs:fon "RFA-NS-25-018" ; bbqs:name "BRAIN Initiative: New Technologies and Novel Approaches for Recording and Modulation in the Nervous System (R01 Clinical Trial Not Allowed)" ; bbqs:open_date "2025-05-02"^^xsd:date ; + bbqs:part_of_org bid:69aa906c-2a0c-4524-8958-4e1009f96060 ; bbqs:posted_date "2024-09-24"^^xsd:date ; bbqs:status "closed" ; bbqs:url "https://grants.nih.gov/grants/guide/rfa-files/RFA-NS-25-018.html"^^xsd:anyURI . -bid:4009a1f6-c173-495b-9725-bb51571a3cdf a bbqs:SoftwareTool ; - bbqs:description "Markerless pose estimation of user-defined body parts across species" ; - bbqs:external_url "https://deeplabcut.github.io/DeepLabCut/"^^xsd:anyURI ; - bbqs:language "Python" ; - bbqs:name "DeepLabCut" ; - bbqs:repo_url "https://deeplabcut.github.io/DeepLabCut/"^^xsd:anyURI . - -bid:404ca8b2-c293-40f2-be94-f3ae24b30af1 a bbqs:Dataset ; - bbqs:description "Created by IDP to hold this researcher’s uploaded data." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000611"^^xsd:anyURI ; - bbqs:name "Four-choice reversal digging task (IDP)" . - bid:40d5a0bc-769a-4450-9355-d561ff9494eb a bbqs:Investigator ; bbqs:consortium_role "Research Staff (Scientist and others)" ; bbqs:member_of_group bid:4737d7d7-4bbe-4b72-b397-5f341a0dd5dd, @@ -535,10 +459,14 @@ bid:41e042c3-81ad-486b-b933-bf77fcefd4f5 a bbqs:Investigator ; bbqs:orcid . bid:4284d761-dde2-4e72-8cb4-d3724f2d4b32 a bbqs:ResearchOrganization ; - bbqs:members bid:fe4790d5-bf32-469d-b098-cb4f44f6fa19 ; + bbqs:members bid:37453416-6149-4fee-b9b9-a427b800ffe7, + bid:fe4790d5-bf32-469d-b098-cb4f44f6fa19 ; bbqs:name "UNIV OF MASSACHUSETTS MED SCH WORCESTER" . bid:429c73a9-8440-4f1f-a2f7-a8a1b75958a7 a bbqs:Device ; + bbqs:aliases "Leiter", + "leiter", + "leiter 3" ; bbqs:device_category bid:829b9463-611f-45d6-bd24-262a5410c325 ; bbqs:manufacturer bid:541eb3ec-855c-427e-9d9d-816b3845b9cf ; bbqs:model_name "Leiter-3" ; @@ -546,7 +474,8 @@ bid:429c73a9-8440-4f1f-a2f7-a8a1b75958a7 a bbqs:Device ; bid:42efe7fa-561b-4a00-af58-78b71f9d4b1a a bbqs:Announcement ; bbqs:description "A new website for BBQS (this) was born. 🎊" ; - bbqs:name "New BBQS Website Launch" . + bbqs:name "New BBQS Website Launch" ; + bbqs:part_of_org bid:766331fd-daea-4a31-86c4-589737e533ea . bid:42fcde10-7fc8-4243-9c6f-845abf7d194c a bbqs:Investigator ; bbqs:consortium_role "Research Staff (Scientist and others)" ; @@ -558,37 +487,22 @@ bid:43d7d5a8-8912-4a93-b571-f3c97f41bd9d a bbqs:Investigator ; bbqs:member_of_group bid:4737d7d7-4bbe-4b72-b397-5f341a0dd5dd ; bbqs:name "Test User" . -bid:4412f5e5-aba7-49fb-876c-618f59f9b226 a bbqs:Investigator ; - bbqs:name "Merav Sabri" . - -bid:44376171-f0d7-4e91-9c91-6558f6253fe3 a bbqs:Dataset ; - bbqs:description "An Aggregate Dandiset for Four-choice reversal digging task in MAABCD" ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000607"^^xsd:anyURI ; - bbqs:name "Four-choice reversal digging task" . - -bid:444f664a-b7ee-4571-ad81-33bd93b03cca a bbqs:SoftwareTool ; - bbqs:description "Markerless pose estimation tool for neuroscience, published in Nature Methods (2024). Supports single-view and multi-view, single-animal pose estimation with a GUI for multi-view labeling. Developed by Liam Paninski's lab at Columbia University Zuckerman Institute." ; - bbqs:external_url "https://lightning-pose.readthedocs.io/"^^xsd:anyURI ; - bbqs:name "Lightning Pose" . - bid:46841d0e-4d55-4690-81f0-41c33f424bc8 a bbqs:Announcement ; bbqs:description "McGill University is accepting nominations for the Canada Impact+ Research Training Awards — a one-time initiative to recruit international or returning Canadian doctoral students ($40K/yr × 3 years, 600 awards) and postdoctoral researchers ($70K/yr × 2 years, 400 awards). Priority areas include AI, health/biotech, clean tech, climate resilience, and more." ; - bbqs:name "Canada Impact+ Research Training Awards (CIRTA)" . - -bid:4722e0eb-8daf-4685-8da4-fd7bb284d377 a bbqs:Investigator ; - bbqs:name "Satrajit Ghosh" . + bbqs:name "Canada Impact+ Research Training Awards (CIRTA)" ; + bbqs:part_of_org bid:766331fd-daea-4a31-86c4-589737e533ea . bid:47974228-8745-4b67-8857-4450426743a7 a bbqs:Device ; + bbqs:aliases "Open Ephys", + "open ephys" ; bbqs:device_category bid:006caa68-8b24-474f-867f-82a6199a84b1 ; bbqs:external_url "https://open-ephys.org/"^^xsd:anyURI ; bbqs:manufacturer bid:2367da64-4eae-4655-a4dc-315ad12e3398 ; bbqs:model_name "Open Ephys" ; - bbqs:name "Open Ephys" . - -bid:4921bfdf-7432-48ac-911d-0cb825184ef1 a bbqs:Benchmark ; - bbqs:description "Vocal Call Locator benchmark: 767,295 rodent sounds with ground-truth sources across 9 datasets, for sound source localization from multi-channel audio" ; - bbqs:external_url "https://vclbenchmark.flatironinstitute.org"^^xsd:anyURI ; - bbqs:name "VCL Benchmark" . + bbqs:name "Open Ephys" ; + bbqs:output_signals "LFP", + "Spikes" ; + bbqs:product_url "https://open-ephys.org/"^^xsd:anyURI . bid:4b90a4f4-0010-4b31-8adb-db169e15a70a a bbqs:Investigator ; bbqs:consortium_role "Software Developer" ; @@ -596,9 +510,6 @@ bid:4b90a4f4-0010-4b31-8adb-db169e15a70a a bbqs:Investigator ; bbqs:name "Sandy Hider" ; bbqs:orcid . -bid:4d4ad015-92f8-485e-9d4c-61dd5c18ac29 a bbqs:Investigator ; - bbqs:name "Dayu Lin" . - bid:4d4eeeec-1126-4407-b7e9-80ad309522b4 a bbqs:DeviceCategory ; bbqs:category_key "survey_task" ; bbqs:description "Questionnaires, diaries, dial ratings, and computerized cognitive tasks." ; @@ -606,26 +517,38 @@ bid:4d4eeeec-1126-4407-b7e9-80ad309522b4 a bbqs:DeviceCategory ; bbqs:measures "Item responses", "ratings", "reaction times" ; - bbqs:name "Surveys & Structured Tasks" . + bbqs:name "Surveys & Structured Tasks" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Cognitive testing", + "Self-report" . bid:4d59ea78-e15f-4f78-92d4-28f4041b297f a bbqs:Device ; + bbqs:aliases "Microphone Array UMA-16", + "UMA-16", + "microphone array uma 16", + "minidsp uma 16", + "uma 16" ; bbqs:device_category bid:e80e0495-82ff-4d51-995f-36e9349b40fb ; bbqs:external_url "https://www.minidsp.com/products/usb-audio-interface/uma-16"^^xsd:anyURI ; bbqs:manufacturer bid:8482b347-2401-49bb-99c6-19a26be255c7 ; bbqs:model_name "miniDSP UMA-16" ; - bbqs:name "miniDSP UMA-16" . + bbqs:name "miniDSP UMA-16" ; + bbqs:output_signals "Multichannel audio" ; + bbqs:product_url "https://www.minidsp.com/products/usb-audio-interface/uma-16"^^xsd:anyURI . + +bid:4d91ac05-5c53-49d7-93b4-64184b795b2d a bbqs:Dataset ; + bbqs:description "Corticostriatal recordings---L2/3 and L5/6 of caudal forelimb area (CFA) of mouse motor cortex as well as dorsomedial (DMS) and ventromedial striatum (VMS)---as mice learn to associate the execution of naturalistic behaviors with a sugar water reward." ; + bbqs:external_url "https://dandi.emberarchive.org/dandiset/000632"^^xsd:anyURI ; + bbqs:name "Tracking Motor Representations in the Corticostriatal Axis During Reinforcement of Naturalistic Behavior" . bid:4dc711e8-2a6e-458e-88cb-a5dcd9b8336e a bbqs:Device ; + bbqs:aliases "SRS", + "srs" ; bbqs:device_category bid:829b9463-611f-45d6-bd24-262a5410c325 ; bbqs:manufacturer bid:a7b15b50-1f35-4e02-91d5-c28593457e3d ; bbqs:model_name "SRS" ; bbqs:name "SRS" . -bid:51314407-e284-4b97-b708-6d4ac938320b a bbqs:Dataset ; - bbqs:description "Created by IDP to hold this researcher’s uploaded data." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000624"^^xsd:anyURI ; - bbqs:name "Four-choice reversal digging task (IDP)" . - bid:515ee9e5-9453-4797-8017-f55c6dd7f1f7 a bbqs:SoftwareTool ; bbqs:description "Deep neural networks for sound source localization and vocalization attribution in rodents, from multi-channel audio" ; bbqs:external_url "https://github.com/neurostatslab/vocalocator"^^xsd:anyURI ; @@ -660,17 +583,25 @@ bid:54ef6069-cc01-4d5b-9aaa-8ef9e1505001 a bbqs:Investigator ; bbqs:name "Oliver Ruebel" ; bbqs:orcid . -bid:556563f6-a276-4de9-ac21-57ab8a53acf0 a bbqs:Dataset ; - bbqs:description "Created by IDP to hold this researcher’s uploaded data." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000610"^^xsd:anyURI ; - bbqs:name "Four-choice reversal digging task (IDP)" . - bid:55e0ecb2-5960-47a0-9fb6-6c2162bfe182 a bbqs:Device ; + bbqs:aliases "White Matter", + "White Matter E3", + "WhiteMatter", + "eCube", + "ecube", + "white matter", + "white matter e3", + "white matter e3 ecube", + "whitematter" ; bbqs:device_category bid:006caa68-8b24-474f-867f-82a6199a84b1 ; bbqs:external_url "https://white-matter.com/"^^xsd:anyURI ; bbqs:manufacturer bid:58e396e9-0430-4678-ab24-382bba814d8b ; bbqs:model_name "White Matter e3 / eCube" ; - bbqs:name "White Matter e3 / eCube" . + bbqs:name "White Matter e3 / eCube" ; + bbqs:output_signals "LFP", + "Spikes", + "Synchronized video" ; + bbqs:product_url "https://white-matter.com/"^^xsd:anyURI . bid:57f1a4fe-523b-4963-b6e6-a38c7da47500 a bbqs:Investigator ; bbqs:consortium_role "NIH Program" ; @@ -680,29 +611,24 @@ bid:57f1a4fe-523b-4963-b6e6-a38c7da47500 a bbqs:Investigator ; bid:f340cdf9-cdfc-43f4-b18b-4d9fbebac604 ; bbqs:name "Mauricio Rangel-Gomez" . -bid:5866f05c-c82e-4c6b-9e7a-829799ee866d a bbqs:Dataset ; - bbqs:description "Created by IDP to hold this researcher’s uploaded data." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000627"^^xsd:anyURI ; - bbqs:name "Four-choice reversal digging task (IDP)" . - -bid:5899fd56-4c11-41a1-8b0a-4e1785820391 a bbqs:Investigator ; - bbqs:consortium_role "NIH Program" ; - bbqs:name "Joseph Monaco" ; - bbqs:orcid . - bid:58c31e98-4899-43df-a516-2ee6781b289e a bbqs:Investigator ; bbqs:name "Anibal Heinsfeld" . bid:5a9d5e58-b370-48ea-a189-a82e7c834708 a bbqs:Device ; + bbqs:aliases "Biomark PIT tags", + "biomark pit tags" ; bbqs:device_category bid:60288cb2-b6fa-41ab-9312-3209dd2cd804 ; bbqs:external_url "https://www.biomark.com/"^^xsd:anyURI ; bbqs:manufacturer bid:562743b9-2c34-4049-806b-10e28796fdba ; bbqs:model_name "Biomark PIT tags" ; - bbqs:name "Biomark PIT tags" . + bbqs:name "Biomark PIT tags" ; + bbqs:output_signals "Individual ID" ; + bbqs:product_url "https://www.biomark.com/"^^xsd:anyURI . bid:5b87def1-786b-470f-879c-9089ebde049d a bbqs:Announcement ; bbqs:description "A 3-day Consortia-Wide Workshop will be held at MIT from July 15-17, 2025. Consortia members, please check your messages for signup information and further details." ; - bbqs:name "Consortia-Wide Workshop at MIT" . + bbqs:name "Consortia-Wide Workshop at MIT" ; + bbqs:part_of_org bid:766331fd-daea-4a31-86c4-589737e533ea . bid:5cac268b-ef4e-4b85-8a9b-9f968992dfe7 a bbqs:Investigator ; bbqs:consortium_role "Research Staff (Scientist and others)" ; @@ -723,7 +649,10 @@ bid:5d5d31be-c34b-4cf6-a08f-273856add625 a bbqs:DeviceCategory ; bbqs:label "Smartphone / Tablet Camera" ; bbqs:measures "RGB video", "selfie video" ; - bbqs:name "Smartphone / Tablet Camera" . + bbqs:name "Smartphone / Tablet Camera" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Ecological momentary video", + "Remote data collection" . bid:5ed180e1-004a-49d3-a05f-e8a4da27718f a bbqs:Investigator ; bbqs:consortium_role "NIH Program" ; @@ -744,6 +673,7 @@ bid:60b6dd1c-dbb1-46e3-9a33-abc7aca65a8a a bbqs:Investigator ; bid:622f970b-e529-441d-b5f3-739025a38aa9 a bbqs:ResearchOrganization ; bbqs:members bid:0f0ad5c2-496b-42a8-91b7-b798742bcdc3, + bid:25a4f79c-6020-4074-b501-0114a205175f, bid:28aec8d8-5202-4574-9a96-b01ddb53aeb4, bid:2dd8fea9-363a-43da-8bd1-6ae4674c60b9, bid:8d6214d3-a2d9-40c2-8cf6-f5e0d0e6afa9 ; @@ -755,14 +685,10 @@ bid:62d4c224-70de-42ed-90d6-a7ac86823c0b a bbqs:DeviceCategory ; bbqs:label "Genomics & Tissue" ; bbqs:measures "IEG expression", "Transcript counts" ; - bbqs:name "Genomics & Tissue" . - -bid:63711ed4-4044-4b43-94c3-fee4d86d7b13 a bbqs:Investigator ; - bbqs:name "Jeff Walker" . - -bid:639e73b5-6a6d-46f1-82a8-b466d7e3bdbb a bbqs:Investigator ; - bbqs:consortium_role "Postdoc/Grad Student" ; - bbqs:name "Olha Metenko" . + bbqs:name "Genomics & Tissue" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Molecular phenotyping", + "Post-hoc tissue analysis" . bid:6450030e-c137-4842-8bae-8d6dd913c50b a bbqs:Investigator ; bbqs:consortium_role "Research Staff (Scientist and others), Postdoc/Grad Student" ; @@ -771,11 +697,18 @@ bid:6450030e-c137-4842-8bae-8d6dd913c50b a bbqs:Investigator ; bbqs:name "Nithin Sugavanam" . bid:66955dda-ed5c-4e05-bfbb-5f9f203af4dd a bbqs:Device ; + bbqs:aliases "EEG (mBrainTrain)", + "eeg mbraintrain", + "mBrainTrain", + "mbraintrain", + "mbraintrain smarting" ; bbqs:device_category bid:1f40721b-dadd-4141-8f9d-6661f4777718 ; bbqs:external_url "https://mbraintrain.com/"^^xsd:anyURI ; bbqs:manufacturer bid:9e769c4e-0958-4ccc-bb96-d714734fa461 ; bbqs:model_name "mBrainTrain Smarting" ; - bbqs:name "mBrainTrain Smarting" . + bbqs:name "mBrainTrain Smarting" ; + bbqs:output_signals "EEG" ; + bbqs:product_url "https://mbraintrain.com/"^^xsd:anyURI . bid:67d25d9e-afa4-4571-aa3c-3c0d4aee3388 a bbqs:FundingOpportunity ; bbqs:activity_code "R01/R21" ; @@ -784,15 +717,11 @@ bid:67d25d9e-afa4-4571-aa3c-3c0d4aee3388 a bbqs:FundingOpportunity ; bbqs:external_url "https://grants.nih.gov/funding/find-a-fit-for-your-research/highlighted-topics/18"^^xsd:anyURI ; bbqs:fon "NOT-MH-25-155" ; bbqs:name "BRAIN Initiative: Data Knowledgebase Ecosystem and NeuroAI Integration (NIH Highlighted Topic)" ; + bbqs:part_of_org bid:28609b98-6f97-4a46-b875-9f5084f1c7cd ; bbqs:posted_date "2026-02-24"^^xsd:date ; bbqs:status "open" ; bbqs:url "https://grants.nih.gov/funding/find-a-fit-for-your-research/highlighted-topics/18"^^xsd:anyURI . -bid:67eda9ac-ecbc-494f-b34f-671f074344d0 a bbqs:Dataset ; - bbqs:description "Created by IDP to hold this researcher’s uploaded data." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000560"^^xsd:anyURI ; - bbqs:name "Four-choice reversal digging task (IDP)" . - bid:693dd13f-6181-46e2-9d89-956c8fd3c78e a bbqs:SoftwareTool ; bbqs:description "Automated social behavior classification in mouse pairs" ; bbqs:external_url "https://github.com/neuroethology/MARS"^^xsd:anyURI ; @@ -800,12 +729,6 @@ bid:693dd13f-6181-46e2-9d89-956c8fd3c78e a bbqs:SoftwareTool ; bbqs:name "MARS" ; bbqs:repo_url "https://github.com/neuroethology/MARS"^^xsd:anyURI . -bid:69aa906c-2a0c-4524-8958-4e1009f96060 a bbqs:ResearchOrganization ; - bbqs:name "National Institute of Neurological Disorders and Stroke" . - -bid:69f09b42-78f2-40f7-83d4-774738a4c974 a bbqs:Investigator ; - bbqs:name "AVNIEL S GHUMAN" . - bid:6a1a2d08-5aec-4450-a9db-8dad62b8f4c4 a bbqs:Investigator ; bbqs:consortium_role "Co-Investigator" ; bbqs:member_of_group bid:4be84d82-5396-4c3d-907f-8c6e10787cd3 ; @@ -818,6 +741,8 @@ bid:6a224a59-b37c-40b2-a4ef-f43393d94357 a bbqs:ResearchOrganization ; bbqs:name "RICE UNIVERSITY" . bid:6c4c36dd-6d17-47d9-8bff-c1cde1750dc7 a bbqs:Device ; + bbqs:aliases "BOT-3", + "bot 3" ; bbqs:device_category bid:829b9463-611f-45d6-bd24-262a5410c325 ; bbqs:manufacturer bid:c42dadeb-bf3c-44fa-baff-92adea2e0185 ; bbqs:model_name "BOT-3" ; @@ -860,25 +785,26 @@ bid:6f2586d0-5743-4ab9-83b6-915ffa98736a a bbqs:Investigator ; bbqs:orcid . bid:700795ce-fd4c-49cc-b037-e9c244039e5e a bbqs:Device ; + bbqs:aliases "COSMED K5", + "Cosmed Calorimetry", + "cosmed calorimetry", + "cosmed k5" ; bbqs:device_category bid:7e99c7ca-9c1d-4de5-b6b5-a6c96c5341af ; bbqs:external_url "https://www.cosmed.com/"^^xsd:anyURI ; bbqs:manufacturer bid:e038c24f-a4b4-4b18-af2a-a8f0ae2a21c7 ; bbqs:model_name "COSMED K5" ; - bbqs:name "COSMED K5" . - -bid:70205506-97d5-4503-bc59-e9a25934e699 a bbqs:Investigator ; - bbqs:name "Varun Thvar" . + bbqs:name "COSMED K5" ; + bbqs:output_signals "Energy expenditure", + "VCO2", + "VO2" ; + bbqs:product_url "https://www.cosmed.com/"^^xsd:anyURI ; + bbqs:regulatory_class "CE medical device" . bid:7117c8b9-6d2f-4737-9490-09934fd89aeb a bbqs:Job ; bbqs:description "Fully-funded postdoctoral position in organoid intelligence through control of neural population dynamics. Join the Neural Systems and Machine Learning Lab at UC Berkeley and Lawrence Berkeley National Laboratory." ; bbqs:name "Organoid Intelligence through Control of Neural Population Dynamics (FBC_PD)" ; bbqs:part_of_org bid:8f22c7e2-06f2-4c84-aa53-071dcce8f875 . -bid:71f322a4-f40f-4dc8-b8d6-2a05c4692c0c a bbqs:Dataset ; - bbqs:description "Created by IDP to hold this researcher’s uploaded data." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000614"^^xsd:anyURI ; - bbqs:name "Four-choice reversal digging task (IDP)" . - bid:7395b261-f13c-4d69-b455-6b58f52b0d5a a bbqs:Announcement ; bbqs:external_url "https://braininitiative.nih.gov/sites/default/files/2025-11/BRAIN%20Research%20Roadmap%20Innovation%20Domains_508c.pdf"^^xsd:anyURI ; bbqs:name "BRAIN Initiative Research Roadmap Reports Published" ; @@ -890,10 +816,10 @@ bid:739c57c7-7580-45e4-b1fd-c4ed51529353 a bbqs:DeviceCategory ; bbqs:label "Biofluid / Biochemical Sensing" ; bbqs:measures "Cortisol", "biomarker concentration" ; - bbqs:name "Biofluid / Biochemical Sensing" . - -bid:766331fd-daea-4a31-86c4-589737e533ea a bbqs:ResearchOrganization ; - bbqs:name "BBQS Consortium" . + bbqs:name "Biofluid / Biochemical Sensing" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Biochemical assays", + "Stress hormones" . bid:76a90dc5-13f0-4837-9acf-f00d5be08b90 a bbqs:DeviceCategory ; bbqs:category_key "temperature" ; @@ -901,7 +827,10 @@ bid:76a90dc5-13f0-4837-9acf-f00d5be08b90 a bbqs:DeviceCategory ; bbqs:label "Body Temperature Sensing" ; bbqs:measures "Core temperature", "skin temperature" ; - bbqs:name "Body Temperature Sensing" . + bbqs:name "Body Temperature Sensing" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Circadian physiology", + "Thermoregulation" . bid:77124e96-cb5e-403b-8ca4-d4fc15b6f95c a bbqs:DeviceCategory ; bbqs:category_key "lidar_radar" ; @@ -910,23 +839,25 @@ bid:77124e96-cb5e-403b-8ca4-d4fc15b6f95c a bbqs:DeviceCategory ; bbqs:measures "Range", "doppler", "point cloud" ; - bbqs:name "LiDAR / mmWave Radar" . + bbqs:name "LiDAR / mmWave Radar" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "In-home movement sensing", + "Privacy-preserving tracking" . bid:773ddab2-ad45-41ac-8003-b80935d30c32 a bbqs:Device ; + bbqs:aliases "Medtronic", + "medtronic", + "medtronic percept", + "metronic person device" ; bbqs:device_category bid:e9d52180-5701-46ba-b5dc-7fc6fa32233b ; bbqs:external_url "https://www.medtronic.com/"^^xsd:anyURI ; bbqs:manufacturer bid:ab859681-c7fc-40cf-8d61-51035f1d8605 ; bbqs:model_name "Medtronic Percept" ; - bbqs:name "Medtronic Percept" . - -bid:7745a449-07ce-4762-988e-e355a72b0775 a bbqs:Investigator ; - bbqs:consortium_role "NIH Program" ; - bbqs:name "Arina Knowlton" . - -bid:7758db83-7d6a-46d9-9cbb-dd78d0e2853a a bbqs:Dataset ; - bbqs:description "Created by IDP to hold this researcher’s uploaded data." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000625"^^xsd:anyURI ; - bbqs:name "Four-choice reversal digging task (IDP)" . + bbqs:name "Medtronic Percept" ; + bbqs:output_signals "LFP", + "Stimulation parameters" ; + bbqs:product_url "https://www.medtronic.com/"^^xsd:anyURI ; + bbqs:regulatory_class "FDA-approved (PMA)" . bid:7766280c-d6f3-4c55-8e7e-f9207dbc1d1f a bbqs:Announcement ; bbqs:external_url "https://braininitiative.nih.gov/"^^xsd:anyURI ; @@ -949,30 +880,35 @@ bid:7867bb2b-3001-431a-9a3b-0f5bd5ad64f2 a bbqs:ResearchOrganization ; bbqs:name "UNIVERSITY OF ALABAMA AT BIRMINGHAM" . bid:790607e8-4030-4e55-83fb-8df121fbb7b7 a bbqs:Device ; + bbqs:aliases "Med Associates", + "MedAssociates", + "med associates", + "med associates touchscreens", + "medassociates" ; bbqs:device_category bid:0fad9963-1681-478c-881e-348e2736fafe ; bbqs:external_url "https://www.med-associates.com/"^^xsd:anyURI ; bbqs:manufacturer bid:765fd145-afc8-4101-92d5-33aff8c04fac ; bbqs:model_name "Med Associates touchscreens" ; - bbqs:name "Med Associates touchscreens" . + bbqs:name "Med Associates touchscreens" ; + bbqs:output_signals "Touch responses", + "Trial events" ; + bbqs:product_url "https://www.med-associates.com/"^^xsd:anyURI . bid:7924e7d9-5b53-4525-95ef-3f5a6b9112a5 a bbqs:ResearchOrganization ; bbqs:members bid:0f3bb33c-e7ee-4013-af5d-894d1adfa0ee, bid:20d3bb9f-8cbe-45b8-974e-1c84e0d9631f, bid:4d8bb1b1-0cd6-4ca6-a5f7-7b0bc3ba537d, bid:5f8ac3c4-a0fb-44d6-ae2d-b505816d4141, + bid:70205506-97d5-4503-bc59-e9a25934e699, bid:95406597-a11e-4809-834d-8a6926c32164, bid:a7318228-623e-4f94-a7e6-5e3fed968e1a, bid:b359432d-39e2-4ab8-bb3b-16afe458820c, bid:e03557cc-99aa-4b15-8786-bde9a5253fd1, bid:e5bdf58e-a1ff-4f5f-aa6d-667de414e16e, + bid:f9cc96dd-52b0-41bc-b687-47a1e4df3e2c, bid:fe4790d5-bf32-469d-b098-cb4f44f6fa19 ; bbqs:name "MASSACHUSETTS INSTITUTE OF TECHNOLOGY" . -bid:79c7ff27-6bd7-4b92-b22c-9f4f80a507ab a bbqs:Investigator ; - bbqs:consortium_role "NIH Program" ; - bbqs:description "NIH Program staff – BBQS consortium" ; - bbqs:name "Crystal Lantz" . - bid:79d8d638-23c0-490f-8044-dbe06e0f63b5 a bbqs:Investigator ; bbqs:consortium_role "Postdoc/Grad Student" ; bbqs:member_of_group bid:47cf050c-ab07-42fa-b251-d1fecc7ceb40, @@ -1005,11 +941,17 @@ bid:7eb2abf1-f38f-4693-afb6-9313f96d2ff4 a bbqs:Investigator ; bbqs:orcid . bid:7eb373e9-092d-418d-b3ff-4f7d8e4fb939 a bbqs:Device ; + bbqs:aliases "GoPro", + "GoPro Hero10", + "gopro", + "gopro hero10" ; bbqs:device_category bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 ; bbqs:external_url "https://gopro.com/"^^xsd:anyURI ; bbqs:manufacturer bid:56efc35e-a021-483f-b2b1-1dae1f893d18 ; bbqs:model_name "GoPro HERO10" ; - bbqs:name "GoPro HERO10" . + bbqs:name "GoPro HERO10" ; + bbqs:output_signals "RGB video" ; + bbqs:product_url "https://gopro.com/"^^xsd:anyURI . bid:7ef0ea15-6f36-4bca-8eee-626e9bf76254 a bbqs:Investigator ; bbqs:member_of_group bid:4737d7d7-4bbe-4b72-b397-5f341a0dd5dd, @@ -1024,16 +966,6 @@ bid:81d6f976-8ae2-4e38-853a-9e0fe8ac7839 a bbqs:Investigator ; bbqs:name "Emily Mackevicius" ; bbqs:orcid . -bid:821b1f4e-5bdf-45be-8319-d10a2620fb1a a bbqs:Dataset ; - bbqs:description "Testing dataset for uploading files from Pennsieve to EMBER-DANDI" ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000467"^^xsd:anyURI ; - bbqs:name "Test dataset for Pennsieve upload" . - -bid:82dd5aa5-3e9e-4f8b-ab99-9da5f557580a a bbqs:Dataset ; - bbqs:description "Created by the IDP-ARC platform to hold this researcher’s uploaded data." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000551"^^xsd:anyURI ; - bbqs:name "IDP-ARC — Four-choice reversal digging task" . - bid:82e9264e-8bec-4d1e-ab39-9e42f8f5384d a bbqs:Investigator ; bbqs:consortium_role "Research Staff (Scientist and others)" ; bbqs:member_of_group bid:4737d7d7-4bbe-4b72-b397-5f341a0dd5dd, @@ -1041,9 +973,6 @@ bid:82e9264e-8bec-4d1e-ab39-9e42f8f5384d a bbqs:Investigator ; bid:f340cdf9-cdfc-43f4-b18b-4d9fbebac604 ; bbqs:name "Neha Thomas" . -bid:83d790af-315f-4f1f-8efc-3718fc0581d3 a bbqs:Investigator ; - bbqs:name "Flavia Vitale" . - bid:83e96042-a116-4e27-ab65-787db78d29f2 a bbqs:Investigator ; bbqs:name "Niegil Francis Muttath Joseph" . @@ -1063,12 +992,9 @@ bid:858afe90-ab36-4d22-bfde-b4d7630a72ef a bbqs:Benchmark ; bbqs:external_url "https://benchmark.deeplabcut.org/"^^xsd:anyURI ; bbqs:name "DLC Benchmarks" . -bid:85a49b85-44ff-4f85-a110-c3860bfe6747 a bbqs:Investigator ; - bbqs:consortium_role "Co-Investigator" ; - bbqs:name "Annette Estes" ; - bbqs:orcid . - bid:85dba242-244b-4a63-b463-b9e6bf4d29e1 a bbqs:Device ; + bbqs:aliases "ADOS", + "ados" ; bbqs:device_category bid:829b9463-611f-45d6-bd24-262a5410c325 ; bbqs:manufacturer bid:a7b15b50-1f35-4e02-91d5-c28593457e3d ; bbqs:model_name "ADOS" ; @@ -1081,15 +1007,19 @@ bid:8694fef3-33b8-491f-a806-7d0c8b5a60bf a bbqs:Investigator ; bid:f340cdf9-cdfc-43f4-b18b-4d9fbebac604 ; bbqs:name "Wan Chen Lin" . -bid:87b79b22-888b-40ac-bee6-32a62f07645f a bbqs:Investigator ; - bbqs:name "Yunsoo Kim" . - bid:88b4baf0-8e42-43e8-a689-3f5cd46138ee a bbqs:Device ; + bbqs:aliases "BIOPAC", + "Biopac", + "biopac" ; bbqs:device_category bid:851882bb-3321-45ed-af75-6ae08836c1fc ; bbqs:external_url "https://www.biopac.com/"^^xsd:anyURI ; bbqs:manufacturer bid:34971c92-6e5a-4231-8d74-3759c2301d8b ; bbqs:model_name "BIOPAC" ; - bbqs:name "BIOPAC" . + bbqs:name "BIOPAC" ; + bbqs:output_signals "ECG", + "EDA", + "EMG" ; + bbqs:product_url "https://www.biopac.com/"^^xsd:anyURI . bid:8ae4d852-9f43-4d4e-a7fb-6cef12ef9af8 a bbqs:DeviceCategory ; bbqs:category_key "ppg" ; @@ -1098,20 +1028,21 @@ bid:8ae4d852-9f43-4d4e-a7fb-6cef12ef9af8 a bbqs:DeviceCategory ; bbqs:measures "BVP", "SpO2", "pulse rate" ; - bbqs:name "Photoplethysmography (PPG)" . - -bid:8b45a6d3-febb-4537-9786-69685e36aa6d a bbqs:Investigator ; - bbqs:consortium_role "NIH program staff" ; - bbqs:name "Lizzy Ankudowich" . + bbqs:name "Photoplethysmography (PPG)" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Arousal tracking", + "Wearable heart rate" . bid:8b9d5dda-2b99-4e1c-ba27-968f74ef8b77 a bbqs:FundingOpportunity ; bbqs:activity_code "U01" ; bbqs:description "Develops and tests a \"playbook\" of standardized frameworks and protocols for building reliable, deployable multimodal AI clinical decision support tools that integrate clinical imaging with other health data. 5 awards anticipated, $2M total." ; + bbqs:expiration_date "2026-10-10"^^xsd:date ; bbqs:external_url "https://simpler.grants.gov/opportunity/5b0a5980-5b84-4cdf-9370-2a36c301760b"^^xsd:anyURI ; bbqs:fon "RFA-RM-27-011" ; bbqs:name "Development and Testing of a Multi-use Frameworks Playbook for Precision Medicine with AI: Integrating Imaging with Multimodal Data (PRIMED-AI) (U01 Clinical Trial Not Allowed)" ; + bbqs:part_of_org bid:2548a017-fd14-4934-9762-b30d7071821a ; bbqs:posted_date "2026-06-30"^^xsd:date ; - bbqs:status "open" ; + bbqs:status "closed" ; bbqs:url "https://simpler.grants.gov/opportunity/5b0a5980-5b84-4cdf-9370-2a36c301760b"^^xsd:anyURI . bid:8c8402e7-5b64-4903-957e-8c7f3548512d a bbqs:SoftwareTool ; @@ -1126,11 +1057,24 @@ bid:8c977c24-da2f-4866-b860-b71aa2540bd4 a bbqs:Investigator ; bbqs:name "Brendan Ito" . bid:8d1248d6-6ad4-449a-b268-69c17fb8e0bd a bbqs:Device ; + bbqs:aliases "EmbracePlus", + "Empatica", + "Wearable sensor (EmbracePlus)", + "embraceplus", + "empatica", + "empatica embraceplus", + "wearable sensor embraceplus" ; bbqs:device_category bid:851882bb-3321-45ed-af75-6ae08836c1fc ; bbqs:external_url "https://www.empatica.com/embraceplus/"^^xsd:anyURI ; bbqs:manufacturer bid:0f782852-6d9e-4d3b-8c38-6e0573400461 ; bbqs:model_name "Empatica EmbracePlus" ; - bbqs:name "Empatica EmbracePlus" . + bbqs:name "Empatica EmbracePlus" ; + bbqs:output_signals "Accelerometry", + "EDA", + "PPG", + "Temperature" ; + bbqs:product_url "https://www.empatica.com/embraceplus/"^^xsd:anyURI ; + bbqs:regulatory_class "FDA-cleared / CE medical device" . bid:8e67d548-47b3-4b48-9a70-e5e22c56f062 a bbqs:Standard ; bbqs:award_numbers "RF1MH132747" ; @@ -1173,6 +1117,7 @@ bid:912f67fc-5862-47a2-b6f4-891fcd98f244 a bbqs:FundingOpportunity ; bbqs:fon "RFA-NS-27-001" ; bbqs:name "BRAIN Initiative: Research Resource Grants for Technology Integration and Dissemination (U24 Clinical Trial Not Allowed)" ; bbqs:open_date "2026-05-10"^^xsd:date ; + bbqs:part_of_org bid:69aa906c-2a0c-4524-8958-4e1009f96060 ; bbqs:posted_date "2026-02-09"^^xsd:date ; bbqs:status "open" ; bbqs:url "https://simpler.grants.gov/opportunity/92fe438d-91dc-4ce2-9a45-edc615c4d0b6"^^xsd:anyURI . @@ -1203,71 +1148,38 @@ bid:9515d721-456a-45d1-885c-d97a482317f8 a bbqs:ResearchOrganization ; bbqs:members bid:e1fcac8e-1f50-4dc8-8f14-f0ee62614861 ; bbqs:name "CEDARS-SINAI MEDICAL CENTER" . -bid:95740d4f-1e7f-474d-96ac-cbb99161a800 a bbqs:Dataset ; - bbqs:description "Created by IDP to hold this researcher’s uploaded data." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000561"^^xsd:anyURI ; - bbqs:name "Four-choice reversal digging task (IDP)" . - -bid:977712f0-0daf-4238-a693-42c96f0874a2 a bbqs:Investigator ; - bbqs:name "Ugne Klibaite" . - bid:9860f60e-6ccf-44b5-b941-45c88e0ffed7 a bbqs:ResearchOrganization ; bbqs:name "NIH Office of Research on Women's Health" . bid:98f1fdd4-77a8-4bd5-8703-ed6fb8c4af0e a bbqs:ResearchOrganization ; bbqs:name "Empire AI Consortium" . -bid:9923fbb5-0ea9-48d8-8ad9-386af3233e00 a bbqs:Dataset ; - bbqs:description "Created by IDP to hold this researcher’s uploaded data." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000563"^^xsd:anyURI ; - bbqs:name "Four-choice reversal digging task (IDP)" . - bid:99bc7f7b-2a3d-4e34-99f1-ec08e12133b2 a bbqs:ResearchOrganization ; - bbqs:members bid:c3604b73-537c-411b-b963-cd8df608f086, + bbqs:members bid:977712f0-0daf-4238-a693-42c96f0874a2, + bid:c3604b73-537c-411b-b963-cd8df608f086, bid:db663fc5-af00-457b-beb7-f9ee831eef71 ; bbqs:name "HARVARD UNIVERSITY" . -bid:99e94e46-f0af-4d3d-8ffd-ff522c4761db a bbqs:Investigator ; - bbqs:name "Melissa Kline Struhl" . - -bid:9a538af9-78f2-49ab-ac2f-24f6d66f3936 a bbqs:Dataset ; - bbqs:description "Created by IDP to hold this researcher’s uploaded data." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000622"^^xsd:anyURI ; - bbqs:name "Four-choice reversal digging task (IDP)" . - bid:9a8ccd3e-8d5a-4169-8ee9-6c64bc650803 a bbqs:MLModel ; bbqs:description "Dimensionality reduction revealing hidden structures in neural time series" ; bbqs:external_url "https://cebra.ai/"^^xsd:anyURI ; bbqs:name "CEBRA" . -bid:9bb42f0a-2bf6-4f88-b621-e2d65d31fa71 a bbqs:Dataset ; - bbqs:description "Created by IDP to hold this researcher’s uploaded data." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000615"^^xsd:anyURI ; - bbqs:name "Four-choice reversal digging task (IDP)" . - -bid:9be4379c-b96a-4a12-b128-b91bf85554ab a bbqs:Dataset ; - bbqs:description "Created by IDP to hold this researcher’s uploaded data." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000562"^^xsd:anyURI ; - bbqs:name "Four-choice reversal digging task (IDP)" . - bid:9cac1ce6-16e0-400b-adda-ad5d2a8597a9 a bbqs:Dataset ; bbqs:description "This is an example of how SLEAP training data (flies13 from https://sleap.ai/datasets.html) can be converted and stored on EMBER-DANDI" ; bbqs:external_url "https://dandi.emberarchive.org/dandiset/000398"^^xsd:anyURI ; bbqs:name "SLEAP Training Data Example" . -bid:9d48505e-4e39-425a-ac10-2f1d28ebcbc1 a bbqs:Dataset ; - bbqs:description "Created by IDP to hold this researcher’s uploaded data." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000616"^^xsd:anyURI ; - bbqs:name "Four-choice reversal digging task (IDP)" . - bid:9db8fc93-1890-4237-b758-d5f94c5e6306 a bbqs:FundingOpportunity ; bbqs:activity_code "U54" ; bbqs:description "Establishes a dedicated hub for comprehensive evaluation and characterization of AI-enabled, image-based multimodal CDS tools from the PRIMED-AI Consortium — verification, validation, interoperability, and uncertainty quantification. 1 award, $2.0M–$2.7M; foreign organizations ineligible." ; + bbqs:expiration_date "2026-10-03"^^xsd:date ; bbqs:external_url "https://simpler.grants.gov/opportunity/40ac94ea-e7b9-44af-9ae4-d3340c342757"^^xsd:anyURI ; bbqs:fon "RFA-RM-27-014" ; bbqs:name "Validation Center for Precision Medicine with AI: Integrating Imaging with Multimodal Data (PRIMED-AI) (U54 Clinical Trials Not Allowed)" ; + bbqs:part_of_org bid:2548a017-fd14-4934-9762-b30d7071821a ; bbqs:posted_date "2026-06-30"^^xsd:date ; - bbqs:status "open" ; + bbqs:status "closed" ; bbqs:url "https://simpler.grants.gov/opportunity/40ac94ea-e7b9-44af-9ae4-d3340c342757"^^xsd:anyURI . bid:9e20b70e-9f64-4e32-bc64-18efbf8293bd a bbqs:DeviceCategory ; @@ -1277,18 +1189,10 @@ bid:9e20b70e-9f64-4e32-bc64-18efbf8293bd a bbqs:DeviceCategory ; bbqs:measures "Respiration rate", "airflow", "nasal temperature" ; - bbqs:name "Respiration Sensing" . - -bid:9eb4af78-4485-4c7b-9179-76d079bde109 a bbqs:Investigator ; - bbqs:consortium_role "NIH program staff" ; - bbqs:name "Ashlee Van't Veer" . - -bid:9f75488b-59d0-4d50-b7db-869f26066743 a bbqs:ResearchOrganization ; - bbqs:members bid:00618660-a724-4059-85c1-c6ca3ccc1744, - bid:3d7564b9-e839-4737-874a-2e3b5319e11a, - bid:5bb15430-32e5-457f-b6ce-e4f3790687fa, - bid:ee077b61-eb2c-4cd9-b587-a46418c45265 ; - bbqs:name "COLUMBIA UNIVERSITY HEALTH SCIENCES" . + bbqs:name "Respiration Sensing" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Breathing rhythm", + "Respiration-locked neural activity" . bid:9fb13eb4-a3bc-483a-9969-f3908d13143d a bbqs:Investigator ; bbqs:consortium_role "Postdoc/Grad Student" ; @@ -1298,11 +1202,13 @@ bid:9fb13eb4-a3bc-483a-9969-f3908d13143d a bbqs:Investigator ; bid:9fe36a51-d470-42f8-baa1-0c7aa68a9dea a bbqs:FundingOpportunity ; bbqs:activity_code "RM1" ; + bbqs:description "Solicits teams of 3-6 PDs/PIs to understand how the nervous system gives rise to mental experience and behavior, integrating circuit, in vivo recordings, and behavioral analyses." ; bbqs:expiration_date "2028-06-24"^^xsd:date ; bbqs:external_url "https://simpler.grants.gov/opportunity/ffe98704-96a8-4f41-a32b-49edd0409006"^^xsd:anyURI ; bbqs:fon "RFA-NS-27-002" ; bbqs:name "BRAIN Initiative: Integrative Team-Research BRAIN Circuits Program - iBCP (RM1 Clinical Trial Not Allowed)" ; bbqs:open_date "2026-09-07"^^xsd:date ; + bbqs:part_of_org bid:69aa906c-2a0c-4524-8958-4e1009f96060 ; bbqs:posted_date "2026-08-31"^^xsd:date ; bbqs:status "open" ; bbqs:url "https://simpler.grants.gov/opportunity/ffe98704-96a8-4f41-a32b-49edd0409006"^^xsd:anyURI . @@ -1313,20 +1219,39 @@ bid:a177387c-24d4-4e12-8f7d-76994130f853 a bbqs:Dataset ; bbqs:name "Naturalistic Mouse Behavior" . bid:a25d5bdb-97ea-4995-a9aa-fcb6059fcb1f a bbqs:Device ; + bbqs:aliases "Xsens", + "xsens" ; bbqs:device_category bid:dac56889-e81e-478e-827d-7f08bb15efd3 ; bbqs:external_url "https://www.movella.com/products/motion-capture"^^xsd:anyURI ; bbqs:manufacturer bid:247cc4da-1133-4307-97c9-8238c723dc67 ; bbqs:model_name "Xsens" ; - bbqs:name "Xsens" . + bbqs:name "Xsens" ; + bbqs:output_signals "Orientation", + "Segment kinematics" ; + bbqs:product_url "https://www.movella.com/products/motion-capture"^^xsd:anyURI . bid:a36c70d6-19a8-40b6-a8a1-7aaea7e5b918 a bbqs:Device ; + bbqs:aliases "Natus", + "Natus XLTek EEG monitoring", + "Scalp EEG; Natus", + "natus", + "natus xltek", + "natus xltek eeg monitoring", + "sEEG (intracranial); Natus", + "scalp eeg natus", + "seeg intracranial natus" ; bbqs:device_category bid:46ca9982-9f32-4d56-84fc-95df94a69e7d ; bbqs:external_url "https://natus.com/"^^xsd:anyURI ; bbqs:manufacturer bid:90716be1-d61b-4641-ba7e-da9533d0dbeb ; bbqs:model_name "Natus XLTek" ; - bbqs:name "Natus XLTek" . + bbqs:name "Natus XLTek" ; + bbqs:output_signals "EEG", + "Video" ; + bbqs:product_url "https://natus.com/"^^xsd:anyURI ; + bbqs:regulatory_class "FDA-cleared" . bid:a6ed8610-4f99-43cb-b0fa-ed983bfa2f20 a bbqs:ResearchOrganization ; + bbqs:members bid:4412f5e5-aba7-49fb-876c-618f59f9b226 ; bbqs:name "National Institute on Deafness and Other Communication Disorders" . bid:a6f825d6-cb5c-4136-9208-eee059bf6f49 a bbqs:Investigator ; @@ -1342,44 +1267,71 @@ bid:a82b872c-fb47-43ba-9d01-258026913f06 a bbqs:Investigator ; bid:a8990457-e9da-49eb-9a0c-5b2af1a4ca61 a bbqs:FundingOpportunity ; bbqs:activity_code "Fellowship" ; + bbqs:expiration_date "2026-10-23"^^xsd:date ; bbqs:external_url "https://www.nsf.gov/funding/opportunities/grfp-nsf-graduate-research-fellowship-program/nsf26-526/solicitation"^^xsd:anyURI ; bbqs:fon "NSF 26-526" ; bbqs:name "NSF Graduate Research Fellowship Program (GRFP)" ; + bbqs:part_of_org bid:62826284-8258-4f21-af3e-64fc755ef2b2 ; bbqs:posted_date "2026-08-25"^^xsd:date ; - bbqs:status "open" ; + bbqs:status "closed" ; bbqs:url "https://www.nsf.gov/funding/opportunities/grfp-nsf-graduate-research-fellowship-program/nsf26-526/solicitation"^^xsd:anyURI . bid:a991c266-2e08-46e8-b579-8d10341fc344 a bbqs:Device ; + bbqs:aliases "Delsys Trigno", + "delsys trigno" ; bbqs:device_category bid:1eda4bd4-4446-40c3-8996-7400722b1560 ; bbqs:external_url "https://delsys.com/trigno/"^^xsd:anyURI ; bbqs:manufacturer bid:6b2192d5-d840-4f4b-be96-5cec4f2fe432 ; bbqs:model_name "Delsys Trigno" ; - bbqs:name "Delsys Trigno" . + bbqs:name "Delsys Trigno" ; + bbqs:output_signals "Accelerometry", + "Surface EMG" ; + bbqs:product_url "https://delsys.com/trigno/"^^xsd:anyURI . bid:a9da991f-1bcd-4b6c-ab45-e67af7d3b755 a bbqs:Device ; + bbqs:aliases "CAREN", + "Karen", + "Stewart Platform", + "caren", + "karen", + "motek caren", + "stewart platform" ; bbqs:device_category bid:1933d538-1acc-4a01-8691-9ecd2989d0e2 ; bbqs:external_url "https://www.motekmedical.com/solution/caren/"^^xsd:anyURI ; bbqs:manufacturer bid:d74d8fe3-4c71-481b-8a54-410c4e3574a9 ; bbqs:model_name "Motek CAREN" ; - bbqs:name "Motek CAREN" . - -bid:aa69dcd5-bd16-40ef-909e-3f2985d66c65 a bbqs:Investigator ; - bbqs:name "Deepa Purushothaman" . + bbqs:name "Motek CAREN" ; + bbqs:output_signals "Gait", + "Ground reaction forces", + "Platform kinematics" ; + bbqs:product_url "https://www.motekmedical.com/solution/caren/"^^xsd:anyURI . bid:aa8884d6-2eae-451a-828a-92e4595c273e a bbqs:Investigator ; bbqs:consortium_role "Co-Investigator" ; bbqs:member_of_group bid:4be84d82-5396-4c3d-907f-8c6e10787cd3 ; bbqs:name "Sara Goering" . -bid:aa9445fe-736e-4a1e-b8a4-4b709c4a6603 a bbqs:Investigator ; - bbqs:name "Luke Bloy" . - bid:ab492763-6805-4afd-bf3f-28eec5276d6d a bbqs:Device ; + bbqs:aliases "Neon", + "Pupil Core", + "Pupil Core / Invisible", + "Pupil Labs", + "PupilLabs", + "neon", + "pupil core", + "pupil core invisible", + "pupil labs", + "pupil labs eye trackers", + "pupillabs" ; bbqs:device_category bid:7d968a4f-f412-431e-a9d9-6ec963cb8677 ; bbqs:external_url "https://pupil-labs.com/"^^xsd:anyURI ; bbqs:manufacturer bid:9b910269-1934-4f7b-a4f7-9f375f401d8d ; bbqs:model_name "Pupil Labs eye trackers" ; - bbqs:name "Pupil Labs eye trackers" . + bbqs:name "Pupil Labs eye trackers" ; + bbqs:output_signals "Gaze", + "Pupil diameter", + "Scene video" ; + bbqs:product_url "https://pupil-labs.com/"^^xsd:anyURI . bid:ab51c79a-9096-4c6b-9724-ae605b7ffae2 a bbqs:Investigator ; bbqs:consortium_role "Research Staff (Scientist and others), Postdoc/Grad Student" ; @@ -1391,11 +1343,13 @@ bid:ab51c79a-9096-4c6b-9724-ae605b7ffae2 a bbqs:Investigator ; bid:ac01b838-9803-4a39-8adf-6b9ac9883535 a bbqs:FundingOpportunity ; bbqs:activity_code "UG3/UH3" ; bbqs:description "Catalyzes translation of AI-enabled, image-centered multimodal clinical decision support tools from prototype training and testing toward real-world clinical application. 8 awards anticipated." ; + bbqs:expiration_date "2026-10-20"^^xsd:date ; bbqs:external_url "https://simpler.grants.gov/opportunity/360c4588-1512-4fa4-9b61-52a3f1d6c368"^^xsd:anyURI ; bbqs:fon "RFA-RM-27-013" ; bbqs:name "Model-to-Clinic (M2C) for Precision Medicine with AI: Integrating Imaging with Multimodal Data (PRIMED-AI) (UG3/UH3 Clinical Trial Optional)" ; + bbqs:part_of_org bid:2548a017-fd14-4934-9762-b30d7071821a ; bbqs:posted_date "2026-06-30"^^xsd:date ; - bbqs:status "open" ; + bbqs:status "closed" ; bbqs:url "https://simpler.grants.gov/opportunity/360c4588-1512-4fa4-9b61-52a3f1d6c368"^^xsd:anyURI . bid:b0b69ef8-90b3-481a-b095-a01f1ddf4663 a bbqs:Investigator ; @@ -1403,17 +1357,17 @@ bid:b0b69ef8-90b3-481a-b095-a01f1ddf4663 a bbqs:Investigator ; bbqs:member_of_group bid:4737d7d7-4bbe-4b72-b397-5f341a0dd5dd ; bbqs:name "Nicole Stock" . -bid:b1246cb8-0963-4160-bb14-8f313a885dcc a bbqs:Dataset ; - bbqs:description "Created by IDP to hold this researcher’s uploaded data." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000618"^^xsd:anyURI ; - bbqs:name "Four-choice reversal digging task (IDP)" . - bid:b26a04a7-e254-470c-9d43-1c618d60434e a bbqs:Device ; + bbqs:aliases "Basler", + "basler", + "basler cameras" ; bbqs:device_category bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 ; bbqs:external_url "https://www.baslerweb.com/"^^xsd:anyURI ; bbqs:manufacturer bid:3eaf894a-5a66-47be-b36f-ce28d5cd1e9c ; bbqs:model_name "Basler cameras" ; - bbqs:name "Basler cameras" . + bbqs:name "Basler cameras" ; + bbqs:output_signals "RGB video" ; + bbqs:product_url "https://www.baslerweb.com/"^^xsd:anyURI . bid:b2f1e74e-20e6-4a73-a04c-37339768e70f a bbqs:SoftwareTool ; bbqs:description "Unsupervised behavioral segmentation into reusable action syllables" ; @@ -1422,12 +1376,6 @@ bid:b2f1e74e-20e6-4a73-a04c-37339768e70f a bbqs:SoftwareTool ; bbqs:name "MoSeq" ; bbqs:repo_url "https://dattalab.github.io/moseq2-website/"^^xsd:anyURI . -bid:b369e3dc-bb40-4cd7-ad5a-a329aa9278b8 a bbqs:Investigator ; - bbqs:name "Chuck Mikell" . - -bid:b50fe39f-f6d9-4362-a846-42ff705c73ac a bbqs:Investigator ; - bbqs:name "Sima Mofakham" . - bid:b5211490-2071-4d4d-8ce6-9ca471210299 a bbqs:Dataset ; bbqs:description "This dataset consists of over 1,100 - 1 hour of open field videos meant to capture frailty. The animals range from 8 weeks to 4.2 years. The following papers have used this data. The work has been funded by the National Institute on Aging. @article{Hessionetal2022, author = {Hession, Luke E. and Sabnis, Gautam S. and Churchill, Gary A. and Kumar, Vivek}, title = {A machine-vision-based frailty index for mice}, journal = {Nature Aging}, year = {2022}, volume = {2}, pages = {756--766}, doi = {10.1038/s43587-022-00266-0}}@article{Sabnisetal2025, author = {Sabnis, Gautam S. and Churchill, Gary A. and Kumar, Vivek}, title = {Machine vision based frailty assessment for genetically diverse mice}, journal = {GeroScience}, year = {2025}, doi = {10.1007/s11357-025-01583-z}}@article{Kumar2026, author = {Kumar Lab}, title = {Integrating supervised and unsupervised machine learning for behavior segmentation reveals latent frailty signatures and improves aging clocks in isogenic and outbred mice}, journal = {bioRxiv}, year = {2026}, doi = {10.64898/2026.03.23.713050v1}}" ; bbqs:external_url "https://dandi.emberarchive.org/dandiset/000466"^^xsd:anyURI ; @@ -1438,39 +1386,49 @@ bid:b5f65a35-ad99-4779-ab8c-2f211803ca2e a bbqs:Dataset ; bbqs:external_url "https://dandi.emberarchive.org/dandiset/000469"^^xsd:anyURI ; bbqs:name "Pose Zoo: Bounding Box" . -bid:b723b975-9438-4c08-b9b9-404846e31272 a bbqs:Investigator ; - bbqs:consortium_role "NIH Program" ; - bbqs:name "Karen David" ; - bbqs:orcid . - bid:b76af5cd-30c7-4f75-a127-d4e8a669cdd6 a bbqs:FundingOpportunity ; bbqs:activity_code "U24" ; bbqs:description "Coordination and support center for the PRIMED-AI Program, operating administration, evaluation, and outreach cores that collect, organize, and disseminate information about tools created across the consortium. 1 award, $575K–$750K." ; bbqs:external_url "https://simpler.grants.gov/opportunity/a975ac4b-ca02-4d2b-8dcd-c75493f04087"^^xsd:anyURI ; bbqs:fon "RFA-RM-27-015" ; bbqs:name "Logistics Center for Precision Medicine with AI: Integrating Imaging with Multimodal Data (PRIMED-AI) (U24)" ; + bbqs:part_of_org bid:2548a017-fd14-4934-9762-b30d7071821a ; bbqs:posted_date "2026-06-30"^^xsd:date ; bbqs:status "open" ; bbqs:url "https://simpler.grants.gov/opportunity/a975ac4b-ca02-4d2b-8dcd-c75493f04087"^^xsd:anyURI . bid:b91a5db1-9e21-4158-a14f-087f59f5bd8d a bbqs:Device ; + bbqs:aliases "OBSBOT", + "obsbot", + "obsbot cameras" ; bbqs:device_category bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 ; bbqs:external_url "https://www.obsbot.com/"^^xsd:anyURI ; bbqs:manufacturer bid:188ce5e2-0a5f-4c69-a9ec-bf7b8b1ebbc4 ; bbqs:model_name "OBSBOT cameras" ; - bbqs:name "OBSBOT cameras" . + bbqs:name "OBSBOT cameras" ; + bbqs:output_signals "RGB video" ; + bbqs:product_url "https://www.obsbot.com/"^^xsd:anyURI . bid:b9f28848-dd76-4bf7-9fd6-a4d1509154eb a bbqs:Benchmark ; bbqs:description "Performance comparison for DLC-based approaches" ; + bbqs:evaluates bid:4009a1f6-c173-495b-9725-bb51571a3cdf ; bbqs:external_url "https://huggingface.co/spaces/DeepLabCut/Leaderboard"^^xsd:anyURI ; bbqs:name "DLC Leaderboard" . bid:ba876f06-02b2-4ca2-bbc0-2877890b6f6a a bbqs:Device ; + bbqs:aliases "64 channel mobile eeg ant neuro", + "64-channel mobile EEG (ANT Neuro)", + "ANT Neuro", + "ant neuro", + "ant neuro eego", + "eego" ; bbqs:device_category bid:1f40721b-dadd-4141-8f9d-6661f4777718 ; bbqs:external_url "https://www.ant-neuro.com/"^^xsd:anyURI ; bbqs:manufacturer bid:d5dd8903-0114-4511-a4ec-446ae9f657a8 ; bbqs:model_name "ANT Neuro eego" ; - bbqs:name "ANT Neuro eego" . + bbqs:name "ANT Neuro eego" ; + bbqs:output_signals "EEG" ; + bbqs:product_url "https://www.ant-neuro.com/"^^xsd:anyURI . bid:bab963f7-54f8-4b01-a914-de675535b004 a bbqs:Investigator ; bbqs:consortium_role "Postdoc/Grad Student" ; @@ -1491,20 +1449,13 @@ bid:bea2a223-4980-44da-b8da-807ac4301bc6 a bbqs:SoftwareTool ; bbqs:name "Open Ephys" ; bbqs:repo_url "https://open-ephys.org/"^^xsd:anyURI . -bid:bef104b2-a9a9-41d3-a585-6575449c2966 a bbqs:Investigator ; - bbqs:name "Suliman Sharif (sulstice@standardseedcorp.com)" . - bid:c04b3bcd-d1db-4b3c-9dc6-a4c97039cad6 a bbqs:ResearchOrganization ; bbqs:members bid:223a91b2-1ffb-49e6-9cd7-d97f6f2beece, + bid:87b79b22-888b-40ac-bee6-32a62f07645f, bid:bcdcd220-fa82-47d4-9c1b-7a8da03dadd8, bid:c6056429-1e03-4506-8484-5be9acff8170 ; bbqs:name "STATE UNIVERSITY NEW YORK STONY BROOK" . -bid:c104aeb5-4e17-4b00-b120-1f8343435b78 a bbqs:Dataset ; - bbqs:description "Created by IDP to hold this researcher’s uploaded data." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000619"^^xsd:anyURI ; - bbqs:name "Four-choice reversal digging task (IDP)" . - bid:c2074402-c96d-40c5-8b3c-ad8a8fcf2031 a bbqs:Investigator ; bbqs:consortium_role "Co-Investigator" ; bbqs:member_of_group bid:4be84d82-5396-4c3d-907f-8c6e10787cd3 ; @@ -1520,9 +1471,6 @@ bid:c4b8f5ff-4ac3-4c1b-a978-bd7d1c2dbb86 a bbqs:Job ; bbqs:name "Canada Impact+ Doctoral Research Training Award ($40K/yr, 3 years)" ; bbqs:part_of_org bid:c28b3fe8-8dbf-4037-ab56-fda6d170cfc4 . -bid:c520d01a-3746-4f7d-baff-ad1dab70e1b3 a bbqs:Investigator ; - bbqs:name "Terry Jernigan" . - bid:c6be2ee8-73b8-412e-8331-4eac1f2937de a bbqs:SoftwareTool ; bbqs:description "Python package for processing and analyzing behavioral data — primarily voice and speech, also text and video — through reproducible pipelines: speech-to-text, speaker diarization and verification, speech enhancement, acoustic feature extraction, and forced alignment." ; bbqs:name "senselab" . @@ -1551,18 +1499,22 @@ bid:c96b95c1-3ba5-4da4-9683-d714b853e4d8 a bbqs:Investigator ; bid:ca41ad35-92a2-4391-95c3-0db49351b9a5 a bbqs:Job ; bbqs:external_url "https://www.internationalbrainlab.com/opportunities#community-engineer"^^xsd:anyURI ; bbqs:name "Engineer/Data Science positions at International Brain Laboratory (IBL) " ; - bbqs:part_of_org bid:117670d4-58c8-49ed-acb8-311c357126ce . - -bid:cbb1fcfa-0a1d-432d-a4bb-a325516b6594 a bbqs:Investigator ; - bbqs:consortium_role "Research Staff (Scientist and others)" ; - bbqs:name "Tanya St. John" . + bbqs:part_of_org bid:117670d4-58c8-49ed-acb8-311c357126ce ; + bbqs:posted_by bid:5f8ac3c4-a0fb-44d6-ae2d-b505816d4141 . bid:ce24eb59-9276-4e28-9d93-342515a4e970 a bbqs:Device ; + bbqs:aliases "Eye tracking (Tobii / Pupil)", + "Tobii Pro", + "eye tracking tobii pupil", + "tobii pro" ; bbqs:device_category bid:7d968a4f-f412-431e-a9d9-6ec963cb8677 ; bbqs:external_url "https://www.tobii.com/products/eye-trackers"^^xsd:anyURI ; bbqs:manufacturer bid:79786801-1f05-4281-b4c3-9180854ee278 ; bbqs:model_name "Tobii Pro" ; - bbqs:name "Tobii Pro" . + bbqs:name "Tobii Pro" ; + bbqs:output_signals "Gaze", + "Pupil diameter" ; + bbqs:product_url "https://www.tobii.com/products/eye-trackers"^^xsd:anyURI . bid:d07c77d3-110d-43dd-bfe3-51535e38ae71 a bbqs:SoftwareTool ; bbqs:description "Open source GPU-accelerated scientific plotting library built on next-gen wgpu & pygfx technologies. Enables fast and interactive visualization of large-scale high-dimensional & multi-modal neural data, integrating into every step of the analysis pipeline — from real-time data acquisition, calcium imaging, multi-electrode electrophysiology recordings, and behavior analysis. Supports human-in-the-loop analysis systems for data processing and model exploration." ; @@ -1578,7 +1530,8 @@ bid:d17a5c60-e529-48ed-b4af-11976e4eb3fb a bbqs:ResearchOrganization ; bbqs:name "DARTMOUTH COLLEGE" . bid:d2821755-977a-46a2-a089-169f6e66aeea a bbqs:ResearchOrganization ; - bbqs:members bid:7a2ad901-f50d-40bc-a404-b4ef0c33944b ; + bbqs:members bid:7a2ad901-f50d-40bc-a404-b4ef0c33944b, + bid:c520d01a-3746-4f7d-baff-ad1dab70e1b3 ; bbqs:name "UNIVERSITY OF CALIFORNIA, SAN DIEGO" . bid:d303b6df-88e0-4e0d-88f6-46b3d45c1ea4 a bbqs:Investigator ; @@ -1596,6 +1549,7 @@ bid:d3423658-1147-421f-a6f8-f31067133351 a bbqs:FundingOpportunity ; bbqs:fon "RFA-DA-27-004" ; bbqs:name "BRAIN Initiative: Theories, Models and Methods for Analysis of Complex Data from the Brain (R01 Clinical Trial Not Allowed)" ; bbqs:open_date "2025-09-28"^^xsd:date ; + bbqs:part_of_org bid:32f761ce-6857-451c-9eb7-fc5b8b221449 ; bbqs:posted_date "2025-09-16"^^xsd:date ; bbqs:status "open" ; bbqs:url "https://grants.nih.gov/grants/guide/rfa-files/RFA-DA-27-004.html"^^xsd:anyURI . @@ -1608,11 +1562,16 @@ bid:d38cd5f0-0429-4fc0-a9e3-06039719e581 a bbqs:SoftwareTool ; bbqs:repo_url "https://github.com/TadasBaltrusaitis/OpenFace"^^xsd:anyURI . bid:d3a36c76-22a9-4762-8ce6-a53725475669 a bbqs:Device ; + bbqs:aliases "Neuropixels", + "neuropixels" ; bbqs:device_category bid:f328ad53-2dd2-490f-adf1-40e9cd85b5bd ; bbqs:external_url "https://www.neuropixels.org/"^^xsd:anyURI ; bbqs:manufacturer bid:9bd0353c-a176-48d7-9f2c-59375ae7819b ; bbqs:model_name "Neuropixels" ; - bbqs:name "Neuropixels" . + bbqs:name "Neuropixels" ; + bbqs:output_signals "LFP", + "Spikes" ; + bbqs:product_url "https://www.neuropixels.org/"^^xsd:anyURI . bid:d3b32f3b-0a12-4eec-b49e-b9274f934b5a a bbqs:Investigator ; bbqs:consortium_role "Co-Investigator" ; @@ -1628,15 +1587,6 @@ bid:d49fe87c-2047-4788-8247-2130a5e0d931 a bbqs:Dataset ; bid:d5a4e8e7-26ef-474d-bb33-055d3b151a83 a bbqs:ResearchOrganization ; bbqs:name "NIH Office of Behavioral and Social Sciences Research" . -bid:d8cef433-7209-4e63-bdd5-a3f52bd9dd89 a bbqs:DeviceCategory ; - bbqs:category_key "neural_imaging" ; - bbqs:description "Optical and volumetric imaging of neural activity." ; - bbqs:label "Neural Imaging" ; - bbqs:measures "BOLD", - "Fluorescence", - "bioluminescence" ; - bbqs:name "Neural Imaging" . - bid:da6f9584-5487-4fe8-a9ed-462fface8db2 a bbqs:ResearchOrganization ; bbqs:members bid:77aecb31-a637-4d08-9a35-e72ea6a46fe5 ; bbqs:name "UTAH STATE HIGHER EDUCATION SYSTEM--UNIVERSITY OF UTAH" . @@ -1657,11 +1607,15 @@ bid:dbdb11c4-5082-4c5f-b50b-0046aaa0f8d9 a bbqs:ResearchOrganization ; bbqs:name "ICAHN SCHOOL OF MEDICINE AT MOUNT SINAI" . bid:dda87113-f453-47bd-8c34-14855db21e4a a bbqs:Device ; + bbqs:aliases "OptiTrack", + "optitrack" ; bbqs:device_category bid:dac56889-e81e-478e-827d-7f08bb15efd3 ; bbqs:external_url "https://optitrack.com/"^^xsd:anyURI ; bbqs:manufacturer bid:560d0a58-2a10-439c-b397-4eecb30a2388 ; bbqs:model_name "OptiTrack" ; - bbqs:name "OptiTrack" . + bbqs:name "OptiTrack" ; + bbqs:output_signals "3D marker positions" ; + bbqs:product_url "https://optitrack.com/"^^xsd:anyURI . bid:ddf3df70-64df-4112-822c-1ebf2bb895e0 a bbqs:Investigator ; bbqs:consortium_role "Field site director, collaborator" ; @@ -1681,16 +1635,10 @@ bid:de5929a1-5c9a-4f4f-8d0f-4cc0d040160f a bbqs:Investigator ; bid:f340cdf9-cdfc-43f4-b18b-4d9fbebac604 ; bbqs:name "stephen heisig" . -bid:e0042c46-59de-40f6-b53d-8e565cc27a45 a bbqs:FundingOpportunity ; - bbqs:activity_code "RM1" ; - bbqs:description "Solicits teams of 3-6 PDs/PIs to understand how the nervous system gives rise to mental experience and behavior, integrating circuit, in vivo recordings, and behavioral analyses." ; - bbqs:expiration_date "2027-06-16"^^xsd:date ; - bbqs:external_url "https://simpler.grants.gov/opportunity/ffe98704-96a8-4f41-a32b-49edd0409006"^^xsd:anyURI ; - bbqs:fon "RFA-NS-26-011" ; - bbqs:name "BRAIN Initiative: Integrative Team-Research BRAIN Circuits Program - iTeamBCP (RM1) [forecast — superseded by RFA-NS-27-002]" ; - bbqs:posted_date "2025-08-28"^^xsd:date ; - bbqs:status "closed" ; - bbqs:url "https://simpler.grants.gov/opportunity/ffe98704-96a8-4f41-a32b-49edd0409006"^^xsd:anyURI . +bid:dfbfe6e3-bfae-4813-af08-0ded1cc2a3e9 a bbqs:ResearchOrganization ; + bbqs:members bid:85a49b85-44ff-4f85-a110-c3860bfe6747, + bid:cbb1fcfa-0a1d-432d-a4bb-a325516b6594 ; + bbqs:name "University of Washington" . bid:e055175b-7bfb-471e-8e80-d8697b484b9d a bbqs:Investigator ; bbqs:consortium_role "Postdoc/Grad Student" ; @@ -1699,20 +1647,6 @@ bid:e055175b-7bfb-471e-8e80-d8697b484b9d a bbqs:Investigator ; bid:e1424ffb-1cc6-4d9a-932e-464c967a68f9 a bbqs:Investigator ; bbqs:name "Jeffrey Walker" . -bid:e25c35c9-96b7-4410-bd9f-cfc0382fded2 a bbqs:Dataset ; - bbqs:description "Created by IDP to hold this researcher’s uploaded data." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000621"^^xsd:anyURI ; - bbqs:name "Four-choice reversal digging task (IDP)" . - -bid:e2c21bfc-1707-4f6d-aa18-c6db03f53c2d a bbqs:DeviceCategory ; - bbqs:category_key "imu" ; - bbqs:description "Inertial measurement units, accelerometers, and gyroscopes." ; - bbqs:label "IMU / Accelerometry" ; - bbqs:measures "Acceleration", - "angular velocity", - "orientation" ; - bbqs:name "IMU / Accelerometry" . - bid:e46a4832-3f63-49d7-acad-8567ed641589 a bbqs:ResearchOrganization ; bbqs:members bid:0a076358-2298-4693-b3cf-d75114552163, bid:9a233497-f3cd-4888-b5b6-a83630e5f1ee, @@ -1725,6 +1659,7 @@ bid:e5044d9f-fe07-4a69-a9c3-7aecc245b941 a bbqs:ResearchOrganization ; bid:0f0ad5c2-496b-42a8-91b7-b798742bcdc3, bid:0fd7e9bf-a1c2-48ba-b235-75cee07f2fc2, bid:1b1f912c-a054-4bd1-a6b8-748f902e53f4, + bid:1cfe15ec-b6a7-4534-b69d-79bb63b341b6, bid:27d7f30b-e152-4999-a63e-8dd4e800f3bc, bid:5835b3d1-bdaf-4f30-a9e7-cf70d1861b61, bid:67f260ea-2946-4086-9111-c926fb4e6df7, @@ -1733,18 +1668,15 @@ bid:e5044d9f-fe07-4a69-a9c3-7aecc245b941 a bbqs:ResearchOrganization ; bid:864e9b52-4173-4b92-bd81-d0bc6a7fc3cb, bid:924e4ef8-ee41-480e-9d33-9807b471878d, bid:a72c6169-713d-49ef-b9c2-4d9d05247473, + bid:aa69dcd5-bd16-40ef-909e-3f2985d66c65, bid:ace580b9-6f04-457f-aac0-3ac3a7243e3b, bid:b1b421fc-5477-4c2f-8968-ab757344ab2d, bid:def6d629-21cc-431c-8cab-0327f97ee138, bid:e8c0da8f-2dbb-442f-9831-4271dda9dda9, + bid:ea2dc7bf-af90-460d-9823-45e9407b6bb8, bid:f6fd8ef2-e06f-4f72-bfc9-4464947fc0b9 ; bbqs:name "YALE UNIVERSITY" . -bid:e5d71308-2123-4732-952c-e3e1bfb32108 a bbqs:Dataset ; - bbqs:description "test" ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000533"^^xsd:anyURI ; - bbqs:name "arc-idp-test" . - bid:e611ba01-166e-44ed-8005-979e29dee9ed a bbqs:SoftwareTool ; bbqs:description "Multi-source data streaming and temporal synchronization" ; bbqs:external_url "https://labstreaminglayer.org/"^^xsd:anyURI ; @@ -1752,11 +1684,6 @@ bid:e611ba01-166e-44ed-8005-979e29dee9ed a bbqs:SoftwareTool ; bbqs:name "LabStreamingLayer" ; bbqs:repo_url "https://labstreaminglayer.org/"^^xsd:anyURI . -bid:e631bc65-b164-4090-b442-3dacddd2707a a bbqs:Investigator ; - bbqs:consortium_role "Co-Investigator" ; - bbqs:name "Gaurav Patel" ; - bbqs:orcid . - bid:e6bf3fa7-714c-43a8-9676-3cef1b1da171 a bbqs:SoftwareTool ; bbqs:description "Automated behavior classification from video features" ; bbqs:external_url "https://jaaba.sourceforge.net/"^^xsd:anyURI ; @@ -1785,13 +1712,10 @@ bid:ea29a939-e638-4a3c-8d28-1edda890490a a bbqs:Investigator ; bbqs:name "Mauricio Vallejo Martelo" ; bbqs:orcid . -bid:ea2dc7bf-af90-460d-9823-45e9407b6bb8 a bbqs:Investigator ; - bbqs:consortium_role "Co-Investigator" ; - bbqs:name "David Ostry" . - bid:eac8b2aa-4353-4d9a-af21-601294a8ef4a a bbqs:Event ; bbqs:description "Annual BBQS consortium workshop, MIT, Cambridge MA" ; - bbqs:name "BBQS MIT Workshop 2026" . + bbqs:name "BBQS MIT Workshop 2026" ; + bbqs:part_of_org bid:766331fd-daea-4a31-86c4-589737e533ea . bid:ec41db91-9533-4a3c-8956-8ae3d9030c8c a bbqs:ResearchOrganization ; bbqs:name "National Institute on Alcohol Abuse and Alcoholism" . @@ -1804,18 +1728,10 @@ bid:ec6cb02d-5d60-4e1b-bfa8-e7ce7f857f90 a bbqs:Investigator ; "Philosophy" ; bbqs:skills "ELSI" . -bid:eef427e0-8f77-423f-9c21-db3e1eef5b74 a bbqs:Dataset ; - bbqs:description "Created by the IDP-ARC platform to hold this researcher’s uploaded data." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000550"^^xsd:anyURI ; - bbqs:name "IDP-ARC — Four-choice reversal digging task" . - bid:ef820011-b44d-40f5-a4ab-2069fa9805df a bbqs:ResearchOrganization ; bbqs:members bid:c11ff83b-6ac9-4ebe-992b-f37c931e182b ; bbqs:name "NORTHWESTERN UNIVERSITY AT CHICAGO" . -bid:eff6d625-81ad-4a38-9f8e-93a2ae06c7af a bbqs:Investigator ; - bbqs:name "Nicole Tregoning" . - bid:f088160e-1dea-4cb9-b73f-1c30d0e40053 a bbqs:Investigator ; bbqs:consortium_role "Research Staff (Scientist and others)" ; bbqs:member_of_group bid:47cf050c-ab07-42fa-b251-d1fecc7ceb40, @@ -1833,7 +1749,8 @@ bid:f1ff44d0-aff1-4a53-91e6-7a6b64aa0af0 a bbqs:Investigator ; bid:f28a2f16-5259-4e2f-9c8e-a5d11d2b5c5f a bbqs:ResearchOrganization ; bbqs:members bid:1b3e8304-f2d6-4ed6-aa5c-7d49ca278344, - bid:32937527-a5e9-4a99-84c0-719435f25f8b ; + bid:32937527-a5e9-4a99-84c0-719435f25f8b, + bid:aa9445fe-736e-4a1e-b8a4-4b709c4a6603 ; bbqs:name "CHILDREN'S HOSP OF PHILADELPHIA" . bid:f55eaf7c-d38c-46a6-a6ce-1d78c826ff59 a bbqs:DeviceCategory ; @@ -1842,45 +1759,44 @@ bid:f55eaf7c-d38c-46a6-a6ce-1d78c826ff59 a bbqs:DeviceCategory ; bbqs:label "Depth / 3D Camera" ; bbqs:measures "3D point cloud", "Depth map" ; - bbqs:name "Depth / 3D Camera" . + bbqs:name "Depth / 3D Camera" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "3D pose estimation", + "Gait and posture" . bid:f5c11310-96a7-43c3-9d34-dc134237ed45 a bbqs:DeviceCategory ; bbqs:category_key "infrared_camera" ; bbqs:description "Near-infrared / IR cameras for low-light and night-time behavioural recording." ; bbqs:label "Infrared Camera" ; bbqs:measures "IR video" ; - bbqs:name "Infrared Camera" . + bbqs:name "Infrared Camera" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Dark-phase rodent recording", + "Night-time field observation" . bid:f77c0d96-5deb-4d90-bc8e-7acb14863595 a bbqs:Device ; + bbqs:aliases "SCQ", + "scq" ; bbqs:device_category bid:829b9463-611f-45d6-bd24-262a5410c325 ; bbqs:manufacturer bid:a7b15b50-1f35-4e02-91d5-c28593457e3d ; bbqs:model_name "SCQ" ; bbqs:name "SCQ" . -bid:f85d4385-1c70-4282-a6f2-0bd7f3c91df9 a bbqs:Dataset ; - bbqs:description "Created by IDP to hold this researcher’s uploaded data." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000626"^^xsd:anyURI ; - bbqs:name "Four-choice reversal digging task (IDP)" . - bid:f8ca9029-6e50-43a2-802d-e61784795036 a bbqs:Device ; + bbqs:aliases "NeuroPace RNS", + "NeuroPace RNS (intracranial)", + "neuropace rns", + "neuropace rns intracranial", + "neuropace rns system" ; bbqs:device_category bid:e9d52180-5701-46ba-b5dc-7fc6fa32233b ; bbqs:external_url "https://www.neuropace.com/"^^xsd:anyURI ; bbqs:manufacturer bid:bc8054b3-253f-4b13-a281-841deb7598e8 ; bbqs:model_name "NeuroPace RNS System" ; - bbqs:name "NeuroPace RNS System" . - -bid:f9cc96dd-52b0-41bc-b687-47a1e4df3e2c a bbqs:Investigator ; - bbqs:name "Dorota Jarecka" . - -bid:f9d3a756-c9ad-4abb-89ae-c55756d4e662 a bbqs:Dataset ; - bbqs:description "task aggregate one " ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000542"^^xsd:anyURI ; - bbqs:name "aggregate-task-one" . - -bid:fae4c50f-849c-4ec8-91d6-15da5747305e a bbqs:Dataset ; - bbqs:description "Created by IDP to hold this researcher’s uploaded data." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000623"^^xsd:anyURI ; - bbqs:name "Four-choice reversal digging task (IDP)" . + bbqs:name "NeuroPace RNS System" ; + bbqs:output_signals "Stimulation events", + "iEEG" ; + bbqs:product_url "https://www.neuropace.com/"^^xsd:anyURI ; + bbqs:regulatory_class "FDA-approved (PMA)" . bid:fb3cf5ef-e850-44d2-887c-0d0ef608f48c a bbqs:ResearchOrganization ; bbqs:members bid:16d82048-d1f5-4b80-a6e0-2baf5c1bed4f, @@ -1890,16 +1806,17 @@ bid:fb3cf5ef-e850-44d2-887c-0d0ef608f48c a bbqs:ResearchOrganization ; bbqs:name "CARNEGIE-MELLON UNIVERSITY" . bid:fbbd19db-7e98-42cd-a230-510ddff40cef a bbqs:Device ; + bbqs:aliases "FLIR", + "flir", + "flir teledyne cameras" ; bbqs:device_category bid:0e76fcd9-9746-4456-a344-50f817379dcf ; bbqs:external_url "https://www.flir.com/"^^xsd:anyURI ; bbqs:manufacturer bid:d68a81db-70f9-4ea5-95af-3f1f83a46771 ; bbqs:model_name "FLIR / Teledyne cameras" ; - bbqs:name "FLIR / Teledyne cameras" . - -bid:fc39570e-25ee-4d25-8606-1da0f0a03d43 a bbqs:Dataset ; - bbqs:description "Created by IDP to hold this researcher’s uploaded data." ; - bbqs:external_url "https://dandi.emberarchive.org/dandiset/000559"^^xsd:anyURI ; - bbqs:name "Four-choice reversal digging task (IDP)" . + bbqs:name "FLIR / Teledyne cameras" ; + bbqs:output_signals "RGB video", + "Thermal video" ; + bbqs:product_url "https://www.flir.com/"^^xsd:anyURI . bid:ffac8b9d-1a4c-4b02-ad6d-3cd1fd2d4980 a bbqs:Investigator ; bbqs:consortium_role "Research Staff (Scientist and others)" ; @@ -2136,7 +2053,7 @@ bid:ffac8b9d-1a4c-4b02-ad6d-3cd1fd2d4980 a bbqs:Investigator ; a bbqs:ProjectRole ; bbqs:held_by bid:f3f570c9-991c-4a67-a40a-5f0903f91762 ; bbqs:on_project bid:4a00b65d-6b1b-4385-86c7-9f72c2724152 ; - bbqs:project_role "research_staff" ; + bbqs:project_role "collaborator" ; bbqs:role_source "curator" . a bbqs:ProjectRole ; @@ -2672,6 +2589,9 @@ bid:ffac8b9d-1a4c-4b02-ad6d-3cd1fd2d4980 a bbqs:Investigator ; bbqs:project_role "contact_pi" ; bbqs:role_source "curator" . +bid:00b6e913-54e0-4cb5-bfdb-7c4123de51d6 a bbqs:ResearchOrganization ; + bbqs:name "Society for Neuroscience" . + bid:026f060a-5264-4ed0-89e7-d2cd2c436b38 a bbqs:Investigator ; bbqs:consortium_role "Principal Investigator (PI)" ; bbqs:name "Shannon Gourley" ; @@ -2738,7 +2658,10 @@ bid:0e76fcd9-9746-4456-a344-50f817379dcf a bbqs:DeviceCategory ; bbqs:label "Thermal Camera" ; bbqs:measures "Surface temperature", "thermal video" ; - bbqs:name "Thermal Camera" . + bbqs:name "Thermal Camera" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Stress and arousal proxies", + "Thermoregulation" . bid:0efd86da-44c1-4222-9b30-72000b833267 a bbqs:Publication ; bbqs:doi "10.21203/rs.3.rs-9728773/v1"^^xsd:anyURI ; @@ -2749,6 +2672,10 @@ bid:0efd86da-44c1-4222-9b30-72000b833267 a bbqs:Publication ; bbqs:title "Investigating the Dynamic Relationship Between Anxiety and Spatial Memory Using Autonomous Ecological Momentary Assessment." ; bbqs:year 2026 . +bid:0f65886e-44cb-4a8b-88a2-ecb214b0ea99 a bbqs:Investigator ; + bbqs:consortium_role "Research Staff (Scientist and others)" ; + bbqs:name "Yangjia Li" . + bid:0f782852-6d9e-4d3b-8c38-6e0573400461 a bbqs:DeviceManufacturer ; bbqs:external_url "https://www.empatica.com/embraceplus/"^^xsd:anyURI ; bbqs:homepage_url "https://www.empatica.com/embraceplus/"^^xsd:anyURI ; @@ -2761,7 +2688,10 @@ bid:0fad9963-1681-478c-881e-348e2736fafe a bbqs:DeviceCategory ; bbqs:measures "Trial events", "latencies", "responses" ; - bbqs:name "Behavioral Apparatus" . + bbqs:name "Behavioral Apparatus" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Open-field assays", + "Operant testing" . bid:117670d4-58c8-49ed-acb8-311c357126ce a bbqs:ResearchOrganization ; bbqs:name "INTERNATIONAL BRAIN LABORATORY" . @@ -2823,7 +2753,10 @@ bid:1933d538-1acc-4a01-8691-9ecd2989d0e2 a bbqs:DeviceCategory ; bbqs:measures "Head pose", "controller input", "scene events" ; - bbqs:name "VR / AR Environment" . + bbqs:name "VR / AR Environment" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Controlled naturalistic tasks", + "Rehabilitation environments" . bid:1962a240-a592-484c-b812-122a5dad2951 a bbqs:Investigator ; bbqs:consortium_role "Postdoc/Grad Student" ; @@ -2840,6 +2773,9 @@ bid:1a3ec6ab-3abd-4da5-b938-e9818c52b95a a bbqs:DeviceManufacturer ; bbqs:homepage_url "https://www.garmin.com/"^^xsd:anyURI ; bbqs:name "Garmin Ltd." . +bid:1a88610e-c3bc-41b8-a97e-36698d0b0c28 a bbqs:ResearchOrganization ; + bbqs:name "Simons Foundation" . + bid:1b1f912c-a054-4bd1-a6b8-748f902e53f4 a bbqs:Investigator ; bbqs:consortium_role "Postdoc/Grad Student" ; bbqs:name "Meghan Cum" ; @@ -2862,13 +2798,25 @@ bid:1c345b47-9c5c-4a88-a8e4-bd8737d97483 a bbqs:Publication ; bbqs:title "Alpha event-related decreases during encoding in adults with ADHD - An investigation of sustained attention and working memory processes." ; bbqs:year 2024 . +bid:1cfe15ec-b6a7-4534-b69d-79bb63b341b6 a bbqs:Investigator ; + bbqs:consortium_role "Postdoc/Grad Student" ; + bbqs:name "Weikang Shi" . + bid:1eda4bd4-4446-40c3-8996-7400722b1560 a bbqs:DeviceCategory ; bbqs:category_key "emg" ; bbqs:description "Surface and intramuscular electromyography systems." ; bbqs:label "EMG" ; bbqs:measures "EMG envelope", "Muscle activation" ; - bbqs:name "EMG" . + bbqs:name "EMG" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Facial and jaw muscle activity", + "Movement effort" . + +bid:1ee83670-fadd-4744-91bd-17ca61944822 a bbqs:Investigator ; + bbqs:consortium_role "Co-Investigator" ; + bbqs:name "Andrew MacAskill" ; + bbqs:orcid . bid:205009f7-ea15-4e13-9b73-292de432b467 a bbqs:Publication ; bbqs:author_orcids ; @@ -2907,11 +2855,17 @@ bid:2370e3b0-8941-46f8-99b0-a30d467e764e a bbqs:Publication ; bbqs:title "Continuous monitoring and machine vision reveals that developing gerbils exhibit structured social behaviors prior to the emergence of autonomy." ; bbqs:year 2025 . +bid:24703152-c43b-4f4f-8d73-65f3ef490ff0 a bbqs:Investigator ; + bbqs:name "Ming Zhan" . + bid:247cc4da-1133-4307-97c9-8238c723dc67 a bbqs:DeviceManufacturer ; bbqs:external_url "https://www.movella.com/products/motion-capture"^^xsd:anyURI ; bbqs:homepage_url "https://www.movella.com/products/motion-capture"^^xsd:anyURI ; bbqs:name "Movella (formerly Xsens)" . +bid:25a4f79c-6020-4074-b501-0114a205175f a bbqs:Investigator ; + bbqs:name "Thomas Heeps" . + bid:25f1bccb-0c04-4e0e-8951-ac2620fb969c a bbqs:Investigator ; bbqs:consortium_role "Research Staff (Scientist and others)" ; bbqs:member_of_group bid:4737d7d7-4bbe-4b72-b397-5f341a0dd5dd, @@ -2937,6 +2891,12 @@ bid:276aa727-0539-4f2b-9fa0-c0b86a868876 a bbqs:Publication ; bbqs:title "An Intelligent Infrastructure as a Foundation for Modern Science." ; bbqs:year 2025 . +bid:28609b98-6f97-4a46-b875-9f5084f1c7cd a bbqs:ResearchOrganization ; + bbqs:members bid:2f334517-3173-4654-987e-dc44e0e94eb2, + bid:7745a449-07ce-4762-988e-e355a72b0775, + bid:8b45a6d3-febb-4537-9786-69685e36aa6d ; + bbqs:name "National Institute of Mental Health" . + bid:2911be71-0f8a-47d5-9b0b-df9c7e75ce2f a bbqs:DeviceManufacturer ; bbqs:external_url "https://www.avisoft.com/"^^xsd:anyURI ; bbqs:homepage_url "https://www.avisoft.com/"^^xsd:anyURI ; @@ -2963,6 +2923,10 @@ bid:2a2ae141-5d5c-464a-809f-1e3a19a81293 a bbqs:Publication ; bid:2eafb009-97ac-4492-97fe-b77490371b34 a bbqs:Investigator ; bbqs:name "Nelleke van Wouwe" . +bid:2f334517-3173-4654-987e-dc44e0e94eb2 a bbqs:Investigator ; + bbqs:consortium_role "NIH Program" ; + bbqs:name "Eunyoung Kim" . + bid:2fb1cdc9-28b2-4709-adf4-c914a44e042d a bbqs:Investigator ; bbqs:consortium_role "Postdoc/Grad Student" ; bbqs:member_of_group bid:4737d7d7-4bbe-4b72-b397-5f341a0dd5dd, @@ -3054,13 +3018,20 @@ bid:31b21990-8007-45a0-86e0-d1e9e412d9a7 a bbqs:DeviceCategory ; bbqs:measures "Latitude/longitude", "altitude", "speed" ; - bbqs:name "GPS / Geolocation" . + bbqs:name "GPS / Geolocation" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Field-scale movement", + "Ranging behaviour" . bid:31c5064c-5df0-4821-9ea7-d3807308ba18 a bbqs:DeviceManufacturer ; bbqs:external_url "https://www.emotibit.com/"^^xsd:anyURI ; bbqs:homepage_url "https://www.emotibit.com/"^^xsd:anyURI ; bbqs:name "Connected Future Labs" . +bid:32f761ce-6857-451c-9eb7-fc5b8b221449 a bbqs:ResearchOrganization ; + bbqs:members bid:24703152-c43b-4f4f-8d73-65f3ef490ff0 ; + bbqs:name "National Institute on Drug Abuse" . + bid:34971c92-6e5a-4231-8d74-3759c2301d8b a bbqs:DeviceManufacturer ; bbqs:external_url "https://www.biopac.com/"^^xsd:anyURI ; bbqs:homepage_url "https://www.biopac.com/"^^xsd:anyURI ; @@ -3083,7 +3054,18 @@ bid:361a786e-7850-418a-a76a-ea21fc656775 a bbqs:DeviceCategory ; bbqs:label "Ultrasonic Microphone" ; bbqs:measures "USV spectrograms", "Ultrasonic audio" ; - bbqs:name "Ultrasonic Microphone" . + bbqs:name "Ultrasonic Microphone" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Bat and insect acoustics", + "Rodent USV recording" . + +bid:36ba050d-e4f4-470c-a780-eddef3b4bab8 a bbqs:Investigator ; + bbqs:name "Farah Bader" . + +bid:37453416-6149-4fee-b9b9-a427b800ffe7 a bbqs:Investigator ; + bbqs:consortium_role "Admin" ; + bbqs:name "Meaghan Perdue" ; + bbqs:orcid . bid:3846417f-c783-484b-9cfc-fbbf8f83fdf5 a bbqs:Project ; bbqs:abstract """Abstract @@ -3116,8 +3098,11 @@ complex collective behaviors in a large-brained highly social animal model.""" ; bbqs:reporter_project_num "5R34DA059514-02" ; bbqs:studies_human false ; bbqs:studies_species bid:ec95cd91-709c-41ac-8bfb-bfdf3e2ea89c ; - bbqs:studies_species_name "Ovis aries" ; - bbqs:title "Towards High-Resolution Neuro-Behavioral Quantification of Sheep in the Field to Study Complex Social Behaviors" . + bbqs:title "Towards High-Resolution Neuro-Behavioral Quantification of Sheep in the Field to Study Complex Social Behaviors" ; + bbqs:uses_device_category bid:851882bb-3321-45ed-af75-6ae08836c1fc, + bid:dac56889-e81e-478e-827d-7f08bb15efd3, + bid:e2c21bfc-1707-4f6d-aa18-c6db03f53c2d, + bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 . bid:38fab5c5-6eb6-4ba1-980a-78e5c2bf2312 a bbqs:Publication ; bbqs:author_orcids , @@ -3156,11 +3141,22 @@ bid:3afc2f32-f84c-4ca1-9fee-139597851004 a bbqs:Investigator ; bbqs:name "Emily Kuschner" ; bbqs:orcid . +bid:3cc135af-1424-4cc9-b54b-978d039ad6d1 a bbqs:Investigator ; + bbqs:consortium_role "NIH Program" ; + bbqs:name "Kari Johnson" . + bid:3eaf894a-5a66-47be-b36f-ce28d5cd1e9c a bbqs:DeviceManufacturer ; bbqs:external_url "https://www.baslerweb.com/"^^xsd:anyURI ; bbqs:homepage_url "https://www.baslerweb.com/"^^xsd:anyURI ; bbqs:name "Basler AG" . +bid:4009a1f6-c173-495b-9725-bb51571a3cdf a bbqs:SoftwareTool ; + bbqs:description "Markerless pose estimation of user-defined body parts across species" ; + bbqs:external_url "https://deeplabcut.github.io/DeepLabCut/"^^xsd:anyURI ; + bbqs:language "Python" ; + bbqs:name "DeepLabCut" ; + bbqs:repo_url "https://deeplabcut.github.io/DeepLabCut/"^^xsd:anyURI . + bid:40a825b2-31fc-4ffe-b686-9b09a1576b33 a bbqs:Investigator ; bbqs:consortium_role "Research Staff (Scientist and others)" ; bbqs:member_of_group bid:4737d7d7-4bbe-4b72-b397-5f341a0dd5dd, @@ -3212,6 +3208,14 @@ bid:436525a6-acbf-4066-ac75-82845a8db8cc a bbqs:Species ; bbqs:name "Fruit Fly" ; bbqs:taxonomy_class "Insecta" . +bid:4412f5e5-aba7-49fb-876c-618f59f9b226 a bbqs:Investigator ; + bbqs:name "Merav Sabri" . + +bid:44376171-f0d7-4e91-9c91-6558f6253fe3 a bbqs:Dataset ; + bbqs:description "An Aggregate Dandiset for Four-choice reversal digging task in MAABCD" ; + bbqs:external_url "https://dandi.emberarchive.org/dandiset/000607"^^xsd:anyURI ; + bbqs:name "Four-choice reversal digging task" . + bid:44b1ac85-feb2-4792-9f46-109cf7876f4a a bbqs:Publication ; bbqs:doi "10.1523/JNEUROSCI.1351-25.2025"^^xsd:anyURI ; bbqs:external_url "https://pubmed.ncbi.nlm.nih.gov/41224663/"^^xsd:anyURI ; @@ -3240,7 +3244,10 @@ bid:46ca9982-9f32-4d56-84fc-95df94a69e7d a bbqs:DeviceCategory ; bbqs:measures "ECoG", "LFP", "single-unit spikes" ; - bbqs:name "Intracranial EEG" . + bbqs:name "Intracranial EEG" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Epilepsy monitoring", + "Naturalistic human neurophysiology" . bid:491ac537-b3f6-45b9-93f3-1249fd809ebc a bbqs:Species ; bbqs:aliases "Cebus imitator", @@ -3250,6 +3257,11 @@ bid:491ac537-b3f6-45b9-93f3-1249fd809ebc a bbqs:Species ; bbqs:name "White-faced Capuchin" ; bbqs:taxonomy_class "Mammalia" . +bid:4921bfdf-7432-48ac-911d-0cb825184ef1 a bbqs:Benchmark ; + bbqs:description "Vocal Call Locator benchmark: 767,295 rodent sounds with ground-truth sources across 9 datasets, for sound source localization from multi-channel audio" ; + bbqs:external_url "https://vclbenchmark.flatironinstitute.org"^^xsd:anyURI ; + bbqs:name "VCL Benchmark" . + bid:4b31df5d-6d5c-49d5-9abd-ecc1cbafe965 a bbqs:Publication ; bbqs:doi "10.1002/adfm.202500696"^^xsd:anyURI ; bbqs:external_url "https://pubmed.ncbi.nlm.nih.gov/41536438/"^^xsd:anyURI ; @@ -3363,6 +3375,11 @@ bid:5835b3d1-bdaf-4f30-a9e7-cf70d1861b61 a bbqs:Investigator ; bbqs:member_of_group bid:47cf050c-ab07-42fa-b251-d1fecc7ceb40 ; bbqs:name "Brian Gitahi" . +bid:5899fd56-4c11-41a1-8b0a-4e1785820391 a bbqs:Investigator ; + bbqs:consortium_role "NIH Program" ; + bbqs:name "Joseph Monaco" ; + bbqs:orcid . + bid:58b76015-dbdd-401e-92e7-4dc15e6183d9 a bbqs:Publication ; bbqs:doi "10.1126/science.ads7926"^^xsd:anyURI ; bbqs:external_url "https://pubmed.ncbi.nlm.nih.gov/40906837/"^^xsd:anyURI ; @@ -3447,7 +3464,10 @@ bid:60288cb2-b6fa-41ab-9312-3209dd2cd804 a bbqs:DeviceCategory ; bbqs:measures "Individual ID", "antenna crossings", "timestamps" ; - bbqs:name "RFID / PIT Tags" . + bbqs:name "RFID / PIT Tags" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Automated visit logging", + "Individual identification" . bid:608bd920-0a69-4a7a-a0fe-0740195f0c64 a bbqs:Investigator ; bbqs:name "Parastoo Azizeddin" . @@ -3465,8 +3485,9 @@ bid:623a564c-f5bf-4d95-a233-027850148145 a bbqs:Investigator ; bbqs:consortium_role "Postdoc/Grad Student" ; bbqs:name "Caleb Scott-Joseph" . -bid:62826284-8258-4f21-af3e-64fc755ef2b2 a bbqs:ResearchOrganization ; - bbqs:name "National Science Foundation" . +bid:639e73b5-6a6d-46f1-82a8-b466d7e3bdbb a bbqs:Investigator ; + bbqs:consortium_role "Postdoc/Grad Student" ; + bbqs:name "Olha Metenko" . bid:68f78b1a-9b88-447f-9b1b-e68ac7affd42 a bbqs:Publication ; bbqs:author_orcids , @@ -3535,6 +3556,9 @@ bid:6e93a7ef-b7d8-45c7-891f-0b42a690f4ed a bbqs:Publication ; bbqs:title "Effects of context on the neural correlates of attention in a college classroom." ; bbqs:year 2021 . +bid:70205506-97d5-4503-bc59-e9a25934e699 a bbqs:Investigator ; + bbqs:name "Varun Thvar" . + bid:71d734ad-e355-473d-aaf7-577be85186d5 a bbqs:Investigator ; bbqs:consortium_role "NIH program staff" ; bbqs:name "Christina Hatch" . @@ -3572,6 +3596,10 @@ bid:765fd145-afc8-4101-92d5-33aff8c04fac a bbqs:DeviceManufacturer ; bbqs:homepage_url "https://www.med-associates.com/"^^xsd:anyURI ; bbqs:name "Med Associates Inc." . +bid:7745a449-07ce-4762-988e-e355a72b0775 a bbqs:Investigator ; + bbqs:consortium_role "NIH Program" ; + bbqs:name "Arina Knowlton" . + bid:77f3b242-4db9-4080-843c-d868a6d4f465 a bbqs:Species ; bbqs:aliases "Molothrus ater", "brown-headed cowbird", @@ -3585,6 +3613,11 @@ bid:79786801-1f05-4281-b4c3-9180854ee278 a bbqs:DeviceManufacturer ; bbqs:homepage_url "https://www.tobii.com/products/eye-trackers"^^xsd:anyURI ; bbqs:name "Tobii AB" . +bid:79c7ff27-6bd7-4b92-b22c-9f4f80a507ab a bbqs:Investigator ; + bbqs:consortium_role "NIH Program" ; + bbqs:description "NIH Program staff – BBQS consortium" ; + bbqs:name "Crystal Lantz" . + bid:7b2f0bde-f010-4315-b856-c217e8ca7788 a bbqs:Species ; bbqs:aliases "Cichlidae", "cichlid fish", @@ -3649,7 +3682,10 @@ bid:7e99c7ca-9c1d-4de5-b6b5-a6c96c5341af a bbqs:DeviceCategory ; bbqs:measures "VCO2", "VO2", "energy expenditure" ; - bbqs:name "Metabolic Measurement" . + bbqs:name "Metabolic Measurement" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Exercise physiology", + "Field metabolic cost" . bid:7fd65aca-ff11-4642-ab3d-17489049db10 a bbqs:Publication ; bbqs:doi "10.52202/085713-1792"^^xsd:anyURI ; @@ -3696,8 +3732,13 @@ freely moving human behavior in naturalistic and ecologically valid environments bbqs:reporter_project_num "7R61MH135106-03" ; bbqs:studies_human true ; bbqs:studies_species bid:63464d21-4ef2-4405-a192-4b60e344ff40 ; - bbqs:studies_species_name "Humans" ; - bbqs:title "Synchronized neuronal and peripheral biomarker recordings in freely moving humans" . + bbqs:title "Synchronized neuronal and peripheral biomarker recordings in freely moving humans" ; + bbqs:uses_device_category bid:006caa68-8b24-474f-867f-82a6199a84b1, + bid:851882bb-3321-45ed-af75-6ae08836c1fc, + bid:dac56889-e81e-478e-827d-7f08bb15efd3, + bid:e2c21bfc-1707-4f6d-aa18-c6db03f53c2d, + bid:f328ad53-2dd2-490f-adf1-40e9cd85b5bd, + bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 . bid:820bf47c-7868-47f1-a5a7-b4a900ee16de a bbqs:Publication ; bbqs:doi "10.1126/sciadv.aed3610"^^xsd:anyURI ; @@ -3726,6 +3767,14 @@ bid:850426b4-fca0-4cfc-a528-60b11208e652 a bbqs:Investigator ; bbqs:name "Marcia Patchan" ; bbqs:orcid . +bid:85a49b85-44ff-4f85-a110-c3860bfe6747 a bbqs:Investigator ; + bbqs:consortium_role "Co-Investigator" ; + bbqs:name "Annette Estes" ; + bbqs:orcid . + +bid:87b79b22-888b-40ac-bee6-32a62f07645f a bbqs:Investigator ; + bbqs:name "Yunsoo Kim" . + bid:88203e28-70c5-4730-af2d-93d7f09b4250 a bbqs:Investigator ; bbqs:consortium_role "Postdoc/Grad Student" ; bbqs:member_of_group bid:47cf050c-ab07-42fa-b251-d1fecc7ceb40 ; @@ -3737,6 +3786,10 @@ bid:88203e28-70c5-4730-af2d-93d7f09b4250 a bbqs:Investigator ; "dynamical systems", "python" . +bid:8b45a6d3-febb-4537-9786-69685e36aa6d a bbqs:Investigator ; + bbqs:consortium_role "NIH program staff" ; + bbqs:name "Lizzy Ankudowich" . + bid:8b505d92-14d0-43cd-9cb3-62ae42e26744 a bbqs:Publication ; bbqs:doi "10.3389/fpsyg.2025.1711782"^^xsd:anyURI ; bbqs:external_url "https://pubmed.ncbi.nlm.nih.gov/41657836/"^^xsd:anyURI ; @@ -3855,6 +3908,9 @@ bid:95b1db49-e4dd-4bab-9bb1-21400d850386 a bbqs:Dataset ; bbqs:external_url "https://dandi.emberarchive.org/dandiset/000527"^^xsd:anyURI ; bbqs:name "Encoding Helper Demos" . +bid:977712f0-0daf-4238-a693-42c96f0874a2 a bbqs:Investigator ; + bbqs:name "Ugne Klibaite" . + bid:987e3cf1-5d05-4e16-8849-4b5899ac84dc a bbqs:Publication ; bbqs:doi "10.1016/j.neuropsychologia.2024.108842"^^xsd:anyURI ; bbqs:external_url "https://pubmed.ncbi.nlm.nih.gov/38428520/"^^xsd:anyURI ; @@ -3904,6 +3960,19 @@ bid:9e769c4e-0958-4ccc-bb96-d714734fa461 a bbqs:DeviceManufacturer ; bbqs:homepage_url "https://mbraintrain.com/"^^xsd:anyURI ; bbqs:name "mBrainTrain" . +bid:9eb4af78-4485-4c7b-9179-76d079bde109 a bbqs:Investigator ; + bbqs:consortium_role "NIH program staff" ; + bbqs:name "Ashlee Van't Veer" . + +bid:9f75488b-59d0-4d50-b7db-869f26066743 a bbqs:ResearchOrganization ; + bbqs:members bid:00618660-a724-4059-85c1-c6ca3ccc1744, + bid:0f65886e-44cb-4a8b-88a2-ecb214b0ea99, + bid:3d7564b9-e839-4737-874a-2e3b5319e11a, + bid:5bb15430-32e5-457f-b6ce-e4f3790687fa, + bid:e631bc65-b164-4090-b442-3dacddd2707a, + bid:ee077b61-eb2c-4cd9-b587-a46418c45265 ; + bbqs:name "COLUMBIA UNIVERSITY HEALTH SCIENCES" . + bid:9fd2cbaa-449d-4c9d-bcbb-b627f245cbf3 a bbqs:Investigator ; bbqs:consortium_role "Postdoc/Grad Student" ; bbqs:member_of_group bid:f340cdf9-cdfc-43f4-b18b-4d9fbebac604 ; @@ -3951,6 +4020,12 @@ bid:a79d14cd-ae0e-4bce-b09f-8d16e6e15f7f a bbqs:Publication ; bbqs:title "Vocal Call Locator Benchmark (VCL) for localizing rodent vocalizations from multi-channel audio." ; bbqs:year 2024 . +bid:aa69dcd5-bd16-40ef-909e-3f2985d66c65 a bbqs:Investigator ; + bbqs:name "Deepa Purushothaman" . + +bid:aa9445fe-736e-4a1e-b8a4-4b709c4a6603 a bbqs:Investigator ; + bbqs:name "Luke Bloy" . + bid:ab859681-c7fc-40cf-8d61-51035f1d8605 a bbqs:DeviceManufacturer ; bbqs:external_url "https://www.medtronic.com/"^^xsd:anyURI ; bbqs:homepage_url "https://www.medtronic.com/"^^xsd:anyURI ; @@ -3962,7 +4037,10 @@ bid:ac703a69-84bb-4157-b5c9-6d3f4e4d2c49 a bbqs:DeviceCategory ; bbqs:label "Electrodermal Activity" ; bbqs:measures "Skin conductance level", "phasic responses" ; - bbqs:name "Electrodermal Activity" . + bbqs:name "Electrodermal Activity" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Affective state", + "Sympathetic arousal" . bid:af52d4d6-a0e2-4a87-b747-6ede8ebf212f a bbqs:Investigator ; bbqs:consortium_role "Research Staff (Scientist and others)" ; @@ -3980,6 +4058,11 @@ bid:b2c565ea-4b4a-4586-9543-e61df6570936 a bbqs:Investigator ; bbqs:member_of_group bid:f340cdf9-cdfc-43f4-b18b-4d9fbebac604 ; bbqs:name "Lauren Diaz" . +bid:b723b975-9438-4c08-b9b9-404846e31272 a bbqs:Investigator ; + bbqs:consortium_role "NIH Program" ; + bbqs:name "Karen David" ; + bbqs:orcid . + bid:b75b460e-560d-48d4-af7d-1152d34c1d79 a bbqs:Publication ; bbqs:doi "10.1101/2023.03.11.532197"^^xsd:anyURI ; bbqs:external_url "https://pubmed.ncbi.nlm.nih.gov/39282260/"^^xsd:anyURI ; @@ -4077,6 +4160,9 @@ bid:c3f26370-becc-4d39-af05-abeb0433bee9 a bbqs:Publication ; bbqs:title "Printed Wearable Sweat Rate Sensor for Continuous in-situ Perspiration Measurement." ; bbqs:year 2025 . +bid:c520d01a-3746-4f7d-baff-ad1dab70e1b3 a bbqs:Investigator ; + bbqs:name "Terry Jernigan" . + bid:c7423364-c703-42a4-bde0-cdad1bc6f896 a bbqs:Publication ; bbqs:doi "10.1109/sensors60989.2024.10784525"^^xsd:anyURI ; bbqs:external_url "https://pubmed.ncbi.nlm.nih.gov/41048822/"^^xsd:anyURI ; @@ -4148,8 +4234,15 @@ general principles of behavioral control, particularly via distributed computati bbqs:reporter_project_num "5R34DA061984-02" ; bbqs:studies_human false ; bbqs:studies_species bid:d6fbdcc7-30d7-48ba-9c46-b70e227c59cf ; - bbqs:studies_species_name "Hofstenia miamia" ; - bbqs:title "Quantifying organism-environment interactions in a new model system for neuroscience" . + bbqs:title "Quantifying organism-environment interactions in a new model system for neuroscience" ; + bbqs:uses_device_category bid:006caa68-8b24-474f-867f-82a6199a84b1, + bid:dac56889-e81e-478e-827d-7f08bb15efd3, + bid:f328ad53-2dd2-490f-adf1-40e9cd85b5bd, + bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 . + +bid:cbb1fcfa-0a1d-432d-a4bb-a325516b6594 a bbqs:Investigator ; + bbqs:consortium_role "Research Staff (Scientist and others)" ; + bbqs:name "Tanya St. John" . bid:cf033709-106e-4288-a326-f7bb353ba0a4 a bbqs:Investigator ; bbqs:consortium_role "Research Staff (Scientist and others)" ; @@ -4221,6 +4314,8 @@ bid:d68a81db-70f9-4ea5-95af-3f1f83a46771 a bbqs:DeviceManufacturer ; bid:d6fbdcc7-30d7-48ba-9c46-b70e227c59cf a bbqs:Species ; bbqs:aliases "Hofstenia miamia", + "acoel flatworm", + "acoel worm", "hofstenia miamia", "panther worm" ; bbqs:common_name "panther worm" ; @@ -4298,6 +4393,11 @@ bid:e483d68e-7bc8-4fcb-9a75-3d97825c02c9 a bbqs:Publication ; bbqs:title "Unraveling robust brain-behavior links of depressive complaints through granular network models for understanding heterogeneity." ; bbqs:year 2024 . +bid:e631bc65-b164-4090-b442-3dacddd2707a a bbqs:Investigator ; + bbqs:consortium_role "Co-Investigator" ; + bbqs:name "Gaurav Patel" ; + bbqs:orcid . + bid:e6a2c1d6-43e9-4dd7-b24d-769b7c8ac4a8 a bbqs:Publication ; bbqs:doi "10.1111/mbe.12314"^^xsd:anyURI ; bbqs:external_url "https://pubmed.ncbi.nlm.nih.gov/38169954/"^^xsd:anyURI ; @@ -4346,6 +4446,10 @@ bid:e9749351-6773-473d-8fd0-ec88e5a8ba07 a bbqs:Publication ; bbqs:title "Wearable organic-electrochemical-transistor-based lithium sensor for precision mental health." ; bbqs:year 2025 . +bid:ea2dc7bf-af90-460d-9823-45e9407b6bb8 a bbqs:Investigator ; + bbqs:consortium_role "Co-Investigator" ; + bbqs:name "David Ostry" . + bid:eb63ab45-d094-4b5f-99a8-3fe0cb8529eb a bbqs:Publication ; bbqs:author_orcids , , @@ -4375,6 +4479,9 @@ bid:eef56f64-7e55-48ea-891a-b5c9b4c85b7c a bbqs:Publication ; bbqs:title "CapuchinAI 1.0: Development of a Machine Learning-Based Touchscreen Paradigm to Test Cognition in Wild Capuchins." ; bbqs:year 2026 . +bid:eff6d625-81ad-4a38-9f8e-93a2ae06c7af a bbqs:Investigator ; + bbqs:name "Nicole Tregoning" . + bid:f162cf66-a805-4425-9e9f-ee40c5c89bb2 a bbqs:Publication ; bbqs:external_url "https://pubmed.ncbi.nlm.nih.gov/42801257/"^^xsd:anyURI ; bbqs:journal "Int Conf Learn Represent" ; @@ -4383,15 +4490,6 @@ bid:f162cf66-a805-4425-9e9f-ee40c5c89bb2 a bbqs:Publication ; bbqs:title "AVERE: Improving Audiovisual Emotion Reasoning with Preference Optimization." ; bbqs:year 2026 . -bid:f328ad53-2dd2-490f-adf1-40e9cd85b5bd a bbqs:DeviceCategory ; - bbqs:category_key "ephys_probe" ; - bbqs:description "High-density silicon probes and electrode arrays for extracellular recording." ; - bbqs:label "Electrophysiology Probe" ; - bbqs:measures "LFP", - "Spikes", - "multi-unit activity" ; - bbqs:name "Electrophysiology Probe" . - bid:f33c9c03-f685-4166-b0bf-9ce704b5fa78 a bbqs:Investigator ; bbqs:member_of_group bid:47cf050c-ab07-42fa-b251-d1fecc7ceb40, bid:4be84d82-5396-4c3d-907f-8c6e10787cd3, @@ -4415,6 +4513,9 @@ bid:f97c2277-9e93-4712-ac91-7f5e04482ba8 a bbqs:Publication ; bbqs:title "Learning Mixtures of Linear Dynamical Systems via Hybrid Tensor-EM Method." ; bbqs:year 2026 . +bid:f9cc96dd-52b0-41bc-b687-47a1e4df3e2c a bbqs:Investigator ; + bbqs:name "Dorota Jarecka" . + bid:fd825a1b-0bb9-4d2d-83e0-d901810e15b5 a bbqs:Publication ; bbqs:doi "10.1523/JNEUROSCI.1116-25.2026"^^xsd:anyURI ; bbqs:external_url "https://pubmed.ncbi.nlm.nih.gov/41786608/"^^xsd:anyURI ; @@ -4435,15 +4536,6 @@ bid:00618660-a724-4059-85c1-c6ca3ccc1744 a bbqs:Investigator ; bbqs:name "Joshua Jacobs" ; bbqs:orcid . -bid:006caa68-8b24-474f-867f-82a6199a84b1 a bbqs:DeviceCategory ; - bbqs:category_key "wireless_ephys" ; - bbqs:description "Untethered neural acquisition systems and telemetry headstages." ; - bbqs:label "Wireless Electrophysiology" ; - bbqs:measures "LFP", - "Spikes", - "synchronized video" ; - bbqs:name "Wireless Electrophysiology" . - bid:03f8e307-5f04-4d22-9aef-c1bb9d3e6905 a bbqs:Investigator ; bbqs:consortium_role "Principal Investigator (PI)" ; bbqs:member_of_group bid:f340cdf9-cdfc-43f4-b18b-4d9fbebac604 ; @@ -4503,7 +4595,11 @@ bid:1f40721b-dadd-4141-8f9d-6661f4777718 a bbqs:DeviceCategory ; bbqs:measures "EEG voltage", "event-related potentials", "spectral power" ; - bbqs:name "Scalp EEG" . + bbqs:name "Scalp EEG" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Cognitive state", + "Hyperscanning", + "Mobile EEG" . bid:1f6fa922-b662-4325-aac7-cb622ac10ef3 a bbqs:Investigator ; bbqs:consortium_role "Principal Investigator (PI)" ; @@ -4592,8 +4688,9 @@ in general.""" ; bbqs:reporter_project_num "5R34DA059723-02" ; bbqs:studies_human false ; bbqs:studies_species bid:9f227f88-53ba-4c7c-91e7-334641e4b759 ; - bbqs:studies_species_name "Mus musculus" ; - bbqs:title "Multimodal behavioral analysis of oromanual food-handling in freely moving animals" . + bbqs:title "Multimodal behavioral analysis of oromanual food-handling in freely moving animals" ; + bbqs:uses_device_category bid:dac56889-e81e-478e-827d-7f08bb15efd3, + bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 . bid:2dd8fea9-363a-43da-8bd1-6ae4674c60b9 a bbqs:Investigator ; bbqs:consortium_role "Principal Investigator (PI)" ; @@ -4652,8 +4749,16 @@ autobiographical memory formation, and synchronize this data with direct neural bbqs:reporter_project_num "5R61MH135109-03" ; bbqs:studies_human true ; bbqs:studies_species bid:63464d21-4ef2-4405-a192-4b60e344ff40 ; - bbqs:studies_species_name "Humans (Epilepsy Patients)" ; - bbqs:title "Capturing Autobiographical memory formation in People moving Through real-world spaces Using synchronized wearables and intracranial Recordings of EEG" . + bbqs:title "Capturing Autobiographical memory formation in People moving Through real-world spaces Using synchronized wearables and intracranial Recordings of EEG" ; + bbqs:uses_device_category bid:006caa68-8b24-474f-867f-82a6199a84b1, + bid:851882bb-3321-45ed-af75-6ae08836c1fc, + bid:d8cef433-7209-4e63-bdd5-a3f52bd9dd89, + bid:dac56889-e81e-478e-827d-7f08bb15efd3, + bid:e2c21bfc-1707-4f6d-aa18-c6db03f53c2d, + bid:e80e0495-82ff-4d51-995f-36e9349b40fb, + bid:e9d52180-5701-46ba-b5dc-7fc6fa32233b, + bid:f328ad53-2dd2-490f-adf1-40e9cd85b5bd, + bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 . bid:3516554a-8253-4773-af22-a89b3ccb3267 a bbqs:Investigator ; bbqs:consortium_role "Principal Investigator (PI)" ; @@ -4706,8 +4811,15 @@ tool for facilitating social interaction.""" ; bbqs:reporter_project_num "5R61MH138705-02" ; bbqs:studies_human true ; bbqs:studies_species bid:63464d21-4ef2-4405-a192-4b60e344ff40 ; - bbqs:studies_species_name "Humans" ; - bbqs:title "Neural and Behavioral Correlates of Live Face-to-Face Interactions" . + bbqs:title "Neural and Behavioral Correlates of Live Face-to-Face Interactions" ; + bbqs:uses_device_category bid:006caa68-8b24-474f-867f-82a6199a84b1, + bid:851882bb-3321-45ed-af75-6ae08836c1fc, + bid:d8cef433-7209-4e63-bdd5-a3f52bd9dd89, + bid:dac56889-e81e-478e-827d-7f08bb15efd3, + bid:e2c21bfc-1707-4f6d-aa18-c6db03f53c2d, + bid:e9d52180-5701-46ba-b5dc-7fc6fa32233b, + bid:f328ad53-2dd2-490f-adf1-40e9cd85b5bd, + bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 . bid:3a4fb38d-dc54-4d06-a1cf-a5a959d3321b a bbqs:Project ; bbqs:abstract """PROJECT SUMMARY @@ -4775,8 +4887,12 @@ unique brain-behavior insights into human emotion functioning applicable to broa bbqs:reporter_project_num "5R61MH135407-03" ; bbqs:studies_human true ; bbqs:studies_species bid:63464d21-4ef2-4405-a192-4b60e344ff40 ; - bbqs:studies_species_name "Humans" ; - bbqs:title "Novel multimodal neural, physiological, and behavioral sensing and machine learning for mental states" . + bbqs:title "Novel multimodal neural, physiological, and behavioral sensing and machine learning for mental states" ; + bbqs:uses_device_category bid:006caa68-8b24-474f-867f-82a6199a84b1, + bid:851882bb-3321-45ed-af75-6ae08836c1fc, + bid:e2c21bfc-1707-4f6d-aa18-c6db03f53c2d, + bid:e80e0495-82ff-4d51-995f-36e9349b40fb, + bid:f328ad53-2dd2-490f-adf1-40e9cd85b5bd . bid:3be49154-45d9-45b4-9872-3271a67a5225 a bbqs:Investigator ; bbqs:consortium_role "Principal Investigator (PI)" ; @@ -4821,23 +4937,14 @@ bid:5bb15430-32e5-457f-b6ce-e4f3790687fa a bbqs:Investigator ; bbqs:name "Brett E Youngerman" ; bbqs:orcid . -bid:5f8ac3c4-a0fb-44d6-ae2d-b505816d4141 a bbqs:Investigator ; - bbqs:consortium_role "Research Staff (Scientist and others)" ; - bbqs:member_of_group bid:47cf050c-ab07-42fa-b251-d1fecc7ceb40, - bid:f340cdf9-cdfc-43f4-b18b-4d9fbebac604 ; - bbqs:name "Nader Nikbakht" ; - bbqs:orcid ; - bbqs:research_areas "Behavioral neuroscience", - "Computational and systems neuroscience", - "Neural computation", - "Neuro-AI", - "neurobiology" . - bid:5fd6169e-d169-41be-8cd0-e8a691f0b345 a bbqs:Investigator ; bbqs:consortium_role "Principal Investigator (PI)" ; bbqs:member_of_group bid:4be84d82-5396-4c3d-907f-8c6e10787cd3 ; bbqs:name "Jennie Grammer" . +bid:62826284-8258-4f21-af3e-64fc755ef2b2 a bbqs:ResearchOrganization ; + bbqs:name "National Science Foundation" . + bid:6340c8ee-1d5b-45f0-87ff-c320a38df17d a bbqs:Investigator ; bbqs:consortium_role "Postdoc/Grad Student" ; bbqs:member_of_group bid:4be84d82-5396-4c3d-907f-8c6e10787cd3 ; @@ -4893,7 +5000,11 @@ bid:7d968a4f-f412-431e-a9d9-6ec963cb8677 a bbqs:DeviceCategory ; "fixations", "pupil diameter", "saccades" ; - bbqs:name "Eye Tracker" . + bbqs:name "Eye Tracker" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Joint attention", + "Social attention", + "Visual exploration" . bid:7f92ea75-530c-40bf-83a4-3e1eba4d4179 a bbqs:Species ; bbqs:aliases "Meriones unguiculatus", @@ -4904,13 +5015,6 @@ bid:7f92ea75-530c-40bf-83a4-3e1eba4d4179 a bbqs:Species ; bbqs:name "Mongolian Gerbil" ; bbqs:taxonomy_class "Mammalia" . -bid:831a48e1-025d-499a-bf11-83d05285ed4b a bbqs:Investigator ; - bbqs:consortium_role "Principal Investigator (PI)" ; - bbqs:member_of_group bid:4737d7d7-4bbe-4b72-b397-5f341a0dd5dd, - bid:47cf050c-ab07-42fa-b251-d1fecc7ceb40 ; - bbqs:name "Cristina Savin" ; - bbqs:orcid . - bid:864e9b52-4173-4b92-bd81-d0bc6a7fc3cb a bbqs:Investigator ; bbqs:consortium_role "Principal Investigator (PI)" ; bbqs:name "Steve Chang" ; @@ -5057,8 +5161,14 @@ significant step towards bridging the gap between basic neuroscience research an bbqs:reporter_project_num "5R61MH138966-02" ; bbqs:studies_human true ; bbqs:studies_species bid:63464d21-4ef2-4405-a192-4b60e344ff40 ; - bbqs:studies_species_name "Humans" ; - bbqs:title "A naturalistic multimodal platform for capturing brain-body interactions in people during physical effort-based decision making" . + bbqs:title "A naturalistic multimodal platform for capturing brain-body interactions in people during physical effort-based decision making" ; + bbqs:uses_device_category bid:006caa68-8b24-474f-867f-82a6199a84b1, + bid:851882bb-3321-45ed-af75-6ae08836c1fc, + bid:dac56889-e81e-478e-827d-7f08bb15efd3, + bid:e2c21bfc-1707-4f6d-aa18-c6db03f53c2d, + bid:e9d52180-5701-46ba-b5dc-7fc6fa32233b, + bid:f328ad53-2dd2-490f-adf1-40e9cd85b5bd, + bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 . bid:afe5dc6f-8e97-48c9-bb79-5af130f1e62a a bbqs:Investigator ; bbqs:consortium_role "Postdoc/Grad Student" ; @@ -5145,15 +5255,6 @@ bid:d69b71df-b5e8-490c-8df0-5a7883fac0d5 a bbqs:Investigator ; bbqs:member_of_group bid:47cf050c-ab07-42fa-b251-d1fecc7ceb40 ; bbqs:name "Maryam Shanechi" . -bid:dac56889-e81e-478e-827d-7f08bb15efd3 a bbqs:DeviceCategory ; - bbqs:category_key "motion_capture" ; - bbqs:description "Marker-based and inertial motion capture systems." ; - bbqs:label "Motion Capture" ; - bbqs:measures "3D marker positions", - "joint angles", - "segment kinematics" ; - bbqs:name "Motion Capture" . - bid:db663fc5-af00-457b-beb7-f9ee831eef71 a bbqs:Investigator ; bbqs:consortium_role "Assistant Professor" ; bbqs:external_url "https://reporter.nih.gov/search/results?pi_id=14227655"^^xsd:anyURI ; @@ -5226,7 +5327,6 @@ way for a large-scale R01.""" ; bbqs:reporter_project_num "5R34DA059510-02" ; bbqs:studies_human false ; bbqs:studies_species bid:7b2f0bde-f010-4315-b856-c217e8ca7788 ; - bbqs:studies_species_name "Cichlidae" ; bbqs:title "A modeling framework and arena for measuring contextual influences of behavior" . bid:e5bdf58e-a1ff-4f5f-aa6d-667de414e16e a bbqs:Investigator ; @@ -5251,23 +5351,6 @@ bid:e6996650-b858-4ddb-b422-4fd92fdfaac4 a bbqs:Investigator ; "concurrent EEG-fMRI", "multivariate analysis" . -bid:e80e0495-82ff-4d51-995f-36e9349b40fb a bbqs:DeviceCategory ; - bbqs:category_key "microphone" ; - bbqs:description "Audible-range microphones, arrays, and field recorders." ; - bbqs:label "Microphone / Audio Recorder" ; - bbqs:measures "Audio waveform", - "sound pressure level" ; - bbqs:name "Microphone / Audio Recorder" . - -bid:e9d52180-5701-46ba-b5dc-7fc6fa32233b a bbqs:DeviceCategory ; - bbqs:category_key "neurostimulation" ; - bbqs:description "Implanted stimulation systems with chronic sensing capability." ; - bbqs:label "Neurostimulation / DBS" ; - bbqs:measures "LFP", - "event markers", - "stimulation parameters" ; - bbqs:name "Neurostimulation / DBS" . - bid:eaa38acf-84a1-44ce-a1c6-eda307583731 a bbqs:Investigator ; bbqs:consortium_role "Data Infrastructure support" ; bbqs:member_of_group bid:47cf050c-ab07-42fa-b251-d1fecc7ceb40 ; @@ -5403,8 +5486,11 @@ unprecedented resolution.""" ; bbqs:reporter_project_num "5R34DA059718-02" ; bbqs:studies_human false ; bbqs:studies_species bid:9f227f88-53ba-4c7c-91e7-334641e4b759 ; - bbqs:studies_species_name "Mouse" ; - bbqs:title "Harnessing biological rhythms for a resilient social motif generator" . + bbqs:title "Harnessing biological rhythms for a resilient social motif generator" ; + bbqs:uses_device_category bid:851882bb-3321-45ed-af75-6ae08836c1fc, + bid:dac56889-e81e-478e-827d-7f08bb15efd3, + bid:e2c21bfc-1707-4f6d-aa18-c6db03f53c2d, + bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 . bid:24981995-2cd1-407a-9d2c-0f89f026edeb a bbqs:Investigator ; bbqs:consortium_role "Principal Investigator (PI)" ; @@ -5477,13 +5563,20 @@ auditory/behavioral covariates (encoding models).""" ; bid:2370e3b0-8941-46f8-99b0-a30d467e764e, bid:38fab5c5-6eb6-4ba1-980a-78e5c2bf2312, bid:44b1ac85-feb2-4792-9f46-109cf7876f4a, + bid:4921bfdf-7432-48ac-911d-0cb825184ef1, bid:a79d14cd-ae0e-4bce-b09f-8d16e6e15f7f, bid:b75b460e-560d-48d4-af7d-1152d34c1d79 ; bbqs:reporter_project_num "5R34DA059513-02" ; bbqs:studies_human false ; bbqs:studies_species bid:7f92ea75-530c-40bf-83a4-3e1eba4d4179 ; - bbqs:studies_species_name "Gerbil" ; - bbqs:title "Computational attribution and fusion of vocalizations, social behavior, and neural recordings in a naturalistic environment" . + bbqs:title "Computational attribution and fusion of vocalizations, social behavior, and neural recordings in a naturalistic environment" ; + bbqs:uses_device_category bid:006caa68-8b24-474f-867f-82a6199a84b1, + bid:851882bb-3321-45ed-af75-6ae08836c1fc, + bid:dac56889-e81e-478e-827d-7f08bb15efd3, + bid:e2c21bfc-1707-4f6d-aa18-c6db03f53c2d, + bid:e80e0495-82ff-4d51-995f-36e9349b40fb, + bid:f328ad53-2dd2-490f-adf1-40e9cd85b5bd, + bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 . bid:4f2619b1-a6a4-48e5-b21a-0f5455354ea9 a bbqs:Project ; bbqs:abstract """Project Summary @@ -5520,9 +5613,21 @@ quantitative descriptions of animal behavior.""" ; bbqs:studies_human false ; bbqs:studies_species bid:5a248695-86a9-44ac-b923-a3050572afba, bid:9f227f88-53ba-4c7c-91e7-334641e4b759 ; - bbqs:studies_species_name "Mouse", - "Rat" ; - bbqs:title "High-resolution 3D tracking of social behaviors for deep phenotypic analysis" . + bbqs:title "High-resolution 3D tracking of social behaviors for deep phenotypic analysis" ; + bbqs:uses_device_category bid:dac56889-e81e-478e-827d-7f08bb15efd3, + bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 . + +bid:5f8ac3c4-a0fb-44d6-ae2d-b505816d4141 a bbqs:Investigator ; + bbqs:consortium_role "Research Staff (Scientist and others)" ; + bbqs:member_of_group bid:47cf050c-ab07-42fa-b251-d1fecc7ceb40, + bid:f340cdf9-cdfc-43f4-b18b-4d9fbebac604 ; + bbqs:name "Nader Nikbakht" ; + bbqs:orcid ; + bbqs:research_areas "Behavioral neuroscience", + "Computational and systems neuroscience", + "Neural computation", + "Neuro-AI", + "neurobiology" . bid:7a2ad901-f50d-40bc-a404-b4ef0c33944b a bbqs:Investigator ; bbqs:consortium_role "Principal Investigator (PI)" ; @@ -5570,18 +5675,19 @@ to develop future neuromodulatory therapeutic approaches to facilitate the retur bbqs:reporter_project_num "1R61MH138612-01" ; bbqs:studies_human true ; bbqs:studies_species bid:63464d21-4ef2-4405-a192-4b60e344ff40 ; - bbqs:studies_species_name "Homo sapiens" ; - bbqs:title "SeeMe: A multimodal behavioral-electrophysiological tool for real-time detection of consciousness" . + bbqs:title "SeeMe: A multimodal behavioral-electrophysiological tool for real-time detection of consciousness" ; + bbqs:uses_device_category bid:006caa68-8b24-474f-867f-82a6199a84b1, + bid:851882bb-3321-45ed-af75-6ae08836c1fc, + bid:e2c21bfc-1707-4f6d-aa18-c6db03f53c2d, + bid:e9d52180-5701-46ba-b5dc-7fc6fa32233b, + bid:f328ad53-2dd2-490f-adf1-40e9cd85b5bd . -bid:851882bb-3321-45ed-af75-6ae08836c1fc a bbqs:DeviceCategory ; - bbqs:category_key "wearable_multimodal" ; - bbqs:description "Wrist- and body-worn devices combining several physiological sensors." ; - bbqs:label "Multimodal Wearable" ; - bbqs:measures "EDA", - "PPG", - "accelerometry", - "temperature" ; - bbqs:name "Multimodal Wearable" . +bid:831a48e1-025d-499a-bf11-83d05285ed4b a bbqs:Investigator ; + bbqs:consortium_role "Principal Investigator (PI)" ; + bbqs:member_of_group bid:4737d7d7-4bbe-4b72-b397-5f341a0dd5dd, + bid:47cf050c-ab07-42fa-b251-d1fecc7ceb40 ; + bbqs:name "Cristina Savin" ; + bbqs:orcid . bid:a7b15b50-1f35-4e02-91d5-c28593457e3d a bbqs:DeviceManufacturer ; bbqs:name "Western Psychological Services" . @@ -5626,8 +5732,10 @@ streaming delays. We will also develop computational frameworks for analyses of bbqs:reporter_project_num "5R34DA059716-02" ; bbqs:studies_human true ; bbqs:studies_species bid:63464d21-4ef2-4405-a192-4b60e344ff40 ; - bbqs:studies_species_name "Humans" ; - bbqs:title "Interpersonal behavioral synchrony in virtual and in-person dyadic conversation" . + bbqs:title "Interpersonal behavioral synchrony in virtual and in-person dyadic conversation" ; + bbqs:uses_device_category bid:006caa68-8b24-474f-867f-82a6199a84b1, + bid:e80e0495-82ff-4d51-995f-36e9349b40fb, + bid:f328ad53-2dd2-490f-adf1-40e9cd85b5bd . bid:b050adf2-88b1-42e2-912b-2843d5b96854 a bbqs:Investigator ; bbqs:consortium_role "Principal Investigator (PI)" ; @@ -5655,6 +5763,18 @@ bid:c3604b73-537c-411b-b963-cd8df608f086 a bbqs:Investigator ; bbqs:orcid ; bbqs:skills "Behavioral neuroscience" . +bid:d8cef433-7209-4e63-bdd5-a3f52bd9dd89 a bbqs:DeviceCategory ; + bbqs:category_key "neural_imaging" ; + bbqs:description "Optical and volumetric imaging of neural activity." ; + bbqs:label "Neural Imaging" ; + bbqs:measures "BOLD", + "Fluorescence", + "bioluminescence" ; + bbqs:name "Neural Imaging" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Calcium imaging", + "Functional neuroimaging" . + bid:e0179c68-8fe6-48ca-9140-84a567b5f661 a bbqs:Investigator ; bbqs:consortium_role "Principal Investigator (PI)" ; bbqs:name "Firooz Aflatouni" . @@ -5676,6 +5796,7 @@ To study these important epidemiological and biological questions in a controlle bbqs:description "Adversity and Resilience Consortium (PI: Linda Wilbrecht)" ; bbqs:external_url "https://reporter.nih.gov/project-details/1R34DA062119-01"^^xsd:anyURI ; bbqs:fiscal_year 2025 ; + bbqs:funded_datasets bid:44376171-f0d7-4e91-9c91-6558f6253fe3 ; bbqs:grant_number "R34DA062119" ; bbqs:keywords "Harmonization", "International Development Project", @@ -5688,8 +5809,11 @@ To study these important epidemiological and biological questions in a controlle bbqs:reporter_project_num "1R34DA062119-01" ; bbqs:studies_human false ; bbqs:studies_species bid:9f227f88-53ba-4c7c-91e7-334641e4b759 ; - bbqs:studies_species_name "Mus musculus" ; - bbqs:title "Adversity and Resilience Consortium (ARC): A collaboration for the standardized study of experience-dependent brain and behavioral development" . + bbqs:title "Adversity and Resilience Consortium (ARC): A collaboration for the standardized study of experience-dependent brain and behavioral development" ; + bbqs:uses_device_category bid:006caa68-8b24-474f-867f-82a6199a84b1, + bid:dac56889-e81e-478e-827d-7f08bb15efd3, + bid:f328ad53-2dd2-490f-adf1-40e9cd85b5bd, + bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 . bid:fe4790d5-bf32-469d-b098-cb4f44f6fa19 a bbqs:Investigator ; bbqs:consortium_role "Principal Investigator (PI)" ; @@ -5698,14 +5822,6 @@ bid:fe4790d5-bf32-469d-b098-cb4f44f6fa19 a bbqs:Investigator ; bbqs:name "David Kennedy" ; bbqs:orcid . -bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 a bbqs:DeviceCategory ; - bbqs:category_key "video_camera" ; - bbqs:description "Standard or high-speed cameras recording visible-light behavioural video." ; - bbqs:label "Video Camera" ; - bbqs:measures "RGB video", - "frame timestamps" ; - bbqs:name "Video Camera" . - bid:071aa27a-456a-4eb1-abd2-35d9f0eceaf7 a bbqs:Project ; bbqs:abstract """Project Summary/Abstract Naturalistic contexts provide the opportunity to study the brain and behavior in response to the ethological @@ -5762,8 +5878,10 @@ Aim 1 – as well as to explore the potential to address targeted research quest bbqs:reporter_project_num "5R34DA059509-02" ; bbqs:studies_human false ; bbqs:studies_species bid:9f227f88-53ba-4c7c-91e7-334641e4b759 ; - bbqs:studies_species_name "Mouse" ; - bbqs:title "Behavioral quantification through active learning and multidimensional physiological monitoring" . + bbqs:title "Behavioral quantification through active learning and multidimensional physiological monitoring" ; + bbqs:uses_device_category bid:006caa68-8b24-474f-867f-82a6199a84b1, + bid:e80e0495-82ff-4d51-995f-36e9349b40fb, + bid:f328ad53-2dd2-490f-adf1-40e9cd85b5bd . bid:0f0ad5c2-496b-42a8-91b7-b798742bcdc3 a bbqs:Investigator ; bbqs:consortium_role "Principal Investigator (PI)" ; @@ -5817,8 +5935,11 @@ to inform translational science and ultimately enhance our understanding of huma bbqs:reporter_project_num "5R34DA061925-02" ; bbqs:studies_human false ; bbqs:studies_species bid:491ac537-b3f6-45b9-93f3-1249fd809ebc ; - bbqs:studies_species_name "Cebus imitator" ; - bbqs:title "Building an “AI Forest” to identify the social and environmental factors underlying complex behavioral traits in wild primates." . + bbqs:title "Building an “AI Forest” to identify the social and environmental factors underlying complex behavioral traits in wild primates." ; + bbqs:uses_device_category bid:006caa68-8b24-474f-867f-82a6199a84b1, + bid:dac56889-e81e-478e-827d-7f08bb15efd3, + bid:f328ad53-2dd2-490f-adf1-40e9cd85b5bd, + bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 . bid:1e1fc06b-fe5c-4ec2-9f64-474f98ae31e8 a bbqs:Project ; bbqs:abstract """Summary @@ -5864,8 +5985,9 @@ wide range of new research into brain function and treatments for neurological d bbqs:reporter_project_num "5R34DA059512-02" ; bbqs:studies_human false ; bbqs:studies_species bid:9f227f88-53ba-4c7c-91e7-334641e4b759 ; - bbqs:studies_species_name "Mus musculus" ; - bbqs:title "High-throughput, high-resolution 3D measurement of ethologically relevant rodent behavior in a dynamic environment" . + bbqs:title "High-throughput, high-resolution 3D measurement of ethologically relevant rodent behavior in a dynamic environment" ; + bbqs:uses_device_category bid:dac56889-e81e-478e-827d-7f08bb15efd3, + bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 . bid:22e61529-38ba-465f-b38b-274e24160fb6 a bbqs:Project ; bbqs:abstract """Summary/Abstract (30 line max): @@ -5913,8 +6035,13 @@ subjects.""" ; bbqs:reporter_project_num "5R61MH135405-03" ; bbqs:studies_human true ; bbqs:studies_species bid:63464d21-4ef2-4405-a192-4b60e344ff40 ; - bbqs:studies_species_name "Humans" ; - bbqs:title "Developing the Context-Aware Multimodal Ecological Research and Assessment (CAMERA) Platform for Continuous Measurement and Prediction of Anxiety and Memory State" . + bbqs:title "Developing the Context-Aware Multimodal Ecological Research and Assessment (CAMERA) Platform for Continuous Measurement and Prediction of Anxiety and Memory State" ; + bbqs:uses_device_category bid:851882bb-3321-45ed-af75-6ae08836c1fc, + bid:dac56889-e81e-478e-827d-7f08bb15efd3, + bid:e2c21bfc-1707-4f6d-aa18-c6db03f53c2d, + bid:e80e0495-82ff-4d51-995f-36e9349b40fb, + bid:e9d52180-5701-46ba-b5dc-7fc6fa32233b, + bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 . bid:3161638e-fa1b-4af1-a998-a34139b2a0b1 a bbqs:Investigator ; bbqs:consortium_role "Principal Investigator (PI)" ; @@ -5962,9 +6089,13 @@ collaborative team to pursue this work.""" ; bbqs:studies_human false ; bbqs:studies_species bid:436525a6-acbf-4066-ac75-82845a8db8cc, bid:8e40951f-ace0-4470-ab0f-3dd6bc366c8b ; - bbqs:studies_species_name "Danio rerio", - "Drosophila melanogaster" ; - bbqs:title "Transformative Optical Imaging of Brain & Behavior in Navigating Genetic Species" . + bbqs:title "Transformative Optical Imaging of Brain & Behavior in Navigating Genetic Species" ; + bbqs:uses_device_category bid:006caa68-8b24-474f-867f-82a6199a84b1, + bid:851882bb-3321-45ed-af75-6ae08836c1fc, + bid:dac56889-e81e-478e-827d-7f08bb15efd3, + bid:e2c21bfc-1707-4f6d-aa18-c6db03f53c2d, + bid:f328ad53-2dd2-490f-adf1-40e9cd85b5bd, + bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 . bid:4614269a-0d7f-4390-b4cc-568a09fa6a45 a bbqs:Project ; bbqs:abstract """Abstract @@ -6010,8 +6141,13 @@ intellectual development in children with neurodevelopmental disorders.""" ; bbqs:reporter_project_num "5R61MH135114-02" ; bbqs:studies_human true ; bbqs:studies_species bid:63464d21-4ef2-4405-a192-4b60e344ff40 ; - bbqs:studies_species_name "Humans (Pediatric)" ; - bbqs:title "Integrated movement tracking for pediatric OPM-MEG studies of intellectual disability" . + bbqs:title "Integrated movement tracking for pediatric OPM-MEG studies of intellectual disability" ; + bbqs:uses_device_category bid:006caa68-8b24-474f-867f-82a6199a84b1, + bid:851882bb-3321-45ed-af75-6ae08836c1fc, + bid:dac56889-e81e-478e-827d-7f08bb15efd3, + bid:e2c21bfc-1707-4f6d-aa18-c6db03f53c2d, + bid:f328ad53-2dd2-490f-adf1-40e9cd85b5bd, + bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 . bid:68fe4ee2-5beb-4a6e-ac58-2d31ad350cfd a bbqs:Investigator ; bbqs:consortium_role "Principal Investigator (PI)" ; @@ -6025,6 +6161,11 @@ bid:68fe4ee2-5beb-4a6e-ac58-2d31ad350cfd a bbqs:Investigator ; "Dynamical systems modeling", "Signal processing" . +bid:69aa906c-2a0c-4524-8958-4e1009f96060 a bbqs:ResearchOrganization ; + bbqs:members bid:36ba050d-e4f4-470c-a780-eddef3b4bab8, + bid:b723b975-9438-4c08-b9b9-404846e31272 ; + bbqs:name "National Institute of Neurological Disorders and Stroke" . + bid:bf3493c0-de28-4731-9baf-c976ccc7c484 a bbqs:Project ; bbqs:abstract """Project Summary The family is the canonical basis of social structure for mammalian species. Families help ensure that offspring @@ -6076,8 +6217,9 @@ individual brain states and hormone systems on survival strategies.""" ; bbqs:reporter_project_num "1U01DA063565-01" ; bbqs:studies_human false ; bbqs:studies_species bid:9f227f88-53ba-4c7c-91e7-334641e4b759 ; - bbqs:studies_species_name "Mus musculus" ; - bbqs:title "Neurobehavioral Mechanisms of Social Behavior and Familial Structure" . + bbqs:title "Neurobehavioral Mechanisms of Social Behavior and Familial Structure" ; + bbqs:uses_device_category bid:dac56889-e81e-478e-827d-7f08bb15efd3, + bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 . bid:cbc8640e-6d05-4872-bf01-6e3f7d89c349 a bbqs:Project ; bbqs:abstract """Project summary @@ -6196,17 +6338,26 @@ activity.""" ; bbqs:reporter_project_num "5R34DA059507-02" ; bbqs:studies_human false ; bbqs:studies_species bid:77f3b242-4db9-4080-843c-d868a6d4f465 ; - bbqs:studies_species_name "Molothrus ater" ; - bbqs:title "Development of a \"smart aviary\" to probe neural dynamics of complex social behaviors in a gregarious songbird" . + bbqs:title "Development of a \"smart aviary\" to probe neural dynamics of complex social behaviors in a gregarious songbird" ; + bbqs:uses_device_category bid:dac56889-e81e-478e-827d-7f08bb15efd3, + bid:e80e0495-82ff-4d51-995f-36e9349b40fb, + bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 . bid:208980e9-92b9-447e-a2ca-e83bf61db159 a bbqs:ResearchOrganization ; bbqs:external_url "https://www.nih.gov"^^xsd:anyURI, "https://www.nih.gov" ; - bbqs:members bid:71d734ad-e355-473d-aaf7-577be85186d5, + bbqs:members bid:3cc135af-1424-4cc9-b54b-978d039ad6d1, + bid:5899fd56-4c11-41a1-8b0a-4e1785820391, + bid:71d734ad-e355-473d-aaf7-577be85186d5, + bid:79c7ff27-6bd7-4b92-b22c-9f4f80a507ab, bid:83a4df24-ed1c-462a-bf74-36c68150c42c, - bid:8f429fce-6c38-4707-bd9c-30fd796e9137 ; + bid:8f429fce-6c38-4707-bd9c-30fd796e9137, + bid:9eb4af78-4485-4c7b-9179-76d079bde109 ; bbqs:name "National Institutes of Health" . +bid:2548a017-fd14-4934-9762-b30d7071821a a bbqs:ResearchOrganization ; + bbqs:name "NIH Office of the Director (Common Fund)" . + bid:797fd7cf-49dc-40a2-811d-aeec94460ead a bbqs:Project ; bbqs:abstract """Summary/Abstract Whether we are fatigued from a teleconference call, eager to read a book, energetic and ready to start our day or @@ -6255,8 +6406,11 @@ world. For example, the response of the brain to """ ; bbqs:reporter_project_num "1R61MH138967-01" ; bbqs:studies_human true ; bbqs:studies_species bid:63464d21-4ef2-4405-a192-4b60e344ff40 ; - bbqs:studies_species_name "Human" ; - bbqs:title "A Day in the Life of the Human Brain: Investigating the Dynamic Interrelationship Between Brain, Cognition, Behavior, and Physiology" . + bbqs:title "A Day in the Life of the Human Brain: Investigating the Dynamic Interrelationship Between Brain, Cognition, Behavior, and Physiology" ; + bbqs:uses_device_category bid:006caa68-8b24-474f-867f-82a6199a84b1, + bid:851882bb-3321-45ed-af75-6ae08836c1fc, + bid:e2c21bfc-1707-4f6d-aa18-c6db03f53c2d, + bid:f328ad53-2dd2-490f-adf1-40e9cd85b5bd . bid:a98fe953-d2ad-4770-8c8c-1759f8500c4a a bbqs:Project ; bbqs:abstract """PROJECT SUMMARY @@ -6309,8 +6463,10 @@ during sound-driven social interactions.""" ; bbqs:reporter_project_num "1U01DA063581-01" ; bbqs:studies_human false ; bbqs:studies_species bid:7f92ea75-530c-40bf-83a4-3e1eba4d4179 ; - bbqs:studies_species_name "Meriones unguiculatus" ; - bbqs:title "Computational Analyses of Family Auditory Communication: Linking Behavior, Vocalization, and Neural Dynamics" . + bbqs:title "Computational Analyses of Family Auditory Communication: Linking Behavior, Vocalization, and Neural Dynamics" ; + bbqs:uses_device_category bid:dac56889-e81e-478e-827d-7f08bb15efd3, + bid:e80e0495-82ff-4d51-995f-36e9349b40fb, + bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 . bid:d663edcd-08bc-426b-b97d-a45cd47a97c0 a bbqs:Project ; bbqs:abstract """Project Summary BBQS R34 – Zhang & Frohlich @@ -6364,9 +6520,14 @@ psychosocial interventions.""" ; bbqs:studies_human false ; bbqs:studies_species bid:311017ec-9209-4d63-95fb-1967bc8a81b7, bid:63464d21-4ef2-4405-a192-4b60e344ff40 ; - bbqs:studies_species_name "Homo sapiens", - "Mustela putorius furo" ; - bbqs:title "Mapping dynamic transitions across neural, behavioral, and social scales in interacting animals" . + bbqs:title "Mapping dynamic transitions across neural, behavioral, and social scales in interacting animals" ; + bbqs:uses_device_category bid:006caa68-8b24-474f-867f-82a6199a84b1, + bid:851882bb-3321-45ed-af75-6ae08836c1fc, + bid:dac56889-e81e-478e-827d-7f08bb15efd3, + bid:e2c21bfc-1707-4f6d-aa18-c6db03f53c2d, + bid:e9d52180-5701-46ba-b5dc-7fc6fa32233b, + bid:f328ad53-2dd2-490f-adf1-40e9cd85b5bd, + bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 . bid:f70949e4-d1f6-4364-a940-741c96057bae a bbqs:Project ; bbqs:abstract """Project Summary @@ -6428,8 +6589,16 @@ of determining sources of inattention on individual basis, thus allowing for mor bbqs:reporter_project_num "5R61MH138713-02" ; bbqs:studies_human true ; bbqs:studies_species bid:63464d21-4ef2-4405-a192-4b60e344ff40 ; - bbqs:studies_species_name "Humans" ; - bbqs:title "Combining neural oscillations, physiology and privacy-preserving LiDAR/millimeter wave sensing technology to track attention states in natural contexts" . + bbqs:title "Combining neural oscillations, physiology and privacy-preserving LiDAR/millimeter wave sensing technology to track attention states in natural contexts" ; + bbqs:uses_device_category bid:006caa68-8b24-474f-867f-82a6199a84b1, + bid:851882bb-3321-45ed-af75-6ae08836c1fc, + bid:dac56889-e81e-478e-827d-7f08bb15efd3, + bid:e2c21bfc-1707-4f6d-aa18-c6db03f53c2d, + bid:f328ad53-2dd2-490f-adf1-40e9cd85b5bd, + bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 . + +bid:766331fd-daea-4a31-86c4-589737e533ea a bbqs:ResearchOrganization ; + bbqs:name "BBQS Consortium" . bid:829b9463-611f-45d6-bd24-262a5410c325 a bbqs:DeviceCategory ; bbqs:category_key "clinical_assessment" ; @@ -6437,7 +6606,10 @@ bid:829b9463-611f-45d6-bd24-262a5410c325 a bbqs:DeviceCategory ; bbqs:label "Clinical Assessment Instrument" ; bbqs:measures "Scaled scores", "subscale scores" ; - bbqs:name "Clinical Assessment Instrument" . + bbqs:name "Clinical Assessment Instrument" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Diagnostic assessment", + "Phenotyping" . bid:8095d361-d12f-4015-86e7-67fced46f2e9 a bbqs:Project ; bbqs:abstract """Project Summary @@ -6477,7 +6649,6 @@ electroencephalographic (iEEG) recordings from DBS""" ; bbqs:reporter_project_num "1U01MH144347-01" ; bbqs:studies_human true ; bbqs:studies_species bid:63464d21-4ef2-4405-a192-4b60e344ff40 ; - bbqs:studies_species_name "Homo sapiens" ; bbqs:title "SMART-DBS: A Symptom-Manipulating, Adaptive and Responsive Therapy for continuous brain-behavioral recording and stimulation" . bid:9f227f88-53ba-4c7c-91e7-334641e4b759 a bbqs:Species ; @@ -6536,8 +6707,32 @@ understanding of primate social interactions to date, along with novel generativ bbqs:reporter_project_num "1U01DA063534-01" ; bbqs:studies_human false ; bbqs:studies_species bid:bef479f9-d7a4-472b-8ff7-eb0b098beb7c ; - bbqs:studies_species_name "Marmosets" ; - bbqs:title "Toward comprehensive models of naturalistic cooperation and competition in primates" . + bbqs:title "Toward comprehensive models of naturalistic cooperation and competition in primates" ; + bbqs:uses_device_category bid:dac56889-e81e-478e-827d-7f08bb15efd3, + bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 . + +bid:e9d52180-5701-46ba-b5dc-7fc6fa32233b a bbqs:DeviceCategory ; + bbqs:category_key "neurostimulation" ; + bbqs:description "Implanted stimulation systems with chronic sensing capability." ; + bbqs:label "Neurostimulation / DBS" ; + bbqs:measures "LFP", + "event markers", + "stimulation parameters" ; + bbqs:name "Neurostimulation / DBS" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Deep brain stimulation", + "Responsive neurostimulation" . + +bid:e80e0495-82ff-4d51-995f-36e9349b40fb a bbqs:DeviceCategory ; + bbqs:category_key "microphone" ; + bbqs:description "Audible-range microphones, arrays, and field recorders." ; + bbqs:label "Microphone / Audio Recorder" ; + bbqs:measures "Audio waveform", + "sound pressure level" ; + bbqs:name "Microphone / Audio Recorder" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Passive acoustic monitoring", + "Speech and vocalization capture" . bid:4a00b65d-6b1b-4385-86c7-9f72c2724152 a bbqs:Project ; bbqs:abstract """SUMMARY @@ -6646,7 +6841,10 @@ objectives of transforming our understanding of the link between brain and behav bbqs:reporter_project_num "1R24MH136632-01" ; bbqs:studies_human true ; bbqs:study_scope "All Species" ; - bbqs:title "Ecosystem for Multi-modal Brain-behavior Experimentation and Research (EMBER)" . + bbqs:title "Ecosystem for Multi-modal Brain-behavior Experimentation and Research (EMBER)" ; + bbqs:uses_device_category bid:d8cef433-7209-4e63-bdd5-a3f52bd9dd89, + bid:dac56889-e81e-478e-827d-7f08bb15efd3, + bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 . bid:63464d21-4ef2-4405-a192-4b60e344ff40 a bbqs:Species ; bbqs:aliases "Homo sapiens", @@ -6659,6 +6857,81 @@ bid:63464d21-4ef2-4405-a192-4b60e344ff40 a bbqs:Species ; bbqs:name "Human" ; bbqs:taxonomy_class "Mammalia" . +bid:e2c21bfc-1707-4f6d-aa18-c6db03f53c2d a bbqs:DeviceCategory ; + bbqs:category_key "imu" ; + bbqs:description "Inertial measurement units, accelerometers, and gyroscopes." ; + bbqs:label "IMU / Accelerometry" ; + bbqs:measures "Acceleration", + "angular velocity", + "orientation" ; + bbqs:name "IMU / Accelerometry" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Actigraphy", + "Activity recognition", + "Head movement" . + +bid:851882bb-3321-45ed-af75-6ae08836c1fc a bbqs:DeviceCategory ; + bbqs:category_key "wearable_multimodal" ; + bbqs:description "Wrist- and body-worn devices combining several physiological sensors." ; + bbqs:label "Multimodal Wearable" ; + bbqs:measures "EDA", + "PPG", + "accelerometry", + "temperature" ; + bbqs:name "Multimodal Wearable" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Ambulatory physiology", + "Naturalistic monitoring" . + +bid:f328ad53-2dd2-490f-adf1-40e9cd85b5bd a bbqs:DeviceCategory ; + bbqs:category_key "ephys_probe" ; + bbqs:description "High-density silicon probes and electrode arrays for extracellular recording." ; + bbqs:label "Electrophysiology Probe" ; + bbqs:measures "LFP", + "Spikes", + "multi-unit activity" ; + bbqs:name "Electrophysiology Probe" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Freely moving recording", + "Population neural dynamics" . + +bid:006caa68-8b24-474f-867f-82a6199a84b1 a bbqs:DeviceCategory ; + bbqs:category_key "wireless_ephys" ; + bbqs:description "Untethered neural acquisition systems and telemetry headstages." ; + bbqs:label "Wireless Electrophysiology" ; + bbqs:measures "LFP", + "Spikes", + "synchronized video" ; + bbqs:name "Wireless Electrophysiology" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Freely behaving recording", + "Social interaction neurophysiology" . + +bid:dac56889-e81e-478e-827d-7f08bb15efd3 a bbqs:DeviceCategory ; + bbqs:category_key "motion_capture" ; + bbqs:description "Marker-based and inertial motion capture systems." ; + bbqs:label "Motion Capture" ; + bbqs:measures "3D marker positions", + "joint angles", + "segment kinematics" ; + bbqs:name "Motion Capture" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Full-body kinematics", + "Gait analysis", + "Reaching and locomotion" . + +bid:ffee4fa8-d435-43e4-8c3d-9c4570b54ab0 a bbqs:DeviceCategory ; + bbqs:category_key "video_camera" ; + bbqs:description "Standard or high-speed cameras recording visible-light behavioural video." ; + bbqs:label "Video Camera" ; + bbqs:measures "RGB video", + "frame timestamps" ; + bbqs:name "Video Camera" ; + bbqs:schema_org_type "MedicalDevice" ; + bbqs:typical_use_cases "Behavioural video capture", + "Pose estimation input", + "Social interaction recording" . + bid:4737d7d7-4bbe-4b72-b397-5f341a0dd5dd a bbqs:WorkingGroup ; bbqs:name "WG-Standards" . diff --git a/kg/export/quality.json b/kg/export/quality.json index 8ee7ac2f..d40f8ab4 100644 --- a/kg/export/quality.json +++ b/kg/export/quality.json @@ -2,40 +2,40 @@ "data_file": "kg/export/bbqs.ttl", "access": "anon", "source": "kg/export/bbqs.ttl", - "built_at": "2026-11-05T01:07:02+00:00", - "commit": "63f6177a + uncommitted kg/ changes", + "built_at": "2026-11-18T21:14:57+00:00", + "commit": "ae2f17e9 + uncommitted kg/ changes", "structure": { - "triples": 5039, - "nodes": 808, - "edges": 868, - "components": 214, - "largest_component": 516, - "isolated": 189, + "triples": 5362, + "nodes": 758, + "edges": 1050, + "components": 101, + "largest_component": 575, + "isolated": 73, "dangling_refs": [], "per_class": { "Announcement": { "nodes": 12, - "isolated": 6, - "mean_degree": 0.5, + "isolated": 0, + "mean_degree": 1.0, "max_degree": 1, - "out_edges": 6, + "out_edges": 12, "in_edges": 0 }, "Benchmark": { "nodes": 4, - "isolated": 4, - "mean_degree": 0.0, - "max_degree": 0, - "out_edges": 0, - "in_edges": 0 + "isolated": 2, + "mean_degree": 0.5, + "max_degree": 1, + "out_edges": 1, + "in_edges": 1 }, "Dataset": { - "nodes": 53, - "isolated": 49, - "mean_degree": 0.08, + "nodes": 20, + "isolated": 15, + "mean_degree": 0.25, "max_degree": 1, "out_edges": 0, - "in_edges": 4 + "in_edges": 5 }, "Device": { "nodes": 35, @@ -47,11 +47,11 @@ }, "DeviceCategory": { "nodes": 34, - "isolated": 14, - "mean_degree": 1.03, - "max_degree": 6, + "isolated": 12, + "mean_degree": 4.76, + "max_degree": 26, "out_edges": 0, - "in_edges": 35 + "in_edges": 162 }, "DeviceManufacturer": { "nodes": 32, @@ -63,34 +63,34 @@ }, "Event": { "nodes": 1, - "isolated": 1, - "mean_degree": 0.0, - "max_degree": 0, - "out_edges": 0, + "isolated": 0, + "mean_degree": 1.0, + "max_degree": 1, + "out_edges": 1, "in_edges": 0 }, "FundingOpportunity": { - "nodes": 14, - "isolated": 14, - "mean_degree": 0.0, - "max_degree": 0, - "out_edges": 0, + "nodes": 13, + "isolated": 0, + "mean_degree": 1.0, + "max_degree": 1, + "out_edges": 13, "in_edges": 0 }, "Investigator": { - "nodes": 262, - "isolated": 52, - "mean_degree": 2.02, + "nodes": 246, + "isolated": 7, + "mean_degree": 2.28, "max_degree": 6, "out_edges": 268, - "in_edges": 262 + "in_edges": 293 }, "Job": { "nodes": 6, "isolated": 0, - "mean_degree": 1.0, - "max_degree": 1, - "out_edges": 6, + "mean_degree": 1.33, + "max_degree": 2, + "out_edges": 8, "in_edges": 0 }, "MLModel": { @@ -104,9 +104,9 @@ "Project": { "nodes": 33, "isolated": 0, - "mean_degree": 7.76, - "max_degree": 22, - "out_edges": 128, + "mean_degree": 11.67, + "max_degree": 27, + "out_edges": 257, "in_edges": 128 }, "ProjectRole": { @@ -134,25 +134,25 @@ "in_edges": 89 }, "ResearchOrganization": { - "nodes": 57, - "isolated": 17, - "mean_degree": 2.65, - "max_degree": 17, - "out_edges": 136, - "in_edges": 15 + "nodes": 59, + "isolated": 9, + "mean_degree": 3.41, + "max_degree": 20, + "out_edges": 165, + "in_edges": 36 }, "SoftwareTool": { - "nodes": 24, - "isolated": 24, - "mean_degree": 0.0, - "max_degree": 0, - "out_edges": 0, - "in_edges": 0 + "nodes": 23, + "isolated": 21, + "mean_degree": 0.09, + "max_degree": 1, + "out_edges": 1, + "in_edges": 1 }, "Species": { - "nodes": 15, - "isolated": 2, - "mean_degree": 2.13, + "nodes": 14, + "isolated": 1, + "mean_degree": 2.29, "max_degree": 13, "out_edges": 0, "in_edges": 32 @@ -185,7 +185,7 @@ "from": "ResearchOrganization", "predicate": "members", "to": "Investigator", - "count": 136 + "count": 165 }, { "from": "ProjectRole", @@ -193,6 +193,12 @@ "to": "Project", "count": 128 }, + { + "from": "Project", + "predicate": "uses_device_category", + "to": "DeviceCategory", + "count": 127 + }, { "from": "ProjectRole", "predicate": "held_by", @@ -207,14 +213,14 @@ }, { "from": "Device", - "predicate": "manufacturer", - "to": "DeviceManufacturer", + "predicate": "device_category", + "to": "DeviceCategory", "count": 35 }, { "from": "Device", - "predicate": "device_category", - "to": "DeviceCategory", + "predicate": "manufacturer", + "to": "DeviceManufacturer", "count": 35 }, { @@ -223,11 +229,17 @@ "to": "Species", "count": 32 }, + { + "from": "FundingOpportunity", + "predicate": "part_of_org", + "to": "ResearchOrganization", + "count": 13 + }, { "from": "Announcement", "predicate": "part_of_org", "to": "ResearchOrganization", - "count": 6 + "count": 12 }, { "from": "Job", @@ -239,13 +251,43 @@ "from": "Project", "predicate": "funded_datasets", "to": "Dataset", - "count": 4 + "count": 5 }, { "from": "Project", "predicate": "part_of_org", "to": "ResearchOrganization", "count": 3 + }, + { + "from": "Job", + "predicate": "posted_by", + "to": "Investigator", + "count": 2 + }, + { + "from": "SoftwareTool", + "predicate": "part_of_org", + "to": "ResearchOrganization", + "count": 1 + }, + { + "from": "Benchmark", + "predicate": "evaluates", + "to": "SoftwareTool", + "count": 1 + }, + { + "from": "Project", + "predicate": "produced", + "to": "Benchmark", + "count": 1 + }, + { + "from": "Event", + "predicate": "part_of_org", + "to": "ResearchOrganization", + "count": 1 } ] }, @@ -255,6 +297,8 @@ "area": "projects", "question": "Which projects are in the consortium, with grant number and mechanism?", "access": "anon", + "set": "adopted", + "reads": "rows", "sparql": "SELECT ?project ?grant_number ?mechanism WHERE {\n ?project a bbqs:Project ; bbqs:grant_number ?grant_number .\n OPTIONAL { ?project bbqs:mechanism ?mechanism }\n} ORDER BY ?grant_number", "terms": [ "Project", @@ -402,6 +446,8 @@ "area": "projects", "question": "What is the total award amount per mechanism?", "access": "anon", + "set": "adopted", + "reads": "rows", "sparql": "SELECT ?mechanism (COUNT(?project) AS ?projects) (SUM(?amount) AS ?total) WHERE {\n ?project a bbqs:Project ; bbqs:mechanism ?mechanism ; bbqs:award_amount ?amount .\n} GROUP BY ?mechanism ORDER BY DESC(?total)", "terms": [ "Project", @@ -449,6 +495,8 @@ "area": "projects", "question": "Which institution hosts each project?", "access": "anon", + "set": "adopted", + "reads": "rows", "sparql": "SELECT ?project ?grant_number ?org_name WHERE {\n ?project a bbqs:Project ; bbqs:grant_number ?grant_number ; bbqs:part_of_org ?org .\n ?org bbqs:name ?org_name .\n}", "terms": [ "Project", @@ -487,6 +535,8 @@ "area": "people", "question": "Who holds a role on R34DA059723, and what role?", "access": "anon", + "set": "adopted", + "reads": "rows", "sparql": "SELECT ?name ?role WHERE {\n ?project bbqs:grant_number \"R34DA059723\" .\n ?pr a bbqs:ProjectRole ; bbqs:on_project ?project ; bbqs:project_role ?role ;\n bbqs:held_by ?person .\n ?person bbqs:name ?name .\n}", "terms": [ "ProjectRole", @@ -519,6 +569,8 @@ "area": "people", "question": "Which investigators hold roles on more than one project?", "access": "anon", + "set": "adopted", + "reads": "rows", "sparql": "SELECT ?name (COUNT(DISTINCT ?project) AS ?projects) WHERE {\n ?pr a bbqs:ProjectRole ; bbqs:held_by ?person ; bbqs:on_project ?project .\n ?person bbqs:name ?name .\n} GROUP BY ?person ?name HAVING (COUNT(DISTINCT ?project) > 1) ORDER BY DESC(?projects)", "terms": [ "ProjectRole", @@ -569,6 +621,8 @@ "area": "people", "question": "Which organization is each investigator affiliated with?", "access": "anon", + "set": "adopted", + "reads": "rows", "sparql": "SELECT ?name ?org_name WHERE {\n ?org a bbqs:ResearchOrganization ; bbqs:name ?org_name ; bbqs:members ?person .\n ?person a bbqs:Investigator ; bbqs:name ?name .\n}", "terms": [ "Investigator", @@ -606,10 +660,18 @@ "Laura Cabrera", "PENNSYLVANIA STATE UNIVERSITY" ], + [ + "Andrew MacAskill", + "University College London" + ], [ "Caleb Scott-Joseph", "UNIVERSITY OF PENNSYLVANIA" ], + [ + "Olha Metenko", + "UNIVERSITY OF PENNSYLVANIA" + ], [ "Claire Kendell", "UNIVERSITY OF PENNSYLVANIA" @@ -663,27 +725,19 @@ "UNIVERSITY OF PENNSYLVANIA" ], [ - "Brock Wester", + "Nicole Tregoning", "JOHNS HOPKINS UNIVERSITY" ], [ - "Jennie Grammer", - "UNIVERSITY OF CALIFORNIA LOS ANGELES" - ], - [ - "Agatha Lenartowicz", - "UNIVERSITY OF CALIFORNIA LOS ANGELES" - ], - [ - "Gregory Darin Field", - "UNIVERSITY OF CALIFORNIA LOS ANGELES" + "Brock Wester", + "JOHNS HOPKINS UNIVERSITY" ], [ - "Emre Ertin", + "Jennie Grammer", "UNIVERSITY OF CALIFORNIA LOS ANGELES" ] ], - "row_count": 136, + "row_count": 165, "status": "answered" }, { @@ -691,6 +745,8 @@ "area": "people", "question": "Which investigators have an ORCID?", "access": "anon", + "set": "adopted", + "reads": "rows", "sparql": "SELECT ?name ?orcid WHERE {\n ?person a bbqs:Investigator ; bbqs:name ?name ; bbqs:orcid ?orcid .\n}", "terms": [ "Investigator", @@ -727,10 +783,6 @@ "Ashley Feinsinger", "https://orcid.org/0000-0002-0251-8810" ], - [ - "Andrew MacAskill", - "https://orcid.org/0000-0002-0196-3779" - ], [ "Jennifer Wagner", "https://orcid.org/0000-0002-2278-0306" @@ -739,10 +791,6 @@ "Yibei Chen", "https://orcid.org/0000-0003-2882-0900" ], - [ - "Meaghan Perdue", - "https://orcid.org/0000-0002-6113-9175" - ], [ "Stephanie Prince", "https://orcid.org/0000-0002-3083-6955" @@ -763,10 +811,6 @@ "Oliver Ruebel", "https://orcid.org/0000-0001-9902-1984" ], - [ - "Joseph Monaco", - "https://orcid.org/0000-0003-0792-8322" - ], [ "Dmitry Batenkov", "https://orcid.org/0000-0003-2679-0138" @@ -795,13 +839,25 @@ "Emily Mackevicius", "https://orcid.org/0000-0001-6593-4398" ], - [ - "Annette Estes", - "https://orcid.org/0000-0003-2687-4155" - ], [ "Dimitris Samaras", "https://orcid.org/0000-0002-1373-0294" + ], + [ + "Vivek Prakash", + "https://orcid.org/0000-0003-4569-6462" + ], + [ + "Ralph Peterson", + "https://orcid.org/0000-0002-2692-5955" + ], + [ + "Eran Klein", + "https://orcid.org/0000-0002-0132-5777" + ], + [ + "Kailin Zhuang", + "https://orcid.org/0000-0001-9233-534X" ] ], "row_count": 112, @@ -812,6 +868,8 @@ "area": "working_groups", "question": "Who are the members of WG-Devices?", "access": "anon", + "set": "adopted", + "reads": "rows", "sparql": "SELECT ?name WHERE {\n ?wg a bbqs:WorkingGroup ; bbqs:name \"WG-Devices\" .\n ?person bbqs:member_of_group ?wg ; bbqs:name ?name .\n}", "terms": [ "WorkingGroup", @@ -907,6 +965,8 @@ "area": "species", "question": "Which projects study the house mouse?", "access": "anon", + "set": "adopted", + "reads": "rows", "sparql": "SELECT ?project ?grant_number WHERE {\n ?species a bbqs:Species ; bbqs:common_name \"House Mouse\" .\n ?project bbqs:studies_species ?species ; bbqs:grant_number ?grant_number .\n}", "terms": [ "Species", @@ -957,6 +1017,8 @@ "area": "species", "question": "Which projects study mammals?", "access": "anon", + "set": "adopted", + "reads": "rows", "sparql": "SELECT DISTINCT ?project ?grant_number WHERE {\n ?species a bbqs:Species ; bbqs:taxonomy_class \"Mammalia\" .\n ?project bbqs:studies_species ?species ; bbqs:grant_number ?grant_number .\n}", "terms": [ "Species", @@ -1079,6 +1141,8 @@ "area": "species", "question": "Which projects name no resolvable species, and is that by design?", "access": "anon", + "set": "adopted", + "reads": "rows", "sparql": "SELECT ?project ?grant_number ?scope WHERE {\n ?project a bbqs:Project ; bbqs:grant_number ?grant_number .\n FILTER NOT EXISTS { ?project bbqs:studies_species ?s }\n OPTIONAL { ?project bbqs:study_scope ?scope }\n}", "terms": [ "Project", @@ -1122,6 +1186,8 @@ "area": "products", "question": "Which publications came out of which project?", "access": "anon", + "set": "adopted", + "reads": "rows", "sparql": "SELECT ?grant_number ?title WHERE {\n ?project a bbqs:Project ; bbqs:grant_number ?grant_number ; bbqs:produced ?pub .\n ?pub a bbqs:Publication ; bbqs:title ?title .\n}", "terms": [ "Project", @@ -1245,6 +1311,8 @@ "area": "products", "question": "Which datasets were produced under which project?", "access": "anon", + "set": "adopted", + "reads": "rows", "sparql": "SELECT ?grant_number ?dataset_name WHERE {\n ?project a bbqs:Project ; bbqs:grant_number ?grant_number ;\n (bbqs:funded_datasets|bbqs:produced) ?dataset .\n ?dataset a bbqs:Dataset ; bbqs:name ?dataset_name .\n}", "terms": [ "Dataset", @@ -1260,6 +1328,10 @@ "dataset_name" ], "rows": [ + [ + "R34DA062119", + "Four-choice reversal digging task" + ], [ "R24MH136632", "EMBER Bees DeepLabCut Training — Workflow Smoke Test" @@ -1277,7 +1349,7 @@ "Mouse food sniff" ] ], - "row_count": 4, + "row_count": 5, "status": "answered" }, { @@ -1285,6 +1357,8 @@ "area": "products", "question": "Which device categories does each project use?", "access": "anon", + "set": "adopted", + "reads": "rows", "sparql": "SELECT ?grant_number ?category WHERE {\n ?project a bbqs:Project ; bbqs:grant_number ?grant_number ; bbqs:uses_device_category ?cat .\n ?cat bbqs:label ?category .\n}", "terms": [ "Project", @@ -1292,19 +1366,123 @@ "label", "uses_device_category" ], - "unmodeled": [ - "uses_device_category" + "unmodeled": [], + "columns": [ + "grant_number", + "category" ], - "columns": [], - "rows": [], - "row_count": 0, - "status": "unmodeled" + "rows": [ + [ + "R34DA059514", + "Multimodal Wearable" + ], + [ + "R34DA059514", + "Motion Capture" + ], + [ + "R34DA059514", + "IMU / Accelerometry" + ], + [ + "R34DA059514", + "Video Camera" + ], + [ + "R61MH135106", + "Wireless Electrophysiology" + ], + [ + "R61MH135106", + "Multimodal Wearable" + ], + [ + "R61MH135106", + "Motion Capture" + ], + [ + "R61MH135106", + "IMU / Accelerometry" + ], + [ + "R61MH135106", + "Electrophysiology Probe" + ], + [ + "R61MH135106", + "Video Camera" + ], + [ + "R34DA061984", + "Wireless Electrophysiology" + ], + [ + "R34DA061984", + "Motion Capture" + ], + [ + "R34DA061984", + "Electrophysiology Probe" + ], + [ + "R34DA061984", + "Video Camera" + ], + [ + "R34DA059723", + "Motion Capture" + ], + [ + "R34DA059723", + "Video Camera" + ], + [ + "R61MH135109", + "Wireless Electrophysiology" + ], + [ + "R61MH135109", + "Multimodal Wearable" + ], + [ + "R61MH135109", + "Neural Imaging" + ], + [ + "R61MH135109", + "Motion Capture" + ], + [ + "R61MH135109", + "IMU / Accelerometry" + ], + [ + "R61MH135109", + "Microphone / Audio Recorder" + ], + [ + "R61MH135109", + "Neurostimulation / DBS" + ], + [ + "R61MH135109", + "Electrophysiology Probe" + ], + [ + "R61MH135109", + "Video Camera" + ] + ], + "row_count": 127, + "status": "answered" }, { "id": "CQ15", "area": "products", "question": "Which devices does each manufacturer make, by category?", "access": "anon", + "set": "adopted", + "reads": "rows", "sparql": "SELECT ?manufacturer ?model ?category WHERE {\n ?device a bbqs:Device ; bbqs:model_name ?model ; bbqs:manufacturer ?m .\n ?m bbqs:name ?manufacturer .\n OPTIONAL { ?device bbqs:device_category ?category }\n}", "terms": [ "Device", @@ -1454,6 +1632,8 @@ "area": "products", "question": "Which software tools does the consortium provide, with their repositories?", "access": "anon", + "set": "adopted", + "reads": "rows", "sparql": "SELECT ?name ?repo WHERE {\n ?tool a bbqs:SoftwareTool ; bbqs:name ?name ; bbqs:repo_url ?repo .\n}", "terms": [ "SoftwareTool", @@ -1482,10 +1662,6 @@ "Lightning Pose", "https://github.com/paninski-lab/lightning-pose" ], - [ - "DeepLabCut", - "https://deeplabcut.github.io/DeepLabCut/" - ], [ "OpenPose", "https://github.com/CMU-Perceptual-Computing-Lab/openpose" @@ -1537,6 +1713,10 @@ [ "JAABA", "https://jaaba.sourceforge.net/" + ], + [ + "DeepLabCut", + "https://deeplabcut.github.io/DeepLabCut/" ] ], "row_count": 18, @@ -1547,6 +1727,8 @@ "area": "announcements", "question": "Which funding opportunities are still open (expiration after 2026-09-29)?", "access": "anon", + "set": "adopted", + "reads": "rows", "sparql": "SELECT ?title ?expires WHERE {\n ?fo a bbqs:FundingOpportunity ; bbqs:name ?title ; bbqs:expiration_date ?expires .\n FILTER (?expires > \"2026-09-29\"^^xsd:date)\n}", "terms": [ "FundingOpportunity", @@ -1559,55 +1741,105 @@ "expires" ], "rows": [ + [ + "PRIMED-AI: Data-to-Model Academic-Industrial Partnerships (D2M-AIP) for Precision Medicine with AI: Integrating Imaging with Multimodal Data (UG3/UH3 Clinical Trial Optional)", + "2026-10-20" + ], + [ + "Utilizing the Full Power of Empire AI — Request for Applications (Simons Foundation)", + "2026-12-01" + ], [ "BRAIN Initiative: Data Knowledgebase Ecosystem and NeuroAI Integration (NIH Highlighted Topic)", "2027-09-29" ], + [ + "Development and Testing of a Multi-use Frameworks Playbook for Precision Medicine with AI: Integrating Imaging with Multimodal Data (PRIMED-AI) (U01 Clinical Trial Not Allowed)", + "2026-10-10" + ], [ "BRAIN Initiative: Research Resource Grants for Technology Integration and Dissemination (U24 Clinical Trial Not Allowed)", "2028-10-07" ], + [ + "Validation Center for Precision Medicine with AI: Integrating Imaging with Multimodal Data (PRIMED-AI) (U54 Clinical Trials Not Allowed)", + "2026-10-03" + ], [ "BRAIN Initiative: Integrative Team-Research BRAIN Circuits Program - iBCP (RM1 Clinical Trial Not Allowed)", "2028-06-24" ], [ - "BRAIN Initiative: Theories, Models and Methods for Analysis of Complex Data from the Brain (R01 Clinical Trial Not Allowed)", - "2027-11-09" + "NSF Graduate Research Fellowship Program (GRFP)", + "2026-10-23" ], [ - "BRAIN Initiative: Integrative Team-Research BRAIN Circuits Program - iTeamBCP (RM1) [forecast — superseded by RFA-NS-27-002]", - "2027-06-16" + "Model-to-Clinic (M2C) for Precision Medicine with AI: Integrating Imaging with Multimodal Data (PRIMED-AI) (UG3/UH3 Clinical Trial Optional)", + "2026-10-20" + ], + [ + "BRAIN Initiative: Theories, Models and Methods for Analysis of Complex Data from the Brain (R01 Clinical Trial Not Allowed)", + "2027-11-09" ] ], - "row_count": 5, + "row_count": 10, "status": "answered" }, { "id": "CQ18", "area": "announcements", "question": "Which jobs are posted, and by which institution?", - "access": "full", - "sparql": "SELECT ?title ?institution WHERE {\n ?job a bbqs:Job ; bbqs:name ?title ; bbqs:job_institution ?institution .\n}", + "access": "anon", + "set": "adopted", + "reads": "rows", + "sparql": "SELECT ?title ?institution WHERE {\n ?job a bbqs:Job ; bbqs:name ?title .\n { ?job bbqs:part_of_org ?org . ?org bbqs:name ?institution }\n UNION\n { ?job bbqs:job_institution ?institution . FILTER NOT EXISTS { ?job bbqs:part_of_org ?linked } }\n}", "terms": [ "Job", "job_institution", - "name" + "name", + "part_of_org" ], "unmodeled": [], "columns": [ "title", "institution" ], - "rows": [], - "row_count": 0, - "status": "n/a" + "rows": [ + [ + "Postdoctoral position in statistical methods for behavioral analysis", + "NEW YORK UNIVERSITY" + ], + [ + "Theoretical Understanding of Distributed Neural Population Dynamics (Theory_PD)", + "UNIVERSITY OF CALIFORNIA BERKELEY" + ], + [ + "Organoid Intelligence through Control of Neural Population Dynamics (FBC_PD)", + "UNIVERSITY OF CALIFORNIA BERKELEY" + ], + [ + "Canada Impact+ Postdoctoral Research Training Award ($70K/yr, 2 years)", + "MCGILL UNIVERSITY" + ], + [ + "Canada Impact+ Doctoral Research Training Award ($40K/yr, 3 years)", + "MCGILL UNIVERSITY" + ], + [ + "Engineer/Data Science positions at International Brain Laboratory (IBL) ", + "INTERNATIONAL BRAIN LABORATORY" + ] + ], + "row_count": 6, + "status": "answered" }, { "id": "CQ19", "area": "provenance", "question": "Where did R34DA059723's title come from (source class and grade)?", "access": "full", + "set": "adopted", + "reads": "rows", "sparql": "SELECT ?value ?source ?grade WHERE {\n ?project bbqs:grant_number \"R34DA059723\" .\n BIND(STRAFTER(STR(?project), \"https://brain-bbqs.org/id/\") AS ?localId)\n ?prov a bbqs:ProvenanceRecord ; bbqs:prov_entity_id ?localId ;\n bbqs:prov_entity_column \"title\" ; bbqs:prov_value_text ?value ;\n bbqs:prov_source_class ?source .\n OPTIONAL { ?source bbqs:grade ?grade }\n}", "terms": [ "ProvenanceRecord", @@ -1627,3015 +1859,2687 @@ "rows": [], "row_count": 0, "status": "n/a" - } - ], - "competency_summary": { - "answered": 16, - "unmodeled": 1, - "n/a": 2 - }, - "shapes": [ - { - "shape": "AuthorOrcidResolvesShape", - "target_class": "Publication", - "targets": 89, - "checks": [ - "Investigator", - "author_orcids", - "orcid" - ], - "missing_inputs": [], - "exercised": true - }, - { - "shape": "ConflictingVerifiedProvenanceShape", - "target_class": "ProvenanceRecord", - "targets": 0, - "checks": [ - "is_verified", - "prov_entity_column", - "prov_entity_id", - "prov_entity_table", - "prov_source_class", - "prov_value_text" - ], - "missing_inputs": [ - "is_verified", - "prov_entity_column", - "prov_entity_id", - "prov_entity_table", - "prov_source_class", - "prov_value_text" - ], - "exercised": false }, { - "shape": "ConsortiumRoleNotAProjectRoleShape", - "target_class": "Investigator", - "targets": 262, - "checks": [ + "id": "CQ20", + "area": "people", + "question": "Which investigators are on more than one project, and which projects?", + "access": "anon", + "set": "adopted", + "reads": "rows", + "sparql": "SELECT ?name (GROUP_CONCAT(DISTINCT ?grant; separator=\", \") AS ?projects) WHERE {\n ?pr a bbqs:ProjectRole ; bbqs:held_by ?person ; bbqs:on_project ?project .\n ?person bbqs:name ?name . ?project bbqs:grant_number ?grant .\n} GROUP BY ?person ?name HAVING (COUNT(DISTINCT ?project) > 1) ORDER BY ?name", + "terms": [ "ProjectRole", - "consortium_role", + "grant_number", "held_by", - "project_role" + "name", + "on_project" ], - "missing_inputs": [], - "exercised": true - }, - { - "shape": "EmailUniquePerPersonShape", - "target_class": "Investigator", - "targets": 262, - "checks": [ - "email", - "secondary_emails" + "unmodeled": [], + "columns": [ + "name", + "projects" ], - "missing_inputs": [ - "email", - "secondary_emails" + "rows": [ + [ + "Alex Williams", + "U01DA063581, R34DA059513" + ], + [ + "Dan Sanes", + "R34DA059513, U01DA063581" + ], + [ + "David Schneider", + "U01DA063581, R34DA059513" + ], + [ + "Firooz Aflatouni", + "R34DA059507, U01MH144347" + ], + [ + "NANTHIA W SUTHANA", + "R61MH135106, U01MH143789" + ], + [ + "Shreya Saxena", + "U01DA063534, R34DA059718" + ], + [ + "Timothy Dunn", + "R34DA059506, R34DA059512" + ] ], - "exercised": false + "row_count": 7, + "status": "answered" }, { - "shape": "GradedProvenancePrecedenceShape", - "target_class": "ProvenanceRecord", - "targets": 0, - "checks": [ - "grade", - "prov_entity_column", - "prov_entity_id", - "prov_entity_table", - "prov_source_class", - "prov_value_text" + "id": "CQ21", + "area": "people", + "question": "Which investigators have no ORCID recorded?", + "access": "anon", + "set": "adopted", + "reads": "absence", + "sparql": "SELECT ?name WHERE {\n ?person a bbqs:Investigator ; bbqs:name ?name .\n FILTER NOT EXISTS { ?person bbqs:orcid ?o }\n} ORDER BY ?name", + "terms": [ + "Investigator", + "name", + "orcid" ], - "missing_inputs": [ - "grade", - "prov_entity_column", - "prov_entity_id", - "prov_entity_table", - "prov_source_class", - "prov_value_text" + "unmodeled": [], + "columns": [ + "name" ], - "exercised": false + "rows": [ + [ + "Abigayle Fogarty" + ], + [ + "Adam Friedman" + ], + [ + "Alex Cabral" + ], + [ + "Amelia Johnson" + ], + [ + "Amrita Nair" + ], + [ + "Anibal Heinsfeld" + ], + [ + "Arina Knowlton" + ], + [ + "Ashlee Van't Veer" + ], + [ + "Avniel Ghuman" + ], + [ + "Aydin Tasevac" + ], + [ + "Brandon Brooks-Patton" + ], + [ + "Brendan Ito" + ], + [ + "Brent Kious" + ], + [ + "Brian Gitahi" + ], + [ + "Brian Leonard" + ], + [ + "Caleb Scott-Joseph" + ], + [ + "Casey Harrison Halpern" + ], + [ + "Chaoyi Zhang" + ], + [ + "Cheryl Corcoran" + ], + [ + "Christina Hatch" + ], + [ + "Christina Liu" + ], + [ + "Cory Inman" + ], + [ + "Crystal Lantz" + ], + [ + "Dan Waxman" + ], + [ + "Dana Schloesser" + ] + ], + "row_count": 134, + "status": "answered" }, { - "shape": "HeldByResolvesShape", - "target_class": "ProjectRole", - "targets": 128, - "checks": [ + "id": "CQ22", + "area": "people", + "question": "Which organization is each investigator tied to, directly or through a project?", + "access": "anon", + "set": "adopted", + "reads": "rows", + "sparql": "SELECT DISTINCT ?name ?org_name WHERE {\n ?person a bbqs:Investigator ; bbqs:name ?name .\n { ?org bbqs:members ?person }\n UNION\n { ?pr bbqs:held_by ?person ; bbqs:on_project ?p . ?p bbqs:part_of_org ?org }\n ?org bbqs:name ?org_name .\n} ORDER BY ?org_name ?name", + "terms": [ + "Investigator", "held_by", - "on_project" + "members", + "name", + "on_project", + "part_of_org" ], - "missing_inputs": [], - "exercised": true - }, - { - "shape": "MechanismMatchesGrantNumberShape", - "target_class": "Project", - "targets": 33, - "checks": [ - "grant_number", - "mechanism" + "unmodeled": [], + "columns": [ + "name", + "org_name" ], - "missing_inputs": [], - "exercised": true - }, - { - "shape": "NodeHasProvenanceShape", - "target_class": "Project", - "targets": 33, - "checks": [ - "ProvenanceRecord", - "prov_entity_id" - ], - "missing_inputs": [ - "ProvenanceRecord", - "prov_entity_id" + "rows": [ + [ + "Markus Meister", + "CALIFORNIA INSTITUTE OF TECHNOLOGY" + ], + [ + "Pietro Perona", + "CALIFORNIA INSTITUTE OF TECHNOLOGY" + ], + [ + "Ueli Rutishauser", + "CALIFORNIA INSTITUTE OF TECHNOLOGY" + ], + [ + "Yisong Yue", + "CALIFORNIA INSTITUTE OF TECHNOLOGY" + ], + [ + "Eric Yttri", + "CARNEGIE-MELLON UNIVERSITY" + ], + [ + "Jonathan E. Rubin", + "CARNEGIE-MELLON UNIVERSITY" + ], + [ + "Pulkit Grover", + "CARNEGIE-MELLON UNIVERSITY" + ], + [ + "Zheng Kuang", + "CARNEGIE-MELLON UNIVERSITY" + ], + [ + "Ueli Rutishauser", + "CEDARS-SINAI MEDICAL CENTER" + ], + [ + "Aditya Bhise", + "CHILDREN'S HOSP OF PHILADELPHIA" + ], + [ + "Luke Bloy", + "CHILDREN'S HOSP OF PHILADELPHIA" + ], + [ + "Timothy P Roberts", + "CHILDREN'S HOSP OF PHILADELPHIA" + ], + [ + "Alik S. Widge", + "COLUMBIA UNIVERSITY HEALTH SCIENCES" + ], + [ + "Brett E Youngerman", + "COLUMBIA UNIVERSITY HEALTH SCIENCES" + ], + [ + "Gaurav Patel", + "COLUMBIA UNIVERSITY HEALTH SCIENCES" + ], + [ + "Jorge Ortiz", + "COLUMBIA UNIVERSITY HEALTH SCIENCES" + ], + [ + "Joshua Jacobs", + "COLUMBIA UNIVERSITY HEALTH SCIENCES" + ], + [ + "Yangjia Li", + "COLUMBIA UNIVERSITY HEALTH SCIENCES" + ], + [ + "Cody Baker", + "DARTMOUTH COLLEGE" + ], + [ + "Yaroslav Halchenko", + "DARTMOUTH COLLEGE" + ], + [ + "Bence P Olveczky", + "DUKE UNIVERSITY" + ], + [ + "Gregory Darin Field", + "DUKE UNIVERSITY" + ], + [ + "Michael Tadross", + "DUKE UNIVERSITY" + ], + [ + "NANTHIA W SUTHANA", + "DUKE UNIVERSITY" + ], + [ + "Tianqing Li", + "DUKE UNIVERSITY" + ] ], - "exercised": false - }, - { - "shape": "OneClassPerNodeShape", - "target_class": "subjects of type", - "targets": 808, - "checks": [], - "missing_inputs": [], - "exercised": true + "row_count": 168, + "status": "answered" }, { - "shape": "OneRolePerPersonPerGrantShape", - "target_class": "ProjectRole", - "targets": 128, - "checks": [ + "id": "CQ23", + "area": "working_groups", + "question": "Who is in each working group, and on which projects are they?", + "access": "anon", + "set": "adopted", + "reads": "rows", + "sparql": "SELECT ?wg_name ?name ?grant WHERE {\n ?wg a bbqs:WorkingGroup ; bbqs:name ?wg_name .\n ?person bbqs:member_of_group ?wg ; bbqs:name ?name .\n OPTIONAL { ?pr bbqs:held_by ?person ; bbqs:on_project ?p . ?p bbqs:grant_number ?grant }\n} ORDER BY ?wg_name ?name", + "terms": [ + "WorkingGroup", + "grant_number", "held_by", - "on_project", - "project_role" - ], - "missing_inputs": [], - "exercised": true - }, - { - "shape": "OrcidUniquePerPersonShape", - "target_class": "Investigator", - "targets": 262, - "checks": [ - "orcid" + "member_of_group", + "name", + "on_project" ], - "missing_inputs": [], - "exercised": true - }, - { - "shape": "ProjectIdentifiersAgreeShape", - "target_class": "Project", - "targets": 33, - "checks": [ - "external_url", - "grant_number", + "unmodeled": [], + "columns": [ + "wg_name", "name", - "nih_link", - "reporter_project_num" + "grant" ], - "missing_inputs": [], - "exercised": true - }, - { - "shape": "ProjectIsAnAwardShape", - "target_class": "Project", - "targets": 33, - "checks": [ - "grant_number" + "rows": [ + [ + "WG-Analytics", + "Abigayle Fogarty", + null + ], + [ + "WG-Analytics", + "Adam Friedman", + null + ], + [ + "WG-Analytics", + "Adam Noah", + "R61MH138705" + ], + [ + "WG-Analytics", + "Aditya Bhise", + null + ], + [ + "WG-Analytics", + "Agatha Lenartowicz", + "R61MH138713" + ], + [ + "WG-Analytics", + "Alessandra DallaVecchia", + "R61MH138713" + ], + [ + "WG-Analytics", + "Alex Cabral", + null + ], + [ + "WG-Analytics", + "Alex Williams", + "U01DA063581" + ], + [ + "WG-Analytics", + "Alex Williams", + "R34DA059513" + ], + [ + "WG-Analytics", + "Alireza Kazemi", + "R61MH135109" + ], + [ + "WG-Analytics", + "Amelia Johnson", + null + ], + [ + "WG-Analytics", + "Arish Alreja", + "R61MH138967" + ], + [ + "WG-Analytics", + "Aydin Tasevac", + null + ], + [ + "WG-Analytics", + "Bartul Mimica", + null + ], + [ + "WG-Analytics", + "Bijan Pesaran", + "U01MH144347" + ], + [ + "WG-Analytics", + "Brendan Ito", + null + ], + [ + "WG-Analytics", + "Brian Gitahi", + null + ], + [ + "WG-Analytics", + "Caleb Kemere", + "R34DA059514" + ], + [ + "WG-Analytics", + "Charles Mikell", + "R61MH138612" + ], + [ + "WG-Analytics", + "Cheryl Corcoran", + "R34DA059716" + ], + [ + "WG-Analytics", + "Cody Baker", + null + ], + [ + "WG-Analytics", + "Cory Inman", + "R61MH135109" + ], + [ + "WG-Analytics", + "Cristina Savin", + "U01DA063565" + ], + [ + "WG-Analytics", + "Dan Sanes", + "R34DA059513" + ], + [ + "WG-Analytics", + "Dan Sanes", + "U01DA063581" + ] ], - "missing_inputs": [], - "exercised": true + "row_count": 272, + "status": "answered" }, { - "shape": "ProjectRoleTokenShape", - "target_class": "ProjectRole", - "targets": 128, - "checks": [ + "id": "CQ24", + "area": "people", + "question": "Which investigators hold more than one kind of role?", + "access": "anon", + "set": "adopted", + "reads": "rows", + "sparql": "SELECT ?name (GROUP_CONCAT(DISTINCT ?role; separator=\", \") AS ?roles) WHERE {\n ?pr a bbqs:ProjectRole ; bbqs:held_by ?person ; bbqs:project_role ?role .\n ?person bbqs:name ?name .\n} GROUP BY ?person ?name HAVING (COUNT(DISTINCT ?role) > 1) ORDER BY ?name", + "terms": [ + "ProjectRole", + "held_by", + "name", "project_role" ], - "missing_inputs": [], - "exercised": true + "unmodeled": [], + "columns": [ + "name", + "roles" + ], + "rows": [], + "row_count": 0, + "status": "empty" }, { - "shape": "StudiesSpeciesResolvesShape", - "target_class": "Project", - "targets": 33, - "checks": [ + "id": "CQ25", + "area": "species", + "question": "Which projects study the house mouse, whichever of its names is used?", + "access": "anon", + "set": "adopted", + "reads": "rows", + "sparql": "SELECT ?grant ?title WHERE {\n ?sp a bbqs:Species .\n { ?sp bbqs:name \"Mus musculus\" } UNION { ?sp bbqs:common_name \"House Mouse\" } UNION { ?sp bbqs:aliases \"Mus musculus\" }\n ?project bbqs:studies_species ?sp ; bbqs:grant_number ?grant .\n OPTIONAL { ?project bbqs:title ?title }\n} ORDER BY ?grant", + "terms": [ + "Species", "aliases", "common_name", + "grant_number", "name", "studies_species", - "studies_species_name" - ], - "missing_inputs": [], - "exercised": true - }, - { - "shape": "UrlFieldsAreUrlsShape", - "target_class": "subjects of external_url, homepage_url, nih_link, website", - "targets": 311, - "checks": [ - "external_url", - "homepage_url", - "nih_link", - "website" + "title" ], - "missing_inputs": [ - "website" + "unmodeled": [], + "columns": [ + "grant", + "title" ], - "exercised": true - } - ], - "violation_count": 0, - "warning_count": 147, - "entities": [ - { - "id": "https://brain-bbqs.org/id/7766280c-d6f3-4c55-8e7e-f9207dbc1d1f", - "class": "Announcement", - "label": "BRAIN Conference 2026: Inventing the Future", - "facts": { - "external_url": [ - "https://braininitiative.nih.gov/" + "rows": [ + [ + "R34DA059506", + "High-resolution 3D tracking of social behaviors for deep phenotypic analysis" ], - "name": [ - "BRAIN Conference 2026: Inventing the Future" - ] - }, - "out": [ - { - "predicate": "part_of_org", - "target": "https://brain-bbqs.org/id/208980e9-92b9-447e-a2ca-e83bf61db159" - } - ], - "in": [], - "dangling": [], - "degree": 1, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/7395b261-f13c-4d69-b455-6b58f52b0d5a", - "class": "Announcement", - "label": "BRAIN Initiative Research Roadmap Reports Published", - "facts": { - "external_url": [ - "https://braininitiative.nih.gov/sites/default/files/2025-11/BRAIN%20Research%20Roadmap%20Innovation%20Domains_508c.pdf" + [ + "R34DA059506", + "High-resolution 3D tracking of social behaviors for deep phenotypic analysis" ], - "name": [ - "BRAIN Initiative Research Roadmap Reports Published" - ] - }, - "out": [ - { - "predicate": "part_of_org", - "target": "https://brain-bbqs.org/id/208980e9-92b9-447e-a2ca-e83bf61db159" - } - ], - "in": [], - "dangling": [], - "degree": 1, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/30ae82dc-0473-443d-96ae-8bbf8b0206cb", - "class": "Announcement", - "label": "BRAIN NeuroAI Community Updates Listserv Launched", - "facts": { - "external_url": [ - "mailto:listserv@list.nih.gov" + [ + "R34DA059509", + "Behavioral quantification through active learning and multidimensional physiological monitoring" ], - "name": [ - "BRAIN NeuroAI Community Updates Listserv Launched" + [ + "R34DA059509", + "Behavioral quantification through active learning and multidimensional physiological monitoring" + ], + [ + "R34DA059512", + "High-throughput, high-resolution 3D measurement of ethologically relevant rodent behavior in a dynamic environment" + ], + [ + "R34DA059512", + "High-throughput, high-resolution 3D measurement of ethologically relevant rodent behavior in a dynamic environment" + ], + [ + "R34DA059718", + "Harnessing biological rhythms for a resilient social motif generator" + ], + [ + "R34DA059718", + "Harnessing biological rhythms for a resilient social motif generator" + ], + [ + "R34DA059723", + "Multimodal behavioral analysis of oromanual food-handling in freely moving animals" + ], + [ + "R34DA059723", + "Multimodal behavioral analysis of oromanual food-handling in freely moving animals" + ], + [ + "R34DA062119", + "Adversity and Resilience Consortium (ARC): A collaboration for the standardized study of experience-dependent brain and behavioral development" + ], + [ + "R34DA062119", + "Adversity and Resilience Consortium (ARC): A collaboration for the standardized study of experience-dependent brain and behavioral development" + ], + [ + "U01DA063565", + "Neurobehavioral Mechanisms of Social Behavior and Familial Structure" + ], + [ + "U01DA063565", + "Neurobehavioral Mechanisms of Social Behavior and Familial Structure" ] - }, - "out": [ - { - "predicate": "part_of_org", - "target": "https://brain-bbqs.org/id/208980e9-92b9-447e-a2ca-e83bf61db159" - } ], - "in": [], - "dangling": [], - "degree": 1, - "flags": [], - "violations": [] + "row_count": 14, + "status": "answered" }, { - "id": "https://brain-bbqs.org/id/1cf7c61c-a403-4eb5-8a84-07a1e2da8fb4", - "class": "Announcement", - "label": "BRAIN NeuroAI Workshop Summary and Program Book Available", - "facts": { - "external_url": [ - "https://braininitiative.nih.gov/news-events/events/brain-neuroai-workshop" + "id": "CQ26", + "area": "species", + "question": "How many projects study each species?", + "access": "anon", + "set": "adopted", + "reads": "rows", + "sparql": "SELECT ?species (COUNT(DISTINCT ?project) AS ?projects) WHERE {\n ?project a bbqs:Project ; bbqs:studies_species ?sp .\n ?sp bbqs:name ?species .\n} GROUP BY ?species ORDER BY DESC(?projects)", + "terms": [ + "Project", + "name", + "studies_species" + ], + "unmodeled": [], + "columns": [ + "species", + "projects" + ], + "rows": [ + [ + "Human", + "13" ], - "name": [ - "BRAIN NeuroAI Workshop Summary and Program Book Available" + [ + "House Mouse", + "7" + ], + [ + "Mongolian Gerbil", + "2" + ], + [ + "Domestic Sheep", + "1" + ], + [ + "Hofstenia miamia", + "1" + ], + [ + "Cichlid Fish", + "1" + ], + [ + "Brown Rat", + "1" + ], + [ + "White-faced Capuchin", + "1" + ], + [ + "Fruit Fly", + "1" + ], + [ + "Zebrafish", + "1" + ], + [ + "Brown-headed Cowbird", + "1" + ], + [ + "Domestic Ferret", + "1" + ], + [ + "Common Marmoset", + "1" ] - }, - "out": [ - { - "predicate": "part_of_org", - "target": "https://brain-bbqs.org/id/208980e9-92b9-447e-a2ca-e83bf61db159" - } ], - "in": [], - "dangling": [], - "degree": 1, - "flags": [], - "violations": [] + "row_count": 13, + "status": "answered" }, { - "id": "https://brain-bbqs.org/id/46841d0e-4d55-4690-81f0-41c33f424bc8", - "class": "Announcement", - "label": "Canada Impact+ Research Training Awards (CIRTA)", - "facts": { - "description": [ - "McGill University is accepting nominations for the Canada Impact+ Research Training Awards — a one-time initiative to recruit international or returning Canadian doctoral students ($40K/yr × 3 years, 600 awards) and postdoctoral researchers ($70K/yr × 2 years, 400 awards). Priority areas include AI, health/biotech, clean tech, climate resilience, and more." - ], - "name": [ - "Canada Impact+ Research Training Awards (CIRTA)" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "id": "CQ27", + "area": "species", + "question": "Which projects name a species in free text that is not resolved to a species node?", + "access": "anon", + "set": "adopted", + "reads": "absence", + "sparql": "SELECT ?grant ?raw WHERE {\n ?project a bbqs:Project ; bbqs:grant_number ?grant ; bbqs:studies_species_unresolved ?raw .\n} ORDER BY ?grant ?raw", + "terms": [ + "Project", + "grant_number", + "studies_species_unresolved" ], - "violations": [] + "unmodeled": [], + "columns": [ + "grant", + "raw" + ], + "rows": [], + "row_count": 0, + "status": "none" }, { - "id": "https://brain-bbqs.org/id/00343fc4-d3b9-4b22-8445-dcef0a11a5e4", - "class": "Announcement", - "label": "Children's Speech Recognition Challenge — $120K Prize Pool", - "facts": { - "description": [ - "DrivenData has launched the \"On Top of Pasketti\" Children's Speech Recognition Challenge, focused on building open, high-quality ASR models for children's speech. Participants work with ~560K transcribed utterances (519 hours of child speech). Two tracks: Word-level ASR and Phonetic ASR. Open through April 6, 2026." + "id": "CQ28", + "area": "products", + "question": "How many publications, datasets, tools and models did each project produce?", + "access": "anon", + "set": "adopted", + "reads": "rows", + "sparql": "SELECT ?grant\n (COUNT(DISTINCT ?pub) AS ?publications) (COUNT(DISTINCT ?ds) AS ?datasets)\n (COUNT(DISTINCT ?tool) AS ?tools) (COUNT(DISTINCT ?model) AS ?models) WHERE {\n ?project a bbqs:Project ; bbqs:grant_number ?grant .\n OPTIONAL { ?project bbqs:produced ?pub . ?pub a bbqs:Publication }\n OPTIONAL { ?project bbqs:produced ?ds . ?ds a bbqs:Dataset }\n OPTIONAL { ?project bbqs:produced ?tool . ?tool a bbqs:SoftwareTool }\n OPTIONAL { ?project bbqs:produced ?model . ?model a bbqs:MLModel }\n} GROUP BY ?grant ORDER BY ?grant", + "terms": [ + "Dataset", + "MLModel", + "Project", + "Publication", + "SoftwareTool", + "grant_number", + "produced" + ], + "unmodeled": [], + "columns": [ + "grant", + "publications", + "datasets", + "tools", + "models" + ], + "rows": [ + [ + "R24MH136632", + "1", + "0", + "0", + "0" ], - "external_url": [ - "https://kidsasr.drivendata.org/" + [ + "R34DA059500", + "4", + "0", + "0", + "0" ], - "name": [ - "Children's Speech Recognition Challenge — $120K Prize Pool" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/5b87def1-786b-470f-879c-9089ebde049d", - "class": "Announcement", - "label": "Consortia-Wide Workshop at MIT", - "facts": { - "description": [ - "A 3-day Consortia-Wide Workshop will be held at MIT from July 15-17, 2025. Consortia members, please check your messages for signup information and further details." + [ + "R34DA059506", + "1", + "0", + "0", + "0" ], - "name": [ - "Consortia-Wide Workshop at MIT" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/1b79d65a-57fd-455c-96e7-acc3b3eb6c01", - "class": "Announcement", - "label": "In the news: AI is helping scientists eavesdrop on Costa Rica's monkeys", - "facts": { - "external_url": [ - "https://www.nytimes.com/2026/07/28/science/costa-rica-monkeys-ai.html?unlocked_article_code=1.1VA.toSv.7Q3TKDdHKC0H&smid=url-share" + [ + "R34DA059507", + "0", + "0", + "0", + "0" ], - "name": [ - "In the news: AI is helping scientists eavesdrop on Costa Rica's monkeys" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/42efe7fa-561b-4a00-af58-78b71f9d4b1a", - "class": "Announcement", - "label": "New BBQS Website Launch", - "facts": { - "description": [ - "A new website for BBQS (this) was born. 🎊" + [ + "R34DA059509", + "13", + "0", + "0", + "0" ], - "name": [ - "New BBQS Website Launch" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/0cdfab9b-92fe-45c6-afbe-9f22d7eda7dd", - "class": "Announcement", - "label": "NIH Common Fund PRIMED-AI — five funding opportunities open", - "facts": { - "external_url": [ - "https://go.nih.gov/6sLn5QY" + [ + "R34DA059510", + "1", + "0", + "0", + "0" ], - "name": [ - "NIH Common Fund PRIMED-AI — five funding opportunities open" - ] - }, - "out": [ - { - "predicate": "part_of_org", - "target": "https://brain-bbqs.org/id/208980e9-92b9-447e-a2ca-e83bf61db159" - } - ], - "in": [], - "dangling": [], - "degree": 1, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/0f875168-9793-465b-9ab1-bf8f18492778", - "class": "Announcement", - "label": "NSF NeuroAI and Beyond Workshop Report (Preprint)", - "facts": { - "external_url": [ - "https://arxiv.org/abs/2601.19955" + [ + "R34DA059512", + "4", + "0", + "0", + "0" ], - "name": [ - "NSF NeuroAI and Beyond Workshop Report (Preprint)" - ] - }, - "out": [ - { - "predicate": "part_of_org", - "target": "https://brain-bbqs.org/id/62826284-8258-4f21-af3e-64fc755ef2b2" - } - ], - "in": [], - "dangling": [], - "degree": 1, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/3533afc4-be44-460c-bada-ab578b028acb", - "class": "Announcement", - "label": "SFN Annual Meeting 2025", - "facts": { - "description": [ - "BBQS will be presenting at the Society for Neuroscience Annual Meeting in San Diego. Join us at Booth #3830 and #3831 or attend our symposium." + [ + "R34DA059513", + "6", + "0", + "0", + "0" ], - "name": [ - "SFN Annual Meeting 2025" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/83f2b36c-b0c8-4d4e-a1aa-08639a4068ae", - "class": "Benchmark", - "label": "Animal Pose Leaderboard", - "facts": { - "description": [ - "Comparative ranking of pose estimation methods" + [ + "R34DA059514", + "0", + "0", + "0", + "0" ], - "external_url": [ - "https://paperswithcode.com/task/animal-pose-estimation" + [ + "R34DA059716", + "0", + "0", + "0", + "0" ], - "name": [ - "Animal Pose Leaderboard" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/858afe90-ab36-4d22-bfde-b4d7630a72ef", - "class": "Benchmark", - "label": "DLC Benchmarks", - "facts": { - "description": [ - "Standardized evaluation of pose estimation accuracy across scenarios" + [ + "R34DA059718", + "6", + "0", + "0", + "0" ], - "external_url": [ - "https://benchmark.deeplabcut.org/" + [ + "R34DA059723", + "3", + "0", + "0", + "0" ], - "name": [ - "DLC Benchmarks" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/b9f28848-dd76-4bf7-9fd6-a4d1509154eb", - "class": "Benchmark", - "label": "DLC Leaderboard", - "facts": { - "description": [ - "Performance comparison for DLC-based approaches" + [ + "R34DA061924", + "2", + "0", + "0", + "0" ], - "external_url": [ - "https://huggingface.co/spaces/DeepLabCut/Leaderboard" + [ + "R34DA061925", + "2", + "0", + "0", + "0" ], - "name": [ - "DLC Leaderboard" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/4921bfdf-7432-48ac-911d-0cb825184ef1", - "class": "Benchmark", - "label": "VCL Benchmark", - "facts": { - "description": [ - "Vocal Call Locator benchmark: 767,295 rodent sounds with ground-truth sources across 9 datasets, for sound source localization from multi-channel audio" + [ + "R34DA061984", + "1", + "0", + "0", + "0" ], - "external_url": [ - "https://vclbenchmark.flatironinstitute.org" + [ + "R34DA062119", + "0", + "0", + "0", + "0" ], - "name": [ - "VCL Benchmark" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/f9d3a756-c9ad-4abb-89ae-c55756d4e662", - "class": "Dataset", - "label": "aggregate-task-one", - "facts": { - "description": [ - "task aggregate one " + [ + "R61MH135106", + "3", + "0", + "0", + "0" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000542" + [ + "R61MH135109", + "3", + "0", + "0", + "0" ], - "name": [ - "aggregate-task-one" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/e5d71308-2123-4732-952c-e3e1bfb32108", - "class": "Dataset", - "label": "arc-idp-test", - "facts": { - "description": [ - "test" + [ + "R61MH135114", + "1", + "0", + "0", + "0" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000533" + [ + "R61MH135405", + "1", + "0", + "0", + "0" ], - "name": [ - "arc-idp-test" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/1cabb668-d89d-4bbb-a9c2-ea79f7a93708", - "class": "Dataset", - "label": "BBQS Snippets", - "facts": { - "description": [ - "A collection of video snippets from across the BBQS." + [ + "R61MH135407", + "19", + "0", + "0", + "0" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000474" + [ + "R61MH138612", + "0", + "0", + "0", + "0" ], - "name": [ - "BBQS Snippets" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/2e4c95a3-a0bb-4a43-a647-7077547dedf0", - "class": "Dataset", - "label": "Days of our Mice (DooM): a cross-laboratory dataset of mouse social behavior", - "facts": { - "description": [ - "This dataset holds pose tracking, human-scored behavior bouts and video for 587 videos of freely interacting mice, recorded in 15 labs. It contains 71,870 annotated bouts of 33 scored behavior types. These are the lab-contributed datasets of the MABe-2025 behavior-classification competition, at the cleaned revision (2026-07-18) used to train the HiDRA classifier. The competition's other sources (MABe22, CalMS21 and CRIM13) are published separately and aren't included here. Each video has an MP4, a SLEAP .slp file with its pose tracks and behavior bouts, and the same pose and bouts in the competition's Parquet format (.tracking.pkt, .annotation.pkt). See README.md for details." + [ + "R61MH138705", + "1", + "0", + "0", + "0" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000564" + [ + "R61MH138713", + "13", + "0", + "0", + "0" ], - "name": [ - "Days of our Mice (DooM): a cross-laboratory dataset of mouse social behavior" + [ + "R61MH138966", + "0", + "0", + "0", + "0" ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" ], - "violations": [] + "row_count": 33, + "status": "answered" }, { - "id": "https://brain-bbqs.org/id/4f6fe91b-9a18-467b-8a17-46bc3404f22e", - "class": "Dataset", - "label": "EMBER Bees DeepLabCut Training — Workflow Smoke Test", - "facts": { - "description": [ - "Bees pose-estimation data prepared in DeepLabCut format for testing a DANDI download → Pennsieve training → DANDI upload workflow. Includes labeled training and validation images, annotation files, and a DeepLabCut project configuration. Derived from the bees data in Dandiset 000398. Intended for workflow validation, not as a new scientific benchmark." - ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000598" - ], - "name": [ - "EMBER Bees DeepLabCut Training — Workflow Smoke Test" - ] - }, - "out": [], - "in": [ - { - "predicate": "funded_datasets", - "source": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" - } + "id": "CQ29", + "area": "products", + "question": "How many publications came out of each investigator's projects, and which projects?", + "access": "anon", + "set": "adopted", + "reads": "rows", + "sparql": "SELECT ?name (COUNT(DISTINCT ?pub) AS ?publications) (GROUP_CONCAT(DISTINCT ?grant; separator=\", \") AS ?projects) WHERE {\n ?pr a bbqs:ProjectRole ; bbqs:held_by ?person ; bbqs:on_project ?project .\n ?person bbqs:name ?name . ?project bbqs:grant_number ?grant ; bbqs:produced ?pub .\n ?pub a bbqs:Publication .\n} GROUP BY ?person ?name ORDER BY DESC(?publications)", + "terms": [ + "ProjectRole", + "Publication", + "grant_number", + "held_by", + "name", + "on_project", + "produced" ], - "dangling": [], - "degree": 1, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/95b1db49-e4dd-4bab-9bb1-21400d850386", - "class": "Dataset", - "label": "Encoding Helper Demos", - "facts": { - "award_numbers": [ - "R24MH136632" + "unmodeled": [], + "columns": [ + "name", + "publications", + "projects" + ], + "rows": [ + [ + "Maryam Shanechi", + "19", + "R61MH135407" ], - "description": [ - "A collection of exemplary videos for use in the Encoding Helper tool." + [ + "Parastoo Azizeddin", + "19", + "R61MH135407" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000527" + [ + "Pulkit Grover", + "13", + "R34DA059509" ], - "name": [ - "Encoding Helper Demos" - ] - }, - "out": [], - "in": [ - { - "predicate": "funded_datasets", - "source": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" - } - ], - "dangling": [], - "degree": 1, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/44376171-f0d7-4e91-9c91-6558f6253fe3", - "class": "Dataset", - "label": "Four-choice reversal digging task", - "facts": { - "description": [ - "An Aggregate Dandiset for Four-choice reversal digging task in MAABCD" + [ + "Jennie Grammer", + "13", + "R61MH138713" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000607" + [ + "Alessandra DallaVecchia", + "13", + "R61MH138713" ], - "name": [ - "Four-choice reversal digging task" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/00b12533-f062-4b07-956e-62cdd5145e49", - "class": "Dataset", - "label": "Four-choice reversal digging task (IDP)", - "facts": { - "description": [ - "Created by IDP to hold this researcher’s uploaded data." + [ + "Jonathan E. Rubin", + "13", + "R34DA059509" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000612" + [ + "Zheng Kuang", + "13", + "R34DA059509" ], - "name": [ - "Four-choice reversal digging task (IDP)" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/013d5512-b094-4603-8eb5-5a4ed578501d", - "class": "Dataset", - "label": "Four-choice reversal digging task (IDP)", - "facts": { - "description": [ - "Created by IDP to hold this researcher’s uploaded data." + [ + "Eric Yttri", + "13", + "R34DA059509" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000613" + [ + "Agatha Lenartowicz", + "13", + "R61MH138713" ], - "name": [ - "Four-choice reversal digging task (IDP)" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/29d65027-e638-43f7-b860-9bde457d4830", - "class": "Dataset", - "label": "Four-choice reversal digging task (IDP)", - "facts": { - "description": [ - "Created by IDP to hold this researcher’s uploaded data." + [ + "Talia V Roman Lopez", + "13", + "R61MH138713" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000617" + [ + "Emre Ertin", + "13", + "R61MH138713" ], - "name": [ - "Four-choice reversal digging task (IDP)" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/33aad87e-eca4-4de4-b67c-425bd39ec168", - "class": "Dataset", - "label": "Four-choice reversal digging task (IDP)", - "facts": { - "description": [ - "Created by IDP to hold this researcher’s uploaded data." + [ + "Shreya Saxena", + "7", + "U01DA063534, R34DA059718" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000628" + [ + "Daniel W Wesson", + "6", + "R34DA059718" ], - "name": [ - "Four-choice reversal digging task (IDP)" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/344938eb-1ef4-4b39-b6e2-a8297f510dbd", - "class": "Dataset", - "label": "Four-choice reversal digging task (IDP)", - "facts": { - "description": [ - "Created by IDP to hold this researcher’s uploaded data." + [ + "Nancy Padilla Coreano", + "6", + "R34DA059718" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000620" + [ + "David Schneider", + "6", + "R34DA059513" ], - "name": [ - "Four-choice reversal digging task (IDP)" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/404ca8b2-c293-40f2-be94-f3ae24b30af1", - "class": "Dataset", - "label": "Four-choice reversal digging task (IDP)", - "facts": { - "description": [ - "Created by IDP to hold this researcher’s uploaded data." + [ + "Dan Sanes", + "6", + "R34DA059513" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000611" + [ + "Alex Williams", + "6", + "R34DA059513" ], - "name": [ - "Four-choice reversal digging task (IDP)" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/51314407-e284-4b97-b708-6d4ac938320b", - "class": "Dataset", - "label": "Four-choice reversal digging task (IDP)", - "facts": { - "description": [ - "Created by IDP to hold this researcher’s uploaded data." + [ + "Katherine Nagel", + "4", + "R34DA059500" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000624" + [ + "Gregory Darin Field", + "4", + "R34DA059512" ], - "name": [ - "Four-choice reversal digging task (IDP)" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/556563f6-a276-4de9-ac21-57ab8a53acf0", - "class": "Dataset", - "label": "Four-choice reversal digging task (IDP)", - "facts": { - "description": [ - "Created by IDP to hold this researcher’s uploaded data." + [ + "Joshua Wu", + "4", + "R34DA059512" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000610" + [ + "David Schoppik", + "4", + "R34DA059500" ], - "name": [ - "Four-choice reversal digging task (IDP)" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/5866f05c-c82e-4c6b-9e7a-829799ee866d", - "class": "Dataset", - "label": "Four-choice reversal digging task (IDP)", - "facts": { - "description": [ - "Created by IDP to hold this researcher’s uploaded data." + [ + "Michael Tadross", + "4", + "R34DA059512" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000627" + [ + "Timothy Dunn", + "4", + "R34DA059506, R34DA059512" ], - "name": [ - "Four-choice reversal digging task (IDP)" + [ + "Nathan Christopher Shaner", + "4", + "R34DA059500" + ], + [ + "Jane Wang", + "4", + "R34DA059500" ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" ], - "violations": [] + "row_count": 83, + "status": "answered" }, { - "id": "https://brain-bbqs.org/id/67eda9ac-ecbc-494f-b34f-671f074344d0", - "class": "Dataset", - "label": "Four-choice reversal digging task (IDP)", - "facts": { - "description": [ - "Created by IDP to hold this researcher’s uploaded data." - ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000560" - ], - "name": [ - "Four-choice reversal digging task (IDP)" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "id": "CQ30", + "area": "provenance", + "question": "Which produced datasets have no provenance recorded?", + "access": "full", + "set": "adopted", + "reads": "absence", + "sparql": "SELECT ?ds ?name WHERE {\n ?project bbqs:produced ?ds . ?ds a bbqs:Dataset ; bbqs:name ?name .\n BIND(STRAFTER(STR(?ds), \"https://brain-bbqs.org/id/\") AS ?localId)\n FILTER NOT EXISTS { ?prov a bbqs:ProvenanceRecord ; bbqs:prov_entity_id ?localId ; bbqs:prov_source_class ?sc }\n}", + "terms": [ + "Dataset", + "ProvenanceRecord", + "name", + "produced", + "prov_entity_id", + "prov_source_class" ], - "violations": [] + "unmodeled": [], + "columns": [ + "ds", + "name" + ], + "rows": [], + "row_count": 0, + "status": "n/a" }, { - "id": "https://brain-bbqs.org/id/71f322a4-f40f-4dc8-b8d6-2a05c4692c0c", - "class": "Dataset", - "label": "Four-choice reversal digging task (IDP)", - "facts": { - "description": [ - "Created by IDP to hold this researcher’s uploaded data." - ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000614" - ], - "name": [ - "Four-choice reversal digging task (IDP)" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "id": "CQ31", + "area": "products", + "question": "Which benchmarks is each ML model evaluated by, and which project produced it?", + "access": "anon", + "set": "adopted", + "reads": "rows", + "sparql": "SELECT ?model_name ?bench_name ?grant WHERE {\n ?model a bbqs:MLModel ; bbqs:name ?model_name .\n { ?model bbqs:evaluated_by ?bench } UNION { ?bench bbqs:evaluates ?model }\n ?bench a bbqs:Benchmark ; bbqs:name ?bench_name .\n OPTIONAL { ?project bbqs:produced ?model ; bbqs:grant_number ?grant }\n}", + "terms": [ + "Benchmark", + "MLModel", + "evaluated_by", + "evaluates", + "grant_number", + "name", + "produced" ], - "violations": [] + "unmodeled": [], + "columns": [ + "model_name", + "bench_name", + "grant" + ], + "rows": [], + "row_count": 0, + "status": "empty" }, { - "id": "https://brain-bbqs.org/id/7758db83-7d6a-46d9-9cbb-dd78d0e2853a", - "class": "Dataset", - "label": "Four-choice reversal digging task (IDP)", - "facts": { - "description": [ - "Created by IDP to hold this researcher’s uploaded data." + "id": "CQ32", + "area": "organizations", + "question": "How many members does each organization have?", + "access": "anon", + "set": "adopted", + "reads": "rows", + "sparql": "SELECT ?org_name (COUNT(DISTINCT ?person) AS ?members) WHERE {\n ?org a bbqs:ResearchOrganization ; bbqs:name ?org_name .\n OPTIONAL { ?org bbqs:members ?person }\n} GROUP BY ?org ?org_name ORDER BY DESC(?members)", + "terms": [ + "ResearchOrganization", + "members", + "name" + ], + "unmodeled": [], + "columns": [ + "org_name", + "members" + ], + "rows": [ + [ + "YALE UNIVERSITY", + "20" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000625" + [ + "UNIVERSITY OF PENNSYLVANIA", + "15" ], - "name": [ - "Four-choice reversal digging task (IDP)" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/95740d4f-1e7f-474d-96ac-cbb99161a800", - "class": "Dataset", - "label": "Four-choice reversal digging task (IDP)", - "facts": { - "description": [ - "Created by IDP to hold this researcher’s uploaded data." + [ + "MASSACHUSETTS INSTITUTE OF TECHNOLOGY", + "12" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000561" + [ + "NEW YORK UNIVERSITY SCHOOL OF MEDICINE", + "8" ], - "name": [ - "Four-choice reversal digging task (IDP)" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/9923fbb5-0ea9-48d8-8ad9-386af3233e00", - "class": "Dataset", - "label": "Four-choice reversal digging task (IDP)", - "facts": { - "description": [ - "Created by IDP to hold this researcher’s uploaded data." + [ + "GEORGIA INSTITUTE OF TECHNOLOGY", + "7" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000563" + [ + "ICAHN SCHOOL OF MEDICINE AT MOUNT SINAI", + "7" ], - "name": [ - "Four-choice reversal digging task (IDP)" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/9a538af9-78f2-49ab-ac2f-24f6d66f3936", - "class": "Dataset", - "label": "Four-choice reversal digging task (IDP)", - "facts": { - "description": [ - "Created by IDP to hold this researcher’s uploaded data." + [ + "DUKE UNIVERSITY", + "7" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000622" + [ + "National Institutes of Health", + "7" ], - "name": [ - "Four-choice reversal digging task (IDP)" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/9bb42f0a-2bf6-4f88-b621-e2d65d31fa71", - "class": "Dataset", - "label": "Four-choice reversal digging task (IDP)", - "facts": { - "description": [ - "Created by IDP to hold this researcher’s uploaded data." + [ + "COLUMBIA UNIVERSITY HEALTH SCIENCES", + "6" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000615" + [ + "UNIVERSITY OF CALIFORNIA LOS ANGELES", + "5" ], - "name": [ - "Four-choice reversal digging task (IDP)" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/9be4379c-b96a-4a12-b128-b91bf85554ab", - "class": "Dataset", - "label": "Four-choice reversal digging task (IDP)", - "facts": { - "description": [ - "Created by IDP to hold this researcher’s uploaded data." + [ + "UNIVERSITY OF FLORIDA", + "5" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000562" + [ + "NEW YORK UNIVERSITY", + "5" ], - "name": [ - "Four-choice reversal digging task (IDP)" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/9d48505e-4e39-425a-ac10-2f1d28ebcbc1", - "class": "Dataset", - "label": "Four-choice reversal digging task (IDP)", - "facts": { - "description": [ - "Created by IDP to hold this researcher’s uploaded data." + [ + "STATE UNIVERSITY NEW YORK STONY BROOK", + "4" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000616" + [ + "UNIVERSITY OF PITTSBURGH AT PITTSBURGH", + "4" ], - "name": [ - "Four-choice reversal digging task (IDP)" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/b1246cb8-0963-4160-bb14-8f313a885dcc", - "class": "Dataset", - "label": "Four-choice reversal digging task (IDP)", - "facts": { - "description": [ - "Created by IDP to hold this researcher’s uploaded data." + [ + "CARNEGIE-MELLON UNIVERSITY", + "4" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000618" + [ + "CALIFORNIA INSTITUTE OF TECHNOLOGY", + "4" ], - "name": [ - "Four-choice reversal digging task (IDP)" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/c104aeb5-4e17-4b00-b120-1f8343435b78", - "class": "Dataset", - "label": "Four-choice reversal digging task (IDP)", - "facts": { - "description": [ - "Created by IDP to hold this researcher’s uploaded data." + [ + "UNIVERSITY OF MICHIGAN AT ANN ARBOR", + "3" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000619" + [ + "MICHIGAN STATE UNIVERSITY", + "3" ], - "name": [ - "Four-choice reversal digging task (IDP)" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/e25c35c9-96b7-4410-bd9f-cfc0382fded2", - "class": "Dataset", - "label": "Four-choice reversal digging task (IDP)", - "facts": { - "description": [ - "Created by IDP to hold this researcher’s uploaded data." + [ + "HARVARD UNIVERSITY", + "3" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000621" + [ + "CHILDREN'S HOSP OF PHILADELPHIA", + "3" ], - "name": [ - "Four-choice reversal digging task (IDP)" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/f85d4385-1c70-4282-a6f2-0bd7f3c91df9", - "class": "Dataset", - "label": "Four-choice reversal digging task (IDP)", - "facts": { - "description": [ - "Created by IDP to hold this researcher’s uploaded data." + [ + "National Institute of Mental Health", + "3" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000626" + [ + "PENNSYLVANIA STATE UNIVERSITY", + "2" ], - "name": [ - "Four-choice reversal digging task (IDP)" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/fae4c50f-849c-4ec8-91d6-15da5747305e", - "class": "Dataset", - "label": "Four-choice reversal digging task (IDP)", - "facts": { - "description": [ - "Created by IDP to hold this researcher’s uploaded data." + [ + "JOHNS HOPKINS UNIVERSITY", + "2" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000623" + [ + "UNIV OF MASSACHUSETTS MED SCH WORCESTER", + "2" ], - "name": [ - "Four-choice reversal digging task (IDP)" + [ + "RICE UNIVERSITY", + "2" ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" ], - "violations": [] + "row_count": 59, + "status": "answered" }, { - "id": "https://brain-bbqs.org/id/fc39570e-25ee-4d25-8606-1da0f0a03d43", - "class": "Dataset", - "label": "Four-choice reversal digging task (IDP)", - "facts": { - "description": [ - "Created by IDP to hold this researcher’s uploaded data." + "id": "CQ33", + "area": "organizations", + "question": "Which organizations have no members recorded?", + "access": "anon", + "set": "adopted", + "reads": "absence", + "sparql": "SELECT ?org_name WHERE {\n ?org a bbqs:ResearchOrganization ; bbqs:name ?org_name .\n FILTER NOT EXISTS { ?org bbqs:members ?p }\n} ORDER BY ?org_name", + "terms": [ + "ResearchOrganization", + "members", + "name" + ], + "unmodeled": [], + "columns": [ + "org_name" + ], + "rows": [ + [ + "BBQS Consortium" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000559" + [ + "Empire AI Consortium" ], - "name": [ - "Four-choice reversal digging task (IDP)" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/5d041fa1-d9fa-416b-a937-3844a9df5f0b", - "class": "Dataset", - "label": "Human neural dynamics of real-world and imagined navigation", - "facts": { - "award_numbers": [ - "U01NS117838" + [ + "Eunice Kennedy Shriver National Institute of Child Health and Human Development" ], - "description": [ - "The ability to form episodic memories and later imagine them is integral to the human experience, influencing our recollection of the past and envisioning of the future. While rodent studies suggest the medial temporal lobe, especially the hippocampus, is involved in these functions, its role in human imagination remains uncertain. In human participants, imaginations can be explicitly instructed and reported. Here we investigate hippocampal theta oscillations during real-world and imagined navigation using motion capture and intracranial electroencephalographic recordings from individuals with chronically implanted medial temporal lobe electrodes. Our results revealed intermittent theta dynamics, particularly within the hippocampus, encoding spatial information and partitioning navigational routes into linear segments during real-world navigation. During imagined navigation, theta dynamics exhibited similar patterns despite the absence of external cues. A statistical model successfully reconstructed real-world and imagined positions, providing insights into the neural mechanisms underlying human navigation and imagination, with implications for understanding memory in real-world settings." + [ + "INTERNATIONAL BRAIN LABORATORY" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000479" + [ + "MCGILL UNIVERSITY" ], - "name": [ - "Human neural dynamics of real-world and imagined navigation" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/82dd5aa5-3e9e-4f8b-ab99-9da5f557580a", - "class": "Dataset", - "label": "IDP-ARC — Four-choice reversal digging task", - "facts": { - "description": [ - "Created by the IDP-ARC platform to hold this researcher’s uploaded data." + [ + "NIH Office of Behavioral and Social Sciences Research" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000551" + [ + "NIH Office of Research on Women's Health" ], - "name": [ - "IDP-ARC — Four-choice reversal digging task" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/eef427e0-8f77-423f-9c21-db3e1eef5b74", - "class": "Dataset", - "label": "IDP-ARC — Four-choice reversal digging task", - "facts": { - "description": [ - "Created by the IDP-ARC platform to hold this researcher’s uploaded data." + [ + "NIH Office of the Director (Common Fund)" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000550" + [ + "National Center for Complementary and Integrative Health" ], - "name": [ - "IDP-ARC — Four-choice reversal digging task" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/b5211490-2071-4d4d-8ce6-9ca471210299", - "class": "Dataset", - "label": "Isogenic and Genetically Diverse Aging Video dataset", - "facts": { - "description": [ - "This dataset consists of over 1,100 - 1 hour of open field videos meant to capture frailty. The animals range from 8 weeks to 4.2 years. The following papers have used this data. The work has been funded by the National Institute on Aging. @article{Hessionetal2022, author = {Hession, Luke E. and Sabnis, Gautam S. and Churchill, Gary A. and Kumar, Vivek}, title = {A machine-vision-based frailty index for mice}, journal = {Nature Aging}, year = {2022}, volume = {2}, pages = {756--766}, doi = {10.1038/s43587-022-00266-0}}@article{Sabnisetal2025, author = {Sabnis, Gautam S. and Churchill, Gary A. and Kumar, Vivek}, title = {Machine vision based frailty assessment for genetically diverse mice}, journal = {GeroScience}, year = {2025}, doi = {10.1007/s11357-025-01583-z}}@article{Kumar2026, author = {Kumar Lab}, title = {Integrating supervised and unsupervised machine learning for behavior segmentation reveals latent frailty signatures and improves aging clocks in isogenic and outbred mice}, journal = {bioRxiv}, year = {2026}, doi = {10.64898/2026.03.23.713050v1}}" + [ + "National Eye Institute" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000466" + [ + "National Institute of Biomedical Imaging and Bioengineering" ], - "name": [ - "Isogenic and Genetically Diverse Aging Video dataset" + [ + "National Institute on Aging" + ], + [ + "National Institute on Alcohol Abuse and Alcoholism" + ], + [ + "National Science Foundation" + ], + [ + "Simons Foundation" + ], + [ + "Society for Neuroscience" + ], + [ + "State University of New York at Stony Brook" ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" ], - "violations": [] + "row_count": 17, + "status": "answered" }, { - "id": "https://brain-bbqs.org/id/99f38f2a-e4e4-49f7-bd61-5d3ba17134cc", - "class": "Dataset", - "label": "Mouse food sniff", - "facts": { - "award_numbers": [ - "R34DA059723", - "R37NS061963" + "id": "CQ34", + "area": "organizations", + "question": "Which organizations have investigators on more than one project?", + "access": "anon", + "set": "adopted", + "reads": "rows", + "sparql": "SELECT ?org_name (COUNT(DISTINCT ?project) AS ?projects) WHERE {\n ?org a bbqs:ResearchOrganization ; bbqs:name ?org_name ; bbqs:members ?person .\n ?pr bbqs:held_by ?person ; bbqs:on_project ?project .\n} GROUP BY ?org ?org_name HAVING (COUNT(DISTINCT ?project) > 1) ORDER BY DESC(?projects)", + "terms": [ + "ResearchOrganization", + "held_by", + "members", + "name", + "on_project" + ], + "unmodeled": [], + "columns": [ + "org_name", + "projects" + ], + "rows": [ + [ + "UNIVERSITY OF CALIFORNIA LOS ANGELES", + "4" ], - "description": [ - "This dataset accompanies Gao et al. \"Dexterous single sniffs for ethological active olfaction\"." + [ + "DUKE UNIVERSITY", + "4" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000463" + [ + "UNIVERSITY OF PENNSYLVANIA", + "3" ], - "name": [ - "Mouse food sniff" + [ + "YALE UNIVERSITY", + "3" + ], + [ + "UNIVERSITY OF FLORIDA", + "2" + ], + [ + "NEW YORK UNIVERSITY SCHOOL OF MEDICINE", + "2" + ], + [ + "UNIVERSITY OF ALABAMA AT BIRMINGHAM", + "2" + ], + [ + "GEORGIA INSTITUTE OF TECHNOLOGY", + "2" + ], + [ + "HARVARD UNIVERSITY", + "2" + ], + [ + "NEW YORK UNIVERSITY", + "2" ] - }, - "out": [], - "in": [ - { - "predicate": "funded_datasets", - "source": "https://brain-bbqs.org/id/2db5ee93-296a-446a-a3e6-59fd3d28c4a6" - } ], - "dangling": [], - "degree": 1, - "flags": [], - "violations": [] + "row_count": 10, + "status": "answered" }, { - "id": "https://brain-bbqs.org/id/199d9cea-460f-4470-957d-c9f458c237f1", - "class": "Dataset", - "label": "Mouse Open-Field Semicircle Foraging Task", - "facts": { - "description": [ - "Mice with implanted Neuropixels electrodes freely locomote in a semicircle apparatus in which 27 choice ports line the rounded rim of the arena. A trial start / reward port in the center of the flat part of the arena provides a liquid sugar water reward probabilistically based on the animals choice." + "id": "CQ35", + "area": "announcements", + "question": "Which jobs does each institution advertise?", + "access": "anon", + "set": "adopted", + "reads": "rows", + "sparql": "SELECT ?institution (COUNT(?job) AS ?jobs) (GROUP_CONCAT(?title; separator=\"; \") AS ?titles) WHERE {\n ?job a bbqs:Job ; bbqs:name ?title .\n { ?job bbqs:part_of_org ?org . ?org bbqs:name ?institution }\n UNION\n { ?job bbqs:job_institution ?institution . FILTER NOT EXISTS { ?job bbqs:part_of_org ?linked } }\n} GROUP BY ?org ?institution ORDER BY DESC(?jobs)", + "terms": [ + "Job", + "job_institution", + "name", + "part_of_org" + ], + "unmodeled": [], + "columns": [ + "institution", + "jobs", + "titles" + ], + "rows": [ + [ + "UNIVERSITY OF CALIFORNIA BERKELEY", + "2", + "Theoretical Understanding of Distributed Neural Population Dynamics (Theory_PD); Organoid Intelligence through Control of Neural Population Dynamics (FBC_PD)" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000532" + [ + "MCGILL UNIVERSITY", + "2", + "Canada Impact+ Postdoctoral Research Training Award ($70K/yr, 2 years); Canada Impact+ Doctoral Research Training Award ($40K/yr, 3 years)" ], - "name": [ - "Mouse Open-Field Semicircle Foraging Task" + [ + "NEW YORK UNIVERSITY", + "1", + "Postdoctoral position in statistical methods for behavioral analysis" + ], + [ + "INTERNATIONAL BRAIN LABORATORY", + "1", + "Engineer/Data Science positions at International Brain Laboratory (IBL) " ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" ], - "violations": [] + "row_count": 4, + "status": "answered" }, { - "id": "https://brain-bbqs.org/id/a177387c-24d4-4e12-8f7d-76994130f853", - "class": "Dataset", - "label": "Naturalistic Mouse Behavior", - "facts": { - "description": [ - "Videos from four cameras placed around a clear arena while a mouse freely behaves." - ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000465" - ], - "name": [ - "Naturalistic Mouse Behavior" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "id": "CQ36", + "area": "announcements", + "question": "Which kinds of role are being advertised?", + "access": "anon", + "set": "adopted", + "reads": "rows", + "sparql": "SELECT ?job_type (COUNT(?job) AS ?postings) WHERE {\n ?job a bbqs:Job ; bbqs:job_type ?job_type .\n} GROUP BY ?job_type ORDER BY DESC(?postings)", + "terms": [ + "Job", + "job_type" ], - "violations": [] + "unmodeled": [], + "columns": [ + "job_type", + "postings" + ], + "rows": [], + "row_count": 0, + "status": "empty" }, { - "id": "https://brain-bbqs.org/id/72c84eee-67e0-47db-9502-bb55558d9819", - "class": "Dataset", - "label": "NDX Wearables", - "facts": { - "description": [ - "This project contains synthetic data files which demonstrate the use of and support development of the NDX Wearables extension. Neurodata without borders (NWB), with its supporting suite of tools and online data archives, offers a promising medium for data sharing, but does not support wearables data. We describe and implement an NWB extension package that enables NWB to support a wide variety of data modalities recorded from wearable devices and handle multiple concurrent estimates of the same metric from multiple independent devices. This package, along with support from data sharing platforms, will enable better collaborations, more reproducible analysis, and the development of better foundational models of disorders. You will find the up to date v0.2 example in 'sub-synthetic-pre-release-0-2'." - ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000207" + "id": "CQ37", + "area": "announcements", + "question": "Who posted each job?", + "access": "anon", + "set": "adopted", + "reads": "rows", + "sparql": "SELECT ?title ?poster WHERE {\n ?job a bbqs:Job ; bbqs:name ?title ; bbqs:posted_by ?person .\n ?person bbqs:name ?poster .\n}", + "terms": [ + "Job", + "name", + "posted_by" + ], + "unmodeled": [], + "columns": [ + "title", + "poster" + ], + "rows": [ + [ + "Postdoctoral position in statistical methods for behavioral analysis", + "Cristina Savin" ], - "name": [ - "NDX Wearables" + [ + "Engineer/Data Science positions at International Brain Laboratory (IBL) ", + "Nader Nikbakht" ] - }, - "out": [], - "in": [ - { - "predicate": "funded_datasets", - "source": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" - } ], - "dangling": [], - "degree": 1, - "flags": [], - "violations": [] + "row_count": 2, + "status": "answered" }, { - "id": "https://brain-bbqs.org/id/b5f65a35-ad99-4779-ab8c-2f211803ca2e", - "class": "Dataset", - "label": "Pose Zoo: Bounding Box", - "facts": { - "description": [ - "Testing" - ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000469" - ], - "name": [ - "Pose Zoo: Bounding Box" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "id": "CQ38", + "area": "diagnostics", + "question": "Which projects have no outputs recorded?", + "access": "anon", + "set": "adopted", + "reads": "absence", + "sparql": "SELECT ?grant WHERE {\n ?project a bbqs:Project ; bbqs:grant_number ?grant .\n FILTER NOT EXISTS { ?project bbqs:produced ?o }\n} ORDER BY ?grant", + "terms": [ + "Project", + "grant_number", + "produced" ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/0c4561e1-221b-4444-ac15-6c2220beb292", - "class": "Dataset", - "label": "Pozu: Labels", - "facts": { - "description": [ - "This dataset contains automated contributions of pose labels for subjects from random video frames." + "unmodeled": [], + "columns": [ + "grant" + ], + "rows": [ + [ + "R34DA059507" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000470" + [ + "R34DA059514" ], - "name": [ - "Pozu: Labels" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/241a21ae-2f3c-4fce-b11d-d42980ed7209", - "class": "Dataset", - "label": "Pozu: Missing subjects", - "facts": { - "description": [ - "Dedicated collection of reports of video frames missing any subject of any kind within the field of view." + [ + "R34DA059716" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000472" + [ + "R34DA062119" ], - "name": [ - "Pozu: Missing subjects" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/1e988b46-bfe4-4e41-843e-b6b0ae88efcb", - "class": "Dataset", - "label": "Pozu: Transcoding", - "facts": { - "description": [ - "A collection of behavioral videos, transcoded into a common space for pose labeling and foundation model training." + [ + "R61MH138612" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000471" + [ + "R61MH138966" ], - "name": [ - "Pozu: Transcoding" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/93329bb6-37be-42e7-ab57-1fd03dde223b", - "class": "Dataset", - "label": "Respiratory dynamics during resident–intruder social interactions in male mice", - "facts": { - "description": [ - "This data contains synchronized respiration and behavioral data collected from male C57 mice during resident–intruder social-interaction sessions, including BLRI, RI1, and RI2 conditions. Data are represented in Neurodata Without Borders (NWB) format and include respiration time series, synchronized behavioral video, manual BORIS behavioral annotations, SLEAP pose-estimation coordinates, and associated SLEAP confidence scores. Video, respiration, behavioral annotations, and pose-estimation data are aligned using the shared Trodes acquisition clock. ECG data are not included." + [ + "R61MH138967" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000534" + [ + "R61MH142354" ], - "name": [ - "Respiratory dynamics during resident–intruder social interactions in male mice" + [ + "U01DA063565" + ], + [ + "U01DA063581" + ], + [ + "U01MH143789" + ], + [ + "U01MH144347" ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" ], - "violations": [] + "row_count": 12, + "status": "answered" }, { - "id": "https://brain-bbqs.org/id/00a0773c-3d61-4450-8256-ab7456c87953", - "class": "Dataset", - "label": "Single Click Science", - "facts": { - "description": [ - "This is a synthetic dataset for cell morphology containing mock data for fractal dimension, volume, and surface area." + "id": "CQ39", + "area": "announcements", + "question": "Which funding opportunities expire between 2026-10-14 and 2027-04-14?", + "access": "anon", + "set": "adopted", + "reads": "rows", + "sparql": "SELECT ?title ?expires WHERE {\n VALUES (?today ?horizon) { (\"2026-10-14\"^^xsd:date \"2027-04-14\"^^xsd:date) }\n ?fo a bbqs:FundingOpportunity ; bbqs:name ?title ; bbqs:expiration_date ?expires .\n FILTER (?expires >= ?today && ?expires <= ?horizon)\n} ORDER BY ?expires", + "terms": [ + "FundingOpportunity", + "expiration_date", + "name" + ], + "unmodeled": [], + "columns": [ + "title", + "expires" + ], + "rows": [ + [ + "PRIMED-AI: Data-to-Model Academic-Industrial Partnerships (D2M-AIP) for Precision Medicine with AI: Integrating Imaging with Multimodal Data (UG3/UH3 Clinical Trial Optional)", + "2026-10-20" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000468" + [ + "Model-to-Clinic (M2C) for Precision Medicine with AI: Integrating Imaging with Multimodal Data (PRIMED-AI) (UG3/UH3 Clinical Trial Optional)", + "2026-10-20" ], - "name": [ - "Single Click Science" + [ + "NSF Graduate Research Fellowship Program (GRFP)", + "2026-10-23" + ], + [ + "Utilizing the Full Power of Empire AI — Request for Applications (Simons Foundation)", + "2026-12-01" ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" ], - "violations": [] + "row_count": 4, + "status": "answered" }, { - "id": "https://brain-bbqs.org/id/41b331ec-b7ab-400f-9899-6c314e9eea6e", - "class": "Dataset", - "label": "SLEAP Annotations", - "facts": { - "description": [ - "Annotations for testing clip of mice in a standard home cage setting from sleap.ai/datasets.html" - ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000265" - ], - "name": [ - "SLEAP Annotations" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "id": "CQ40", + "area": "provenance", + "question": "How many values come from a source graded below 3, by source and table?", + "access": "full", + "set": "adopted", + "reads": "rows", + "sparql": "SELECT ?source ?grade ?type (COUNT(?prov) AS ?records) WHERE {\n ?prov a bbqs:ProvenanceRecord ; bbqs:prov_source_class ?source .\n ?source bbqs:grade ?grade .\n OPTIONAL { ?prov bbqs:prov_entity_table ?type }\n FILTER (?grade < 3)\n} GROUP BY ?source ?grade ?type ORDER BY ?grade", + "terms": [ + "ProvenanceRecord", + "grade", + "prov_entity_table", + "prov_source_class" ], - "violations": [] + "unmodeled": [], + "columns": [ + "source", + "grade", + "type", + "records" + ], + "rows": [], + "row_count": 0, + "status": "n/a" }, { - "id": "https://brain-bbqs.org/id/9cac1ce6-16e0-400b-adda-ad5d2a8597a9", - "class": "Dataset", - "label": "SLEAP Training Data Example", - "facts": { - "description": [ - "This is an example of how SLEAP training data (flies13 from https://sleap.ai/datasets.html) can be converted and stored on EMBER-DANDI" + "id": "CQ41", + "area": "products", + "question": "Which datasets did each grant fund, and who are its PIs?", + "access": "anon", + "set": "adopted", + "reads": "rows", + "sparql": "SELECT ?grant ?ds_name ?pi WHERE {\n ?project a bbqs:Project ; bbqs:grant_number ?grant ; bbqs:funded_datasets ?ds .\n OPTIONAL { ?ds bbqs:name ?ds_name }\n OPTIONAL {\n ?pr bbqs:on_project ?project ; bbqs:project_role ?role ; bbqs:held_by ?person .\n ?person bbqs:name ?pi . FILTER (CONTAINS(LCASE(STR(?role)), \"pi\"))\n }\n} ORDER BY ?grant", + "terms": [ + "Project", + "funded_datasets", + "grant_number", + "held_by", + "name", + "on_project", + "project_role" + ], + "unmodeled": [], + "columns": [ + "grant", + "ds_name", + "pi" + ], + "rows": [ + [ + "R24MH136632", + "EMBER Bees DeepLabCut Training — Workflow Smoke Test", + "Brock Wester" ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000398" + [ + "R24MH136632", + "NDX Wearables", + "Brock Wester" ], - "name": [ - "SLEAP Training Data Example" + [ + "R24MH136632", + "Encoding Helper Demos", + "Brock Wester" + ], + [ + "R34DA059723", + "Mouse food sniff", + "Gordon Shepherd" + ], + [ + "R34DA062119", + "Four-choice reversal digging task", + "Shannon Gourley" + ], + [ + "R34DA062119", + "Four-choice reversal digging task", + "Yi Zuo" + ], + [ + "R34DA062119", + "Four-choice reversal digging task", + "Linda Wilbrecht" ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" ], - "violations": [] + "row_count": 7, + "status": "answered" }, { - "id": "https://brain-bbqs.org/id/7d9026cf-064c-4070-a81c-858dc1303c4a", - "class": "Dataset", - "label": "SuperAnimal-Quadruped-80K", - "facts": { - "description": [ - "Large-scale training data for quadruped pose models" - ], - "external_url": [ - "https://huggingface.co/datasets/DeepLabCut/SuperAnimal-Quadruped-80K" - ], - "name": [ - "SuperAnimal-Quadruped-80K" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "id": "CQ42", + "area": "diagnostics", + "question": "Which working groups have no member with a role on any project?", + "access": "anon", + "set": "adopted", + "reads": "absence", + "sparql": "SELECT ?wg_name WHERE {\n ?wg a bbqs:WorkingGroup ; bbqs:name ?wg_name .\n FILTER NOT EXISTS {\n ?person bbqs:member_of_group ?wg .\n ?pr bbqs:held_by ?person ; bbqs:on_project ?p .\n }\n}", + "terms": [ + "WorkingGroup", + "held_by", + "member_of_group", + "name", + "on_project" ], - "violations": [] - }, + "unmodeled": [], + "columns": [ + "wg_name" + ], + "rows": [], + "row_count": 0, + "status": "none" + } + ], + "competency_summary": { + "answered": 34, + "n/a": 3, + "empty": 3, + "none": 2 + }, + "competency_proposed": [], + "competency_proposed_summary": {}, + "shapes": [ { - "id": "https://brain-bbqs.org/id/d49fe87c-2047-4788-8247-2130a5e0d931", - "class": "Dataset", - "label": "SuperAnimal-TopViewMouse-5K", - "facts": { - "description": [ - "Training data for top-view mouse pose estimation" - ], - "external_url": [ - "https://huggingface.co/datasets/DeepLabCut/SuperAnimal-TopViewMouse-5K" - ], - "name": [ - "SuperAnimal-TopViewMouse-5K" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "shape": "AuthorOrcidResolvesShape", + "target_class": "Publication", + "targets": 89, + "checks": [ + "Investigator", + "author_orcids", + "orcid" ], - "violations": [] + "missing_inputs": [], + "exercised": true }, { - "id": "https://brain-bbqs.org/id/0c87346c-ae43-4e45-8708-682c41353bcc", - "class": "Dataset", - "label": "test", - "facts": { - "description": [ - "test" - ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000001" - ], - "name": [ - "test" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "shape": "AwardUniquePerProjectShape", + "target_class": "Project", + "targets": 33, + "checks": [ + "Project", + "grant_number" ], - "violations": [] + "missing_inputs": [], + "exercised": true }, { - "id": "https://brain-bbqs.org/id/38f4034a-316a-4439-a0d7-161992a8aa67", - "class": "Dataset", - "label": "Test DANDIset (Brock test)", - "facts": { - "description": [ - "Test for new DANDIset" - ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000003" - ], - "name": [ - "Test DANDIset (Brock test)" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "shape": "ConflictingVerifiedProvenanceShape", + "target_class": "ProvenanceRecord", + "targets": 0, + "checks": [ + "is_verified", + "prov_entity_column", + "prov_entity_id", + "prov_entity_table", + "prov_source_class", + "prov_value_text" ], - "violations": [] + "missing_inputs": [ + "is_verified", + "prov_entity_column", + "prov_entity_id", + "prov_entity_table", + "prov_source_class", + "prov_value_text" + ], + "exercised": false }, { - "id": "https://brain-bbqs.org/id/821b1f4e-5bdf-45be-8319-d10a2620fb1a", - "class": "Dataset", - "label": "Test dataset for Pennsieve upload", - "facts": { - "description": [ - "Testing dataset for uploading files from Pennsieve to EMBER-DANDI" - ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000467" - ], - "name": [ - "Test dataset for Pennsieve upload" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "shape": "ConsortiumRoleNotAProjectRoleShape", + "target_class": "Investigator", + "targets": 246, + "checks": [ + "ProjectRole", + "consortium_role", + "held_by", + "project_role" ], - "violations": [] + "missing_inputs": [], + "exercised": true }, { - "id": "https://brain-bbqs.org/id/2b9b6595-65f5-4f03-b4d4-d6725b6bb1c0", - "class": "Dataset", - "label": "TestNeuroConvUpload", - "facts": { - "description": [ - "For automatic testing of NeuroConv + NWB GUIDE upload. May be removed in the future as staging becomes more persistent." - ], - "external_url": [ - "https://dandi.emberarchive.org/dandiset/000431" - ], - "name": [ - "TestNeuroConvUpload" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "shape": "DoiUniquePerPublicationShape", + "target_class": "Publication", + "targets": 89, + "checks": [ + "Publication", + "doi" ], - "violations": [] + "missing_inputs": [], + "exercised": true }, { - "id": "https://brain-bbqs.org/id/85dba242-244b-4a63-b463-b9e6bf4d29e1", - "class": "Device", - "label": "ADOS", - "facts": { - "model_name": [ - "ADOS" - ], - "name": [ - "ADOS" - ] - }, - "out": [ - { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/829b9463-611f-45d6-bd24-262a5410c325" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/a7b15b50-1f35-4e02-91d5-c28593457e3d" - } + "shape": "EmailUniquePerPersonShape", + "target_class": "Investigator", + "targets": 246, + "checks": [ + "email", + "secondary_emails" ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] + "missing_inputs": [ + "email", + "secondary_emails" + ], + "exercised": false }, { - "id": "https://brain-bbqs.org/id/ba876f06-02b2-4ca2-bbc0-2877890b6f6a", - "class": "Device", - "label": "ANT Neuro eego", - "facts": { - "external_url": [ - "https://www.ant-neuro.com/" - ], - "model_name": [ - "ANT Neuro eego" - ], - "name": [ - "ANT Neuro eego" - ] - }, - "out": [ - { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/1f40721b-dadd-4141-8f9d-6661f4777718" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/d5dd8903-0114-4511-a4ec-446ae9f657a8" - } + "shape": "FonUniquePerCallShape", + "target_class": "FundingOpportunity", + "targets": 13, + "checks": [ + "FundingOpportunity", + "fon" ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] + "missing_inputs": [], + "exercised": true }, { - "id": "https://brain-bbqs.org/id/0285843e-0628-489a-a676-27648d2350a7", - "class": "Device", - "label": "Avisoft ultrasonic microphones", - "facts": { - "external_url": [ - "https://www.avisoft.com/" - ], - "model_name": [ - "Avisoft ultrasonic microphones" - ], - "name": [ - "Avisoft ultrasonic microphones" - ] - }, - "out": [ - { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/361a786e-7850-418a-a76a-ea21fc656775" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/2911be71-0f8a-47d5-9b0b-df9c7e75ce2f" - } + "shape": "GradedProvenancePrecedenceShape", + "target_class": "ProvenanceRecord", + "targets": 0, + "checks": [ + "grade", + "prov_entity_column", + "prov_entity_id", + "prov_entity_table", + "prov_source_class", + "prov_value_text" ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] + "missing_inputs": [ + "grade", + "prov_entity_column", + "prov_entity_id", + "prov_entity_table", + "prov_source_class", + "prov_value_text" + ], + "exercised": false }, { - "id": "https://brain-bbqs.org/id/b26a04a7-e254-470c-9d43-1c618d60434e", - "class": "Device", - "label": "Basler cameras", + "shape": "HeldByResolvesShape", + "target_class": "ProjectRole", + "targets": 128, + "checks": [ + "held_by", + "on_project" + ], + "missing_inputs": [], + "exercised": true + }, + { + "shape": "MechanismMatchesGrantNumberShape", + "target_class": "Project", + "targets": 33, + "checks": [ + "grant_number", + "mechanism" + ], + "missing_inputs": [], + "exercised": true + }, + { + "shape": "NodeHasProvenanceShape", + "target_class": "Project", + "targets": 33, + "checks": [ + "ProvenanceRecord", + "prov_entity_id" + ], + "missing_inputs": [ + "ProvenanceRecord", + "prov_entity_id" + ], + "exercised": false + }, + { + "shape": "OneClassPerNodeShape", + "target_class": "subjects of type", + "targets": 758, + "checks": [], + "missing_inputs": [], + "exercised": true + }, + { + "shape": "OneRolePerPersonPerGrantShape", + "target_class": "ProjectRole", + "targets": 128, + "checks": [ + "held_by", + "on_project", + "project_role" + ], + "missing_inputs": [], + "exercised": true + }, + { + "shape": "OrcidUniquePerPersonShape", + "target_class": "Investigator", + "targets": 246, + "checks": [ + "Investigator", + "orcid" + ], + "missing_inputs": [], + "exercised": true + }, + { + "shape": "PmidUniquePerPublicationShape", + "target_class": "Publication", + "targets": 89, + "checks": [ + "Publication", + "pmid" + ], + "missing_inputs": [], + "exercised": true + }, + { + "shape": "ProjectIdentifiersAgreeShape", + "target_class": "Project", + "targets": 33, + "checks": [ + "external_url", + "grant_number", + "name", + "nih_link", + "reporter_project_num" + ], + "missing_inputs": [], + "exercised": true + }, + { + "shape": "ProjectIsAnAwardShape", + "target_class": "Project", + "targets": 33, + "checks": [ + "grant_number" + ], + "missing_inputs": [], + "exercised": true + }, + { + "shape": "ProjectRoleTokenShape", + "target_class": "ProjectRole", + "targets": 128, + "checks": [ + "project_role" + ], + "missing_inputs": [], + "exercised": true + }, + { + "shape": "RevisionOfLinksTwoPublicationsShape", + "target_class": "subjects of revision_of", + "targets": 0, + "checks": [ + "Publication", + "revision_of" + ], + "missing_inputs": [ + "revision_of" + ], + "exercised": false + }, + { + "shape": "StudiesSpeciesResolvesShape", + "target_class": "Project", + "targets": 33, + "checks": [ + "studies_species_unresolved" + ], + "missing_inputs": [ + "studies_species_unresolved" + ], + "exercised": true + }, + { + "shape": "UrlFieldsAreUrlsShape", + "target_class": "subjects of external_url, homepage_url, nih_link, website", + "targets": 276, + "checks": [ + "external_url", + "homepage_url", + "nih_link", + "website" + ], + "missing_inputs": [ + "website" + ], + "exercised": true + } + ], + "violation_count": 0, + "warning_count": 147, + "entities": [ + { + "id": "https://brain-bbqs.org/id/7766280c-d6f3-4c55-8e7e-f9207dbc1d1f", + "class": "Announcement", + "label": "BRAIN Conference 2026: Inventing the Future", "facts": { "external_url": [ - "https://www.baslerweb.com/" - ], - "model_name": [ - "Basler cameras" + "https://braininitiative.nih.gov/" ], "name": [ - "Basler cameras" + "BRAIN Conference 2026: Inventing the Future" ] }, "out": [ { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/3eaf894a-5a66-47be-b36f-ce28d5cd1e9c" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/208980e9-92b9-447e-a2ca-e83bf61db159" } ], "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/5a9d5e58-b370-48ea-a189-a82e7c834708", - "class": "Device", - "label": "Biomark PIT tags", + "id": "https://brain-bbqs.org/id/7395b261-f13c-4d69-b455-6b58f52b0d5a", + "class": "Announcement", + "label": "BRAIN Initiative Research Roadmap Reports Published", "facts": { "external_url": [ - "https://www.biomark.com/" - ], - "model_name": [ - "Biomark PIT tags" + "https://braininitiative.nih.gov/sites/default/files/2025-11/BRAIN%20Research%20Roadmap%20Innovation%20Domains_508c.pdf" ], "name": [ - "Biomark PIT tags" + "BRAIN Initiative Research Roadmap Reports Published" ] }, "out": [ { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/60288cb2-b6fa-41ab-9312-3209dd2cd804" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/562743b9-2c34-4049-806b-10e28796fdba" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/208980e9-92b9-447e-a2ca-e83bf61db159" } ], "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/88b4baf0-8e42-43e8-a689-3f5cd46138ee", - "class": "Device", - "label": "BIOPAC", + "id": "https://brain-bbqs.org/id/30ae82dc-0473-443d-96ae-8bbf8b0206cb", + "class": "Announcement", + "label": "BRAIN NeuroAI Community Updates Listserv Launched", "facts": { "external_url": [ - "https://www.biopac.com/" - ], - "model_name": [ - "BIOPAC" + "mailto:listserv@list.nih.gov" ], "name": [ - "BIOPAC" + "BRAIN NeuroAI Community Updates Listserv Launched" ] }, "out": [ { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/851882bb-3321-45ed-af75-6ae08836c1fc" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/34971c92-6e5a-4231-8d74-3759c2301d8b" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/208980e9-92b9-447e-a2ca-e83bf61db159" } ], "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/6c4c36dd-6d17-47d9-8bff-c1cde1750dc7", - "class": "Device", - "label": "BOT-3", + "id": "https://brain-bbqs.org/id/1cf7c61c-a403-4eb5-8a84-07a1e2da8fb4", + "class": "Announcement", + "label": "BRAIN NeuroAI Workshop Summary and Program Book Available", "facts": { - "model_name": [ - "BOT-3" + "external_url": [ + "https://braininitiative.nih.gov/news-events/events/brain-neuroai-workshop" ], "name": [ - "BOT-3" + "BRAIN NeuroAI Workshop Summary and Program Book Available" ] }, "out": [ { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/829b9463-611f-45d6-bd24-262a5410c325" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/c42dadeb-bf3c-44fa-baff-92adea2e0185" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/208980e9-92b9-447e-a2ca-e83bf61db159" } ], "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/700795ce-fd4c-49cc-b037-e9c244039e5e", - "class": "Device", - "label": "COSMED K5", + "id": "https://brain-bbqs.org/id/46841d0e-4d55-4690-81f0-41c33f424bc8", + "class": "Announcement", + "label": "Canada Impact+ Research Training Awards (CIRTA)", "facts": { - "external_url": [ - "https://www.cosmed.com/" - ], - "model_name": [ - "COSMED K5" + "description": [ + "McGill University is accepting nominations for the Canada Impact+ Research Training Awards — a one-time initiative to recruit international or returning Canadian doctoral students ($40K/yr × 3 years, 600 awards) and postdoctoral researchers ($70K/yr × 2 years, 400 awards). Priority areas include AI, health/biotech, clean tech, climate resilience, and more." ], "name": [ - "COSMED K5" + "Canada Impact+ Research Training Awards (CIRTA)" ] }, "out": [ { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/7e99c7ca-9c1d-4de5-b6b5-a6c96c5341af" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/e038c24f-a4b4-4b18-af2a-a8f0ae2a21c7" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/766331fd-daea-4a31-86c4-589737e533ea" } ], "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/a991c266-2e08-46e8-b579-8d10341fc344", - "class": "Device", - "label": "Delsys Trigno", + "id": "https://brain-bbqs.org/id/00343fc4-d3b9-4b22-8445-dcef0a11a5e4", + "class": "Announcement", + "label": "Children's Speech Recognition Challenge — $120K Prize Pool", "facts": { - "external_url": [ - "https://delsys.com/trigno/" + "description": [ + "DrivenData has launched the \"On Top of Pasketti\" Children's Speech Recognition Challenge, focused on building open, high-quality ASR models for children's speech. Participants work with ~560K transcribed utterances (519 hours of child speech). Two tracks: Word-level ASR and Phonetic ASR. Open through April 6, 2026." ], - "model_name": [ - "Delsys Trigno" + "external_url": [ + "https://kidsasr.drivendata.org/" ], "name": [ - "Delsys Trigno" + "Children's Speech Recognition Challenge — $120K Prize Pool" ] }, "out": [ { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/1eda4bd4-4446-40c3-8996-7400722b1560" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/6b2192d5-d840-4f4b-be96-5cec4f2fe432" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/766331fd-daea-4a31-86c4-589737e533ea" } ], "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/3b549548-0ca5-4c7e-91ba-a6a1ed51705e", - "class": "Device", - "label": "EmotiBit", + "id": "https://brain-bbqs.org/id/5b87def1-786b-470f-879c-9089ebde049d", + "class": "Announcement", + "label": "Consortia-Wide Workshop at MIT", "facts": { - "external_url": [ - "https://www.emotibit.com/" - ], - "model_name": [ - "EmotiBit" + "description": [ + "A 3-day Consortia-Wide Workshop will be held at MIT from July 15-17, 2025. Consortia members, please check your messages for signup information and further details." ], "name": [ - "EmotiBit" + "Consortia-Wide Workshop at MIT" ] }, "out": [ { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/851882bb-3321-45ed-af75-6ae08836c1fc" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/31c5064c-5df0-4821-9ea7-d3807308ba18" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/766331fd-daea-4a31-86c4-589737e533ea" } ], "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/8d1248d6-6ad4-449a-b268-69c17fb8e0bd", - "class": "Device", - "label": "Empatica EmbracePlus", + "id": "https://brain-bbqs.org/id/1b79d65a-57fd-455c-96e7-acc3b3eb6c01", + "class": "Announcement", + "label": "In the news: AI is helping scientists eavesdrop on Costa Rica's monkeys", "facts": { "external_url": [ - "https://www.empatica.com/embraceplus/" - ], - "model_name": [ - "Empatica EmbracePlus" + "https://www.nytimes.com/2026/07/28/science/costa-rica-monkeys-ai.html?unlocked_article_code=1.1VA.toSv.7Q3TKDdHKC0H&smid=url-share" ], "name": [ - "Empatica EmbracePlus" + "In the news: AI is helping scientists eavesdrop on Costa Rica's monkeys" ] }, "out": [ { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/851882bb-3321-45ed-af75-6ae08836c1fc" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/0f782852-6d9e-4d3b-8c38-6e0573400461" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/766331fd-daea-4a31-86c4-589737e533ea" } ], "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/fbbd19db-7e98-42cd-a230-510ddff40cef", - "class": "Device", - "label": "FLIR / Teledyne cameras", + "id": "https://brain-bbqs.org/id/42efe7fa-561b-4a00-af58-78b71f9d4b1a", + "class": "Announcement", + "label": "New BBQS Website Launch", "facts": { - "external_url": [ - "https://www.flir.com/" - ], - "model_name": [ - "FLIR / Teledyne cameras" + "description": [ + "A new website for BBQS (this) was born. 🎊" ], "name": [ - "FLIR / Teledyne cameras" + "New BBQS Website Launch" ] }, "out": [ { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/0e76fcd9-9746-4456-a344-50f817379dcf" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/d68a81db-70f9-4ea5-95af-3f1f83a46771" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/766331fd-daea-4a31-86c4-589737e533ea" } ], "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/130afdbe-9128-4afb-a7cd-f27967d52a7a", - "class": "Device", - "label": "Garmin GPS", + "id": "https://brain-bbqs.org/id/0cdfab9b-92fe-45c6-afbe-9f22d7eda7dd", + "class": "Announcement", + "label": "NIH Common Fund PRIMED-AI — five funding opportunities open", "facts": { "external_url": [ - "https://www.garmin.com/" - ], - "model_name": [ - "Garmin GPS" + "https://go.nih.gov/6sLn5QY" ], "name": [ - "Garmin GPS" + "NIH Common Fund PRIMED-AI — five funding opportunities open" ] }, "out": [ { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/31b21990-8007-45a0-86e0-d1e9e412d9a7" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/1a3ec6ab-3abd-4da5-b938-e9818c52b95a" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/208980e9-92b9-447e-a2ca-e83bf61db159" } ], "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/7eb373e9-092d-418d-b3ff-4f7d8e4fb939", - "class": "Device", - "label": "GoPro HERO10", + "id": "https://brain-bbqs.org/id/0f875168-9793-465b-9ab1-bf8f18492778", + "class": "Announcement", + "label": "NSF NeuroAI and Beyond Workshop Report (Preprint)", "facts": { "external_url": [ - "https://gopro.com/" - ], - "model_name": [ - "GoPro HERO10" + "https://arxiv.org/abs/2601.19955" ], "name": [ - "GoPro HERO10" + "NSF NeuroAI and Beyond Workshop Report (Preprint)" ] }, "out": [ { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/56efc35e-a021-483f-b2b1-1dae1f893d18" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/62826284-8258-4f21-af3e-64fc755ef2b2" } ], "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/429c73a9-8440-4f1f-a2f7-a8a1b75958a7", - "class": "Device", - "label": "Leiter-3", + "id": "https://brain-bbqs.org/id/3533afc4-be44-460c-bada-ab578b028acb", + "class": "Announcement", + "label": "SFN Annual Meeting 2025", "facts": { - "model_name": [ - "Leiter-3" + "description": [ + "BBQS will be presenting at the Society for Neuroscience Annual Meeting in San Diego. Join us at Booth #3830 and #3831 or attend our symposium." ], "name": [ - "Leiter-3" + "SFN Annual Meeting 2025" ] }, "out": [ { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/829b9463-611f-45d6-bd24-262a5410c325" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/541eb3ec-855c-427e-9d9d-816b3845b9cf" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/00b6e913-54e0-4cb5-bfdb-7c4123de51d6" } ], "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/66955dda-ed5c-4e05-bfbb-5f9f203af4dd", - "class": "Device", - "label": "mBrainTrain Smarting", + "id": "https://brain-bbqs.org/id/83f2b36c-b0c8-4d4e-a1aa-08639a4068ae", + "class": "Benchmark", + "label": "Animal Pose Leaderboard", "facts": { - "external_url": [ - "https://mbraintrain.com/" + "description": [ + "Comparative ranking of pose estimation methods" ], - "model_name": [ - "mBrainTrain Smarting" + "external_url": [ + "https://paperswithcode.com/task/animal-pose-estimation" ], "name": [ - "mBrainTrain Smarting" + "Animal Pose Leaderboard" ] }, - "out": [ - { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/1f40721b-dadd-4141-8f9d-6661f4777718" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/9e769c4e-0958-4ccc-bb96-d714734fa461" - } - ], + "out": [], "in": [], "dangling": [], - "degree": 2, - "flags": [], + "degree": 0, + "flags": [ + "isolated" + ], "violations": [] }, { - "id": "https://brain-bbqs.org/id/790607e8-4030-4e55-83fb-8df121fbb7b7", - "class": "Device", - "label": "Med Associates touchscreens", + "id": "https://brain-bbqs.org/id/858afe90-ab36-4d22-bfde-b4d7630a72ef", + "class": "Benchmark", + "label": "DLC Benchmarks", "facts": { - "external_url": [ - "https://www.med-associates.com/" + "description": [ + "Standardized evaluation of pose estimation accuracy across scenarios" ], - "model_name": [ - "Med Associates touchscreens" + "external_url": [ + "https://benchmark.deeplabcut.org/" ], "name": [ - "Med Associates touchscreens" + "DLC Benchmarks" ] }, - "out": [ - { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/0fad9963-1681-478c-881e-348e2736fafe" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/765fd145-afc8-4101-92d5-33aff8c04fac" - } - ], + "out": [], "in": [], "dangling": [], - "degree": 2, - "flags": [], + "degree": 0, + "flags": [ + "isolated" + ], "violations": [] }, { - "id": "https://brain-bbqs.org/id/773ddab2-ad45-41ac-8003-b80935d30c32", - "class": "Device", - "label": "Medtronic Percept", + "id": "https://brain-bbqs.org/id/b9f28848-dd76-4bf7-9fd6-a4d1509154eb", + "class": "Benchmark", + "label": "DLC Leaderboard", "facts": { - "external_url": [ - "https://www.medtronic.com/" + "description": [ + "Performance comparison for DLC-based approaches" ], - "model_name": [ - "Medtronic Percept" + "external_url": [ + "https://huggingface.co/spaces/DeepLabCut/Leaderboard" ], "name": [ - "Medtronic Percept" + "DLC Leaderboard" ] }, "out": [ { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/e9d52180-5701-46ba-b5dc-7fc6fa32233b" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/ab859681-c7fc-40cf-8d61-51035f1d8605" + "predicate": "evaluates", + "target": "https://brain-bbqs.org/id/4009a1f6-c173-495b-9725-bb51571a3cdf" } ], "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/4d59ea78-e15f-4f78-92d4-28f4041b297f", - "class": "Device", - "label": "miniDSP UMA-16", + "id": "https://brain-bbqs.org/id/4921bfdf-7432-48ac-911d-0cb825184ef1", + "class": "Benchmark", + "label": "VCL Benchmark", "facts": { - "external_url": [ - "https://www.minidsp.com/products/usb-audio-interface/uma-16" + "description": [ + "Vocal Call Locator benchmark: 767,295 rodent sounds with ground-truth sources across 9 datasets, for sound source localization from multi-channel audio" ], - "model_name": [ - "miniDSP UMA-16" + "external_url": [ + "https://vclbenchmark.flatironinstitute.org" ], "name": [ - "miniDSP UMA-16" + "VCL Benchmark" ] }, - "out": [ - { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/e80e0495-82ff-4d51-995f-36e9349b40fb" - }, + "out": [], + "in": [ { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/8482b347-2401-49bb-99c6-19a26be255c7" + "predicate": "produced", + "source": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/a9da991f-1bcd-4b6c-ab45-e67af7d3b755", - "class": "Device", - "label": "Motek CAREN", + "id": "https://brain-bbqs.org/id/1cabb668-d89d-4bbb-a9c2-ea79f7a93708", + "class": "Dataset", + "label": "BBQS Snippets", "facts": { - "external_url": [ - "https://www.motekmedical.com/solution/caren/" + "description": [ + "A collection of video snippets from across the BBQS." ], - "model_name": [ - "Motek CAREN" + "external_url": [ + "https://dandi.emberarchive.org/dandiset/000474" ], "name": [ - "Motek CAREN" + "BBQS Snippets" ] }, - "out": [ - { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/1933d538-1acc-4a01-8691-9ecd2989d0e2" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/d74d8fe3-4c71-481b-8a54-410c4e3574a9" - } - ], + "out": [], "in": [], "dangling": [], - "degree": 2, - "flags": [], + "degree": 0, + "flags": [ + "isolated" + ], "violations": [] }, { - "id": "https://brain-bbqs.org/id/a36c70d6-19a8-40b6-a8a1-7aaea7e5b918", - "class": "Device", - "label": "Natus XLTek", + "id": "https://brain-bbqs.org/id/2e4c95a3-a0bb-4a43-a647-7077547dedf0", + "class": "Dataset", + "label": "Days of our Mice (DooM): a cross-laboratory dataset of mouse social behavior", "facts": { - "external_url": [ - "https://natus.com/" + "description": [ + "This dataset holds pose tracking, human-scored behavior bouts and video for 587 videos of freely interacting mice, recorded in 15 labs. It contains 71,870 annotated bouts of 33 scored behavior types. These are the lab-contributed datasets of the MABe-2025 behavior-classification competition, at the cleaned revision (2026-07-18) used to train the HiDRA classifier. The competition's other sources (MABe22, CalMS21 and CRIM13) are published separately and aren't included here. Each video has an MP4, a SLEAP .slp file with its pose tracks and behavior bouts, and the same pose and bouts in the competition's Parquet format (.tracking.pkt, .annotation.pkt). See README.md for details." ], - "model_name": [ - "Natus XLTek" + "external_url": [ + "https://dandi.emberarchive.org/dandiset/000564" ], "name": [ - "Natus XLTek" + "Days of our Mice (DooM): a cross-laboratory dataset of mouse social behavior" ] }, - "out": [ - { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/46ca9982-9f32-4d56-84fc-95df94a69e7d" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/90716be1-d61b-4641-ba7e-da9533d0dbeb" - } - ], + "out": [], "in": [], "dangling": [], - "degree": 2, - "flags": [], + "degree": 0, + "flags": [ + "isolated" + ], "violations": [] }, { - "id": "https://brain-bbqs.org/id/f8ca9029-6e50-43a2-802d-e61784795036", - "class": "Device", - "label": "NeuroPace RNS System", + "id": "https://brain-bbqs.org/id/4f6fe91b-9a18-467b-8a17-46bc3404f22e", + "class": "Dataset", + "label": "EMBER Bees DeepLabCut Training — Workflow Smoke Test", "facts": { - "external_url": [ - "https://www.neuropace.com/" + "description": [ + "Bees pose-estimation data prepared in DeepLabCut format for testing a DANDI download → Pennsieve training → DANDI upload workflow. Includes labeled training and validation images, annotation files, and a DeepLabCut project configuration. Derived from the bees data in Dandiset 000398. Intended for workflow validation, not as a new scientific benchmark." ], - "model_name": [ - "NeuroPace RNS System" + "external_url": [ + "https://dandi.emberarchive.org/dandiset/000598" ], "name": [ - "NeuroPace RNS System" + "EMBER Bees DeepLabCut Training — Workflow Smoke Test" ] }, - "out": [ - { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/e9d52180-5701-46ba-b5dc-7fc6fa32233b" - }, + "out": [], + "in": [ { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/bc8054b3-253f-4b13-a281-841deb7598e8" + "predicate": "funded_datasets", + "source": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/d3a36c76-22a9-4762-8ce6-a53725475669", - "class": "Device", - "label": "Neuropixels", + "id": "https://brain-bbqs.org/id/95b1db49-e4dd-4bab-9bb1-21400d850386", + "class": "Dataset", + "label": "Encoding Helper Demos", "facts": { - "external_url": [ - "https://www.neuropixels.org/" + "award_numbers": [ + "R24MH136632" ], - "model_name": [ - "Neuropixels" + "description": [ + "A collection of exemplary videos for use in the Encoding Helper tool." + ], + "external_url": [ + "https://dandi.emberarchive.org/dandiset/000527" ], "name": [ - "Neuropixels" + "Encoding Helper Demos" ] }, - "out": [ - { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/f328ad53-2dd2-490f-adf1-40e9cd85b5bd" - }, + "out": [], + "in": [ { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/9bd0353c-a176-48d7-9f2c-59375ae7819b" + "predicate": "funded_datasets", + "source": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/b91a5db1-9e21-4158-a14f-087f59f5bd8d", - "class": "Device", - "label": "OBSBOT cameras", + "id": "https://brain-bbqs.org/id/44376171-f0d7-4e91-9c91-6558f6253fe3", + "class": "Dataset", + "label": "Four-choice reversal digging task", "facts": { - "external_url": [ - "https://www.obsbot.com/" + "description": [ + "An Aggregate Dandiset for Four-choice reversal digging task in MAABCD" ], - "model_name": [ - "OBSBOT cameras" + "external_url": [ + "https://dandi.emberarchive.org/dandiset/000607" ], "name": [ - "OBSBOT cameras" + "Four-choice reversal digging task" ] }, - "out": [ - { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" - }, + "out": [], + "in": [ { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/188ce5e2-0a5f-4c69-a9ec-bf7b8b1ebbc4" + "predicate": "funded_datasets", + "source": "https://brain-bbqs.org/id/f294b0d9-175a-47c7-854c-d4d750009812" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/47974228-8745-4b67-8857-4450426743a7", - "class": "Device", - "label": "Open Ephys", + "id": "https://brain-bbqs.org/id/5d041fa1-d9fa-416b-a937-3844a9df5f0b", + "class": "Dataset", + "label": "Human neural dynamics of real-world and imagined navigation", "facts": { - "external_url": [ - "https://open-ephys.org/" + "award_numbers": [ + "U01NS117838" ], - "model_name": [ - "Open Ephys" + "description": [ + "The ability to form episodic memories and later imagine them is integral to the human experience, influencing our recollection of the past and envisioning of the future. While rodent studies suggest the medial temporal lobe, especially the hippocampus, is involved in these functions, its role in human imagination remains uncertain. In human participants, imaginations can be explicitly instructed and reported. Here we investigate hippocampal theta oscillations during real-world and imagined navigation using motion capture and intracranial electroencephalographic recordings from individuals with chronically implanted medial temporal lobe electrodes. Our results revealed intermittent theta dynamics, particularly within the hippocampus, encoding spatial information and partitioning navigational routes into linear segments during real-world navigation. During imagined navigation, theta dynamics exhibited similar patterns despite the absence of external cues. A statistical model successfully reconstructed real-world and imagined positions, providing insights into the neural mechanisms underlying human navigation and imagination, with implications for understanding memory in real-world settings." + ], + "external_url": [ + "https://dandi.emberarchive.org/dandiset/000479" ], "name": [ - "Open Ephys" + "Human neural dynamics of real-world and imagined navigation" ] }, - "out": [ - { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/006caa68-8b24-474f-867f-82a6199a84b1" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/2367da64-4eae-4655-a4dc-315ad12e3398" - } - ], + "out": [], "in": [], "dangling": [], - "degree": 2, - "flags": [], + "degree": 0, + "flags": [ + "isolated" + ], "violations": [] }, { - "id": "https://brain-bbqs.org/id/dda87113-f453-47bd-8c34-14855db21e4a", - "class": "Device", - "label": "OptiTrack", + "id": "https://brain-bbqs.org/id/b5211490-2071-4d4d-8ce6-9ca471210299", + "class": "Dataset", + "label": "Isogenic and Genetically Diverse Aging Video dataset", "facts": { - "external_url": [ - "https://optitrack.com/" + "description": [ + "This dataset consists of over 1,100 - 1 hour of open field videos meant to capture frailty. The animals range from 8 weeks to 4.2 years. The following papers have used this data. The work has been funded by the National Institute on Aging. @article{Hessionetal2022, author = {Hession, Luke E. and Sabnis, Gautam S. and Churchill, Gary A. and Kumar, Vivek}, title = {A machine-vision-based frailty index for mice}, journal = {Nature Aging}, year = {2022}, volume = {2}, pages = {756--766}, doi = {10.1038/s43587-022-00266-0}}@article{Sabnisetal2025, author = {Sabnis, Gautam S. and Churchill, Gary A. and Kumar, Vivek}, title = {Machine vision based frailty assessment for genetically diverse mice}, journal = {GeroScience}, year = {2025}, doi = {10.1007/s11357-025-01583-z}}@article{Kumar2026, author = {Kumar Lab}, title = {Integrating supervised and unsupervised machine learning for behavior segmentation reveals latent frailty signatures and improves aging clocks in isogenic and outbred mice}, journal = {bioRxiv}, year = {2026}, doi = {10.64898/2026.03.23.713050v1}}" ], - "model_name": [ - "OptiTrack" + "external_url": [ + "https://dandi.emberarchive.org/dandiset/000466" ], "name": [ - "OptiTrack" + "Isogenic and Genetically Diverse Aging Video dataset" ] }, - "out": [ - { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/560d0a58-2a10-439c-b397-4eecb30a2388" - } - ], + "out": [], "in": [], "dangling": [], - "degree": 2, - "flags": [], + "degree": 0, + "flags": [ + "isolated" + ], "violations": [] }, { - "id": "https://brain-bbqs.org/id/2538b9fd-01c4-453f-a20b-e7351cfa8c21", - "class": "Device", - "label": "PPVT", + "id": "https://brain-bbqs.org/id/99f38f2a-e4e4-49f7-bd61-5d3ba17134cc", + "class": "Dataset", + "label": "Mouse food sniff", "facts": { - "model_name": [ - "PPVT" + "award_numbers": [ + "R34DA059723", + "R37NS061963" + ], + "description": [ + "This dataset accompanies Gao et al. \"Dexterous single sniffs for ethological active olfaction\"." + ], + "external_url": [ + "https://dandi.emberarchive.org/dandiset/000463" ], "name": [ - "PPVT" + "Mouse food sniff" ] }, - "out": [ - { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/829b9463-611f-45d6-bd24-262a5410c325" - }, + "out": [], + "in": [ { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/c42dadeb-bf3c-44fa-baff-92adea2e0185" + "predicate": "funded_datasets", + "source": "https://brain-bbqs.org/id/2db5ee93-296a-446a-a3e6-59fd3d28c4a6" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/ab492763-6805-4afd-bf3f-28eec5276d6d", - "class": "Device", - "label": "Pupil Labs eye trackers", + "id": "https://brain-bbqs.org/id/199d9cea-460f-4470-957d-c9f458c237f1", + "class": "Dataset", + "label": "Mouse Open-Field Semicircle Foraging Task", "facts": { - "external_url": [ - "https://pupil-labs.com/" + "description": [ + "Mice with implanted Neuropixels electrodes freely locomote in a semicircle apparatus in which 27 choice ports line the rounded rim of the arena. A trial start / reward port in the center of the flat part of the arena provides a liquid sugar water reward probabilistically based on the animals choice." ], - "model_name": [ - "Pupil Labs eye trackers" + "external_url": [ + "https://dandi.emberarchive.org/dandiset/000532" ], "name": [ - "Pupil Labs eye trackers" + "Mouse Open-Field Semicircle Foraging Task" ] }, - "out": [ - { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/7d968a4f-f412-431e-a9d9-6ec963cb8677" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/9b910269-1934-4f7b-a4f7-9f375f401d8d" - } - ], + "out": [], "in": [], "dangling": [], - "degree": 2, - "flags": [], + "degree": 0, + "flags": [ + "isolated" + ], "violations": [] }, { - "id": "https://brain-bbqs.org/id/f77c0d96-5deb-4d90-bc8e-7acb14863595", - "class": "Device", - "label": "SCQ", + "id": "https://brain-bbqs.org/id/a177387c-24d4-4e12-8f7d-76994130f853", + "class": "Dataset", + "label": "Naturalistic Mouse Behavior", "facts": { - "model_name": [ - "SCQ" + "description": [ + "Videos from four cameras placed around a clear arena while a mouse freely behaves." + ], + "external_url": [ + "https://dandi.emberarchive.org/dandiset/000465" ], "name": [ - "SCQ" + "Naturalistic Mouse Behavior" ] }, - "out": [ - { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/829b9463-611f-45d6-bd24-262a5410c325" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/a7b15b50-1f35-4e02-91d5-c28593457e3d" - } - ], + "out": [], "in": [], "dangling": [], - "degree": 2, - "flags": [], + "degree": 0, + "flags": [ + "isolated" + ], "violations": [] }, { - "id": "https://brain-bbqs.org/id/342800f7-b7b5-4b7e-9f41-d528b68d3c3d", - "class": "Device", - "label": "Shimmer3 GSR+", + "id": "https://brain-bbqs.org/id/72c84eee-67e0-47db-9502-bb55558d9819", + "class": "Dataset", + "label": "NDX Wearables", "facts": { - "external_url": [ - "https://shimmersensing.com/" + "description": [ + "This project contains synthetic data files which demonstrate the use of and support development of the NDX Wearables extension. Neurodata without borders (NWB), with its supporting suite of tools and online data archives, offers a promising medium for data sharing, but does not support wearables data. We describe and implement an NWB extension package that enables NWB to support a wide variety of data modalities recorded from wearable devices and handle multiple concurrent estimates of the same metric from multiple independent devices. This package, along with support from data sharing platforms, will enable better collaborations, more reproducible analysis, and the development of better foundational models of disorders. You will find the up to date v0.2 example in 'sub-synthetic-pre-release-0-2'." ], - "model_name": [ - "Shimmer3 GSR+" + "external_url": [ + "https://dandi.emberarchive.org/dandiset/000207" ], "name": [ - "Shimmer3 GSR+" + "NDX Wearables" ] }, - "out": [ - { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/ac703a69-84bb-4157-b5c9-6d3f4e4d2c49" - }, + "out": [], + "in": [ { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/615d81a2-ce1b-4d1e-8f17-30d97dddb2a0" + "predicate": "funded_datasets", + "source": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/4dc711e8-2a6e-458e-88cb-a5dcd9b8336e", - "class": "Device", - "label": "SRS", + "id": "https://brain-bbqs.org/id/b5f65a35-ad99-4779-ab8c-2f211803ca2e", + "class": "Dataset", + "label": "Pose Zoo: Bounding Box", "facts": { - "model_name": [ - "SRS" + "description": [ + "Testing" + ], + "external_url": [ + "https://dandi.emberarchive.org/dandiset/000469" ], "name": [ - "SRS" + "Pose Zoo: Bounding Box" ] }, - "out": [ - { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/829b9463-611f-45d6-bd24-262a5410c325" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/a7b15b50-1f35-4e02-91d5-c28593457e3d" - } - ], + "out": [], "in": [], "dangling": [], - "degree": 2, - "flags": [], + "degree": 0, + "flags": [ + "isolated" + ], "violations": [] }, { - "id": "https://brain-bbqs.org/id/ce24eb59-9276-4e28-9d93-342515a4e970", - "class": "Device", - "label": "Tobii Pro", + "id": "https://brain-bbqs.org/id/0c4561e1-221b-4444-ac15-6c2220beb292", + "class": "Dataset", + "label": "Pozu: Labels", "facts": { - "external_url": [ - "https://www.tobii.com/products/eye-trackers" + "description": [ + "This dataset contains automated contributions of pose labels for subjects from random video frames." ], - "model_name": [ - "Tobii Pro" + "external_url": [ + "https://dandi.emberarchive.org/dandiset/000470" ], "name": [ - "Tobii Pro" + "Pozu: Labels" ] }, - "out": [ - { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/7d968a4f-f412-431e-a9d9-6ec963cb8677" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/79786801-1f05-4281-b4c3-9180854ee278" - } - ], + "out": [], "in": [], "dangling": [], - "degree": 2, - "flags": [], + "degree": 0, + "flags": [ + "isolated" + ], "violations": [] }, { - "id": "https://brain-bbqs.org/id/55e0ecb2-5960-47a0-9fb6-6c2162bfe182", - "class": "Device", - "label": "White Matter e3 / eCube", + "id": "https://brain-bbqs.org/id/1e988b46-bfe4-4e41-843e-b6b0ae88efcb", + "class": "Dataset", + "label": "Pozu: Transcoding", "facts": { - "external_url": [ - "https://white-matter.com/" + "description": [ + "A collection of behavioral videos, transcoded into a common space for pose labeling and foundation model training." ], - "model_name": [ - "White Matter e3 / eCube" + "external_url": [ + "https://dandi.emberarchive.org/dandiset/000471" ], "name": [ - "White Matter e3 / eCube" + "Pozu: Transcoding" ] }, - "out": [ - { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/006caa68-8b24-474f-867f-82a6199a84b1" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/58e396e9-0430-4678-ab24-382bba814d8b" - } - ], + "out": [], "in": [], "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/16f63350-9197-4e16-8a8c-0f67b2da18df", - "class": "Device", - "label": "Wildlife Acoustics recorders", - "facts": { - "external_url": [ - "https://www.wildlifeacoustics.com/" - ], - "model_name": [ - "Wildlife Acoustics recorders" - ], - "name": [ - "Wildlife Acoustics recorders" - ] - }, - "out": [ - { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/e80e0495-82ff-4d51-995f-36e9349b40fb" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/ddff023c-f84e-41b2-aa9e-1e8ee0d743fd" - } - ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/a25d5bdb-97ea-4995-a9aa-fcb6059fcb1f", - "class": "Device", - "label": "Xsens", - "facts": { - "external_url": [ - "https://www.movella.com/products/motion-capture" - ], - "model_name": [ - "Xsens" - ], - "name": [ - "Xsens" - ] - }, - "out": [ - { - "predicate": "device_category", - "target": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3" - }, - { - "predicate": "manufacturer", - "target": "https://brain-bbqs.org/id/247cc4da-1133-4307-97c9-8238c723dc67" - } + "degree": 0, + "flags": [ + "isolated" ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/0fad9963-1681-478c-881e-348e2736fafe", - "class": "DeviceCategory", - "label": "Behavioral Apparatus", + "id": "https://brain-bbqs.org/id/93329bb6-37be-42e7-ab57-1fd03dde223b", + "class": "Dataset", + "label": "Respiratory dynamics during resident–intruder social interactions in male mice", "facts": { - "category_key": [ - "behavioral_apparatus" - ], "description": [ - "Operant boxes, arenas, treadmills, and task hardware." - ], - "label": [ - "Behavioral Apparatus" + "This data contains synchronized respiration and behavioral data collected from male C57 mice during resident–intruder social-interaction sessions, including BLRI, RI1, and RI2 conditions. Data are represented in Neurodata Without Borders (NWB) format and include respiration time series, synchronized behavioral video, manual BORIS behavioral annotations, SLEAP pose-estimation coordinates, and associated SLEAP confidence scores. Video, respiration, behavioral annotations, and pose-estimation data are aligned using the shared Trodes acquisition clock. ECG data are not included." ], - "measures": [ - "Trial events", - "latencies", - "responses" + "external_url": [ + "https://dandi.emberarchive.org/dandiset/000534" ], "name": [ - "Behavioral Apparatus" + "Respiratory dynamics during resident–intruder social interactions in male mice" ] }, "out": [], - "in": [ - { - "predicate": "device_category", - "source": "https://brain-bbqs.org/id/790607e8-4030-4e55-83fb-8df121fbb7b7" - } - ], + "in": [], "dangling": [], - "degree": 1, - "flags": [], + "degree": 0, + "flags": [ + "isolated" + ], "violations": [] }, { - "id": "https://brain-bbqs.org/id/739c57c7-7580-45e4-b1fd-c4ed51529353", - "class": "DeviceCategory", - "label": "Biofluid / Biochemical Sensing", + "id": "https://brain-bbqs.org/id/41b331ec-b7ab-400f-9899-6c314e9eea6e", + "class": "Dataset", + "label": "SLEAP Annotations", "facts": { - "category_key": [ - "biofluid" - ], "description": [ - "Wearable and assay-based biochemical measurement." - ], - "label": [ - "Biofluid / Biochemical Sensing" + "Annotations for testing clip of mice in a standard home cage setting from sleap.ai/datasets.html" ], - "measures": [ - "Cortisol", - "biomarker concentration" + "external_url": [ + "https://dandi.emberarchive.org/dandiset/000265" ], "name": [ - "Biofluid / Biochemical Sensing" + "SLEAP Annotations" ] }, "out": [], @@ -4648,25 +4552,18 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/76a90dc5-13f0-4837-9acf-f00d5be08b90", - "class": "DeviceCategory", - "label": "Body Temperature Sensing", + "id": "https://brain-bbqs.org/id/9cac1ce6-16e0-400b-adda-ad5d2a8597a9", + "class": "Dataset", + "label": "SLEAP Training Data Example", "facts": { - "category_key": [ - "temperature" - ], "description": [ - "Core and skin temperature sensors." - ], - "label": [ - "Body Temperature Sensing" + "This is an example of how SLEAP training data (flies13 from https://sleap.ai/datasets.html) can be converted and stored on EMBER-DANDI" ], - "measures": [ - "Core temperature", - "skin temperature" + "external_url": [ + "https://dandi.emberarchive.org/dandiset/000398" ], "name": [ - "Body Temperature Sensing" + "SLEAP Training Data Example" ] }, "out": [], @@ -4679,79 +4576,42 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/829b9463-611f-45d6-bd24-262a5410c325", - "class": "DeviceCategory", - "label": "Clinical Assessment Instrument", + "id": "https://brain-bbqs.org/id/7d9026cf-064c-4070-a81c-858dc1303c4a", + "class": "Dataset", + "label": "SuperAnimal-Quadruped-80K", "facts": { - "category_key": [ - "clinical_assessment" - ], "description": [ - "Standardized clinical and psychometric instruments." - ], - "label": [ - "Clinical Assessment Instrument" + "Large-scale training data for quadruped pose models" ], - "measures": [ - "Scaled scores", - "subscale scores" + "external_url": [ + "https://huggingface.co/datasets/DeepLabCut/SuperAnimal-Quadruped-80K" ], "name": [ - "Clinical Assessment Instrument" + "SuperAnimal-Quadruped-80K" ] }, "out": [], - "in": [ - { - "predicate": "device_category", - "source": "https://brain-bbqs.org/id/f77c0d96-5deb-4d90-bc8e-7acb14863595" - }, - { - "predicate": "device_category", - "source": "https://brain-bbqs.org/id/6c4c36dd-6d17-47d9-8bff-c1cde1750dc7" - }, - { - "predicate": "device_category", - "source": "https://brain-bbqs.org/id/4dc711e8-2a6e-458e-88cb-a5dcd9b8336e" - }, - { - "predicate": "device_category", - "source": "https://brain-bbqs.org/id/429c73a9-8440-4f1f-a2f7-a8a1b75958a7" - }, - { - "predicate": "device_category", - "source": "https://brain-bbqs.org/id/2538b9fd-01c4-453f-a20b-e7351cfa8c21" - }, - { - "predicate": "device_category", - "source": "https://brain-bbqs.org/id/85dba242-244b-4a63-b463-b9e6bf4d29e1" - } - ], + "in": [], "dangling": [], - "degree": 6, - "flags": [], + "degree": 0, + "flags": [ + "isolated" + ], "violations": [] }, { - "id": "https://brain-bbqs.org/id/f55eaf7c-d38c-46a6-a6ce-1d78c826ff59", - "class": "DeviceCategory", - "label": "Depth / 3D Camera", + "id": "https://brain-bbqs.org/id/d49fe87c-2047-4788-8247-2130a5e0d931", + "class": "Dataset", + "label": "SuperAnimal-TopViewMouse-5K", "facts": { - "category_key": [ - "depth_camera" - ], "description": [ - "Depth-sensing and multi-view camera rigs producing 3D geometry." - ], - "label": [ - "Depth / 3D Camera" + "Training data for top-view mouse pose estimation" ], - "measures": [ - "3D point cloud", - "Depth map" + "external_url": [ + "https://huggingface.co/datasets/DeepLabCut/SuperAnimal-TopViewMouse-5K" ], "name": [ - "Depth / 3D Camera" + "SuperAnimal-TopViewMouse-5K" ] }, "out": [], @@ -4764,26 +4624,18 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/18d4c4a6-7d69-4425-8792-de1e60d0b35f", - "class": "DeviceCategory", - "label": "ECG / Heart Rate", + "id": "https://brain-bbqs.org/id/4d91ac05-5c53-49d7-93b4-64184b795b2d", + "class": "Dataset", + "label": "Tracking Motor Representations in the Corticostriatal Axis During Reinforcement of Naturalistic Behavior", "facts": { - "category_key": [ - "ecg_hr" - ], "description": [ - "Electrocardiography and heart-rate sensing." - ], - "label": [ - "ECG / Heart Rate" + "Corticostriatal recordings---L2/3 and L5/6 of caudal forelimb area (CFA) of mouse motor cortex as well as dorsomedial (DMS) and ventromedial striatum (VMS)---as mice learn to associate the execution of naturalistic behaviors with a sugar water reward." ], - "measures": [ - "ECG waveform", - "HRV", - "heart rate" + "external_url": [ + "https://dandi.emberarchive.org/dandiset/000632" ], "name": [ - "ECG / Heart Rate" + "Tracking Motor Representations in the Corticostriatal Axis During Reinforcement of Naturalistic Behavior" ] }, "out": [], @@ -4796,1195 +4648,1538 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/ac703a69-84bb-4157-b5c9-6d3f4e4d2c49", - "class": "DeviceCategory", - "label": "Electrodermal Activity", + "id": "https://brain-bbqs.org/id/85dba242-244b-4a63-b463-b9e6bf4d29e1", + "class": "Device", + "label": "ADOS", "facts": { - "category_key": [ - "eda" - ], - "description": [ - "Skin conductance / galvanic skin response sensing." - ], - "label": [ - "Electrodermal Activity" + "aliases": [ + "ADOS", + "ados" ], - "measures": [ - "Skin conductance level", - "phasic responses" + "model_name": [ + "ADOS" ], "name": [ - "Electrodermal Activity" + "ADOS" ] }, - "out": [], - "in": [ + "out": [ { "predicate": "device_category", - "source": "https://brain-bbqs.org/id/342800f7-b7b5-4b7e-9f41-d528b68d3c3d" + "target": "https://brain-bbqs.org/id/829b9463-611f-45d6-bd24-262a5410c325" + }, + { + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/a7b15b50-1f35-4e02-91d5-c28593457e3d" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/f328ad53-2dd2-490f-adf1-40e9cd85b5bd", - "class": "DeviceCategory", - "label": "Electrophysiology Probe", + "id": "https://brain-bbqs.org/id/ba876f06-02b2-4ca2-bbc0-2877890b6f6a", + "class": "Device", + "label": "ANT Neuro eego", "facts": { - "category_key": [ - "ephys_probe" - ], - "description": [ - "High-density silicon probes and electrode arrays for extracellular recording." + "aliases": [ + "64 channel mobile eeg ant neuro", + "64-channel mobile EEG (ANT Neuro)", + "ANT Neuro", + "ant neuro", + "ant neuro eego", + "eego" ], - "label": [ - "Electrophysiology Probe" + "external_url": [ + "https://www.ant-neuro.com/" ], - "measures": [ - "LFP", - "Spikes", - "multi-unit activity" + "model_name": [ + "ANT Neuro eego" ], "name": [ - "Electrophysiology Probe" + "ANT Neuro eego" + ], + "output_signals": [ + "EEG" + ], + "product_url": [ + "https://www.ant-neuro.com/" ] }, - "out": [], - "in": [ + "out": [ { "predicate": "device_category", - "source": "https://brain-bbqs.org/id/d3a36c76-22a9-4762-8ce6-a53725475669" + "target": "https://brain-bbqs.org/id/1f40721b-dadd-4141-8f9d-6661f4777718" + }, + { + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/d5dd8903-0114-4511-a4ec-446ae9f657a8" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/1eda4bd4-4446-40c3-8996-7400722b1560", - "class": "DeviceCategory", - "label": "EMG", + "id": "https://brain-bbqs.org/id/0285843e-0628-489a-a676-27648d2350a7", + "class": "Device", + "label": "Avisoft ultrasonic microphones", "facts": { - "category_key": [ - "emg" - ], - "description": [ - "Surface and intramuscular electromyography systems." + "aliases": [ + "Avisoft", + "Ultrasonic microphones (Avisoft)", + "avisoft", + "avisoft ultrasonic microphones", + "ultrasonic microphones avisoft" ], - "label": [ - "EMG" + "external_url": [ + "https://www.avisoft.com/" ], - "measures": [ - "EMG envelope", - "Muscle activation" + "model_name": [ + "Avisoft ultrasonic microphones" ], "name": [ - "EMG" + "Avisoft ultrasonic microphones" + ], + "output_signals": [ + "Ultrasonic audio" + ], + "product_url": [ + "https://www.avisoft.com/" ] }, - "out": [], - "in": [ + "out": [ { "predicate": "device_category", - "source": "https://brain-bbqs.org/id/a991c266-2e08-46e8-b579-8d10341fc344" + "target": "https://brain-bbqs.org/id/361a786e-7850-418a-a76a-ea21fc656775" + }, + { + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/2911be71-0f8a-47d5-9b0b-df9c7e75ce2f" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/7d968a4f-f412-431e-a9d9-6ec963cb8677", - "class": "DeviceCategory", - "label": "Eye Tracker", + "id": "https://brain-bbqs.org/id/b26a04a7-e254-470c-9d43-1c618d60434e", + "class": "Device", + "label": "Basler cameras", "facts": { - "category_key": [ - "eye_tracker" - ], - "description": [ - "Wearable and remote gaze tracking systems." + "aliases": [ + "Basler", + "basler", + "basler cameras" ], - "label": [ - "Eye Tracker" + "external_url": [ + "https://www.baslerweb.com/" ], - "measures": [ - "Gaze position", - "fixations", - "pupil diameter", - "saccades" + "model_name": [ + "Basler cameras" ], "name": [ - "Eye Tracker" + "Basler cameras" + ], + "output_signals": [ + "RGB video" + ], + "product_url": [ + "https://www.baslerweb.com/" ] }, - "out": [], - "in": [ + "out": [ { "predicate": "device_category", - "source": "https://brain-bbqs.org/id/ce24eb59-9276-4e28-9d93-342515a4e970" + "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" }, { - "predicate": "device_category", - "source": "https://brain-bbqs.org/id/ab492763-6805-4afd-bf3f-28eec5276d6d" + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/3eaf894a-5a66-47be-b36f-ce28d5cd1e9c" } ], + "in": [], "dangling": [], "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/62d4c224-70de-42ed-90d6-a7ac86823c0b", - "class": "DeviceCategory", - "label": "Genomics & Tissue", + "id": "https://brain-bbqs.org/id/5a9d5e58-b370-48ea-a189-a82e7c834708", + "class": "Device", + "label": "Biomark PIT tags", "facts": { - "category_key": [ - "genomics" - ], - "description": [ - "Sequencing, gene expression, and tissue-level measurement." + "aliases": [ + "Biomark PIT tags", + "biomark pit tags" ], - "label": [ - "Genomics & Tissue" + "external_url": [ + "https://www.biomark.com/" ], - "measures": [ - "IEG expression", - "Transcript counts" + "model_name": [ + "Biomark PIT tags" ], "name": [ - "Genomics & Tissue" + "Biomark PIT tags" + ], + "output_signals": [ + "Individual ID" + ], + "product_url": [ + "https://www.biomark.com/" ] }, - "out": [], + "out": [ + { + "predicate": "device_category", + "target": "https://brain-bbqs.org/id/60288cb2-b6fa-41ab-9312-3209dd2cd804" + }, + { + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/562743b9-2c34-4049-806b-10e28796fdba" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/31b21990-8007-45a0-86e0-d1e9e412d9a7", - "class": "DeviceCategory", - "label": "GPS / Geolocation", + "id": "https://brain-bbqs.org/id/88b4baf0-8e42-43e8-a689-3f5cd46138ee", + "class": "Device", + "label": "BIOPAC", "facts": { - "category_key": [ - "gps" - ], - "description": [ - "Satellite positioning receivers and geolocation loggers." + "aliases": [ + "BIOPAC", + "Biopac", + "biopac" ], - "label": [ - "GPS / Geolocation" + "external_url": [ + "https://www.biopac.com/" ], - "measures": [ - "Latitude/longitude", - "altitude", - "speed" + "model_name": [ + "BIOPAC" ], "name": [ - "GPS / Geolocation" + "BIOPAC" + ], + "output_signals": [ + "ECG", + "EDA", + "EMG" + ], + "product_url": [ + "https://www.biopac.com/" ] }, - "out": [], - "in": [ + "out": [ { "predicate": "device_category", - "source": "https://brain-bbqs.org/id/130afdbe-9128-4afb-a7cd-f27967d52a7a" + "target": "https://brain-bbqs.org/id/851882bb-3321-45ed-af75-6ae08836c1fc" + }, + { + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/34971c92-6e5a-4231-8d74-3759c2301d8b" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/e2c21bfc-1707-4f6d-aa18-c6db03f53c2d", - "class": "DeviceCategory", - "label": "IMU / Accelerometry", + "id": "https://brain-bbqs.org/id/6c4c36dd-6d17-47d9-8bff-c1cde1750dc7", + "class": "Device", + "label": "BOT-3", "facts": { - "category_key": [ - "imu" - ], - "description": [ - "Inertial measurement units, accelerometers, and gyroscopes." - ], - "label": [ - "IMU / Accelerometry" + "aliases": [ + "BOT-3", + "bot 3" ], - "measures": [ - "Acceleration", - "angular velocity", - "orientation" + "model_name": [ + "BOT-3" ], "name": [ - "IMU / Accelerometry" + "BOT-3" ] }, - "out": [], + "out": [ + { + "predicate": "device_category", + "target": "https://brain-bbqs.org/id/829b9463-611f-45d6-bd24-262a5410c325" + }, + { + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/c42dadeb-bf3c-44fa-baff-92adea2e0185" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/f5c11310-96a7-43c3-9d34-dc134237ed45", - "class": "DeviceCategory", - "label": "Infrared Camera", + "id": "https://brain-bbqs.org/id/700795ce-fd4c-49cc-b037-e9c244039e5e", + "class": "Device", + "label": "COSMED K5", "facts": { - "category_key": [ - "infrared_camera" - ], - "description": [ - "Near-infrared / IR cameras for low-light and night-time behavioural recording." + "aliases": [ + "COSMED K5", + "Cosmed Calorimetry", + "cosmed calorimetry", + "cosmed k5" ], - "label": [ - "Infrared Camera" + "external_url": [ + "https://www.cosmed.com/" ], - "measures": [ - "IR video" + "model_name": [ + "COSMED K5" ], "name": [ - "Infrared Camera" + "COSMED K5" + ], + "output_signals": [ + "Energy expenditure", + "VCO2", + "VO2" + ], + "product_url": [ + "https://www.cosmed.com/" + ], + "regulatory_class": [ + "CE medical device" ] }, - "out": [], + "out": [ + { + "predicate": "device_category", + "target": "https://brain-bbqs.org/id/7e99c7ca-9c1d-4de5-b6b5-a6c96c5341af" + }, + { + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/e038c24f-a4b4-4b18-af2a-a8f0ae2a21c7" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/46ca9982-9f32-4d56-84fc-95df94a69e7d", - "class": "DeviceCategory", - "label": "Intracranial EEG", + "id": "https://brain-bbqs.org/id/a991c266-2e08-46e8-b579-8d10341fc344", + "class": "Device", + "label": "Delsys Trigno", "facts": { - "category_key": [ - "ieeg" - ], - "description": [ - "Invasive recording from ECoG grids, sEEG depth electrodes, and single units." + "aliases": [ + "Delsys Trigno", + "delsys trigno" ], - "label": [ - "Intracranial EEG" + "external_url": [ + "https://delsys.com/trigno/" ], - "measures": [ - "ECoG", - "LFP", - "single-unit spikes" + "model_name": [ + "Delsys Trigno" ], "name": [ - "Intracranial EEG" + "Delsys Trigno" + ], + "output_signals": [ + "Accelerometry", + "Surface EMG" + ], + "product_url": [ + "https://delsys.com/trigno/" ] }, - "out": [], - "in": [ + "out": [ { "predicate": "device_category", - "source": "https://brain-bbqs.org/id/a36c70d6-19a8-40b6-a8a1-7aaea7e5b918" + "target": "https://brain-bbqs.org/id/1eda4bd4-4446-40c3-8996-7400722b1560" + }, + { + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/6b2192d5-d840-4f4b-be96-5cec4f2fe432" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/77124e96-cb5e-403b-8ca4-d4fc15b6f95c", - "class": "DeviceCategory", - "label": "LiDAR / mmWave Radar", + "id": "https://brain-bbqs.org/id/3b549548-0ca5-4c7e-91ba-a6a1ed51705e", + "class": "Device", + "label": "EmotiBit", "facts": { - "category_key": [ - "lidar_radar" - ], - "description": [ - "Non-camera ranging sensors for privacy-preserving movement sensing." + "aliases": [ + "EmotiBit", + "Emotibit", + "emotibit" ], - "label": [ - "LiDAR / mmWave Radar" + "external_url": [ + "https://www.emotibit.com/" ], - "measures": [ - "Range", - "doppler", - "point cloud" + "model_name": [ + "EmotiBit" ], "name": [ - "LiDAR / mmWave Radar" + "EmotiBit" + ], + "output_signals": [ + "9-axis IMU", + "EDA", + "PPG", + "Temperature" + ], + "product_url": [ + "https://www.emotibit.com/" ] }, - "out": [], + "out": [ + { + "predicate": "device_category", + "target": "https://brain-bbqs.org/id/851882bb-3321-45ed-af75-6ae08836c1fc" + }, + { + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/31c5064c-5df0-4821-9ea7-d3807308ba18" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/7e99c7ca-9c1d-4de5-b6b5-a6c96c5341af", - "class": "DeviceCategory", - "label": "Metabolic Measurement", + "id": "https://brain-bbqs.org/id/8d1248d6-6ad4-449a-b268-69c17fb8e0bd", + "class": "Device", + "label": "Empatica EmbracePlus", "facts": { - "category_key": [ - "metabolic" - ], - "description": [ - "Indirect calorimetry and energy-expenditure systems." + "aliases": [ + "EmbracePlus", + "Empatica", + "Wearable sensor (EmbracePlus)", + "embraceplus", + "empatica", + "empatica embraceplus", + "wearable sensor embraceplus" ], - "label": [ - "Metabolic Measurement" + "external_url": [ + "https://www.empatica.com/embraceplus/" ], - "measures": [ - "VCO2", - "VO2", - "energy expenditure" + "model_name": [ + "Empatica EmbracePlus" ], "name": [ - "Metabolic Measurement" + "Empatica EmbracePlus" + ], + "output_signals": [ + "Accelerometry", + "EDA", + "PPG", + "Temperature" + ], + "product_url": [ + "https://www.empatica.com/embraceplus/" + ], + "regulatory_class": [ + "FDA-cleared / CE medical device" ] }, - "out": [], - "in": [ + "out": [ { "predicate": "device_category", - "source": "https://brain-bbqs.org/id/700795ce-fd4c-49cc-b037-e9c244039e5e" + "target": "https://brain-bbqs.org/id/851882bb-3321-45ed-af75-6ae08836c1fc" + }, + { + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/0f782852-6d9e-4d3b-8c38-6e0573400461" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/e80e0495-82ff-4d51-995f-36e9349b40fb", - "class": "DeviceCategory", - "label": "Microphone / Audio Recorder", + "id": "https://brain-bbqs.org/id/fbbd19db-7e98-42cd-a230-510ddff40cef", + "class": "Device", + "label": "FLIR / Teledyne cameras", "facts": { - "category_key": [ - "microphone" - ], - "description": [ - "Audible-range microphones, arrays, and field recorders." + "aliases": [ + "FLIR", + "flir", + "flir teledyne cameras" ], - "label": [ - "Microphone / Audio Recorder" + "external_url": [ + "https://www.flir.com/" ], - "measures": [ - "Audio waveform", - "sound pressure level" + "model_name": [ + "FLIR / Teledyne cameras" ], "name": [ - "Microphone / Audio Recorder" + "FLIR / Teledyne cameras" + ], + "output_signals": [ + "RGB video", + "Thermal video" + ], + "product_url": [ + "https://www.flir.com/" ] }, - "out": [], - "in": [ + "out": [ { "predicate": "device_category", - "source": "https://brain-bbqs.org/id/16f63350-9197-4e16-8a8c-0f67b2da18df" + "target": "https://brain-bbqs.org/id/0e76fcd9-9746-4456-a344-50f817379dcf" }, { - "predicate": "device_category", - "source": "https://brain-bbqs.org/id/4d59ea78-e15f-4f78-92d4-28f4041b297f" + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/d68a81db-70f9-4ea5-95af-3f1f83a46771" } ], + "in": [], "dangling": [], "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3", - "class": "DeviceCategory", - "label": "Motion Capture", + "id": "https://brain-bbqs.org/id/130afdbe-9128-4afb-a7cd-f27967d52a7a", + "class": "Device", + "label": "Garmin GPS", "facts": { - "category_key": [ - "motion_capture" - ], - "description": [ - "Marker-based and inertial motion capture systems." + "aliases": [ + "GPS (Garmin)", + "Garmin", + "garmin", + "garmin gps", + "gps garmin" ], - "label": [ - "Motion Capture" + "external_url": [ + "https://www.garmin.com/" ], - "measures": [ - "3D marker positions", - "joint angles", - "segment kinematics" + "model_name": [ + "Garmin GPS" ], "name": [ - "Motion Capture" + "Garmin GPS" + ], + "output_signals": [ + "Latitude/longitude", + "Speed" + ], + "product_url": [ + "https://www.garmin.com/" ] }, - "out": [], - "in": [ + "out": [ { "predicate": "device_category", - "source": "https://brain-bbqs.org/id/a25d5bdb-97ea-4995-a9aa-fcb6059fcb1f" + "target": "https://brain-bbqs.org/id/31b21990-8007-45a0-86e0-d1e9e412d9a7" }, { - "predicate": "device_category", - "source": "https://brain-bbqs.org/id/dda87113-f453-47bd-8c34-14855db21e4a" + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/1a3ec6ab-3abd-4da5-b938-e9818c52b95a" } ], + "in": [], "dangling": [], "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/851882bb-3321-45ed-af75-6ae08836c1fc", - "class": "DeviceCategory", - "label": "Multimodal Wearable", + "id": "https://brain-bbqs.org/id/7eb373e9-092d-418d-b3ff-4f7d8e4fb939", + "class": "Device", + "label": "GoPro HERO10", "facts": { - "category_key": [ - "wearable_multimodal" + "aliases": [ + "GoPro", + "GoPro Hero10", + "gopro", + "gopro hero10" ], - "description": [ - "Wrist- and body-worn devices combining several physiological sensors." - ], - "label": [ - "Multimodal Wearable" + "external_url": [ + "https://gopro.com/" ], - "measures": [ - "EDA", - "PPG", - "accelerometry", - "temperature" + "model_name": [ + "GoPro HERO10" ], "name": [ - "Multimodal Wearable" + "GoPro HERO10" + ], + "output_signals": [ + "RGB video" + ], + "product_url": [ + "https://gopro.com/" ] }, - "out": [], - "in": [ - { - "predicate": "device_category", - "source": "https://brain-bbqs.org/id/3b549548-0ca5-4c7e-91ba-a6a1ed51705e" - }, + "out": [ { "predicate": "device_category", - "source": "https://brain-bbqs.org/id/8d1248d6-6ad4-449a-b268-69c17fb8e0bd" + "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" }, { - "predicate": "device_category", - "source": "https://brain-bbqs.org/id/88b4baf0-8e42-43e8-a689-3f5cd46138ee" + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/56efc35e-a021-483f-b2b1-1dae1f893d18" } ], + "in": [], "dangling": [], - "degree": 3, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/d8cef433-7209-4e63-bdd5-a3f52bd9dd89", - "class": "DeviceCategory", - "label": "Neural Imaging", + "id": "https://brain-bbqs.org/id/429c73a9-8440-4f1f-a2f7-a8a1b75958a7", + "class": "Device", + "label": "Leiter-3", "facts": { - "category_key": [ - "neural_imaging" - ], - "description": [ - "Optical and volumetric imaging of neural activity." - ], - "label": [ - "Neural Imaging" + "aliases": [ + "Leiter", + "leiter", + "leiter 3" ], - "measures": [ - "BOLD", - "Fluorescence", - "bioluminescence" + "model_name": [ + "Leiter-3" ], "name": [ - "Neural Imaging" + "Leiter-3" ] }, - "out": [], + "out": [ + { + "predicate": "device_category", + "target": "https://brain-bbqs.org/id/829b9463-611f-45d6-bd24-262a5410c325" + }, + { + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/541eb3ec-855c-427e-9d9d-816b3845b9cf" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/e9d52180-5701-46ba-b5dc-7fc6fa32233b", - "class": "DeviceCategory", - "label": "Neurostimulation / DBS", + "id": "https://brain-bbqs.org/id/66955dda-ed5c-4e05-bfbb-5f9f203af4dd", + "class": "Device", + "label": "mBrainTrain Smarting", "facts": { - "category_key": [ - "neurostimulation" - ], - "description": [ - "Implanted stimulation systems with chronic sensing capability." + "aliases": [ + "EEG (mBrainTrain)", + "eeg mbraintrain", + "mBrainTrain", + "mbraintrain", + "mbraintrain smarting" ], - "label": [ - "Neurostimulation / DBS" + "external_url": [ + "https://mbraintrain.com/" ], - "measures": [ - "LFP", - "event markers", - "stimulation parameters" + "model_name": [ + "mBrainTrain Smarting" ], "name": [ - "Neurostimulation / DBS" + "mBrainTrain Smarting" + ], + "output_signals": [ + "EEG" + ], + "product_url": [ + "https://mbraintrain.com/" ] }, - "out": [], - "in": [ + "out": [ { "predicate": "device_category", - "source": "https://brain-bbqs.org/id/f8ca9029-6e50-43a2-802d-e61784795036" + "target": "https://brain-bbqs.org/id/1f40721b-dadd-4141-8f9d-6661f4777718" }, { - "predicate": "device_category", - "source": "https://brain-bbqs.org/id/773ddab2-ad45-41ac-8003-b80935d30c32" + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/9e769c4e-0958-4ccc-bb96-d714734fa461" } ], + "in": [], "dangling": [], "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/39e960bb-6537-484d-94e9-62dde0ee3680", - "class": "DeviceCategory", - "label": "OPM-MEG", + "id": "https://brain-bbqs.org/id/790607e8-4030-4e55-83fb-8df121fbb7b7", + "class": "Device", + "label": "Med Associates touchscreens", "facts": { - "category_key": [ - "meg_opm" - ], - "description": [ - "Optically pumped magnetometer arrays for on-scalp magnetoencephalography." + "aliases": [ + "Med Associates", + "MedAssociates", + "med associates", + "med associates touchscreens", + "medassociates" ], - "label": [ - "OPM-MEG" + "external_url": [ + "https://www.med-associates.com/" ], - "measures": [ - "Magnetic field", - "source-localized activity" + "model_name": [ + "Med Associates touchscreens" ], "name": [ - "OPM-MEG" + "Med Associates touchscreens" + ], + "output_signals": [ + "Touch responses", + "Trial events" + ], + "product_url": [ + "https://www.med-associates.com/" ] }, - "out": [], + "out": [ + { + "predicate": "device_category", + "target": "https://brain-bbqs.org/id/0fad9963-1681-478c-881e-348e2736fafe" + }, + { + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/765fd145-afc8-4101-92d5-33aff8c04fac" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/8ae4d852-9f43-4d4e-a7fb-6cef12ef9af8", - "class": "DeviceCategory", - "label": "Photoplethysmography (PPG)", + "id": "https://brain-bbqs.org/id/773ddab2-ad45-41ac-8003-b80935d30c32", + "class": "Device", + "label": "Medtronic Percept", "facts": { - "category_key": [ - "ppg" - ], - "description": [ - "Optical blood-volume-pulse sensing." + "aliases": [ + "Medtronic", + "medtronic", + "medtronic percept", + "metronic person device" ], - "label": [ - "Photoplethysmography (PPG)" + "external_url": [ + "https://www.medtronic.com/" ], - "measures": [ - "BVP", - "SpO2", - "pulse rate" + "model_name": [ + "Medtronic Percept" ], "name": [ - "Photoplethysmography (PPG)" + "Medtronic Percept" + ], + "output_signals": [ + "LFP", + "Stimulation parameters" + ], + "product_url": [ + "https://www.medtronic.com/" + ], + "regulatory_class": [ + "FDA-approved (PMA)" ] }, - "out": [], + "out": [ + { + "predicate": "device_category", + "target": "https://brain-bbqs.org/id/e9d52180-5701-46ba-b5dc-7fc6fa32233b" + }, + { + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/ab859681-c7fc-40cf-8d61-51035f1d8605" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/9e20b70e-9f64-4e32-bc64-18efbf8293bd", - "class": "DeviceCategory", - "label": "Respiration Sensing", + "id": "https://brain-bbqs.org/id/4d59ea78-e15f-4f78-92d4-28f4041b297f", + "class": "Device", + "label": "miniDSP UMA-16", "facts": { - "category_key": [ - "respiration" - ], - "description": [ - "Breathing belts, thermistors, and airflow sensors." + "aliases": [ + "Microphone Array UMA-16", + "UMA-16", + "microphone array uma 16", + "minidsp uma 16", + "uma 16" ], - "label": [ - "Respiration Sensing" + "external_url": [ + "https://www.minidsp.com/products/usb-audio-interface/uma-16" ], - "measures": [ - "Respiration rate", - "airflow", - "nasal temperature" + "model_name": [ + "miniDSP UMA-16" ], "name": [ - "Respiration Sensing" + "miniDSP UMA-16" + ], + "output_signals": [ + "Multichannel audio" + ], + "product_url": [ + "https://www.minidsp.com/products/usb-audio-interface/uma-16" ] }, - "out": [], + "out": [ + { + "predicate": "device_category", + "target": "https://brain-bbqs.org/id/e80e0495-82ff-4d51-995f-36e9349b40fb" + }, + { + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/8482b347-2401-49bb-99c6-19a26be255c7" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/60288cb2-b6fa-41ab-9312-3209dd2cd804", - "class": "DeviceCategory", - "label": "RFID / PIT Tags", + "id": "https://brain-bbqs.org/id/a9da991f-1bcd-4b6c-ab45-e67af7d3b755", + "class": "Device", + "label": "Motek CAREN", "facts": { - "category_key": [ - "rfid" + "aliases": [ + "CAREN", + "Karen", + "Stewart Platform", + "caren", + "karen", + "motek caren", + "stewart platform" ], - "description": [ - "Radio-frequency and passive integrated transponder identity tags." - ], - "label": [ - "RFID / PIT Tags" + "external_url": [ + "https://www.motekmedical.com/solution/caren/" ], - "measures": [ - "Individual ID", - "antenna crossings", - "timestamps" + "model_name": [ + "Motek CAREN" ], "name": [ - "RFID / PIT Tags" + "Motek CAREN" + ], + "output_signals": [ + "Gait", + "Ground reaction forces", + "Platform kinematics" + ], + "product_url": [ + "https://www.motekmedical.com/solution/caren/" ] }, - "out": [], - "in": [ + "out": [ { "predicate": "device_category", - "source": "https://brain-bbqs.org/id/5a9d5e58-b370-48ea-a189-a82e7c834708" + "target": "https://brain-bbqs.org/id/1933d538-1acc-4a01-8691-9ecd2989d0e2" + }, + { + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/d74d8fe3-4c71-481b-8a54-410c4e3574a9" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/1f40721b-dadd-4141-8f9d-6661f4777718", - "class": "DeviceCategory", - "label": "Scalp EEG", + "id": "https://brain-bbqs.org/id/a36c70d6-19a8-40b6-a8a1-7aaea7e5b918", + "class": "Device", + "label": "Natus XLTek", "facts": { - "category_key": [ - "eeg" - ], - "description": [ - "Non-invasive scalp electroencephalography amplifiers and caps." + "aliases": [ + "Natus", + "Natus XLTek EEG monitoring", + "Scalp EEG; Natus", + "natus", + "natus xltek", + "natus xltek eeg monitoring", + "sEEG (intracranial); Natus", + "scalp eeg natus", + "seeg intracranial natus" ], - "label": [ - "Scalp EEG" + "external_url": [ + "https://natus.com/" ], - "measures": [ - "EEG voltage", - "event-related potentials", - "spectral power" + "model_name": [ + "Natus XLTek" ], "name": [ - "Scalp EEG" + "Natus XLTek" + ], + "output_signals": [ + "EEG", + "Video" + ], + "product_url": [ + "https://natus.com/" + ], + "regulatory_class": [ + "FDA-cleared" ] }, - "out": [], - "in": [ + "out": [ { "predicate": "device_category", - "source": "https://brain-bbqs.org/id/ba876f06-02b2-4ca2-bbc0-2877890b6f6a" + "target": "https://brain-bbqs.org/id/46ca9982-9f32-4d56-84fc-95df94a69e7d" }, { - "predicate": "device_category", - "source": "https://brain-bbqs.org/id/66955dda-ed5c-4e05-bfbb-5f9f203af4dd" + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/90716be1-d61b-4641-ba7e-da9533d0dbeb" } ], + "in": [], "dangling": [], "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/5d5d31be-c34b-4cf6-a08f-273856add625", - "class": "DeviceCategory", - "label": "Smartphone / Tablet Camera", + "id": "https://brain-bbqs.org/id/f8ca9029-6e50-43a2-802d-e61784795036", + "class": "Device", + "label": "NeuroPace RNS System", "facts": { - "category_key": [ - "smartphone_camera" - ], - "description": [ - "Consumer phone and tablet cameras used as field recording devices." + "aliases": [ + "NeuroPace RNS", + "NeuroPace RNS (intracranial)", + "neuropace rns", + "neuropace rns intracranial", + "neuropace rns system" ], - "label": [ - "Smartphone / Tablet Camera" + "external_url": [ + "https://www.neuropace.com/" ], - "measures": [ - "RGB video", - "selfie video" + "model_name": [ + "NeuroPace RNS System" ], "name": [ - "Smartphone / Tablet Camera" + "NeuroPace RNS System" + ], + "output_signals": [ + "Stimulation events", + "iEEG" + ], + "product_url": [ + "https://www.neuropace.com/" + ], + "regulatory_class": [ + "FDA-approved (PMA)" ] }, - "out": [], + "out": [ + { + "predicate": "device_category", + "target": "https://brain-bbqs.org/id/e9d52180-5701-46ba-b5dc-7fc6fa32233b" + }, + { + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/bc8054b3-253f-4b13-a281-841deb7598e8" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/4d4eeeec-1126-4407-b7e9-80ad309522b4", - "class": "DeviceCategory", - "label": "Surveys & Structured Tasks", + "id": "https://brain-bbqs.org/id/d3a36c76-22a9-4762-8ce6-a53725475669", + "class": "Device", + "label": "Neuropixels", "facts": { - "category_key": [ - "survey_task" - ], - "description": [ - "Questionnaires, diaries, dial ratings, and computerized cognitive tasks." + "aliases": [ + "Neuropixels", + "neuropixels" ], - "label": [ - "Surveys & Structured Tasks" + "external_url": [ + "https://www.neuropixels.org/" ], - "measures": [ - "Item responses", - "ratings", - "reaction times" + "model_name": [ + "Neuropixels" ], "name": [ - "Surveys & Structured Tasks" + "Neuropixels" + ], + "output_signals": [ + "LFP", + "Spikes" + ], + "product_url": [ + "https://www.neuropixels.org/" ] }, - "out": [], + "out": [ + { + "predicate": "device_category", + "target": "https://brain-bbqs.org/id/f328ad53-2dd2-490f-adf1-40e9cd85b5bd" + }, + { + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/9bd0353c-a176-48d7-9f2c-59375ae7819b" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/0e76fcd9-9746-4456-a344-50f817379dcf", - "class": "DeviceCategory", - "label": "Thermal Camera", + "id": "https://brain-bbqs.org/id/b91a5db1-9e21-4158-a14f-087f59f5bd8d", + "class": "Device", + "label": "OBSBOT cameras", "facts": { - "category_key": [ - "thermal_camera" - ], - "description": [ - "Long-wave infrared cameras measuring surface temperature." + "aliases": [ + "OBSBOT", + "obsbot", + "obsbot cameras" ], - "label": [ - "Thermal Camera" + "external_url": [ + "https://www.obsbot.com/" ], - "measures": [ - "Surface temperature", - "thermal video" + "model_name": [ + "OBSBOT cameras" ], "name": [ - "Thermal Camera" + "OBSBOT cameras" + ], + "output_signals": [ + "RGB video" + ], + "product_url": [ + "https://www.obsbot.com/" ] }, - "out": [], - "in": [ + "out": [ { "predicate": "device_category", - "source": "https://brain-bbqs.org/id/fbbd19db-7e98-42cd-a230-510ddff40cef" + "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" + }, + { + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/188ce5e2-0a5f-4c69-a9ec-bf7b8b1ebbc4" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/361a786e-7850-418a-a76a-ea21fc656775", - "class": "DeviceCategory", - "label": "Ultrasonic Microphone", + "id": "https://brain-bbqs.org/id/47974228-8745-4b67-8857-4450426743a7", + "class": "Device", + "label": "Open Ephys", "facts": { - "category_key": [ - "ultrasonic_microphone" - ], - "description": [ - "Recording hardware for ultrasonic vocalizations above the human hearing range." + "aliases": [ + "Open Ephys", + "open ephys" ], - "label": [ - "Ultrasonic Microphone" + "external_url": [ + "https://open-ephys.org/" ], - "measures": [ - "USV spectrograms", - "Ultrasonic audio" + "model_name": [ + "Open Ephys" ], "name": [ - "Ultrasonic Microphone" + "Open Ephys" + ], + "output_signals": [ + "LFP", + "Spikes" + ], + "product_url": [ + "https://open-ephys.org/" ] }, - "out": [], - "in": [ + "out": [ { "predicate": "device_category", - "source": "https://brain-bbqs.org/id/0285843e-0628-489a-a676-27648d2350a7" + "target": "https://brain-bbqs.org/id/006caa68-8b24-474f-867f-82a6199a84b1" + }, + { + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/2367da64-4eae-4655-a4dc-315ad12e3398" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0", - "class": "DeviceCategory", - "label": "Video Camera", + "id": "https://brain-bbqs.org/id/dda87113-f453-47bd-8c34-14855db21e4a", + "class": "Device", + "label": "OptiTrack", "facts": { - "category_key": [ - "video_camera" + "aliases": [ + "OptiTrack", + "optitrack" ], - "description": [ - "Standard or high-speed cameras recording visible-light behavioural video." + "external_url": [ + "https://optitrack.com/" ], - "label": [ - "Video Camera" - ], - "measures": [ - "RGB video", - "frame timestamps" + "model_name": [ + "OptiTrack" ], "name": [ - "Video Camera" + "OptiTrack" + ], + "output_signals": [ + "3D marker positions" + ], + "product_url": [ + "https://optitrack.com/" ] }, - "out": [], - "in": [ - { - "predicate": "device_category", - "source": "https://brain-bbqs.org/id/7eb373e9-092d-418d-b3ff-4f7d8e4fb939" - }, + "out": [ { "predicate": "device_category", - "source": "https://brain-bbqs.org/id/b26a04a7-e254-470c-9d43-1c618d60434e" + "target": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3" }, { - "predicate": "device_category", - "source": "https://brain-bbqs.org/id/b91a5db1-9e21-4158-a14f-087f59f5bd8d" + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/560d0a58-2a10-439c-b397-4eecb30a2388" } ], + "in": [], "dangling": [], - "degree": 3, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/1933d538-1acc-4a01-8691-9ecd2989d0e2", - "class": "DeviceCategory", - "label": "VR / AR Environment", + "id": "https://brain-bbqs.org/id/2538b9fd-01c4-453f-a20b-e7351cfa8c21", + "class": "Device", + "label": "PPVT", "facts": { - "category_key": [ - "vr_environment" - ], - "description": [ - "Immersive virtual and augmented reality systems and platforms." - ], - "label": [ - "VR / AR Environment" + "aliases": [ + "PPVT", + "ppvt" ], - "measures": [ - "Head pose", - "controller input", - "scene events" + "model_name": [ + "PPVT" ], "name": [ - "VR / AR Environment" + "PPVT" ] }, - "out": [], - "in": [ + "out": [ { "predicate": "device_category", - "source": "https://brain-bbqs.org/id/a9da991f-1bcd-4b6c-ab45-e67af7d3b755" + "target": "https://brain-bbqs.org/id/829b9463-611f-45d6-bd24-262a5410c325" + }, + { + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/c42dadeb-bf3c-44fa-baff-92adea2e0185" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/006caa68-8b24-474f-867f-82a6199a84b1", - "class": "DeviceCategory", - "label": "Wireless Electrophysiology", + "id": "https://brain-bbqs.org/id/ab492763-6805-4afd-bf3f-28eec5276d6d", + "class": "Device", + "label": "Pupil Labs eye trackers", "facts": { - "category_key": [ - "wireless_ephys" - ], - "description": [ - "Untethered neural acquisition systems and telemetry headstages." + "aliases": [ + "Neon", + "Pupil Core", + "Pupil Core / Invisible", + "Pupil Labs", + "PupilLabs", + "neon", + "pupil core", + "pupil core invisible", + "pupil labs", + "pupil labs eye trackers", + "pupillabs" ], - "label": [ - "Wireless Electrophysiology" + "external_url": [ + "https://pupil-labs.com/" ], - "measures": [ - "LFP", - "Spikes", - "synchronized video" + "model_name": [ + "Pupil Labs eye trackers" ], "name": [ - "Wireless Electrophysiology" + "Pupil Labs eye trackers" + ], + "output_signals": [ + "Gaze", + "Pupil diameter", + "Scene video" + ], + "product_url": [ + "https://pupil-labs.com/" ] }, - "out": [], - "in": [ + "out": [ { "predicate": "device_category", - "source": "https://brain-bbqs.org/id/47974228-8745-4b67-8857-4450426743a7" + "target": "https://brain-bbqs.org/id/7d968a4f-f412-431e-a9d9-6ec963cb8677" }, { - "predicate": "device_category", - "source": "https://brain-bbqs.org/id/55e0ecb2-5960-47a0-9fb6-6c2162bfe182" + "predicate": "manufacturer", + "target": "https://brain-bbqs.org/id/9b910269-1934-4f7b-a4f7-9f375f401d8d" } ], + "in": [], "dangling": [], "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/d5dd8903-0114-4511-a4ec-446ae9f657a8", - "class": "DeviceManufacturer", - "label": "ANT Neuro", + "id": "https://brain-bbqs.org/id/f77c0d96-5deb-4d90-bc8e-7acb14863595", + "class": "Device", + "label": "SCQ", "facts": { - "external_url": [ - "https://www.ant-neuro.com/" + "aliases": [ + "SCQ", + "scq" ], - "homepage_url": [ - "https://www.ant-neuro.com/" + "model_name": [ + "SCQ" ], "name": [ - "ANT Neuro" + "SCQ" ] }, - "out": [], - "in": [ + "out": [ + { + "predicate": "device_category", + "target": "https://brain-bbqs.org/id/829b9463-611f-45d6-bd24-262a5410c325" + }, { "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/ba876f06-02b2-4ca2-bbc0-2877890b6f6a" + "target": "https://brain-bbqs.org/id/a7b15b50-1f35-4e02-91d5-c28593457e3d" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/2911be71-0f8a-47d5-9b0b-df9c7e75ce2f", - "class": "DeviceManufacturer", - "label": "Avisoft Bioacoustics", + "id": "https://brain-bbqs.org/id/342800f7-b7b5-4b7e-9f41-d528b68d3c3d", + "class": "Device", + "label": "Shimmer3 GSR+", "facts": { + "aliases": [ + "GSR (Shimmer3 / iMotions)", + "Shimmer3", + "gsr shimmer3 imotions", + "shimmer3", + "shimmer3 gsr" + ], "external_url": [ - "https://www.avisoft.com/" + "https://shimmersensing.com/" ], - "homepage_url": [ - "https://www.avisoft.com/" + "model_name": [ + "Shimmer3 GSR+" ], "name": [ - "Avisoft Bioacoustics" + "Shimmer3 GSR+" + ], + "output_signals": [ + "Accelerometry", + "GSR", + "PPG" + ], + "product_url": [ + "https://shimmersensing.com/" ] }, - "out": [], - "in": [ + "out": [ + { + "predicate": "device_category", + "target": "https://brain-bbqs.org/id/ac703a69-84bb-4157-b5c9-6d3f4e4d2c49" + }, { "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/0285843e-0628-489a-a676-27648d2350a7" + "target": "https://brain-bbqs.org/id/615d81a2-ce1b-4d1e-8f17-30d97dddb2a0" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/3eaf894a-5a66-47be-b36f-ce28d5cd1e9c", - "class": "DeviceManufacturer", - "label": "Basler AG", + "id": "https://brain-bbqs.org/id/4dc711e8-2a6e-458e-88cb-a5dcd9b8336e", + "class": "Device", + "label": "SRS", "facts": { - "external_url": [ - "https://www.baslerweb.com/" + "aliases": [ + "SRS", + "srs" ], - "homepage_url": [ - "https://www.baslerweb.com/" + "model_name": [ + "SRS" ], "name": [ - "Basler AG" + "SRS" ] }, - "out": [], - "in": [ + "out": [ + { + "predicate": "device_category", + "target": "https://brain-bbqs.org/id/829b9463-611f-45d6-bd24-262a5410c325" + }, { "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/b26a04a7-e254-470c-9d43-1c618d60434e" + "target": "https://brain-bbqs.org/id/a7b15b50-1f35-4e02-91d5-c28593457e3d" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/562743b9-2c34-4049-806b-10e28796fdba", - "class": "DeviceManufacturer", - "label": "Biomark, Inc.", + "id": "https://brain-bbqs.org/id/ce24eb59-9276-4e28-9d93-342515a4e970", + "class": "Device", + "label": "Tobii Pro", "facts": { + "aliases": [ + "Eye tracking (Tobii / Pupil)", + "Tobii Pro", + "eye tracking tobii pupil", + "tobii pro" + ], "external_url": [ - "https://www.biomark.com/" + "https://www.tobii.com/products/eye-trackers" ], - "homepage_url": [ - "https://www.biomark.com/" + "model_name": [ + "Tobii Pro" ], "name": [ - "Biomark, Inc." + "Tobii Pro" + ], + "output_signals": [ + "Gaze", + "Pupil diameter" + ], + "product_url": [ + "https://www.tobii.com/products/eye-trackers" ] }, - "out": [], - "in": [ + "out": [ + { + "predicate": "device_category", + "target": "https://brain-bbqs.org/id/7d968a4f-f412-431e-a9d9-6ec963cb8677" + }, { "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/5a9d5e58-b370-48ea-a189-a82e7c834708" + "target": "https://brain-bbqs.org/id/79786801-1f05-4281-b4c3-9180854ee278" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/34971c92-6e5a-4231-8d74-3759c2301d8b", - "class": "DeviceManufacturer", - "label": "BIOPAC Systems, Inc.", + "id": "https://brain-bbqs.org/id/55e0ecb2-5960-47a0-9fb6-6c2162bfe182", + "class": "Device", + "label": "White Matter e3 / eCube", "facts": { + "aliases": [ + "White Matter", + "White Matter E3", + "WhiteMatter", + "eCube", + "ecube", + "white matter", + "white matter e3", + "white matter e3 ecube", + "whitematter" + ], "external_url": [ - "https://www.biopac.com/" + "https://white-matter.com/" ], - "homepage_url": [ - "https://www.biopac.com/" + "model_name": [ + "White Matter e3 / eCube" ], "name": [ - "BIOPAC Systems, Inc." + "White Matter e3 / eCube" + ], + "output_signals": [ + "LFP", + "Spikes", + "Synchronized video" + ], + "product_url": [ + "https://white-matter.com/" ] }, - "out": [], - "in": [ + "out": [ + { + "predicate": "device_category", + "target": "https://brain-bbqs.org/id/006caa68-8b24-474f-867f-82a6199a84b1" + }, { "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/88b4baf0-8e42-43e8-a689-3f5cd46138ee" + "target": "https://brain-bbqs.org/id/58e396e9-0430-4678-ab24-382bba814d8b" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/31c5064c-5df0-4821-9ea7-d3807308ba18", - "class": "DeviceManufacturer", - "label": "Connected Future Labs", + "id": "https://brain-bbqs.org/id/16f63350-9197-4e16-8a8c-0f67b2da18df", + "class": "Device", + "label": "Wildlife Acoustics recorders", "facts": { + "aliases": [ + "Wildlife Acoustics", + "wildlife acoustics", + "wildlife acoustics recorders" + ], "external_url": [ - "https://www.emotibit.com/" + "https://www.wildlifeacoustics.com/" ], - "homepage_url": [ - "https://www.emotibit.com/" + "model_name": [ + "Wildlife Acoustics recorders" ], "name": [ - "Connected Future Labs" + "Wildlife Acoustics recorders" + ], + "output_signals": [ + "Audio" + ], + "product_url": [ + "https://www.wildlifeacoustics.com/" ] }, - "out": [], - "in": [ + "out": [ + { + "predicate": "device_category", + "target": "https://brain-bbqs.org/id/e80e0495-82ff-4d51-995f-36e9349b40fb" + }, { "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/3b549548-0ca5-4c7e-91ba-a6a1ed51705e" + "target": "https://brain-bbqs.org/id/ddff023c-f84e-41b2-aa9e-1e8ee0d743fd" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/e038c24f-a4b4-4b18-af2a-a8f0ae2a21c7", - "class": "DeviceManufacturer", - "label": "COSMED", + "id": "https://brain-bbqs.org/id/a25d5bdb-97ea-4995-a9aa-fcb6059fcb1f", + "class": "Device", + "label": "Xsens", "facts": { + "aliases": [ + "Xsens", + "xsens" + ], "external_url": [ - "https://www.cosmed.com/" + "https://www.movella.com/products/motion-capture" ], - "homepage_url": [ - "https://www.cosmed.com/" + "model_name": [ + "Xsens" ], "name": [ - "COSMED" + "Xsens" + ], + "output_signals": [ + "Orientation", + "Segment kinematics" + ], + "product_url": [ + "https://www.movella.com/products/motion-capture" ] }, - "out": [], - "in": [ + "out": [ + { + "predicate": "device_category", + "target": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3" + }, { "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/700795ce-fd4c-49cc-b037-e9c244039e5e" + "target": "https://brain-bbqs.org/id/247cc4da-1133-4307-97c9-8238c723dc67" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/6b2192d5-d840-4f4b-be96-5cec4f2fe432", - "class": "DeviceManufacturer", - "label": "Delsys Inc.", + "id": "https://brain-bbqs.org/id/0fad9963-1681-478c-881e-348e2736fafe", + "class": "DeviceCategory", + "label": "Behavioral Apparatus", "facts": { - "external_url": [ - "https://delsys.com/trigno/" + "category_key": [ + "behavioral_apparatus" ], - "homepage_url": [ - "https://delsys.com/trigno/" + "description": [ + "Operant boxes, arenas, treadmills, and task hardware." + ], + "label": [ + "Behavioral Apparatus" + ], + "measures": [ + "Trial events", + "latencies", + "responses" ], "name": [ - "Delsys Inc." + "Behavioral Apparatus" + ], + "schema_org_type": [ + "MedicalDevice" + ], + "typical_use_cases": [ + "Open-field assays", + "Operant testing" ] }, "out": [], "in": [ { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/a991c266-2e08-46e8-b579-8d10341fc344" + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/790607e8-4030-4e55-83fb-8df121fbb7b7" } ], "dangling": [], @@ -5993,160 +6188,253 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/0f782852-6d9e-4d3b-8c38-6e0573400461", - "class": "DeviceManufacturer", - "label": "Empatica Inc.", + "id": "https://brain-bbqs.org/id/739c57c7-7580-45e4-b1fd-c4ed51529353", + "class": "DeviceCategory", + "label": "Biofluid / Biochemical Sensing", "facts": { - "external_url": [ - "https://www.empatica.com/embraceplus/" + "category_key": [ + "biofluid" ], - "homepage_url": [ - "https://www.empatica.com/embraceplus/" + "description": [ + "Wearable and assay-based biochemical measurement." + ], + "label": [ + "Biofluid / Biochemical Sensing" + ], + "measures": [ + "Cortisol", + "biomarker concentration" ], "name": [ - "Empatica Inc." + "Biofluid / Biochemical Sensing" + ], + "schema_org_type": [ + "MedicalDevice" + ], + "typical_use_cases": [ + "Biochemical assays", + "Stress hormones" ] }, "out": [], - "in": [ - { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/8d1248d6-6ad4-449a-b268-69c17fb8e0bd" - } - ], + "in": [], "dangling": [], - "degree": 1, - "flags": [], + "degree": 0, + "flags": [ + "isolated" + ], "violations": [] }, { - "id": "https://brain-bbqs.org/id/1a3ec6ab-3abd-4da5-b938-e9818c52b95a", - "class": "DeviceManufacturer", - "label": "Garmin Ltd.", + "id": "https://brain-bbqs.org/id/76a90dc5-13f0-4837-9acf-f00d5be08b90", + "class": "DeviceCategory", + "label": "Body Temperature Sensing", "facts": { - "external_url": [ - "https://www.garmin.com/" + "category_key": [ + "temperature" ], - "homepage_url": [ - "https://www.garmin.com/" + "description": [ + "Core and skin temperature sensors." + ], + "label": [ + "Body Temperature Sensing" + ], + "measures": [ + "Core temperature", + "skin temperature" ], "name": [ - "Garmin Ltd." + "Body Temperature Sensing" + ], + "schema_org_type": [ + "MedicalDevice" + ], + "typical_use_cases": [ + "Circadian physiology", + "Thermoregulation" ] }, "out": [], - "in": [ - { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/130afdbe-9128-4afb-a7cd-f27967d52a7a" - } - ], + "in": [], "dangling": [], - "degree": 1, - "flags": [], + "degree": 0, + "flags": [ + "isolated" + ], "violations": [] }, { - "id": "https://brain-bbqs.org/id/56efc35e-a021-483f-b2b1-1dae1f893d18", - "class": "DeviceManufacturer", - "label": "GoPro, Inc.", + "id": "https://brain-bbqs.org/id/829b9463-611f-45d6-bd24-262a5410c325", + "class": "DeviceCategory", + "label": "Clinical Assessment Instrument", "facts": { - "external_url": [ - "https://gopro.com/" + "category_key": [ + "clinical_assessment" ], - "homepage_url": [ - "https://gopro.com/" + "description": [ + "Standardized clinical and psychometric instruments." + ], + "label": [ + "Clinical Assessment Instrument" + ], + "measures": [ + "Scaled scores", + "subscale scores" ], "name": [ - "GoPro, Inc." + "Clinical Assessment Instrument" + ], + "schema_org_type": [ + "MedicalDevice" + ], + "typical_use_cases": [ + "Diagnostic assessment", + "Phenotyping" ] }, "out": [], "in": [ { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/7eb373e9-092d-418d-b3ff-4f7d8e4fb939" + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/429c73a9-8440-4f1f-a2f7-a8a1b75958a7" + }, + { + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/6c4c36dd-6d17-47d9-8bff-c1cde1750dc7" + }, + { + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/2538b9fd-01c4-453f-a20b-e7351cfa8c21" + }, + { + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/85dba242-244b-4a63-b463-b9e6bf4d29e1" + }, + { + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/4dc711e8-2a6e-458e-88cb-a5dcd9b8336e" + }, + { + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/f77c0d96-5deb-4d90-bc8e-7acb14863595" } ], "dangling": [], - "degree": 1, + "degree": 6, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/9bd0353c-a176-48d7-9f2c-59375ae7819b", - "class": "DeviceManufacturer", - "label": "IMEC (distributed via Neuropixels consortium)", + "id": "https://brain-bbqs.org/id/f55eaf7c-d38c-46a6-a6ce-1d78c826ff59", + "class": "DeviceCategory", + "label": "Depth / 3D Camera", "facts": { - "external_url": [ - "https://www.neuropixels.org/" + "category_key": [ + "depth_camera" ], - "homepage_url": [ - "https://www.neuropixels.org/" + "description": [ + "Depth-sensing and multi-view camera rigs producing 3D geometry." + ], + "label": [ + "Depth / 3D Camera" + ], + "measures": [ + "3D point cloud", + "Depth map" ], "name": [ - "IMEC (distributed via Neuropixels consortium)" + "Depth / 3D Camera" + ], + "schema_org_type": [ + "MedicalDevice" + ], + "typical_use_cases": [ + "3D pose estimation", + "Gait and posture" ] }, "out": [], - "in": [ - { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/d3a36c76-22a9-4762-8ce6-a53725475669" - } - ], + "in": [], "dangling": [], - "degree": 1, - "flags": [], + "degree": 0, + "flags": [ + "isolated" + ], "violations": [] }, { - "id": "https://brain-bbqs.org/id/9e769c4e-0958-4ccc-bb96-d714734fa461", - "class": "DeviceManufacturer", - "label": "mBrainTrain", + "id": "https://brain-bbqs.org/id/18d4c4a6-7d69-4425-8792-de1e60d0b35f", + "class": "DeviceCategory", + "label": "ECG / Heart Rate", "facts": { - "external_url": [ - "https://mbraintrain.com/" - ], - "homepage_url": [ - "https://mbraintrain.com/" + "category_key": [ + "ecg_hr" + ], + "description": [ + "Electrocardiography and heart-rate sensing." + ], + "label": [ + "ECG / Heart Rate" + ], + "measures": [ + "ECG waveform", + "HRV", + "heart rate" ], "name": [ - "mBrainTrain" + "ECG / Heart Rate" + ], + "schema_org_type": [ + "MedicalDevice" + ], + "typical_use_cases": [ + "Autonomic arousal", + "Stress physiology" ] }, "out": [], - "in": [ - { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/66955dda-ed5c-4e05-bfbb-5f9f203af4dd" - } - ], + "in": [], "dangling": [], - "degree": 1, - "flags": [], + "degree": 0, + "flags": [ + "isolated" + ], "violations": [] }, { - "id": "https://brain-bbqs.org/id/765fd145-afc8-4101-92d5-33aff8c04fac", - "class": "DeviceManufacturer", - "label": "Med Associates Inc.", + "id": "https://brain-bbqs.org/id/ac703a69-84bb-4157-b5c9-6d3f4e4d2c49", + "class": "DeviceCategory", + "label": "Electrodermal Activity", "facts": { - "external_url": [ - "https://www.med-associates.com/" + "category_key": [ + "eda" ], - "homepage_url": [ - "https://www.med-associates.com/" + "description": [ + "Skin conductance / galvanic skin response sensing." + ], + "label": [ + "Electrodermal Activity" + ], + "measures": [ + "Skin conductance level", + "phasic responses" ], "name": [ - "Med Associates Inc." + "Electrodermal Activity" + ], + "schema_org_type": [ + "MedicalDevice" + ], + "typical_use_cases": [ + "Affective state", + "Sympathetic arousal" ] }, "out": [], "in": [ { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/790607e8-4030-4e55-83fb-8df121fbb7b7" + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/342800f7-b7b5-4b7e-9f41-d528b68d3c3d" } ], "dangling": [], @@ -6155,52 +6443,149 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/ab859681-c7fc-40cf-8d61-51035f1d8605", - "class": "DeviceManufacturer", - "label": "Medtronic plc", + "id": "https://brain-bbqs.org/id/f328ad53-2dd2-490f-adf1-40e9cd85b5bd", + "class": "DeviceCategory", + "label": "Electrophysiology Probe", "facts": { - "external_url": [ - "https://www.medtronic.com/" + "category_key": [ + "ephys_probe" ], - "homepage_url": [ - "https://www.medtronic.com/" + "description": [ + "High-density silicon probes and electrode arrays for extracellular recording." + ], + "label": [ + "Electrophysiology Probe" + ], + "measures": [ + "LFP", + "Spikes", + "multi-unit activity" ], "name": [ - "Medtronic plc" + "Electrophysiology Probe" + ], + "schema_org_type": [ + "MedicalDevice" + ], + "typical_use_cases": [ + "Freely moving recording", + "Population neural dynamics" ] }, "out": [], "in": [ { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/773ddab2-ad45-41ac-8003-b80935d30c32" + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/d3a36c76-22a9-4762-8ce6-a53725475669" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/1573f2f2-dfe7-476f-ba44-55011c0f5d1b" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/adc6c1dd-57a9-49bb-a57d-521fd1208a76" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/80db3a04-a9ad-486d-abf1-4b20f8370ff9" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/f294b0d9-175a-47c7-854c-d4d750009812" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/b02aaf9f-0a7e-4759-b1ba-cb100a2d4eed" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/38289d36-f3a6-43e1-955b-db1d3d400cb2" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/80e226a5-f7e6-49d2-a64a-524940d498a5" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/4614269a-0d7f-4390-b4cc-568a09fa6a45" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/797fd7cf-49dc-40a2-811d-aeec94460ead" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/3352859e-5677-46dd-89d6-17c898b6f097" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/ca25b66c-c03f-4d7e-90e8-93bc12fafeb1" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" } ], "dangling": [], - "degree": 1, + "degree": 18, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/8482b347-2401-49bb-99c6-19a26be255c7", - "class": "DeviceManufacturer", - "label": "miniDSP", + "id": "https://brain-bbqs.org/id/1eda4bd4-4446-40c3-8996-7400722b1560", + "class": "DeviceCategory", + "label": "EMG", "facts": { - "external_url": [ - "https://www.minidsp.com/products/usb-audio-interface/uma-16" + "category_key": [ + "emg" ], - "homepage_url": [ - "https://www.minidsp.com/products/usb-audio-interface/uma-16" + "description": [ + "Surface and intramuscular electromyography systems." + ], + "label": [ + "EMG" + ], + "measures": [ + "EMG envelope", + "Muscle activation" ], "name": [ - "miniDSP" + "EMG" + ], + "schema_org_type": [ + "MedicalDevice" + ], + "typical_use_cases": [ + "Facial and jaw muscle activity", + "Movement effort" ] }, "out": [], "in": [ { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/4d59ea78-e15f-4f78-92d4-28f4041b297f" + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/a991c266-2e08-46e8-b579-8d10341fc344" } ], "dangling": [], @@ -6209,79 +6594,126 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/d74d8fe3-4c71-481b-8a54-410c4e3574a9", - "class": "DeviceManufacturer", - "label": "Motek Medical", + "id": "https://brain-bbqs.org/id/7d968a4f-f412-431e-a9d9-6ec963cb8677", + "class": "DeviceCategory", + "label": "Eye Tracker", "facts": { - "external_url": [ - "https://www.motekmedical.com/solution/caren/" + "category_key": [ + "eye_tracker" ], - "homepage_url": [ - "https://www.motekmedical.com/solution/caren/" + "description": [ + "Wearable and remote gaze tracking systems." + ], + "label": [ + "Eye Tracker" + ], + "measures": [ + "Gaze position", + "fixations", + "pupil diameter", + "saccades" ], "name": [ - "Motek Medical" + "Eye Tracker" + ], + "schema_org_type": [ + "MedicalDevice" + ], + "typical_use_cases": [ + "Joint attention", + "Social attention", + "Visual exploration" ] }, "out": [], "in": [ { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/a9da991f-1bcd-4b6c-ab45-e67af7d3b755" + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/ce24eb59-9276-4e28-9d93-342515a4e970" + }, + { + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/ab492763-6805-4afd-bf3f-28eec5276d6d" } ], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/247cc4da-1133-4307-97c9-8238c723dc67", - "class": "DeviceManufacturer", - "label": "Movella (formerly Xsens)", + "id": "https://brain-bbqs.org/id/62d4c224-70de-42ed-90d6-a7ac86823c0b", + "class": "DeviceCategory", + "label": "Genomics & Tissue", "facts": { - "external_url": [ - "https://www.movella.com/products/motion-capture" + "category_key": [ + "genomics" ], - "homepage_url": [ - "https://www.movella.com/products/motion-capture" + "description": [ + "Sequencing, gene expression, and tissue-level measurement." + ], + "label": [ + "Genomics & Tissue" + ], + "measures": [ + "IEG expression", + "Transcript counts" ], "name": [ - "Movella (formerly Xsens)" + "Genomics & Tissue" + ], + "schema_org_type": [ + "MedicalDevice" + ], + "typical_use_cases": [ + "Molecular phenotyping", + "Post-hoc tissue analysis" ] }, "out": [], - "in": [ - { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/a25d5bdb-97ea-4995-a9aa-fcb6059fcb1f" - } - ], + "in": [], "dangling": [], - "degree": 1, - "flags": [], + "degree": 0, + "flags": [ + "isolated" + ], "violations": [] }, { - "id": "https://brain-bbqs.org/id/560d0a58-2a10-439c-b397-4eecb30a2388", - "class": "DeviceManufacturer", - "label": "NaturalPoint, Inc.", + "id": "https://brain-bbqs.org/id/31b21990-8007-45a0-86e0-d1e9e412d9a7", + "class": "DeviceCategory", + "label": "GPS / Geolocation", "facts": { - "external_url": [ - "https://optitrack.com/" + "category_key": [ + "gps" ], - "homepage_url": [ - "https://optitrack.com/" + "description": [ + "Satellite positioning receivers and geolocation loggers." + ], + "label": [ + "GPS / Geolocation" + ], + "measures": [ + "Latitude/longitude", + "altitude", + "speed" ], "name": [ - "NaturalPoint, Inc." + "GPS / Geolocation" + ], + "schema_org_type": [ + "MedicalDevice" + ], + "typical_use_cases": [ + "Field-scale movement", + "Ranging behaviour" ] }, "out": [], "in": [ { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/dda87113-f453-47bd-8c34-14855db21e4a" + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/130afdbe-9128-4afb-a7cd-f27967d52a7a" } ], "dangling": [], @@ -6290,79 +6722,176 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/90716be1-d61b-4641-ba7e-da9533d0dbeb", - "class": "DeviceManufacturer", - "label": "Natus Medical Incorporated", + "id": "https://brain-bbqs.org/id/e2c21bfc-1707-4f6d-aa18-c6db03f53c2d", + "class": "DeviceCategory", + "label": "IMU / Accelerometry", "facts": { - "external_url": [ - "https://natus.com/" + "category_key": [ + "imu" ], - "homepage_url": [ - "https://natus.com/" + "description": [ + "Inertial measurement units, accelerometers, and gyroscopes." + ], + "label": [ + "IMU / Accelerometry" + ], + "measures": [ + "Acceleration", + "angular velocity", + "orientation" ], "name": [ - "Natus Medical Incorporated" + "IMU / Accelerometry" + ], + "schema_org_type": [ + "MedicalDevice" + ], + "typical_use_cases": [ + "Actigraphy", + "Activity recognition", + "Head movement" ] }, "out": [], "in": [ { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/a36c70d6-19a8-40b6-a8a1-7aaea7e5b918" + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/3352859e-5677-46dd-89d6-17c898b6f097" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/80db3a04-a9ad-486d-abf1-4b20f8370ff9" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/3846417f-c783-484b-9cfc-fbbf8f83fdf5" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/adc6c1dd-57a9-49bb-a57d-521fd1208a76" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/38289d36-f3a6-43e1-955b-db1d3d400cb2" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/80e226a5-f7e6-49d2-a64a-524940d498a5" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/22e61529-38ba-465f-b38b-274e24160fb6" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/4614269a-0d7f-4390-b4cc-568a09fa6a45" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/797fd7cf-49dc-40a2-811d-aeec94460ead" } ], "dangling": [], - "degree": 1, + "degree": 15, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/bc8054b3-253f-4b13-a281-841deb7598e8", - "class": "DeviceManufacturer", - "label": "NeuroPace, Inc.", + "id": "https://brain-bbqs.org/id/f5c11310-96a7-43c3-9d34-dc134237ed45", + "class": "DeviceCategory", + "label": "Infrared Camera", "facts": { - "external_url": [ - "https://www.neuropace.com/" + "category_key": [ + "infrared_camera" ], - "homepage_url": [ - "https://www.neuropace.com/" + "description": [ + "Near-infrared / IR cameras for low-light and night-time behavioural recording." + ], + "label": [ + "Infrared Camera" + ], + "measures": [ + "IR video" ], "name": [ - "NeuroPace, Inc." + "Infrared Camera" + ], + "schema_org_type": [ + "MedicalDevice" + ], + "typical_use_cases": [ + "Dark-phase rodent recording", + "Night-time field observation" ] }, "out": [], - "in": [ - { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/f8ca9029-6e50-43a2-802d-e61784795036" - } - ], + "in": [], "dangling": [], - "degree": 1, - "flags": [], + "degree": 0, + "flags": [ + "isolated" + ], "violations": [] }, { - "id": "https://brain-bbqs.org/id/188ce5e2-0a5f-4c69-a9ec-bf7b8b1ebbc4", - "class": "DeviceManufacturer", - "label": "OBSBOT (Remo Tech)", + "id": "https://brain-bbqs.org/id/46ca9982-9f32-4d56-84fc-95df94a69e7d", + "class": "DeviceCategory", + "label": "Intracranial EEG", "facts": { - "external_url": [ - "https://www.obsbot.com/" + "category_key": [ + "ieeg" ], - "homepage_url": [ - "https://www.obsbot.com/" + "description": [ + "Invasive recording from ECoG grids, sEEG depth electrodes, and single units." + ], + "label": [ + "Intracranial EEG" + ], + "measures": [ + "ECoG", + "LFP", + "single-unit spikes" ], "name": [ - "OBSBOT (Remo Tech)" + "Intracranial EEG" + ], + "schema_org_type": [ + "MedicalDevice" + ], + "typical_use_cases": [ + "Epilepsy monitoring", + "Naturalistic human neurophysiology" ] }, "out": [], "in": [ { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/b91a5db1-9e21-4158-a14f-087f59f5bd8d" + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/a36c70d6-19a8-40b6-a8a1-7aaea7e5b918" } ], "dangling": [], @@ -6371,77 +6900,79 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/2367da64-4eae-4655-a4dc-315ad12e3398", - "class": "DeviceManufacturer", - "label": "Open Ephys", + "id": "https://brain-bbqs.org/id/77124e96-cb5e-403b-8ca4-d4fc15b6f95c", + "class": "DeviceCategory", + "label": "LiDAR / mmWave Radar", "facts": { - "external_url": [ - "https://open-ephys.org/" + "category_key": [ + "lidar_radar" ], - "homepage_url": [ - "https://open-ephys.org/" + "description": [ + "Non-camera ranging sensors for privacy-preserving movement sensing." + ], + "label": [ + "LiDAR / mmWave Radar" + ], + "measures": [ + "Range", + "doppler", + "point cloud" ], "name": [ - "Open Ephys" + "LiDAR / mmWave Radar" + ], + "schema_org_type": [ + "MedicalDevice" + ], + "typical_use_cases": [ + "In-home movement sensing", + "Privacy-preserving tracking" ] }, "out": [], - "in": [ - { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/47974228-8745-4b67-8857-4450426743a7" - } - ], + "in": [], "dangling": [], - "degree": 1, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/c42dadeb-bf3c-44fa-baff-92adea2e0185", - "class": "DeviceManufacturer", - "label": "Pearson", - "facts": { - "name": [ - "Pearson" - ] - }, - "out": [], - "in": [ - { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/6c4c36dd-6d17-47d9-8bff-c1cde1750dc7" - }, - { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/2538b9fd-01c4-453f-a20b-e7351cfa8c21" - } + "degree": 0, + "flags": [ + "isolated" ], - "dangling": [], - "degree": 2, - "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/9b910269-1934-4f7b-a4f7-9f375f401d8d", - "class": "DeviceManufacturer", - "label": "Pupil Labs GmbH", + "id": "https://brain-bbqs.org/id/7e99c7ca-9c1d-4de5-b6b5-a6c96c5341af", + "class": "DeviceCategory", + "label": "Metabolic Measurement", "facts": { - "external_url": [ - "https://pupil-labs.com/" + "category_key": [ + "metabolic" ], - "homepage_url": [ - "https://pupil-labs.com/" + "description": [ + "Indirect calorimetry and energy-expenditure systems." + ], + "label": [ + "Metabolic Measurement" + ], + "measures": [ + "VCO2", + "VO2", + "energy expenditure" ], "name": [ - "Pupil Labs GmbH" + "Metabolic Measurement" + ], + "schema_org_type": [ + "MedicalDevice" + ], + "typical_use_cases": [ + "Exercise physiology", + "Field metabolic cost" ] }, "out": [], "in": [ { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/ab492763-6805-4afd-bf3f-28eec5276d6d" + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/700795ce-fd4c-49cc-b037-e9c244039e5e" } ], "dangling": [], @@ -6450,242 +6981,479 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/615d81a2-ce1b-4d1e-8f17-30d97dddb2a0", - "class": "DeviceManufacturer", - "label": "Shimmer Research", + "id": "https://brain-bbqs.org/id/e80e0495-82ff-4d51-995f-36e9349b40fb", + "class": "DeviceCategory", + "label": "Microphone / Audio Recorder", "facts": { - "external_url": [ - "https://shimmersensing.com/" + "category_key": [ + "microphone" ], - "homepage_url": [ - "https://shimmersensing.com/" + "description": [ + "Audible-range microphones, arrays, and field recorders." + ], + "label": [ + "Microphone / Audio Recorder" + ], + "measures": [ + "Audio waveform", + "sound pressure level" ], "name": [ - "Shimmer Research" + "Microphone / Audio Recorder" + ], + "schema_org_type": [ + "MedicalDevice" + ], + "typical_use_cases": [ + "Passive acoustic monitoring", + "Speech and vocalization capture" ] }, "out": [], "in": [ { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/342800f7-b7b5-4b7e-9f41-d528b68d3c3d" - } - ], - "dangling": [], - "degree": 1, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/541eb3ec-855c-427e-9d9d-816b3845b9cf", - "class": "DeviceManufacturer", - "label": "Stoelting", - "facts": { - "name": [ - "Stoelting" - ] - }, - "out": [], - "in": [ + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/16f63350-9197-4e16-8a8c-0f67b2da18df" + }, { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/429c73a9-8440-4f1f-a2f7-a8a1b75958a7" + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/4d59ea78-e15f-4f78-92d4-28f4041b297f" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/b02aaf9f-0a7e-4759-b1ba-cb100a2d4eed" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/e285ab2b-1a7d-4b2e-9400-b24d6faff6de" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/a98fe953-d2ad-4770-8c8c-1759f8500c4a" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/22e61529-38ba-465f-b38b-274e24160fb6" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/3352859e-5677-46dd-89d6-17c898b6f097" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" } ], "dangling": [], - "degree": 1, + "degree": 10, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/d68a81db-70f9-4ea5-95af-3f1f83a46771", - "class": "DeviceManufacturer", - "label": "Teledyne FLIR", + "id": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3", + "class": "DeviceCategory", + "label": "Motion Capture", "facts": { - "external_url": [ - "https://www.flir.com/" + "category_key": [ + "motion_capture" ], - "homepage_url": [ - "https://www.flir.com/" + "description": [ + "Marker-based and inertial motion capture systems." ], - "name": [ - "Teledyne FLIR" - ] - }, - "out": [], - "in": [ - { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/fbbd19db-7e98-42cd-a230-510ddff40cef" - } - ], - "dangling": [], - "degree": 1, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/79786801-1f05-4281-b4c3-9180854ee278", - "class": "DeviceManufacturer", - "label": "Tobii AB", - "facts": { - "external_url": [ - "https://www.tobii.com/products/eye-trackers" + "label": [ + "Motion Capture" ], - "homepage_url": [ - "https://www.tobii.com/products/eye-trackers" + "measures": [ + "3D marker positions", + "joint angles", + "segment kinematics" ], "name": [ - "Tobii AB" + "Motion Capture" + ], + "schema_org_type": [ + "MedicalDevice" + ], + "typical_use_cases": [ + "Full-body kinematics", + "Gait analysis", + "Reaching and locomotion" ] }, "out": [], "in": [ { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/ce24eb59-9276-4e28-9d93-342515a4e970" - } - ], - "dangling": [], - "degree": 1, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/a7b15b50-1f35-4e02-91d5-c28593457e3d", - "class": "DeviceManufacturer", - "label": "Western Psychological Services", - "facts": { - "name": [ - "Western Psychological Services" - ] - }, - "out": [], - "in": [ + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/a25d5bdb-97ea-4995-a9aa-fcb6059fcb1f" + }, { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/4dc711e8-2a6e-458e-88cb-a5dcd9b8336e" + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/dda87113-f453-47bd-8c34-14855db21e4a" }, { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/85dba242-244b-4a63-b463-b9e6bf4d29e1" + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/4614269a-0d7f-4390-b4cc-568a09fa6a45" }, { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/f77c0d96-5deb-4d90-bc8e-7acb14863595" + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/3352859e-5677-46dd-89d6-17c898b6f097" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/1e2423ff-965b-4485-8557-797c1e1dee38" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/4f2619b1-a6a4-48e5-b21a-0f5455354ea9" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/1e1fc06b-fe5c-4ec2-9f64-474f98ae31e8" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/2db5ee93-296a-446a-a3e6-59fd3d28c4a6" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/ca25b66c-c03f-4d7e-90e8-93bc12fafeb1" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/1573f2f2-dfe7-476f-ba44-55011c0f5d1b" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/adc6c1dd-57a9-49bb-a57d-521fd1208a76" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/80db3a04-a9ad-486d-abf1-4b20f8370ff9" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/f294b0d9-175a-47c7-854c-d4d750009812" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/3846417f-c783-484b-9cfc-fbbf8f83fdf5" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/bf3493c0-de28-4731-9baf-c976ccc7c484" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/e285ab2b-1a7d-4b2e-9400-b24d6faff6de" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/a98fe953-d2ad-4770-8c8c-1759f8500c4a" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/38289d36-f3a6-43e1-955b-db1d3d400cb2" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/22e61529-38ba-465f-b38b-274e24160fb6" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0" } ], "dangling": [], - "degree": 3, + "degree": 25, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/58e396e9-0430-4678-ab24-382bba814d8b", - "class": "DeviceManufacturer", - "label": "White Matter LLC", + "id": "https://brain-bbqs.org/id/851882bb-3321-45ed-af75-6ae08836c1fc", + "class": "DeviceCategory", + "label": "Multimodal Wearable", "facts": { - "external_url": [ - "https://white-matter.com/" + "category_key": [ + "wearable_multimodal" ], - "homepage_url": [ - "https://white-matter.com/" + "description": [ + "Wrist- and body-worn devices combining several physiological sensors." + ], + "label": [ + "Multimodal Wearable" + ], + "measures": [ + "EDA", + "PPG", + "accelerometry", + "temperature" ], "name": [ - "White Matter LLC" + "Multimodal Wearable" + ], + "schema_org_type": [ + "MedicalDevice" + ], + "typical_use_cases": [ + "Ambulatory physiology", + "Naturalistic monitoring" ] }, "out": [], "in": [ { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/55e0ecb2-5960-47a0-9fb6-6c2162bfe182" - } - ], - "dangling": [], - "degree": 1, - "flags": [], + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/3b549548-0ca5-4c7e-91ba-a6a1ed51705e" + }, + { + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/88b4baf0-8e42-43e8-a689-3f5cd46138ee" + }, + { + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/8d1248d6-6ad4-449a-b268-69c17fb8e0bd" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/80e226a5-f7e6-49d2-a64a-524940d498a5" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/22e61529-38ba-465f-b38b-274e24160fb6" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/4614269a-0d7f-4390-b4cc-568a09fa6a45" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/797fd7cf-49dc-40a2-811d-aeec94460ead" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/3352859e-5677-46dd-89d6-17c898b6f097" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/adc6c1dd-57a9-49bb-a57d-521fd1208a76" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/80db3a04-a9ad-486d-abf1-4b20f8370ff9" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/3846417f-c783-484b-9cfc-fbbf8f83fdf5" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/38289d36-f3a6-43e1-955b-db1d3d400cb2" + } + ], + "dangling": [], + "degree": 18, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/ddff023c-f84e-41b2-aa9e-1e8ee0d743fd", - "class": "DeviceManufacturer", - "label": "Wildlife Acoustics, Inc.", + "id": "https://brain-bbqs.org/id/d8cef433-7209-4e63-bdd5-a3f52bd9dd89", + "class": "DeviceCategory", + "label": "Neural Imaging", "facts": { - "external_url": [ - "https://www.wildlifeacoustics.com/" + "category_key": [ + "neural_imaging" ], - "homepage_url": [ - "https://www.wildlifeacoustics.com/" + "description": [ + "Optical and volumetric imaging of neural activity." + ], + "label": [ + "Neural Imaging" + ], + "measures": [ + "BOLD", + "Fluorescence", + "bioluminescence" ], "name": [ - "Wildlife Acoustics, Inc." + "Neural Imaging" + ], + "schema_org_type": [ + "MedicalDevice" + ], + "typical_use_cases": [ + "Calcium imaging", + "Functional neuroimaging" ] }, "out": [], "in": [ { - "predicate": "manufacturer", - "source": "https://brain-bbqs.org/id/16f63350-9197-4e16-8a8c-0f67b2da18df" + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/38289d36-f3a6-43e1-955b-db1d3d400cb2" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/3352859e-5677-46dd-89d6-17c898b6f097" } ], "dangling": [], - "degree": 1, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/eac8b2aa-4353-4d9a-af21-601294a8ef4a", - "class": "Event", - "label": "BBQS MIT Workshop 2026", + "id": "https://brain-bbqs.org/id/e9d52180-5701-46ba-b5dc-7fc6fa32233b", + "class": "DeviceCategory", + "label": "Neurostimulation / DBS", "facts": { + "category_key": [ + "neurostimulation" + ], "description": [ - "Annual BBQS consortium workshop, MIT, Cambridge MA" + "Implanted stimulation systems with chronic sensing capability." + ], + "label": [ + "Neurostimulation / DBS" + ], + "measures": [ + "LFP", + "event markers", + "stimulation parameters" ], "name": [ - "BBQS MIT Workshop 2026" + "Neurostimulation / DBS" + ], + "schema_org_type": [ + "MedicalDevice" + ], + "typical_use_cases": [ + "Deep brain stimulation", + "Responsive neurostimulation" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/f8ca9029-6e50-43a2-802d-e61784795036" + }, + { + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/773ddab2-ad45-41ac-8003-b80935d30c32" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/80e226a5-f7e6-49d2-a64a-524940d498a5" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/22e61529-38ba-465f-b38b-274e24160fb6" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/3352859e-5677-46dd-89d6-17c898b6f097" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/adc6c1dd-57a9-49bb-a57d-521fd1208a76" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/38289d36-f3a6-43e1-955b-db1d3d400cb2" + } ], + "dangling": [], + "degree": 8, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/67d25d9e-afa4-4571-aa3c-3c0d4aee3388", - "class": "FundingOpportunity", - "label": "BRAIN Initiative: Data Knowledgebase Ecosystem and NeuroAI Integration (NIH Highlighted Topic)", + "id": "https://brain-bbqs.org/id/39e960bb-6537-484d-94e9-62dde0ee3680", + "class": "DeviceCategory", + "label": "OPM-MEG", "facts": { - "activity_code": [ - "R01/R21" + "category_key": [ + "meg_opm" ], "description": [ - "NIH Highlighted Topic encouraging research that advances the BRAIN Initiative data knowledgebase ecosystem and its integration with NeuroAI. No dedicated NOFO — apply through an appropriate NIH parent announcement or other broad opportunity." - ], - "expiration_date": [ - "2027-09-29" + "Optically pumped magnetometer arrays for on-scalp magnetoencephalography." ], - "external_url": [ - "https://grants.nih.gov/funding/find-a-fit-for-your-research/highlighted-topics/18" + "label": [ + "OPM-MEG" ], - "fon": [ - "NOT-MH-25-155" + "measures": [ + "Magnetic field", + "source-localized activity" ], "name": [ - "BRAIN Initiative: Data Knowledgebase Ecosystem and NeuroAI Integration (NIH Highlighted Topic)" - ], - "posted_date": [ - "2026-02-24" + "OPM-MEG" ], - "status": [ - "open" + "schema_org_type": [ + "MedicalDevice" ], - "url": [ - "https://grants.nih.gov/funding/find-a-fit-for-your-research/highlighted-topics/18" + "typical_use_cases": [ + "Naturalistic neuroimaging", + "Wearable MEG" ] }, "out": [], @@ -6698,36 +7466,33 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/9fe36a51-d470-42f8-baa1-0c7aa68a9dea", - "class": "FundingOpportunity", - "label": "BRAIN Initiative: Integrative Team-Research BRAIN Circuits Program - iBCP (RM1 Clinical Trial Not Allowed)", + "id": "https://brain-bbqs.org/id/8ae4d852-9f43-4d4e-a7fb-6cef12ef9af8", + "class": "DeviceCategory", + "label": "Photoplethysmography (PPG)", "facts": { - "activity_code": [ - "RM1" + "category_key": [ + "ppg" ], - "expiration_date": [ - "2028-06-24" + "description": [ + "Optical blood-volume-pulse sensing." ], - "external_url": [ - "https://simpler.grants.gov/opportunity/ffe98704-96a8-4f41-a32b-49edd0409006" + "label": [ + "Photoplethysmography (PPG)" ], - "fon": [ - "RFA-NS-27-002" + "measures": [ + "BVP", + "SpO2", + "pulse rate" ], "name": [ - "BRAIN Initiative: Integrative Team-Research BRAIN Circuits Program - iBCP (RM1 Clinical Trial Not Allowed)" - ], - "open_date": [ - "2026-09-07" - ], - "posted_date": [ - "2026-08-31" + "Photoplethysmography (PPG)" ], - "status": [ - "open" + "schema_org_type": [ + "MedicalDevice" ], - "url": [ - "https://simpler.grants.gov/opportunity/ffe98704-96a8-4f41-a32b-49edd0409006" + "typical_use_cases": [ + "Arousal tracking", + "Wearable heart rate" ] }, "out": [], @@ -6740,36 +7505,33 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/e0042c46-59de-40f6-b53d-8e565cc27a45", - "class": "FundingOpportunity", - "label": "BRAIN Initiative: Integrative Team-Research BRAIN Circuits Program - iTeamBCP (RM1) [forecast — superseded by RFA-NS-27-002]", + "id": "https://brain-bbqs.org/id/9e20b70e-9f64-4e32-bc64-18efbf8293bd", + "class": "DeviceCategory", + "label": "Respiration Sensing", "facts": { - "activity_code": [ - "RM1" + "category_key": [ + "respiration" ], "description": [ - "Solicits teams of 3-6 PDs/PIs to understand how the nervous system gives rise to mental experience and behavior, integrating circuit, in vivo recordings, and behavioral analyses." - ], - "expiration_date": [ - "2027-06-16" + "Breathing belts, thermistors, and airflow sensors." ], - "external_url": [ - "https://simpler.grants.gov/opportunity/ffe98704-96a8-4f41-a32b-49edd0409006" + "label": [ + "Respiration Sensing" ], - "fon": [ - "RFA-NS-26-011" + "measures": [ + "Respiration rate", + "airflow", + "nasal temperature" ], "name": [ - "BRAIN Initiative: Integrative Team-Research BRAIN Circuits Program - iTeamBCP (RM1) [forecast — superseded by RFA-NS-27-002]" - ], - "posted_date": [ - "2025-08-28" + "Respiration Sensing" ], - "status": [ - "closed" + "schema_org_type": [ + "MedicalDevice" ], - "url": [ - "https://simpler.grants.gov/opportunity/ffe98704-96a8-4f41-a32b-49edd0409006" + "typical_use_cases": [ + "Breathing rhythm", + "Respiration-locked neural activity" ] }, "out": [], @@ -6782,135 +7544,121 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/3fb868da-b941-439e-a81e-927a543defd3", - "class": "FundingOpportunity", - "label": "BRAIN Initiative: New Technologies and Novel Approaches for Recording and Modulation in the Nervous System (R01 Clinical Trial Not Allowed)", - "facts": { - "activity_code": [ - "R01" + "id": "https://brain-bbqs.org/id/60288cb2-b6fa-41ab-9312-3209dd2cd804", + "class": "DeviceCategory", + "label": "RFID / PIT Tags", + "facts": { + "category_key": [ + "rfid" ], "description": [ - "Supports proof-of-concept testing and development of new technologies and novel approaches for recording and modulation of neural cells and circuits, addressing major challenges in central nervous system research." - ], - "expiration_date": [ - "2026-06-16" + "Radio-frequency and passive integrated transponder identity tags." ], - "external_url": [ - "https://grants.nih.gov/grants/guide/rfa-files/RFA-NS-25-018.html" + "label": [ + "RFID / PIT Tags" ], - "fon": [ - "RFA-NS-25-018" + "measures": [ + "Individual ID", + "antenna crossings", + "timestamps" ], "name": [ - "BRAIN Initiative: New Technologies and Novel Approaches for Recording and Modulation in the Nervous System (R01 Clinical Trial Not Allowed)" - ], - "open_date": [ - "2025-05-02" - ], - "posted_date": [ - "2024-09-24" + "RFID / PIT Tags" ], - "status": [ - "closed" + "schema_org_type": [ + "MedicalDevice" ], - "url": [ - "https://grants.nih.gov/grants/guide/rfa-files/RFA-NS-25-018.html" + "typical_use_cases": [ + "Automated visit logging", + "Individual identification" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/5a9d5e58-b370-48ea-a189-a82e7c834708" + } ], + "dangling": [], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/07448ab8-2717-4b6e-83e0-9abf492240e5", - "class": "FundingOpportunity", - "label": "BRAIN Initiative: Promoting Health for All Through BRAIN Technology Partnerships", + "id": "https://brain-bbqs.org/id/1f40721b-dadd-4141-8f9d-6661f4777718", + "class": "DeviceCategory", + "label": "Scalp EEG", "facts": { - "activity_code": [ - "R34" + "category_key": [ + "eeg" ], "description": [ - "This NOFO is intended for investigators at resource-limited institutions to adopt and integrate BRAIN Initiative resources into their research. Supports two-way knowledge transfer between PI and BRAIN disseminator." - ], - "eligible_activity_codes": [ - "R34" - ], - "expiration_date": [ - "2026-06-18" + "Non-invasive scalp electroencephalography amplifiers and caps." ], - "external_url": [ - "https://grants.nih.gov/grants/guide/rfa-files/RFA-NS-25-016.html" + "label": [ + "Scalp EEG" ], - "fon": [ - "RFA-NS-25-016" + "measures": [ + "EEG voltage", + "event-related potentials", + "spectral power" ], "name": [ - "BRAIN Initiative: Promoting Health for All Through BRAIN Technology Partnerships" - ], - "open_date": [ - "2025-05-17" - ], - "opportunity_type": [ - "New" - ], - "posted_date": [ - "2024-11-22" + "Scalp EEG" ], - "status": [ - "closed" + "schema_org_type": [ + "MedicalDevice" ], - "url": [ - "https://grants.nih.gov/grants/guide/rfa-files/RFA-NS-25-016.html" + "typical_use_cases": [ + "Cognitive state", + "Hyperscanning", + "Mobile EEG" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/ba876f06-02b2-4ca2-bbc0-2877890b6f6a" + }, + { + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/66955dda-ed5c-4e05-bfbb-5f9f203af4dd" + } ], + "dangling": [], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/912f67fc-5862-47a2-b6f4-891fcd98f244", - "class": "FundingOpportunity", - "label": "BRAIN Initiative: Research Resource Grants for Technology Integration and Dissemination (U24 Clinical Trial Not Allowed)", + "id": "https://brain-bbqs.org/id/5d5d31be-c34b-4cf6-a08f-273856add625", + "class": "DeviceCategory", + "label": "Smartphone / Tablet Camera", "facts": { - "activity_code": [ - "U24" + "category_key": [ + "smartphone_camera" ], "description": [ - "Accelerates the scientific impact of the BRAIN Initiative by supporting rapid, broad dissemination of validated technologies and resources to the neuroscience community — reagent distribution, user training, access to technology platforms and specialized facilities, and minor improvements to scale delivery." - ], - "expiration_date": [ - "2028-10-07" + "Consumer phone and tablet cameras used as field recording devices." ], - "external_url": [ - "https://simpler.grants.gov/opportunity/92fe438d-91dc-4ce2-9a45-edc615c4d0b6" + "label": [ + "Smartphone / Tablet Camera" ], - "fon": [ - "RFA-NS-27-001" + "measures": [ + "RGB video", + "selfie video" ], "name": [ - "BRAIN Initiative: Research Resource Grants for Technology Integration and Dissemination (U24 Clinical Trial Not Allowed)" - ], - "open_date": [ - "2026-05-10" - ], - "posted_date": [ - "2026-02-09" + "Smartphone / Tablet Camera" ], - "status": [ - "open" + "schema_org_type": [ + "MedicalDevice" ], - "url": [ - "https://simpler.grants.gov/opportunity/92fe438d-91dc-4ce2-9a45-edc615c4d0b6" + "typical_use_cases": [ + "Ecological momentary video", + "Remote data collection" ] }, "out": [], @@ -6923,39 +7671,33 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/d3423658-1147-421f-a6f8-f31067133351", - "class": "FundingOpportunity", - "label": "BRAIN Initiative: Theories, Models and Methods for Analysis of Complex Data from the Brain (R01 Clinical Trial Not Allowed)", + "id": "https://brain-bbqs.org/id/4d4eeeec-1126-4407-b7e9-80ad309522b4", + "class": "DeviceCategory", + "label": "Surveys & Structured Tasks", "facts": { - "activity_code": [ - "R01" + "category_key": [ + "survey_task" ], "description": [ - "Supports development of innovative theories, models, and methods as analytical tools to advance a quantitative and predictive understanding of brain function across multiple scales, with priority on novel capabilities for analyzing complex BRAIN Initiative datasets (physiological, anatomical, connectivity, and behavioral)." - ], - "expiration_date": [ - "2027-11-09" + "Questionnaires, diaries, dial ratings, and computerized cognitive tasks." ], - "external_url": [ - "https://grants.nih.gov/grants/guide/rfa-files/RFA-DA-27-004.html" + "label": [ + "Surveys & Structured Tasks" ], - "fon": [ - "RFA-DA-27-004" + "measures": [ + "Item responses", + "ratings", + "reaction times" ], "name": [ - "BRAIN Initiative: Theories, Models and Methods for Analysis of Complex Data from the Brain (R01 Clinical Trial Not Allowed)" - ], - "open_date": [ - "2025-09-28" - ], - "posted_date": [ - "2025-09-16" + "Surveys & Structured Tasks" ], - "status": [ - "open" + "schema_org_type": [ + "MedicalDevice" ], - "url": [ - "https://grants.nih.gov/grants/guide/rfa-files/RFA-DA-27-004.html" + "typical_use_cases": [ + "Cognitive testing", + "Self-report" ] }, "out": [], @@ -6968,702 +7710,729 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/8b9d5dda-2b99-4e1c-ba27-968f74ef8b77", - "class": "FundingOpportunity", - "label": "Development and Testing of a Multi-use Frameworks Playbook for Precision Medicine with AI: Integrating Imaging with Multimodal Data (PRIMED-AI) (U01 Clinical Trial Not Allowed)", + "id": "https://brain-bbqs.org/id/0e76fcd9-9746-4456-a344-50f817379dcf", + "class": "DeviceCategory", + "label": "Thermal Camera", "facts": { - "activity_code": [ - "U01" + "category_key": [ + "thermal_camera" ], "description": [ - "Develops and tests a \"playbook\" of standardized frameworks and protocols for building reliable, deployable multimodal AI clinical decision support tools that integrate clinical imaging with other health data. 5 awards anticipated, $2M total." + "Long-wave infrared cameras measuring surface temperature." ], - "external_url": [ - "https://simpler.grants.gov/opportunity/5b0a5980-5b84-4cdf-9370-2a36c301760b" + "label": [ + "Thermal Camera" ], - "fon": [ - "RFA-RM-27-011" + "measures": [ + "Surface temperature", + "thermal video" ], "name": [ - "Development and Testing of a Multi-use Frameworks Playbook for Precision Medicine with AI: Integrating Imaging with Multimodal Data (PRIMED-AI) (U01 Clinical Trial Not Allowed)" - ], - "posted_date": [ - "2026-06-30" + "Thermal Camera" ], - "status": [ - "open" + "schema_org_type": [ + "MedicalDevice" ], - "url": [ - "https://simpler.grants.gov/opportunity/5b0a5980-5b84-4cdf-9370-2a36c301760b" + "typical_use_cases": [ + "Stress and arousal proxies", + "Thermoregulation" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/fbbd19db-7e98-42cd-a230-510ddff40cef" + } ], + "dangling": [], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/b76af5cd-30c7-4f75-a127-d4e8a669cdd6", - "class": "FundingOpportunity", - "label": "Logistics Center for Precision Medicine with AI: Integrating Imaging with Multimodal Data (PRIMED-AI) (U24)", + "id": "https://brain-bbqs.org/id/361a786e-7850-418a-a76a-ea21fc656775", + "class": "DeviceCategory", + "label": "Ultrasonic Microphone", "facts": { - "activity_code": [ - "U24" + "category_key": [ + "ultrasonic_microphone" ], "description": [ - "Coordination and support center for the PRIMED-AI Program, operating administration, evaluation, and outreach cores that collect, organize, and disseminate information about tools created across the consortium. 1 award, $575K–$750K." + "Recording hardware for ultrasonic vocalizations above the human hearing range." ], - "external_url": [ - "https://simpler.grants.gov/opportunity/a975ac4b-ca02-4d2b-8dcd-c75493f04087" + "label": [ + "Ultrasonic Microphone" ], - "fon": [ - "RFA-RM-27-015" + "measures": [ + "USV spectrograms", + "Ultrasonic audio" ], "name": [ - "Logistics Center for Precision Medicine with AI: Integrating Imaging with Multimodal Data (PRIMED-AI) (U24)" - ], - "posted_date": [ - "2026-06-30" + "Ultrasonic Microphone" ], - "status": [ - "open" + "schema_org_type": [ + "MedicalDevice" ], - "url": [ - "https://simpler.grants.gov/opportunity/a975ac4b-ca02-4d2b-8dcd-c75493f04087" + "typical_use_cases": [ + "Bat and insect acoustics", + "Rodent USV recording" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/0285843e-0628-489a-a676-27648d2350a7" + } ], + "dangling": [], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/ac01b838-9803-4a39-8adf-6b9ac9883535", - "class": "FundingOpportunity", - "label": "Model-to-Clinic (M2C) for Precision Medicine with AI: Integrating Imaging with Multimodal Data (PRIMED-AI) (UG3/UH3 Clinical Trial Optional)", + "id": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0", + "class": "DeviceCategory", + "label": "Video Camera", "facts": { - "activity_code": [ - "UG3/UH3" + "category_key": [ + "video_camera" ], "description": [ - "Catalyzes translation of AI-enabled, image-centered multimodal clinical decision support tools from prototype training and testing toward real-world clinical application. 8 awards anticipated." + "Standard or high-speed cameras recording visible-light behavioural video." ], - "external_url": [ - "https://simpler.grants.gov/opportunity/360c4588-1512-4fa4-9b61-52a3f1d6c368" + "label": [ + "Video Camera" ], - "fon": [ - "RFA-RM-27-013" + "measures": [ + "RGB video", + "frame timestamps" ], "name": [ - "Model-to-Clinic (M2C) for Precision Medicine with AI: Integrating Imaging with Multimodal Data (PRIMED-AI) (UG3/UH3 Clinical Trial Optional)" - ], - "posted_date": [ - "2026-06-30" + "Video Camera" ], - "status": [ - "open" + "schema_org_type": [ + "MedicalDevice" ], - "url": [ - "https://simpler.grants.gov/opportunity/360c4588-1512-4fa4-9b61-52a3f1d6c368" + "typical_use_cases": [ + "Behavioural video capture", + "Pose estimation input", + "Social interaction recording" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/7eb373e9-092d-418d-b3ff-4f7d8e4fb939" + }, + { + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/b91a5db1-9e21-4158-a14f-087f59f5bd8d" + }, + { + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/b26a04a7-e254-470c-9d43-1c618d60434e" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/22e61529-38ba-465f-b38b-274e24160fb6" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/4614269a-0d7f-4390-b4cc-568a09fa6a45" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/3352859e-5677-46dd-89d6-17c898b6f097" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/1e2423ff-965b-4485-8557-797c1e1dee38" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/4f2619b1-a6a4-48e5-b21a-0f5455354ea9" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/2db5ee93-296a-446a-a3e6-59fd3d28c4a6" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/ca25b66c-c03f-4d7e-90e8-93bc12fafeb1" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/1e1fc06b-fe5c-4ec2-9f64-474f98ae31e8" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/1573f2f2-dfe7-476f-ba44-55011c0f5d1b" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/80db3a04-a9ad-486d-abf1-4b20f8370ff9" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/f294b0d9-175a-47c7-854c-d4d750009812" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/3846417f-c783-484b-9cfc-fbbf8f83fdf5" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/bf3493c0-de28-4731-9baf-c976ccc7c484" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/e285ab2b-1a7d-4b2e-9400-b24d6faff6de" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/a98fe953-d2ad-4770-8c8c-1759f8500c4a" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/adc6c1dd-57a9-49bb-a57d-521fd1208a76" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/38289d36-f3a6-43e1-955b-db1d3d400cb2" + } ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/a8990457-e9da-49eb-9a0c-5b2af1a4ca61", - "class": "FundingOpportunity", - "label": "NSF Graduate Research Fellowship Program (GRFP)", - "facts": { - "activity_code": [ - "Fellowship" - ], - "external_url": [ - "https://www.nsf.gov/funding/opportunities/grfp-nsf-graduate-research-fellowship-program/nsf26-526/solicitation" - ], - "fon": [ - "NSF 26-526" - ], - "name": [ - "NSF Graduate Research Fellowship Program (GRFP)" - ], - "posted_date": [ - "2026-08-25" - ], - "status": [ - "open" - ], - "url": [ - "https://www.nsf.gov/funding/opportunities/grfp-nsf-graduate-research-fellowship-program/nsf26-526/solicitation" - ] - }, - "out": [], - "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 26, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/09e37e7e-a6a7-409a-b532-9f000647f007", - "class": "FundingOpportunity", - "label": "PRIMED-AI: Data-to-Model Academic-Industrial Partnerships (D2M-AIP) for Precision Medicine with AI: Integrating Imaging with Multimodal Data (UG3/UH3 Clinical Trial Optional)", + "id": "https://brain-bbqs.org/id/1933d538-1acc-4a01-8691-9ecd2989d0e2", + "class": "DeviceCategory", + "label": "VR / AR Environment", "facts": { - "activity_code": [ - "UG3/UH3" + "category_key": [ + "vr_environment" ], "description": [ - "Supports academic-industrial partnerships developing Software as a Medical Device (SaMD) multimodal AI clinical decision support tools combining medical imaging with other health data. 8 awards anticipated; foreign organizations eligible." + "Immersive virtual and augmented reality systems and platforms." ], - "external_url": [ - "https://simpler.grants.gov/opportunity/d07ebcd7-96cf-40cb-8ae3-f401b6274080" + "label": [ + "VR / AR Environment" ], - "fon": [ - "RFA-RM-27-012" + "measures": [ + "Head pose", + "controller input", + "scene events" ], "name": [ - "PRIMED-AI: Data-to-Model Academic-Industrial Partnerships (D2M-AIP) for Precision Medicine with AI: Integrating Imaging with Multimodal Data (UG3/UH3 Clinical Trial Optional)" - ], - "posted_date": [ - "2026-06-30" + "VR / AR Environment" ], - "status": [ - "open" + "schema_org_type": [ + "MedicalDevice" ], - "url": [ - "https://simpler.grants.gov/opportunity/d07ebcd7-96cf-40cb-8ae3-f401b6274080" + "typical_use_cases": [ + "Controlled naturalistic tasks", + "Rehabilitation environments" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/a9da991f-1bcd-4b6c-ab45-e67af7d3b755" + } ], + "dangling": [], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/20adc9fb-c389-48a7-85ec-931501f0ce13", - "class": "FundingOpportunity", - "label": "Utilizing the Full Power of Empire AI — Request for Applications (Simons Foundation)", + "id": "https://brain-bbqs.org/id/006caa68-8b24-474f-867f-82a6199a84b1", + "class": "DeviceCategory", + "label": "Wireless Electrophysiology", "facts": { - "activity_code": [ - "Research Grant" + "category_key": [ + "wireless_ephys" ], "description": [ - "Supports cutting-edge mathematics and basic science research that uses Empire AI's multinode GPU clusters and foundational machine learning models, in computational astrophysics, physics, biology, mathematics, neuroscience, or computational physical chemistry. Up to $6M total over two years (2027-06-01 to 2029-05-31), 6-12 awards. PI must be tenure-track/tenured at an Empire AI member institution (Columbia, Cornell, CUNY, SUNY, RPI, NYU, Rochester, RIT, Icahn/Mount Sinai); additional PIs may join by subcontract from outside institutions." + "Untethered neural acquisition systems and telemetry headstages." ], - "external_url": [ - "https://www.simonsfoundation.org/grant/utilizing-the-full-power-of-empire-ai-request-for-applications/" + "label": [ + "Wireless Electrophysiology" ], - "fon": [ - "SIMONS-EMPIRE-AI-2026" + "measures": [ + "LFP", + "Spikes", + "synchronized video" ], "name": [ - "Utilizing the Full Power of Empire AI — Request for Applications (Simons Foundation)" - ], - "open_date": [ - "2026-09-01" - ], - "posted_date": [ - "2026-09-01" + "Wireless Electrophysiology" ], - "status": [ - "open" + "schema_org_type": [ + "MedicalDevice" ], - "url": [ - "https://www.simonsfoundation.org/grant/utilizing-the-full-power-of-empire-ai-request-for-applications/" + "typical_use_cases": [ + "Freely behaving recording", + "Social interaction neurophysiology" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/9db8fc93-1890-4237-b758-d5f94c5e6306", - "class": "FundingOpportunity", - "label": "Validation Center for Precision Medicine with AI: Integrating Imaging with Multimodal Data (PRIMED-AI) (U54 Clinical Trials Not Allowed)", - "facts": { - "activity_code": [ - "U54" - ], - "description": [ - "Establishes a dedicated hub for comprehensive evaluation and characterization of AI-enabled, image-based multimodal CDS tools from the PRIMED-AI Consortium — verification, validation, interoperability, and uncertainty quantification. 1 award, $2.0M–$2.7M; foreign organizations ineligible." - ], + "in": [ + { + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/55e0ecb2-5960-47a0-9fb6-6c2162bfe182" + }, + { + "predicate": "device_category", + "source": "https://brain-bbqs.org/id/47974228-8745-4b67-8857-4450426743a7" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/38289d36-f3a6-43e1-955b-db1d3d400cb2" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/797fd7cf-49dc-40a2-811d-aeec94460ead" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/80e226a5-f7e6-49d2-a64a-524940d498a5" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/4614269a-0d7f-4390-b4cc-568a09fa6a45" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/3352859e-5677-46dd-89d6-17c898b6f097" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/ca25b66c-c03f-4d7e-90e8-93bc12fafeb1" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/80db3a04-a9ad-486d-abf1-4b20f8370ff9" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/1573f2f2-dfe7-476f-ba44-55011c0f5d1b" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/adc6c1dd-57a9-49bb-a57d-521fd1208a76" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/f294b0d9-175a-47c7-854c-d4d750009812" + }, + { + "predicate": "uses_device_category", + "source": "https://brain-bbqs.org/id/b02aaf9f-0a7e-4759-b1ba-cb100a2d4eed" + } + ], + "dangling": [], + "degree": 19, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/d5dd8903-0114-4511-a4ec-446ae9f657a8", + "class": "DeviceManufacturer", + "label": "ANT Neuro", + "facts": { "external_url": [ - "https://simpler.grants.gov/opportunity/40ac94ea-e7b9-44af-9ae4-d3340c342757" + "https://www.ant-neuro.com/" ], - "fon": [ - "RFA-RM-27-014" + "homepage_url": [ + "https://www.ant-neuro.com/" ], "name": [ - "Validation Center for Precision Medicine with AI: Integrating Imaging with Multimodal Data (PRIMED-AI) (U54 Clinical Trials Not Allowed)" - ], - "posted_date": [ - "2026-06-30" - ], - "status": [ - "open" - ], - "url": [ - "https://simpler.grants.gov/opportunity/40ac94ea-e7b9-44af-9ae4-d3340c342757" + "ANT Neuro" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/ba876f06-02b2-4ca2-bbc0-2877890b6f6a" + } ], + "dangling": [], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/cf033709-106e-4288-a326-f7bb353ba0a4", - "class": "Investigator", - "label": "Abigayle Fogarty", + "id": "https://brain-bbqs.org/id/2911be71-0f8a-47d5-9b0b-df9c7e75ce2f", + "class": "DeviceManufacturer", + "label": "Avisoft Bioacoustics", "facts": { - "consortium_role": [ - "Research Staff (Scientist and others)" + "external_url": [ + "https://www.avisoft.com/" + ], + "homepage_url": [ + "https://www.avisoft.com/" ], "name": [ - "Abigayle Fogarty" + "Avisoft Bioacoustics" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" - } - ], + "out": [], "in": [ { - "predicate": "members", - "source": "https://brain-bbqs.org/id/dbdb11c4-5082-4c5f-b50b-0046aaa0f8d9" + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/0285843e-0628-489a-a676-27648d2350a7" } ], "dangling": [], - "degree": 3, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/4cd9c282-4677-471a-81c0-aa97d94a687e", - "class": "Investigator", - "label": "Adam Friedman", + "id": "https://brain-bbqs.org/id/3eaf894a-5a66-47be-b36f-ce28d5cd1e9c", + "class": "DeviceManufacturer", + "label": "Basler AG", "facts": { - "consortium_role": [ - "Research Staff (Scientist and others)" + "external_url": [ + "https://www.baslerweb.com/" + ], + "homepage_url": [ + "https://www.baslerweb.com/" ], "name": [ - "Adam Friedman" + "Basler AG" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - } - ], + "out": [], "in": [ { - "predicate": "members", - "source": "https://brain-bbqs.org/id/dbdb11c4-5082-4c5f-b50b-0046aaa0f8d9" + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/b26a04a7-e254-470c-9d43-1c618d60434e" } ], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/67f260ea-2946-4086-9111-c926fb4e6df7", - "class": "Investigator", - "label": "Adam Noah", + "id": "https://brain-bbqs.org/id/562743b9-2c34-4049-806b-10e28796fdba", + "class": "DeviceManufacturer", + "label": "Biomark, Inc.", "facts": { - "consortium_role": [ - "Co-Investigator, Research Staff (Scientist and others)" + "external_url": [ + "https://www.biomark.com/" ], - "name": [ - "Adam Noah" + "homepage_url": [ + "https://www.biomark.com/" ], - "orcid": [ - "https://orcid.org/0000-0001-9773-2790" + "name": [ + "Biomark, Inc." ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - } - ], + "out": [], "in": [ { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/173d4dd7-5a55-48f7-b5ee-e08bfe25ac71" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/5a9d5e58-b370-48ea-a189-a82e7c834708" } ], "dangling": [], - "degree": 3, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/1b3e8304-f2d6-4ed6-aa5c-7d49ca278344", - "class": "Investigator", - "label": "Aditya Bhise", + "id": "https://brain-bbqs.org/id/34971c92-6e5a-4231-8d74-3759c2301d8b", + "class": "DeviceManufacturer", + "label": "BIOPAC Systems, Inc.", "facts": { - "consortium_role": [ - "Clinical Research Coordinator" + "external_url": [ + "https://www.biopac.com/" ], - "name": [ - "Aditya Bhise" + "homepage_url": [ + "https://www.biopac.com/" ], - "orcid": [ - "https://orcid.org/0000-0002-9144-172X" + "name": [ + "BIOPAC Systems, Inc." ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" - } - ], + "out": [], "in": [ { - "predicate": "members", - "source": "https://brain-bbqs.org/id/f28a2f16-5259-4e2f-9c8e-a5d11d2b5c5f" + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/88b4baf0-8e42-43e8-a689-3f5cd46138ee" } ], "dangling": [], - "degree": 4, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/e6996650-b858-4ddb-b422-4fd92fdfaac4", - "class": "Investigator", - "label": "Agatha Lenartowicz", + "id": "https://brain-bbqs.org/id/31c5064c-5df0-4821-9ea7-d3807308ba18", + "class": "DeviceManufacturer", + "label": "Connected Future Labs", "facts": { - "consortium_role": [ - "Principal Investigator (PI)" + "external_url": [ + "https://www.emotibit.com/" ], - "name": [ - "Agatha Lenartowicz" + "homepage_url": [ + "https://www.emotibit.com/" ], - "orcid": [ - "https://orcid.org/0000-0001-8015-8251" - ], - "research_areas": [ - "ADHD", - "attention", - "education neuroscience", - "mobile EEG", - "multimodal neuroimaging", - "oscillations" - ], - "scholar_id": [ - "AWOkpNcAAAAJ" - ], - "skills": [ - "EEG", - "MRI", - "concurrent EEG-fMRI", - "multivariate analysis" + "name": [ + "Connected Future Labs" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - } - ], + "out": [], "in": [ { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/bd6b0699-938f-4117-94d2-97177837e94c" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/32f14ee1-e0b4-4753-869a-f630f1786682" + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/3b549548-0ca5-4c7e-91ba-a6a1ed51705e" } ], "dangling": [], - "degree": 3, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/88203e28-70c5-4730-af2d-93d7f09b4250", - "class": "Investigator", - "label": "Alessandra DallaVecchia", + "id": "https://brain-bbqs.org/id/e038c24f-a4b4-4b18-af2a-a8f0ae2a21c7", + "class": "DeviceManufacturer", + "label": "COSMED", "facts": { - "consortium_role": [ - "Postdoc/Grad Student" - ], - "name": [ - "Alessandra DallaVecchia" - ], - "orcid": [ - "https://orcid.org/0000-0002-4023-5141" + "external_url": [ + "https://www.cosmed.com/" ], - "research_areas": [ - "attention", - "neural dynamics" + "homepage_url": [ + "https://www.cosmed.com/" ], - "skills": [ - "EEG", - "dynamical systems", - "python" + "name": [ + "COSMED" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - } - ], + "out": [], "in": [ { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/63cd8c2a-0860-4130-857c-c33765b115d5" + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/700795ce-fd4c-49cc-b037-e9c244039e5e" } ], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/40f7a980-ec6a-4278-82f7-b7ea3601ce40", - "class": "Investigator", - "label": "Alex Cabral", + "id": "https://brain-bbqs.org/id/6b2192d5-d840-4f4b-be96-5cec4f2fe432", + "class": "DeviceManufacturer", + "label": "Delsys Inc.", "facts": { - "consortium_role": [ - "Postdoc/Grad Student" + "external_url": [ + "https://delsys.com/trigno/" + ], + "homepage_url": [ + "https://delsys.com/trigno/" ], "name": [ - "Alex Cabral" + "Delsys Inc." ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" - }, + "out": [], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/a991c266-2e08-46e8-b579-8d10341fc344" } ], - "in": [], "dangling": [], - "degree": 3, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/f2372c9c-91ac-449f-8ae8-182327e93a85", - "class": "Investigator", - "label": "Alex Williams", + "id": "https://brain-bbqs.org/id/0f782852-6d9e-4d3b-8c38-6e0573400461", + "class": "DeviceManufacturer", + "label": "Empatica Inc.", "facts": { - "consortium_role": [ - "Principal Investigator (PI)" + "external_url": [ + "https://www.empatica.com/embraceplus/" ], - "name": [ - "Alex Williams" + "homepage_url": [ + "https://www.empatica.com/embraceplus/" ], - "orcid": [ - "https://orcid.org/0000-0001-5853-103X" + "name": [ + "Empatica Inc." ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - } - ], + "out": [], "in": [ { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/bf0e6573-c228-4923-badd-e3667105e287" - }, - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/f0b8e0cd-ac28-4f72-8410-be9b81689d08" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/5b794afd-cf08-4107-81c8-522a29714830" + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/8d1248d6-6ad4-449a-b268-69c17fb8e0bd" } ], "dangling": [], - "degree": 4, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/3d7564b9-e839-4737-874a-2e3b5319e11a", - "class": "Investigator", - "label": "Alik S. Widge", + "id": "https://brain-bbqs.org/id/1a3ec6ab-3abd-4da5-b938-e9818c52b95a", + "class": "DeviceManufacturer", + "label": "Garmin Ltd.", "facts": { - "consortium_role": [ - "Principal Investigator (PI)" - ], "external_url": [ - "https://reporter.nih.gov/search/results?pi_id=6998694" + "https://www.garmin.com/" ], - "name": [ - "Alik S. Widge" + "homepage_url": [ + "https://www.garmin.com/" ], - "orcid": [ - "https://orcid.org/0000-0002-1160-1503" + "name": [ + "Garmin Ltd." ] }, "out": [], "in": [ { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/f25003fd-234f-453b-9bc8-238213a55269" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/9f75488b-59d0-4d50-b7db-869f26066743" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/7848212f-5c1c-4170-bdad-44cc3273d0f1" + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/130afdbe-9128-4afb-a7cd-f27967d52a7a" } ], "dangling": [], - "degree": 3, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/0410e3c0-a5b5-4f3f-a0e0-2dc7e71c2d18", - "class": "Investigator", - "label": "Alireza Kazemi", + "id": "https://brain-bbqs.org/id/56efc35e-a021-483f-b2b1-1dae1f893d18", + "class": "DeviceManufacturer", + "label": "GoPro, Inc.", "facts": { - "consortium_role": [ - "Postdoc/Grad Student" + "external_url": [ + "https://gopro.com/" ], - "name": [ - "Alireza Kazemi" + "homepage_url": [ + "https://gopro.com/" ], - "orcid": [ - "https://orcid.org/0000-0001-8944-1459" + "name": [ + "GoPro, Inc." ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" - } - ], + "out": [], "in": [ { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/d64865d3-893f-4968-bcba-e3b33a6a4f1b" + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/7eb373e9-092d-418d-b3ff-4f7d8e4fb939" } ], "dangling": [], - "degree": 3, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/0da76ce9-654a-4940-a9c6-d0785167ebad", - "class": "Investigator", - "label": "Amelia Johnson", + "id": "https://brain-bbqs.org/id/9bd0353c-a176-48d7-9f2c-59375ae7819b", + "class": "DeviceManufacturer", + "label": "IMEC (distributed via Neuropixels consortium)", "facts": { - "consortium_role": [ - "research assistant" + "external_url": [ + "https://www.neuropixels.org/" + ], + "homepage_url": [ + "https://www.neuropixels.org/" ], "name": [ - "Amelia Johnson" + "IMEC (distributed via Neuropixels consortium)" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - } - ], + "out": [], "in": [ { - "predicate": "members", - "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/d3a36c76-22a9-4762-8ce6-a53725475669" } ], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/e8c0da8f-2dbb-442f-9831-4271dda9dda9", - "class": "Investigator", - "label": "Amrita Nair", + "id": "https://brain-bbqs.org/id/9e769c4e-0958-4ccc-bb96-d714734fa461", + "class": "DeviceManufacturer", + "label": "mBrainTrain", "facts": { - "consortium_role": [ - "Research Staff (Scientist and others)" + "external_url": [ + "https://mbraintrain.com/" ], - "name": [ - "Amrita Nair" + "homepage_url": [ + "https://mbraintrain.com/" + ], + "name": [ + "mBrainTrain" ] }, "out": [], "in": [ { - "predicate": "members", - "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/66955dda-ed5c-4e05-bfbb-5f9f203af4dd" } ], "dangling": [], @@ -7672,1130 +8441,1250 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/1ee83670-fadd-4744-91bd-17ca61944822", - "class": "Investigator", - "label": "Andrew MacAskill", + "id": "https://brain-bbqs.org/id/765fd145-afc8-4101-92d5-33aff8c04fac", + "class": "DeviceManufacturer", + "label": "Med Associates Inc.", "facts": { - "consortium_role": [ - "Co-Investigator" + "external_url": [ + "https://www.med-associates.com/" ], - "name": [ - "Andrew MacAskill" + "homepage_url": [ + "https://www.med-associates.com/" ], - "orcid": [ - "https://orcid.org/0000-0002-0196-3779" + "name": [ + "Med Associates Inc." ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/790607e8-4030-4e55-83fb-8df121fbb7b7" + } ], + "dangling": [], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/58c31e98-4899-43df-a516-2ee6781b289e", - "class": "Investigator", - "label": "Anibal Heinsfeld", + "id": "https://brain-bbqs.org/id/ab859681-c7fc-40cf-8d61-51035f1d8605", + "class": "DeviceManufacturer", + "label": "Medtronic plc", "facts": { + "external_url": [ + "https://www.medtronic.com/" + ], + "homepage_url": [ + "https://www.medtronic.com/" + ], "name": [ - "Anibal Heinsfeld" + "Medtronic plc" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/773ddab2-ad45-41ac-8003-b80935d30c32" + } ], + "dangling": [], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/b1b421fc-5477-4c2f-8968-ab757344ab2d", - "class": "Investigator", - "label": "Anirvan Nandy", + "id": "https://brain-bbqs.org/id/8482b347-2401-49bb-99c6-19a26be255c7", + "class": "DeviceManufacturer", + "label": "miniDSP", "facts": { - "consortium_role": [ - "Principal Investigator (PI)" + "external_url": [ + "https://www.minidsp.com/products/usb-audio-interface/uma-16" ], - "name": [ - "Anirvan Nandy" + "homepage_url": [ + "https://www.minidsp.com/products/usb-audio-interface/uma-16" ], - "orcid": [ - "https://orcid.org/0000-0002-4225-5349" + "name": [ + "miniDSP" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" - } - ], + "out": [], "in": [ { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/c3efc4fa-34d8-4630-93b5-7dd34f4e03cd" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/4d59ea78-e15f-4f78-92d4-28f4041b297f" } ], "dangling": [], - "degree": 3, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/85a49b85-44ff-4f85-a110-c3860bfe6747", - "class": "Investigator", - "label": "Annette Estes", + "id": "https://brain-bbqs.org/id/d74d8fe3-4c71-481b-8a54-410c4e3574a9", + "class": "DeviceManufacturer", + "label": "Motek Medical", "facts": { - "consortium_role": [ - "Co-Investigator" + "external_url": [ + "https://www.motekmedical.com/solution/caren/" ], - "name": [ - "Annette Estes" + "homepage_url": [ + "https://www.motekmedical.com/solution/caren/" ], - "orcid": [ - "https://orcid.org/0000-0003-2687-4155" + "name": [ + "Motek Medical" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/a9da991f-1bcd-4b6c-ab45-e67af7d3b755" + } ], + "dangling": [], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/4f18ae48-4099-486d-8e89-1a8a736e59e4", - "class": "Investigator", - "label": "anqi wu", + "id": "https://brain-bbqs.org/id/247cc4da-1133-4307-97c9-8238c723dc67", + "class": "DeviceManufacturer", + "label": "Movella (formerly Xsens)", "facts": { - "consortium_role": [ - "Co-Investigator" + "external_url": [ + "https://www.movella.com/products/motion-capture" + ], + "homepage_url": [ + "https://www.movella.com/products/motion-capture" ], "name": [ - "anqi wu" + "Movella (formerly Xsens)" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - } - ], + "out": [], "in": [ { - "predicate": "members", - "source": "https://brain-bbqs.org/id/92f22292-007f-4091-83e9-10df11f14110" + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/a25d5bdb-97ea-4995-a9aa-fcb6059fcb1f" } ], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/7745a449-07ce-4762-988e-e355a72b0775", - "class": "Investigator", - "label": "Arina Knowlton", + "id": "https://brain-bbqs.org/id/560d0a58-2a10-439c-b397-4eecb30a2388", + "class": "DeviceManufacturer", + "label": "NaturalPoint, Inc.", "facts": { - "consortium_role": [ - "NIH Program" + "external_url": [ + "https://optitrack.com/" + ], + "homepage_url": [ + "https://optitrack.com/" ], "name": [ - "Arina Knowlton" + "NaturalPoint, Inc." ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/dda87113-f453-47bd-8c34-14855db21e4a" + } ], + "dangling": [], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/9a233497-f3cd-4888-b5b6-a83630e5f1ee", - "class": "Investigator", - "label": "Arish Alreja", + "id": "https://brain-bbqs.org/id/90716be1-d61b-4641-ba7e-da9533d0dbeb", + "class": "DeviceManufacturer", + "label": "Natus Medical Incorporated", "facts": { - "name": [ - "Arish Alreja" + "external_url": [ + "https://natus.com/" ], - "orcid": [ - "https://orcid.org/0000-0003-0173-376X" + "homepage_url": [ + "https://natus.com/" ], - "scholar_id": [ - "7oTeTawAAAAJ" + "name": [ + "Natus Medical Incorporated" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" - } - ], + "out": [], "in": [ { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/6344ea60-1fad-4b96-ac49-43e00f2acf04" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/e46a4832-3f63-49d7-acad-8567ed641589" + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/a36c70d6-19a8-40b6-a8a1-7aaea7e5b918" } ], "dangling": [], - "degree": 4, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/9eb4af78-4485-4c7b-9179-76d079bde109", - "class": "Investigator", - "label": "Ashlee Van't Veer", + "id": "https://brain-bbqs.org/id/bc8054b3-253f-4b13-a281-841deb7598e8", + "class": "DeviceManufacturer", + "label": "NeuroPace, Inc.", "facts": { - "consortium_role": [ - "NIH program staff" + "external_url": [ + "https://www.neuropace.com/" + ], + "homepage_url": [ + "https://www.neuropace.com/" ], "name": [ - "Ashlee Van't Veer" + "NeuroPace, Inc." ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/f8ca9029-6e50-43a2-802d-e61784795036" + } ], - "violations": [] - }, + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, { - "id": "https://brain-bbqs.org/id/1b49aee4-301e-46c9-b22d-209481f68437", - "class": "Investigator", - "label": "Ashley Feinsinger", + "id": "https://brain-bbqs.org/id/188ce5e2-0a5f-4c69-a9ec-bf7b8b1ebbc4", + "class": "DeviceManufacturer", + "label": "OBSBOT (Remo Tech)", "facts": { - "consortium_role": [ - "Co-Investigator" + "external_url": [ + "https://www.obsbot.com/" ], - "name": [ - "Ashley Feinsinger" + "homepage_url": [ + "https://www.obsbot.com/" ], - "orcid": [ - "https://orcid.org/0000-0002-0251-8810" + "name": [ + "OBSBOT (Remo Tech)" ] }, - "out": [ + "out": [], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/b91a5db1-9e21-4158-a14f-087f59f5bd8d" } ], - "in": [], "dangling": [], "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/dc09061c-41ce-4e6e-bfe9-5e4805b4356c", - "class": "Investigator", - "label": "Avniel Ghuman", + "id": "https://brain-bbqs.org/id/2367da64-4eae-4655-a4dc-315ad12e3398", + "class": "DeviceManufacturer", + "label": "Open Ephys", "facts": { - "consortium_role": [ - "Principal Investigator (PI)" + "external_url": [ + "https://open-ephys.org/" + ], + "homepage_url": [ + "https://open-ephys.org/" ], "name": [ - "Avniel Ghuman" + "Open Ephys" ] }, "out": [], "in": [ { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/29154919-0da2-4db6-a005-c5cf8451746d" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/e46a4832-3f63-49d7-acad-8567ed641589" + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/47974228-8745-4b67-8857-4450426743a7" } ], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/69f09b42-78f2-40f7-83d4-774738a4c974", - "class": "Investigator", - "label": "AVNIEL S GHUMAN", + "id": "https://brain-bbqs.org/id/c42dadeb-bf3c-44fa-baff-92adea2e0185", + "class": "DeviceManufacturer", + "label": "Pearson", "facts": { "name": [ - "AVNIEL S GHUMAN" + "Pearson" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/9fb13eb4-a3bc-483a-9969-f3908d13143d", - "class": "Investigator", - "label": "Aydin Tasevac", - "facts": { - "consortium_role": [ - "Postdoc/Grad Student" - ], - "name": [ - "Aydin Tasevac" - ] - }, - "out": [ + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/2538b9fd-01c4-453f-a20b-e7351cfa8c21" }, { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/6c4c36dd-6d17-47d9-8bff-c1cde1750dc7" } ], - "in": [], "dangling": [], "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/41e042c3-81ad-486b-b933-bf77fcefd4f5", - "class": "Investigator", - "label": "Bartul Mimica", + "id": "https://brain-bbqs.org/id/9b910269-1934-4f7b-a4f7-9f375f401d8d", + "class": "DeviceManufacturer", + "label": "Pupil Labs GmbH", "facts": { - "consortium_role": [ - "Postdoc/Grad Student" + "external_url": [ + "https://pupil-labs.com/" ], - "name": [ - "Bartul Mimica" + "homepage_url": [ + "https://pupil-labs.com/" ], - "orcid": [ - "https://orcid.org/0000-0001-6404-0560" + "name": [ + "Pupil Labs GmbH" ] }, - "out": [ + "out": [], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/ab492763-6805-4afd-bf3f-28eec5276d6d" } ], - "in": [], "dangling": [], "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/c3604b73-537c-411b-b963-cd8df608f086", - "class": "Investigator", - "label": "Bence P Olveczky", + "id": "https://brain-bbqs.org/id/615d81a2-ce1b-4d1e-8f17-30d97dddb2a0", + "class": "DeviceManufacturer", + "label": "Shimmer Research", "facts": { - "consortium_role": [ - "Principal Investigator (PI)" - ], "external_url": [ - "https://reporter.nih.gov/search/results?pi_id=9361217" - ], - "name": [ - "Bence P Olveczky" + "https://shimmersensing.com/" ], - "orcid": [ - "https://orcid.org/0000-0003-0208-5793" + "homepage_url": [ + "https://shimmersensing.com/" ], - "skills": [ - "Behavioral neuroscience" + "name": [ + "Shimmer Research" ] }, "out": [], "in": [ { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/82abd87d-c378-4049-8c84-4eede3066410" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/93fa0810-51f4-4e71-badf-e5e8d3e40dc3" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/99bc7f7b-2a3d-4e34-99f1-ec08e12133b2" + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/342800f7-b7b5-4b7e-9f41-d528b68d3c3d" } ], "dangling": [], - "degree": 3, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/164c219c-6bc5-4975-8815-2c2e0dd2f8a1", - "class": "Investigator", - "label": "Bijan Pesaran", + "id": "https://brain-bbqs.org/id/541eb3ec-855c-427e-9d9d-816b3845b9cf", + "class": "DeviceManufacturer", + "label": "Stoelting", "facts": { "name": [ - "Bijan Pesaran" + "Stoelting" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/429c73a9-8440-4f1f-a2f7-a8a1b75958a7" + } ], + "dangling": [], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/4626de5c-667e-4f70-be3e-44dffde3887b", - "class": "Investigator", - "label": "Bijan Pesaran", + "id": "https://brain-bbqs.org/id/d68a81db-70f9-4ea5-95af-3f1f83a46771", + "class": "DeviceManufacturer", + "label": "Teledyne FLIR", "facts": { - "consortium_role": [ - "Principal Investigator (PI)" - ], - "name": [ - "Bijan Pesaran" - ], - "orcid": [ - "https://orcid.org/0000-0002-8380-4043" + "external_url": [ + "https://www.flir.com/" ], - "research_areas": [ - "Neural engineering", - "neuroscience" + "homepage_url": [ + "https://www.flir.com/" ], - "scholar_id": [ - "fKsY32YAAAAJ&hl" + "name": [ + "Teledyne FLIR" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" - } - ], + "out": [], "in": [ { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/86c8c08c-3aa2-4ef9-a9a0-a7158781799b" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad" + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/fbbd19db-7e98-42cd-a230-510ddff40cef" } ], "dangling": [], - "degree": 4, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/ace580b9-6f04-457f-aac0-3ac3a7243e3b", - "class": "Investigator", - "label": "Brandon Brooks-Patton", + "id": "https://brain-bbqs.org/id/79786801-1f05-4281-b4c3-9180854ee278", + "class": "DeviceManufacturer", + "label": "Tobii AB", "facts": { - "consortium_role": [ - "Postdoc/Grad Student" + "external_url": [ + "https://www.tobii.com/products/eye-trackers" + ], + "homepage_url": [ + "https://www.tobii.com/products/eye-trackers" ], "name": [ - "Brandon Brooks-Patton" + "Tobii AB" ] }, "out": [], "in": [ { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/82015065-d290-4efc-982b-75d67daa4d00" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/ce24eb59-9276-4e28-9d93-342515a4e970" } ], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/8c977c24-da2f-4866-b860-b71aa2540bd4", - "class": "Investigator", - "label": "Brendan Ito", + "id": "https://brain-bbqs.org/id/a7b15b50-1f35-4e02-91d5-c28593457e3d", + "class": "DeviceManufacturer", + "label": "Western Psychological Services", "facts": { - "consortium_role": [ - "Postdoc/Grad Student" - ], "name": [ - "Brendan Ito" + "Western Psychological Services" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + "out": [], + "in": [ + { + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/4dc711e8-2a6e-458e-88cb-a5dcd9b8336e" }, { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/85dba242-244b-4a63-b463-b9e6bf4d29e1" + }, + { + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/f77c0d96-5deb-4d90-bc8e-7acb14863595" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/2febecec-70dd-4db0-8bed-2060a1d13b5e", - "class": "Investigator", - "label": "Brent Kious", + "id": "https://brain-bbqs.org/id/58e396e9-0430-4678-ab24-382bba814d8b", + "class": "DeviceManufacturer", + "label": "White Matter LLC", "facts": { - "consortium_role": [ - "Co-Investigator" + "external_url": [ + "https://white-matter.com/" + ], + "homepage_url": [ + "https://white-matter.com/" ], "name": [ - "Brent Kious" + "White Matter LLC" ] }, - "out": [ + "out": [], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/55e0ecb2-5960-47a0-9fb6-6c2162bfe182" } ], - "in": [], "dangling": [], "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/5bb15430-32e5-457f-b6ce-e4f3790687fa", - "class": "Investigator", - "label": "Brett E Youngerman", + "id": "https://brain-bbqs.org/id/ddff023c-f84e-41b2-aa9e-1e8ee0d743fd", + "class": "DeviceManufacturer", + "label": "Wildlife Acoustics, Inc.", "facts": { - "consortium_role": [ - "Principal Investigator (PI)" - ], "external_url": [ - "https://reporter.nih.gov/search/results?pi_id=16101509" + "https://www.wildlifeacoustics.com/" ], - "name": [ - "Brett E Youngerman" + "homepage_url": [ + "https://www.wildlifeacoustics.com/" ], - "orcid": [ - "https://orcid.org/0000-0001-8264-0476" + "name": [ + "Wildlife Acoustics, Inc." ] }, "out": [], "in": [ { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/a617a421-6fe5-4f66-9c63-ce24bbea02eb" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/9f75488b-59d0-4d50-b7db-869f26066743" + "predicate": "manufacturer", + "source": "https://brain-bbqs.org/id/16f63350-9197-4e16-8a8c-0f67b2da18df" } ], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/5835b3d1-bdaf-4f30-a9e7-cf70d1861b61", - "class": "Investigator", - "label": "Brian Gitahi", + "id": "https://brain-bbqs.org/id/eac8b2aa-4353-4d9a-af21-601294a8ef4a", + "class": "Event", + "label": "BBQS MIT Workshop 2026", "facts": { - "consortium_role": [ - "Postdoc/Grad Student" + "description": [ + "Annual BBQS consortium workshop, MIT, Cambridge MA" ], "name": [ - "Brian Gitahi" + "BBQS MIT Workshop 2026" ] }, "out": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - } - ], - "in": [ - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/766331fd-daea-4a31-86c4-589737e533ea" } ], + "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/4d8bb1b1-0cd6-4ca6-a5f7-7b0bc3ba537d", - "class": "Investigator", - "label": "Brian Leonard", + "id": "https://brain-bbqs.org/id/67d25d9e-afa4-4571-aa3c-3c0d4aee3388", + "class": "FundingOpportunity", + "label": "BRAIN Initiative: Data Knowledgebase Ecosystem and NeuroAI Integration (NIH Highlighted Topic)", "facts": { + "activity_code": [ + "R01/R21" + ], + "description": [ + "NIH Highlighted Topic encouraging research that advances the BRAIN Initiative data knowledgebase ecosystem and its integration with NeuroAI. No dedicated NOFO — apply through an appropriate NIH parent announcement or other broad opportunity." + ], + "expiration_date": [ + "2027-09-29" + ], + "external_url": [ + "https://grants.nih.gov/funding/find-a-fit-for-your-research/highlighted-topics/18" + ], + "fon": [ + "NOT-MH-25-155" + ], "name": [ - "Brian Leonard" + "BRAIN Initiative: Data Knowledgebase Ecosystem and NeuroAI Integration (NIH Highlighted Topic)" + ], + "posted_date": [ + "2026-02-24" + ], + "status": [ + "open" + ], + "url": [ + "https://grants.nih.gov/funding/find-a-fit-for-your-research/highlighted-topics/18" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "members", - "source": "https://brain-bbqs.org/id/7924e7d9-5b53-4525-95ef-3f5a6b9112a5" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/28609b98-6f97-4a46-b875-9f5084f1c7cd" } ], + "in": [], "dangling": [], "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/d2f77d44-3a20-4759-be29-69403ae039ef", - "class": "Investigator", - "label": "Brock Wester", + "id": "https://brain-bbqs.org/id/9fe36a51-d470-42f8-baa1-0c7aa68a9dea", + "class": "FundingOpportunity", + "label": "BRAIN Initiative: Integrative Team-Research BRAIN Circuits Program - iBCP (RM1 Clinical Trial Not Allowed)", "facts": { - "consortium_role": [ - "Principal Investigator (PI)" + "activity_code": [ + "RM1" + ], + "description": [ + "Solicits teams of 3-6 PDs/PIs to understand how the nervous system gives rise to mental experience and behavior, integrating circuit, in vivo recordings, and behavioral analyses." + ], + "expiration_date": [ + "2028-06-24" + ], + "external_url": [ + "https://simpler.grants.gov/opportunity/ffe98704-96a8-4f41-a32b-49edd0409006" + ], + "fon": [ + "RFA-NS-27-002" ], "name": [ - "Brock Wester" + "BRAIN Initiative: Integrative Team-Research BRAIN Circuits Program - iBCP (RM1 Clinical Trial Not Allowed)" ], - "orcid": [ - "https://orcid.org/0000-0002-1500-2143" + "open_date": [ + "2026-09-07" + ], + "posted_date": [ + "2026-08-31" + ], + "status": [ + "open" + ], + "url": [ + "https://simpler.grants.gov/opportunity/ffe98704-96a8-4f41-a32b-49edd0409006" ] }, "out": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" - } - ], - "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/3d109ffa-adb1-4a1e-b2fd-5f516280d7f7" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/315a0694-ce8d-4010-abca-5438e5f6b560" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/69aa906c-2a0c-4524-8958-4e1009f96060" } ], + "in": [], "dangling": [], - "degree": 4, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/09865181-38c6-44d9-aba4-68e373f0286d", - "class": "Investigator", - "label": "Caleb Kemere", + "id": "https://brain-bbqs.org/id/3fb868da-b941-439e-a81e-927a543defd3", + "class": "FundingOpportunity", + "label": "BRAIN Initiative: New Technologies and Novel Approaches for Recording and Modulation in the Nervous System (R01 Clinical Trial Not Allowed)", "facts": { - "consortium_role": [ - "Principal Investigator (PI)" + "activity_code": [ + "R01" + ], + "description": [ + "Supports proof-of-concept testing and development of new technologies and novel approaches for recording and modulation of neural cells and circuits, addressing major challenges in central nervous system research." + ], + "expiration_date": [ + "2026-06-16" + ], + "external_url": [ + "https://grants.nih.gov/grants/guide/rfa-files/RFA-NS-25-018.html" + ], + "fon": [ + "RFA-NS-25-018" ], "name": [ - "Caleb Kemere" + "BRAIN Initiative: New Technologies and Novel Approaches for Recording and Modulation in the Nervous System (R01 Clinical Trial Not Allowed)" ], - "orcid": [ - "https://orcid.org/0000-0003-2054-0234" + "open_date": [ + "2025-05-02" + ], + "posted_date": [ + "2024-09-24" + ], + "status": [ + "closed" + ], + "url": [ + "https://grants.nih.gov/grants/guide/rfa-files/RFA-NS-25-018.html" ] }, "out": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" - } - ], - "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/c33f2bff-071b-4550-9ea5-d3fd11e0ed0c" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/6a224a59-b37c-40b2-a4ef-f43393d94357" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/69aa906c-2a0c-4524-8958-4e1009f96060" } ], + "in": [], "dangling": [], - "degree": 4, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/623a564c-f5bf-4d95-a233-027850148145", - "class": "Investigator", - "label": "Caleb Scott-Joseph", + "id": "https://brain-bbqs.org/id/07448ab8-2717-4b6e-83e0-9abf492240e5", + "class": "FundingOpportunity", + "label": "BRAIN Initiative: Promoting Health for All Through BRAIN Technology Partnerships", "facts": { - "consortium_role": [ - "Postdoc/Grad Student" - ], + "activity_code": [ + "R34" + ], + "description": [ + "This NOFO is intended for investigators at resource-limited institutions to adopt and integrate BRAIN Initiative resources into their research. Supports two-way knowledge transfer between PI and BRAIN disseminator." + ], + "eligible_activity_codes": [ + "R34" + ], + "expiration_date": [ + "2026-06-18" + ], + "external_url": [ + "https://grants.nih.gov/grants/guide/rfa-files/RFA-NS-25-016.html" + ], + "fon": [ + "RFA-NS-25-016" + ], "name": [ - "Caleb Scott-Joseph" + "BRAIN Initiative: Promoting Health for All Through BRAIN Technology Partnerships" + ], + "open_date": [ + "2025-05-17" + ], + "opportunity_type": [ + "New" + ], + "posted_date": [ + "2024-11-22" + ], + "status": [ + "closed" + ], + "url": [ + "https://grants.nih.gov/grants/guide/rfa-files/RFA-NS-25-016.html" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "members", - "source": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/69aa906c-2a0c-4524-8958-4e1009f96060" } ], + "in": [], "dangling": [], "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/3516554a-8253-4773-af22-a89b3ccb3267", - "class": "Investigator", - "label": "Casey Harrison Halpern", + "id": "https://brain-bbqs.org/id/912f67fc-5862-47a2-b6f4-891fcd98f244", + "class": "FundingOpportunity", + "label": "BRAIN Initiative: Research Resource Grants for Technology Integration and Dissemination (U24 Clinical Trial Not Allowed)", "facts": { - "consortium_role": [ - "Principal Investigator (PI)" + "activity_code": [ + "U24" + ], + "description": [ + "Accelerates the scientific impact of the BRAIN Initiative by supporting rapid, broad dissemination of validated technologies and resources to the neuroscience community — reagent distribution, user training, access to technology platforms and specialized facilities, and minor improvements to scale delivery." + ], + "expiration_date": [ + "2028-10-07" + ], + "external_url": [ + "https://simpler.grants.gov/opportunity/92fe438d-91dc-4ce2-9a45-edc615c4d0b6" + ], + "fon": [ + "RFA-NS-27-001" ], "name": [ - "Casey Harrison Halpern" + "BRAIN Initiative: Research Resource Grants for Technology Integration and Dissemination (U24 Clinical Trial Not Allowed)" + ], + "open_date": [ + "2026-05-10" + ], + "posted_date": [ + "2026-02-09" + ], + "status": [ + "open" + ], + "url": [ + "https://simpler.grants.gov/opportunity/92fe438d-91dc-4ce2-9a45-edc615c4d0b6" ] }, - "out": [], - "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/da20601e-5e20-41cc-a57b-63e66c143df4" - }, + "out": [ { - "predicate": "members", - "source": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/69aa906c-2a0c-4524-8958-4e1009f96060" } ], + "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/e7f5f7e5-8074-41a9-b866-bfd7112d37c2", - "class": "Investigator", - "label": "Chaoyi Zhang", + "id": "https://brain-bbqs.org/id/d3423658-1147-421f-a6f8-f31067133351", + "class": "FundingOpportunity", + "label": "BRAIN Initiative: Theories, Models and Methods for Analysis of Complex Data from the Brain (R01 Clinical Trial Not Allowed)", "facts": { + "activity_code": [ + "R01" + ], + "description": [ + "Supports development of innovative theories, models, and methods as analytical tools to advance a quantitative and predictive understanding of brain function across multiple scales, with priority on novel capabilities for analyzing complex BRAIN Initiative datasets (physiological, anatomical, connectivity, and behavioral)." + ], + "expiration_date": [ + "2027-11-09" + ], + "external_url": [ + "https://grants.nih.gov/grants/guide/rfa-files/RFA-DA-27-004.html" + ], + "fon": [ + "RFA-DA-27-004" + ], "name": [ - "Chaoyi Zhang" + "BRAIN Initiative: Theories, Models and Methods for Analysis of Complex Data from the Brain (R01 Clinical Trial Not Allowed)" + ], + "open_date": [ + "2025-09-28" + ], + "posted_date": [ + "2025-09-16" + ], + "status": [ + "open" + ], + "url": [ + "https://grants.nih.gov/grants/guide/rfa-files/RFA-DA-27-004.html" ] }, - "out": [], + "out": [ + { + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/32f761ce-6857-451c-9eb7-fc5b8b221449" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/3cae416f-5424-49c3-b7c4-aedb7c53303f", - "class": "Investigator", - "label": "Charles B Mikell", + "id": "https://brain-bbqs.org/id/8b9d5dda-2b99-4e1c-ba27-968f74ef8b77", + "class": "FundingOpportunity", + "label": "Development and Testing of a Multi-use Frameworks Playbook for Precision Medicine with AI: Integrating Imaging with Multimodal Data (PRIMED-AI) (U01 Clinical Trial Not Allowed)", "facts": { + "activity_code": [ + "U01" + ], + "description": [ + "Develops and tests a \"playbook\" of standardized frameworks and protocols for building reliable, deployable multimodal AI clinical decision support tools that integrate clinical imaging with other health data. 5 awards anticipated, $2M total." + ], + "expiration_date": [ + "2026-10-10" + ], + "external_url": [ + "https://simpler.grants.gov/opportunity/5b0a5980-5b84-4cdf-9370-2a36c301760b" + ], + "fon": [ + "RFA-RM-27-011" + ], "name": [ - "Charles B Mikell" + "Development and Testing of a Multi-use Frameworks Playbook for Precision Medicine with AI: Integrating Imaging with Multimodal Data (PRIMED-AI) (U01 Clinical Trial Not Allowed)" + ], + "posted_date": [ + "2026-06-30" + ], + "status": [ + "closed" + ], + "url": [ + "https://simpler.grants.gov/opportunity/5b0a5980-5b84-4cdf-9370-2a36c301760b" ] }, - "out": [], + "out": [ + { + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/2548a017-fd14-4934-9762-b30d7071821a" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/c6056429-1e03-4506-8484-5be9acff8170", - "class": "Investigator", - "label": "Charles Mikell", + "id": "https://brain-bbqs.org/id/b76af5cd-30c7-4f75-a127-d4e8a669cdd6", + "class": "FundingOpportunity", + "label": "Logistics Center for Precision Medicine with AI: Integrating Imaging with Multimodal Data (PRIMED-AI) (U24)", "facts": { - "consortium_role": [ - "Principal Investigator (PI)" + "activity_code": [ + "U24" + ], + "description": [ + "Coordination and support center for the PRIMED-AI Program, operating administration, evaluation, and outreach cores that collect, organize, and disseminate information about tools created across the consortium. 1 award, $575K–$750K." + ], + "external_url": [ + "https://simpler.grants.gov/opportunity/a975ac4b-ca02-4d2b-8dcd-c75493f04087" + ], + "fon": [ + "RFA-RM-27-015" ], "name": [ - "Charles Mikell" + "Logistics Center for Precision Medicine with AI: Integrating Imaging with Multimodal Data (PRIMED-AI) (U24)" ], - "orcid": [ - "https://orcid.org/0000-0002-0701-2325" + "posted_date": [ + "2026-06-30" + ], + "status": [ + "open" + ], + "url": [ + "https://simpler.grants.gov/opportunity/a975ac4b-ca02-4d2b-8dcd-c75493f04087" ] }, "out": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - } - ], - "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/1711154b-0f87-42e9-8cf6-c1316bdf48a5" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/c04b3bcd-d1db-4b3c-9dc6-a4c97039cad6" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/2548a017-fd14-4934-9762-b30d7071821a" } ], + "in": [], "dangling": [], - "degree": 3, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/f34a38e7-364a-4091-8436-a8c52b684cc2", - "class": "Investigator", - "label": "Cheryl Corcoran", + "id": "https://brain-bbqs.org/id/ac01b838-9803-4a39-8adf-6b9ac9883535", + "class": "FundingOpportunity", + "label": "Model-to-Clinic (M2C) for Precision Medicine with AI: Integrating Imaging with Multimodal Data (PRIMED-AI) (UG3/UH3 Clinical Trial Optional)", "facts": { - "consortium_role": [ - "Principal Investigator (PI)" + "activity_code": [ + "UG3/UH3" + ], + "description": [ + "Catalyzes translation of AI-enabled, image-centered multimodal clinical decision support tools from prototype training and testing toward real-world clinical application. 8 awards anticipated." + ], + "expiration_date": [ + "2026-10-20" + ], + "external_url": [ + "https://simpler.grants.gov/opportunity/360c4588-1512-4fa4-9b61-52a3f1d6c368" + ], + "fon": [ + "RFA-RM-27-013" ], "name": [ - "Cheryl Corcoran" - ] - }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" - } - ], - "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/3027bce5-12b7-4205-9873-9cc8efbed2c0" - }, + "Model-to-Clinic (M2C) for Precision Medicine with AI: Integrating Imaging with Multimodal Data (PRIMED-AI) (UG3/UH3 Clinical Trial Optional)" + ], + "posted_date": [ + "2026-06-30" + ], + "status": [ + "closed" + ], + "url": [ + "https://simpler.grants.gov/opportunity/360c4588-1512-4fa4-9b61-52a3f1d6c368" + ] + }, + "out": [ { - "predicate": "members", - "source": "https://brain-bbqs.org/id/dbdb11c4-5082-4c5f-b50b-0046aaa0f8d9" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/2548a017-fd14-4934-9762-b30d7071821a" } ], + "in": [], "dangling": [], - "degree": 6, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/71d734ad-e355-473d-aaf7-577be85186d5", - "class": "Investigator", - "label": "Christina Hatch", + "id": "https://brain-bbqs.org/id/a8990457-e9da-49eb-9a0c-5b2af1a4ca61", + "class": "FundingOpportunity", + "label": "NSF Graduate Research Fellowship Program (GRFP)", "facts": { - "consortium_role": [ - "NIH program staff" + "activity_code": [ + "Fellowship" + ], + "expiration_date": [ + "2026-10-23" + ], + "external_url": [ + "https://www.nsf.gov/funding/opportunities/grfp-nsf-graduate-research-fellowship-program/nsf26-526/solicitation" + ], + "fon": [ + "NSF 26-526" ], "name": [ - "Christina Hatch" + "NSF Graduate Research Fellowship Program (GRFP)" + ], + "posted_date": [ + "2026-08-25" + ], + "status": [ + "closed" + ], + "url": [ + "https://www.nsf.gov/funding/opportunities/grfp-nsf-graduate-research-fellowship-program/nsf26-526/solicitation" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "members", - "source": "https://brain-bbqs.org/id/208980e9-92b9-447e-a2ca-e83bf61db159" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/62826284-8258-4f21-af3e-64fc755ef2b2" } ], + "in": [], "dangling": [], "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/8f429fce-6c38-4707-bd9c-30fd796e9137", - "class": "Investigator", - "label": "Christina Liu", + "id": "https://brain-bbqs.org/id/09e37e7e-a6a7-409a-b532-9f000647f007", + "class": "FundingOpportunity", + "label": "PRIMED-AI: Data-to-Model Academic-Industrial Partnerships (D2M-AIP) for Precision Medicine with AI: Integrating Imaging with Multimodal Data (UG3/UH3 Clinical Trial Optional)", "facts": { - "consortium_role": [ - "NIH program staff" + "activity_code": [ + "UG3/UH3" + ], + "description": [ + "Supports academic-industrial partnerships developing Software as a Medical Device (SaMD) multimodal AI clinical decision support tools combining medical imaging with other health data. 8 awards anticipated; foreign organizations eligible." + ], + "expiration_date": [ + "2026-10-20" + ], + "external_url": [ + "https://simpler.grants.gov/opportunity/d07ebcd7-96cf-40cb-8ae3-f401b6274080" + ], + "fon": [ + "RFA-RM-27-012" ], "name": [ - "Christina Liu" + "PRIMED-AI: Data-to-Model Academic-Industrial Partnerships (D2M-AIP) for Precision Medicine with AI: Integrating Imaging with Multimodal Data (UG3/UH3 Clinical Trial Optional)" + ], + "posted_date": [ + "2026-06-30" + ], + "status": [ + "closed" + ], + "url": [ + "https://simpler.grants.gov/opportunity/d07ebcd7-96cf-40cb-8ae3-f401b6274080" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "members", - "source": "https://brain-bbqs.org/id/208980e9-92b9-447e-a2ca-e83bf61db159" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/2548a017-fd14-4934-9762-b30d7071821a" } ], + "in": [], "dangling": [], "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/a5644db3-8ade-4026-9139-c1945c0869d6", - "class": "Investigator", - "label": "Christopher Rozell", + "id": "https://brain-bbqs.org/id/20adc9fb-c389-48a7-85ec-931501f0ce13", + "class": "FundingOpportunity", + "label": "Utilizing the Full Power of Empire AI — Request for Applications (Simons Foundation)", "facts": { - "consortium_role": [ - "Principal Investigator (PI)" + "activity_code": [ + "Research Grant" + ], + "description": [ + "Supports cutting-edge mathematics and basic science research that uses Empire AI's multinode GPU clusters and foundational machine learning models, in computational astrophysics, physics, biology, mathematics, neuroscience, or computational physical chemistry. Up to $6M total over two years (2027-06-01 to 2029-05-31), 6-12 awards. PI must be tenure-track/tenured at an Empire AI member institution (Columbia, Cornell, CUNY, SUNY, RPI, NYU, Rochester, RIT, Icahn/Mount Sinai); additional PIs may join by subcontract from outside institutions." + ], + "expiration_date": [ + "2026-12-01" + ], + "external_url": [ + "https://www.simonsfoundation.org/grant/utilizing-the-full-power-of-empire-ai-request-for-applications/" + ], + "fon": [ + "SIMONS-EMPIRE-AI-2026" ], "name": [ - "Christopher Rozell" + "Utilizing the Full Power of Empire AI — Request for Applications (Simons Foundation)" ], - "orcid": [ - "https://orcid.org/0000-0001-5173-1661" + "open_date": [ + "2026-09-01" + ], + "posted_date": [ + "2026-09-01" + ], + "status": [ + "open" + ], + "url": [ + "https://www.simonsfoundation.org/grant/utilizing-the-full-power-of-empire-ai-request-for-applications/" ] }, "out": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" - } - ], - "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/8730c049-9ec8-4a10-9e6f-0e5f0b33144e" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/92f22292-007f-4091-83e9-10df11f14110" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/1a88610e-c3bc-41b8-a97e-36698d0b0c28" } ], + "in": [], "dangling": [], - "degree": 3, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/b369e3dc-bb40-4cd7-ad5a-a329aa9278b8", - "class": "Investigator", - "label": "Chuck Mikell", + "id": "https://brain-bbqs.org/id/9db8fc93-1890-4237-b758-d5f94c5e6306", + "class": "FundingOpportunity", + "label": "Validation Center for Precision Medicine with AI: Integrating Imaging with Multimodal Data (PRIMED-AI) (U54 Clinical Trials Not Allowed)", "facts": { + "activity_code": [ + "U54" + ], + "description": [ + "Establishes a dedicated hub for comprehensive evaluation and characterization of AI-enabled, image-based multimodal CDS tools from the PRIMED-AI Consortium — verification, validation, interoperability, and uncertainty quantification. 1 award, $2.0M–$2.7M; foreign organizations ineligible." + ], + "expiration_date": [ + "2026-10-03" + ], + "external_url": [ + "https://simpler.grants.gov/opportunity/40ac94ea-e7b9-44af-9ae4-d3340c342757" + ], + "fon": [ + "RFA-RM-27-014" + ], "name": [ - "Chuck Mikell" + "Validation Center for Precision Medicine with AI: Integrating Imaging with Multimodal Data (PRIMED-AI) (U54 Clinical Trials Not Allowed)" + ], + "posted_date": [ + "2026-06-30" + ], + "status": [ + "closed" + ], + "url": [ + "https://simpler.grants.gov/opportunity/40ac94ea-e7b9-44af-9ae4-d3340c342757" ] }, - "out": [], + "out": [ + { + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/2548a017-fd14-4934-9762-b30d7071821a" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/9fd2cbaa-449d-4c9d-bcbb-b627f245cbf3", + "id": "https://brain-bbqs.org/id/cf033709-106e-4288-a326-f7bb353ba0a4", "class": "Investigator", - "label": "Claire Kendell", + "label": "Abigayle Fogarty", "facts": { "consortium_role": [ - "Postdoc/Grad Student" + "Research Staff (Scientist and others)" ], "name": [ - "Claire Kendell" - ], - "orcid": [ - "https://orcid.org/0000-0002-1896-4698" + "Abigayle Fogarty" ] }, "out": [ { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" } ], "in": [ { "predicate": "members", - "source": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad" + "source": "https://brain-bbqs.org/id/dbdb11c4-5082-4c5f-b50b-0046aaa0f8d9" } ], "dangling": [], - "degree": 2, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/25f1bccb-0c04-4e0e-8951-ac2620fb969c", + "id": "https://brain-bbqs.org/id/4cd9c282-4677-471a-81c0-aa97d94a687e", "class": "Investigator", - "label": "Cody Baker", + "label": "Adam Friedman", "facts": { "consortium_role": [ "Research Staff (Scientist and others)" ], "name": [ - "Cody Baker" - ], - "orcid": [ - "https://orcid.org/0000-0002-0829-4790" - ], - "research_areas": [ - "analytics", - "benchmarking", - "computational neuroscience", - "digital infrastructure", - "reproducible science" - ], - "scholar_id": [ - "https://scholar.google.com/citations?user=kqXKPnAAAAAJ&hl=en" - ], - "skills": [ - "computational neuroscience", - "python", - "web development" + "Adam Friedman" ] }, "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" - }, { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [ { "predicate": "members", - "source": "https://brain-bbqs.org/id/d17a5c60-e529-48ed-b4af-11976e4eb3fb" + "source": "https://brain-bbqs.org/id/dbdb11c4-5082-4c5f-b50b-0046aaa0f8d9" } ], "dangling": [], - "degree": 4, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/77aecb31-a637-4d08-9a35-e72ea6a46fe5", + "id": "https://brain-bbqs.org/id/67f260ea-2946-4086-9111-c926fb4e6df7", "class": "Investigator", - "label": "Cory Inman", + "label": "Adam Noah", "facts": { "consortium_role": [ - "Principal Investigator (PI)" + "Co-Investigator, Research Staff (Scientist and others)" ], "name": [ - "Cory Inman" + "Adam Noah" + ], + "orcid": [ + "https://orcid.org/0000-0001-9773-2790" ] }, "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" - }, { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/c7360c73-0ef1-4e34-88ac-585b15257b2d" + "source": "https://brain-bbqs.org/id/role/173d4dd7-5a55-48f7-b5ee-e08bfe25ac71" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/da6f9584-5487-4fe8-a9ed-462fface8db2" + "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" } ], "dangling": [], - "degree": 6, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/0401c6a9-2be9-47e3-981a-72481bd46a08", - "class": "Investigator", - "label": "Cristina Savin", - "facts": { - "name": [ - "Cristina Savin" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/831a48e1-025d-499a-bf11-83d05285ed4b", + "id": "https://brain-bbqs.org/id/1b3e8304-f2d6-4ed6-aa5c-7d49ca278344", "class": "Investigator", - "label": "Cristina Savin", + "label": "Aditya Bhise", "facts": { "consortium_role": [ - "Principal Investigator (PI)" + "Clinical Research Coordinator" ], "name": [ - "Cristina Savin" + "Aditya Bhise" ], "orcid": [ - "https://orcid.org/0000-0002-3414-8244" + "https://orcid.org/0000-0002-9144-172X" ] }, "out": [ @@ -8806,16 +9695,16 @@ { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/a8d46449-f002-41d2-8fad-ee7cd5126178" - }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/6efc2552-7cd7-4e53-bd2d-41fee6824cf7" + "source": "https://brain-bbqs.org/id/f28a2f16-5259-4e2f-9c8e-a5d11d2b5c5f" } ], "dangling": [], @@ -8824,42 +9713,80 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/79c7ff27-6bd7-4b92-b22c-9f4f80a507ab", + "id": "https://brain-bbqs.org/id/e6996650-b858-4ddb-b422-4fd92fdfaac4", "class": "Investigator", - "label": "Crystal Lantz", + "label": "Agatha Lenartowicz", "facts": { "consortium_role": [ - "NIH Program" - ], - "description": [ - "NIH Program staff – BBQS consortium" + "Principal Investigator (PI)" ], "name": [ - "Crystal Lantz" + "Agatha Lenartowicz" + ], + "orcid": [ + "https://orcid.org/0000-0001-8015-8251" + ], + "research_areas": [ + "ADHD", + "attention", + "education neuroscience", + "mobile EEG", + "multimodal neuroimaging", + "oscillations" + ], + "scholar_id": [ + "AWOkpNcAAAAJ" + ], + "skills": [ + "EEG", + "MRI", + "concurrent EEG-fMRI", + "multivariate analysis" ] }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + } + ], + "in": [ + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/bd6b0699-938f-4117-94d2-97177837e94c" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/32f14ee1-e0b4-4753-869a-f630f1786682" + } ], + "dangling": [], + "degree": 3, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/be8d825d-140a-4d72-a39a-2534cf2b4145", + "id": "https://brain-bbqs.org/id/88203e28-70c5-4730-af2d-93d7f09b4250", "class": "Investigator", - "label": "Dan Sanes", + "label": "Alessandra DallaVecchia", "facts": { "consortium_role": [ - "Principal Investigator (PI)" + "Postdoc/Grad Student" ], "name": [ - "Dan Sanes" + "Alessandra DallaVecchia" ], "orcid": [ - "https://orcid.org/0000-0002-3783-6165" + "https://orcid.org/0000-0002-4023-5141" + ], + "research_areas": [ + "attention", + "neural dynamics" + ], + "skills": [ + "EEG", + "dynamical systems", + "python" ] }, "out": [ @@ -8871,126 +9798,137 @@ "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/c325fdf0-4dc3-43aa-a2de-5a3607476ac5" - }, - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/95b0b77d-e396-4d0b-b80e-4b80592a2db6" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/5b794afd-cf08-4107-81c8-522a29714830" + "source": "https://brain-bbqs.org/id/role/63cd8c2a-0860-4130-857c-c33765b115d5" } ], "dangling": [], - "degree": 4, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/ffac8b9d-1a4c-4b02-ad6d-3cd1fd2d4980", + "id": "https://brain-bbqs.org/id/40f7a980-ec6a-4278-82f7-b7ea3601ce40", "class": "Investigator", - "label": "Dan Waxman", + "label": "Alex Cabral", "facts": { "consortium_role": [ - "Research Staff (Scientist and others)" + "Postdoc/Grad Student" ], "name": [ - "Dan Waxman" + "Alex Cabral" ] }, "out": [ { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [], "dangling": [], - "degree": 1, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/397816f1-2188-4817-af29-e7aa82ef1afb", + "id": "https://brain-bbqs.org/id/f2372c9c-91ac-449f-8ae8-182327e93a85", "class": "Investigator", - "label": "Dana Schloesser", + "label": "Alex Williams", "facts": { "consortium_role": [ - "NIH Program" + "Principal Investigator (PI)" ], "name": [ - "Dana Schloesser" + "Alex Williams" + ], + "orcid": [ + "https://orcid.org/0000-0001-5853-103X" ] }, "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" - }, { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + } + ], + "in": [ + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/bf0e6573-c228-4923-badd-e3667105e287" }, { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/f0b8e0cd-ac28-4f72-8410-be9b81689d08" }, { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + "predicate": "members", + "source": "https://brain-bbqs.org/id/5b794afd-cf08-4107-81c8-522a29714830" } ], - "in": [], "dangling": [], "degree": 4, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/2dd8fea9-363a-43da-8bd1-6ae4674c60b9", + "id": "https://brain-bbqs.org/id/3d7564b9-e839-4737-874a-2e3b5319e11a", "class": "Investigator", - "label": "Daniel W Wesson", + "label": "Alik S. Widge", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], "external_url": [ - "https://reporter.nih.gov/search/results?pi_id=9643974" + "https://reporter.nih.gov/search/results?pi_id=6998694" ], "name": [ - "Daniel W Wesson" + "Alik S. Widge" + ], + "orcid": [ + "https://orcid.org/0000-0002-1160-1503" ] }, "out": [], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/2248b93b-ea65-48b3-a940-f45b80c06346" + "source": "https://brain-bbqs.org/id/role/f25003fd-234f-453b-9bc8-238213a55269" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/622f970b-e529-441d-b5f3-739025a38aa9" + "source": "https://brain-bbqs.org/id/9f75488b-59d0-4d50-b7db-869f26066743" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/7848212f-5c1c-4170-bdad-44cc3273d0f1" } ], "dangling": [], - "degree": 2, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/dfbc5c5d-f4a9-4b08-8454-321df0c98e18", + "id": "https://brain-bbqs.org/id/0410e3c0-a5b5-4f3f-a0e0-2dc7e71c2d18", "class": "Investigator", - "label": "Darrell De Freitas", + "label": "Alireza Kazemi", "facts": { "consortium_role": [ - "Research Staff (Scientist and others)" + "Postdoc/Grad Student" ], "name": [ - "Darrell De Freitas" + "Alireza Kazemi" ], "orcid": [ - "https://orcid.org/0000-0002-3717-3007" + "https://orcid.org/0000-0001-8944-1459" ] }, "out": [ @@ -9000,13 +9938,13 @@ }, { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/5c64f851-de9f-4496-84da-58ed338ffa65" + "source": "https://brain-bbqs.org/id/role/d64865d3-893f-4968-bcba-e3b33a6a4f1b" } ], "dangling": [], @@ -9015,29 +9953,27 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/6fe1f186-133e-4490-b50b-4e5d7d4c6347", + "id": "https://brain-bbqs.org/id/0da76ce9-654a-4940-a9c6-d0785167ebad", "class": "Investigator", - "label": "David Schoppik", + "label": "Amelia Johnson", "facts": { "consortium_role": [ - "Assistant Professor" - ], - "external_url": [ - "https://reporter.nih.gov/search/results?pi_id=9172467" + "research assistant" ], "name": [ - "David Schoppik" + "Amelia Johnson" ] }, - "out": [], + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + } + ], "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/92a2b8eb-f9ed-422a-9a23-d8a9e12cf331" - }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/6efc2552-7cd7-4e53-bd2d-41fee6824cf7" + "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" } ], "dangling": [], @@ -9046,121 +9982,63 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/fe4790d5-bf32-469d-b098-cb4f44f6fa19", + "id": "https://brain-bbqs.org/id/e8c0da8f-2dbb-442f-9831-4271dda9dda9", "class": "Investigator", - "label": "David Kennedy", + "label": "Amrita Nair", "facts": { "consortium_role": [ - "Principal Investigator (PI)" + "Research Staff (Scientist and others)" ], "name": [ - "David Kennedy" - ], - "orcid": [ - "https://orcid.org/0000-0002-9377-0797" + "Amrita Nair" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - } - ], + "out": [], "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/800262fc-b2dd-4041-ab94-e9cf166d50b3" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/7924e7d9-5b53-4525-95ef-3f5a6b9112a5" - }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/4284d761-dde2-4e72-8cb4-d3724f2d4b32" + "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" } ], "dangling": [], - "degree": 5, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/ea2dc7bf-af90-460d-9823-45e9407b6bb8", + "id": "https://brain-bbqs.org/id/1ee83670-fadd-4744-91bd-17ca61944822", "class": "Investigator", - "label": "David Ostry", + "label": "Andrew MacAskill", "facts": { "consortium_role": [ "Co-Investigator" ], "name": [ - "David Ostry" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/3161638e-fa1b-4af1-a998-a34139b2a0b1", - "class": "Investigator", - "label": "David Schneider", - "facts": { - "consortium_role": [ - "Principal Investigator (PI)" - ], - "name": [ - "David Schneider" + "Andrew MacAskill" ], "orcid": [ - "https://orcid.org/0000-0002-8945-2024" + "https://orcid.org/0000-0002-0196-3779" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - } - ], + "out": [], "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/62fcc478-1ee4-43f5-a5b0-ae02c6955cbf" - }, - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/1de9735a-b2fe-4554-85a2-01fb284ebd01" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/5b794afd-cf08-4107-81c8-522a29714830" - }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/7867bb2b-3001-431a-9a3b-0f5bd5ad64f2" + "source": "https://brain-bbqs.org/id/24c105cd-2a0b-4a0e-8e6a-67e7a28f7315" } ], "dangling": [], - "degree": 5, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/4d4ad015-92f8-485e-9d4c-61dd5c18ac29", + "id": "https://brain-bbqs.org/id/58c31e98-4899-43df-a516-2ee6781b289e", "class": "Investigator", - "label": "Dayu Lin", + "label": "Anibal Heinsfeld", "facts": { "name": [ - "Dayu Lin" + "Anibal Heinsfeld" ] }, "out": [], @@ -9173,34 +10051,34 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/c140b518-3ea9-4cad-a8b2-c7b30385589b", + "id": "https://brain-bbqs.org/id/b1b421fc-5477-4c2f-8968-ab757344ab2d", "class": "Investigator", - "label": "Dayu Lin", + "label": "Anirvan Nandy", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], "name": [ - "Dayu Lin" + "Anirvan Nandy" ], "orcid": [ - "https://orcid.org/0000-0003-2006-0791" + "https://orcid.org/0000-0002-4225-5349" ] }, "out": [ { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/182007aa-956e-44c7-92ff-39e22486c0a1" + "source": "https://brain-bbqs.org/id/role/c3efc4fa-34d8-4630-93b5-7dd34f4e03cd" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/6efc2552-7cd7-4e53-bd2d-41fee6824cf7" + "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" } ], "dangling": [], @@ -9209,94 +10087,98 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/aa69dcd5-bd16-40ef-909e-3f2985d66c65", + "id": "https://brain-bbqs.org/id/85a49b85-44ff-4f85-a110-c3860bfe6747", "class": "Investigator", - "label": "Deepa Purushothaman", + "label": "Annette Estes", "facts": { + "consortium_role": [ + "Co-Investigator" + ], "name": [ - "Deepa Purushothaman" + "Annette Estes" + ], + "orcid": [ + "https://orcid.org/0000-0003-2687-4155" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/dfbfe6e3-bfae-4813-af08-0ded1cc2a3e9" + } ], + "dangling": [], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/8fa8009e-d4af-4b39-b0e5-7efed3696a4c", + "id": "https://brain-bbqs.org/id/4f18ae48-4099-486d-8e89-1a8a736e59e4", "class": "Investigator", - "label": "Dimitris Samaras", + "label": "anqi wu", "facts": { "consortium_role": [ - "Consultant" + "Co-Investigator" ], "name": [ - "Dimitris Samaras" - ], - "orcid": [ - "https://orcid.org/0000-0002-1373-0294" + "anqi wu" ] }, "out": [ { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, + } + ], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + "predicate": "members", + "source": "https://brain-bbqs.org/id/92f22292-007f-4091-83e9-10df11f14110" } ], - "in": [], "dangling": [], "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/60b6dd1c-dbb1-46e3-9a33-abc7aca65a8a", + "id": "https://brain-bbqs.org/id/7745a449-07ce-4762-988e-e355a72b0775", "class": "Investigator", - "label": "Dmitry Batenkov", + "label": "Arina Knowlton", "facts": { "consortium_role": [ - "Research Staff (Scientist and others)" + "NIH Program" ], "name": [ - "Dmitry Batenkov" - ], - "orcid": [ - "https://orcid.org/0000-0003-2679-0138" + "Arina Knowlton" ] }, - "out": [ + "out": [], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + "predicate": "members", + "source": "https://brain-bbqs.org/id/28609b98-6f97-4a46-b875-9f5084f1c7cd" } ], - "in": [], "dangling": [], "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/8e52b630-7ecc-4336-9f31-d0b6a1c85100", + "id": "https://brain-bbqs.org/id/9a233497-f3cd-4888-b5b6-a83630e5f1ee", "class": "Investigator", - "label": "Dominique Duncan", + "label": "Arish Alreja", "facts": { - "consortium_role": [ - "Co-Investigator" - ], "name": [ - "Dominique Duncan" + "Arish Alreja" ], "orcid": [ - "https://orcid.org/0000-0002-6154-9262" + "https://orcid.org/0000-0003-0173-376X" + ], + "scholar_id": [ + "7oTeTawAAAAJ" ] }, "out": [ @@ -9306,17 +10188,17 @@ }, { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/b450bf2e-e124-481f-8950-2e7b03832f17" + "source": "https://brain-bbqs.org/id/role/6344ea60-1fad-4b96-ac49-43e00f2acf04" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad" + "source": "https://brain-bbqs.org/id/e46a4832-3f63-49d7-acad-8567ed641589" } ], "dangling": [], @@ -9325,43 +10207,22 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/f9cc96dd-52b0-41bc-b687-47a1e4df3e2c", - "class": "Investigator", - "label": "Dorota Jarecka", - "facts": { - "name": [ - "Dorota Jarecka" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/3afc2f32-f84c-4ca1-9fee-139597851004", + "id": "https://brain-bbqs.org/id/9eb4af78-4485-4c7b-9179-76d079bde109", "class": "Investigator", - "label": "Emily Kuschner", + "label": "Ashlee Van't Veer", "facts": { "consortium_role": [ - "Research Staff (Scientist and others)" + "NIH program staff" ], "name": [ - "Emily Kuschner" - ], - "orcid": [ - "https://orcid.org/0000-0003-1251-1468" + "Ashlee Van't Veer" ] }, "out": [], "in": [ { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/d940349f-ae79-43ae-8931-2c4b17d14f44" + "predicate": "members", + "source": "https://brain-bbqs.org/id/208980e9-92b9-447e-a2ca-e83bf61db159" } ], "dangling": [], @@ -9370,99 +10231,107 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/81d6f976-8ae2-4e38-853a-9e0fe8ac7839", + "id": "https://brain-bbqs.org/id/1b49aee4-301e-46c9-b22d-209481f68437", "class": "Investigator", - "label": "Emily Mackevicius", + "label": "Ashley Feinsinger", "facts": { "consortium_role": [ "Co-Investigator" ], "name": [ - "Emily Mackevicius" + "Ashley Feinsinger" ], "orcid": [ - "https://orcid.org/0000-0001-6593-4398" + "https://orcid.org/0000-0002-0251-8810" ] }, "out": [ { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" } ], "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/b050adf2-88b1-42e2-912b-2843d5b96854", + "id": "https://brain-bbqs.org/id/dc09061c-41ce-4e6e-bfe9-5e4805b4356c", "class": "Investigator", - "label": "Emre Ertin", + "label": "Avniel Ghuman", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], "name": [ - "Emre Ertin" - ], - "orcid": [ - "https://orcid.org/0000-0001-7815-0728" + "Avniel Ghuman" ] }, - "out": [ + "out": [], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/29154919-0da2-4db6-a005-c5cf8451746d" }, { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + "predicate": "members", + "source": "https://brain-bbqs.org/id/e46a4832-3f63-49d7-acad-8567ed641589" } ], - "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/d0517883-23dc-4702-9f1b-374497c94486" - }, + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/9fb13eb4-a3bc-483a-9969-f3908d13143d", + "class": "Investigator", + "label": "Aydin Tasevac", + "facts": { + "consortium_role": [ + "Postdoc/Grad Student" + ], + "name": [ + "Aydin Tasevac" + ] + }, + "out": [ { - "predicate": "members", - "source": "https://brain-bbqs.org/id/8f896b71-c64d-4041-9f33-f3477caf8b74" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" }, { - "predicate": "members", - "source": "https://brain-bbqs.org/id/32f14ee1-e0b4-4753-869a-f630f1786682" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], + "in": [], "dangling": [], - "degree": 5, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/c2074402-c96d-40c5-8b3c-ad8a8fcf2031", + "id": "https://brain-bbqs.org/id/41e042c3-81ad-486b-b933-bf77fcefd4f5", "class": "Investigator", - "label": "Eran Klein", + "label": "Bartul Mimica", "facts": { "consortium_role": [ - "Co-Investigator" + "Postdoc/Grad Student" ], "name": [ - "Eran Klein" + "Bartul Mimica" ], "orcid": [ - "https://orcid.org/0000-0002-0132-5777" + "https://orcid.org/0000-0001-6404-0560" ] }, "out": [ { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" } ], "in": [], @@ -9472,34 +10341,39 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/1f6fa922-b662-4325-aac7-cb622ac10ef3", + "id": "https://brain-bbqs.org/id/c3604b73-537c-411b-b963-cd8df608f086", "class": "Investigator", - "label": "Eric Yttri", + "label": "Bence P Olveczky", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], + "external_url": [ + "https://reporter.nih.gov/search/results?pi_id=9361217" + ], "name": [ - "Eric Yttri" + "Bence P Olveczky" ], "orcid": [ - "https://orcid.org/0000-0002-7214-1481" + "https://orcid.org/0000-0003-0208-5793" + ], + "skills": [ + "Behavioral neuroscience" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - } - ], + "out": [], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/b6d62f54-1ff5-4355-8623-69dbe88aa41e" + "source": "https://brain-bbqs.org/id/role/82abd87d-c378-4049-8c84-4eede3066410" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/fb3cf5ef-e850-44d2-887c-0d0ef608f48c" + "source": "https://brain-bbqs.org/id/93fa0810-51f4-4e71-badf-e5e8d3e40dc3" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/99bc7f7b-2a3d-4e34-99f1-ec08e12133b2" } ], "dangling": [], @@ -9508,111 +10382,90 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/40a825b2-31fc-4ffe-b686-9b09a1576b33", + "id": "https://brain-bbqs.org/id/4626de5c-667e-4f70-be3e-44dffde3887b", "class": "Investigator", - "label": "Erik Johnson", + "label": "Bijan Pesaran", "facts": { "consortium_role": [ - "Research Staff (Scientist and others)" + "Principal Investigator (PI)" ], "name": [ - "Erik Johnson" + "Bijan Pesaran" ], "orcid": [ - "https://orcid.org/0000-0002-7397-8531" + "https://orcid.org/0000-0002-8380-4043" + ], + "research_areas": [ + "Neural engineering", + "neuroscience" + ], + "scholar_id": [ + "fKsY32YAAAAJ&hl" ] }, "out": [ { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" }, { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/0dca4f7e-50c2-4cc8-ac51-1cbe7cd5deaa" + "source": "https://brain-bbqs.org/id/role/86c8c08c-3aa2-4ef9-a9a0-a7158781799b" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad" } ], "dangling": [], - "degree": 3, + "degree": 4, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/2f334517-3173-4654-987e-dc44e0e94eb2", + "id": "https://brain-bbqs.org/id/ace580b9-6f04-457f-aac0-3ac3a7243e3b", "class": "Investigator", - "label": "Eunyoung Kim", + "label": "Brandon Brooks-Patton", "facts": { "consortium_role": [ - "NIH Program" + "Postdoc/Grad Student" ], "name": [ - "Eunyoung Kim" + "Brandon Brooks-Patton" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/bf6867b2-09d3-4cc3-89ba-b931b646cd42", - "class": "Investigator", - "label": "Eva Dyer", - "facts": { - "consortium_role": [ - "Principal Investigator (PI)" - ], - "name": [ - "Eva Dyer" - ], - "orcid": [ - "https://orcid.org/0000-0001-6755-0259" - ] - }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - } - ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/b8a0aee0-0fb1-4ede-9846-a717a2b63d47" + "source": "https://brain-bbqs.org/id/role/82015065-d290-4efc-982b-75d67daa4d00" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/92f22292-007f-4091-83e9-10df11f14110" + "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" } ], "dangling": [], - "degree": 3, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/f088160e-1dea-4cb9-b73f-1c30d0e40053", + "id": "https://brain-bbqs.org/id/8c977c24-da2f-4866-b860-b71aa2540bd4", "class": "Investigator", - "label": "Fang Yu Chang", + "label": "Brendan Ito", "facts": { "consortium_role": [ - "Research Staff (Scientist and others)" + "Postdoc/Grad Student" ], "name": [ - "Fang Yu Chang" - ], - "orcid": [ - "https://orcid.org/0000-0002-5511-3876" + "Brendan Ito" ] }, "out": [ @@ -9622,7 +10475,7 @@ }, { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [], @@ -9632,174 +10485,210 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/36ba050d-e4f4-470c-a780-eddef3b4bab8", + "id": "https://brain-bbqs.org/id/2febecec-70dd-4db0-8bed-2060a1d13b5e", "class": "Investigator", - "label": "Farah Bader", + "label": "Brent Kious", "facts": { + "consortium_role": [ + "Co-Investigator" + ], "name": [ - "Farah Bader" + "Brent Kious" ] }, - "out": [], + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/e0179c68-8fe6-48ca-9140-84a567b5f661", + "id": "https://brain-bbqs.org/id/5bb15430-32e5-457f-b6ce-e4f3790687fa", "class": "Investigator", - "label": "Firooz Aflatouni", + "label": "Brett E Youngerman", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], + "external_url": [ + "https://reporter.nih.gov/search/results?pi_id=16101509" + ], "name": [ - "Firooz Aflatouni" + "Brett E Youngerman" + ], + "orcid": [ + "https://orcid.org/0000-0001-8264-0476" ] }, "out": [], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/db582fe3-ef66-4a67-aca9-9daec764cd4c" - }, - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/dbaa6f57-01e4-4168-88fa-7fa673a6cf6f" + "source": "https://brain-bbqs.org/id/role/a617a421-6fe5-4f66-9c63-ce24bbea02eb" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad" + "source": "https://brain-bbqs.org/id/9f75488b-59d0-4d50-b7db-869f26066743" } ], "dangling": [], - "degree": 3, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/83d790af-315f-4f1f-8efc-3718fc0581d3", + "id": "https://brain-bbqs.org/id/5835b3d1-bdaf-4f30-a9e7-cf70d1861b61", "class": "Investigator", - "label": "Flavia Vitale", + "label": "Brian Gitahi", "facts": { + "consortium_role": [ + "Postdoc/Grad Student" + ], "name": [ - "Flavia Vitale" + "Brian Gitahi" ] }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + } + ], + "in": [ + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" + } ], + "dangling": [], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/961fb77d-16c1-4efd-9fc7-ac7bd552c983", + "id": "https://brain-bbqs.org/id/4d8bb1b1-0cd6-4ca6-a5f7-7b0bc3ba537d", "class": "Investigator", - "label": "Flavia Vitale", + "label": "Brian Leonard", "facts": { - "consortium_role": [ - "Principal Investigator (PI)" - ], "name": [ - "Flavia Vitale" + "Brian Leonard" ] }, "out": [], "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/f2d69865-0ee2-4b99-81e8-b84658c9eb1e" - }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad" + "source": "https://brain-bbqs.org/id/7924e7d9-5b53-4525-95ef-3f5a6b9112a5" } ], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/1d3b5b5b-7a52-4380-82f4-931b67831917", + "id": "https://brain-bbqs.org/id/d2f77d44-3a20-4759-be29-69403ae039ef", "class": "Investigator", - "label": "Flavio Frohlich", + "label": "Brock Wester", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], - "external_url": [ - "https://reporter.nih.gov/search/results?pi_id=10450045" - ], "name": [ - "Flavio Frohlich" + "Brock Wester" + ], + "orcid": [ + "https://orcid.org/0000-0002-1500-2143" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/c35db851-d42d-43ad-b30c-64fb5b933dcf" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" }, { - "predicate": "members", - "source": "https://brain-bbqs.org/id/52fcb5e7-1274-4621-b368-17f269eaec86" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + } + ], + "in": [ + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/3d109ffa-adb1-4a1e-b2fd-5f516280d7f7" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/7de07dc9-72c0-4900-be0d-c375d927a6b4" + "source": "https://brain-bbqs.org/id/315a0694-ce8d-4010-abca-5438e5f6b560" } ], "dangling": [], - "degree": 3, + "degree": 4, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/53f6094d-cb6e-4899-8b0d-d358b863fab9", + "id": "https://brain-bbqs.org/id/09865181-38c6-44d9-aba4-68e373f0286d", "class": "Investigator", - "label": "Gabriella", + "label": "Caleb Kemere", "facts": { + "consortium_role": [ + "Principal Investigator (PI)" + ], "name": [ - "Gabriella" + "Caleb Kemere" + ], + "orcid": [ + "https://orcid.org/0000-0003-2054-0234" ] }, - "out": [], + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + } + ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/cfcdf43e-bc65-4c3b-8046-9429be511ed1" + "source": "https://brain-bbqs.org/id/role/c33f2bff-071b-4550-9ea5-d3fd11e0ed0c" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/6a224a59-b37c-40b2-a4ef-f43393d94357" } ], "dangling": [], - "degree": 1, + "degree": 4, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/0681de3a-08d8-4a60-88c1-65ef2a02a93f", + "id": "https://brain-bbqs.org/id/623a564c-f5bf-4d95-a233-027850148145", "class": "Investigator", - "label": "Gabriella Sahyoun", + "label": "Caleb Scott-Joseph", "facts": { "consortium_role": [ "Postdoc/Grad Student" ], "name": [ - "Gabriella Sahyoun" + "Caleb Scott-Joseph" ] }, "out": [], "in": [ { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/068fdb34-5151-4b7f-b854-c9e147bdfcd1" + "predicate": "members", + "source": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad" } ], "dangling": [], @@ -9808,50 +10697,26 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/e631bc65-b164-4090-b442-3dacddd2707a", - "class": "Investigator", - "label": "Gaurav Patel", - "facts": { - "consortium_role": [ - "Co-Investigator" - ], - "name": [ - "Gaurav Patel" - ], - "orcid": [ - "https://orcid.org/0000-0003-0028-2098" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/c11ff83b-6ac9-4ebe-992b-f37c931e182b", + "id": "https://brain-bbqs.org/id/3516554a-8253-4773-af22-a89b3ccb3267", "class": "Investigator", - "label": "Gordon Shepherd", + "label": "Casey Harrison Halpern", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], "name": [ - "Gordon Shepherd" + "Casey Harrison Halpern" ] }, "out": [], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/c3e5b648-cf18-47f4-b514-fc38390d2431" + "source": "https://brain-bbqs.org/id/role/da20601e-5e20-41cc-a57b-63e66c143df4" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/ef820011-b44d-40f5-a4ab-2069fa9805df" + "source": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad" } ], "dangling": [], @@ -9860,67 +10725,52 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/783ff194-17e8-46d9-bd1f-57ca4070a90c", + "id": "https://brain-bbqs.org/id/e7f5f7e5-8074-41a9-b866-bfd7112d37c2", "class": "Investigator", - "label": "Grace Hwang", + "label": "Chaoyi Zhang", "facts": { - "consortium_role": [ - "NIH Program" - ], "name": [ - "Grace Hwang" - ], - "orcid": [ - "https://orcid.org/0000-0002-3335-8688" + "Chaoyi Zhang" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" - } - ], + "out": [], "in": [], "dangling": [], - "degree": 2, - "flags": [], + "degree": 0, + "flags": [ + "isolated" + ], "violations": [] }, { - "id": "https://brain-bbqs.org/id/1a33a814-fbd1-4acf-bc5d-f0077bc180d1", + "id": "https://brain-bbqs.org/id/c6056429-1e03-4506-8484-5be9acff8170", "class": "Investigator", - "label": "Gregory Darin Field", + "label": "Charles Mikell", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], - "external_url": [ - "https://reporter.nih.gov/search/results?pi_id=11483919" - ], "name": [ - "Gregory Darin Field" + "Charles Mikell" ], "orcid": [ - "https://orcid.org/0000-0001-7461-8610" + "https://orcid.org/0000-0002-0701-2325" ] }, - "out": [], + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + } + ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/4a0c2ae2-92fd-447a-a95e-419db4773d8f" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/32f14ee1-e0b4-4753-869a-f630f1786682" + "source": "https://brain-bbqs.org/id/role/1711154b-0f87-42e9-8cf6-c1316bdf48a5" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/93fa0810-51f4-4e71-badf-e5e8d3e40dc3" + "source": "https://brain-bbqs.org/id/c04b3bcd-d1db-4b3c-9dc6-a4c97039cad6" } ], "dangling": [], @@ -9929,18 +10779,15 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/e6fb5750-5310-4d85-8beb-4cc8addbd988", + "id": "https://brain-bbqs.org/id/f34a38e7-364a-4091-8436-a8c52b684cc2", "class": "Investigator", - "label": "Han Yi", + "label": "Cheryl Corcoran", "facts": { "consortium_role": [ - "Co-Investigator" + "Principal Investigator (PI)" ], "name": [ - "Han Yi" - ], - "orcid": [ - "https://orcid.org/0000-0001-7152-3712" + "Cheryl Corcoran" ] }, "out": [ @@ -9964,186 +10811,199 @@ "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/642bc862-c174-48ba-8b1b-e7c1356e07ab" + "source": "https://brain-bbqs.org/id/role/3027bce5-12b7-4205-9873-9cc8efbed2c0" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/dbdb11c4-5082-4c5f-b50b-0046aaa0f8d9" } ], "dangling": [], - "degree": 5, + "degree": 6, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/6d29e182-e1cd-43d5-9f95-7cfef6ff9396", + "id": "https://brain-bbqs.org/id/71d734ad-e355-473d-aaf7-577be85186d5", "class": "Investigator", - "label": "Holly Moore", + "label": "Christina Hatch", "facts": { "consortium_role": [ - "NIH Program" + "NIH program staff" ], "name": [ - "Holly Moore" + "Christina Hatch" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" - }, + "out": [], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + "predicate": "members", + "source": "https://brain-bbqs.org/id/208980e9-92b9-447e-a2ca-e83bf61db159" } ], - "in": [], "dangling": [], - "degree": 4, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/7db5db3c-9f1f-4e01-a942-e05c340cbd8e", + "id": "https://brain-bbqs.org/id/8f429fce-6c38-4707-bd9c-30fd796e9137", "class": "Investigator", - "label": "Hongkun Zhu", + "label": "Christina Liu", "facts": { "consortium_role": [ - "Postdoc/Grad Student" + "NIH program staff" ], "name": [ - "Hongkun Zhu" - ], - "orcid": [ - "https://orcid.org/0009-0007-2560-9639" + "Christina Liu" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, + "out": [], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + "predicate": "members", + "source": "https://brain-bbqs.org/id/208980e9-92b9-447e-a2ca-e83bf61db159" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/538a6b26-2685-4ea8-9f0d-91ae90693108", + "id": "https://brain-bbqs.org/id/a5644db3-8ade-4026-9139-c1945c0869d6", "class": "Investigator", - "label": "Hongli Wang", + "label": "Christopher Rozell", "facts": { + "consortium_role": [ + "Principal Investigator (PI)" + ], "name": [ - "Hongli Wang" + "Christopher Rozell" + ], + "orcid": [ + "https://orcid.org/0000-0001-5173-1661" ] }, "out": [ { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + } + ], + "in": [ + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/8730c049-9ec8-4a10-9e6f-0e5f0b33144e" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/92f22292-007f-4091-83e9-10df11f14110" } ], - "in": [], "dangling": [], - "degree": 1, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/22edcc49-fd41-4423-92b6-89e7abba292d", + "id": "https://brain-bbqs.org/id/9fd2cbaa-449d-4c9d-bcbb-b627f245cbf3", "class": "Investigator", - "label": "Jacinta Beehner", + "label": "Claire Kendell", "facts": { "consortium_role": [ - "Principal Investigator (PI)" + "Postdoc/Grad Student" ], "name": [ - "Jacinta Beehner" + "Claire Kendell" ], "orcid": [ - "https://orcid.org/0000-0001-6566-6872" + "https://orcid.org/0000-0002-1896-4698" ] }, "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/9478d651-eb81-4c6f-8b55-4cabb137e46d" - }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/1c181fed-73e8-46be-8d27-198f64e936ea" + "source": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad" } ], "dangling": [], - "degree": 4, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/1e23d697-bec8-48a1-ae97-96434e7343c2", + "id": "https://brain-bbqs.org/id/25f1bccb-0c04-4e0e-8951-ac2620fb969c", "class": "Investigator", - "label": "Jack Grinband", + "label": "Cody Baker", "facts": { "consortium_role": [ - "Principal Investigator (PI)" - ], - "external_url": [ - "https://reporter.nih.gov/search/results?pi_id=1922654" + "Research Staff (Scientist and others)" ], "name": [ - "Jack Grinband" + "Cody Baker" + ], + "orcid": [ + "https://orcid.org/0000-0002-0829-4790" + ], + "research_areas": [ + "analytics", + "benchmarking", + "computational neuroscience", + "digital infrastructure", + "reproducible science" + ], + "scholar_id": [ + "https://scholar.google.com/citations?user=kqXKPnAAAAAJ&hl=en" + ], + "skills": [ + "computational neuroscience", + "python", + "web development" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/70324d1e-344b-402d-bac2-afd900606e16" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + } + ], + "in": [ { "predicate": "members", - "source": "https://brain-bbqs.org/id/dbdb11c4-5082-4c5f-b50b-0046aaa0f8d9" + "source": "https://brain-bbqs.org/id/d17a5c60-e529-48ed-b4af-11976e4eb3fb" } ], "dangling": [], - "degree": 2, + "degree": 4, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/c302f348-ef46-4a60-801c-55a7783ca421", + "id": "https://brain-bbqs.org/id/77aecb31-a637-4d08-9a35-e72ea6a46fe5", "class": "Investigator", - "label": "Jacqueline Boccanfuso", + "label": "Cory Inman", "facts": { "consortium_role": [ - "Project Manager" + "Principal Investigator (PI)" ], "name": [ - "Jacqueline Boccanfuso" - ], - "orcid": [ - "https://orcid.org/0000-0003-1307-2268" + "Cory Inman" ] }, "out": [ @@ -10151,93 +11011,118 @@ "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + }, { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/455424c4-b3b7-466e-b6f0-c959fbb74b77" + "source": "https://brain-bbqs.org/id/role/c7360c73-0ef1-4e34-88ac-585b15257b2d" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/da6f9584-5487-4fe8-a9ed-462fface8db2" } ], "dangling": [], - "degree": 3, + "degree": 6, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/1a8f0486-7381-4156-824c-b2e9ff0dc817", + "id": "https://brain-bbqs.org/id/831a48e1-025d-499a-bf11-83d05285ed4b", "class": "Investigator", - "label": "Jane Wang", + "label": "Cristina Savin", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], - "external_url": [ - "https://reporter.nih.gov/search/results?pi_id=79020074" - ], "name": [ - "Jane Wang" + "Cristina Savin" + ], + "orcid": [ + "https://orcid.org/0000-0002-3414-8244" ] }, - "out": [], + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + } + ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/fa7fab82-ca22-484b-a5aa-f775d831c4a6" + "source": "https://brain-bbqs.org/id/role/a8d46449-f002-41d2-8fad-ee7cd5126178" }, { "predicate": "members", "source": "https://brain-bbqs.org/id/6efc2552-7cd7-4e53-bd2d-41fee6824cf7" + }, + { + "predicate": "posted_by", + "source": "https://brain-bbqs.org/id/12234308-3c6b-4d75-a135-f8fb127d4389" } ], "dangling": [], - "degree": 2, + "degree": 5, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/5ed180e1-004a-49d3-a05f-e8a4da27718f", + "id": "https://brain-bbqs.org/id/79c7ff27-6bd7-4b92-b22c-9f4f80a507ab", "class": "Investigator", - "label": "Janine Simmons", + "label": "Crystal Lantz", "facts": { "consortium_role": [ "NIH Program" ], + "description": [ + "NIH Program staff – BBQS consortium" + ], "name": [ - "Janine Simmons" + "Crystal Lantz" ] }, - "out": [ + "out": [], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + "predicate": "members", + "source": "https://brain-bbqs.org/id/208980e9-92b9-447e-a2ca-e83bf61db159" } ], - "in": [], "dangling": [], "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/afe5dc6f-8e97-48c9-bb79-5af130f1e62a", + "id": "https://brain-bbqs.org/id/be8d825d-140a-4d72-a39a-2534cf2b4145", "class": "Investigator", - "label": "Jared Reiling", + "label": "Dan Sanes", "facts": { "consortium_role": [ - "Postdoc/Grad Student" + "Principal Investigator (PI)" ], "name": [ - "Jared Reiling" + "Dan Sanes" ], "orcid": [ - "https://orcid.org/0000-0003-1942-237X" - ], - "research_areas": [ - "Computational modeling of social behavior" + "https://orcid.org/0000-0002-3783-6165" ] }, "out": [ @@ -10249,62 +11134,63 @@ "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/cc0de44a-82ef-4fcf-811e-9695a46b47df" + "source": "https://brain-bbqs.org/id/role/c325fdf0-4dc3-43aa-a2de-5a3607476ac5" + }, + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/95b0b77d-e396-4d0b-b80e-4b80592a2db6" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/7de07dc9-72c0-4900-be0d-c375d927a6b4" + "source": "https://brain-bbqs.org/id/5b794afd-cf08-4107-81c8-522a29714830" } ], "dangling": [], - "degree": 3, + "degree": 4, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/b2e8b421-674b-4e2d-8b61-f1e4a005c4f4", + "id": "https://brain-bbqs.org/id/ffac8b9d-1a4c-4b02-ad6d-3cd1fd2d4980", "class": "Investigator", - "label": "Jarl Haggerty", + "label": "Dan Waxman", "facts": { "consortium_role": [ - "Application Developer" + "Research Staff (Scientist and others)" ], "name": [ - "Jarl Haggerty" + "Dan Waxman" ] }, - "out": [], - "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/9200c2fb-5bea-4d89-9115-1064c1387222" - }, + "out": [ { - "predicate": "members", - "source": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" } ], + "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/0823bcd5-786e-4d68-91b0-95bdec0b5d37", + "id": "https://brain-bbqs.org/id/397816f1-2188-4817-af29-e7aa82ef1afb", "class": "Investigator", - "label": "Jeff Munson", + "label": "Dana Schloesser", "facts": { "consortium_role": [ - "Co-Investigator, Data Manager/Submitter" + "NIH Program" ], "name": [ - "Jeff Munson" - ], - "orcid": [ - "https://orcid.org/0000-0003-1798-8927" + "Dana Schloesser" ] }, "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + }, { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" @@ -10312,55 +11198,78 @@ { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [], "dangling": [], - "degree": 2, + "degree": 4, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/63711ed4-4044-4b43-94c3-fee4d86d7b13", + "id": "https://brain-bbqs.org/id/2dd8fea9-363a-43da-8bd1-6ae4674c60b9", "class": "Investigator", - "label": "Jeff Walker", + "label": "Daniel W Wesson", "facts": { + "consortium_role": [ + "Principal Investigator (PI)" + ], + "external_url": [ + "https://reporter.nih.gov/search/results?pi_id=9643974" + ], "name": [ - "Jeff Walker" + "Daniel W Wesson" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/2248b93b-ea65-48b3-a940-f45b80c06346" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/622f970b-e529-441d-b5f3-739025a38aa9" + } ], + "dangling": [], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/7a5a1c11-f5f8-4643-b444-71228b1f298a", + "id": "https://brain-bbqs.org/id/dfbc5c5d-f4a9-4b08-8454-321df0c98e18", "class": "Investigator", - "label": "Jeffery Walker", + "label": "Darrell De Freitas", "facts": { + "consortium_role": [ + "Research Staff (Scientist and others)" + ], "name": [ - "Jeffery Walker" + "Darrell De Freitas" + ], + "orcid": [ + "https://orcid.org/0000-0002-3717-3007" ] }, "out": [ { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" } ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/baae3ddb-11fc-48ce-a5f1-23a481b233da" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" + "source": "https://brain-bbqs.org/id/role/5c64f851-de9f-4496-84da-58ed338ffa65" } ], "dangling": [], @@ -10369,217 +11278,249 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/e1424ffb-1cc6-4d9a-932e-464c967a68f9", + "id": "https://brain-bbqs.org/id/6fe1f186-133e-4490-b50b-4e5d7d4c6347", "class": "Investigator", - "label": "Jeffrey Walker", + "label": "David Schoppik", "facts": { + "consortium_role": [ + "Assistant Professor" + ], + "external_url": [ + "https://reporter.nih.gov/search/results?pi_id=9172467" + ], "name": [ - "Jeffrey Walker" + "David Schoppik" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/92a2b8eb-f9ed-422a-9a23-d8a9e12cf331" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/6efc2552-7cd7-4e53-bd2d-41fee6824cf7" + } ], + "dangling": [], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/5fd6169e-d169-41be-8cd0-e8a691f0b345", + "id": "https://brain-bbqs.org/id/fe4790d5-bf32-469d-b098-cb4f44f6fa19", "class": "Investigator", - "label": "Jennie Grammer", + "label": "David Kennedy", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], "name": [ - "Jennie Grammer" + "David Kennedy" + ], + "orcid": [ + "https://orcid.org/0000-0002-9377-0797" ] }, "out": [ { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" } ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/4ee3ec6b-290f-4731-b8af-788bc47217e8" + "source": "https://brain-bbqs.org/id/role/800262fc-b2dd-4041-ab94-e9cf166d50b3" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/32f14ee1-e0b4-4753-869a-f630f1786682" + "source": "https://brain-bbqs.org/id/7924e7d9-5b53-4525-95ef-3f5a6b9112a5" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/4284d761-dde2-4e72-8cb4-d3724f2d4b32" } ], "dangling": [], - "degree": 3, + "degree": 5, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/353d2c1b-0f19-47a0-98be-6a721845c0c2", + "id": "https://brain-bbqs.org/id/ea2dc7bf-af90-460d-9823-45e9407b6bb8", "class": "Investigator", - "label": "Jennifer Wagner", + "label": "David Ostry", "facts": { "consortium_role": [ "Co-Investigator" ], "name": [ - "Jennifer Wagner" - ], - "orcid": [ - "https://orcid.org/0000-0002-2278-0306" + "David Ostry" ] }, - "out": [ + "out": [], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + "predicate": "members", + "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" } ], - "in": [], "dangling": [], "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/0a076358-2298-4693-b3cf-d75114552163", + "id": "https://brain-bbqs.org/id/3161638e-fa1b-4af1-a998-a34139b2a0b1", "class": "Investigator", - "label": "John Rogers", + "label": "David Schneider", "facts": { "consortium_role": [ - "Co-Investigator" + "Principal Investigator (PI)" ], "name": [ - "John Rogers" + "David Schneider" + ], + "orcid": [ + "https://orcid.org/0000-0002-8945-2024" ] }, - "out": [], + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + } + ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/9217ceed-1e78-4c40-b15b-66077b5569db" + "source": "https://brain-bbqs.org/id/role/62fcc478-1ee4-43f5-a5b0-ae02c6955cbf" + }, + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/1de9735a-b2fe-4554-85a2-01fb284ebd01" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/e46a4832-3f63-49d7-acad-8567ed641589" + "source": "https://brain-bbqs.org/id/5b794afd-cf08-4107-81c8-522a29714830" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/7867bb2b-3001-431a-9a3b-0f5bd5ad64f2" } ], "dangling": [], - "degree": 2, + "degree": 5, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/f0d2d9d0-b5e5-4f52-a40d-0d5a06229b14", + "id": "https://brain-bbqs.org/id/c140b518-3ea9-4cad-a8b2-c7b30385589b", "class": "Investigator", - "label": "John Welsh", + "label": "Dayu Lin", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], "name": [ - "John Welsh" + "Dayu Lin" ], "orcid": [ - "https://orcid.org/0000-0002-1012-4360" + "https://orcid.org/0000-0003-2006-0791" ] }, "out": [ { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/b5ea3f60-fb2d-4b61-b6ca-04c67600b8b0" + "source": "https://brain-bbqs.org/id/role/182007aa-956e-44c7-92ff-39e22486c0a1" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/db72ef76-b8e2-4d0e-85da-c8d475d70628" + "source": "https://brain-bbqs.org/id/6efc2552-7cd7-4e53-bd2d-41fee6824cf7" } ], "dangling": [], - "degree": 5, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/75313083-49bd-45dd-a4a2-fd5fc0bf8949", + "id": "https://brain-bbqs.org/id/aa69dcd5-bd16-40ef-909e-3f2985d66c65", "class": "Investigator", - "label": "Jonathan E. Rubin", + "label": "Deepa Purushothaman", "facts": { - "consortium_role": [ - "Principal Investigator (PI)" - ], - "external_url": [ - "https://reporter.nih.gov/search/results?pi_id=8849791" - ], "name": [ - "Jonathan E. Rubin" + "Deepa Purushothaman" ] }, "out": [], "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/6e99e32c-bc60-4da2-80ac-d6438cc1d6c6" - }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/fb3cf5ef-e850-44d2-887c-0d0ef608f48c" + "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" } ], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/e055175b-7bfb-471e-8e80-d8697b484b9d", + "id": "https://brain-bbqs.org/id/8fa8009e-d4af-4b39-b0e5-7efed3696a4c", "class": "Investigator", - "label": "Jongwoon Kim", + "label": "Dimitris Samaras", "facts": { "consortium_role": [ - "Postdoc/Grad Student" + "Consultant" ], "name": [ - "Jongwoon Kim" + "Dimitris Samaras" + ], + "orcid": [ + "https://orcid.org/0000-0002-1373-0294" ] }, - "out": [], + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/eaa38acf-84a1-44ce-a1c6-eda307583731", + "id": "https://brain-bbqs.org/id/60b6dd1c-dbb1-46e3-9a33-abc7aca65a8a", "class": "Investigator", - "label": "Joost Wagenaar", + "label": "Dmitry Batenkov", "facts": { "consortium_role": [ - "Data Infrastructure support" + "Research Staff (Scientist and others)" ], "name": [ - "Joost Wagenaar" + "Dmitry Batenkov" + ], + "orcid": [ + "https://orcid.org/0000-0003-2679-0138" ] }, "out": [ @@ -10588,358 +11529,350 @@ "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" } ], - "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/68749a60-249f-4eb2-ad4a-7ae78c76a2f9" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad" - } - ], + "in": [], "dangling": [], - "degree": 3, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/ee077b61-eb2c-4cd9-b587-a46418c45265", + "id": "https://brain-bbqs.org/id/8e52b630-7ecc-4336-9f31-d0b6a1c85100", "class": "Investigator", - "label": "Jorge Ortiz", + "label": "Dominique Duncan", "facts": { "consortium_role": [ - "Principal Investigator (PI)" + "Co-Investigator" ], "name": [ - "Jorge Ortiz" + "Dominique Duncan" ], "orcid": [ - "https://orcid.org/0000-0003-3325-1298" + "https://orcid.org/0000-0002-6154-9262" ] }, "out": [ { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" } ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/8c42852d-0c57-4a3e-b874-3ba8874287a7" + "source": "https://brain-bbqs.org/id/role/b450bf2e-e124-481f-8950-2e7b03832f17" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/9f75488b-59d0-4d50-b7db-869f26066743" + "source": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad" } ], "dangling": [], - "degree": 3, + "degree": 4, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/189027bf-98cc-4173-8571-06759988ff2b", + "id": "https://brain-bbqs.org/id/f9cc96dd-52b0-41bc-b687-47a1e4df3e2c", "class": "Investigator", - "label": "Joseph Colonel", + "label": "Dorota Jarecka", "facts": { - "consortium_role": [ - "Postdoc/Grad Student" - ], "name": [ - "Joseph Colonel" - ], - "orcid": [ - "https://orcid.org/0009-0000-5516-9231" + "Dorota Jarecka" ] }, - "out": [ + "out": [], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + "predicate": "members", + "source": "https://brain-bbqs.org/id/7924e7d9-5b53-4525-95ef-3f5a6b9112a5" } ], - "in": [], "dangling": [], "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/5899fd56-4c11-41a1-8b0a-4e1785820391", + "id": "https://brain-bbqs.org/id/3afc2f32-f84c-4ca1-9fee-139597851004", "class": "Investigator", - "label": "Joseph Monaco", + "label": "Emily Kuschner", "facts": { "consortium_role": [ - "NIH Program" + "Research Staff (Scientist and others)" ], "name": [ - "Joseph Monaco" + "Emily Kuschner" ], "orcid": [ - "https://orcid.org/0000-0003-0792-8322" + "https://orcid.org/0000-0003-1251-1468" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/d940349f-ae79-43ae-8931-2c4b17d14f44" + } ], + "dangling": [], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/f4d7cfd7-30aa-4f19-8601-f85f9689884a", + "id": "https://brain-bbqs.org/id/81d6f976-8ae2-4e38-853a-9e0fe8ac7839", "class": "Investigator", - "label": "Joseph S Neimat", + "label": "Emily Mackevicius", "facts": { "consortium_role": [ - "Principal Investigator (PI)" + "Co-Investigator" ], "name": [ - "Joseph S Neimat" + "Emily Mackevicius" + ], + "orcid": [ + "https://orcid.org/0000-0001-6593-4398" ] }, "out": [ { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" }, { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" - } - ], - "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/b096be30-abda-4dbf-b167-4dea42f69dfa" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/e46a4832-3f63-49d7-acad-8567ed641589" + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" } ], + "in": [], "dangling": [], - "degree": 4, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/00618660-a724-4059-85c1-c6ca3ccc1744", + "id": "https://brain-bbqs.org/id/b050adf2-88b1-42e2-912b-2843d5b96854", "class": "Investigator", - "label": "Joshua Jacobs", + "label": "Emre Ertin", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], "name": [ - "Joshua Jacobs" + "Emre Ertin" ], "orcid": [ - "https://orcid.org/0000-0003-1807-6882" + "https://orcid.org/0000-0001-7815-0728" ] }, "out": [ { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/d1c407f2-001d-44da-ada2-0c59c6f8503a" + "source": "https://brain-bbqs.org/id/role/d0517883-23dc-4702-9f1b-374497c94486" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/9f75488b-59d0-4d50-b7db-869f26066743" + "source": "https://brain-bbqs.org/id/32f14ee1-e0b4-4753-869a-f630f1786682" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/8f896b71-c64d-4041-9f33-f3477caf8b74" } ], "dangling": [], - "degree": 3, + "degree": 5, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/6119344c-d2da-45d1-8d69-ea22d8859dd3", + "id": "https://brain-bbqs.org/id/c2074402-c96d-40c5-8b3c-ad8a8fcf2031", "class": "Investigator", - "label": "Joshua Wu", + "label": "Eran Klein", "facts": { + "consortium_role": [ + "Co-Investigator" + ], "name": [ - "Joshua Wu" + "Eran Klein" + ], + "orcid": [ + "https://orcid.org/0000-0002-0132-5777" ] }, "out": [ { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - } - ], - "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/7ef4da01-8107-42b2-bc56-e4fe58d1c6a2" + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" } ], + "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/0fd7e9bf-a1c2-48ba-b235-75cee07f2fc2", + "id": "https://brain-bbqs.org/id/1f6fa922-b662-4325-aac7-cb622ac10ef3", "class": "Investigator", - "label": "Joy Hirsch", + "label": "Eric Yttri", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], "name": [ - "Joy Hirsch" + "Eric Yttri" + ], + "orcid": [ + "https://orcid.org/0000-0002-7214-1481" ] }, - "out": [], + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + } + ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/66819421-258e-42c3-b30a-5ed7345463e3" + "source": "https://brain-bbqs.org/id/role/b6d62f54-1ff5-4355-8623-69dbe88aa41e" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" + "source": "https://brain-bbqs.org/id/fb3cf5ef-e850-44d2-887c-0d0ef608f48c" } ], "dangling": [], - "degree": 2, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/f3f570c9-991c-4a67-a40a-5f0903f91762", + "id": "https://brain-bbqs.org/id/40a825b2-31fc-4ffe-b686-9b09a1576b33", "class": "Investigator", - "label": "Jyl Boline", + "label": "Erik Johnson", "facts": { "consortium_role": [ - "Project Manager" + "Research Staff (Scientist and others)" ], "name": [ - "Jyl Boline" + "Erik Johnson" ], "orcid": [ - "https://orcid.org/0000-0001-5232-8364" + "https://orcid.org/0000-0002-7397-8531" ] }, - "out": [], + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + } + ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/57b86bca-ace5-49e8-8145-7c49011d8cd6" + "source": "https://brain-bbqs.org/id/role/0dca4f7e-50c2-4cc8-ac51-1cbe7cd5deaa" } ], "dangling": [], - "degree": 1, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/d303b6df-88e0-4e0d-88f6-46b3d45c1ea4", + "id": "https://brain-bbqs.org/id/2f334517-3173-4654-987e-dc44e0e94eb2", "class": "Investigator", - "label": "Kailin Zhuang", + "label": "Eunyoung Kim", "facts": { "consortium_role": [ - "Postdoc/Grad Student" + "NIH Program" ], "name": [ - "Kailin Zhuang" - ], - "orcid": [ - "https://orcid.org/0000-0001-9233-534X" + "Eunyoung Kim" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" - }, + "out": [], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + "predicate": "members", + "source": "https://brain-bbqs.org/id/28609b98-6f97-4a46-b875-9f5084f1c7cd" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/b723b975-9438-4c08-b9b9-404846e31272", + "id": "https://brain-bbqs.org/id/bf6867b2-09d3-4cc3-89ba-b931b646cd42", "class": "Investigator", - "label": "Karen David", + "label": "Eva Dyer", "facts": { "consortium_role": [ - "NIH Program" + "Principal Investigator (PI)" ], "name": [ - "Karen David" + "Eva Dyer" ], "orcid": [ - "https://orcid.org/0009-0002-6652-2283" + "https://orcid.org/0000-0001-6755-0259" ] }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + } ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/3cc135af-1424-4cc9-b54b-978d039ad6d1", - "class": "Investigator", - "label": "Kari Johnson", - "facts": { - "consortium_role": [ - "NIH Program" - ], - "name": [ - "Kari Johnson" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/b8a0aee0-0fb1-4ede-9846-a717a2b63d47" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/92f22292-007f-4091-83e9-10df11f14110" + } ], + "dangling": [], + "degree": 3, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/c3989bae-203d-43b6-8f09-90935634f1d2", + "id": "https://brain-bbqs.org/id/f088160e-1dea-4cb9-b73f-1c30d0e40053", "class": "Investigator", - "label": "Karmiella Ferster", + "label": "Fang Yu Chang", "facts": { "consortium_role": [ - "Research Staff (Scientist and others), Admin" + "Research Staff (Scientist and others)" ], "name": [ - "Karmiella Ferster" + "Fang Yu Chang" ], "orcid": [ - "https://orcid.org/0009-0001-3106-1979" + "https://orcid.org/0000-0002-5511-3876" ] }, "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" - }, { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" @@ -10947,111 +11880,88 @@ { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" - } - ], - "in": [ - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/dbdb11c4-5082-4c5f-b50b-0046aaa0f8d9" } ], + "in": [], "dangling": [], - "degree": 5, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/02f970e3-bc54-4d97-b033-fe732d43fbb3", + "id": "https://brain-bbqs.org/id/36ba050d-e4f4-470c-a780-eddef3b4bab8", "class": "Investigator", - "label": "Katalin Gothard", + "label": "Farah Bader", "facts": { - "consortium_role": [ - "con sultant" - ], "name": [ - "Katalin Gothard" - ], - "orcid": [ - "https://orcid.org/0000-0001-9642-2985" + "Farah Bader" ] }, - "out": [ + "out": [], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + "predicate": "members", + "source": "https://brain-bbqs.org/id/69aa906c-2a0c-4524-8958-4e1009f96060" } ], - "in": [], "dangling": [], "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/d3b32f3b-0a12-4eec-b49e-b9274f934b5a", + "id": "https://brain-bbqs.org/id/e0179c68-8fe6-48ca-9140-84a567b5f661", "class": "Investigator", - "label": "Kate MacDuffie", + "label": "Firooz Aflatouni", "facts": { "consortium_role": [ - "Co-Investigator" + "Principal Investigator (PI)" ], "name": [ - "Kate MacDuffie" - ], - "orcid": [ - "https://orcid.org/0000-0003-1252-4373" + "Firooz Aflatouni" ] }, - "out": [ + "out": [], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/dbaa6f57-01e4-4168-88fa-7fa673a6cf6f" + }, + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/db582fe3-ef66-4a67-aca9-9daec764cd4c" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad" } ], - "in": [], "dangling": [], - "degree": 1, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/47485e5b-3455-44a3-a716-70069176b11f", + "id": "https://brain-bbqs.org/id/961fb77d-16c1-4efd-9fc7-ac7bd552c983", "class": "Investigator", - "label": "Katherine Nagel", + "label": "Flavia Vitale", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], - "external_url": [ - "https://reporter.nih.gov/search/results?pi_id=10793375" - ], "name": [ - "Katherine Nagel" - ], - "research_areas": [ - "Navigation in complex environments", - "Neural activity mapping", - "Stimulus-guided behavior" - ], - "skills": [ - "Neural activity modeling", - "Physical modeling", - "Pose estimation" + "Flavia Vitale" ] }, "out": [], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/0a29a35d-e673-42f7-a590-23f0fe7055f7" + "source": "https://brain-bbqs.org/id/role/f2d69865-0ee2-4b99-81e8-b84658c9eb1e" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/6efc2552-7cd7-4e53-bd2d-41fee6824cf7" + "source": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad" } ], "dangling": [], @@ -11060,31 +11970,33 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/af52d4d6-a0e2-4a87-b747-6ede8ebf212f", + "id": "https://brain-bbqs.org/id/1d3b5b5b-7a52-4380-82f4-931b67831917", "class": "Investigator", - "label": "Katherine Dokholyan", + "label": "Flavio Frohlich", "facts": { "consortium_role": [ - "Research Staff (Scientist and others)" + "Principal Investigator (PI)" + ], + "external_url": [ + "https://reporter.nih.gov/search/results?pi_id=10450045" ], "name": [ - "Katherine Dokholyan" + "Flavio Frohlich" ] }, - "out": [ + "out": [], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/c35db851-d42d-43ad-b30c-64fb5b933dcf" }, { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" - } - ], - "in": [ + "predicate": "members", + "source": "https://brain-bbqs.org/id/52fcb5e7-1274-4621-b368-17f269eaec86" + }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/dbdb11c4-5082-4c5f-b50b-0046aaa0f8d9" + "source": "https://brain-bbqs.org/id/7de07dc9-72c0-4900-be0d-c375d927a6b4" } ], "dangling": [], @@ -11093,244 +12005,267 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/fedfc5af-eb8e-4ee5-88e7-a18ab2f00b26", + "id": "https://brain-bbqs.org/id/53f6094d-cb6e-4899-8b0d-d358b863fab9", "class": "Investigator", - "label": "Katherine W Scangos", + "label": "Gabriella", "facts": { - "consortium_role": [ - "Principal Investigator (PI)" - ], "name": [ - "Katherine W Scangos" - ], - "orcid": [ - "https://orcid.org/0000-0001-7983-7767" + "Gabriella" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" - }, + "out": [], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/cfcdf43e-bc65-4c3b-8046-9429be511ed1" } ], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/0681de3a-08d8-4a60-88c1-65ef2a02a93f", + "class": "Investigator", + "label": "Gabriella Sahyoun", + "facts": { + "consortium_role": [ + "Postdoc/Grad Student" + ], + "name": [ + "Gabriella Sahyoun" + ] + }, + "out": [], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/f9acc694-4a05-45f7-b0be-24c6dd4a7637" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad" + "source": "https://brain-bbqs.org/id/role/068fdb34-5151-4b7f-b854-c9e147bdfcd1" } ], "dangling": [], - "degree": 6, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/a6f825d6-cb5c-4136-9208-eee059bf6f49", + "id": "https://brain-bbqs.org/id/e631bc65-b164-4090-b442-3dacddd2707a", "class": "Investigator", - "label": "Kay Sun", + "label": "Gaurav Patel", "facts": { "consortium_role": [ - "Research Staff (Scientist and others)" + "Co-Investigator" ], "name": [ - "Kay Sun" + "Gaurav Patel" + ], + "orcid": [ + "https://orcid.org/0000-0003-0028-2098" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, + "out": [], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + "predicate": "members", + "source": "https://brain-bbqs.org/id/9f75488b-59d0-4d50-b7db-869f26066743" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/03f8e307-5f04-4d22-9aef-c1bb9d3e6905", + "id": "https://brain-bbqs.org/id/c11ff83b-6ac9-4ebe-992b-f37c931e182b", "class": "Investigator", - "label": "Kenneth Shepard", + "label": "Gordon Shepherd", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], "name": [ - "Kenneth Shepard" + "Gordon Shepherd" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" - } - ], + "out": [], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/99b4e8a5-97d9-4392-9cfd-da2d0cc46470" + "source": "https://brain-bbqs.org/id/role/c3e5b648-cf18-47f4-b514-fc38390d2431" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/6efc2552-7cd7-4e53-bd2d-41fee6824cf7" + "source": "https://brain-bbqs.org/id/ef820011-b44d-40f5-a4ab-2069fa9805df" } ], "dangling": [], - "degree": 3, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/196ba606-dec6-4863-876e-907559234c80", + "id": "https://brain-bbqs.org/id/783ff194-17e8-46d9-bd1f-57ca4070a90c", "class": "Investigator", - "label": "Keyvan Ansarino", + "label": "Grace Hwang", "facts": { "consortium_role": [ - "Postdoc/Grad Student" + "NIH Program" ], "name": [ - "Keyvan Ansarino" + "Grace Hwang" + ], + "orcid": [ + "https://orcid.org/0000-0002-3335-8688" ] }, "out": [ { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - } - ], - "in": [ + }, { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/3cc8ceb9-f7ea-4724-91ed-546efb08242b" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], + "in": [], "dangling": [], "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/5b057d86-6fdd-4b5e-b2ab-111360c5b537", + "id": "https://brain-bbqs.org/id/1a33a814-fbd1-4acf-bc5d-f0077bc180d1", "class": "Investigator", - "label": "KOSTAS DANIILIDIS", + "label": "Gregory Darin Field", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], "external_url": [ - "https://reporter.nih.gov/search/results?pi_id=7030030" + "https://reporter.nih.gov/search/results?pi_id=11483919" ], "name": [ - "KOSTAS DANIILIDIS" + "Gregory Darin Field" + ], + "orcid": [ + "https://orcid.org/0000-0001-7461-8610" ] }, "out": [], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/8f554f84-7a48-4b4a-8032-cbab841613fd" + "source": "https://brain-bbqs.org/id/role/4a0c2ae2-92fd-447a-a95e-419db4773d8f" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad" + "source": "https://brain-bbqs.org/id/32f14ee1-e0b4-4753-869a-f630f1786682" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/93fa0810-51f4-4e71-badf-e5e8d3e40dc3" } ], "dangling": [], - "degree": 2, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/6340c8ee-1d5b-45f0-87ff-c320a38df17d", + "id": "https://brain-bbqs.org/id/e6fb5750-5310-4d85-8beb-4cc8addbd988", "class": "Investigator", - "label": "Kris Williams", + "label": "Han Yi", "facts": { "consortium_role": [ - "Postdoc/Grad Student" + "Co-Investigator" ], "name": [ - "Kris Williams" + "Han Yi" + ], + "orcid": [ + "https://orcid.org/0000-0001-7152-3712" ] }, "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + }, { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/c6847ede-7f3e-4557-9af6-0740d2a0babc" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/1ec93ddb-bb26-4062-9a18-1214bc458102" + "source": "https://brain-bbqs.org/id/role/642bc862-c174-48ba-8b1b-e7c1356e07ab" } ], "dangling": [], - "degree": 3, + "degree": 5, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/0b1dab3b-4478-4149-a41a-72cf69d47788", + "id": "https://brain-bbqs.org/id/6d29e182-e1cd-43d5-9f95-7cfef6ff9396", "class": "Investigator", - "label": "Kristofer Bouchard", + "label": "Holly Moore", "facts": { "consortium_role": [ - "Co-Investigator" + "NIH Program" ], "name": [ - "Kristofer Bouchard" - ], - "orcid": [ - "https://orcid.org/0000-0002-1974-4603" + "Holly Moore" ] }, "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + }, { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [], "dangling": [], - "degree": 1, + "degree": 4, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/79d8d638-23c0-490f-8044-dbe06e0f63b5", + "id": "https://brain-bbqs.org/id/7db5db3c-9f1f-4e01-a942-e05c340cbd8e", "class": "Investigator", - "label": "Kun Zhao", + "label": "Hongkun Zhu", "facts": { "consortium_role": [ "Postdoc/Grad Student" ], "name": [ - "Kun Zhao" + "Hongkun Zhu" + ], + "orcid": [ + "https://orcid.org/0009-0007-2560-9639" ] }, "out": [ @@ -11350,56 +12285,59 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/2a03a500-1fba-4367-85bb-25ce04eaba0e", + "id": "https://brain-bbqs.org/id/538a6b26-2685-4ea8-9f0d-91ae90693108", "class": "Investigator", - "label": "Latane Bullock", + "label": "Hongli Wang", "facts": { "name": [ - "Latane Bullock" + "Hongli Wang" ] }, - "out": [], + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/b359432d-39e2-4ab8-bb3b-16afe458820c", + "id": "https://brain-bbqs.org/id/22edcc49-fd41-4423-92b6-89e7abba292d", "class": "Investigator", - "label": "Laura Cabrera", + "label": "Jacinta Beehner", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], "name": [ - "Laura Cabrera" + "Jacinta Beehner" ], "orcid": [ - "https://orcid.org/0000-0002-6220-7096" + "https://orcid.org/0000-0001-6566-6872" ] }, "out": [ { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/39fa5a3f-6869-4e43-a085-b6d94ee497fa" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/1ec93ddb-bb26-4062-9a18-1214bc458102" + "source": "https://brain-bbqs.org/id/role/9478d651-eb81-4c6f-8b55-4cabb137e46d" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/7924e7d9-5b53-4525-95ef-3f5a6b9112a5" + "source": "https://brain-bbqs.org/id/1c181fed-73e8-46be-8d27-198f64e936ea" } ], "dangling": [], @@ -11408,127 +12346,96 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/b2c565ea-4b4a-4586-9543-e61df6570936", + "id": "https://brain-bbqs.org/id/1e23d697-bec8-48a1-ae97-96434e7343c2", "class": "Investigator", - "label": "Lauren Diaz", + "label": "Jack Grinband", "facts": { "consortium_role": [ - "Ember/DCAIC team" + "Principal Investigator (PI)" + ], + "external_url": [ + "https://reporter.nih.gov/search/results?pi_id=1922654" ], "name": [ - "Lauren Diaz" + "Jack Grinband" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" - } - ], + "out": [], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/7492a89a-dd5f-46af-871d-c6f9a0bd6eb7" - } - ], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/e729b65b-8a22-4dc9-9d4d-d525f33f778f", - "class": "Investigator", - "label": "Lensky Augustin", - "facts": { - "consortium_role": [ - "Postdoc/Grad Student" - ], - "name": [ - "Lensky Augustin" - ] - }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + "source": "https://brain-bbqs.org/id/role/70324d1e-344b-402d-bac2-afd900606e16" }, { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + "predicate": "members", + "source": "https://brain-bbqs.org/id/dbdb11c4-5082-4c5f-b50b-0046aaa0f8d9" } ], - "in": [], "dangling": [], "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/e058af74-abc7-453f-8aa6-93cd056c50e3", + "id": "https://brain-bbqs.org/id/c302f348-ef46-4a60-801c-55a7783ca421", "class": "Investigator", - "label": "Linda Wilbrecht", + "label": "Jacqueline Boccanfuso", "facts": { "consortium_role": [ - "Principal Investigator (PI)" + "Project Manager" ], "name": [ - "Linda Wilbrecht" + "Jacqueline Boccanfuso" ], "orcid": [ - "https://orcid.org/0000-0002-3199-9049" + "https://orcid.org/0000-0003-1307-2268" ] }, "out": [ { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" }, { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" } ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/d2505ade-278d-4203-8ebf-bbc8ebfc48c9" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/8f22c7e2-06f2-4c84-aa53-071dcce8f875" + "source": "https://brain-bbqs.org/id/role/455424c4-b3b7-466e-b6f0-c959fbb74b77" } ], "dangling": [], - "degree": 4, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/d25f9d24-5496-41a5-9a39-b686719d9eb7", + "id": "https://brain-bbqs.org/id/1a8f0486-7381-4156-824c-b2e9ff0dc817", "class": "Investigator", - "label": "Lisa Blaskey", + "label": "Jane Wang", "facts": { "consortium_role": [ - "Co-Investigator" + "Principal Investigator (PI)" ], - "name": [ - "Lisa Blaskey" + "external_url": [ + "https://reporter.nih.gov/search/results?pi_id=79020074" ], - "orcid": [ - "https://orcid.org/0000-0002-5909-3622" + "name": [ + "Jane Wang" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" - } - ], + "out": [], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/295a454b-56ba-4d13-b630-75e3a333f965" + "source": "https://brain-bbqs.org/id/role/fa7fab82-ca22-484b-a5aa-f775d831c4a6" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/6efc2552-7cd7-4e53-bd2d-41fee6824cf7" } ], "dangling": [], @@ -11537,96 +12444,109 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/8b45a6d3-febb-4537-9786-69685e36aa6d", + "id": "https://brain-bbqs.org/id/5ed180e1-004a-49d3-a05f-e8a4da27718f", "class": "Investigator", - "label": "Lizzy Ankudowich", + "label": "Janine Simmons", "facts": { "consortium_role": [ - "NIH program staff" + "NIH Program" ], "name": [ - "Lizzy Ankudowich" + "Janine Simmons" ] }, - "out": [], + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/6f2586d0-5743-4ab9-83b6-915ffa98736a", + "id": "https://brain-bbqs.org/id/afe5dc6f-8e97-48c9-bb79-5af130f1e62a", "class": "Investigator", - "label": "Luis Garcia", + "label": "Jared Reiling", "facts": { "consortium_role": [ - "Co-Investigator" + "Postdoc/Grad Student" ], "name": [ - "Luis Garcia" + "Jared Reiling" ], "orcid": [ - "https://orcid.org/0000-0002-5111-0694" + "https://orcid.org/0000-0003-1942-237X" + ], + "research_areas": [ + "Computational modeling of social behavior" ] }, "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" - }, { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, + } + ], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/cc0de44a-82ef-4fcf-811e-9695a46b47df" }, { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + "predicate": "members", + "source": "https://brain-bbqs.org/id/7de07dc9-72c0-4900-be0d-c375d927a6b4" } ], - "in": [], "dangling": [], - "degree": 4, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/aa9445fe-736e-4a1e-b8a4-4b709c4a6603", + "id": "https://brain-bbqs.org/id/b2e8b421-674b-4e2d-8b61-f1e4a005c4f4", "class": "Investigator", - "label": "Luke Bloy", + "label": "Jarl Haggerty", "facts": { + "consortium_role": [ + "Application Developer" + ], "name": [ - "Luke Bloy" + "Jarl Haggerty" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/9200c2fb-5bea-4d89-9115-1064c1387222" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad" + } ], + "dangling": [], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/6cedc563-ca67-467e-9c98-48b5b67123de", + "id": "https://brain-bbqs.org/id/0823bcd5-786e-4d68-91b0-95bdec0b5d37", "class": "Investigator", - "label": "Luke Shaw", + "label": "Jeff Munson", "facts": { "consortium_role": [ - "Postdoc/Grad Student" + "Co-Investigator, Data Manager/Submitter" ], "name": [ - "Luke Shaw" + "Jeff Munson" ], "orcid": [ - "https://orcid.org/0000-0003-3886-9740" + "https://orcid.org/0000-0003-1798-8927" ] }, "out": [ @@ -11636,13 +12556,34 @@ }, { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + } + ], + "in": [], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/7a5a1c11-f5f8-4643-b444-71228b1f298a", + "class": "Investigator", + "label": "Jeffery Walker", + "facts": { + "name": [ + "Jeffery Walker" + ] + }, + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" } ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/4d3e76c2-2bbb-43b6-9950-982b6ac296cd" + "source": "https://brain-bbqs.org/id/role/baae3ddb-11fc-48ce-a5f1-23a481b233da" }, { "predicate": "members", @@ -11650,117 +12591,129 @@ } ], "dangling": [], - "degree": 4, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/a3de5020-ea6c-41c1-b397-3e0f6d43e98a", + "id": "https://brain-bbqs.org/id/e1424ffb-1cc6-4d9a-932e-464c967a68f9", "class": "Investigator", - "label": "Mang Gao", + "label": "Jeffrey Walker", + "facts": { + "name": [ + "Jeffrey Walker" + ] + }, + "out": [], + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/5fd6169e-d169-41be-8cd0-e8a691f0b345", + "class": "Investigator", + "label": "Jennie Grammer", "facts": { "consortium_role": [ - "Postdoc/Grad Student" + "Principal Investigator (PI)" ], "name": [ - "Mang Gao" - ], - "orcid": [ - "https://orcid.org/0009-0002-0379-8655" + "Jennie Grammer" ] }, "out": [ { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" } ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/0b8db858-64e3-41bc-8ecc-948b44cdf963" + "source": "https://brain-bbqs.org/id/role/4ee3ec6b-290f-4731-b8af-788bc47217e8" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/32f14ee1-e0b4-4753-869a-f630f1786682" } ], "dangling": [], - "degree": 2, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/db663fc5-af00-457b-beb7-f9ee831eef71", + "id": "https://brain-bbqs.org/id/353d2c1b-0f19-47a0-98be-6a721845c0c2", "class": "Investigator", - "label": "Mansi Srivastava", + "label": "Jennifer Wagner", "facts": { "consortium_role": [ - "Assistant Professor" - ], - "external_url": [ - "https://reporter.nih.gov/search/results?pi_id=14227655" + "Co-Investigator" ], "name": [ - "Mansi Srivastava" - ], - "research_areas": [ - "Organism-environment interaction", - "Regeneration behavior" + "Jennifer Wagner" ], - "skills": [ - "Behavioral segmentation", - "Dimensionality reduction", - "Pose estimation", - "Synchronization" + "orcid": [ + "https://orcid.org/0000-0002-2278-0306" ] }, - "out": [], - "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/f33023b3-374b-44c3-a158-5487f3bbfafc" - }, + "out": [ { - "predicate": "members", - "source": "https://brain-bbqs.org/id/99bc7f7b-2a3d-4e34-99f1-ec08e12133b2" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" } ], + "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/bab963f7-54f8-4b01-a914-de675535b004", + "id": "https://brain-bbqs.org/id/0a076358-2298-4693-b3cf-d75114552163", "class": "Investigator", - "label": "Mara Baylis", + "label": "John Rogers", "facts": { "consortium_role": [ - "Postdoc/Grad Student" + "Co-Investigator" ], "name": [ - "Mara Baylis" + "John Rogers" ] }, - "out": [ + "out": [], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/9217ceed-1e78-4c40-b15b-66077b5569db" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/e46a4832-3f63-49d7-acad-8567ed641589" } ], - "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/98076d7b-270f-4a2a-af91-53d1b7644c90", + "id": "https://brain-bbqs.org/id/f0d2d9d0-b5e5-4f52-a40d-0d5a06229b14", "class": "Investigator", - "label": "Marc Schmidt", + "label": "John Welsh", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], "name": [ - "Marc Schmidt" + "John Welsh" + ], + "orcid": [ + "https://orcid.org/0000-0002-1012-4360" ] }, "out": [ @@ -11768,6 +12721,10 @@ "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + }, { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" @@ -11776,39 +12733,42 @@ "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/b6d6fbfc-f005-41e9-8e22-6651720030f6" + "source": "https://brain-bbqs.org/id/role/b5ea3f60-fb2d-4b61-b6ca-04c67600b8b0" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad" + "source": "https://brain-bbqs.org/id/db72ef76-b8e2-4d0e-85da-c8d475d70628" } ], "dangling": [], - "degree": 4, + "degree": 5, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/d3cae382-1e79-42c1-8f37-75cd049d0ff6", + "id": "https://brain-bbqs.org/id/75313083-49bd-45dd-a4a2-fd5fc0bf8949", "class": "Investigator", - "label": "Marcela Benitez", + "label": "Jonathan E. Rubin", "facts": { "consortium_role": [ - "Co-Investigator" + "Principal Investigator (PI)" + ], + "external_url": [ + "https://reporter.nih.gov/search/results?pi_id=8849791" ], "name": [ - "Marcela Benitez" + "Jonathan E. Rubin" ] }, "out": [], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/73cef7ce-8dbb-48ba-8ee3-bcc0cca5fce8" + "source": "https://brain-bbqs.org/id/role/6e99e32c-bc60-4da2-80ac-d6438cc1d6c6" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/1c181fed-73e8-46be-8d27-198f64e936ea" + "source": "https://brain-bbqs.org/id/fb3cf5ef-e850-44d2-887c-0d0ef608f48c" } ], "dangling": [], @@ -11817,185 +12777,199 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/850426b4-fca0-4cfc-a528-60b11208e652", + "id": "https://brain-bbqs.org/id/e055175b-7bfb-471e-8e80-d8697b484b9d", "class": "Investigator", - "label": "Marcia Patchan", + "label": "Jongwoon Kim", "facts": { "consortium_role": [ - "Research Staff (Scientist and others)" + "Postdoc/Grad Student" ], "name": [ - "Marcia Patchan" - ], - "orcid": [ - "https://orcid.org/0000-0002-0485-0403" + "Jongwoon Kim" ] }, "out": [], - "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/3d7151df-4a2b-40cd-97ae-0f695e5d237e" - } - ], + "in": [], "dangling": [], - "degree": 1, - "flags": [], + "degree": 0, + "flags": [ + "isolated" + ], "violations": [] }, { - "id": "https://brain-bbqs.org/id/5f18877b-67fd-4779-be9a-d859314e0b4a", + "id": "https://brain-bbqs.org/id/eaa38acf-84a1-44ce-a1c6-eda307583731", "class": "Investigator", - "label": "Mark Tiede", + "label": "Joost Wagenaar", "facts": { "consortium_role": [ - "Co-Investigator" + "Data Infrastructure support" ], "name": [ - "Mark Tiede" + "Joost Wagenaar" ] }, "out": [ { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + } + ], + "in": [ + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/68749a60-249f-4eb2-ad4a-7ae78c76a2f9" }, { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + "predicate": "members", + "source": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/b2b7ce80-8dbf-4cf8-804c-9daebe9a9fa5", + "id": "https://brain-bbqs.org/id/ee077b61-eb2c-4cd9-b587-a46418c45265", "class": "Investigator", - "label": "Markus Meister", + "label": "Jorge Ortiz", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], "name": [ - "Markus Meister" + "Jorge Ortiz" ], "orcid": [ - "https://orcid.org/0000-0003-2136-6506" - ], - "research_areas": [ - "Biophysics", - "Neuroscience" + "https://orcid.org/0000-0003-3325-1298" ] }, "out": [ { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/182058c5-770d-4ac3-984a-ea1f4d8d48f1" + "source": "https://brain-bbqs.org/id/role/8c42852d-0c57-4a3e-b874-3ba8874287a7" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/1424d10f-795c-47e5-a6d7-d6705fad611a" + "source": "https://brain-bbqs.org/id/9f75488b-59d0-4d50-b7db-869f26066743" } ], "dangling": [], - "degree": 4, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/20d3bb9f-8cbe-45b8-974e-1c84e0d9631f", + "id": "https://brain-bbqs.org/id/189027bf-98cc-4173-8571-06759988ff2b", "class": "Investigator", - "label": "Marta da Rocha Diogo", + "label": "Joseph Colonel", "facts": { "consortium_role": [ - "Research Staff (Scientist and others)" + "Postdoc/Grad Student" ], "name": [ - "Marta da Rocha Diogo" + "Joseph Colonel" ], - "research_areas": [ - "Ethics", - "Law", - "Regulation" + "orcid": [ + "https://orcid.org/0009-0000-5516-9231" ] }, "out": [ { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" - } - ], - "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/d1bb4677-b510-48ad-a89b-680830403a37" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/7924e7d9-5b53-4525-95ef-3f5a6b9112a5" + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" } ], + "in": [], "dangling": [], - "degree": 3, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/d69b71df-b5e8-490c-8df0-5a7883fac0d5", + "id": "https://brain-bbqs.org/id/5899fd56-4c11-41a1-8b0a-4e1785820391", "class": "Investigator", - "label": "Maryam Shanechi", + "label": "Joseph Monaco", + "facts": { + "consortium_role": [ + "NIH Program" + ], + "name": [ + "Joseph Monaco" + ], + "orcid": [ + "https://orcid.org/0000-0003-0792-8322" + ] + }, + "out": [], + "in": [ + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/208980e9-92b9-447e-a2ca-e83bf61db159" + } + ], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/f4d7cfd7-30aa-4f19-8601-f85f9689884a", + "class": "Investigator", + "label": "Joseph S Neimat", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], "name": [ - "Maryam Shanechi" + "Joseph S Neimat" ] }, "out": [ { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/2849f8eb-0feb-48ba-b73e-577eb81e4b91" + "source": "https://brain-bbqs.org/id/role/b096be30-abda-4dbf-b167-4dea42f69dfa" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/180457cc-1c85-4ee9-a13c-7fc8023528c3" + "source": "https://brain-bbqs.org/id/e46a4832-3f63-49d7-acad-8567ed641589" } ], "dangling": [], - "degree": 3, + "degree": 4, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/0ded1b71-e572-475b-8457-bf370ed6335f", + "id": "https://brain-bbqs.org/id/00618660-a724-4059-85c1-c6ca3ccc1744", "class": "Investigator", - "label": "Matt Levine", + "label": "Joshua Jacobs", "facts": { "consortium_role": [ - "Research Staff (Scientist and others)" + "Principal Investigator (PI)" ], "name": [ - "Matt Levine" + "Joshua Jacobs" + ], + "orcid": [ + "https://orcid.org/0000-0003-1807-6882" ] }, "out": [ @@ -12004,163 +12978,153 @@ "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" } ], - "in": [], + "in": [ + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/d1c407f2-001d-44da-ada2-0c59c6f8503a" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/9f75488b-59d0-4d50-b7db-869f26066743" + } + ], "dangling": [], - "degree": 1, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/2984e917-2448-4596-9648-b52dc92b2c5d", + "id": "https://brain-bbqs.org/id/6119344c-d2da-45d1-8d69-ea22d8859dd3", "class": "Investigator", - "label": "Mattson Ogg", + "label": "Joshua Wu", "facts": { - "consortium_role": [ - "Research Staff (Scientist and others)" - ], "name": [ - "Mattson Ogg" - ], - "orcid": [ - "https://orcid.org/0009-0004-5583-0586" + "Joshua Wu" ] }, "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" - }, { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/145ca46a-181b-4fb5-b546-3522f659e770" + "source": "https://brain-bbqs.org/id/role/7ef4da01-8107-42b2-bc56-e4fe58d1c6a2" } ], "dangling": [], - "degree": 5, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/57f1a4fe-523b-4963-b6e6-a38c7da47500", + "id": "https://brain-bbqs.org/id/0fd7e9bf-a1c2-48ba-b235-75cee07f2fc2", "class": "Investigator", - "label": "Mauricio Rangel-Gomez", + "label": "Joy Hirsch", "facts": { "consortium_role": [ - "NIH Program" + "Principal Investigator (PI)" ], "name": [ - "Mauricio Rangel-Gomez" + "Joy Hirsch" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, + "out": [], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/66819421-258e-42c3-b30a-5ed7345463e3" }, { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + "predicate": "members", + "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" } ], - "in": [], "dangling": [], - "degree": 4, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/ea29a939-e638-4a3c-8d28-1edda890490a", + "id": "https://brain-bbqs.org/id/f3f570c9-991c-4a67-a40a-5f0903f91762", "class": "Investigator", - "label": "Mauricio Vallejo Martelo", + "label": "Jyl Boline", "facts": { "consortium_role": [ - "Research Staff (Scientist and others)" + "Project Manager" ], "name": [ - "Mauricio Vallejo Martelo" + "Jyl Boline" ], "orcid": [ - "https://orcid.org/0000-0002-8922-6895" + "https://orcid.org/0000-0001-5232-8364" ] }, - "out": [ + "out": [], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/57b86bca-ace5-49e8-8145-7c49011d8cd6" } ], - "in": [], "dangling": [], "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/37453416-6149-4fee-b9b9-a427b800ffe7", + "id": "https://brain-bbqs.org/id/d303b6df-88e0-4e0d-88f6-46b3d45c1ea4", "class": "Investigator", - "label": "Meaghan Perdue", + "label": "Kailin Zhuang", "facts": { "consortium_role": [ - "Admin" + "Postdoc/Grad Student" ], "name": [ - "Meaghan Perdue" + "Kailin Zhuang" ], "orcid": [ - "https://orcid.org/0000-0002-6113-9175" + "https://orcid.org/0000-0001-9233-534X" ] }, - "out": [], + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/1b1f912c-a054-4bd1-a6b8-748f902e53f4", + "id": "https://brain-bbqs.org/id/b723b975-9438-4c08-b9b9-404846e31272", "class": "Investigator", - "label": "Meghan Cum", + "label": "Karen David", "facts": { "consortium_role": [ - "Postdoc/Grad Student" + "NIH Program" ], "name": [ - "Meghan Cum" + "Karen David" ], "orcid": [ - "https://orcid.org/0009-0004-9299-992X" + "https://orcid.org/0009-0002-6652-2283" ] }, "out": [], "in": [ { "predicate": "members", - "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" + "source": "https://brain-bbqs.org/id/69aa906c-2a0c-4524-8958-4e1009f96060" } ], "dangling": [], @@ -12169,132 +13133,119 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/99e94e46-f0af-4d3d-8ffd-ff522c4761db", + "id": "https://brain-bbqs.org/id/3cc135af-1424-4cc9-b54b-978d039ad6d1", "class": "Investigator", - "label": "Melissa Kline Struhl", + "label": "Kari Johnson", "facts": { + "consortium_role": [ + "NIH Program" + ], "name": [ - "Melissa Kline Struhl" + "Kari Johnson" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/208980e9-92b9-447e-a2ca-e83bf61db159" + } ], + "dangling": [], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/0f3bb33c-e7ee-4013-af5d-894d1adfa0ee", + "id": "https://brain-bbqs.org/id/c3989bae-203d-43b6-8f09-90935634f1d2", "class": "Investigator", - "label": "Melissa Kline Struhl", + "label": "Karmiella Ferster", "facts": { "consortium_role": [ - "Research Staff (Scientist and others), (DCAIC)" + "Research Staff (Scientist and others), Admin" ], "name": [ - "Melissa Kline Struhl" + "Karmiella Ferster" ], "orcid": [ - "https://orcid.org/0000-0003-2217-9331" + "https://orcid.org/0009-0001-3106-1979" ] }, "out": [ { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/eed7f06b-7ec2-42e5-8307-da70b41c7482" - }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/7924e7d9-5b53-4525-95ef-3f5a6b9112a5" + "source": "https://brain-bbqs.org/id/dbdb11c4-5082-4c5f-b50b-0046aaa0f8d9" } ], "dangling": [], - "degree": 3, + "degree": 5, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/d0f582a1-20fd-43ca-a9f1-21bf0ee548c1", + "id": "https://brain-bbqs.org/id/02f970e3-bc54-4d97-b033-fe732d43fbb3", "class": "Investigator", - "label": "Mengsen Zhang", + "label": "Katalin Gothard", "facts": { "consortium_role": [ - "Principal Investigator (PI)" + "con sultant" ], "name": [ - "Mengsen Zhang" + "Katalin Gothard" ], "orcid": [ - "https://orcid.org/0000-0003-3085-152X" + "https://orcid.org/0000-0001-9642-2985" ] }, "out": [ { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - } - ], - "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/dce97439-b94a-4549-af78-4839bc63d315" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/7de07dc9-72c0-4900-be0d-c375d927a6b4" + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], + "in": [], "dangling": [], - "degree": 3, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/4412f5e5-aba7-49fb-876c-618f59f9b226", + "id": "https://brain-bbqs.org/id/d3b32f3b-0a12-4eec-b49e-b9274f934b5a", "class": "Investigator", - "label": "Merav Sabri", - "facts": { - "name": [ - "Merav Sabri" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/0f8bad99-d648-46e7-97cc-a669746511ee", - "class": "Investigator", - "label": "Michael Genecin", + "label": "Kate MacDuffie", "facts": { "consortium_role": [ - "Postdoc/Grad Student" + "Co-Investigator" ], "name": [ - "Michael Genecin" + "Kate MacDuffie" ], "orcid": [ - "https://orcid.org/0009-0006-3931-7752" + "https://orcid.org/0000-0003-1252-4373" ] }, "out": [ { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" } ], "in": [], @@ -12304,29 +13255,39 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/fd89f05c-a37e-4d93-80fc-47dfc8aa3931", + "id": "https://brain-bbqs.org/id/47485e5b-3455-44a3-a716-70069176b11f", "class": "Investigator", - "label": "Michael Tadross", + "label": "Katherine Nagel", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], + "external_url": [ + "https://reporter.nih.gov/search/results?pi_id=10793375" + ], "name": [ - "Michael Tadross" + "Katherine Nagel" ], - "orcid": [ - "https://orcid.org/0000-0002-7752-6380" + "research_areas": [ + "Navigation in complex environments", + "Neural activity mapping", + "Stimulus-guided behavior" + ], + "skills": [ + "Neural activity modeling", + "Physical modeling", + "Pose estimation" ] }, "out": [], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/a31e280c-89d7-4d68-b3a3-4ecc10429cee" + "source": "https://brain-bbqs.org/id/role/0a29a35d-e673-42f7-a590-23f0fe7055f7" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/93fa0810-51f4-4e71-badf-e5e8d3e40dc3" + "source": "https://brain-bbqs.org/id/6efc2552-7cd7-4e53-bd2d-41fee6824cf7" } ], "dangling": [], @@ -12335,101 +13296,66 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/e6d4c722-8089-4163-901c-3a77f6a2a90b", + "id": "https://brain-bbqs.org/id/af52d4d6-a0e2-4a87-b747-6ede8ebf212f", "class": "Investigator", - "label": "Mina Kim", + "label": "Katherine Dokholyan", "facts": { "consortium_role": [ "Research Staff (Scientist and others)" ], "name": [ - "Mina Kim" - ], - "orcid": [ - "https://orcid.org/0000-0003-2019-5944" + "Katherine Dokholyan" ] }, "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + }, { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" } ], - "in": [], - "dangling": [], - "degree": 1, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/24703152-c43b-4f4f-8d73-65f3ef490ff0", - "class": "Investigator", - "label": "Ming Zhan", - "facts": { - "name": [ - "Ming Zhan" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/27d7f30b-e152-4999-a63e-8dd4e800f3bc", - "class": "Investigator", - "label": "Monika P. Jadi", - "facts": { - "consortium_role": [ - "Principal Investigator (PI)" - ], - "external_url": [ - "https://reporter.nih.gov/search/results?pi_id=11331514" - ], - "name": [ - "Monika P. Jadi" - ] - }, - "out": [], "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/cee6c154-1e7f-4a7a-afa7-5117b7f7e384" - }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" + "source": "https://brain-bbqs.org/id/dbdb11c4-5082-4c5f-b50b-0046aaa0f8d9" } ], "dangling": [], - "degree": 2, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/3d87d6b0-c802-4610-813b-86b94e3e76d6", + "id": "https://brain-bbqs.org/id/fedfc5af-eb8e-4ee5-88e7-a18ab2f00b26", "class": "Investigator", - "label": "Muhammad Parvaz", + "label": "Katherine W Scangos", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], "name": [ - "Muhammad Parvaz" + "Katherine W Scangos" ], "orcid": [ - "https://orcid.org/0000-0002-2671-2327" + "https://orcid.org/0000-0001-7983-7767" ] }, "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + }, { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + }, { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" @@ -12438,38 +13364,28 @@ "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/43ee45a2-22ea-4e73-9885-1efe24dc4caf" + "source": "https://brain-bbqs.org/id/role/f9acc694-4a05-45f7-b0be-24c6dd4a7637" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/dbdb11c4-5082-4c5f-b50b-0046aaa0f8d9" + "source": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad" } ], "dangling": [], - "degree": 4, + "degree": 6, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/5f8ac3c4-a0fb-44d6-ae2d-b505816d4141", + "id": "https://brain-bbqs.org/id/a6f825d6-cb5c-4136-9208-eee059bf6f49", "class": "Investigator", - "label": "Nader Nikbakht", + "label": "Kay Sun", "facts": { "consortium_role": [ "Research Staff (Scientist and others)" ], "name": [ - "Nader Nikbakht" - ], - "orcid": [ - "https://orcid.org/0000-0002-9726-9115" - ], - "research_areas": [ - "Behavioral neuroscience", - "Computational and systems neuroscience", - "Neural computation", - "Neuro-AI", - "neurobiology" + "Kay Sun" ] }, "out": [ @@ -12482,206 +13398,151 @@ "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], - "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/d530f31d-a94a-4d0d-8e40-3c41610d768a" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/7924e7d9-5b53-4525-95ef-3f5a6b9112a5" - } - ], + "in": [], "dangling": [], - "degree": 4, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/28aec8d8-5202-4574-9a96-b01ddb53aeb4", + "id": "https://brain-bbqs.org/id/03f8e307-5f04-4d22-9aef-c1bb9d3e6905", "class": "Investigator", - "label": "Nancy Padilla Coreano", + "label": "Kenneth Shepard", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], "name": [ - "Nancy Padilla Coreano" + "Kenneth Shepard" ] }, - "out": [], + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + } + ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/3300103b-a7d5-4bdd-8f50-24fb3e24767a" + "source": "https://brain-bbqs.org/id/role/99b4e8a5-97d9-4392-9cfd-da2d0cc46470" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/622f970b-e529-441d-b5f3-739025a38aa9" + "source": "https://brain-bbqs.org/id/6efc2552-7cd7-4e53-bd2d-41fee6824cf7" } ], "dangling": [], - "degree": 2, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/68fe4ee2-5beb-4a6e-ac58-2d31ad350cfd", + "id": "https://brain-bbqs.org/id/196ba606-dec6-4863-876e-907559234c80", "class": "Investigator", - "label": "NANTHIA W SUTHANA", + "label": "Keyvan Ansarino", "facts": { "consortium_role": [ - "Principal Investigator (PI)" - ], - "external_url": [ - "https://reporter.nih.gov/search/results?pi_id=8630217" + "Postdoc/Grad Student" ], "name": [ - "NANTHIA W SUTHANA" - ], - "research_areas": [ - "Approach-avoidance behavior", - "Neural-peripheral coupling", - "Stress response quantification" - ], - "skills": [ - "Decoding models", - "Dimensionality reduction", - "Dynamical systems modeling", - "Signal processing" + "Keyvan Ansarino" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/eedb7237-95d4-4633-8431-0a94da8db187" - }, + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + } + ], + "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/3dba6e02-b3c4-4cc8-89d8-bd8ef07d5341" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/32f14ee1-e0b4-4753-869a-f630f1786682" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/93fa0810-51f4-4e71-badf-e5e8d3e40dc3" + "source": "https://brain-bbqs.org/id/role/3cc8ceb9-f7ea-4724-91ed-546efb08242b" } ], "dangling": [], - "degree": 4, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/7a2ad901-f50d-40bc-a404-b4ef0c33944b", + "id": "https://brain-bbqs.org/id/5b057d86-6fdd-4b5e-b2ab-111360c5b537", "class": "Investigator", - "label": "Nathan Christopher Shaner", + "label": "KOSTAS DANIILIDIS", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], "external_url": [ - "https://reporter.nih.gov/search/results?pi_id=10362438" + "https://reporter.nih.gov/search/results?pi_id=7030030" ], "name": [ - "Nathan Christopher Shaner" - ], - "research_areas": [ - "Brain-body interaction modeling", - "Effort-based decision making" - ], - "skills": [ - "Dynamical systems modeling", - "Latent variable modeling", - "Multimodal classification" + "KOSTAS DANIILIDIS" ] }, "out": [], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/bf82a7b1-f5dc-4ec7-8117-927452fa5027" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/6efc2552-7cd7-4e53-bd2d-41fee6824cf7" + "source": "https://brain-bbqs.org/id/role/8f554f84-7a48-4b4a-8032-cbab841613fd" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/d2821755-977a-46a2-a089-169f6e66aeea" + "source": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad" } ], "dangling": [], - "degree": 3, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/82e9264e-8bec-4d1e-ab39-9e42f8f5384d", + "id": "https://brain-bbqs.org/id/6340c8ee-1d5b-45f0-87ff-c320a38df17d", "class": "Investigator", - "label": "Neha Thomas", + "label": "Kris Williams", "facts": { "consortium_role": [ - "Research Staff (Scientist and others)" + "Postdoc/Grad Student" ], "name": [ - "Neha Thomas" + "Kris Williams" ] }, "out": [ { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" } ], - "in": [], - "dangling": [], - "degree": 3, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/2eafb009-97ac-4492-97fe-b77490371b34", - "class": "Investigator", - "label": "Nelleke van Wouwe", - "facts": { - "name": [ - "Nelleke van Wouwe" - ] - }, - "out": [], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/776f6ad8-5dbf-4a6b-a49e-4bdff826a969" + "source": "https://brain-bbqs.org/id/role/c6847ede-7f3e-4557-9af6-0740d2a0babc" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/1ec93ddb-bb26-4062-9a18-1214bc458102" } ], "dangling": [], - "degree": 1, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/a82b872c-fb47-43ba-9d01-258026913f06", + "id": "https://brain-bbqs.org/id/0b1dab3b-4478-4149-a41a-72cf69d47788", "class": "Investigator", - "label": "Nick Jourjine", + "label": "Kristofer Bouchard", "facts": { "consortium_role": [ - "Research Staff (Scientist and others)" + "Co-Investigator" ], "name": [ - "Nick Jourjine" + "Kristofer Bouchard" + ], + "orcid": [ + "https://orcid.org/0000-0002-1974-4603" ] }, "out": [ @@ -12697,25 +13558,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/42fcde10-7fc8-4243-9c6f-845abf7d194c", + "id": "https://brain-bbqs.org/id/79d8d638-23c0-490f-8044-dbe06e0f63b5", "class": "Investigator", - "label": "Nicole Guittari", + "label": "Kun Zhao", "facts": { "consortium_role": [ - "Research Staff (Scientist and others)" + "Postdoc/Grad Student" ], "name": [ - "Nicole Guittari" + "Kun Zhao" ] }, "out": [ { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" }, { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [], @@ -12725,36 +13586,12 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/b0b69ef8-90b3-481a-b095-a01f1ddf4663", - "class": "Investigator", - "label": "Nicole Stock", - "facts": { - "consortium_role": [ - "Research Staff (Scientist and others)" - ], - "name": [ - "Nicole Stock" - ] - }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" - } - ], - "in": [], - "dangling": [], - "degree": 1, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/eff6d625-81ad-4a38-9f8e-93a2ae06c7af", + "id": "https://brain-bbqs.org/id/2a03a500-1fba-4367-85bb-25ce04eaba0e", "class": "Investigator", - "label": "Nicole Tregoning", + "label": "Latane Bullock", "facts": { "name": [ - "Nicole Tregoning" + "Latane Bullock" ] }, "out": [], @@ -12767,93 +13604,115 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/af80d437-679c-42d0-aeed-fc7129b8a7b7", + "id": "https://brain-bbqs.org/id/b359432d-39e2-4ab8-bb3b-16afe458820c", "class": "Investigator", - "label": "Niegil Francis", + "label": "Laura Cabrera", "facts": { "consortium_role": [ - "Research Staff (Scientist and others)" + "Principal Investigator (PI)" ], "name": [ - "Niegil Francis" + "Laura Cabrera" + ], + "orcid": [ + "https://orcid.org/0000-0002-6220-7096" ] }, "out": [ { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" } ], "in": [ + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/39fa5a3f-6869-4e43-a085-b6d94ee497fa" + }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/5b794afd-cf08-4107-81c8-522a29714830" + "source": "https://brain-bbqs.org/id/1ec93ddb-bb26-4062-9a18-1214bc458102" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/7924e7d9-5b53-4525-95ef-3f5a6b9112a5" } ], "dangling": [], - "degree": 2, + "degree": 4, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/83e96042-a116-4e27-ab65-787db78d29f2", + "id": "https://brain-bbqs.org/id/b2c565ea-4b4a-4586-9543-e61df6570936", "class": "Investigator", - "label": "Niegil Francis Muttath Joseph", + "label": "Lauren Diaz", "facts": { + "consortium_role": [ + "Ember/DCAIC team" + ], "name": [ - "Niegil Francis Muttath Joseph" + "Lauren Diaz" ] }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + } ], + "in": [ + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/7492a89a-dd5f-46af-871d-c6f9a0bd6eb7" + } + ], + "dangling": [], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/95406597-a11e-4809-834d-8a6926c32164", + "id": "https://brain-bbqs.org/id/e729b65b-8a22-4dc9-9d4d-d525f33f778f", "class": "Investigator", - "label": "Nima Dehghani", + "label": "Lensky Augustin", "facts": { - "name": [ - "Nima Dehghani" + "consortium_role": [ + "Postdoc/Grad Student" ], - "orcid": [ - "https://orcid.org/0000-0003-2032-8903" + "name": [ + "Lensky Augustin" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/540b143e-459b-41df-98bd-9ec0b18d9bd6" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" }, { - "predicate": "members", - "source": "https://brain-bbqs.org/id/7924e7d9-5b53-4525-95ef-3f5a6b9112a5" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], + "in": [], "dangling": [], "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/a72c6169-713d-49ef-b9c2-4d9d05247473", + "id": "https://brain-bbqs.org/id/e058af74-abc7-453f-8aa6-93cd056c50e3", "class": "Investigator", - "label": "Nishant Rao", + "label": "Linda Wilbrecht", "facts": { "consortium_role": [ - "Research Staff (Scientist and others), Postdoc/Grad Student" + "Principal Investigator (PI)" ], "name": [ - "Nishant Rao" + "Linda Wilbrecht" ], "orcid": [ - "https://orcid.org/0009-0007-4272-8189" + "https://orcid.org/0000-0002-3199-9049" ] }, "out": [ @@ -12861,19 +13720,19 @@ "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" - }, { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [ + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/d2505ade-278d-4203-8ebf-bbc8ebfc48c9" + }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" + "source": "https://brain-bbqs.org/id/8f22c7e2-06f2-4c84-aa53-071dcce8f875" } ], "dangling": [], @@ -12882,67 +13741,74 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/6450030e-c137-4842-8bae-8d6dd913c50b", + "id": "https://brain-bbqs.org/id/d25f9d24-5496-41a5-9a39-b686719d9eb7", "class": "Investigator", - "label": "Nithin Sugavanam", + "label": "Lisa Blaskey", "facts": { "consortium_role": [ - "Research Staff (Scientist and others), Postdoc/Grad Student" + "Co-Investigator" ], "name": [ - "Nithin Sugavanam" + "Lisa Blaskey" + ], + "orcid": [ + "https://orcid.org/0000-0002-5909-3622" ] }, "out": [ { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + } + ], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/295a454b-56ba-4d13-b630-75e3a333f965" } ], - "in": [], "dangling": [], "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/639e73b5-6a6d-46f1-82a8-b466d7e3bdbb", + "id": "https://brain-bbqs.org/id/8b45a6d3-febb-4537-9786-69685e36aa6d", "class": "Investigator", - "label": "Olha Metenko", + "label": "Lizzy Ankudowich", "facts": { "consortium_role": [ - "Postdoc/Grad Student" + "NIH program staff" ], "name": [ - "Olha Metenko" + "Lizzy Ankudowich" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/28609b98-6f97-4a46-b875-9f5084f1c7cd" + } ], + "dangling": [], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/54ef6069-cc01-4d5b-9aaa-8ef9e1505001", + "id": "https://brain-bbqs.org/id/6f2586d0-5743-4ab9-83b6-915ffa98736a", "class": "Investigator", - "label": "Oliver Ruebel", + "label": "Luis Garcia", "facts": { "consortium_role": [ "Co-Investigator" ], "name": [ - "Oliver Ruebel" + "Luis Garcia" ], "orcid": [ - "https://orcid.org/0000-0001-9902-1984" + "https://orcid.org/0000-0002-5111-0694" ] }, "out": [ @@ -12950,49 +13816,39 @@ "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + }, { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [], "dangling": [], - "degree": 2, + "degree": 4, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/17b63cd3-e0b6-47c0-97ca-58ef6197e8e4", + "id": "https://brain-bbqs.org/id/aa9445fe-736e-4a1e-b8a4-4b709c4a6603", "class": "Investigator", - "label": "Omid Sharafi", + "label": "Luke Bloy", "facts": { "name": [ - "Omid Sharafi" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/608bd920-0a69-4a7a-a0fe-0740195f0c64", - "class": "Investigator", - "label": "Parastoo Azizeddin", - "facts": { - "name": [ - "Parastoo Azizeddin" + "Luke Bloy" ] }, "out": [], "in": [ { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/e165b281-959b-4738-b6c6-cd404994d003" + "predicate": "members", + "source": "https://brain-bbqs.org/id/f28a2f16-5259-4e2f-9c8e-a5d11d2b5c5f" } ], "dangling": [], @@ -13001,18 +13857,18 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/709c64f2-d02c-48f9-b286-b9222a106f27", + "id": "https://brain-bbqs.org/id/6cedc563-ca67-467e-9c98-48b5b67123de", "class": "Investigator", - "label": "Patrick McGrath", + "label": "Luke Shaw", "facts": { "consortium_role": [ - "Principal Investigator (PI)" + "Postdoc/Grad Student" ], "name": [ - "Patrick McGrath" + "Luke Shaw" ], "orcid": [ - "https://orcid.org/0000-0002-1598-3746" + "https://orcid.org/0000-0003-3886-9740" ] }, "out": [ @@ -13028,11 +13884,11 @@ "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/0bfdefd7-14a0-48aa-93c2-9f80f19e8e72" + "source": "https://brain-bbqs.org/id/role/4d3e76c2-2bbb-43b6-9950-982b6ac296cd" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/92f22292-007f-4091-83e9-10df11f14110" + "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" } ], "dangling": [], @@ -13041,54 +13897,30 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/223a91b2-1ffb-49e6-9cd7-d97f6f2beece", + "id": "https://brain-bbqs.org/id/a3de5020-ea6c-41c1-b397-3e0f6d43e98a", "class": "Investigator", - "label": "Petar M Djuric", + "label": "Mang Gao", "facts": { "consortium_role": [ - "Principal Investigator (PI)" + "Postdoc/Grad Student" ], "name": [ - "Petar M Djuric" + "Mang Gao" + ], + "orcid": [ + "https://orcid.org/0009-0002-0379-8655" ] }, - "out": [], - "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/b0b35286-4168-48d3-93d4-75ef191c6174" - }, + "out": [ { - "predicate": "members", - "source": "https://brain-bbqs.org/id/c04b3bcd-d1db-4b3c-9dc6-a4c97039cad6" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/3be49154-45d9-45b4-9872-3271a67a5225", - "class": "Investigator", - "label": "Pietro Perona", - "facts": { - "consortium_role": [ - "Principal Investigator (PI)" - ], - "name": [ - "Pietro Perona" - ] - }, - "out": [], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/bc9cb644-1dc5-4caf-ae76-da464cb8e2dc" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/1424d10f-795c-47e5-a6d7-d6705fad611a" + "source": "https://brain-bbqs.org/id/role/0b8db858-64e3-41bc-8ecc-948b44cdf963" } ], "dangling": [], @@ -13097,40 +13929,39 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/16d82048-d1f5-4b80-a6e0-2baf5c1bed4f", + "id": "https://brain-bbqs.org/id/db663fc5-af00-457b-beb7-f9ee831eef71", "class": "Investigator", - "label": "Pulkit Grover", + "label": "Mansi Srivastava", "facts": { "consortium_role": [ - "Principal Investigator (PI)" + "Assistant Professor" ], "external_url": [ - "https://reporter.nih.gov/search/results?pi_id=12197198" + "https://reporter.nih.gov/search/results?pi_id=14227655" ], "name": [ - "Pulkit Grover" + "Mansi Srivastava" ], "research_areas": [ - "Behavioral segmentation", - "Gut-brain axis", - "Stress response quantification" + "Organism-environment interaction", + "Regeneration behavior" ], "skills": [ - "Active learning", - "Multimodal classification", - "Physiological signal analysis", - "Pose estimation" + "Behavioral segmentation", + "Dimensionality reduction", + "Pose estimation", + "Synchronization" ] }, "out": [], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/2cf61a9f-a799-4586-94fc-a71bc80104d6" + "source": "https://brain-bbqs.org/id/role/f33023b3-374b-44c3-a158-5487f3bbfafc" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/fb3cf5ef-e850-44d2-887c-0d0ef608f48c" + "source": "https://brain-bbqs.org/id/99bc7f7b-2a3d-4e34-99f1-ec08e12133b2" } ], "dangling": [], @@ -13139,50 +13970,39 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/5cac268b-ef4e-4b85-8a9b-9f968992dfe7", + "id": "https://brain-bbqs.org/id/bab963f7-54f8-4b01-a914-de675535b004", "class": "Investigator", - "label": "Rahul Hingorani", + "label": "Mara Baylis", "facts": { "consortium_role": [ - "Research Staff (Scientist and others)" + "Postdoc/Grad Student" ], "name": [ - "Rahul Hingorani" + "Mara Baylis" ] }, "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" - }, { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [], "dangling": [], - "degree": 3, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/ab51c79a-9096-4c6b-9724-ae605b7ffae2", + "id": "https://brain-bbqs.org/id/98076d7b-270f-4a2a-af91-53d1b7644c90", "class": "Investigator", - "label": "Ralph Peterson", + "label": "Marc Schmidt", "facts": { "consortium_role": [ - "Research Staff (Scientist and others), Postdoc/Grad Student" + "Principal Investigator (PI)" ], "name": [ - "Ralph Peterson" - ], - "orcid": [ - "https://orcid.org/0000-0002-2692-5955" + "Marc Schmidt" ] }, "out": [ @@ -13195,29 +14015,10 @@ "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/dd96356c-60d7-4a65-9be7-7a622de4287d", - "class": "Investigator", - "label": "Rishi Suresh", - "facts": { - "consortium_role": [ - "Research Staff (Scientist and others)" - ], - "name": [ - "Rishi Suresh" - ] - }, - "out": [], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/53e6a0e7-68a8-457d-8fa8-0763d062dcda" + "source": "https://brain-bbqs.org/id/role/b6d6fbfc-f005-41e9-8e22-6651720030f6" }, { "predicate": "members", @@ -13225,125 +14026,110 @@ } ], "dangling": [], - "degree": 2, + "degree": 4, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/2634f607-be46-4d8d-baae-6ec0d66a5436", + "id": "https://brain-bbqs.org/id/d3cae382-1e79-42c1-8f37-75cd049d0ff6", "class": "Investigator", - "label": "Robert Froemke", + "label": "Marcela Benitez", "facts": { "consortium_role": [ - "Principal Investigator (PI)" + "Co-Investigator" ], "name": [ - "Robert Froemke" - ], - "orcid": [ - "https://orcid.org/0000-0002-1230-6811" + "Marcela Benitez" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - } - ], + "out": [], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/4fe6e211-9d96-4f8b-8753-c5a002e13b72" + "source": "https://brain-bbqs.org/id/role/73cef7ce-8dbb-48ba-8ee3-bcc0cca5fce8" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/6efc2552-7cd7-4e53-bd2d-41fee6824cf7" + "source": "https://brain-bbqs.org/id/1c181fed-73e8-46be-8d27-198f64e936ea" } ], "dangling": [], - "degree": 3, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/40d5a0bc-769a-4450-9355-d561ff9494eb", + "id": "https://brain-bbqs.org/id/850426b4-fca0-4cfc-a528-60b11208e652", "class": "Investigator", - "label": "Ryan Ly", + "label": "Marcia Patchan", "facts": { "consortium_role": [ "Research Staff (Scientist and others)" ], "name": [ - "Ryan Ly" + "Marcia Patchan" ], "orcid": [ - "https://orcid.org/0000-0001-9238-0642" + "https://orcid.org/0000-0002-0485-0403" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" - }, + "out": [], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/3d7151df-4a2b-40cd-97ae-0f695e5d237e" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/4b90a4f4-0010-4b31-8adb-db169e15a70a", + "id": "https://brain-bbqs.org/id/5f18877b-67fd-4779-be9a-d859314e0b4a", "class": "Investigator", - "label": "Sandy Hider", + "label": "Mark Tiede", "facts": { "consortium_role": [ - "Software Developer" + "Co-Investigator" ], "name": [ - "Sandy Hider" - ], - "orcid": [ - "https://orcid.org/0009-0002-0323-6986" + "Mark Tiede" ] }, "out": [ { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/4543ce04-8f6e-4713-8fa7-2552664e28ae", + "id": "https://brain-bbqs.org/id/b2b7ce80-8dbf-4cf8-804c-9daebe9a9fa5", "class": "Investigator", - "label": "Sankar Alagapan", + "label": "Markus Meister", "facts": { "consortium_role": [ - "Co-Investigator" + "Principal Investigator (PI)" ], "name": [ - "Sankar Alagapan" + "Markus Meister" ], "orcid": [ - "https://orcid.org/0000-0002-2056-5450" + "https://orcid.org/0000-0003-2136-6506" ], "research_areas": [ - "Neuromodulation", - "Psychiatric disorders" - ], - "skills": [ - "Machine learning", - "Time series analysis" + "Biophysics", + "Neuroscience" ] }, "out": [ @@ -13351,10 +14137,6 @@ "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" - }, { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" @@ -13363,7 +14145,11 @@ "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/a474b99d-19ed-4d37-b39f-c22ba57b2101" + "source": "https://brain-bbqs.org/id/role/182058c5-770d-4ac3-984a-ea1f4d8d48f1" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/1424d10f-795c-47e5-a6d7-d6705fad611a" } ], "dangling": [], @@ -13372,15 +14158,20 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/aa8884d6-2eae-451a-828a-92e4595c273e", + "id": "https://brain-bbqs.org/id/20d3bb9f-8cbe-45b8-974e-1c84e0d9631f", "class": "Investigator", - "label": "Sara Goering", + "label": "Marta da Rocha Diogo", "facts": { "consortium_role": [ - "Co-Investigator" + "Research Staff (Scientist and others)" ], "name": [ - "Sara Goering" + "Marta da Rocha Diogo" + ], + "research_areas": [ + "Ethics", + "Law", + "Regulation" ] }, "out": [ @@ -13389,6 +14180,72 @@ "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" } ], + "in": [ + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/d1bb4677-b510-48ad-a89b-680830403a37" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/7924e7d9-5b53-4525-95ef-3f5a6b9112a5" + } + ], + "dangling": [], + "degree": 3, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/d69b71df-b5e8-490c-8df0-5a7883fac0d5", + "class": "Investigator", + "label": "Maryam Shanechi", + "facts": { + "consortium_role": [ + "Principal Investigator (PI)" + ], + "name": [ + "Maryam Shanechi" + ] + }, + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + } + ], + "in": [ + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/2849f8eb-0feb-48ba-b73e-577eb81e4b91" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/180457cc-1c85-4ee9-a13c-7fc8023528c3" + } + ], + "dangling": [], + "degree": 3, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/0ded1b71-e572-475b-8457-bf370ed6335f", + "class": "Investigator", + "label": "Matt Levine", + "facts": { + "consortium_role": [ + "Research Staff (Scientist and others)" + ], + "name": [ + "Matt Levine" + ] + }, + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + } + ], "in": [], "dangling": [], "degree": 1, @@ -13396,15 +14253,18 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/924e4ef8-ee41-480e-9d33-9807b471878d", + "id": "https://brain-bbqs.org/id/2984e917-2448-4596-9648-b52dc92b2c5d", "class": "Investigator", - "label": "Sara Sanchez-Alonso", + "label": "Mattson Ogg", "facts": { "consortium_role": [ "Research Staff (Scientist and others)" ], "name": [ - "Sara Sanchez-Alonso" + "Mattson Ogg" + ], + "orcid": [ + "https://orcid.org/0009-0004-5583-0586" ] }, "out": [ @@ -13427,8 +14287,8 @@ ], "in": [ { - "predicate": "members", - "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/145ca46a-181b-4fb5-b546-3522f659e770" } ], "dangling": [], @@ -13437,74 +14297,88 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/4722e0eb-8daf-4685-8da4-fd7bb284d377", + "id": "https://brain-bbqs.org/id/57f1a4fe-523b-4963-b6e6-a38c7da47500", "class": "Investigator", - "label": "Satrajit Ghosh", + "label": "Mauricio Rangel-Gomez", "facts": { + "consortium_role": [ + "NIH Program" + ], "name": [ - "Satrajit Ghosh" + "Mauricio Rangel-Gomez" ] }, - "out": [], + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 4, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/e5bdf58e-a1ff-4f5f-aa6d-667de414e16e", + "id": "https://brain-bbqs.org/id/ea29a939-e638-4a3c-8d28-1edda890490a", "class": "Investigator", - "label": "Satrajit Sujit Ghosh", + "label": "Mauricio Vallejo Martelo", "facts": { "consortium_role": [ - "Principal Investigator (PI)" + "Research Staff (Scientist and others)" ], "name": [ - "Satrajit Sujit Ghosh" + "Mauricio Vallejo Martelo" ], "orcid": [ - "https://orcid.org/0000-0002-6911-4929" + "https://orcid.org/0000-0002-8922-6895" ] }, - "out": [], - "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/29a72f60-6de3-4c19-928c-05cd16342d6e" - }, + "out": [ { - "predicate": "members", - "source": "https://brain-bbqs.org/id/7924e7d9-5b53-4525-95ef-3f5a6b9112a5" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" } ], + "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/8d6214d3-a2d9-40c2-8cf6-f5e0d0e6afa9", + "id": "https://brain-bbqs.org/id/37453416-6149-4fee-b9b9-a427b800ffe7", "class": "Investigator", - "label": "Sequioa Smith", + "label": "Meaghan Perdue", "facts": { "consortium_role": [ - "Postdoc/Grad Student" + "Admin" ], "name": [ - "Sequioa Smith" + "Meaghan Perdue" ], "orcid": [ - "https://orcid.org/0000-0002-4704-2852" + "https://orcid.org/0000-0002-6113-9175" ] }, "out": [], "in": [ { "predicate": "members", - "source": "https://brain-bbqs.org/id/622f970b-e529-441d-b5f3-739025a38aa9" + "source": "https://brain-bbqs.org/id/4284d761-dde2-4e72-8cb4-d3724f2d4b32" } ], "dangling": [], @@ -13513,25 +14387,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/026f060a-5264-4ed0-89e7-d2cd2c436b38", + "id": "https://brain-bbqs.org/id/1b1f912c-a054-4bd1-a6b8-748f902e53f4", "class": "Investigator", - "label": "Shannon Gourley", + "label": "Meghan Cum", "facts": { "consortium_role": [ - "Principal Investigator (PI)" + "Postdoc/Grad Student" ], "name": [ - "Shannon Gourley" + "Meghan Cum" ], "orcid": [ - "https://orcid.org/0000-0002-7783-9379" + "https://orcid.org/0009-0004-9299-992X" ] }, "out": [], "in": [ { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/02220da7-1bf8-49e9-8ff0-ed008ea8d03e" + "predicate": "members", + "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" } ], "dangling": [], @@ -13540,31 +14414,34 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/fa291a57-48b1-4ad1-87da-4a04a01787e8", + "id": "https://brain-bbqs.org/id/0f3bb33c-e7ee-4013-af5d-894d1adfa0ee", "class": "Investigator", - "label": "Shelly Flagel", + "label": "Melissa Kline Struhl", "facts": { "consortium_role": [ - "Principal Investigator (PI)" + "Research Staff (Scientist and others), (DCAIC)" ], "name": [ - "Shelly Flagel" + "Melissa Kline Struhl" + ], + "orcid": [ + "https://orcid.org/0000-0003-2217-9331" ] }, "out": [ { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" } ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/86821e6a-b746-49fd-b4b6-5ea4dd02e5d7" + "source": "https://brain-bbqs.org/id/role/eed7f06b-7ec2-42e5-8307-da70b41c7482" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/1c181fed-73e8-46be-8d27-198f64e936ea" + "source": "https://brain-bbqs.org/id/7924e7d9-5b53-4525-95ef-3f5a6b9112a5" } ], "dangling": [], @@ -13573,224 +14450,212 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/0f0ad5c2-496b-42a8-91b7-b798742bcdc3", + "id": "https://brain-bbqs.org/id/d0f582a1-20fd-43ca-a9f1-21bf0ee548c1", "class": "Investigator", - "label": "Shreya Saxena", + "label": "Mengsen Zhang", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], - "external_url": [ - "https://reporter.nih.gov/search/results?pi_id=15537186" - ], "name": [ - "Shreya Saxena" + "Mengsen Zhang" + ], + "orcid": [ + "https://orcid.org/0000-0003-3085-152X" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/692b00f5-b8e0-4344-8bd0-75def6c4b99e" - }, + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + } + ], + "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/58923333-d8e5-4e54-a86d-c229e523fec8" + "source": "https://brain-bbqs.org/id/role/dce97439-b94a-4549-af78-4839bc63d315" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/622f970b-e529-441d-b5f3-739025a38aa9" - }, + "source": "https://brain-bbqs.org/id/7de07dc9-72c0-4900-be0d-c375d927a6b4" + } + ], + "dangling": [], + "degree": 3, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/4412f5e5-aba7-49fb-876c-618f59f9b226", + "class": "Investigator", + "label": "Merav Sabri", + "facts": { + "name": [ + "Merav Sabri" + ] + }, + "out": [], + "in": [ { "predicate": "members", - "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" + "source": "https://brain-bbqs.org/id/a6ed8610-4f99-43cb-b0fa-ed983bfa2f20" } ], "dangling": [], - "degree": 4, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/7eb2abf1-f38f-4693-afb6-9313f96d2ff4", + "id": "https://brain-bbqs.org/id/0f8bad99-d648-46e7-97cc-a669746511ee", "class": "Investigator", - "label": "Shuren Xia", + "label": "Michael Genecin", "facts": { "consortium_role": [ "Postdoc/Grad Student" ], "name": [ - "Shuren Xia" + "Michael Genecin" ], "orcid": [ - "https://orcid.org/0009-0002-9213-1384" + "https://orcid.org/0009-0006-3931-7752" ] }, "out": [ { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/081d2ddb-e2c8-4909-84c4-740582fd757c", + "id": "https://brain-bbqs.org/id/fd89f05c-a37e-4d93-80fc-47dfc8aa3931", "class": "Investigator", - "label": "Sima Mofakham", + "label": "Michael Tadross", "facts": { + "consortium_role": [ + "Principal Investigator (PI)" + ], "name": [ - "Sima Mofakham" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/b50fe39f-f6d9-4362-a846-42ff705c73ac", - "class": "Investigator", - "label": "Sima Mofakham", - "facts": { - "name": [ - "Sima Mofakham" + "Michael Tadross" + ], + "orcid": [ + "https://orcid.org/0000-0002-7752-6380" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/a31e280c-89d7-4d68-b3a3-4ecc10429cee" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/93fa0810-51f4-4e71-badf-e5e8d3e40dc3" + } ], + "dangling": [], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/bcdcd220-fa82-47d4-9c1b-7a8da03dadd8", + "id": "https://brain-bbqs.org/id/e6d4c722-8089-4163-901c-3a77f6a2a90b", "class": "Investigator", - "label": "Sima Mofakham", + "label": "Mina Kim", "facts": { "consortium_role": [ - "Principal Investigator (PI)" - ], - "description": [ - "PI for SeeMe consciousness detection project" + "Research Staff (Scientist and others)" ], "name": [ - "Sima Mofakham" + "Mina Kim" ], "orcid": [ - "https://orcid.org/0000-0002-4509-6080" + "https://orcid.org/0000-0003-2019-5944" ] }, "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" - } - ], - "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/fbe6026f-8aad-439e-8fe2-da3cce084d1c" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/c04b3bcd-d1db-4b3c-9dc6-a4c97039cad6" } ], + "in": [], "dangling": [], - "degree": 5, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/f1ff44d0-aff1-4a53-91e6-7a6b64aa0af0", + "id": "https://brain-bbqs.org/id/24703152-c43b-4f4f-8d73-65f3ef490ff0", "class": "Investigator", - "label": "Sofia Juliani", + "label": "Ming Zhan", "facts": { "name": [ - "Sofia Juliani" + "Ming Zhan" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, + "out": [], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + "predicate": "members", + "source": "https://brain-bbqs.org/id/32f761ce-6857-451c-9eb7-fc5b8b221449" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/3be55dd2-fe02-418e-a97b-aa223e988663", + "id": "https://brain-bbqs.org/id/27d7f30b-e152-4999-a63e-8dd4e800f3bc", "class": "Investigator", - "label": "Stephanie Prince", + "label": "Monika P. Jadi", "facts": { "consortium_role": [ - "Research Staff (Scientist and others)" + "Principal Investigator (PI)" ], - "name": [ - "Stephanie Prince" + "external_url": [ + "https://reporter.nih.gov/search/results?pi_id=11331514" ], - "orcid": [ - "https://orcid.org/0000-0002-3083-6955" + "name": [ + "Monika P. Jadi" ] }, - "out": [ + "out": [], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/cee6c154-1e7f-4a7a-afa7-5117b7f7e384" }, { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + "predicate": "members", + "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" } ], - "in": [], "dangling": [], "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/de5929a1-5c9a-4f4f-8d0f-4cc0d040160f", + "id": "https://brain-bbqs.org/id/3d87d6b0-c802-4610-813b-86b94e3e76d6", "class": "Investigator", - "label": "stephen heisig", + "label": "Muhammad Parvaz", "facts": { "consortium_role": [ - "Research Staff (Scientist and others)" + "Principal Investigator (PI)" ], "name": [ - "stephen heisig" + "Muhammad Parvaz" + ], + "orcid": [ + "https://orcid.org/0000-0002-2671-2327" ] }, "out": [ @@ -13803,71 +14668,48 @@ "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/864e9b52-4173-4b92-bd81-d0bc6a7fc3cb", - "class": "Investigator", - "label": "Steve Chang", - "facts": { - "consortium_role": [ - "Principal Investigator (PI)" - ], - "name": [ - "Steve Chang" - ], - "orcid": [ - "https://orcid.org/0000-0003-4160-7549" - ] - }, - "out": [], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/b87d800c-a0aa-4ea4-aa2e-4fba4fbf8480" + "source": "https://brain-bbqs.org/id/role/43ee45a2-22ea-4e73-9885-1efe24dc4caf" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" + "source": "https://brain-bbqs.org/id/dbdb11c4-5082-4c5f-b50b-0046aaa0f8d9" } ], "dangling": [], - "degree": 2, + "degree": 4, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/e03557cc-99aa-4b15-8786-bde9a5253fd1", + "id": "https://brain-bbqs.org/id/5f8ac3c4-a0fb-44d6-ae2d-b505816d4141", "class": "Investigator", - "label": "Suliman Sharif", + "label": "Nader Nikbakht", "facts": { "consortium_role": [ "Research Staff (Scientist and others)" ], "name": [ - "Suliman Sharif" + "Nader Nikbakht" ], "orcid": [ - "https://orcid.org/0000-0002-1342-9258" + "https://orcid.org/0000-0002-9726-9115" + ], + "research_areas": [ + "Behavioral neuroscience", + "Computational and systems neuroscience", + "Neural computation", + "Neuro-AI", + "neurobiology" ] }, "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" - }, { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" - }, { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" @@ -13876,92 +14718,137 @@ "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/3df7974f-d227-4954-a984-3d403436fa70" + "source": "https://brain-bbqs.org/id/role/d530f31d-a94a-4d0d-8e40-3c41610d768a" }, { "predicate": "members", "source": "https://brain-bbqs.org/id/7924e7d9-5b53-4525-95ef-3f5a6b9112a5" + }, + { + "predicate": "posted_by", + "source": "https://brain-bbqs.org/id/ca41ad35-92a2-4391-95c3-0db49351b9a5" } ], "dangling": [], - "degree": 6, + "degree": 5, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/bef104b2-a9a9-41d3-a585-6575449c2966", + "id": "https://brain-bbqs.org/id/28aec8d8-5202-4574-9a96-b01ddb53aeb4", "class": "Investigator", - "label": "Suliman Sharif (sulstice@standardseedcorp.com)", + "label": "Nancy Padilla Coreano", "facts": { + "consortium_role": [ + "Principal Investigator (PI)" + ], "name": [ - "Suliman Sharif (sulstice@standardseedcorp.com)" + "Nancy Padilla Coreano" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/3300103b-a7d5-4bdd-8f50-24fb3e24767a" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/622f970b-e529-441d-b5f3-739025a38aa9" + } ], + "dangling": [], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/82f53756-81ce-4348-a8bb-6bce2e685dee", + "id": "https://brain-bbqs.org/id/68fe4ee2-5beb-4a6e-ac58-2d31ad350cfd", "class": "Investigator", - "label": "Talia V Roman Lopez", + "label": "NANTHIA W SUTHANA", "facts": { "consortium_role": [ - "Postdoc/Grad Student" + "Principal Investigator (PI)" + ], + "external_url": [ + "https://reporter.nih.gov/search/results?pi_id=8630217" ], "name": [ - "Talia V Roman Lopez" + "NANTHIA W SUTHANA" ], - "orcid": [ - "https://orcid.org/0000-0001-5038-5445" + "research_areas": [ + "Approach-avoidance behavior", + "Neural-peripheral coupling", + "Stress response quantification" + ], + "skills": [ + "Decoding models", + "Dimensionality reduction", + "Dynamical systems modeling", + "Signal processing" ] }, "out": [], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/caef691a-ad28-4fbe-b098-6536757b49d6" + "source": "https://brain-bbqs.org/id/role/eedb7237-95d4-4633-8431-0a94da8db187" + }, + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/3dba6e02-b3c4-4cc8-89d8-bd8ef07d5341" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/93fa0810-51f4-4e71-badf-e5e8d3e40dc3" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/32f14ee1-e0b4-4753-869a-f630f1786682" } ], "dangling": [], - "degree": 1, + "degree": 4, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/93a3260d-e267-451b-9960-06cc9ae3a40c", + "id": "https://brain-bbqs.org/id/7a2ad901-f50d-40bc-a404-b4ef0c33944b", "class": "Investigator", - "label": "Talmo Pereira", + "label": "Nathan Christopher Shaner", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], + "external_url": [ + "https://reporter.nih.gov/search/results?pi_id=10362438" + ], "name": [ - "Talmo Pereira" + "Nathan Christopher Shaner" ], - "orcid": [ - "https://orcid.org/0000-0001-9075-8365" + "research_areas": [ + "Brain-body interaction modeling", + "Effort-based decision making" + ], + "skills": [ + "Dynamical systems modeling", + "Latent variable modeling", + "Multimodal classification" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - } - ], + "out": [], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/63311822-3561-4d3f-929d-42da23209e90" + "source": "https://brain-bbqs.org/id/role/bf82a7b1-f5dc-4ec7-8117-927452fa5027" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/5b794afd-cf08-4107-81c8-522a29714830" + "source": "https://brain-bbqs.org/id/6efc2552-7cd7-4e53-bd2d-41fee6824cf7" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/d2821755-977a-46a2-a089-169f6e66aeea" } ], "dangling": [], @@ -13970,106 +14857,68 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/cbb1fcfa-0a1d-432d-a4bb-a325516b6594", + "id": "https://brain-bbqs.org/id/82e9264e-8bec-4d1e-ab39-9e42f8f5384d", "class": "Investigator", - "label": "Tanya St. John", + "label": "Neha Thomas", "facts": { "consortium_role": [ "Research Staff (Scientist and others)" ], "name": [ - "Tanya St. John" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/178d1833-2f0c-4a20-9f06-c3106f12b21c", - "class": "Investigator", - "label": "Taqiya Ehsan", - "facts": { - "consortium_role": [ - "Postdoc/Grad Student" - ], - "name": [ - "Taqiya Ehsan" + "Neha Thomas" ] }, "out": [ { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [], "dangling": [], - "degree": 1, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/f6fd8ef2-e06f-4f72-bfc9-4464947fc0b9", + "id": "https://brain-bbqs.org/id/2eafb009-97ac-4492-97fe-b77490371b34", "class": "Investigator", - "label": "Taylor Wise", + "label": "Nelleke van Wouwe", "facts": { - "consortium_role": [ - "Postdoc/Grad Student" - ], "name": [ - "Taylor Wise" - ], - "orcid": [ - "https://orcid.org/0000-0002-9937-3493" - ], - "research_areas": [ - "Social cognition", - "comparative cognition", - "spatial-social interactions" + "Nelleke van Wouwe" ] }, "out": [], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/714db00c-3814-4ee2-878e-332e1894bc11" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" + "source": "https://brain-bbqs.org/id/role/776f6ad8-5dbf-4a6b-a49e-4bdff826a969" } ], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/a7318228-623e-4f94-a7e6-5e3fed968e1a", + "id": "https://brain-bbqs.org/id/a82b872c-fb47-43ba-9d01-258026913f06", "class": "Investigator", - "label": "Tekraj Chhetri", + "label": "Nick Jourjine", "facts": { - "external_url": [ - "https://reporter.nih.gov/search/results?pi_id=9215633" + "consortium_role": [ + "Research Staff (Scientist and others)" ], "name": [ - "Tekraj Chhetri" - ], - "research_areas": [ - "Data infrastructure", - "FAIR data sharing", - "Standardization" - ], - "skills": [ - "Data engineering", - "Metadata standards", - "Pipeline orchestration" + "Nick Jourjine" ] }, "out": [ @@ -14078,37 +14927,29 @@ "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" } ], - "in": [ - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/c70a461e-5956-4c4f-aaba-40f11cc7b350" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/7924e7d9-5b53-4525-95ef-3f5a6b9112a5" - } - ], + "in": [], "dangling": [], - "degree": 3, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/6a1a2d08-5aec-4450-a9db-8dad62b8f4c4", + "id": "https://brain-bbqs.org/id/42fcde10-7fc8-4243-9c6f-845abf7d194c", "class": "Investigator", - "label": "Teneille Brown", + "label": "Nicole Guittari", "facts": { "consortium_role": [ - "Co-Investigator" + "Research Staff (Scientist and others)" ], "name": [ - "Teneille Brown" - ], - "orcid": [ - "https://orcid.org/0000-0002-3398-163X" + "Nicole Guittari" ] }, "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + }, { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" @@ -14116,77 +14957,91 @@ ], "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/c520d01a-3746-4f7d-baff-ad1dab70e1b3", + "id": "https://brain-bbqs.org/id/b0b69ef8-90b3-481a-b095-a01f1ddf4663", "class": "Investigator", - "label": "Terry Jernigan", + "label": "Nicole Stock", "facts": { + "consortium_role": [ + "Research Staff (Scientist and others)" + ], "name": [ - "Terry Jernigan" + "Nicole Stock" ] }, - "out": [], + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/43d7d5a8-8912-4a93-b571-f3c97f41bd9d", + "id": "https://brain-bbqs.org/id/eff6d625-81ad-4a38-9f8e-93a2ae06c7af", "class": "Investigator", - "label": "Test User", + "label": "Nicole Tregoning", "facts": { "name": [ - "Test User" + "Nicole Tregoning" ] }, - "out": [ + "out": [], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + "predicate": "members", + "source": "https://brain-bbqs.org/id/315a0694-ce8d-4010-abca-5438e5f6b560" } ], - "in": [], "dangling": [], "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/c96b95c1-3ba5-4da4-9683-d714b853e4d8", + "id": "https://brain-bbqs.org/id/af80d437-679c-42d0-aeed-fc7129b8a7b7", "class": "Investigator", - "label": "test-user-tier1", + "label": "Niegil Francis", "facts": { + "consortium_role": [ + "Research Staff (Scientist and others)" + ], "name": [ - "test-user-tier1" + "Niegil Francis" ] }, "out": [ { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + } + ], + "in": [ + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/5b794afd-cf08-4107-81c8-522a29714830" } ], - "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/1fb20b4f-fd8c-4e40-a4f4-daaa12bd738a", + "id": "https://brain-bbqs.org/id/83e96042-a116-4e27-ab65-787db78d29f2", "class": "Investigator", - "label": "TestUser Tier2", + "label": "Niegil Francis Muttath Joseph", "facts": { "name": [ - "TestUser Tier2" + "Niegil Francis Muttath Joseph" ] }, "out": [], @@ -14199,36 +15054,46 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/25a4f79c-6020-4074-b501-0114a205175f", + "id": "https://brain-bbqs.org/id/95406597-a11e-4809-834d-8a6926c32164", "class": "Investigator", - "label": "Thomas Heeps", + "label": "Nima Dehghani", "facts": { "name": [ - "Thomas Heeps" + "Nima Dehghani" + ], + "orcid": [ + "https://orcid.org/0000-0003-2032-8903" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/540b143e-459b-41df-98bd-9ec0b18d9bd6" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/7924e7d9-5b53-4525-95ef-3f5a6b9112a5" + } ], + "dangling": [], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/ddf3df70-64df-4112-822c-1ebf2bb895e0", + "id": "https://brain-bbqs.org/id/a72c6169-713d-49ef-b9c2-4d9d05247473", "class": "Investigator", - "label": "Thore Bergman", + "label": "Nishant Rao", "facts": { "consortium_role": [ - "Field site director, collaborator" + "Research Staff (Scientist and others), Postdoc/Grad Student" ], "name": [ - "Thore Bergman" + "Nishant Rao" ], "orcid": [ - "https://orcid.org/0000-0002-9615-5001" + "https://orcid.org/0009-0007-4272-8189" ] }, "out": [ @@ -14236,64 +15101,98 @@ "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + }, { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], - "in": [], + "in": [ + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" + } + ], "dangling": [], - "degree": 2, + "degree": 4, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/1962a240-a592-484c-b812-122a5dad2951", + "id": "https://brain-bbqs.org/id/6450030e-c137-4842-8bae-8d6dd913c50b", "class": "Investigator", - "label": "Tianqing Li", + "label": "Nithin Sugavanam", "facts": { "consortium_role": [ - "Postdoc/Grad Student" + "Research Staff (Scientist and others), Postdoc/Grad Student" ], "name": [ - "Tianqing Li" + "Nithin Sugavanam" ] }, "out": [ { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - } - ], - "in": [ + }, { - "predicate": "members", - "source": "https://brain-bbqs.org/id/93fa0810-51f4-4e71-badf-e5e8d3e40dc3" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], + "in": [], "dangling": [], "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/ec6cb02d-5d60-4e1b-bfa8-e7ce7f857f90", + "id": "https://brain-bbqs.org/id/639e73b5-6a6d-46f1-82a8-b466d7e3bdbb", "class": "Investigator", - "label": "Tim Brown", + "label": "Olha Metenko", "facts": { + "consortium_role": [ + "Postdoc/Grad Student" + ], "name": [ - "Tim Brown" + "Olha Metenko" + ] + }, + "out": [], + "in": [ + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad" + } + ], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/54ef6069-cc01-4d5b-9aaa-8ef9e1505001", + "class": "Investigator", + "label": "Oliver Ruebel", + "facts": { + "consortium_role": [ + "Co-Investigator" ], - "research_areas": [ - "Bioethics", - "Neuroethics", - "Philosophy" + "name": [ + "Oliver Ruebel" ], - "skills": [ - "ELSI" + "orcid": [ + "https://orcid.org/0000-0001-9902-1984" ] }, "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + }, { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" @@ -14301,17 +15200,17 @@ ], "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/335d4d23-a7b3-496d-a721-db2f6a68ce07", + "id": "https://brain-bbqs.org/id/17b63cd3-e0b6-47c0-97ca-58ef6197e8e4", "class": "Investigator", - "label": "Tim Roberts", + "label": "Omid Sharafi", "facts": { "name": [ - "Tim Roberts" + "Omid Sharafi" ] }, "out": [], @@ -14324,91 +15223,59 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/24981995-2cd1-407a-9d2c-0f89f026edeb", + "id": "https://brain-bbqs.org/id/608bd920-0a69-4a7a-a0fe-0740195f0c64", "class": "Investigator", - "label": "Timothy Dunn", + "label": "Parastoo Azizeddin", "facts": { - "consortium_role": [ - "Principal Investigator (PI)" - ], "name": [ - "Timothy Dunn" + "Parastoo Azizeddin" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - } - ], + "out": [], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/a8f54c17-5723-4efe-99dd-6568342c734d" - }, - { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/df63e239-d918-4780-9eaa-ed34a5748f01" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/93fa0810-51f4-4e71-badf-e5e8d3e40dc3" + "source": "https://brain-bbqs.org/id/role/e165b281-959b-4738-b6c6-cd404994d003" } ], "dangling": [], - "degree": 4, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/32937527-a5e9-4a99-84c0-719435f25f8b", + "id": "https://brain-bbqs.org/id/709c64f2-d02c-48f9-b286-b9222a106f27", "class": "Investigator", - "label": "Timothy P Roberts", + "label": "Patrick McGrath", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], - "external_url": [ - "https://reporter.nih.gov/search/results?pi_id=6282327" - ], "name": [ - "Timothy P Roberts" - ], - "research_areas": [ - "3D social behavior quantification", - "Disease phenotyping", - "Ecological behavior quantification", - "Multi-animal pose reconstruction", - "Prey capture kinematics" + "Patrick McGrath" ], - "skills": [ - "3D reconstruction", - "Bayesian inference", - "Behavioral segmentation", - "Deep learning", - "Dimensionality reduction", - "Dynamical systems modeling", - "Pose estimation" + "orcid": [ + "https://orcid.org/0000-0002-1598-3746" ] }, "out": [ { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/60988e88-27ec-4264-9203-98d80d2f3489" - }, - { - "predicate": "members", - "source": "https://brain-bbqs.org/id/db72ef76-b8e2-4d0e-85da-c8d475d70628" + "source": "https://brain-bbqs.org/id/role/0bfdefd7-14a0-48aa-93c2-9f80f19e8e72" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/f28a2f16-5259-4e2f-9c8e-a5d11d2b5c5f" + "source": "https://brain-bbqs.org/id/92f22292-007f-4091-83e9-10df11f14110" } ], "dangling": [], @@ -14417,99 +15284,96 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/f33c9c03-f685-4166-b0bf-9ce704b5fa78", + "id": "https://brain-bbqs.org/id/223a91b2-1ffb-49e6-9cd7-d97f6f2beece", "class": "Investigator", - "label": "Tristan Daniel", + "label": "Petar M Djuric", "facts": { - "name": [ - "Tristan Daniel" - ], - "research_areas": [ - "Animal-Computer Interaction", - "Interface Design" + "consortium_role": [ + "Principal Investigator (PI)" ], - "skills": [ - "Embedded Systems Development", - "User Interface Design" + "name": [ + "Petar M Djuric" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, + "out": [], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/b0b35286-4168-48d3-93d4-75ef191c6174" }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" - } - ], - "in": [ { "predicate": "members", - "source": "https://brain-bbqs.org/id/92f22292-007f-4091-83e9-10df11f14110" + "source": "https://brain-bbqs.org/id/c04b3bcd-d1db-4b3c-9dc6-a4c97039cad6" } ], "dangling": [], - "degree": 4, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/feeae3ca-856c-462b-8b35-0fe35e294242", + "id": "https://brain-bbqs.org/id/3be49154-45d9-45b4-9872-3271a67a5225", "class": "Investigator", - "label": "Tucker Lancaster", + "label": "Pietro Perona", "facts": { "consortium_role": [ - "Postdoc/Grad Student" + "Principal Investigator (PI)" ], "name": [ - "Tucker Lancaster" - ], - "orcid": [ - "https://orcid.org/0000-0003-4074-7128" + "Pietro Perona" ] }, "out": [], "in": [ + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/bc9cb644-1dc5-4caf-ae76-da464cb8e2dc" + }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/92f22292-007f-4091-83e9-10df11f14110" + "source": "https://brain-bbqs.org/id/1424d10f-795c-47e5-a6d7-d6705fad611a" } ], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/732f511e-4b61-412b-b54d-9c8dbd93c273", + "id": "https://brain-bbqs.org/id/16d82048-d1f5-4b80-a6e0-2baf5c1bed4f", "class": "Investigator", - "label": "Tyler Albarran", + "label": "Pulkit Grover", "facts": { "consortium_role": [ - "Postdoc/Grad Student" + "Principal Investigator (PI)" + ], + "external_url": [ + "https://reporter.nih.gov/search/results?pi_id=12197198" ], "name": [ - "Tyler Albarran" + "Pulkit Grover" ], - "orcid": [ - "https://orcid.org/0009-0009-1642-4549" + "research_areas": [ + "Behavioral segmentation", + "Gut-brain axis", + "Stress response quantification" + ], + "skills": [ + "Active learning", + "Multimodal classification", + "Physiological signal analysis", + "Pose estimation" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - } - ], + "out": [], "in": [ + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/2cf61a9f-a799-4586-94fc-a71bc80104d6" + }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/92f22292-007f-4091-83e9-10df11f14110" + "source": "https://brain-bbqs.org/id/fb3cf5ef-e850-44d2-887c-0d0ef608f48c" } ], "dangling": [], @@ -14518,173 +15382,176 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/e1fcac8e-1f50-4dc8-8f14-f0ee62614861", + "id": "https://brain-bbqs.org/id/5cac268b-ef4e-4b85-8a9b-9f968992dfe7", "class": "Investigator", - "label": "Ueli Rutishauser", + "label": "Rahul Hingorani", "facts": { "consortium_role": [ - "Principal Investigator (PI)" + "Research Staff (Scientist and others)" ], "name": [ - "Ueli Rutishauser" + "Rahul Hingorani" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/2c2dc99f-9c5e-43ad-8c5a-7012d2feedba" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" }, { - "predicate": "members", - "source": "https://brain-bbqs.org/id/1424d10f-795c-47e5-a6d7-d6705fad611a" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" }, { - "predicate": "members", - "source": "https://brain-bbqs.org/id/9515d721-456a-45d1-885c-d97a482317f8" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], + "in": [], "dangling": [], "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/977712f0-0daf-4238-a693-42c96f0874a2", + "id": "https://brain-bbqs.org/id/ab51c79a-9096-4c6b-9724-ae605b7ffae2", "class": "Investigator", - "label": "Ugne Klibaite", + "label": "Ralph Peterson", "facts": { + "consortium_role": [ + "Research Staff (Scientist and others), Postdoc/Grad Student" + ], "name": [ - "Ugne Klibaite" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/b7b55255-04e1-45e6-934e-af38990ff414", - "class": "Investigator", - "label": "Uros Topalovic", - "facts": { - "consortium_role": [ - "Postdoc/Grad Student" - ], - "name": [ - "Uros Topalovic" - ], - "orcid": [ - "https://orcid.org/0000-0003-4005-7979" + "Ralph Peterson" + ], + "orcid": [ + "https://orcid.org/0000-0002-2692-5955" ] }, "out": [ { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" - } - ], - "in": [ + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + }, { - "predicate": "members", - "source": "https://brain-bbqs.org/id/93fa0810-51f4-4e71-badf-e5e8d3e40dc3" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], + "in": [], "dangling": [], "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/70205506-97d5-4503-bc59-e9a25934e699", + "id": "https://brain-bbqs.org/id/dd96356c-60d7-4a65-9be7-7a622de4287d", "class": "Investigator", - "label": "Varun Thvar", + "label": "Rishi Suresh", "facts": { + "consortium_role": [ + "Research Staff (Scientist and others)" + ], "name": [ - "Varun Thvar" + "Rishi Suresh" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/53e6a0e7-68a8-457d-8fa8-0763d062dcda" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad" + } ], + "dangling": [], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/e3335c53-2c38-444e-aff5-43a4268c97bf", + "id": "https://brain-bbqs.org/id/2634f607-be46-4d8d-baae-6ec0d66a5436", "class": "Investigator", - "label": "Vijay Balasubramanian", + "label": "Robert Froemke", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], - "external_url": [ - "https://reporter.nih.gov/search/results?pi_id=10062621" - ], "name": [ - "Vijay Balasubramanian" + "Robert Froemke" + ], + "orcid": [ + "https://orcid.org/0000-0002-1230-6811" ] }, - "out": [], + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + } + ], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/2de0b139-4980-4479-9362-e6d68c33d1c8" + "source": "https://brain-bbqs.org/id/role/4fe6e211-9d96-4f8b-8753-c5a002e13b72" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad" + "source": "https://brain-bbqs.org/id/6efc2552-7cd7-4e53-bd2d-41fee6824cf7" } ], "dangling": [], - "degree": 2, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/def6d629-21cc-431c-8cab-0327f97ee138", + "id": "https://brain-bbqs.org/id/40d5a0bc-769a-4450-9355-d561ff9494eb", "class": "Investigator", - "label": "Vincent Gracco", + "label": "Ryan Ly", "facts": { "consortium_role": [ - "Co-Investigator" + "Research Staff (Scientist and others)" ], "name": [ - "Vincent Gracco" + "Ryan Ly" + ], + "orcid": [ + "https://orcid.org/0000-0001-9238-0642" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "members", - "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/9095f7a2-0d1a-4ac7-9cdd-12f28dbe42ea", + "id": "https://brain-bbqs.org/id/4b90a4f4-0010-4b31-8adb-db169e15a70a", "class": "Investigator", - "label": "Vivek Prakash", + "label": "Sandy Hider", "facts": { "consortium_role": [ - "Co-Investigator" + "Software Developer" ], "name": [ - "Vivek Prakash" + "Sandy Hider" ], "orcid": [ - "https://orcid.org/0000-0003-4569-6462" + "https://orcid.org/0009-0002-0323-6986" ] }, "out": [ @@ -14700,71 +15567,87 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/8694fef3-33b8-491f-a806-7d0c8b5a60bf", + "id": "https://brain-bbqs.org/id/4543ce04-8f6e-4713-8fa7-2552664e28ae", "class": "Investigator", - "label": "Wan Chen Lin", + "label": "Sankar Alagapan", "facts": { "consortium_role": [ - "Postdoc/Grad Student" + "Co-Investigator" ], "name": [ - "Wan Chen Lin" + "Sankar Alagapan" + ], + "orcid": [ + "https://orcid.org/0000-0002-2056-5450" + ], + "research_areas": [ + "Neuromodulation", + "Psychiatric disorders" + ], + "skills": [ + "Machine learning", + "Time series analysis" ] }, "out": [ { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" }, { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" }, { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], - "in": [], + "in": [ + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/a474b99d-19ed-4d37-b39f-c22ba57b2101" + } + ], "dangling": [], - "degree": 3, + "degree": 4, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/1cfe15ec-b6a7-4534-b69d-79bb63b341b6", + "id": "https://brain-bbqs.org/id/aa8884d6-2eae-451a-828a-92e4595c273e", "class": "Investigator", - "label": "Weikang Shi", + "label": "Sara Goering", "facts": { "consortium_role": [ - "Postdoc/Grad Student" + "Co-Investigator" ], "name": [ - "Weikang Shi" + "Sara Goering" ] }, - "out": [], + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/2fb1cdc9-28b2-4709-adf4-c914a44e042d", + "id": "https://brain-bbqs.org/id/924e4ef8-ee41-480e-9d33-9807b471878d", "class": "Investigator", - "label": "William Nacci", + "label": "Sara Sanchez-Alonso", "facts": { "consortium_role": [ - "Postdoc/Grad Student" + "Research Staff (Scientist and others)" ], "name": [ - "William Nacci" - ], - "orcid": [ - "https://orcid.org/0009-0000-9565-0783" + "Sara Sanchez-Alonso" ] }, "out": [ @@ -14788,7 +15671,7 @@ "in": [ { "predicate": "members", - "source": "https://brain-bbqs.org/id/6a224a59-b37c-40b2-a4ef-f43393d94357" + "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" } ], "dangling": [], @@ -14797,240 +15680,247 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/0f65886e-44cb-4a8b-88a2-ecb214b0ea99", + "id": "https://brain-bbqs.org/id/e5bdf58e-a1ff-4f5f-aa6d-667de414e16e", "class": "Investigator", - "label": "Yangjia Li", + "label": "Satrajit Sujit Ghosh", "facts": { "consortium_role": [ - "Research Staff (Scientist and others)" + "Principal Investigator (PI)" ], "name": [ - "Yangjia Li" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/0a39ab50-9241-4b17-b6d4-77d5ac81e519", - "class": "Investigator", - "label": "Yankun Xu", - "facts": { - "name": [ - "Yankun Xu" + "Satrajit Sujit Ghosh" ], "orcid": [ - "https://orcid.org/0000-0002-4410-4106" + "https://orcid.org/0000-0002-6911-4929" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" - } - ], + "out": [], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/c65b0c08-04d4-42fb-9ca4-dcc64f2f78f8" + "source": "https://brain-bbqs.org/id/role/29a72f60-6de3-4c19-928c-05cd16342d6e" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/7924e7d9-5b53-4525-95ef-3f5a6b9112a5" } ], "dangling": [], - "degree": 3, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/c9fb9f5b-29a9-4138-9434-894ab7b7a909", + "id": "https://brain-bbqs.org/id/8d6214d3-a2d9-40c2-8cf6-f5e0d0e6afa9", "class": "Investigator", - "label": "Yaroslav Halchenko", + "label": "Sequioa Smith", "facts": { "consortium_role": [ - "Co-Investigator" + "Postdoc/Grad Student" ], "name": [ - "Yaroslav Halchenko" + "Sequioa Smith" ], "orcid": [ - "https://orcid.org/0000-0003-3456-2493" + "https://orcid.org/0000-0002-4704-2852" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" - } - ], + "out": [], "in": [ { "predicate": "members", - "source": "https://brain-bbqs.org/id/d17a5c60-e529-48ed-b4af-11976e4eb3fb" + "source": "https://brain-bbqs.org/id/622f970b-e529-441d-b5f3-739025a38aa9" } ], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/13ccc90e-b105-48b2-8590-4804cd2b5f54", + "id": "https://brain-bbqs.org/id/026f060a-5264-4ed0-89e7-d2cd2c436b38", "class": "Investigator", - "label": "Yi Zuo", + "label": "Shannon Gourley", "facts": { "consortium_role": [ - "Co-Investigator" + "Principal Investigator (PI)" ], "name": [ - "Yi Zuo" + "Shannon Gourley" + ], + "orcid": [ + "https://orcid.org/0000-0002-7783-9379" ] }, - "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - } - ], + "out": [], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/535c5cae-fbd2-4199-a1c2-02af47928538" + "source": "https://brain-bbqs.org/id/role/02220da7-1bf8-49e9-8ff0-ed008ea8d03e" } ], "dangling": [], - "degree": 3, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/3576ac45-d083-4c4c-84c0-04a44227dc2b", + "id": "https://brain-bbqs.org/id/fa291a57-48b1-4ad1-87da-4a04a01787e8", "class": "Investigator", - "label": "Yibei Chen", + "label": "Shelly Flagel", "facts": { "consortium_role": [ - "Postdoc/Grad Student" + "Principal Investigator (PI)" ], "name": [ - "Yibei Chen" - ], - "orcid": [ - "https://orcid.org/0000-0003-2882-0900" + "Shelly Flagel" ] }, "out": [ - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" - }, { "predicate": "member_of_group", "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" - }, + } + ], + "in": [ { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/86821e6a-b746-49fd-b4b6-5ea4dd02e5d7" }, { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + "predicate": "members", + "source": "https://brain-bbqs.org/id/1c181fed-73e8-46be-8d27-198f64e936ea" } ], - "in": [], "dangling": [], - "degree": 4, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/156fb20f-5e40-4804-992d-dc353b5e99e4", + "id": "https://brain-bbqs.org/id/0f0ad5c2-496b-42a8-91b7-b798742bcdc3", "class": "Investigator", - "label": "Yisong Yue", + "label": "Shreya Saxena", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], + "external_url": [ + "https://reporter.nih.gov/search/results?pi_id=15537186" + ], "name": [ - "Yisong Yue" + "Shreya Saxena" ] }, "out": [], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/a2f1ea9f-aab3-4407-b7d3-4570537c2678" + "source": "https://brain-bbqs.org/id/role/692b00f5-b8e0-4344-8bd0-75def6c4b99e" + }, + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/58923333-d8e5-4e54-a86d-c229e523fec8" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/1424d10f-795c-47e5-a6d7-d6705fad611a" + "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/622f970b-e529-441d-b5f3-739025a38aa9" } ], "dangling": [], - "degree": 2, + "degree": 4, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/83a4df24-ed1c-462a-bf74-36c68150c42c", + "id": "https://brain-bbqs.org/id/7eb2abf1-f38f-4693-afb6-9313f96d2ff4", "class": "Investigator", - "label": "Yuan Luo", + "label": "Shuren Xia", "facts": { + "consortium_role": [ + "Postdoc/Grad Student" + ], "name": [ - "Yuan Luo" + "Shuren Xia" + ], + "orcid": [ + "https://orcid.org/0009-0002-9213-1384" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "members", - "source": "https://brain-bbqs.org/id/208980e9-92b9-447e-a2ca-e83bf61db159" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/87b79b22-888b-40ac-bee6-32a62f07645f", + "id": "https://brain-bbqs.org/id/bcdcd220-fa82-47d4-9c1b-7a8da03dadd8", "class": "Investigator", - "label": "Yunsoo Kim", + "label": "Sima Mofakham", "facts": { + "consortium_role": [ + "Principal Investigator (PI)" + ], + "description": [ + "PI for SeeMe consciousness detection project" + ], "name": [ - "Yunsoo Kim" + "Sima Mofakham" + ], + "orcid": [ + "https://orcid.org/0000-0002-4509-6080" ] }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + } + ], + "in": [ + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/fbe6026f-8aad-439e-8fe2-da3cce084d1c" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/c04b3bcd-d1db-4b3c-9dc6-a4c97039cad6" + } ], + "dangling": [], + "degree": 5, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/9045540f-6ba2-4b95-bc69-98527f947a27", + "id": "https://brain-bbqs.org/id/f1ff44d0-aff1-4a53-91e6-7a6b64aa0af0", "class": "Investigator", - "label": "Yuyi Chang", + "label": "Sofia Juliani", "facts": { - "consortium_role": [ - "Postdoc/Grad Student" - ], "name": [ - "Yuyi Chang" + "Sofia Juliani" ] }, "out": [ @@ -15050,40 +15940,52 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/307a2853-901d-4ce8-9894-a999868db705", + "id": "https://brain-bbqs.org/id/3be55dd2-fe02-418e-a97b-aa223e988663", "class": "Investigator", - "label": "Yvonne Bennett", + "label": "Stephanie Prince", "facts": { + "consortium_role": [ + "Research Staff (Scientist and others)" + ], "name": [ - "Yvonne Bennett" + "Stephanie Prince" + ], + "orcid": [ + "https://orcid.org/0000-0002-3083-6955" ] }, - "out": [], + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/7ef0ea15-6f36-4bca-8eee-626e9bf76254", + "id": "https://brain-bbqs.org/id/de5929a1-5c9a-4f4f-8d0f-4cc0d040160f", "class": "Investigator", - "label": "Yvonne M Bennett", + "label": "stephen heisig", "facts": { + "consortium_role": [ + "Research Staff (Scientist and others)" + ], "name": [ - "Yvonne M Bennett" + "stephen heisig" ] }, "out": [ { "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" - }, - { - "predicate": "member_of_group", - "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" }, { "predicate": "member_of_group", @@ -15092,34 +15994,34 @@ ], "in": [], "dangling": [], - "degree": 3, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/ebbb8fee-72ed-4cb0-9d25-94e670379f08", + "id": "https://brain-bbqs.org/id/864e9b52-4173-4b92-bd81-d0bc6a7fc3cb", "class": "Investigator", - "label": "Zheng Kuang", + "label": "Steve Chang", "facts": { "consortium_role": [ "Principal Investigator (PI)" ], - "external_url": [ - "https://reporter.nih.gov/search/results?pi_id=12046106" - ], "name": [ - "Zheng Kuang" + "Steve Chang" + ], + "orcid": [ + "https://orcid.org/0000-0003-4160-7549" ] }, "out": [], "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/ad57ca2b-08ac-42a0-991e-61feaf2c5e39" + "source": "https://brain-bbqs.org/id/role/b87d800c-a0aa-4ea4-aa2e-4fba4fbf8480" }, { "predicate": "members", - "source": "https://brain-bbqs.org/id/fb3cf5ef-e850-44d2-887c-0d0ef608f48c" + "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" } ], "dangling": [], @@ -15128,18 +16030,18 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/e0d25d6e-4879-436d-980f-e690e3e5a937", + "id": "https://brain-bbqs.org/id/e03557cc-99aa-4b15-8786-bde9a5253fd1", "class": "Investigator", - "label": "Álvaro Vega Hidalgo", + "label": "Suliman Sharif", "facts": { "consortium_role": [ - "Postdoc/Grad Student" + "Research Staff (Scientist and others)" ], "name": [ - "Álvaro Vega Hidalgo" + "Suliman Sharif" ], "orcid": [ - "https://orcid.org/0000-0003-4088-8027" + "https://orcid.org/0000-0002-1342-9258" ] }, "out": [ @@ -15163,108 +16065,121 @@ "in": [ { "predicate": "held_by", - "source": "https://brain-bbqs.org/id/role/d7f6d7e4-401f-43ea-a3e2-ac34d7e73f1f" + "source": "https://brain-bbqs.org/id/role/3df7974f-d227-4954-a984-3d403436fa70" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/7924e7d9-5b53-4525-95ef-3f5a6b9112a5" } ], "dangling": [], - "degree": 5, + "degree": 6, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/c4b8f5ff-4ac3-4c1b-a978-bd7d1c2dbb86", - "class": "Job", - "label": "Canada Impact+ Doctoral Research Training Award ($40K/yr, 3 years)", + "id": "https://brain-bbqs.org/id/82f53756-81ce-4348-a8bb-6bce2e685dee", + "class": "Investigator", + "label": "Talia V Roman Lopez", "facts": { - "description": [ - "The Canada Impact+ Research Training Awards (CIRTA) is a targeted, one-time initiative to recruit international or returning Canadian doctoral students to Canada. Funded by CIHR, NSERC, and SSHRC. Award value: $40,000/year for 3 years (600 awards across Canada, 30 allocated to McGill). Priority areas include: Advanced digital technologies (AI, quantum, cybersecurity), Health/biotechnology, Clean technology, Environment/climate resilience, Food/water security, Democratic/community resilience, Manufacturing/advanced materials, and Defense/dual-use technologies. McGill Faculty members (supervisors) identify and nominate incoming doctoral students for Fall 2026." - ], - "external_url": [ - "https://www.mcgill.ca" + "consortium_role": [ + "Postdoc/Grad Student" ], "name": [ - "Canada Impact+ Doctoral Research Training Award ($40K/yr, 3 years)" + "Talia V Roman Lopez" + ], + "orcid": [ + "https://orcid.org/0000-0001-5038-5445" ] }, - "out": [ + "out": [], + "in": [ { - "predicate": "part_of_org", - "target": "https://brain-bbqs.org/id/c28b3fe8-8dbf-4037-ab56-fda6d170cfc4" + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/caef691a-ad28-4fbe-b098-6536757b49d6" } ], - "in": [], "dangling": [], "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/8515cd09-418b-43c0-89b2-9076744b17e6", - "class": "Job", - "label": "Canada Impact+ Postdoctoral Research Training Award ($70K/yr, 2 years)", + "id": "https://brain-bbqs.org/id/93a3260d-e267-451b-9960-06cc9ae3a40c", + "class": "Investigator", + "label": "Talmo Pereira", "facts": { - "description": [ - "The Canada Impact+ Research Training Awards (CIRTA) is a targeted, one-time initiative to recruit international or returning Canadian postdoctoral researchers to Canada. Funded by CIHR, NSERC, and SSHRC. Award value: $70,000/year for 2 years (400 awards across Canada, 17 allocated to McGill). Priority areas include: Advanced digital technologies (AI, quantum, cybersecurity), Health/biotechnology, Clean technology, Environment/climate resilience, Food/water security, Democratic/community resilience, Manufacturing/advanced materials, and Defense/dual-use technologies. All eligible nominees in McGill's institutional submission are expected to receive the award." - ], - "external_url": [ - "https://www.mcgill.ca" + "consortium_role": [ + "Principal Investigator (PI)" ], "name": [ - "Canada Impact+ Postdoctoral Research Training Award ($70K/yr, 2 years)" + "Talmo Pereira" + ], + "orcid": [ + "https://orcid.org/0000-0001-9075-8365" ] }, "out": [ { - "predicate": "part_of_org", - "target": "https://brain-bbqs.org/id/c28b3fe8-8dbf-4037-ab56-fda6d170cfc4" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + } + ], + "in": [ + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/63311822-3561-4d3f-929d-42da23209e90" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/5b794afd-cf08-4107-81c8-522a29714830" } ], - "in": [], "dangling": [], - "degree": 1, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/ca41ad35-92a2-4391-95c3-0db49351b9a5", - "class": "Job", - "label": "Engineer/Data Science positions at International Brain Laboratory (IBL) ", + "id": "https://brain-bbqs.org/id/cbb1fcfa-0a1d-432d-a4bb-a325516b6594", + "class": "Investigator", + "label": "Tanya St. John", "facts": { - "external_url": [ - "https://www.internationalbrainlab.com/opportunities#community-engineer" + "consortium_role": [ + "Research Staff (Scientist and others)" ], "name": [ - "Engineer/Data Science positions at International Brain Laboratory (IBL) " + "Tanya St. John" ] }, - "out": [ + "out": [], + "in": [ { - "predicate": "part_of_org", - "target": "https://brain-bbqs.org/id/117670d4-58c8-49ed-acb8-311c357126ce" + "predicate": "members", + "source": "https://brain-bbqs.org/id/dfbfe6e3-bfae-4813-af08-0ded1cc2a3e9" } ], - "in": [], "dangling": [], "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/7117c8b9-6d2f-4737-9490-09934fd89aeb", - "class": "Job", - "label": "Organoid Intelligence through Control of Neural Population Dynamics (FBC_PD)", + "id": "https://brain-bbqs.org/id/178d1833-2f0c-4a20-9f06-c3106f12b21c", + "class": "Investigator", + "label": "Taqiya Ehsan", "facts": { - "description": [ - "Fully-funded postdoctoral position in organoid intelligence through control of neural population dynamics. Join the Neural Systems and Machine Learning Lab at UC Berkeley and Lawrence Berkeley National Laboratory." + "consortium_role": [ + "Postdoc/Grad Student" ], "name": [ - "Organoid Intelligence through Control of Neural Population Dynamics (FBC_PD)" + "Taqiya Ehsan" ] }, "out": [ { - "predicate": "part_of_org", - "target": "https://brain-bbqs.org/id/8f22c7e2-06f2-4c84-aa53-071dcce8f875" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" } ], "in": [], @@ -15274,42 +16189,103 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/12234308-3c6b-4d75-a135-f8fb127d4389", - "class": "Job", - "label": "Postdoctoral position in statistical methods for behavioral analysis", + "id": "https://brain-bbqs.org/id/f6fd8ef2-e06f-4f72-bfc9-4464947fc0b9", + "class": "Investigator", + "label": "Taylor Wise", "facts": { + "consortium_role": [ + "Postdoc/Grad Student" + ], "name": [ - "Postdoctoral position in statistical methods for behavioral analysis" + "Taylor Wise" + ], + "orcid": [ + "https://orcid.org/0000-0002-9937-3493" + ], + "research_areas": [ + "Social cognition", + "comparative cognition", + "spatial-social interactions" + ] + }, + "out": [], + "in": [ + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/714db00c-3814-4ee2-878e-332e1894bc11" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" + } + ], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/a7318228-623e-4f94-a7e6-5e3fed968e1a", + "class": "Investigator", + "label": "Tekraj Chhetri", + "facts": { + "external_url": [ + "https://reporter.nih.gov/search/results?pi_id=9215633" + ], + "name": [ + "Tekraj Chhetri" + ], + "research_areas": [ + "Data infrastructure", + "FAIR data sharing", + "Standardization" + ], + "skills": [ + "Data engineering", + "Metadata standards", + "Pipeline orchestration" ] }, "out": [ { - "predicate": "part_of_org", - "target": "https://brain-bbqs.org/id/5b794afd-cf08-4107-81c8-522a29714830" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + } + ], + "in": [ + { + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/c70a461e-5956-4c4f-aaba-40f11cc7b350" + }, + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/7924e7d9-5b53-4525-95ef-3f5a6b9112a5" } ], - "in": [], "dangling": [], - "degree": 1, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/35e3244e-6533-49e7-b63a-3619d2cf18dc", - "class": "Job", - "label": "Theoretical Understanding of Distributed Neural Population Dynamics (Theory_PD)", + "id": "https://brain-bbqs.org/id/6a1a2d08-5aec-4450-a9db-8dad62b8f4c4", + "class": "Investigator", + "label": "Teneille Brown", "facts": { - "description": [ - "Fully-funded postdoctoral position focused on theoretical understanding of distributed neural population dynamics. Join the Neural Systems and Machine Learning Lab at UC Berkeley and Lawrence Berkeley National Laboratory." + "consortium_role": [ + "Co-Investigator" ], "name": [ - "Theoretical Understanding of Distributed Neural Population Dynamics (Theory_PD)" + "Teneille Brown" + ], + "orcid": [ + "https://orcid.org/0000-0002-3398-163X" ] }, "out": [ { - "predicate": "part_of_org", - "target": "https://brain-bbqs.org/id/8f22c7e2-06f2-4c84-aa53-071dcce8f875" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" } ], "in": [], @@ -15319,4825 +16295,4772 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/9a8ccd3e-8d5a-4169-8ee9-6c64bc650803", - "class": "MLModel", - "label": "CEBRA", + "id": "https://brain-bbqs.org/id/c520d01a-3746-4f7d-baff-ad1dab70e1b3", + "class": "Investigator", + "label": "Terry Jernigan", "facts": { - "description": [ - "Dimensionality reduction revealing hidden structures in neural time series" - ], - "external_url": [ - "https://cebra.ai/" - ], "name": [ - "CEBRA" + "Terry Jernigan" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/d2821755-977a-46a2-a089-169f6e66aeea" + } ], + "dangling": [], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/de29b286-d343-4108-90d9-3d11f8adc030", - "class": "MLModel", - "label": "DLC Model Zoo", + "id": "https://brain-bbqs.org/id/43d7d5a8-8912-4a93-b571-f3c97f41bd9d", + "class": "Investigator", + "label": "Test User", "facts": { - "description": [ - "Pre-trained pose estimation for diverse species" - ], - "external_url": [ - "https://huggingface.co/mwmathis" - ], "name": [ - "DLC Model Zoo" + "Test User" ] }, - "out": [], + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/0a91143c-35e4-4cf1-a1d5-301b6a8651ae", - "class": "MLModel", - "label": "DLC Organization", + "id": "https://brain-bbqs.org/id/c96b95c1-3ba5-4da4-9683-d714b853e4d8", + "class": "Investigator", + "label": "test-user-tier1", "facts": { - "description": [ - "Centralized repository of pose estimation models and demos" - ], - "external_url": [ - "https://huggingface.co/DeepLabCut" - ], "name": [ - "DLC Organization" + "test-user-tier1" ] }, - "out": [], + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540", - "class": "Project", - "label": "R24MH136632 · Ecosystem for Multi-modal Brain-behavior Experimentation and Research (EMBER)", + "id": "https://brain-bbqs.org/id/25a4f79c-6020-4074-b501-0114a205175f", + "class": "Investigator", + "label": "Thomas Heeps", "facts": { - "abstract": [ - "PROJECT SUMMARY\nNeuroscience research has historically relied on observing tightly controlled behaviors in siloed laboratory\nexperiments, constraining our understanding of the neural bases of complex behaviors observed in naturalistic\nsettings. With ongoing advances in unobtrusive sensing technology, artificial intelligence, and machine learning\n(AI/ML), and availability of computing power, the field of neuroscience has been afforded an opportunity to make\nlarge-scale discoveries hitherto unimaginable. For this to be realized, however, it is crucial to facilitate secondary\nanalyses that cut across individual datasets, allowing for research that transcends individual project designs.\nSuch a goal cannot be achieved without a data archive that provides a compelling technical solution for storing\nand curating datasets, and that provides close integration with analytical resources that require minimal technical\nexpertise to be leveraged.\nHere, we propose the Ecosystem for Multi-modal Brain-behavior Experimentation and Research (EMBER), a\ndata archive specifically tailored to serve the unique needs of the Brain Behavior Quantification and\nSynchronization (BBQS) research community, which will be at the forefront of advancing neurobehavioral\nknowledge in coming years. At the heart of EMBER is a scalable, hybrid data archive which will house and\nmanage multimodal and multi-species data collected by diverse research groups. Crucially, our hybrid\narchitecture will not only automatically execute the optimal storage scheme for different modalities of data,\nleveraging existing BRAIN Informatics resources, but also achieve dual objectives of ensuring the security of\nbehavioral and environmental data — which may include Protected Health Information (PHI) and Personally\nIdentifiable Information (PII) — as well as expediting querying and data access not only within BBQS datasets\nbut also with other BRAIN resources. Different cadres of EMBER users, such as BBQS data generators,\nanalysts, as well as the broader neuroscience community will be able to ingest, curate, and instigate discovery\nfrom data using a user-friendly portal that will streamline highly technical data harmonization and synchronization\nsteps. In particular, development, testing, and deployment of analysis tools will be supported by cloud-based\nsandboxes that are seamlessly integrated with ML/AI resources developed by the BBQS Data Coordination and\nArtificial Intelligence Center (DCAIC).\nIntegral to EMBER’s success will be acceptance in the community as the gold-standard engine for discovery,\nproviding utility beyond being simply a passive, program-mandated data archive. Throughout its lifecycle, we will\nnurture bidirectional collaboration with the data generators, analysts, as well as the broader neuroscience\nresearch community to introduce and maintain tools for sharing, querying, and analyzing data. We anticipate\nthat EMBER and associated data resources will maximize the BBQS program’s potential to reach its ambitious\nobjectives of transforming our understanding of the link between brain and behavior." - ], - "award_amount": [ - "1164394" - ], - "description": [ - "Ecosystem for Multi-modal Brain-behavior Experimentation and Research (EMBER)" - ], - "external_url": [ - "https://reporter.nih.gov/project-details/1R24MH136632-01" - ], - "fiscal_year": [ - "2024" - ], - "grant_number": [ - "R24MH136632" - ], - "keywords": [ - "Data Archive", - "EMBER", - "NWB", - "Ontologies", - "Reproducibility" - ], - "mechanism": [ - "R24" - ], "name": [ - "R24MH136632" - ], - "nih_link": [ - "https://reporter.nih.gov/project-details/1R24MH136632-01" - ], - "onboarding_status": [ - "not_started" - ], - "reporter_project_num": [ - "1R24MH136632-01" - ], - "studies_human": [ - "true" - ], - "study_scope": [ - "All Species" - ], - "title": [ - "Ecosystem for Multi-modal Brain-behavior Experimentation and Research (EMBER)" + "Thomas Heeps" ] }, - "out": [ - { - "predicate": "funded_datasets", - "target": "https://brain-bbqs.org/id/4f6fe91b-9a18-467b-8a17-46bc3404f22e" - }, - { - "predicate": "funded_datasets", - "target": "https://brain-bbqs.org/id/72c84eee-67e0-47db-9502-bb55558d9819" - }, - { - "predicate": "funded_datasets", - "target": "https://brain-bbqs.org/id/95b1db49-e4dd-4bab-9bb1-21400d850386" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/7cccc8d1-98d9-4ca2-aaf8-cb9c9f836f06" - } - ], + "out": [], "in": [ { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/5c64f851-de9f-4496-84da-58ed338ffa65" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/145ca46a-181b-4fb5-b546-3522f659e770" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/0dca4f7e-50c2-4cc8-ac51-1cbe7cd5deaa" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/455424c4-b3b7-466e-b6f0-c959fbb74b77" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/642bc862-c174-48ba-8b1b-e7c1356e07ab" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/3d109ffa-adb1-4a1e-b2fd-5f516280d7f7" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/7492a89a-dd5f-46af-871d-c6f9a0bd6eb7" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/68749a60-249f-4eb2-ad4a-7ae78c76a2f9" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/b450bf2e-e124-481f-8950-2e7b03832f17" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/3cc8ceb9-f7ea-4724-91ed-546efb08242b" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/3d7151df-4a2b-40cd-97ae-0f695e5d237e" + "predicate": "members", + "source": "https://brain-bbqs.org/id/622f970b-e529-441d-b5f3-739025a38aa9" } ], "dangling": [], - "degree": 15, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608", - "class": "Project", - "label": "R34DA059500 · Transformative Optical Imaging of Brain & Behavior in Navigating Genetic Species", + "id": "https://brain-bbqs.org/id/ddf3df70-64df-4112-822c-1ebf2bb895e0", + "class": "Investigator", + "label": "Thore Bergman", "facts": { - "abstract": [ - "PROJECT SUMMARY / ABSTRACT\nOur long-term goal is to define general principles that connect neuronal activity to unconstrained behaviors in\nnatural sensory environments. Achieving this goal will require the development of new tools to quantitatively\ncompare behavior across species in complex environments and to monitor neural activity in freely moving an-\nimals. Here we propose to bring together a diverse, multi-disciplinary team of five labs with a track record of\nproductively measuring and modeling neural activity and behavior. We will use two parallel approaches to make\nprogress towards imaging neural activity from freely moving small genetic model organisms as they navigate\ncomplex sensory environments. In Aim 1 we will develop behavioral apparatus that allows for experimenter\ncontrol of sensory stimuli (mechanosensory flow, odor, and visual stimuli) while monitoring unconstrained be-\nhavior at two resolutions. Low resolution measurements allow for quantification of stimulus-guided navigation,\nwhile high resolution measurements allow for detailed quantification of body posture and limb kinematics, and\nwill eventually permit imaging of neural activity. In Aim 2, we will develop bioluminescence-based transgenic\nanimals and techniques for imaging neural activity in freely moving flies and fish. Optimization of these reagents\nand protocols will allow for eventual simultaneous measurements of neural activity and behavior in larger and\nmore complex environments. This work draws on our collective expertise in quantitative behavior, biolumines-\ncent indicators, real-time tracking of animal behavior at high resolution, and physical modeling of animal behav-\nior. This work will advance technologies for studying neural activity in unconstrained animals and establish a\ncollaborative team to pursue this work." - ], - "award_amount": [ - "349975" - ], - "description": [ - "Transformative Optical Imaging of Brain & Behavior in Navigating Genetic Species" - ], - "external_url": [ - "https://reporter.nih.gov/project-details/5R34DA059500-02" - ], - "fiscal_year": [ - "2025" - ], - "grant_number": [ - "R34DA059500" - ], - "keywords": [ - "Genetic species", - "Optical imaging", - "Spatial navigation", - "State-space modeling" - ], - "mechanism": [ - "R34" + "consortium_role": [ + "Field site director, collaborator" ], "name": [ - "R34DA059500" - ], - "nih_link": [ - "https://reporter.nih.gov/project-details/5R34DA059500-02" - ], - "onboarding_status": [ - "not_started" - ], - "reporter_project_num": [ - "5R34DA059500-02" - ], - "studies_human": [ - "false" - ], - "studies_species_name": [ - "Danio rerio", - "Drosophila melanogaster" + "Thore Bergman" ], - "title": [ - "Transformative Optical Imaging of Brain & Behavior in Navigating Genetic Species" + "orcid": [ + "https://orcid.org/0000-0002-9615-5001" ] }, "out": [ { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/4308a85a-925b-4012-9d19-ea11860d7bf1" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/bd142774-20d3-461d-a99f-7fdc94c120bd" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" }, { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/436525a6-acbf-4066-ac75-82845a8db8cc" - }, + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + } + ], + "in": [], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/1962a240-a592-484c-b812-122a5dad2951", + "class": "Investigator", + "label": "Tianqing Li", + "facts": { + "consortium_role": [ + "Postdoc/Grad Student" + ], + "name": [ + "Tianqing Li" + ] + }, + "out": [ { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/8e40951f-ace0-4470-ab0f-3dd6bc366c8b" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" } ], "in": [ { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/fa7fab82-ca22-484b-a5aa-f775d831c4a6" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/92a2b8eb-f9ed-422a-9a23-d8a9e12cf331" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/0a29a35d-e673-42f7-a590-23f0fe7055f7" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/bf82a7b1-f5dc-4ec7-8117-927452fa5027" + "predicate": "members", + "source": "https://brain-bbqs.org/id/93fa0810-51f4-4e71-badf-e5e8d3e40dc3" } ], "dangling": [], - "degree": 10, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/4f2619b1-a6a4-48e5-b21a-0f5455354ea9", - "class": "Project", - "label": "R34DA059506 · High-resolution 3D tracking of social behaviors for deep phenotypic analysis", + "id": "https://brain-bbqs.org/id/ec6cb02d-5d60-4e1b-bfa8-e7ce7f857f90", + "class": "Investigator", + "label": "Tim Brown", "facts": { - "abstract": [ - "Project Summary\nThe aim of this proposal is to plan for and deliver a proof-of-concept solution for an innovative\nand easy-to-use experimental platform for measuring and quantifying social behaviors in animal\nmodels. Efforts during this initial grant period will be restricted to rats and mice, experimental\nanimals with rich social behaviors, but we hope in future iterations of this program to expand also\nto other model organisms, including birds and monkeys. To capture kinematic details of whole-\nbody movement during social behaviors requires novel solutions for dealing with the inevitable\nocclusions that results from social interactions. To overcome the limitations of current approaches\nwe will build and validate a novel deep neural network that learns to combine images across\nmultiple synchronized cameras and infer the 3D physical coordinates of multiple animals.\nPreliminary studies have been very positive and suggest large improvements over current\nmethods both when it comes to the range of social behaviors that can be tracked and the precision\nwith which they can be measured. Importantly, all new technology will be readily shared with the\nscientific community, thereby leveraging from this single grant the potential for numerous\ninvestigators to dramatically improve the efficiency of their research programs requiring rigorous\nquantitative descriptions of animal behavior." - ], - "award_amount": [ - "362680" - ], - "description": [ - "High-resolution 3D tracking of social behaviors for deep phenotypic analysis" - ], - "external_url": [ - "https://reporter.nih.gov/project-details/5R34DA059506-02" - ], - "fiscal_year": [ - "2025" + "name": [ + "Tim Brown" ], - "grant_number": [ - "R34DA059506" + "research_areas": [ + "Bioethics", + "Neuroethics", + "Philosophy" ], - "keywords": [ - "3D tracking", - "Computer vision", - "Deep phenotyping", - "Keypoint extraction" - ], - "mechanism": [ - "R34" + "skills": [ + "ELSI" + ] + }, + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" + } + ], + "in": [], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/24981995-2cd1-407a-9d2c-0f89f026edeb", + "class": "Investigator", + "label": "Timothy Dunn", + "facts": { + "consortium_role": [ + "Principal Investigator (PI)" ], "name": [ - "R34DA059506" - ], - "nih_link": [ - "https://reporter.nih.gov/project-details/5R34DA059506-02" - ], - "onboarding_status": [ - "not_started" - ], - "reporter_project_num": [ - "5R34DA059506-02" - ], - "studies_human": [ - "false" - ], - "studies_species_name": [ - "Mouse", - "Rat" - ], - "title": [ - "High-resolution 3D tracking of social behaviors for deep phenotypic analysis" + "Timothy Dunn" ] }, "out": [ { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/fa14bcd8-d960-44b1-874c-49e040b64e61" - }, - { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/5a248695-86a9-44ac-b923-a3050572afba" - }, - { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/9f227f88-53ba-4c7c-91e7-334641e4b759" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" } ], "in": [ { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/c65b0c08-04d4-42fb-9ca4-dcc64f2f78f8" + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/df63e239-d918-4780-9eaa-ed34a5748f01" }, { - "predicate": "on_project", + "predicate": "held_by", "source": "https://brain-bbqs.org/id/role/a8f54c17-5723-4efe-99dd-6568342c734d" }, { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/82abd87d-c378-4049-8c84-4eede3066410" + "predicate": "members", + "source": "https://brain-bbqs.org/id/93fa0810-51f4-4e71-badf-e5e8d3e40dc3" } ], "dangling": [], - "degree": 6, + "degree": 4, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/e285ab2b-1a7d-4b2e-9400-b24d6faff6de", - "class": "Project", - "label": "R34DA059507 · Development of a \"smart aviary\" to probe neural dynamics of complex social behaviors in a gregarious songbird", + "id": "https://brain-bbqs.org/id/32937527-a5e9-4a99-84c0-719435f25f8b", + "class": "Investigator", + "label": "Timothy P Roberts", "facts": { - "abstract": [ - "SUMMARY\n The nervous system of social species has evolved to perceive and evaluate signals within a social\ncontext. Social information therefore must impact how the brain processes information, yet little is\nstill known about how the brain integrates social information to produce actions in a social context.\nThis lack of knowledge exists in part because social context is difficult to quantify and because the\nmajority of studies are performed in species that do not have a particularly rich social structure. Here\nwe propose to study the brown-headed cowbird (Molothrus ater), a highly gregarious songbird\nspecies whose social behavior has been well studied and where vocal and non-vocal communication\nsignals form a central and critical component of its social system.\n We have created a “smart aviary” equipped with cameras and microphones that is capable of\nmonitoring behavior in each individual during the entire breeding season. Our aim is to create a fully\nautomated system using computer vision and machine learning technology to evaluate moment-to-\nmoment behavioral interactions between all member of the group (9 females and 7 males) over the\nentire breeding season. We have assembled an interdisciplinary team of engineers, neurobiologists\nand computational scientists, to create a platform where we can record\ndynamics\nquantify\nlearning\ndirectly\nthe\nsegment\ninvasive\nin\nenable\nsocial\ndevelop\nquantify\nassociated\nsocial\nand evaluate how brain\nare shaped within a complex social context over an ethologically relevant timescale. To\n moment-to-moment behavior in each individual bird, we are developing a novel machine\n approach that tracks each bird and predicts its position, orientation, pose, and shape\nfrom images using artificial neural networks and a 3D articulated mesh model. By collecting\noutput of the model over consecutive frames we will obtain a pose trajectory, which we will\nand classify into discrete behaviora l types. We also aim to develop a miniature non-\nwirelessly powered and transmitting recording device optimized for long duration recording\nour aviary that critically does not impact bird individual or social behavior. Such a device would\n us to link neural activation patterns to discrete behavioral events (e.g. male song) within the\ncontext in which these specific events occurred. Supplied with our rich dataset, we aim to\nmathematical tools necessary to generate social network models that will allow us to\nthe specific state of the bird social network associated with neural activation patterns\nwith individual behavioral events. To the best of our nowledge, the proposal to link\nnetwork state to neural activation in a precise quantitative manner has never before been\n,\nk\nattempted. Through these efforts, we will be well positioned to subsequently pursue a Targeted Brain\nCircuits Projects R01 to investigate in a quantitative manner how social context influences brain\nactivity." - ], - "award_amount": [ - "342485" - ], - "description": [ - "Development of a \"smart aviary\" to probe neural dynamics of complex social behaviors in a gregarious songbird" + "consortium_role": [ + "Principal Investigator (PI)" ], "external_url": [ - "https://reporter.nih.gov/project-details/5R34DA059507-02" - ], - "fiscal_year": [ - "2025" - ], - "grant_number": [ - "R34DA059507" - ], - "keywords": [ - "3D tracking", - "Flocking dynamics", - "Neural sequence", - "Smart aviary", - "Songbirds" - ], - "mechanism": [ - "R34" + "https://reporter.nih.gov/search/results?pi_id=6282327" ], "name": [ - "R34DA059507" - ], - "nih_link": [ - "https://reporter.nih.gov/project-details/5R34DA059507-02" - ], - "onboarding_status": [ - "not_started" - ], - "reporter_project_num": [ - "5R34DA059507-02" - ], - "studies_human": [ - "false" + "Timothy P Roberts" ], - "studies_species_name": [ - "Molothrus ater" + "research_areas": [ + "3D social behavior quantification", + "Disease phenotyping", + "Ecological behavior quantification", + "Multi-animal pose reconstruction", + "Prey capture kinematics" ], - "title": [ - "Development of a \"smart aviary\" to probe neural dynamics of complex social behaviors in a gregarious songbird" + "skills": [ + "3D reconstruction", + "Bayesian inference", + "Behavioral segmentation", + "Deep learning", + "Dimensionality reduction", + "Dynamical systems modeling", + "Pose estimation" ] }, "out": [ { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/77f3b242-4db9-4080-843c-d868a6d4f465" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" } ], "in": [ { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/b6d6fbfc-f005-41e9-8e22-6651720030f6" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/db582fe3-ef66-4a67-aca9-9daec764cd4c" + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/60988e88-27ec-4264-9203-98d80d2f3489" }, { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/2de0b139-4980-4479-9362-e6d68c33d1c8" + "predicate": "members", + "source": "https://brain-bbqs.org/id/db72ef76-b8e2-4d0e-85da-c8d475d70628" }, { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/8f554f84-7a48-4b4a-8032-cbab841613fd" + "predicate": "members", + "source": "https://brain-bbqs.org/id/f28a2f16-5259-4e2f-9c8e-a5d11d2b5c5f" } ], "dangling": [], - "degree": 5, + "degree": 4, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7", - "class": "Project", - "label": "R34DA059509 · Behavioral quantification through active learning and multidimensional physiological monitoring", + "id": "https://brain-bbqs.org/id/f33c9c03-f685-4166-b0bf-9ce704b5fa78", + "class": "Investigator", + "label": "Tristan Daniel", "facts": { - "abstract": [ - "Project Summary/Abstract\nNaturalistic contexts provide the opportunity to study the brain and behavior in response to the ethological\nproblems an animal is evolutionarily designed to solve. We seek to expand the capabilities of our current\nbehavioral segmentation approaches to provide a more precise and comprehensive account of behavior. By\nincorporating recent innovations in machine learning, segmentation approaches that can account for behavioral\ndynamics at multiple timescales, and increased breadth in the sampling modalities used to classify behaviors,\nwe will create a toolkit that our team and others can make use of to quantify complex, spontaneous behaviors.\nWe will implement an analysis pipeline to capture and make use of patterns of mouse body position,\nvocalizations, and arousal states. We also aim to capitalize on recent insights into the role of the gut-brain axis\nin shaping behavior. After validating our acquisition and analytical approaches, we will monitor these outputs in\nresponse to controlled, parametric environmental manipulations in two distinct, ethologically-relevant contexts:\nintruder response to resident urine signals and limited access to water. The exploratory data collected in these\nexperiments will be vital to validating our algorithmic advances and for piloting future grant proposals.\n The foundation of this work is a diverse team approach. Our team, comprised of experts in social behavior\nethology, microbiota research information theory, and data-driven computational modeling, will take an end-to\nend approach in executing this proposal. By starting with experimental design informed by all parties, we will\nensure that the resulting pipeline possesses sufficient structure and richness for meaningful analysis. the team\nwill help guide long-term research avenues that are both ethologically appropriate and computationally rigorous.\nLastly, we recognize that open access will greatly accelerate the validation and adoption of these technologies,\na stated aim of this RFA. Dissemination and access to our deliverables will benefit substantially from ongoing\nrelationships with the Pittsburgh Supercomputing Center and OpenBehavior.\n The partnered hardware and software advances of Aim 1a and 1b represent the overarching goal of this\nproposal, an advanced and comprehensive behavior segmentation platform. Aim 2 will interrogate temporally-\ndynamic urine protein signals and Aim 3 will study how progressively increasing thirst induced through water-\nrestriction affect neurobehavioral measures. These contexts will be used to benchmark the broad applicability of\nAim 1 – as well as to explore the potential to address targeted research questions within these frameworks." - ], - "award_amount": [ - "331928" - ], - "description": [ - "Behavioral quantification through active learning and multidimensional physiological monitoring" - ], - "external_url": [ - "https://reporter.nih.gov/project-details/5R34DA059509-02" - ], - "fiscal_year": [ - "2025" - ], - "grant_number": [ - "R34DA059509" - ], - "keywords": [ - "Active learning", - "Adaptive behavior", - "Physiological monitoring", - "State-dependent" - ], - "mechanism": [ - "R34" - ], "name": [ - "R34DA059509" - ], - "nih_link": [ - "https://reporter.nih.gov/project-details/5R34DA059509-02" - ], - "onboarding_status": [ - "not_started" - ], - "reporter_project_num": [ - "5R34DA059509-02" - ], - "studies_human": [ - "false" + "Tristan Daniel" ], - "studies_species_name": [ - "Mouse" + "research_areas": [ + "Animal-Computer Interaction", + "Interface Design" ], - "title": [ - "Behavioral quantification through active learning and multidimensional physiological monitoring" + "skills": [ + "Embedded Systems Development", + "User Interface Design" ] }, "out": [ { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/205009f7-ea15-4e13-9b73-292de432b467" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/3575b5d6-de13-43e9-9391-c5dc106f4dc3" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/4cbadc61-5660-48d8-9b16-7a8749f0defe" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/691a3644-7a61-4b35-9aa2-9753a810792b" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/91a308e7-a52f-4a5e-bce6-699f43554234" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/93e8de08-1a43-4cbd-b120-7b9306a4a44b" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/9b5abbf9-7fe8-489b-9e27-fd2c4f7e5990" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/bcf4ee35-21a5-473e-a2f2-75fa77147072" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" }, { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/c34d88e6-5348-4ef1-87ac-3b5d90417a1f" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" }, { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/c352d902-bd16-447b-b0ca-4b23a59655f9" - }, + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + } + ], + "in": [ { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/d59fccae-d62c-44f8-9b6d-bf9ab2721553" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/e0e97a3f-d239-4739-a9d8-6a2af1c6a838" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/eb63ab45-d094-4b5f-99a8-3fe0cb8529eb" - }, - { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/9f227f88-53ba-4c7c-91e7-334641e4b759" + "predicate": "members", + "source": "https://brain-bbqs.org/id/92f22292-007f-4091-83e9-10df11f14110" } ], + "dangling": [], + "degree": 4, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/feeae3ca-856c-462b-8b35-0fe35e294242", + "class": "Investigator", + "label": "Tucker Lancaster", + "facts": { + "consortium_role": [ + "Postdoc/Grad Student" + ], + "name": [ + "Tucker Lancaster" + ], + "orcid": [ + "https://orcid.org/0000-0003-4074-7128" + ] + }, + "out": [], "in": [ { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/b6d62f54-1ff5-4355-8623-69dbe88aa41e" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/ad57ca2b-08ac-42a0-991e-61feaf2c5e39" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/2cf61a9f-a799-4586-94fc-a71bc80104d6" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/6e99e32c-bc60-4da2-80ac-d6438cc1d6c6" + "predicate": "members", + "source": "https://brain-bbqs.org/id/92f22292-007f-4091-83e9-10df11f14110" } ], "dangling": [], - "degree": 18, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/e5bb6e4f-d3cf-44d4-ac1a-59f76724c0d2", - "class": "Project", - "label": "R34DA059510 · A modeling framework and arena for measuring contextual influences of behavior", + "id": "https://brain-bbqs.org/id/732f511e-4b61-412b-b54d-9c8dbd93c273", + "class": "Investigator", + "label": "Tyler Albarran", "facts": { - "abstract": [ - "PROJECT SUMMARY\nSocial behaviors are essential for survival and reproduction. They also evolve quite rapidly and can\nvary even among closely related species. Traditionally, social behaviors are very difficult to study\nbecause of the complexity of their input, requiring conspecifics to trigger aggressive, cooperative,\nparental, or reproductive behaviors. Additionally, contextual data is important, such as hierarchical\nstatus and environmental factors can also play a role. T his grant will propose to create a\nbehavioral arena capable of mimicking natural environments that are required for social reproductive\nbehaviors, including interactions between a large number of conspecifics, environmental factors\nsuch as male displays, and contextual data such as hierarchical status between various males. Tools\nwill be created to track animals in this arena and build a computational frame work to measure\nand compare social behavioral dynamics. This work will utilize Lake Malawi cichlids, a powerful\nevolutionary model for identification of genes and neural circuit changes associated with differences\nin behavior. This project will generate new tools and datasets for modeling social behaviors, paving the\nway for a large-scale R01." - ], - "award_amount": [ - "321976" - ], - "description": [ - "A modeling framework and arena for measuring contextual influences of behavior" - ], - "external_url": [ - "https://reporter.nih.gov/project-details/5R34DA059510-02" - ], - "fiscal_year": [ - "2025" - ], - "grant_number": [ - "R34DA059510" - ], - "keywords": [ - "Computer vision", - "Conspecifics", - "Hierarchical status", - "Social reproduction" - ], - "mechanism": [ - "R34" + "consortium_role": [ + "Postdoc/Grad Student" ], "name": [ - "R34DA059510" - ], - "nih_link": [ - "https://reporter.nih.gov/project-details/5R34DA059510-02" - ], - "onboarding_status": [ - "not_started" - ], - "reporter_project_num": [ - "5R34DA059510-02" - ], - "studies_human": [ - "false" - ], - "studies_species_name": [ - "Cichlidae" + "Tyler Albarran" ], - "title": [ - "A modeling framework and arena for measuring contextual influences of behavior" + "orcid": [ + "https://orcid.org/0009-0009-1642-4549" ] }, "out": [ { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/154b96da-c04a-442c-868f-1586b692dc42" - }, - { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/7b2f0bde-f010-4315-b856-c217e8ca7788" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" } ], "in": [ { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/0bfdefd7-14a0-48aa-93c2-9f80f19e8e72" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/b8a0aee0-0fb1-4ede-9846-a717a2b63d47" + "predicate": "members", + "source": "https://brain-bbqs.org/id/92f22292-007f-4091-83e9-10df11f14110" } ], "dangling": [], - "degree": 4, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/1e1fc06b-fe5c-4ec2-9f64-474f98ae31e8", - "class": "Project", - "label": "R34DA059512 · High-throughput, high-resolution 3D measurement of ethologically relevant rodent behavior in a dynamic environment", + "id": "https://brain-bbqs.org/id/e1fcac8e-1f50-4dc8-8f14-f0ee62614861", + "class": "Investigator", + "label": "Ueli Rutishauser", "facts": { - "abstract": [ - "Summary\nThe aim of this proposal is to develop an innovative new system, including hardware assemblies and machine\nlearning algorithms, for continuous, high-resolution 3D quantification of behavioral and eliciting stimulus\ndynamics in a natural mouse prey capture paradigm. The system will satisfy a critical unmet need for an easily\nadoptable, modern behavioral measurement technology that extends well beyond current offerings, which are\ndifficult to set up and limited largely to measuring spontaneous animal movement in impoverished, static\nenvironments. Our system consists of a 3D convolutional neural network processing multi-perspective video\nrecordings to provide detailed measurements of both predator (mouse) and prey (cricket) spatiotemporal\nmovement patterns within an enclosed, compact apparatus permitting precise control over the visual\nenvironment. To reduce implementation complexity and enhance usability in other labs, the system will use only\na single commercial video camera and a set of low-cost mirrors to provide the multiple perspectives required for\n3D behavior tracking. By using only a single camera, we also reduce the instrument’s physical footprint, thus\nfacilitating high-throughput studies across multiple setups. Furthermore, our 3D tracking algorithm will be built to\nsupport out-of-the-box generalization to cloned setups, meaning other labs can immediately start doing science\nwith the instrument without laborious data labeling and training steps. As part of our system, we will also develop\nnew methods for analyzing the rich 3D mouse and cricket data to isolate key kinematic and action variables\nalong with comprehensive characterization of stimulus-behavior relationships. We will then investigate how these\nnew measurements can be used to better understand retinitis pigmentosa and Parkinson’s disease. Preliminary\nexperiments have been quite successful and illustrate the promise and power of our approach to collect large\namounts of quantitative behavior data and identify new phenotypes of motor disorders. As our vision is to make\nas large of an impact as possible, our system and datasets will be shared openly with community to catalyze a\nwide range of new research into brain function and treatments for neurological disease." - ], - "award_amount": [ - "350440" - ], - "description": [ - "High-throughput, high-resolution 3D measurement of ethologically relevant rodent behavior in a dynamic environment" - ], - "external_url": [ - "https://reporter.nih.gov/project-details/5R34DA059512-02" - ], - "fiscal_year": [ - "2025" - ], - "grant_number": [ - "R34DA059512" - ], - "keywords": [ - "3D measurement", - "Dynamic environment", - "High-throughput", - "Kinematics", - "Rodent" - ], - "mechanism": [ - "R34" + "consortium_role": [ + "Principal Investigator (PI)" ], "name": [ - "R34DA059512" - ], - "nih_link": [ - "https://reporter.nih.gov/project-details/5R34DA059512-02" - ], - "onboarding_status": [ - "not_started" - ], - "reporter_project_num": [ - "5R34DA059512-02" - ], - "studies_human": [ - "false" - ], - "studies_species_name": [ - "Mus musculus" - ], - "title": [ - "High-throughput, high-resolution 3D measurement of ethologically relevant rodent behavior in a dynamic environment" + "Ueli Rutishauser" ] }, - "out": [ - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/4b31df5d-6d5c-49d5-9abd-ecc1cbafe965" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/750a9501-b64d-4947-91e5-b8ed542420a5" - }, + "out": [], + "in": [ { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/e96847f4-f5a5-4d3c-a358-be3fcc27f390" + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/2c2dc99f-9c5e-43ad-8c5a-7012d2feedba" }, { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/fa14bcd8-d960-44b1-874c-49e040b64e61" + "predicate": "members", + "source": "https://brain-bbqs.org/id/1424d10f-795c-47e5-a6d7-d6705fad611a" }, { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/9f227f88-53ba-4c7c-91e7-334641e4b759" + "predicate": "members", + "source": "https://brain-bbqs.org/id/9515d721-456a-45d1-885c-d97a482317f8" } ], + "dangling": [], + "degree": 3, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/977712f0-0daf-4238-a693-42c96f0874a2", + "class": "Investigator", + "label": "Ugne Klibaite", + "facts": { + "name": [ + "Ugne Klibaite" + ] + }, + "out": [], "in": [ { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/7ef4da01-8107-42b2-bc56-e4fe58d1c6a2" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/df63e239-d918-4780-9eaa-ed34a5748f01" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/4a0c2ae2-92fd-447a-a95e-419db4773d8f" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/a31e280c-89d7-4d68-b3a3-4ecc10429cee" + "predicate": "members", + "source": "https://brain-bbqs.org/id/99bc7f7b-2a3d-4e34-99f1-ec08e12133b2" } ], "dangling": [], - "degree": 9, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18", - "class": "Project", - "label": "R34DA059513 · Computational attribution and fusion of vocalizations, social behavior, and neural recordings in a naturalistic environment", + "id": "https://brain-bbqs.org/id/b7b55255-04e1-45e6-934e-af38990ff414", + "class": "Investigator", + "label": "Uros Topalovic", "facts": { - "abstract": [ - "PROJECT SUMMARY\nSocial vocalizations and movement-generated sounds often provide pivotal knowledge about an animal’s\nidentity, location, or state, yet most studies of natural behavior fail to integrate acoustic information with\nsimultaneous recordings of high-dimensional neural activity and behavioral dynamics. This proposal will develop\nnovel experimental and computational methods to attribute vocal and non-vocal sounds to individuals in a\nnaturalistic, acoustically complex, multi-animal environment. By integrating this rich acoustic information with\nsimultaneous video and wireless neural recordings, we seek to predict auditory cortical responses to auditory\ncues, as a function of social context and individual identity within the family. Aim 1 will develop new tools with\nwhich to attribute vocal and non-vocal sounds to individual animals in a multi-animal setting (i.e., the “who said\nwhat” problem). In Aim 1A, we will collect, curate, and publicly release a range of benchmark datasets containing\nsimultaneous camera and microphone array recordings of multi-animal interactions with ground truth labels of\nsound sources. We will use these benchmarks to validate new models for sound localization. In Aim 1B, we will\ndevelop and release deep learning models that localize sounds with calibrated confidence intervals, using\nsynchronized video measurements to enhance predictions. Aim 2 will use these tools to identify archetypal,\nacoustically-driven social behaviors. We will establish a new experimental paradigm that permits months-long\nmonitoring of rodent social behavior in a large, naturalistic environment with simultaneous camera and\nmicrophone array recordings. Using this data, we will develop novel data analytic approaches that leverage\nsynchronized audio and video data streams to identify social interaction sequences. A key goal is to assess\nindividual differences in social behavior across families. Aim 3 is a proof-of-concept experiment in which we\ndetermine how acoustically-driven social behaviors (established in Aim 2) predict auditory cortex responses to\nboth vocal or movement-generated sounds. To accomplish this, we will make continuous wireless\nelectrophysiological recordings from the auditory cortex of adolescent and adult gerbils within their naturalistic\nfamily environment. We will build regression models to infer our ability to predict neural responses from\nauditory/behavioral covariates (encoding models)." - ], - "award_amount": [ - "361120" - ], - "description": [ - "Computational attribution and fusion of vocalizations, social behavior, and neural recordings in a naturalistic environment" + "consortium_role": [ + "Postdoc/Grad Student" ], - "external_url": [ - "https://reporter.nih.gov/project-details/5R34DA059513-02" + "name": [ + "Uros Topalovic" ], - "fiscal_year": [ - "2025" - ], - "grant_number": [ - "R34DA059513" - ], - "keywords": [ - "Cocktail party problem", - "Multimodal fusion", - "Source separation", - "Vocalizations" - ], - "mechanism": [ - "R34" - ], - "name": [ - "R34DA059513" - ], - "nih_link": [ - "https://reporter.nih.gov/project-details/5R34DA059513-02" - ], - "onboarding_status": [ - "not_started" - ], - "reporter_project_num": [ - "5R34DA059513-02" - ], - "studies_human": [ - "false" - ], - "studies_species_name": [ - "Gerbil" - ], - "title": [ - "Computational attribution and fusion of vocalizations, social behavior, and neural recordings in a naturalistic environment" + "orcid": [ + "https://orcid.org/0000-0003-4005-7979" ] }, "out": [ { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/0e032f88-c50f-4527-9c40-68e9b782173d" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/2370e3b0-8941-46f8-99b0-a30d467e764e" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/38fab5c5-6eb6-4ba1-980a-78e5c2bf2312" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/44b1ac85-feb2-4792-9f46-109cf7876f4a" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/a79d14cd-ae0e-4bce-b09f-8d16e6e15f7f" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/b75b460e-560d-48d4-af7d-1152d34c1d79" - }, - { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/7f92ea75-530c-40bf-83a4-3e1eba4d4179" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [ { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/62fcc478-1ee4-43f5-a5b0-ae02c6955cbf" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/f0b8e0cd-ac28-4f72-8410-be9b81689d08" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/95b0b77d-e396-4d0b-b80e-4b80592a2db6" + "predicate": "members", + "source": "https://brain-bbqs.org/id/93fa0810-51f4-4e71-badf-e5e8d3e40dc3" } ], "dangling": [], - "degree": 10, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/3846417f-c783-484b-9cfc-fbbf8f83fdf5", - "class": "Project", - "label": "R34DA059514 · Towards High-Resolution Neuro-Behavioral Quantification of Sheep in the Field to Study Complex Social Behaviors", + "id": "https://brain-bbqs.org/id/70205506-97d5-4503-bc59-e9a25934e699", + "class": "Investigator", + "label": "Varun Thvar", "facts": { - "abstract": [ - "Abstract\nSocial animals, including humans, engage in complex collective behaviors in the field. While\nthere are simple models of collective decision making and movement that are amenable to\nstudy in traditional laboratory environments, they inevitably fail to capture the full complexity\nof natural behaviors as they occur in the field. Moreover, standard mammalian laboratory\nspecies either exhibit only simple social behaviors (e.g., mice) or are too challenging to house\nin large groups (e.g., primates). Here, we will leverage decades of extensive experience\nstudying sheep in their normal pasture settings and during interactions between ewes and\ntheir lambs. We propose to develop a paradigm for acquiring high resolution (in space and\ntime) measurements of individual herd members, including head-mounted devices to sense\ntheir visual sensorium. We will test these devices in existing herds maintained for agricultural\nstudy, while also developing a robust paradigm for conducting neural recording experiments.\nIf successful this work will lay the foundation for future study of the neural circuits underlying\ncomplex collective behaviors in a large-brained highly social animal model." - ], - "award_amount": [ - "320892" - ], - "description": [ - "Towards High-Resolution Neuro-Behavioral Quantification of Sheep in the Field to Study Complex Social Behaviors" - ], - "external_url": [ - "https://reporter.nih.gov/project-details/5R34DA059514-02" - ], - "fiscal_year": [ - "2025" - ], - "grant_number": [ - "R34DA059514" - ], - "keywords": [ - "Collective behavior", - "Head-mounted sensors", - "Herd navigation", - "Sheep" - ], - "mechanism": [ - "R34" - ], "name": [ - "R34DA059514" - ], - "nih_link": [ - "https://reporter.nih.gov/project-details/5R34DA059514-02" - ], - "onboarding_status": [ - "not_started" - ], - "reporter_project_num": [ - "5R34DA059514-02" - ], - "studies_human": [ - "false" - ], - "studies_species_name": [ - "Ovis aries" - ], - "title": [ - "Towards High-Resolution Neuro-Behavioral Quantification of Sheep in the Field to Study Complex Social Behaviors" + "Varun Thvar" ] }, - "out": [ - { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/ec95cd91-709c-41ac-8bfb-bfdf3e2ea89c" - } - ], + "out": [], "in": [ { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/c33f2bff-071b-4550-9ea5-d3fd11e0ed0c" + "predicate": "members", + "source": "https://brain-bbqs.org/id/7924e7d9-5b53-4525-95ef-3f5a6b9112a5" } ], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/b02aaf9f-0a7e-4759-b1ba-cb100a2d4eed", - "class": "Project", - "label": "R34DA059716 · Interpersonal behavioral synchrony in virtual and in-person dyadic conversation", + "id": "https://brain-bbqs.org/id/e3335c53-2c38-444e-aff5-43a4268c97bf", + "class": "Investigator", + "label": "Vijay Balasubramanian", "facts": { - "abstract": [ - "PROJECT SUMMARY/ABSTRACT\nHuman dyadic social communication entails a rich repertoire of expression, including not only face expression\n(and gaze), but also acoustics (prosody and pauses) turn-taking, gestures and language. Communication has\nevolved in humans within a social context, beginning with the parent-infant dyad, with mirroring of facial\nexpressions and sounds. Its natural ecology is face-to-face dyadic interactions, both in-person and increasingly\nvia remote platforms for teleconferencing and telehealth. Social communication is a “complex orchestration” in\nreal time: its signals are multiple and temporally offset. It is a continuous exchange that is highly coordinated\nbetween speakers, with norms for turn-taking and alignment of face expression, gesture, semantic content and\nspeech rates. As yet, a critical gap exists in that we lack the tools to quantify and analyze temporal patterns of\nmultimodal communication behavior between two individuals in face-to-face communication, in an ecologically\nvalid setting, that have the same rigor and reproducibility as do hyperscanning approaches to record brain activity\nduring dyadic conversation. This tool must be developed to realize the true potential of second-person\nneuroscience. This planning proposal for tool development entails several key activities, beginning with the\nconvening of a diverse multidisciplinary team of experts from various fields, including ethics/regulatory,\nanthropology, cognitive neuroscience, computer science, engineering, physics, mathematics, psychiatry and\nneurology. This team will discuss ethics, diversity, paradigm development, and computational frameworks, and\nproviding iterative feedback and convening also with advocacy groups. Also, we will build two testing rooms for\nmultimodal recording of dyadic communication, to demonstrate feasibility of acquiring and synching high\ntemporal resolution data. Pilot EEG hyperscanning will be done concurrently in a subcohort. Further, given\nincreased use of teleconferencing, dyadic communication data will be collected via remote platform and\ncompared with in-person data, to determine how information may be degraded by differences in resolution and\nstreaming delays. We will also develop computational frameworks for analyses of multimodal data." - ], - "award_amount": [ - "342678" - ], - "description": [ - "Interpersonal behavioral synchrony in virtual and in-person dyadic conversation" + "consortium_role": [ + "Principal Investigator (PI)" ], "external_url": [ - "https://reporter.nih.gov/project-details/5R34DA059716-02" - ], - "fiscal_year": [ - "2025" - ], - "grant_number": [ - "R34DA059716" - ], - "keywords": [ - "Dyadic conversation", - "EEG", - "Hyperscanning", - "Multimodal synchronization", - "Turn-taking" - ], - "mechanism": [ - "R34" + "https://reporter.nih.gov/search/results?pi_id=10062621" ], "name": [ - "R34DA059716" - ], - "nih_link": [ - "https://reporter.nih.gov/project-details/5R34DA059716-02" - ], - "onboarding_status": [ - "not_started" - ], - "reporter_project_num": [ - "5R34DA059716-02" - ], - "studies_human": [ - "true" - ], - "studies_species_name": [ - "Humans" - ], - "title": [ - "Interpersonal behavioral synchrony in virtual and in-person dyadic conversation" + "Vijay Balasubramanian" ] }, - "out": [ - { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40" - } - ], + "out": [], "in": [ { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/3027bce5-12b7-4205-9873-9cc8efbed2c0" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/43ee45a2-22ea-4e73-9885-1efe24dc4caf" + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/2de0b139-4980-4479-9362-e6d68c33d1c8" }, { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/70324d1e-344b-402d-bac2-afd900606e16" + "predicate": "members", + "source": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad" } ], "dangling": [], - "degree": 4, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e", - "class": "Project", - "label": "R34DA059718 · Harnessing biological rhythms for a resilient social motif generator", + "id": "https://brain-bbqs.org/id/def6d629-21cc-431c-8cab-0327f97ee138", + "class": "Investigator", + "label": "Vincent Gracco", "facts": { - "abstract": [ - "Summary\nHow does the brain enable social interactions? The study of social behavior in non-human animals has long\nrelied on coarse behavioral metrics like time spent interacting with another animal or simply the numbers of\ninteractions. Although this approach has informed major insights into neural circuits which have a role in\nsociability, we still do not know how these circuits orchestrate patterns of social behaviors, especially under\ndifferent social contexts where interactions have nuanced differences. Our long-term goal is to identify the\nneural mechanisms supporting social behavior in affiliative vs. antagonistic social contexts. To close the\nknowledge gap towards this goal, in this R34 we will build artificial intelligence (AI) tools that are capable of\nintegrating multivariate sources of behavior data to quantify spatiotemporal signatures or “motifs” of diverse\nrepertoires of social behaviors. Behavioral motifs have the potential to be captured by means of examining\nconcurrent autonomic rhythms, especially breathing and heart rate. Indeed, we have long known that changes\nin the frequency of these rhythms coincide with specific affective and behavioral contexts. However,\nspatiotemporal signatures of social behaviors have not been captured in prior studies which have considered\neither breathing or heart rate in isolation. Nor have prior studies unleashed the potential to identify novel social\nbehavioral motifs by using these autonomic rhythms in combination with video measures. The research\nobjective of this Brain Initiative proposal is to develop semi-supervised artificial intelligence methods that result\nin a hierarchical multi-timescale model of social behavioral motifs directly from video, breathing, heart rate, and\nmovement data via a head-mounted accelerometer. To accomplish this, we will use partial labels of mouse\nsocial behaviors, as well as physiologic measurements, in order to elucidate the full range of social behavior\nmotifs across affiliative vs. antagonistic contexts. In Aim 1, we will define low-dimensional social behavioral\nstates while incorporating autonomic rhythms, while in Aim 2, we will elucidate a multi-timescale hierarchical\nrepresentation of social behavior in affiliative vs. agonistic social contexts. For both aims, we will integrate\ncomputer vision techniques with high-dimensional video and physiological data from mice while varying their\nisolation levels and who they are interacting with. The end-product will be a validated toolkit enabling the\nsensitive and robust identification of behavioral motifs. The easy-to-use toolkit which we call the Social Motif\ngenerator (So-Mo) will enable future studies to probe neural circuits during complex mouse behaviors at\nunprecedented resolution." - ], - "award_amount": [ - "337875" + "consortium_role": [ + "Co-Investigator" ], - "description": [ - "Harnessing biological rhythms for a resilient social motif generator" + "name": [ + "Vincent Gracco" + ] + }, + "out": [], + "in": [ + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" + } + ], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/9095f7a2-0d1a-4ac7-9cdd-12f28dbe42ea", + "class": "Investigator", + "label": "Vivek Prakash", + "facts": { + "consortium_role": [ + "Co-Investigator" ], - "external_url": [ - "https://reporter.nih.gov/project-details/5R34DA059718-02" + "name": [ + "Vivek Prakash" ], - "fiscal_year": [ - "2025" - ], - "grant_number": [ - "R34DA059718" - ], - "keywords": [ - "Autonomic", - "Behavioral segmentation", - "Biological rhythms", - "Social motifs" - ], - "mechanism": [ - "R34" + "orcid": [ + "https://orcid.org/0000-0003-4569-6462" + ] + }, + "out": [ + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" + } + ], + "in": [], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/8694fef3-33b8-491f-a806-7d0c8b5a60bf", + "class": "Investigator", + "label": "Wan Chen Lin", + "facts": { + "consortium_role": [ + "Postdoc/Grad Student" ], "name": [ - "R34DA059718" - ], - "nih_link": [ - "https://reporter.nih.gov/project-details/5R34DA059718-02" - ], - "onboarding_status": [ - "not_started" - ], - "reporter_project_num": [ - "5R34DA059718-02" - ], - "studies_human": [ - "false" - ], - "studies_species_name": [ - "Mouse" - ], - "title": [ - "Harnessing biological rhythms for a resilient social motif generator" + "Wan Chen Lin" ] }, "out": [ { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/03a34599-787d-42ac-83a3-e002bd419d37" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/6a564dd1-f227-40f8-be3c-06bbd09c430c" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/7d69f10e-ffa5-4d44-b92b-ffb24e71b969" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/9552ba2e-28e2-4237-b865-ec747251a036" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/d164ed89-3894-4cbc-a952-84e7161554d7" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" }, { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/f97c2277-9e93-4712-ac91-7f5e04482ba8" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" }, { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/9f227f88-53ba-4c7c-91e7-334641e4b759" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], + "in": [], + "dangling": [], + "degree": 3, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/1cfe15ec-b6a7-4534-b69d-79bb63b341b6", + "class": "Investigator", + "label": "Weikang Shi", + "facts": { + "consortium_role": [ + "Postdoc/Grad Student" + ], + "name": [ + "Weikang Shi" + ] + }, + "out": [], "in": [ { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/2248b93b-ea65-48b3-a940-f45b80c06346" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/692b00f5-b8e0-4344-8bd0-75def6c4b99e" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/3300103b-a7d5-4bdd-8f50-24fb3e24767a" + "predicate": "members", + "source": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941" } ], "dangling": [], - "degree": 10, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/2db5ee93-296a-446a-a3e6-59fd3d28c4a6", - "class": "Project", - "label": "R34DA059723 · Multimodal behavioral analysis of oromanual food-handling in freely moving animals", + "id": "https://brain-bbqs.org/id/2fb1cdc9-28b2-4709-adf4-c914a44e042d", + "class": "Investigator", + "label": "William Nacci", "facts": { - "abstract": [ - "PROJECT SUMMARY\nOromanual food-handling – in which the hands and forelimbs work in a coordinated manner with the mouth and\njaw to manipulate and consume a food item – is a fundamental behavior common to many rodent species as\nwell as primates. Despite its ethological significance, oromanual food-handling has received remarkably little\nexperimental attention, reflecting the technical challenges of recording at sufficient spatiotemporal resolution a\nbehavior involving small, fast, and often visually occluded movements. We recently initiated efforts to overcome\nthese challenges, developing paradigms for analyzing food-handling in mice using high-speed close-up video\nmethods coupled with AI-based kinematic tracking. Here we propose to build on these advances through a set\nof planning activities leading to a powerful new approach for in-depth investigation of this behavior. The overall\nobjective is to develop new experimental and analytical paradigms for recording food-handling behavior with\nhigh spatiotemporal resolution in freely moving animals, with a focus on understanding how elemental sub-\nmovements are assembled into distinct goal-directed actions coordinated across multiple body parts. The\ntechnical approach includes design of a videographic recording arena incorporating a robotic camera positioning\nsystem. Electromyography from jaw-controller and forelimb muscles in freely moving mice will enable\ncharacterization of the elements of dexterous coordination involved in manipulating the food with both hands and\njaw. Intranasal detection of breathing will enable characterization of sniff-related movements during food-\nhandling, posited to represent an additional aspect of the behavior engaging the olfactory and respiratory\nsystems. Exploratory studies will extend the approach in comparative, ecological, and developmental directions.\nThe analytical approach will conceptualize the behavior in terms of the multiple components of the motor plant\nand behavioral modes and actions, including detailed ethogramming and incorporating machine learning-based\ntracking, modeling, and related computational methods. The anticipated results will constitute an innovative\nparadigm for quantitative analysis of food-handling, setting the stage for a future investigation of the neural\nmechanisms of this natural form of goal-directed dexterous behavior. Results from this research program\nfurthermore have high potential to identify common principles of natural, complex, motor behavior in mammals\nin general." - ], - "award_amount": [ - "360000" - ], - "description": [ - "Multimodal behavioral analysis of oromanual food-handling in freely moving animals" - ], - "external_url": [ - "https://reporter.nih.gov/project-details/5R34DA059723-02" - ], - "fiscal_year": [ - "2025" - ], - "grant_number": [ - "R34DA059723" - ], - "keywords": [ - "Food-handling", - "Foraging", - "Kinematics", - "Oromanual", - "Sensorimotor" - ], - "mechanism": [ - "R34" + "consortium_role": [ + "Postdoc/Grad Student" ], "name": [ - "R34DA059723" - ], - "nih_link": [ - "https://reporter.nih.gov/project-details/5R34DA059723-02" - ], - "onboarding_status": [ - "not_started" - ], - "reporter_project_num": [ - "5R34DA059723-02" - ], - "studies_human": [ - "false" - ], - "studies_species_name": [ - "Mus musculus" + "William Nacci" ], - "title": [ - "Multimodal behavioral analysis of oromanual food-handling in freely moving animals" + "orcid": [ + "https://orcid.org/0009-0000-9565-0783" ] }, "out": [ { - "predicate": "funded_datasets", - "target": "https://brain-bbqs.org/id/99f38f2a-e4e4-49f7-bd61-5d3ba17134cc" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/58b76015-dbdd-401e-92e7-4dc15e6183d9" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" }, { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/820bf47c-7868-47f1-a5a7-b4a900ee16de" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" }, { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/a346f802-eb1b-4438-a13c-9ee20e28db4c" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" }, { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/9f227f88-53ba-4c7c-91e7-334641e4b759" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [ { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/0b8db858-64e3-41bc-8ecc-948b44cdf963" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/c3e5b648-cf18-47f4-b514-fc38390d2431" + "predicate": "members", + "source": "https://brain-bbqs.org/id/6a224a59-b37c-40b2-a4ef-f43393d94357" } ], "dangling": [], - "degree": 7, + "degree": 5, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0", - "class": "Project", - "label": "R34DA061924 · Mapping dynamic transitions across neural, behavioral, and social scales in interacting animals", + "id": "https://brain-bbqs.org/id/0f65886e-44cb-4a8b-88a2-ecb214b0ea99", + "class": "Investigator", + "label": "Yangjia Li", "facts": { - "abstract": [ - "Project Summary BBQS R34 – Zhang & Frohlich\nMapping dynamic transitions across neural, behavioral, and social scales in interacting animals\nHuman and animal behavior is shaped by many processes across spatiotemporal scales – from the activities\nof neurons to the dynamics of social interaction. Mapping behavior and brain dynamics across scales is key to\na systemic understanding of cognition, neuropsychiatric disorders, and developing personalized interventions.\nIn social neuroscience, the mapping between social behavior and brain dynamics was primarily achieved by\nconstraining the behavior to a well-controlled, low-dimensional task space, where common linear statistical\nmethods suffice to discover cross-scale relations. However, the complex, dynamic, and interactive nature of\nreal-world social interaction is largely lost in such task-constrained settings. More recently, both human and\nanimal social neuroscience began to embrace a multi-brain interactive approach, where brain activities were\nsimultaneously recorded and found to be synchronized during live social interaction. Without task constraints,\nanimals can adopt and transition between a diverse range of behavioral patterns, which are signs of nonlinear,\nhigh-dimensional dynamical systems. There is a critical need for a computational-experimental framework to\ncharacterize the complex dynamics of naturalistic interaction and connect them across neural and behavior\nscales. The main objective of this project is to develop a computational-experimental framework to construct\nmultiscale models of naturalistic social interaction connecting the spiking dynamics of neurons, brain\noscillations, body movements, and macroscopic behavioral states. To achieve this objective, the project will\nutilize simultaneously recorded behavioral and electrophysiology data from ferrets during naturalistic\ninteraction. Ferrets are chosen as a model of dynamic social interaction for their high social skills and complex\nvisuomotor communication, which allows for fine-grained characterization of social dynamics based on\nexpressive body movements. At the neural level, ferrets’ frontoparietal networks exhibit similar oscillations to\nthose of humans that were found to synchronize during social interaction, paving the way to future comparative\nstudies. Animal data also provides the opportunity to include neuronal activity in the multiscale framework,\nwhich is not commonly accessible in humans. Computationally, the toolbox will build upon recent advances in\ntopological time series analysis to extract states and transitions from complex dynamics at different scales of\nmeasurements, combined with computer vision techniques for motion tracking, machine learning for cross-\nscale mapping of state transitions, and expert annotations. This project integrates diverse perspectives from\ncognitive social neuroscience to nonlinear dynamics, computational topology, and machine learning. The\nproject will significantly impact neuroscience by providing much-needed tools to examine multiscale relations in\nthe brain and behavior in real-world settings and the future design of state-dependent treatments for\nneuropsychiatric and behavioral disorders, combining pharmacological treatments, brain stimulations, and\npsychosocial interventions." - ], - "award_amount": [ - "336353" - ], - "description": [ - "Mapping dynamic transitions across neural, behavioral, and social scales in interacting animals" - ], - "external_url": [ - "https://reporter.nih.gov/project-details/5R34DA061924-02" - ], - "fiscal_year": [ - "2026" - ], - "grant_number": [ - "R34DA061924" - ], - "keywords": [ - "Complex systems", - "Dynamic transitions", - "Phase transitions", - "Social scales" - ], - "mechanism": [ - "R34" + "consortium_role": [ + "Research Staff (Scientist and others)" ], "name": [ - "R34DA061924" - ], - "nih_link": [ - "https://reporter.nih.gov/project-details/5R34DA061924-02" - ], - "onboarding_status": [ - "not_started" - ], - "reporter_project_num": [ - "5R34DA061924-02" - ], - "studies_human": [ - "false" - ], - "studies_species_name": [ - "Homo sapiens", - "Mustela putorius furo" - ], - "title": [ - "Mapping dynamic transitions across neural, behavioral, and social scales in interacting animals" + "Yangjia Li" ] }, - "out": [ + "out": [], + "in": [ { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/579fcaf5-df6d-42f9-a62d-59bd79fe3fae" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/8b505d92-14d0-43cd-9cb3-62ae42e26744" - }, - { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/311017ec-9209-4d63-95fb-1967bc8a81b7" - }, - { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40" - } - ], - "in": [ - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/c35db851-d42d-43ad-b30c-64fb5b933dcf" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/068fdb34-5151-4b7f-b854-c9e147bdfcd1" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/cc0de44a-82ef-4fcf-811e-9695a46b47df" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/cfcdf43e-bc65-4c3b-8046-9429be511ed1" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/dce97439-b94a-4549-af78-4839bc63d315" + "predicate": "members", + "source": "https://brain-bbqs.org/id/9f75488b-59d0-4d50-b7db-869f26066743" } ], "dangling": [], - "degree": 9, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/1573f2f2-dfe7-476f-ba44-55011c0f5d1b", - "class": "Project", - "label": "R34DA061925 · Building an “AI Forest” to identify the social and environmental factors underlying complex behavioral traits in wild primates.", + "id": "https://brain-bbqs.org/id/0a39ab50-9241-4b17-b6d4-77d5ac81e519", + "class": "Investigator", + "label": "Yankun Xu", "facts": { - "abstract": [ - "PROJECT SUMMARY/ABSTRACT\nWith the advent of new technologies to probe brain-behavior relationships deeper than ever before, the field of\nbehavioral neuroscience finds itself at a crossroads for translation. The rich theoretical foundations upon which\nmany behavioral assays are based have largely been lost; and factors known to impact motivated behavior,\nsuch as social and environmental challenges, tend to be ignored. Here, the rich neurobiological understanding\nthat has been obtained from captive animals will be leveraged to assess individual differences in motivated\nbehavior that derive from social and/or environmental adversity (or advantage) in a natural environment.\nLaboratory-based paradigms will be brought to a wild population of ~350 white-faced capuchin monkeys\n(Cebus imitator) living in a small, tractable forest in Costa Rica (Taboga Forest Reserve). Approximately 70 of\nthese capuchins have been tracked and studied near-daily for the past 7 years, generating a rich life-history\ndatabase for these individuals. These capuchins are habituated to humans and readily interact with stimuli on\nexperimental platforms. But importantly, they are also exposed to the natural elements – predators, droughts,\ndisease, and social adversaries – without human intervention. This project will lay the groundwork for an\nArtificial Intelligence (AI) Forest that will transform our ability to study these animals as they develop, live, and\ndie in their natural environment. The AI Forest will be the first of its kind; an experimental forest allowing us to\nprobe laboratory-based behaviors in a wild primate population. Smart testing stations will be placed throughout\nthe forest to assess reward valuation, inhibitory control, and behavioral flexibility. A visual deep-learning\nalgorithm will be harnessed to recognize individuals as they voluntarily approach and perform at testing\nstations. The AI system will automatically guide capuchins through experiments, allowing them to “self-pace”\nas they complete each assessment. Data collection at the smart testing stations will be automated, potentially\nyielding the largest dataset of its kind from a wild primate population. In addition, a vocal deep-learning\nalgorithm will be used to track movements of individuals and groups and to detect their social and\nenvironmental challenges (intergroup and predator encounters). The multidimensional behavioral and\nenvironmental data will be integrated to examine the impact of environmental adversity (or advantage) on\nbehavioral traits across the lifespan. This AI Forest represents an exciting possibility of what the future of\nbehavioral neuroscience could be – bridging studies of complex behaviors with function (adaptive evolution) –\nto inform translational science and ultimately enhance our understanding of human health and disease." - ], - "award_amount": [ - "279522" - ], - "description": [ - "Building an “AI Forest” to identify the social and environmental factors underlying complex behavioral traits in wild primates." - ], - "external_url": [ - "https://reporter.nih.gov/project-details/1R34DA061925-01" - ], - "fiscal_year": [ - "2026" - ], - "grant_number": [ - "R34DA061925" - ], - "keywords": [ - "AI Forest", - "Computer vision", - "Ecological factors", - "Edge computing", - "Wild primates" - ], - "mechanism": [ - "R34" - ], "name": [ - "R34DA061925" - ], - "nih_link": [ - "https://reporter.nih.gov/project-details/5R34DA061925-02" - ], - "onboarding_status": [ - "not_started" - ], - "reporter_project_num": [ - "5R34DA061925-02" - ], - "studies_human": [ - "false" - ], - "studies_species_name": [ - "Cebus imitator" + "Yankun Xu" ], - "title": [ - "Building an “AI Forest” to identify the social and environmental factors underlying complex behavioral traits in wild primates." + "orcid": [ + "https://orcid.org/0000-0002-4410-4106" ] }, "out": [ { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/933edfb2-8cdf-4a82-a113-102e200d5619" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/eef56f64-7e55-48ea-891a-b5c9b4c85b7c" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" }, { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/491ac537-b3f6-45b9-93f3-1249fd809ebc" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], "in": [ { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/9478d651-eb81-4c6f-8b55-4cabb137e46d" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/d7f6d7e4-401f-43ea-a3e2-ac34d7e73f1f" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/86821e6a-b746-49fd-b4b6-5ea4dd02e5d7" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/73cef7ce-8dbb-48ba-8ee3-bcc0cca5fce8" + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/c65b0c08-04d4-42fb-9ca4-dcc64f2f78f8" } ], "dangling": [], - "degree": 7, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/ca25b66c-c03f-4d7e-90e8-93bc12fafeb1", - "class": "Project", - "label": "R34DA061984 · Quantifying organism-environment interactions in a new model system for neuroscience", + "id": "https://brain-bbqs.org/id/c9fb9f5b-29a9-4138-9434-894ab7b7a909", + "class": "Investigator", + "label": "Yaroslav Halchenko", "facts": { - "abstract": [ - "PROJECT SUMMARY\nStudies of model organisms have revealed many insights into how animals sense their environment and how\nthis input is processed by their brains to produce behavioral output. However, our current understanding of\nhow the brain controls behavior is derived from a handful of species that share certain features, e.g., their\nbrains are highly regionalized and stereotyped. Yet, not all animal brains are structured in this manner, and to\nidentify general principles for the control of animal behavior, a broader diversity of brains needs to be\ninvestigated. We will study the acoel worm, Hofstenia miamia, which is a new research organism with key\nfeatures that position it to address major questions in behavioral neuroscience. First, Hofstenia, a voracious\nmangrove predator, is a marine invertebrate that performs complex behaviors in the lab, and our recent work\nhas shown that it is amenable to rigorous, quantitative studies of its behaviors and of behavior-induced\nphysical changes in its aquatic environment. Second, as an acoel, Hofstenia diverged from models such as\nflies and mice 550 million years ago and possesses a brain that does not show evidence of regionalization,\nproviding an opportunity to study distributed computation. Third, the Hofstenia brain can regenerate from any\nstarting condition, enabling the study of how robustness is encoded in the brain. Fourth, Hofstenia is highly\ntractable in the lab, offering many genomic resources and tools for functional genetics, which will make it\npossible to collect neural activity data. Given these features, the overall objective in this proposal is to leverage\nHofstenia to study its behavior and environment at the whole-organism level. Specifically, we aim to: 1)\nDevelop methods for rigorous measurement and quantification of worm behavior and its environment, using\npose estimation to infer worm action sequences, water flow measurement to quantify physical changes around\nworms, and tracking of prey to quantify the worm’s biological environment. 2) Perturb both organism and\nenvironment to uncover mechanisms of behavioral control. We will amputate animals to determine how\nregenerating brain features correlate with elements of behavior, and deliver artificial mechanical flow stimuli to\nunderstand how animals read their physical environment. 3) We will assemble a team of researchers with\nexpertise in behavioral neuroscience, pose estimation, connectomics, neural activity dynamics, fluid\nmechanics, computational modeling of behavior, and in the organism and its regenerative abilities to plan work\nthat will enable the integration of neural activity data with behavioral and environmental data to reveal how\ndistributed computations in the brain enable the animal to produce action sequences that successfully navigate\nthe environment and capture prey. This proposal is innovative in its use of a new research organism, in its\npursuit of behavior-environment quantification in the whole-organism context, and in its potential to reveal\ngeneral principles of behavioral control, particularly via distributed computation." - ], - "award_amount": [ - "370423" - ], - "description": [ - "Quantifying organism-environment interactions in a new model system for neuroscience" - ], - "external_url": [ - "https://reporter.nih.gov/project-details/5R34DA061984-02" - ], - "fiscal_year": [ - "2026" - ], - "grant_number": [ - "R34DA061984" - ], - "keywords": [ - "New model system", - "Organism-environment", - "Sensory ecology" - ], - "mechanism": [ - "R34" + "consortium_role": [ + "Co-Investigator" ], "name": [ - "R34DA061984" - ], - "nih_link": [ - "https://reporter.nih.gov/project-details/5R34DA061984-02" - ], - "onboarding_status": [ - "not_started" - ], - "reporter_project_num": [ - "5R34DA061984-02" - ], - "studies_human": [ - "false" - ], - "studies_species_name": [ - "Hofstenia miamia" + "Yaroslav Halchenko" ], - "title": [ - "Quantifying organism-environment interactions in a new model system for neuroscience" + "orcid": [ + "https://orcid.org/0000-0003-3456-2493" ] }, "out": [ { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/12c95d56-76ab-4519-8bf9-e406bf79736d" - }, - { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/d6fbdcc7-30d7-48ba-9c46-b70e227c59cf" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" } ], "in": [ { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/f33023b3-374b-44c3-a158-5487f3bbfafc" + "predicate": "members", + "source": "https://brain-bbqs.org/id/d17a5c60-e529-48ed-b4af-11976e4eb3fb" } ], "dangling": [], - "degree": 3, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/f294b0d9-175a-47c7-854c-d4d750009812", - "class": "Project", - "label": "R34DA062119 · Adversity and Resilience Consortium (ARC): A collaboration for the standardized study of experience-dependent brain and behavioral development", + "id": "https://brain-bbqs.org/id/13ccc90e-b105-48b2-8590-4804cd2b5f54", + "class": "Investigator", + "label": "Yi Zuo", "facts": { - "abstract": [ - "It is increasingly clear that experience of adversity including poverty, trauma, and other stressors during childhood can enhance risk for mental and physical health problems later in life. These adverse experiences can be highly varied and include elements such as food insecurity, family and community violence, and multiple forms of neglect. To efficiently target interventions and to build resilience, it is imperative to understand which forms of adversity have which effects on behavior, and to determine what timing and combination of adversities puts an individual most at risk. We also need to recognize that these questions have a deep biological history. Experience in different domains likely acts on a developing organism’s developmental programming where it adjusts gene expression to adapt an individual’s phenotype in response to the environment. This adaptation may differ depending on the type of experience (for example, threat, deprivation or scarcity and other forms of uncertainty may drive different outcomes).\nTo study these important epidemiological and biological questions in a controlled fashion we can turn to the study of the effects of developmental experience on mice whose genetics, rearing and testing conditions can be carefully controlled. However, to get a big picture view of how different forms of experience compare to one another in the field of neuroscience and behavior, we need to adopt better scientific methods that use richer, more ethologically informed behavioral tasks and rigorously standardize our protocols across sites, share data in readily comparable formats. Here we propose to initiate a team science effort, the Adversity and Resilience Consortium (ARC), to address these challenges. We will begin by comparing our existing data sets from control mice and mice that experienced adversity in development to assess how they might be combined across sites. Based on the interests of our initial team these data will focus on adolescent experience and adult learning and decision making, but can later be expanded. Next, we will develop 1) a standardized set of methods and protocols to assess behavior and 2) a public forum for sharing protocols, resources, and data that also facilitates exploration and analysis based on Open Source Brain as a model. In future work supported by larger grant mechanisms, we will work as a team using our newly standardized methods to vary exposure to deprivation, threat, and unpredictability and study behavior and brain development along with neural recordings. We predict that dimensionality reduction methods and computational models of latent processes will reveal distinct effects of different forms of adversity on mouse behavior that can be mapped back to distinct contrasts in cellular and circuit function." - ], - "award_amount": [ - "707108" - ], - "description": [ - "Adversity and Resilience Consortium (PI: Linda Wilbrecht)" - ], - "external_url": [ - "https://reporter.nih.gov/project-details/1R34DA062119-01" - ], - "fiscal_year": [ - "2025" - ], - "grant_number": [ - "R34DA062119" - ], - "keywords": [ - "Harmonization", - "International Development Project", - "Longitudinal", - "Ontogeny" - ], - "mechanism": [ - "R34" + "consortium_role": [ + "Co-Investigator" ], "name": [ - "R34DA062119" - ], - "nih_link": [ - "https://reporter.nih.gov/project-details/1R34DA062119-01" - ], - "onboarding_status": [ - "not_started" - ], - "reporter_project_num": [ - "1R34DA062119-01" - ], - "studies_human": [ - "false" - ], - "studies_species_name": [ - "Mus musculus" - ], - "title": [ - "Adversity and Resilience Consortium (ARC): A collaboration for the standardized study of experience-dependent brain and behavioral development" + "Yi Zuo" ] }, "out": [ { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/9f227f88-53ba-4c7c-91e7-334641e4b759" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" + }, + { + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" } ], "in": [ { - "predicate": "on_project", + "predicate": "held_by", "source": "https://brain-bbqs.org/id/role/535c5cae-fbd2-4199-a1c2-02af47928538" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/02220da7-1bf8-49e9-8ff0-ed008ea8d03e" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/d2505ade-278d-4203-8ebf-bbc8ebfc48c9" } ], "dangling": [], - "degree": 4, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/80db3a04-a9ad-486d-abf1-4b20f8370ff9", - "class": "Project", - "label": "R61MH135106 · Synchronized neuronal and peripheral biomarker recordings in freely moving humans", + "id": "https://brain-bbqs.org/id/3576ac45-d083-4c4c-84c0-04a44227dc2b", + "class": "Investigator", + "label": "Yibei Chen", "facts": { - "abstract": [ - "Project Summary/Abstract\nRecent technological advancements have allowed for single-neuron and intracranial electroencephalographic\n(iEEG) recordings in freely moving humans. However, these implanted neural recording devices have not been\nintegrated with non-invasive peripheral biochemical recordings. The emergence of an experimental platform\ncombining mobile deep brain recordings with wearable biochemical and biophysical sensors for use in real-world\nsettings is unprecedented. The proposed project will develop a novel platform that enables simultaneous single-\nneuron or iEEG, biochemical (cortisol, epinephrine), and biophysical (heart rate, skin conductance, and body\nand eye movements) activity to be recorded in freely moving human participants. As proof-of-concept, we will\nuse this platform to investigate the neural and peripheral biomarker mechanisms underlying approach-avoidance\nbehaviors during spatial navigation. Through an interdisciplinary collaboration between UCLA, Stanford\nUniversity, and the Veteran’s Administration Greater Los Angeles Healthcare System (VAGLAHS), the program\nwill have access to human participants whom will have implanted electrodes within prefrontal cortex, amygdala,\nhippocampus, or nucleus accumbens regions. The proposed project outcomes will empower future studies and\nother researchers to investigate, for the first-time, deep brain and peripheral biomarker mechanisms underlying\nfreely moving human behavior in naturalistic and ecologically valid environments." - ], - "award_amount": [ - "1015188" - ], - "description": [ - "Synchronized neuronal and peripheral biomarker recordings in freely moving humans" - ], - "external_url": [ - "https://reporter.nih.gov/project-details/5R61MH135106-02" - ], - "fiscal_year": [ - "2026" - ], - "grant_number": [ - "R61MH135106" - ], - "keywords": [ - "Approach-avoidance", - "Biomarkers", - "Freely moving", - "Spatial navigation", - "iEEG" - ], - "mechanism": [ - "R61" + "consortium_role": [ + "Postdoc/Grad Student" ], "name": [ - "R61MH135106" - ], - "nih_link": [ - "https://reporter.nih.gov/project-details/7R61MH135106-03" - ], - "onboarding_status": [ - "not_started" - ], - "reporter_project_num": [ - "7R61MH135106-03" - ], - "studies_human": [ - "true" - ], - "studies_species_name": [ - "Humans" + "Yibei Chen" ], - "title": [ - "Synchronized neuronal and peripheral biomarker recordings in freely moving humans" + "orcid": [ + "https://orcid.org/0000-0003-2882-0900" ] }, "out": [ { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" }, { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/51afd359-3797-4082-8f34-f356eaa33848" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" }, { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/c8a72b45-43f3-42d0-8cd6-aedc7f1242c0" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" }, { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40" - } - ], - "in": [ - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/3dba6e02-b3c4-4cc8-89d8-bd8ef07d5341" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], + "in": [], "dangling": [], - "degree": 5, + "degree": 4, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/3352859e-5677-46dd-89d6-17c898b6f097", - "class": "Project", - "label": "R61MH135109 · Capturing Autobiographical memory formation in People moving Through real-world spaces Using synchronized wearables and intracranial Recordings of EEG", + "id": "https://brain-bbqs.org/id/156fb20f-5e40-4804-992d-dc353b5e99e4", + "class": "Investigator", + "label": "Yisong Yue", "facts": { - "abstract": [ - "Project Summary\nThis project aims to unlock the potential of combining wearable mobile recording devices, such as\nsmartphones with continuous audio-visual, accelerometry, GPS, subjective report, autonomic physiology, and\nwearable eye tracking recordings, with precisely synchronized intracranial neural recordings during real-world\nbehaviors. Autobiographical memory (AM) formation is a critical human behavior that has been difficult to study\nwith traditional neuroimaging methods. It involves a range of real-world cognitive processes, including\nattention, decision making, emotion, episodic memory, social interactions, and navigation. AM refers to\nmemory for one’s own life experiences. AMs are typically more detailed and personal than general episodic\nmemories and due to this feature have thus been difficult to capture as they are being formed, particularly the\nneural correlates of AM encoding. By studying how the brain processes, encodes, and retrieves verifiable,\nreal-world autobiographical experiences, we hope to gain new insights into cognitive and neural processes that\ncan fail in neurological disorders like Alzheimer’s disease. There is a critical need to develop technical,\nmethodological, and computational approaches to understanding the cognitive and neural mechanisms\nunderlying memory-related behaviors in continuous, complex real-world settings, to then translate this\nunderstanding into reliable treatments for enhancing memory or cognition in daily life. The proposed project will\ntake important first steps towards addressing these dire needs with a novel and unique approach to recording\ndirectly from the human brain as people navigate and create AMs in the temporal contexts and at the spatial\nscales of daily life. By capturing electrophysiological recordings synchronized with a novel experiential\nrecording device, our project will take the key translational step needed to push our neuroscientific insights of\nautobiographical memory from the laboratory to one day restoring real-world memory for those suffering from\ndevastating memory disorders. As neural stimulation tools and techniques for memory enhancement develop,\ninsights from the proposed study will establish the foundation on which to build neuromodulation approaches\nthat can rescue memory during real-world experiences. Thus the proposed research project aims to develop a\nsmartphone-based recording application (CAPTURE app; R61 phase) synchronized with wearables and\ninvasive neural recordings during real-world behaviors like autobiographical memory encoding (R33 phase).\nWe will develop novel recording and analytic methods for integrating multimodal data streams with invasive\nneural recordings in humans during real-world experiences. Over 2,000 potential research participants have\nsensing and stimulation devices (i.e., NeuroPace Responsive Neurostimulation System; RNS) chronically\nimplanted in their brains for the treatment of epilepsy in the U.S. Our next-generation tool and approach will\nallow us to precisely capture real-world behaviors that encompass a variety of cognitive processes like\nautobiographical memory formation, and synchronize this data with direct neural recordings in humans." - ], - "award_amount": [ - "890660" - ], - "description": [ - "Capturing Autobiographical memory formation in People moving Through real-world spaces Using synchronized wearables and intracranial Recordings of EEG" - ], - "external_url": [ - "https://reporter.nih.gov/project-details/5R61MH135109-02" - ], - "fiscal_year": [ - "2026" - ], - "grant_number": [ - "R61MH135109" - ], - "keywords": [ - "Autobiographical memory", - "CAPTURE app", - "Real-world spaces", - "Wearables", - "iEEG" - ], - "mechanism": [ - "R61" + "consortium_role": [ + "Principal Investigator (PI)" ], "name": [ - "R61MH135109" - ], - "nih_link": [ - "https://reporter.nih.gov/project-details/5R61MH135109-03" - ], - "onboarding_status": [ - "not_started" - ], - "reporter_project_num": [ - "5R61MH135109-03" - ], - "studies_human": [ - "true" - ], - "studies_species_name": [ - "Humans (Epilepsy Patients)" - ], - "title": [ - "Capturing Autobiographical memory formation in People moving Through real-world spaces Using synchronized wearables and intracranial Recordings of EEG" + "Yisong Yue" ] }, - "out": [ - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/987e3cf1-5d05-4e16-8849-4b5899ac84dc" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/d3fb7a56-6a64-43c8-9fd6-7087d906d413" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/d951e426-557c-44e1-a830-212bbdd1514c" - }, - { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40" - } - ], + "out": [], "in": [ { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/c7360c73-0ef1-4e34-88ac-585b15257b2d" + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/a2f1ea9f-aab3-4407-b7d3-4570537c2678" }, { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/d64865d3-893f-4968-bcba-e3b33a6a4f1b" + "predicate": "members", + "source": "https://brain-bbqs.org/id/1424d10f-795c-47e5-a6d7-d6705fad611a" } ], "dangling": [], - "degree": 6, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/4614269a-0d7f-4390-b4cc-568a09fa6a45", - "class": "Project", - "label": "R61MH135114 · Integrated movement tracking for pediatric OPM-MEG studies of intellectual disability", + "id": "https://brain-bbqs.org/id/83a4df24-ed1c-462a-bf74-36c68150c42c", + "class": "Investigator", + "label": "Yuan Luo", "facts": { - "abstract": [ - "Abstract\nThis R61/R33 project will develop an advanced technology for non-invasive recording of whole-brain physiology\nwith synchronized video-tracking of movement for use in children with intellectual disability and will use it to\nelucidate the brain-circuit electrophysiology of intellectual development. The technological advances will have\nimmediate benefits for pediatric neurology and will be widely applicable to many neurological disorders in which\nsafe and convenient, non-invasive recordings of brain physiology are desired to inform diagnosis, prognosis, and\ntreatment. The R61 phase will be performed by FieldLine Medical (Boulder, CO) which will contribute their recent\nadvances in optically-pumped magnetometer magnetoencephalography (OPM-MEG), a transformative\ntechnology for safe, physiological brain imaging that greatly increases sensitivity to brain electrical signals as\ncompared to SQUID-MEG and EEG and provides greater coverage than invasive electrophysiology. FieldLine\nwill: 1) expand the capabilities of their HEDscan OPM-MEG system, as a “wearable” brainwave scanning\ntechnology, for high-fidelity MEG recordings in freely moving children; and 2) integrate synchronized video-\ntracking of voluntary movements for kinematic analysis to create a technology named HEDscanV. The R33\nphase will deploy HEDscanV in two pediatric neuroscience laboratories at the Children's Hospital of Philadelphia\nand Seattle Children's Research Institute. After validating HEDscanV in children against SQUID-MEG, the R33\nphase will leverage advances in autism research enabled by sensory, motor, and associative learning paradigms\nthat were developed by the MPIs to identify intellectual disability with high accuracy. By disseminating HEDscanV\nand sensory-motor paradigms across clinical sites in Philadelphia and Seattle, we will work together to identify\nthe bandwidths of electrical activity coherence in brain circuits at the interface of movement and cognition that\npromote intellectual development. Our success will be ensured by the support of two nationally-recognized\nautism centers at the University of Washington and Children's Hospital of Philadelphia, where high-fidelity clinical\nassessments and diagnostic testing will be conducted. By establishing the locations and bandwidths of activity\ncoherence in the brains of children that promote intellectual development, the project will begin to lay the\nessential groundwork needed to establish therapies intending to normalize brain pathophysiology and facilitate\nintellectual development in children with neurodevelopmental disorders." - ], - "award_amount": [ - "2248476" - ], - "description": [ - "Integrated movement tracking for pediatric OPM-MEG studies of intellectual disability" - ], - "external_url": [ - "https://reporter.nih.gov/project-details/5R61MH135114-02" - ], - "fiscal_year": [ - "2025" - ], - "grant_number": [ - "R61MH135114" - ], - "keywords": [ - "Artifact removal", - "Intellectual disability", - "Motion tracking", - "OPM-MEG", - "Pediatric" - ], - "mechanism": [ - "R61" - ], "name": [ - "R61MH135114" - ], - "nih_link": [ - "https://reporter.nih.gov/project-details/5R61MH135114-02" - ], - "onboarding_status": [ - "not_started" - ], - "reporter_project_num": [ - "5R61MH135114-02" - ], - "studies_human": [ - "true" - ], - "studies_species_name": [ - "Humans (Pediatric)" - ], - "title": [ - "Integrated movement tracking for pediatric OPM-MEG studies of intellectual disability" + "Yuan Luo" ] }, - "out": [ - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/419155ad-faba-4e10-8029-5339960877a1" - }, - { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40" - } - ], + "out": [], "in": [ { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/b5ea3f60-fb2d-4b61-b6ca-04c67600b8b0" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/295a454b-56ba-4d13-b630-75e3a333f965" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/60988e88-27ec-4264-9203-98d80d2f3489" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/d940349f-ae79-43ae-8931-2c4b17d14f44" + "predicate": "members", + "source": "https://brain-bbqs.org/id/208980e9-92b9-447e-a2ca-e83bf61db159" } ], "dangling": [], - "degree": 6, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/22e61529-38ba-465f-b38b-274e24160fb6", - "class": "Project", - "label": "R61MH135405 · Developing the Context-Aware Multimodal Ecological Research and Assessment (CAMERA) Platform for Continuous Measurement and Prediction of Anxiety and Memory State", + "id": "https://brain-bbqs.org/id/87b79b22-888b-40ac-bee6-32a62f07645f", + "class": "Investigator", + "label": "Yunsoo Kim", "facts": { - "abstract": [ - "Summary/Abstract (30 line max):\nThis project seeks to develop the CAMERA (Context-Aware Multimodal Ecological Research\nand Assessment) platform, a state-of-the-art open multimodal hardware/software system for\nmeasuring human brain–behavior relationships. CAMERA will record neural, physiological,\nbehavioral, and environmental signals, as well as measurements from ecological momentary\nassessments (EMAs), to develop a continuous high-resolution prediction of a person’s level of\nanxiety and cognitive performance. CAMERA will provide a significant advance over current\nmethods for human behavioral measurement because it leverages the complementary features\nof multimodal data sources and combines them with interpretable machine learning to predict\nhuman behavior. A further distinctive aspect of CAMERA is that it incorporates context-aware,\nadaptive EMA, where the timing of assessments depend on the subject’s physiology and\nbehavior to improve response rates and model learning. Our initial work on CAMERA focuses\non predicting anxiety state and concurrent memory performance, but the platform is flexible for\nuse in various domains.\nOur work on CAMERA consists of two phases. First, in the R61 phase, we will develop the\nCAMERA hardware/software framework, which includes methods for recording continuous\nneural, physiologic, audiovisual, and smartphone-usage data (Aim 1) and synchronizing these\nsignals with intermittent EMAs (Aim 2). After demonstrating that CAMERA can successfully\ncombine multimodal features to predict a subject’s anxiety state and memory efficiency (Aim 3),\nwe will proceed to the R33 phase of the project. In the R33, we will use CAMERA in conjunction\nwith closed-loop neurostimulation to modulate the subject’s anxiety state and associated\nmemory performance (Aim 1), and to characterize the causal effect of modulation on neural,\nphysiologic, and behavioral biomarkers (Aim 2). Beyond our initial work in the domain of anxiety\nand memory, we anticipate that CAMERA will have widespread impact by providing a general\nplatform for exploratory and hypothesis-driven research on various aspects of complex human\ninternal states, behavior, and cognition in real-world environments while minimizing burden on\nsubjects." - ], - "award_amount": [ - "988446" - ], - "description": [ - "Developing the Context-Aware Multimodal Ecological Research and Assessment (CAMERA) Platform for Continuous Measurement and Prediction of Anxiety and Memory State" - ], - "external_url": [ - "https://reporter.nih.gov/project-details/5R61MH135405-02" - ], - "fiscal_year": [ - "2026" - ], - "grant_number": [ - "R61MH135405" - ], - "keywords": [ - "Anxiety", - "CAMERA Platform", - "Continuous Measurement", - "Ecological Assessment", - "Memory State" - ], - "mechanism": [ - "R61" - ], "name": [ - "R61MH135405" - ], - "nih_link": [ - "https://reporter.nih.gov/project-details/5R61MH135405-03" - ], - "onboarding_status": [ - "not_started" - ], - "reporter_project_num": [ - "5R61MH135405-03" - ], - "studies_human": [ - "true" - ], - "studies_species_name": [ - "Humans" + "Yunsoo Kim" + ] + }, + "out": [], + "in": [ + { + "predicate": "members", + "source": "https://brain-bbqs.org/id/c04b3bcd-d1db-4b3c-9dc6-a4c97039cad6" + } + ], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/9045540f-6ba2-4b95-bc69-98527f947a27", + "class": "Investigator", + "label": "Yuyi Chang", + "facts": { + "consortium_role": [ + "Postdoc/Grad Student" ], - "title": [ - "Developing the Context-Aware Multimodal Ecological Research and Assessment (CAMERA) Platform for Continuous Measurement and Prediction of Anxiety and Memory State" + "name": [ + "Yuyi Chang" ] }, "out": [ { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/0efd86da-44c1-4222-9b30-72000b833267" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" }, { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], - "in": [ - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/f25003fd-234f-453b-9bc8-238213a55269" - }, + "in": [], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/7ef0ea15-6f36-4bca-8eee-626e9bf76254", + "class": "Investigator", + "label": "Yvonne M Bennett", + "facts": { + "name": [ + "Yvonne M Bennett" + ] + }, + "out": [ { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/8c42852d-0c57-4a3e-b874-3ba8874287a7" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" }, { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/d1c407f2-001d-44da-ada2-0c59c6f8503a" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" }, { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/a617a421-6fe5-4f66-9c63-ce24bbea02eb" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" } ], + "in": [], "dangling": [], - "degree": 6, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b", - "class": "Project", - "label": "R61MH135407 · Novel multimodal neural, physiological, and behavioral sensing and machine learning for mental states", + "id": "https://brain-bbqs.org/id/ebbb8fee-72ed-4cb0-9d25-94e670379f08", + "class": "Investigator", + "label": "Zheng Kuang", "facts": { - "abstract": [ - "PROJECT SUMMARY\nStudying how human brain activity gives rise to mental states can reveal the neural mechanisms of emotional\nfunctioning and provide novel neural-physiological markers to enable personalized therapies for diverse mental\ndisorders. For brain monitoring alone, intracranial EEG (iEEG) can measure multi-region multiday brain activity\nwith high temporal resolution. However, the above goals hinge upon the ability for simultaneous brain-behavior\nmonitoring, which remains immensely difficult for mental states due to challenges on the physiology, behavior,\nmachine learning, and ethics fronts. First, physiological monitoring beyond a single modality – e.g., electrodermal\nvs. cortisol – is not possible with current wearables and the demonstrated wearables do not measure cortisol.\nSecond, behavioral monitoring during intracranial recordings is largely limited to self-reports, which are sparse.\nAlso, while social processes are a major trans-diagnostic domain of emotional functioning in NIMH’s RDoC\nframework and adversely affected in diverse mental disorders, they are largely absent in current brain-behavior\nmonitoring, which does not afford systematic scalable measurement of mental states during social interactions.\nThird, modeling of concurrent neural-physiological-behavioral data introduces a machine learning challenge,\ninvolving many modalities, nonlinearity, and mixed behaviorally relevant and irrelevant dynamics to dissociate.\nFinally, there are ethical issues. We build an interdisciplinary team of engineers, psychiatrists and behavioral\nscientists, computer scientists, neurosurgeons, neuroscientists, and neuroethicists to address these challenges.\nWe will develop novel software and hardware tools to enable multimodal neural-physiological-behavioral\nsensing and machine learning for mental states within social processes and beyond. The R61 in years 1-\n4 will develop and validate the tools in healthy subjects (Aims 1,2) and in epilepsy patients with already-implanted\niEEG electrodes which cover many regions related to mental states (Aim 3). In R61, we develop i) an integrated\nwearable skin-like sensor for multimodal physiological, biomechanical, and cortisol sensing; ii) conversational\nvirtual humans to evoke naturalistic social processes and enable emotion recognition using multimodal audio-\nvisual-language modalities; and iii) a nonlinear, multimodal, brain-behavior modeling, learning, and inference\nframework for mental states. We will also study the ethics of multimodal data collection, mental privacy, and self-\ntrust. Once the R61 tools are validated, we will combine them with intracranial brain activity in epilepsy patients\nin R33 in year 5 to learn multimodal biomarkers of mental states. Our approach spans multiple RDoC systems\nincluding Negative Valence, Arousal and Regulatory Systems, and Social Processes. It enables several levels\nof analysis including Circuits, Physiology, Behavior, and Self-Report. These systems span diverse disorders\nsuch as anxiety and depression. Thus, our multimodal, convergent, and integrated approach will likely enable\nunique brain-behavior insights into human emotion functioning applicable to broad domains of mental health." - ], - "award_amount": [ - "908700" - ], - "description": [ - "Novel multimodal neural, physiological, and behavioral sensing and machine learning for mental states" + "consortium_role": [ + "Principal Investigator (PI)" ], "external_url": [ - "https://reporter.nih.gov/project-details/5R61MH135407-03" - ], - "fiscal_year": [ - "2026" - ], - "grant_number": [ - "R61MH135407" - ], - "keywords": [ - "Machine learning", - "Mental states", - "Multimodal sensing", - "Nonlinear latent factors" - ], - "mechanism": [ - "R61" + "https://reporter.nih.gov/search/results?pi_id=12046106" ], "name": [ - "R61MH135407" - ], - "nih_link": [ - "https://reporter.nih.gov/project-details/5R61MH135407-03" - ], - "onboarding_status": [ - "not_started" - ], - "reporter_project_num": [ - "5R61MH135407-03" - ], - "studies_human": [ - "true" - ], - "studies_species_name": [ - "Humans" - ], - "title": [ - "Novel multimodal neural, physiological, and behavioral sensing and machine learning for mental states" + "Zheng Kuang" ] }, - "out": [ - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/0c13ec6b-1864-453c-a447-cf938ec53940" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/20a8f7ad-ea28-4624-9cae-4c73d8e74549" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/3a906d0f-416c-4fda-bdf9-c9e42ca31ab8" - }, + "out": [], + "in": [ { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/507c97c9-3940-4476-af59-4736c645c519" + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/ad57ca2b-08ac-42a0-991e-61feaf2c5e39" }, { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/50808fc1-e0bd-44c6-a772-364f8a35a23e" - }, + "predicate": "members", + "source": "https://brain-bbqs.org/id/fb3cf5ef-e850-44d2-887c-0d0ef608f48c" + } + ], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/e0d25d6e-4879-436d-980f-e690e3e5a937", + "class": "Investigator", + "label": "Álvaro Vega Hidalgo", + "facts": { + "consortium_role": [ + "Postdoc/Grad Student" + ], + "name": [ + "Álvaro Vega Hidalgo" + ], + "orcid": [ + "https://orcid.org/0000-0003-4088-8027" + ] + }, + "out": [ { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/5935dae3-756d-4c4c-8742-f067e81a8012" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd" }, { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/5ec5db0e-0458-498c-9ebd-38f78c2d139c" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40" }, { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/71dda42b-ccf2-4447-b3f1-d25aa8f8b0bb" + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3" }, { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/7d6d3ede-5075-44de-87e0-829d557a6887" - }, + "predicate": "member_of_group", + "target": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604" + } + ], + "in": [ { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/7fd65aca-ff11-4642-ab3d-17489049db10" - }, + "predicate": "held_by", + "source": "https://brain-bbqs.org/id/role/d7f6d7e4-401f-43ea-a3e2-ac34d7e73f1f" + } + ], + "dangling": [], + "degree": 5, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/c4b8f5ff-4ac3-4c1b-a978-bd7d1c2dbb86", + "class": "Job", + "label": "Canada Impact+ Doctoral Research Training Award ($40K/yr, 3 years)", + "facts": { + "description": [ + "The Canada Impact+ Research Training Awards (CIRTA) is a targeted, one-time initiative to recruit international or returning Canadian doctoral students to Canada. Funded by CIHR, NSERC, and SSHRC. Award value: $40,000/year for 3 years (600 awards across Canada, 30 allocated to McGill). Priority areas include: Advanced digital technologies (AI, quantum, cybersecurity), Health/biotechnology, Clean technology, Environment/climate resilience, Food/water security, Democratic/community resilience, Manufacturing/advanced materials, and Defense/dual-use technologies. McGill Faculty members (supervisors) identify and nominate incoming doctoral students for Fall 2026." + ], + "external_url": [ + "https://www.mcgill.ca" + ], + "name": [ + "Canada Impact+ Doctoral Research Training Award ($40K/yr, 3 years)" + ] + }, + "out": [ { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/8b727552-b37c-4088-a4ff-63f55dd59281" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/93b1ea26-0dae-458a-a946-13dca91b5382" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/c3f26370-becc-4d39-af05-abeb0433bee9" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/c7423364-c703-42a4-bde0-cdad1bc6f896" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/d2dadb0b-c44c-4e29-bc95-dce3ad1874ff" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/d956ef6b-0f6d-4bf3-a920-76a3db659efc" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/e96d4fb7-c4d6-4776-b39c-dfb97dc12f41" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/e9749351-6773-473d-8fd0-ec88e5a8ba07" - }, - { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/f162cf66-a805-4425-9e9f-ee40c5c89bb2" - }, - { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40" - } - ], - "in": [ - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/2849f8eb-0feb-48ba-b73e-577eb81e4b91" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/e165b281-959b-4738-b6c6-cd404994d003" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/c28b3fe8-8dbf-4037-ab56-fda6d170cfc4" } ], + "in": [], "dangling": [], - "degree": 22, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/80e226a5-f7e6-49d2-a64a-524940d498a5", - "class": "Project", - "label": "R61MH138612 · SeeMe: A multimodal behavioral-electrophysiological tool for real-time detection of consciousness", + "id": "https://brain-bbqs.org/id/8515cd09-418b-43c0-89b2-9076744b17e6", + "class": "Job", + "label": "Canada Impact+ Postdoctoral Research Training Award ($70K/yr, 2 years)", "facts": { - "abstract": [ - "SeeMe: A multimodal behavioral-electrophysiological tool for real-time detection\n of motor behavior in brain injury patients\nAbstract\nAn obstacle in clinical and basic science consciousness research is the lack of quantitative techniques to assess\nthe recovery of voluntary behavior. Standard techniques for consciousness detection depend on subjective\nassessment of voluntary behavior. These methods are slow, observer-dependent, and lack the temporal\nresolution to study brain circuits supporting consciousness. In Phase R61 of this proposal, SeeMe, a novel,\nobjective, real-time tool, will be developed to detect voluntary behavior. This multi-modal tool is based on the\nmeasurement of face and hand movements to command in recovering traumatic brain injury (TBI) patients who\nmay appear unresponsive. SeeMe detects early signs of low-amplitude voluntary behavior currently unseen by\nclinical examiners. These detected movements will be linked with neural recordings to interrogate underlying\ncircuits supporting voluntary behavior. This tool will be made freely available to researchers interested in\nconsciousness and more generally studying brain-behavior relationships. Phase R33 will use SeeMe to time-\nlock vagus nerve stimulation to voluntary behavior in recovering TBI patients, analogous to its FDA-approved\nuse in stroke. This framework will be used to study the neural correlates of voluntary behavior in TBI patients.\nWhen complete, this project will deliver 1.) a novel objective tool for analyzing voluntary behavior, 2.) a\ncomputational framework for synchronizing behavior with brain activity, and 3.) a closed-loop stimulation system\nto develop future neuromodulatory therapeutic approaches to facilitate the return of motor behavior after injury." - ], - "award_amount": [ - "466843" - ], "description": [ - "R61 grant for consciousness detection in brain injury patients" - ], - "fiscal_year": [ - "2026" - ], - "grant_number": [ - "R61MH138612" - ], - "keywords": [ - "Brain Injury", - "Consciousness", - "Electrophysiology", - "Motor Behavior", - "Real-time Detection" + "The Canada Impact+ Research Training Awards (CIRTA) is a targeted, one-time initiative to recruit international or returning Canadian postdoctoral researchers to Canada. Funded by CIHR, NSERC, and SSHRC. Award value: $70,000/year for 2 years (400 awards across Canada, 17 allocated to McGill). Priority areas include: Advanced digital technologies (AI, quantum, cybersecurity), Health/biotechnology, Clean technology, Environment/climate resilience, Food/water security, Democratic/community resilience, Manufacturing/advanced materials, and Defense/dual-use technologies. All eligible nominees in McGill's institutional submission are expected to receive the award." ], - "mechanism": [ - "R61" + "external_url": [ + "https://www.mcgill.ca" ], "name": [ - "R61MH138612" - ], - "nih_link": [ - "https://reporter.nih.gov/project-details/1R61MH138612-01" - ], - "onboarding_status": [ - "not_started" - ], - "reporter_project_num": [ - "1R61MH138612-01" - ], - "studies_human": [ - "true" - ], - "studies_species_name": [ - "Homo sapiens" - ], - "title": [ - "SeeMe: A multimodal behavioral-electrophysiological tool for real-time detection of consciousness" + "Canada Impact+ Postdoctoral Research Training Award ($70K/yr, 2 years)" ] }, "out": [ { "predicate": "part_of_org", - "target": "https://brain-bbqs.org/id/0885bc24-79d7-45c1-ad73-fd4301e68ff6" - }, - { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40" + "target": "https://brain-bbqs.org/id/c28b3fe8-8dbf-4037-ab56-fda6d170cfc4" } ], - "in": [ - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/b0b35286-4168-48d3-93d4-75ef191c6174" - }, + "in": [], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/ca41ad35-92a2-4391-95c3-0db49351b9a5", + "class": "Job", + "label": "Engineer/Data Science positions at International Brain Laboratory (IBL) ", + "facts": { + "external_url": [ + "https://www.internationalbrainlab.com/opportunities#community-engineer" + ], + "name": [ + "Engineer/Data Science positions at International Brain Laboratory (IBL) " + ] + }, + "out": [ { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/fbe6026f-8aad-439e-8fe2-da3cce084d1c" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/117670d4-58c8-49ed-acb8-311c357126ce" }, { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/1711154b-0f87-42e9-8cf6-c1316bdf48a5" + "predicate": "posted_by", + "target": "https://brain-bbqs.org/id/5f8ac3c4-a0fb-44d6-ae2d-b505816d4141" } ], + "in": [], "dangling": [], - "degree": 5, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/38289d36-f3a6-43e1-955b-db1d3d400cb2", - "class": "Project", - "label": "R61MH138705 · Neural and Behavioral Correlates of Live Face-to-Face Interactions", + "id": "https://brain-bbqs.org/id/7117c8b9-6d2f-4737-9490-09934fd89aeb", + "class": "Job", + "label": "Organoid Intelligence through Control of Neural Population Dynamics (FBC_PD)", "facts": { - "abstract": [ - "Summary\nRecent interest in the neural correlates of naturalistic behaviors has increased the need for tools to acquire\nmultimodal measures during real world contexts. Human faces in natural settings are primary sources of socially\ncommunicated information but are traditionally studied in non-interactive contexts. Faces not only carry the\nstructural information that serves identification, but also communicate social cues driven by live and spontaneous\ndynamics that convey emotion, direct attention, and regulate eye-to-eye contact. However, this domain of live\nand natural interacting faces has not been widely studied due to the absence of reliable and validated\nmeasurement methods appropriate for observing such interaction under ecologically valid conditions. We\naddress this knowledge gap here by proposing to establish a Social Interaction Suite (SIS) of synchronized\nneural and behavioral tools designed for measurements of cognitive networks associated with processing facial\ncues and their correlated behaviors exchanged in live social interactions. SIS is developed on a neural imaging\nplatform based on functional near infrared spectroscopy (fNIRS), a head mounted optical imaging system, to\nacquire hemodynamic signals that originate from superficial cortex. This suite of tools will include simultaneous\nand synchronized electroencephalography (EEG), eye-tracking, pupillometry, facial feature tracking and\nassociated emotive categorization, subjective responses (dial ratings), and physiological monitoring during live\neye-to-eye contact and emotional contagion tasks. Prior studies of dyadic face interactions provide evidence that\nreal faces engage specialized neural circuits beyond the well-known ventral stream face processing circuits and\ninclude right superior temporal gyrus (rSTG), supramarginal gyrus (rSMG) and angular gyrus (rAG). Eye-to-eye\ncontact additionally engages regions in the dorsal parietal area, right somatosensory cortex (rSSAC). We aim\nto advance a theoretical framework for this interactive face and eye-contact model by testing the hypothesis that\nthe live-face and the eye-to-eye contact systems are dissociable cortical pathways. Validation and\ncharacterization of the model will be performed by continuous transcranial brain stimulation (cTBS) to disrupt\ncandidate regions in the live face processing systems at sites informed by the previous pilot fNIRS and behavioral\ndata. Following the completion of the initial tool development and validation phase, the obtained results will be\nused in the application of functionally defined multi-electrode targeted transcranial direct current stimulation\n(tDCS) to test hypotheses related to up and down regulation of the dorsal parietal and lateral face processing\nregions. Successful manipulation of eye contact under excitatory and inhibitory tDCS stimulation of the dorsal\nregion will extend our cTBS results and provide proof of concept for the application of neural modulation as a\ntool for facilitating social interaction." - ], - "award_amount": [ - "605277" - ], "description": [ - "Neural and Behavioral Correlates of Live Face-to-Face Interactions" - ], - "external_url": [ - "https://reporter.nih.gov/project-details/1R61MH138705-01" - ], - "fiscal_year": [ - "2026" - ], - "grant_number": [ - "R61MH138705" - ], - "keywords": [ - "Face-to-face interactions", - "Facial keypoint extraction", - "Micro-dynamics", - "Social coupling" - ], - "mechanism": [ - "R61" + "Fully-funded postdoctoral position in organoid intelligence through control of neural population dynamics. Join the Neural Systems and Machine Learning Lab at UC Berkeley and Lawrence Berkeley National Laboratory." ], "name": [ - "R61MH138705" - ], - "nih_link": [ - "https://reporter.nih.gov/project-details/1R61MH138705-01" - ], - "onboarding_status": [ - "not_started" - ], - "reporter_project_num": [ - "5R61MH138705-02" - ], - "studies_human": [ - "true" - ], - "studies_species_name": [ - "Humans" - ], - "title": [ - "Neural and Behavioral Correlates of Live Face-to-Face Interactions" + "Organoid Intelligence through Control of Neural Population Dynamics (FBC_PD)" ] }, "out": [ { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/fd825a1b-0bb9-4d2d-83e0-d901810e15b5" - }, - { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/8f22c7e2-06f2-4c84-aa53-071dcce8f875" } ], - "in": [ + "in": [], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/12234308-3c6b-4d75-a135-f8fb127d4389", + "class": "Job", + "label": "Postdoctoral position in statistical methods for behavioral analysis", + "facts": { + "name": [ + "Postdoctoral position in statistical methods for behavioral analysis" + ] + }, + "out": [ { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/173d4dd7-5a55-48f7-b5ee-e08bfe25ac71" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/5b794afd-cf08-4107-81c8-522a29714830" }, { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/66819421-258e-42c3-b30a-5ed7345463e3" + "predicate": "posted_by", + "target": "https://brain-bbqs.org/id/831a48e1-025d-499a-bf11-83d05285ed4b" } ], + "in": [], "dangling": [], - "degree": 4, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae", - "class": "Project", - "label": "R61MH138713 · Combining neural oscillations, physiology and privacy-preserving LiDAR/millimeter wave sensing technology to track attention states in natural contexts", + "id": "https://brain-bbqs.org/id/35e3244e-6533-49e7-b63a-3619d2cf18dc", + "class": "Job", + "label": "Theoretical Understanding of Distributed Neural Population Dynamics (Theory_PD)", "facts": { - "abstract": [ - "Project Summary\nImpairments of attention are common across neurodevelopmental disorders (e.g., ADHD), and contribute to\nnegative life outcomes such as in academic achievement. Critically, leading treatment strategies are ineffective\nat improving educational outcomes. Lacking is assessment of attention deficits in real-life contexts, where\nvisuospatial attention circuitry is influenced by interactions with regulatory systems including arousal and\nmotivation. As such, tracking of neuro-behavioral attention states in natural environments has been\nincreasingly recognized as crucial to: (i) understanding the interaction between neural circuitry of attention and\nregulatory influences, and (ii) identifying pathways to improving behavioral outcomes. Several technical\nchallenges in this effort exist, however, and include quantification and synchronization of objective measures\nof such interacting systems with neural indicators of attention, portability of such multi-modal assessment\nsystems, and increasingly, protection of privacy, with video recordings a gold standard in the field. The\nobjective of this R61/33 proposal is to address these challenges.\nWe will (Aim 1) develop an integrated, portable sensor suite for concurrent recording of neural activity,\nphysiological arousal, motor signals, and physical interactions in social environments. We will integrate our\npreviously developed tracking of neural oscillatory features of visual attention with additional sensors (heart\nrate, motor, and novel LiDAR/millimeter wave sensing) to extract physiological and movement-derived\nfeatures of arousal and motivation. Project milestones quantify our aims to (i) optimize synchronization &\nportability, while (ii) introducing privacy-preservation technology to eliminate reliance on video recordings, and\n(iii) achieve above-chance classification of system states, and overall attention state as expressed in behavior.\nNext, we will deploy this technology to explain and predict neuro-behavioral attention states during mock-\nclassroom and real-classroom learning activities, while manipulating contextual variables such as degree of\nattention support (group vs individual work), motivation (rewarded activities) and arousal (testing context). We\nwill test the hypotheses (Aim 2) that (i) a multi-dimensional profile of attention states will improve prediction of\nneural activity and behavioral attention states and delineate how visual attention circuitry and regulatory\ninfluences interact in natural contexts, while also (ii) accounting for individual variability in inattention by\ndifferentiating between causal pathways to inattention, and (iii) identifying individual learning contexts that\noptimize an individual’s attention.\nThe result of the project will be a scalable, integrated, portable technology designed to improve the accuracy\nof determining sources of inattention on individual basis, thus allowing for more targeted treatments." - ], - "award_amount": [ - "601485" - ], "description": [ - "Combining neural oscillations, physiology and privacy-preserving LiDAR/millimeter wave sensing technology to track attention states in natural contexts" - ], - "external_url": [ - "https://reporter.nih.gov/project-details/1R61MH138713-01" - ], - "fiscal_year": [ - "2026" - ], - "grant_number": [ - "R61MH138713" - ], - "keywords": [ - "Attention states", - "LiDAR", - "Millimeter wave", - "Neural oscillations", - "Privacy-preserving" + "Fully-funded postdoctoral position focused on theoretical understanding of distributed neural population dynamics. Join the Neural Systems and Machine Learning Lab at UC Berkeley and Lawrence Berkeley National Laboratory." ], - "mechanism": [ - "R61" + "name": [ + "Theoretical Understanding of Distributed Neural Population Dynamics (Theory_PD)" + ] + }, + "out": [ + { + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/8f22c7e2-06f2-4c84-aa53-071dcce8f875" + } + ], + "in": [], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/9a8ccd3e-8d5a-4169-8ee9-6c64bc650803", + "class": "MLModel", + "label": "CEBRA", + "facts": { + "description": [ + "Dimensionality reduction revealing hidden structures in neural time series" + ], + "external_url": [ + "https://cebra.ai/" ], "name": [ - "R61MH138713" + "CEBRA" + ] + }, + "out": [], + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/de29b286-d343-4108-90d9-3d11f8adc030", + "class": "MLModel", + "label": "DLC Model Zoo", + "facts": { + "description": [ + "Pre-trained pose estimation for diverse species" + ], + "external_url": [ + "https://huggingface.co/mwmathis" + ], + "name": [ + "DLC Model Zoo" + ] + }, + "out": [], + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/0a91143c-35e4-4cf1-a1d5-301b6a8651ae", + "class": "MLModel", + "label": "DLC Organization", + "facts": { + "description": [ + "Centralized repository of pose estimation models and demos" + ], + "external_url": [ + "https://huggingface.co/DeepLabCut" + ], + "name": [ + "DLC Organization" + ] + }, + "out": [], + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540", + "class": "Project", + "label": "R24MH136632 · Ecosystem for Multi-modal Brain-behavior Experimentation and Research (EMBER)", + "facts": { + "abstract": [ + "PROJECT SUMMARY\nNeuroscience research has historically relied on observing tightly controlled behaviors in siloed laboratory\nexperiments, constraining our understanding of the neural bases of complex behaviors observed in naturalistic\nsettings. With ongoing advances in unobtrusive sensing technology, artificial intelligence, and machine learning\n(AI/ML), and availability of computing power, the field of neuroscience has been afforded an opportunity to make\nlarge-scale discoveries hitherto unimaginable. For this to be realized, however, it is crucial to facilitate secondary\nanalyses that cut across individual datasets, allowing for research that transcends individual project designs.\nSuch a goal cannot be achieved without a data archive that provides a compelling technical solution for storing\nand curating datasets, and that provides close integration with analytical resources that require minimal technical\nexpertise to be leveraged.\nHere, we propose the Ecosystem for Multi-modal Brain-behavior Experimentation and Research (EMBER), a\ndata archive specifically tailored to serve the unique needs of the Brain Behavior Quantification and\nSynchronization (BBQS) research community, which will be at the forefront of advancing neurobehavioral\nknowledge in coming years. At the heart of EMBER is a scalable, hybrid data archive which will house and\nmanage multimodal and multi-species data collected by diverse research groups. Crucially, our hybrid\narchitecture will not only automatically execute the optimal storage scheme for different modalities of data,\nleveraging existing BRAIN Informatics resources, but also achieve dual objectives of ensuring the security of\nbehavioral and environmental data — which may include Protected Health Information (PHI) and Personally\nIdentifiable Information (PII) — as well as expediting querying and data access not only within BBQS datasets\nbut also with other BRAIN resources. Different cadres of EMBER users, such as BBQS data generators,\nanalysts, as well as the broader neuroscience community will be able to ingest, curate, and instigate discovery\nfrom data using a user-friendly portal that will streamline highly technical data harmonization and synchronization\nsteps. In particular, development, testing, and deployment of analysis tools will be supported by cloud-based\nsandboxes that are seamlessly integrated with ML/AI resources developed by the BBQS Data Coordination and\nArtificial Intelligence Center (DCAIC).\nIntegral to EMBER’s success will be acceptance in the community as the gold-standard engine for discovery,\nproviding utility beyond being simply a passive, program-mandated data archive. Throughout its lifecycle, we will\nnurture bidirectional collaboration with the data generators, analysts, as well as the broader neuroscience\nresearch community to introduce and maintain tools for sharing, querying, and analyzing data. We anticipate\nthat EMBER and associated data resources will maximize the BBQS program’s potential to reach its ambitious\nobjectives of transforming our understanding of the link between brain and behavior." + ], + "award_amount": [ + "1164394" + ], + "description": [ + "Ecosystem for Multi-modal Brain-behavior Experimentation and Research (EMBER)" + ], + "external_url": [ + "https://reporter.nih.gov/project-details/1R24MH136632-01" + ], + "fiscal_year": [ + "2024" + ], + "grant_number": [ + "R24MH136632" + ], + "keywords": [ + "Data Archive", + "EMBER", + "NWB", + "Ontologies", + "Reproducibility" + ], + "mechanism": [ + "R24" + ], + "name": [ + "R24MH136632" ], "nih_link": [ - "https://reporter.nih.gov/project-details/1R61MH138713-01" + "https://reporter.nih.gov/project-details/1R24MH136632-01" ], "onboarding_status": [ "not_started" ], "reporter_project_num": [ - "5R61MH138713-02" + "1R24MH136632-01" ], "studies_human": [ "true" ], - "studies_species_name": [ - "Humans" + "study_scope": [ + "All Species" ], "title": [ - "Combining neural oscillations, physiology and privacy-preserving LiDAR/millimeter wave sensing technology to track attention states in natural contexts" + "Ecosystem for Multi-modal Brain-behavior Experimentation and Research (EMBER)" ] }, "out": [ { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/162437eb-ce44-46a5-b994-5741d334c6fb" + "predicate": "funded_datasets", + "target": "https://brain-bbqs.org/id/4f6fe91b-9a18-467b-8a17-46bc3404f22e" }, { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/1c345b47-9c5c-4a88-a8e4-bd8737d97483" + "predicate": "funded_datasets", + "target": "https://brain-bbqs.org/id/72c84eee-67e0-47db-9502-bb55558d9819" }, { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/39a5e171-49ad-4125-bb84-9feb6e3ef28e" + "predicate": "funded_datasets", + "target": "https://brain-bbqs.org/id/95b1db49-e4dd-4bab-9bb1-21400d850386" }, { "predicate": "produced", - "target": "https://brain-bbqs.org/id/42fe776f-9741-4820-a9c4-d11b14474575" + "target": "https://brain-bbqs.org/id/7cccc8d1-98d9-4ca2-aaf8-cb9c9f836f06" }, { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/4318c6a2-b27a-4d99-b209-f55c57a824eb" + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/d8cef433-7209-4e63-bdd5-a3f52bd9dd89" }, { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/563136c5-57a1-44da-9364-e1c22ce685f8" + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3" }, { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/6e93a7ef-b7d8-45c7-891f-0b42a690f4ed" - }, + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" + } + ], + "in": [ { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/7e3ed91a-e0eb-45d6-aa86-cb785dfba7ba" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/642bc862-c174-48ba-8b1b-e7c1356e07ab" }, { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/7e6d2d83-a6f6-449d-96cf-c8b0a014e86f" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/145ca46a-181b-4fb5-b546-3522f659e770" }, { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/9b2f7713-e1e1-4bd6-a2d3-2bfc9f00cd11" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/7492a89a-dd5f-46af-871d-c6f9a0bd6eb7" }, { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/a0ce7dc8-e0b9-4b44-85b8-8955d6a36a59" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/3cc8ceb9-f7ea-4724-91ed-546efb08242b" }, { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/e483d68e-7bc8-4fcb-9a75-3d97825c02c9" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/0dca4f7e-50c2-4cc8-ac51-1cbe7cd5deaa" }, { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/e6a2c1d6-43e9-4dd7-b24d-769b7c8ac4a8" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/3d7151df-4a2b-40cd-97ae-0f695e5d237e" }, - { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40" - } - ], - "in": [ { "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/d0517883-23dc-4702-9f1b-374497c94486" + "source": "https://brain-bbqs.org/id/role/68749a60-249f-4eb2-ad4a-7ae78c76a2f9" }, { "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/4ee3ec6b-290f-4731-b8af-788bc47217e8" + "source": "https://brain-bbqs.org/id/role/3d109ffa-adb1-4a1e-b2fd-5f516280d7f7" }, { "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/bd6b0699-938f-4117-94d2-97177837e94c" + "source": "https://brain-bbqs.org/id/role/5c64f851-de9f-4496-84da-58ed338ffa65" }, { "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/63cd8c2a-0860-4130-857c-c33765b115d5" + "source": "https://brain-bbqs.org/id/role/b450bf2e-e124-481f-8950-2e7b03832f17" }, { "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/caef691a-ad28-4fbe-b098-6536757b49d6" + "source": "https://brain-bbqs.org/id/role/455424c4-b3b7-466e-b6f0-c959fbb74b77" } ], "dangling": [], - "degree": 19, + "degree": 18, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/adc6c1dd-57a9-49bb-a57d-521fd1208a76", + "id": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608", "class": "Project", - "label": "R61MH138966 · A naturalistic multimodal platform for capturing brain-body interactions in people during physical effort-based decision making", + "label": "R34DA059500 · Transformative Optical Imaging of Brain & Behavior in Navigating Genetic Species", "facts": { "abstract": [ - "PROJECT SUMMARY\nThe challenge of understanding how neural activity results in human behavior and cognition in health and disease is a\ncrucial one for neuroscience. Traditional research methods often employ abstract tasks focusing on discrete cognitive\nprocesses, which may not fully capture the complexity of real-world behaviors and their neural underpinnings. This\nlimitation has hindered progress in understanding and treating psychiatric disorders. In particular, motivational deficits,\ncharacterized by a reduced propensity to expend effort for rewarding outcomes, are pervasive across various disorders like\nmajor depression as well as many others (e.g., Parkinson's disease, schizophrenia). This deficit in effort-based decision-\nmaking (EBDM) leads to reduced quality of life in patients who experience these symptoms. To address this gap, there is\na need to employ naturalistic paradigms with concurrent measurements of different systems of the body to characterize\nbehavior comprehensively. The proposed project aims to develop and pilot a platform for synchronized multimodal\nmeasurement, the HOlistic Realtime Measurement of Effort-based deciSion-making (HORMES) system. The HORMES\nsystem will be centered around a new naturalistic EBDM (nEBDM) task in an immersive virtual environment requiring\neffortful locomotion. The system will measure behavior across decision-making, embodied, affective, and clinical\ndomains, synchronized with measurements of relevant neural circuits at appropriate spatial and temporal scales, and\ninclude new analysis methods based on latent variable models to characterize brain-body interactions.\nThe project consists of two phases: the R61 phase activities will include the design and refinement of the HORMES\nsystem using data from healthy participants and patients with major depression, while the R33 phase will pilot the system\nin a clinical trial with treatment-resistant depression patients undergoing subcallosal cingulate cortex deep brain\nstimulation. This experimental neuromodulation therapy often leads to changes in psychomotor, interoceptive, and\ncognitive symptoms at different timescales, as well as provides access to intracortical electrophysiology with extreme\nspatial specificity in a brain network known to be critical in nEBDM. Taken together, this trial is an ideal context for a\npilot evaluation of the HORMES system in a longitudinal study. Furthermore, the project integrates neuroethics research\nand involves the creation of a Council of Lived Experience Advocates (CLEA), comprising patients with intracranial\nimplants across a variety of disorders. The CLEA will provide input on the HORMES project and offer guidance on the\nethical implications and future applications of high-resolution biobehavioral data. Successful completion of the project is\nexpected to advance our understanding of motivational deficits and inform novel treatment for symptoms, representing a\nsignificant step towards bridging the gap between basic neuroscience research and clinical practice in psychiatry." + "PROJECT SUMMARY / ABSTRACT\nOur long-term goal is to define general principles that connect neuronal activity to unconstrained behaviors in\nnatural sensory environments. Achieving this goal will require the development of new tools to quantitatively\ncompare behavior across species in complex environments and to monitor neural activity in freely moving an-\nimals. Here we propose to bring together a diverse, multi-disciplinary team of five labs with a track record of\nproductively measuring and modeling neural activity and behavior. We will use two parallel approaches to make\nprogress towards imaging neural activity from freely moving small genetic model organisms as they navigate\ncomplex sensory environments. In Aim 1 we will develop behavioral apparatus that allows for experimenter\ncontrol of sensory stimuli (mechanosensory flow, odor, and visual stimuli) while monitoring unconstrained be-\nhavior at two resolutions. Low resolution measurements allow for quantification of stimulus-guided navigation,\nwhile high resolution measurements allow for detailed quantification of body posture and limb kinematics, and\nwill eventually permit imaging of neural activity. In Aim 2, we will develop bioluminescence-based transgenic\nanimals and techniques for imaging neural activity in freely moving flies and fish. Optimization of these reagents\nand protocols will allow for eventual simultaneous measurements of neural activity and behavior in larger and\nmore complex environments. This work draws on our collective expertise in quantitative behavior, biolumines-\ncent indicators, real-time tracking of animal behavior at high resolution, and physical modeling of animal behav-\nior. This work will advance technologies for studying neural activity in unconstrained animals and establish a\ncollaborative team to pursue this work." ], "award_amount": [ - "999986" + "349975" ], "description": [ - "A naturalistic multimodal platform for capturing brain-body interactions in people during physical effort-based decision making" + "Transformative Optical Imaging of Brain & Behavior in Navigating Genetic Species" ], "external_url": [ - "https://reporter.nih.gov/project-details/5R61MH138966-02" + "https://reporter.nih.gov/project-details/5R34DA059500-02" ], "fiscal_year": [ - "2026" + "2025" ], "grant_number": [ - "R61MH138966" + "R34DA059500" ], "keywords": [ - "Brain-body interactions", - "Effort-based decision making", - "Neuroeconomics", - "Physical exertion" + "Genetic species", + "Optical imaging", + "Spatial navigation", + "State-space modeling" ], "mechanism": [ - "R61" + "R34" ], "name": [ - "R61MH138966" + "R34DA059500" ], "nih_link": [ - "https://reporter.nih.gov/project-details/5R61MH138966-02" + "https://reporter.nih.gov/project-details/5R34DA059500-02" ], "onboarding_status": [ "not_started" ], "reporter_project_num": [ - "5R61MH138966-02" + "5R34DA059500-02" ], "studies_human": [ - "true" - ], - "studies_species_name": [ - "Humans" + "false" ], "title": [ - "A naturalistic multimodal platform for capturing brain-body interactions in people during physical effort-based decision making" + "Transformative Optical Imaging of Brain & Behavior in Navigating Genetic Species" ] }, "out": [ { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40" - } - ], - "in": [ + "predicate": "produced", + "target": "https://brain-bbqs.org/id/4308a85a-925b-4012-9d19-ea11860d7bf1" + }, { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/a474b99d-19ed-4d37-b39f-c22ba57b2101" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180" }, { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/8730c049-9ec8-4a10-9e6f-0e5f0b33144e" - } - ], - "dangling": [], - "degree": 3, - "flags": [], - "violations": [] + "predicate": "produced", + "target": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/bd142774-20d3-461d-a99f-7fdc94c120bd" + }, + { + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/436525a6-acbf-4066-ac75-82845a8db8cc" + }, + { + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/8e40951f-ace0-4470-ab0f-3dd6bc366c8b" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/006caa68-8b24-474f-867f-82a6199a84b1" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/851882bb-3321-45ed-af75-6ae08836c1fc" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e2c21bfc-1707-4f6d-aa18-c6db03f53c2d" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/f328ad53-2dd2-490f-adf1-40e9cd85b5bd" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" + } + ], + "in": [ + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/92a2b8eb-f9ed-422a-9a23-d8a9e12cf331" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/bf82a7b1-f5dc-4ec7-8117-927452fa5027" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/0a29a35d-e673-42f7-a590-23f0fe7055f7" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/fa7fab82-ca22-484b-a5aa-f775d831c4a6" + } + ], + "dangling": [], + "degree": 16, + "flags": [], + "violations": [] }, { - "id": "https://brain-bbqs.org/id/797fd7cf-49dc-40a2-811d-aeec94460ead", + "id": "https://brain-bbqs.org/id/4f2619b1-a6a4-48e5-b21a-0f5455354ea9", "class": "Project", - "label": "R61MH138967 · A Day in the Life of the Human Brain: Investigating the Dynamic Interrelationship Between Brain, Cognition, Behavior, and Physiology", + "label": "R34DA059506 · High-resolution 3D tracking of social behaviors for deep phenotypic analysis", "facts": { "abstract": [ - "Summary/Abstract\nWhether we are fatigued from a teleconference call, eager to read a book, energetic and ready to start our day or\ntired and preparing for sleep, anxious or happy, in the real world key neurocognitive processes and moods\nfluctuate over minutes-to-hours. Hunger, circadian rhythms, hormone levels, blood sugar, heart rate, body\ntemperature, all fluctuate at the mesoscopic timescale of minutes-to-hours modulating how we respond to the\nworld. For example, the response of the brain to the odor of fresh cookies just out of the oven is different when\none is hungry versus for someone who just ate. These state fluctuations also influence why the same event will\ntrigger pathological symptoms at some times, but not others, in individuals with neurological or psychiatric\ndisorders. Despite the critical importance of interrelated brain, cognitive, behavioral, and physiological\nfluctuations at the timescale of minutes-to-hours in the real world, nearly everything we know about human\nbrain function mostly comes from highly controlled experiments lasting milliseconds-to-seconds, or longitudinal\nstudies from months-to-years. This has left a critical gap in scientific knowledge regarding the dynamics of brain,\ncognitive, behavioral, and physiological interactions at the timescale of minutes-to-hours in real world settings.\n To fill this gap, we will develop a platform for measuring and analyzing brain activity, cognitive states,\nbehavior, and physiology leveraging the unique opportunity to record multiday neural activity during natural\nbehavior in the real world in individuals undergoing the surgical treatment for epilepsy. We will integrate cutting-\nedge wearable and artificial intelligence technology for rich behavioral and physiological monitoring along with\nneural network and dynamical systems learning approaches. We will rigorously quality control and validate this\nplatform to ensure the highest quality data. We will also perform a bioethics study to develop a paradigm that\naddresses the unique privacy concerns that arise in using ubiquitous measurements for real-world neuroscience\nin this participant population. In the R33 phase of this project, we will then use this platform to examine how\nbrain, cognitive, behavioral, and physiological interrelationships fluctuate with circadian rhythms and relate to\nbrain network excitability. Given the ubiquity of circadian rhythms across the brain and body, their influence on\ncognition and behavior, and their relationship with many neurological and psychiatric disorders, the R33 study\nhas broad implications for both our understanding of the brain and for potential treatment strategies for many\ndisorders. For example, knowing when brain networks are in high or low excitability states can suggest windows\nof opportunity for maximally beneficial clinical interventions. The development of this integrated brain,\ncognitive, behavioral, and physiological measurement and analysis platform in the R61 phase of this project will\nopen up new neuroscientific and translational research opportunities. The studies on circadian rhythms and\nbrain network excitability in the R33 phase will lead to new understanding of these important neurobiological\nprocesses and provides insights with broad clinical and translational implications." + "Project Summary\nThe aim of this proposal is to plan for and deliver a proof-of-concept solution for an innovative\nand easy-to-use experimental platform for measuring and quantifying social behaviors in animal\nmodels. Efforts during this initial grant period will be restricted to rats and mice, experimental\nanimals with rich social behaviors, but we hope in future iterations of this program to expand also\nto other model organisms, including birds and monkeys. To capture kinematic details of whole-\nbody movement during social behaviors requires novel solutions for dealing with the inevitable\nocclusions that results from social interactions. To overcome the limitations of current approaches\nwe will build and validate a novel deep neural network that learns to combine images across\nmultiple synchronized cameras and infer the 3D physical coordinates of multiple animals.\nPreliminary studies have been very positive and suggest large improvements over current\nmethods both when it comes to the range of social behaviors that can be tracked and the precision\nwith which they can be measured. Importantly, all new technology will be readily shared with the\nscientific community, thereby leveraging from this single grant the potential for numerous\ninvestigators to dramatically improve the efficiency of their research programs requiring rigorous\nquantitative descriptions of animal behavior." ], "award_amount": [ - "1004971" + "362680" ], "description": [ - "Summary/Abstract\nWhether we are fatigued from a teleconference call, eager to read a book, energetic and ready to start our day or\ntired and preparing for sleep, anxious or happy, in the real world key neurocognitive processes and moods\nfluctuate over minutes-to-hours. Hunger, circadian rhythms, hormone levels, blood sugar, heart rate, body\ntemperature, all fluctuate at the mesoscopic timescale of minutes-to-hours modulating how we respond to the\nworld. For example, the response of the brain to " + "High-resolution 3D tracking of social behaviors for deep phenotypic analysis" + ], + "external_url": [ + "https://reporter.nih.gov/project-details/5R34DA059506-02" ], "fiscal_year": [ - "2026" + "2025" ], "grant_number": [ - "R61MH138967" + "R34DA059506" + ], + "keywords": [ + "3D tracking", + "Computer vision", + "Deep phenotyping", + "Keypoint extraction" ], "mechanism": [ - "R61" + "R34" ], "name": [ - "R61MH138967" + "R34DA059506" ], "nih_link": [ - "https://reporter.nih.gov/project-details/1R61MH138967-01" + "https://reporter.nih.gov/project-details/5R34DA059506-02" ], "onboarding_status": [ "not_started" ], "reporter_project_num": [ - "1R61MH138967-01" + "5R34DA059506-02" ], "studies_human": [ - "true" - ], - "studies_species_name": [ - "Human" + "false" ], "title": [ - "A Day in the Life of the Human Brain: Investigating the Dynamic Interrelationship Between Brain, Cognition, Behavior, and Physiology" + "High-resolution 3D tracking of social behaviors for deep phenotypic analysis" ] }, "out": [ + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/fa14bcd8-d960-44b1-874c-49e040b64e61" + }, { "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40" - } - ], - "in": [ + "target": "https://brain-bbqs.org/id/5a248695-86a9-44ac-b923-a3050572afba" + }, { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/6344ea60-1fad-4b96-ac49-43e00f2acf04" + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/9f227f88-53ba-4c7c-91e7-334641e4b759" }, { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/b096be30-abda-4dbf-b167-4dea42f69dfa" + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3" }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" + } + ], + "in": [ { "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/9217ceed-1e78-4c40-b15b-66077b5569db" + "source": "https://brain-bbqs.org/id/role/82abd87d-c378-4049-8c84-4eede3066410" }, { "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/29154919-0da2-4db6-a005-c5cf8451746d" + "source": "https://brain-bbqs.org/id/role/a8f54c17-5723-4efe-99dd-6568342c734d" }, { "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/776f6ad8-5dbf-4a6b-a49e-4bdff826a969" + "source": "https://brain-bbqs.org/id/role/c65b0c08-04d4-42fb-9ca4-dcc64f2f78f8" } ], "dangling": [], - "degree": 6, + "degree": 8, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/cbc8640e-6d05-4872-bf01-6e3f7d89c349", + "id": "https://brain-bbqs.org/id/e285ab2b-1a7d-4b2e-9400-b24d6faff6de", "class": "Project", - "label": "R61MH142354 · Multimodal AI-enabled synchronized neural, physiological, and behavioral recordings in humans during unstructured behavior to study dynamic task control", + "label": "R34DA059507 · Development of a \"smart aviary\" to probe neural dynamics of complex social behaviors in a gregarious songbird", "facts": { "abstract": [ - "Project summary\nComplex human behavior - such as driving a car - involves the flexible sequencing of many brief tasks in order\nto achieve a goal. Current constrained cognitive tasks completely miss this “task control” aspect of cognition,\nleaving us with little understanding of the underlying mechanisms. The behavior of subjects with lesions in the\nfrontal cortex or with neuropsychiatric disease illustrates what is being missed: such patients can often perform\nsimple behaviors, but fail to properly sequence these behaviors to achieve a goal. Therefore, the fundamental\ndeficit that these patients suffer from is not visible during simple behaviors, making its study impossible. There\nare two major challenges to studying sufficiently complex behavior that involves task control. First one needs to\nquantify complex unconstrained behaviors such as social interactions or driving a car. Second, one needs to\nsimultaneously observe human brain activity at cellular-level resolution. Here, as part of the BRAIN initiatives\nBrain and Behavior Quantification and Synchronization consortium, we tackle these challenges by (i)\ndeveloping instrumentation to monitor and quantify human behavior in unprecedented detail, and (ii) combining\nthis new system with large-scale recordings from single neurons in the brains of epilepsy patients. We will\ndevelop a system to acquire and synchronize multi-modal streams of behavioral data, including a head-\nmounted eye tracking device to track gaze position, egocentric and allocentric video and audio, and a wearable\ndevice to track biophysiological signals (Aim 1, R61). This data will then be labeled automatically using artificial\nintelligence methods, including labeling objects fixated by the subject, transcribing what is being said from\naudio, and identifying behavioral states based on the biophysiology (Aim 2). The new system will be validated\nfor two use cases: ambulatory control subjects and patients in the epilepsy monitoring unit. We will then utilize\nthe newly developed system to examine the neural mechanisms of task control with synchronized\nsimultaneous single-neuron recordings in human epilepsy patients (Aim 3). We will identify behavioral and\nneural modules (“microtasks”) and the sequence by which they are engaged, and will then examine the\noverarching hypothesis that groups of neurons are specialized for executing a specific microtask. These\nexperiments promise to reveal new insights into the brain architecture of task control that were made possible\nby the availability of quantified multi-modal behavior. Lastly, an overarching aim is to construct and train a large\nfoundation model that learns relationships between the different streams of behavior and the neural recordings.\nOur system will be released as open source and requires only commercially available devices and a cellphone,\nmaking the system widely available for others to use in their research. Our multi-modal behavior and\nsynchronized neural recording approach will lay the groundwork for revealing how the human brain achieves\n“task control”, an understanding of which is urgently needed to develop new treatments for the effects of frontal\nlobe lesions and psychiatric diseases that affect executive control." + "SUMMARY\n The nervous system of social species has evolved to perceive and evaluate signals within a social\ncontext. Social information therefore must impact how the brain processes information, yet little is\nstill known about how the brain integrates social information to produce actions in a social context.\nThis lack of knowledge exists in part because social context is difficult to quantify and because the\nmajority of studies are performed in species that do not have a particularly rich social structure. Here\nwe propose to study the brown-headed cowbird (Molothrus ater), a highly gregarious songbird\nspecies whose social behavior has been well studied and where vocal and non-vocal communication\nsignals form a central and critical component of its social system.\n We have created a “smart aviary” equipped with cameras and microphones that is capable of\nmonitoring behavior in each individual during the entire breeding season. Our aim is to create a fully\nautomated system using computer vision and machine learning technology to evaluate moment-to-\nmoment behavioral interactions between all member of the group (9 females and 7 males) over the\nentire breeding season. We have assembled an interdisciplinary team of engineers, neurobiologists\nand computational scientists, to create a platform where we can record\ndynamics\nquantify\nlearning\ndirectly\nthe\nsegment\ninvasive\nin\nenable\nsocial\ndevelop\nquantify\nassociated\nsocial\nand evaluate how brain\nare shaped within a complex social context over an ethologically relevant timescale. To\n moment-to-moment behavior in each individual bird, we are developing a novel machine\n approach that tracks each bird and predicts its position, orientation, pose, and shape\nfrom images using artificial neural networks and a 3D articulated mesh model. By collecting\noutput of the model over consecutive frames we will obtain a pose trajectory, which we will\nand classify into discrete behaviora l types. We also aim to develop a miniature non-\nwirelessly powered and transmitting recording device optimized for long duration recording\nour aviary that critically does not impact bird individual or social behavior. Such a device would\n us to link neural activation patterns to discrete behavioral events (e.g. male song) within the\ncontext in which these specific events occurred. Supplied with our rich dataset, we aim to\nmathematical tools necessary to generate social network models that will allow us to\nthe specific state of the bird social network associated with neural activation patterns\nwith individual behavioral events. To the best of our nowledge, the proposal to link\nnetwork state to neural activation in a precise quantitative manner has never before been\n,\nk\nattempted. Through these efforts, we will be well positioned to subsequently pursue a Targeted Brain\nCircuits Projects R01 to investigate in a quantitative manner how social context influences brain\nactivity." ], "award_amount": [ - "1417650" + "342485" ], "description": [ - "Project summary\nComplex human behavior - such as driving a car - involves the flexible sequencing of many brief tasks in order\nto achieve a goal. Current constrained cognitive tasks completely miss this “task control” aspect of cognition,\nleaving us with little understanding of the underlying mechanisms. The behavior of subjects with lesions in the\nfrontal cortex or with neuropsychiatric disease illustrates what is being missed: such patients can often perform\nsimple behaviors, but fail to prope" + "Development of a \"smart aviary\" to probe neural dynamics of complex social behaviors in a gregarious songbird" + ], + "external_url": [ + "https://reporter.nih.gov/project-details/5R34DA059507-02" ], "fiscal_year": [ - "2026" + "2025" ], "grant_number": [ - "R61MH142354" + "R34DA059507" + ], + "keywords": [ + "3D tracking", + "Flocking dynamics", + "Neural sequence", + "Smart aviary", + "Songbirds" ], "mechanism": [ - "R61" + "R34" ], "name": [ - "R61MH142354" + "R34DA059507" ], "nih_link": [ - "https://reporter.nih.gov/project-details/1R61MH142354-01" + "https://reporter.nih.gov/project-details/5R34DA059507-02" ], "onboarding_status": [ "not_started" ], "reporter_project_num": [ - "1R61MH142354-01" + "5R34DA059507-02" ], "studies_human": [ - "true" + "false" ], "title": [ - "Multimodal AI-enabled synchronized neural, physiological, and behavioral recordings in humans during unstructured behavior to study dynamic task control" + "Development of a \"smart aviary\" to probe neural dynamics of complex social behaviors in a gregarious songbird" ] }, "out": [ { - "predicate": "part_of_org", - "target": "https://brain-bbqs.org/id/1424d10f-795c-47e5-a6d7-d6705fad611a" + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/77f3b242-4db9-4080-843c-d868a6d4f465" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e80e0495-82ff-4d51-995f-36e9349b40fb" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" } ], "in": [ { "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/bc9cb644-1dc5-4caf-ae76-da464cb8e2dc" + "source": "https://brain-bbqs.org/id/role/8f554f84-7a48-4b4a-8032-cbab841613fd" }, { "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/182058c5-770d-4ac3-984a-ea1f4d8d48f1" + "source": "https://brain-bbqs.org/id/role/b6d6fbfc-f005-41e9-8e22-6651720030f6" }, { "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/2c2dc99f-9c5e-43ad-8c5a-7012d2feedba" + "source": "https://brain-bbqs.org/id/role/2de0b139-4980-4479-9362-e6d68c33d1c8" }, { "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/a2f1ea9f-aab3-4407-b7d3-4570537c2678" + "source": "https://brain-bbqs.org/id/role/db582fe3-ef66-4a67-aca9-9daec764cd4c" } ], "dangling": [], - "degree": 5, + "degree": 8, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/1e2423ff-965b-4485-8557-797c1e1dee38", + "id": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7", "class": "Project", - "label": "U01DA063534 · Toward comprehensive models of naturalistic cooperation and competition in primates", + "label": "R34DA059509 · Behavioral quantification through active learning and multidimensional physiological monitoring", "facts": { "abstract": [ - "Project Summary\nThe flexible ability to work together for mutual benefits while competing against others for limited resources is a\nhallmark of advanced social cognition. Cooperative and competitive interactions are highly dynamic and\ncomplex. However, studying the precise behavioral mechanisms of these interactions has been challenging.\nThis is partly due to the fact that the standard animal models in lab studies do not reliably cooperate. Moreover,\ntypical studies do not include multidimensional behavioral measurements that are essential to understand such\ncomplex interactions. Therefore, there is a need to investigate complex social interactions in a species whose\nsocial structure strongly depends on both cooperation and competition, while tracking multiple action-based and\ninternal state-related variables to obtain a comprehensive understanding of social behavior. The marmoset is an\nexcellent species for studying complex social interactions grounded in context-dependent cooperative and\ncompetitive tendencies within their natural ethology. The first major goal of this proposal is to simultaneously and\ncontinuously collect multidimensional biobehavioral measurements, both action-based and internal state-based,\nduring naturalistic cooperative and competitive interactions between freely moving marmosets. We aim to\nunderstand the functional and directionally causal dependencies of these biobehavioral variables in cooperative\nand competitive behaviors. The second major goal is to build comprehensive and empirically testable generative\nmodels of primate social interaction and to validate our understanding iteratively between the models and the\nexperiments. We will use multiple modeling approaches to exploit their strengths: multi-agent reinforcement\nlearning with recurrent neural networks will be used to learn complex patterns for prediction, and the structure\nand inputs to these models will be informed by dynamic Bayesian networks to increase the interpretability of the\nmodels. We will use an embodied agent-based framework, with the recurrent neural networks driving\nmusculoskeletal models of marmosets, to better model cooperative and competitive interactions of nonhuman\nprimates. With the comprehensive biobehavioral data and the musculoskeletal model, we will build generalizable\nmodels of primate social interaction via a multi-level constraints-based framework. Finally, we will validate the\ngenerative models of primate social interaction by inducing multiple types of in silico environmental and task\nmanipulations that are designed to predictably alter social strategies and carrying out those experiments in vivo\nthat significantly alter the resulting social strategy. Overall, we aim to provide the most comprehensive\nunderstanding of primate social interactions to date, along with novel generative models of such behavior." + "Project Summary/Abstract\nNaturalistic contexts provide the opportunity to study the brain and behavior in response to the ethological\nproblems an animal is evolutionarily designed to solve. We seek to expand the capabilities of our current\nbehavioral segmentation approaches to provide a more precise and comprehensive account of behavior. By\nincorporating recent innovations in machine learning, segmentation approaches that can account for behavioral\ndynamics at multiple timescales, and increased breadth in the sampling modalities used to classify behaviors,\nwe will create a toolkit that our team and others can make use of to quantify complex, spontaneous behaviors.\nWe will implement an analysis pipeline to capture and make use of patterns of mouse body position,\nvocalizations, and arousal states. We also aim to capitalize on recent insights into the role of the gut-brain axis\nin shaping behavior. After validating our acquisition and analytical approaches, we will monitor these outputs in\nresponse to controlled, parametric environmental manipulations in two distinct, ethologically-relevant contexts:\nintruder response to resident urine signals and limited access to water. The exploratory data collected in these\nexperiments will be vital to validating our algorithmic advances and for piloting future grant proposals.\n The foundation of this work is a diverse team approach. Our team, comprised of experts in social behavior\nethology, microbiota research information theory, and data-driven computational modeling, will take an end-to\nend approach in executing this proposal. By starting with experimental design informed by all parties, we will\nensure that the resulting pipeline possesses sufficient structure and richness for meaningful analysis. the team\nwill help guide long-term research avenues that are both ethologically appropriate and computationally rigorous.\nLastly, we recognize that open access will greatly accelerate the validation and adoption of these technologies,\na stated aim of this RFA. Dissemination and access to our deliverables will benefit substantially from ongoing\nrelationships with the Pittsburgh Supercomputing Center and OpenBehavior.\n The partnered hardware and software advances of Aim 1a and 1b represent the overarching goal of this\nproposal, an advanced and comprehensive behavior segmentation platform. Aim 2 will interrogate temporally-\ndynamic urine protein signals and Aim 3 will study how progressively increasing thirst induced through water-\nrestriction affect neurobehavioral measures. These contexts will be used to benchmark the broad applicability of\nAim 1 – as well as to explore the potential to address targeted research questions within these frameworks." ], "award_amount": [ - "4888497" + "331928" ], "description": [ - "Toward comprehensive models of naturalistic cooperation and competition in primates" + "Behavioral quantification through active learning and multidimensional physiological monitoring" ], "external_url": [ - "https://reporter.nih.gov/project-details/1U01DA063534-01" + "https://reporter.nih.gov/project-details/5R34DA059509-02" ], "fiscal_year": [ "2025" ], "grant_number": [ - "U01DA063534" + "R34DA059509" ], "keywords": [ - "Competition", - "Cooperation", - "Embodied framework", - "Marmosets", - "Recurrent Neural Networks" + "Active learning", + "Adaptive behavior", + "Physiological monitoring", + "State-dependent" ], "mechanism": [ - "U01" + "R34" ], "name": [ - "U01DA063534" + "R34DA059509" ], "nih_link": [ - "https://reporter.nih.gov/project-details/1U01DA063534-01" + "https://reporter.nih.gov/project-details/5R34DA059509-02" ], "onboarding_status": [ "not_started" ], "reporter_project_num": [ - "1U01DA063534-01" + "5R34DA059509-02" ], "studies_human": [ "false" ], - "studies_species_name": [ - "Marmosets" - ], "title": [ - "Toward comprehensive models of naturalistic cooperation and competition in primates" + "Behavioral quantification through active learning and multidimensional physiological monitoring" ] }, "out": [ { "predicate": "produced", - "target": "https://brain-bbqs.org/id/31b0954a-08ab-46b1-a4e3-39a951d09e23" + "target": "https://brain-bbqs.org/id/205009f7-ea15-4e13-9b73-292de432b467" }, { - "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/bef479f9-d7a4-472b-8ff7-eb0b098beb7c" - } - ], - "in": [ + "predicate": "produced", + "target": "https://brain-bbqs.org/id/3575b5d6-de13-43e9-9391-c5dc106f4dc3" + }, { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/baae3ddb-11fc-48ce-a5f1-23a481b233da" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/4cbadc61-5660-48d8-9b16-7a8749f0defe" }, { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/c3efc4fa-34d8-4630-93b5-7dd34f4e03cd" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/691a3644-7a61-4b35-9aa2-9753a810792b" }, { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/b87d800c-a0aa-4ea4-aa2e-4fba4fbf8480" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/91a308e7-a52f-4a5e-bce6-699f43554234" }, { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/58923333-d8e5-4e54-a86d-c229e523fec8" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/93e8de08-1a43-4cbd-b120-7b9306a4a44b" }, { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/82015065-d290-4efc-982b-75d67daa4d00" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/9b5abbf9-7fe8-489b-9e27-fd2c4f7e5990" }, { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/714db00c-3814-4ee2-878e-332e1894bc11" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/bcf4ee35-21a5-473e-a2f2-75fa77147072" }, { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/4d3e76c2-2bbb-43b6-9950-982b6ac296cd" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/c34d88e6-5348-4ef1-87ac-3b5d90417a1f" }, { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/cee6c154-1e7f-4a7a-afa7-5117b7f7e384" - } - ], + "predicate": "produced", + "target": "https://brain-bbqs.org/id/c352d902-bd16-447b-b0ca-4b23a59655f9" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/d59fccae-d62c-44f8-9b6d-bf9ab2721553" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/e0e97a3f-d239-4739-a9d8-6a2af1c6a838" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/eb63ab45-d094-4b5f-99a8-3fe0cb8529eb" + }, + { + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/9f227f88-53ba-4c7c-91e7-334641e4b759" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/006caa68-8b24-474f-867f-82a6199a84b1" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e80e0495-82ff-4d51-995f-36e9349b40fb" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/f328ad53-2dd2-490f-adf1-40e9cd85b5bd" + } + ], + "in": [ + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/2cf61a9f-a799-4586-94fc-a71bc80104d6" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/6e99e32c-bc60-4da2-80ac-d6438cc1d6c6" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/ad57ca2b-08ac-42a0-991e-61feaf2c5e39" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/b6d62f54-1ff5-4355-8623-69dbe88aa41e" + } + ], "dangling": [], - "degree": 10, + "degree": 21, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/bf3493c0-de28-4731-9baf-c976ccc7c484", + "id": "https://brain-bbqs.org/id/e5bb6e4f-d3cf-44d4-ac1a-59f76724c0d2", "class": "Project", - "label": "U01DA063565 · Neurobehavioral Mechanisms of Social Behavior and Familial Structure", + "label": "R34DA059510 · A modeling framework and arena for measuring contextual influences of behavior", "facts": { "abstract": [ - "Project Summary\nThe family is the canonical basis of social structure for mammalian species. Families help ensure that offspring\nsurvive, learn pivotal skills, and thrive. Adults initially find mates and have behavioral adaptations to ensure the\nwelfare of the mother and prepare for postnatal care. After parturition, offspring require intense caregiving by\none or more adults for nourishment, warmth, and protection over varying periods of postnatal development. This\ncommonly requires a lactating mother until infants transition to other food sources. Despite millennia of neuro-\nbehavioral adaptations, infant and adult mortality can be shockingly high, even in the seemingly ideal conditions\nof lab vivaria. In more natural environments, families must contend with other challenges: infection, weather,\npredators, and conspecific competition for scarce resources. The dynamic and unpredictable nature of such\nstressors means that flexible strategies are required for success and survival. This requires socially- or\nenvironmentally-induced neuroplasticity and complex decision-making in the face of life-or-death stakes.\n Here we propose a collaboration between behavioral neuroscientists, a theorist, and an engineer to\ndevelop and validate a new integrated system for life-long and high-resolution monitoring of mouse colony life.\nTechnological and computational advances over the last decade, in part pioneered by our groups, now enable\nstudies of neural circuits for social and parental behavior in complex environments in ways not formerly feasible\nor even possible. There have been major improvements in wireless recording, cell- and circuit-specific methods\nfor measuring and manipulating brain activity and behavior, algorithms for neural data analysis, methods for\nquantifying multi-animal behavioral interactions, and capacity to store and share large data sets. This now\nprovides an opportunity to build a theoretical and quantitative framework for understanding mouse social\nbehavior and family life, with models constrained by continuous video synchronized with neural recordings.\n Our main hypothesis is that the duties and challenges of parenting define many aspects of mouse adult\nsocial behavior. Specifically, we predict that the need to provide safety and support to offspring leads to\nsystematic engagement in territorialism, nest/burrow construction, foraging, mating, and then recruitment of co-\nparents initiated by the dam. In Aim 1, we will quantify behaviors in a new statistical framework of one or two\ncolonies of 5 mice each with a litter of pups, in 3-D engineered burrows with food and water above-ground, using\nmachine learning methods and a large data center provided by NYU. In Aim 2, we will validate and optimize a\nnew wireless high-frequency single-cell imaging system to reveal the activity of molecularly defined cell types as\nanimals engage in cooperative and competitive foraging and childcare, with a focus on the hypothalamus. In Aim\n3, we track individuals over time, perturbing specific hypothalamic cell types and updating our model to reflect\nindividual brain states and hormone systems on survival strategies." + "PROJECT SUMMARY\nSocial behaviors are essential for survival and reproduction. They also evolve quite rapidly and can\nvary even among closely related species. Traditionally, social behaviors are very difficult to study\nbecause of the complexity of their input, requiring conspecifics to trigger aggressive, cooperative,\nparental, or reproductive behaviors. Additionally, contextual data is important, such as hierarchical\nstatus and environmental factors can also play a role. T his grant will propose to create a\nbehavioral arena capable of mimicking natural environments that are required for social reproductive\nbehaviors, including interactions between a large number of conspecifics, environmental factors\nsuch as male displays, and contextual data such as hierarchical status between various males. Tools\nwill be created to track animals in this arena and build a computational frame work to measure\nand compare social behavioral dynamics. This work will utilize Lake Malawi cichlids, a powerful\nevolutionary model for identification of genes and neural circuit changes associated with differences\nin behavior. This project will generate new tools and datasets for modeling social behaviors, paving the\nway for a large-scale R01." ], "award_amount": [ - "1240576" + "321976" ], "description": [ - "NIH Grant 1U01DA063565" + "A modeling framework and arena for measuring contextual influences of behavior" + ], + "external_url": [ + "https://reporter.nih.gov/project-details/5R34DA059510-02" ], "fiscal_year": [ - "2026" + "2025" ], "grant_number": [ - "U01DA063565" + "R34DA059510" ], "keywords": [ - "childcare", - "cooperative behavior", - "family structure", - "foraging", - "hypothalamus", - "neuroplasticity", - "parental behavior", - "social behavior", - "territorialism" + "Computer vision", + "Conspecifics", + "Hierarchical status", + "Social reproduction" ], "mechanism": [ - "U01" + "R34" ], "name": [ - "U01DA063565" + "R34DA059510" ], "nih_link": [ - "https://reporter.nih.gov/project-details/1U01DA063565-01" + "https://reporter.nih.gov/project-details/5R34DA059510-02" ], "onboarding_status": [ "not_started" ], "reporter_project_num": [ - "1U01DA063565-01" + "5R34DA059510-02" ], "studies_human": [ "false" ], - "studies_species_name": [ - "Mus musculus" - ], "title": [ - "Neurobehavioral Mechanisms of Social Behavior and Familial Structure" + "A modeling framework and arena for measuring contextual influences of behavior" ] }, "out": [ + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/154b96da-c04a-442c-868f-1586b692dc42" + }, { "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/9f227f88-53ba-4c7c-91e7-334641e4b759" + "target": "https://brain-bbqs.org/id/7b2f0bde-f010-4315-b856-c217e8ca7788" } ], "in": [ { "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/182007aa-956e-44c7-92ff-39e22486c0a1" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/4fe6e211-9d96-4f8b-8753-c5a002e13b72" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/a8d46449-f002-41d2-8fad-ee7cd5126178" + "source": "https://brain-bbqs.org/id/role/b8a0aee0-0fb1-4ede-9846-a717a2b63d47" }, { "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/99b4e8a5-97d9-4392-9cfd-da2d0cc46470" + "source": "https://brain-bbqs.org/id/role/0bfdefd7-14a0-48aa-93c2-9f80f19e8e72" } ], "dangling": [], - "degree": 5, + "degree": 4, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/a98fe953-d2ad-4770-8c8c-1759f8500c4a", + "id": "https://brain-bbqs.org/id/1e1fc06b-fe5c-4ec2-9f64-474f98ae31e8", "class": "Project", - "label": "U01DA063581 · Computational Analyses of Family Auditory Communication: Linking Behavior, Vocalization, and Neural Dynamics", + "label": "R34DA059512 · High-throughput, high-resolution 3D measurement of ethologically relevant rodent behavior in a dynamic environment", "facts": { "abstract": [ - "PROJECT SUMMARY\nVocalizations and other bioacoustic signals convey an individual’s identity, location, and behavioral state and\nthese sounds are used to guide social-acoustic interactions. While much stellar research has been done on the\nneural basis of vocal communication, it has largely focused on brief, stereotyped interactions between unfamiliar\nadults in featureless test cages. Here, we propose to study auditory communication within a cohesive social unit,\nthe family, of a highly social species, Mongolian gerbils, in a stable, naturalistic setting. By integrating audio,\nvideo, and neural data, we aim to uncover the behavioral meaning of distinctive vocal bouts and test how cortical\nmechanisms support the use of these vocalizations to make social decisions. In Aim 1, we will create and\ndisseminate general-purpose machine learning tools for studying auditory communication within family groups\nliving in undisturbed naturalistic environments. Aim 1A will establish multi-animal 3D body pose tracking in\ncomplex spacious environments. Aim 1B will develop deep learning methods to noninvasively localize and\nattribute vocalizations to specific family members, focusing on the multi-second vocal bouts that dominate\nauditory communication. Aim 1C will integrate body pose, bioacoustic signals, and neural data with a 3D\nenvironment model using Gaussian splatting, enabling us to estimate how auditory signals are combined with\nline-of-sight information. In Aim 1D, we collaborate with a team at Princeton to extend and validate sound\nattribution methods in a different species, environment, and behavioral paradigm (mouse courtship) to establish\ngeneral-purpose and open-source tools for the field. Aim 2 develops a machine learning approach to extract low-\ndimensional behavioral descriptors from this large data set that are used as variables in our predictive models.\nIn Aim 2A, we extract recurring bouts of acoustically driven behavior using a mixture of expert-supervised and\ndata-driven, unsupervised approaches to annotate continuous streams of natural behavior. Computational\ninnovations are proposed, and we employ playback and hearing attenuation manipulations to test causal\nrelationships between vocal bouts and behavior. In Aim 2B, we use these latent features and contextual variables\nto build linear Bayesian models that predict future actions, permitting us to ask how individual behavioral traits\nare explained by social (e.g., kinship, sex, age) and environmental factors. Aim 2C will characterize how auditory\ncortex activity represents vocal bouts, social and environmental factors, and subsequent behavioral decisions.\nAim 3 will test the cortical network mechanisms that give rise to social and contextual modulation during auditory\ncommunication. In Aim 3A we will silence auditory or frontal cortices, as well as projections between the two,\nand measure how these perturbations influence behavior. In Aim 3B, we will record wirelessly from frontal cortex\nduring sound-driven social interactions." + "Summary\nThe aim of this proposal is to develop an innovative new system, including hardware assemblies and machine\nlearning algorithms, for continuous, high-resolution 3D quantification of behavioral and eliciting stimulus\ndynamics in a natural mouse prey capture paradigm. The system will satisfy a critical unmet need for an easily\nadoptable, modern behavioral measurement technology that extends well beyond current offerings, which are\ndifficult to set up and limited largely to measuring spontaneous animal movement in impoverished, static\nenvironments. Our system consists of a 3D convolutional neural network processing multi-perspective video\nrecordings to provide detailed measurements of both predator (mouse) and prey (cricket) spatiotemporal\nmovement patterns within an enclosed, compact apparatus permitting precise control over the visual\nenvironment. To reduce implementation complexity and enhance usability in other labs, the system will use only\na single commercial video camera and a set of low-cost mirrors to provide the multiple perspectives required for\n3D behavior tracking. By using only a single camera, we also reduce the instrument’s physical footprint, thus\nfacilitating high-throughput studies across multiple setups. Furthermore, our 3D tracking algorithm will be built to\nsupport out-of-the-box generalization to cloned setups, meaning other labs can immediately start doing science\nwith the instrument without laborious data labeling and training steps. As part of our system, we will also develop\nnew methods for analyzing the rich 3D mouse and cricket data to isolate key kinematic and action variables\nalong with comprehensive characterization of stimulus-behavior relationships. We will then investigate how these\nnew measurements can be used to better understand retinitis pigmentosa and Parkinson’s disease. Preliminary\nexperiments have been quite successful and illustrate the promise and power of our approach to collect large\namounts of quantitative behavior data and identify new phenotypes of motor disorders. As our vision is to make\nas large of an impact as possible, our system and datasets will be shared openly with community to catalyze a\nwide range of new research into brain function and treatments for neurological disease." ], "award_amount": [ - "854818" + "350440" ], "description": [ - "NIH Grant 1U01DA063581" + "High-throughput, high-resolution 3D measurement of ethologically relevant rodent behavior in a dynamic environment" + ], + "external_url": [ + "https://reporter.nih.gov/project-details/5R34DA059512-02" ], "fiscal_year": [ - "2026" + "2025" ], "grant_number": [ - "U01DA063581" + "R34DA059512" ], "keywords": [ - "3D body pose tracking", - "auditory cortex", - "bioacoustic signals", - "family groups", - "frontal cortex", - "machine learning", - "naturalistic environment", - "social decision making", - "sound localization", - "vocal communication" + "3D measurement", + "Dynamic environment", + "High-throughput", + "Kinematics", + "Rodent" ], "mechanism": [ - "U01" + "R34" ], "name": [ - "U01DA063581" + "R34DA059512" ], "nih_link": [ - "https://reporter.nih.gov/project-details/1U01DA063581-01" + "https://reporter.nih.gov/project-details/5R34DA059512-02" ], "onboarding_status": [ "not_started" ], "reporter_project_num": [ - "1U01DA063581-01" + "5R34DA059512-02" ], "studies_human": [ "false" ], - "studies_species_name": [ - "Meriones unguiculatus" - ], "title": [ - "Computational Analyses of Family Auditory Communication: Linking Behavior, Vocalization, and Neural Dynamics" + "High-throughput, high-resolution 3D measurement of ethologically relevant rodent behavior in a dynamic environment" ] }, "out": [ + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/4b31df5d-6d5c-49d5-9abd-ecc1cbafe965" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/750a9501-b64d-4947-91e5-b8ed542420a5" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/e96847f4-f5a5-4d3c-a358-be3fcc27f390" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/fa14bcd8-d960-44b1-874c-49e040b64e61" + }, { "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/7f92ea75-530c-40bf-83a4-3e1eba4d4179" + "target": "https://brain-bbqs.org/id/9f227f88-53ba-4c7c-91e7-334641e4b759" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" } ], "in": [ { "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/1de9735a-b2fe-4554-85a2-01fb284ebd01" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/bf0e6573-c228-4923-badd-e3667105e287" + "source": "https://brain-bbqs.org/id/role/7ef4da01-8107-42b2-bc56-e4fe58d1c6a2" }, { "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/63311822-3561-4d3f-929d-42da23209e90" + "source": "https://brain-bbqs.org/id/role/df63e239-d918-4780-9eaa-ed34a5748f01" }, { "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/c325fdf0-4dc3-43aa-a2de-5a3607476ac5" + "source": "https://brain-bbqs.org/id/role/a31e280c-89d7-4d68-b3a3-4ecc10429cee" }, { "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/14faecbb-11c6-469d-aea3-8a57dba85867" + "source": "https://brain-bbqs.org/id/role/4a0c2ae2-92fd-447a-a95e-419db4773d8f" } ], "dangling": [], - "degree": 6, + "degree": 11, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/8facb614-80ac-4873-8619-b37c2ad0ed62", + "id": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18", "class": "Project", - "label": "U01MH143789 · A smart lens platform for real-world event capture and synchronized deep brain dynamics", + "label": "R34DA059513 · Computational attribution and fusion of vocalizations, social behavior, and neural recordings in a naturalistic environment", "facts": { "abstract": [ - "Project Summary/Abstract\nPost-traumatic stress disorder (PTSD) is marked by emotional dysregulation, hyperarousal, and intrusive\nautobiographical memories, yet current tools lack the ability to objectively monitor these symptoms in real time,\nespecially outside clinical settings. This project will develop a self-powered smart contact lens (SCL) platform\nthat integrates high-speed pupillometry with battery-free biosensing of tear film neurochemicals including cortisol,\nserotonin, and neuropeptide Y to assess emotional and autonomic states during naturalistic experiences. The\nlens will communicate wirelessly with custom smart glasses that power the system, record synchronized audio\nand video, and trigger intracranial EEG (iEEG) recordings via a wearable electromagnet cap. We will deploy the\nsystem in ambulatory participants with existing iEEG recording devices implanted in the amygdala and\nhippocampus, both in lab and at home, to characterize the correspondence between peripheral biosignals and\nneural activity during emotionally salient experiences. By enabling mobile, multimodal tracking of emotional\narousal and stress in real-world contexts, this platform offers transformative potential for understanding and\ntreating PTSD and related affective disorders." + "PROJECT SUMMARY\nSocial vocalizations and movement-generated sounds often provide pivotal knowledge about an animal’s\nidentity, location, or state, yet most studies of natural behavior fail to integrate acoustic information with\nsimultaneous recordings of high-dimensional neural activity and behavioral dynamics. This proposal will develop\nnovel experimental and computational methods to attribute vocal and non-vocal sounds to individuals in a\nnaturalistic, acoustically complex, multi-animal environment. By integrating this rich acoustic information with\nsimultaneous video and wireless neural recordings, we seek to predict auditory cortical responses to auditory\ncues, as a function of social context and individual identity within the family. Aim 1 will develop new tools with\nwhich to attribute vocal and non-vocal sounds to individual animals in a multi-animal setting (i.e., the “who said\nwhat” problem). In Aim 1A, we will collect, curate, and publicly release a range of benchmark datasets containing\nsimultaneous camera and microphone array recordings of multi-animal interactions with ground truth labels of\nsound sources. We will use these benchmarks to validate new models for sound localization. In Aim 1B, we will\ndevelop and release deep learning models that localize sounds with calibrated confidence intervals, using\nsynchronized video measurements to enhance predictions. Aim 2 will use these tools to identify archetypal,\nacoustically-driven social behaviors. We will establish a new experimental paradigm that permits months-long\nmonitoring of rodent social behavior in a large, naturalistic environment with simultaneous camera and\nmicrophone array recordings. Using this data, we will develop novel data analytic approaches that leverage\nsynchronized audio and video data streams to identify social interaction sequences. A key goal is to assess\nindividual differences in social behavior across families. Aim 3 is a proof-of-concept experiment in which we\ndetermine how acoustically-driven social behaviors (established in Aim 2) predict auditory cortex responses to\nboth vocal or movement-generated sounds. To accomplish this, we will make continuous wireless\nelectrophysiological recordings from the auditory cortex of adolescent and adult gerbils within their naturalistic\nfamily environment. We will build regression models to infer our ability to predict neural responses from\nauditory/behavioral covariates (encoding models)." ], "award_amount": [ - "1368212" + "361120" ], "description": [ - "Project Summary/Abstract\nPost-traumatic stress disorder (PTSD) is marked by emotional dysregulation, hyperarousal, and intrusive\nautobiographical memories, yet current tools lack the ability to objectively monitor these symptoms in real time,\nespecially outside clinical settings. This project will develop a self-powered smart contact lens (SCL) platform\nthat integrates high-speed pupillometry with battery-free biosensing of tear film neurochemicals including cortisol,\nserotonin, and neuropeptide Y to assess emotional and autonomic states during naturalistic experiences. The\nlens will communicate wirelessly with custom smart glasses that power the system, record synchronized audio\nand video, and trigger intracranial EEG (iEEG) recordings via a wearable electromagnet cap. We will deploy the\nsystem in ambulatory participants with existing iEEG recording devices implanted in the amygdala and\nhippocampus, both in lab and at home, to characterize the correspondence between peripheral biosignals and\nneural activity during emotionally salient experiences. By enabling mobile, multimodal tracking of emotional\narousal and stress in real-world contexts, this platform offers transformative potential for understanding and\ntreating PTSD and related affective disorders." + "Computational attribution and fusion of vocalizations, social behavior, and neural recordings in a naturalistic environment" + ], + "external_url": [ + "https://reporter.nih.gov/project-details/5R34DA059513-02" ], "fiscal_year": [ - "2026" + "2025" ], "grant_number": [ - "U01MH143789" + "R34DA059513" + ], + "keywords": [ + "Cocktail party problem", + "Multimodal fusion", + "Source separation", + "Vocalizations" ], "mechanism": [ - "U01" + "R34" ], "name": [ - "U01MH143789" + "R34DA059513" + ], + "nih_link": [ + "https://reporter.nih.gov/project-details/5R34DA059513-02" ], "onboarding_status": [ "not_started" ], "reporter_project_num": [ - "1U01MH143789-01" + "5R34DA059513-02" ], "studies_human": [ - "true" + "false" ], "title": [ - "A smart lens platform for real-world event capture and synchronized deep brain dynamics" + "Computational attribution and fusion of vocalizations, social behavior, and neural recordings in a naturalistic environment" ] }, "out": [ { - "predicate": "part_of_org", - "target": "https://brain-bbqs.org/id/93fa0810-51f4-4e71-badf-e5e8d3e40dc3" - } - ], - "in": [ + "predicate": "produced", + "target": "https://brain-bbqs.org/id/0e032f88-c50f-4527-9c40-68e9b782173d" + }, { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/c381ea7d-4332-4bf6-8491-474a2f6b6b41" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/2370e3b0-8941-46f8-99b0-a30d467e764e" }, { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/eedb7237-95d4-4633-8431-0a94da8db187" - } - ], - "dangling": [], - "degree": 3, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/8095d361-d12f-4015-86e7-67fced46f2e9", - "class": "Project", - "label": "U01MH144347 · SMART-DBS: A Symptom-Manipulating, Adaptive and Responsive Therapy for continuous brain-behavioral recording and stimulation", - "facts": { - "abstract": [ - "Project Summary\nObsessive compulsive disorder (OCD) affects approximately 2.2 million adults worldwide, with more than\n200,000 cases and a socioeconomic impact exceeding $8 billion in the United States every year. Provisional\nFDA approval treats OCD by delivering deep brain stimulation (DBS). We propose that real opportunity lies in a\nvastly underused resource: the chronically implanted brain electrodes. To date, however, ambulatory intracranial\nelectroencephalographic (iEEG) recordings from DBS leads have only been available under very specific\nconditions and without the benefit of synchronized disease-relevant behavioral monitoring to provide necessary\ncontext. The goal of this 5-year milestone-driven clinical trial proposal is to unlock the potential of DBS leads for\ncontinuous sensing of brain activity, enabling the real-time tracking of internal states linked to the full spectrum\nof motor and non-motor symptoms in OCD. Today, long-term continuous brain sensing is not feasible due to\nlimitations in battery life, power delivery, and data transmission bandwidth in existing DBS systems. We aim to\novercome these barriers by integrating new telemetry and wireless power solutions into an innovative wearable\nplatform, SMART-DBS, that supports chronic streaming of neural signals along with physiological signals based\non muscle activity, heart rate variability and accelerometry to provide additional symptom sensing. We will also\ncollect validated symptom measures via patient-reported outcomes (e.g., digital scales), structured clinical\ninstruments, and app-based logging. By aligning chronic brain recordings with subjective and objective\nmeasures of clinical symptoms in OCD, we will link brain states to clinical outcomes. This project develops\ninnovative technologies to directly address the major challenges in brain-behavioral quantification and\nsynchronization in order to enable a follow-up trial to treat OCD using adaptive, responsive DBS. Progress will\nalso indirectly advance a range of next-generation clinical studies of the brain mechanisms of human behavior\nsuch as in Parkinsons, epilepsy, depression and other applications of DBS in ambulatory populations." - ], - "award_amount": [ - "1653363" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/38fab5c5-6eb6-4ba1-980a-78e5c2bf2312" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/44b1ac85-feb2-4792-9f46-109cf7876f4a" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/4921bfdf-7432-48ac-911d-0cb825184ef1" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/a79d14cd-ae0e-4bce-b09f-8d16e6e15f7f" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/b75b460e-560d-48d4-af7d-1152d34c1d79" + }, + { + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/7f92ea75-530c-40bf-83a4-3e1eba4d4179" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/006caa68-8b24-474f-867f-82a6199a84b1" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/851882bb-3321-45ed-af75-6ae08836c1fc" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e2c21bfc-1707-4f6d-aa18-c6db03f53c2d" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e80e0495-82ff-4d51-995f-36e9349b40fb" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/f328ad53-2dd2-490f-adf1-40e9cd85b5bd" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" + } + ], + "in": [ + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/f0b8e0cd-ac28-4f72-8410-be9b81689d08" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/95b0b77d-e396-4d0b-b80e-4b80592a2db6" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/62fcc478-1ee4-43f5-a5b0-ae02c6955cbf" + } + ], + "dangling": [], + "degree": 18, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/3846417f-c783-484b-9cfc-fbbf8f83fdf5", + "class": "Project", + "label": "R34DA059514 · Towards High-Resolution Neuro-Behavioral Quantification of Sheep in the Field to Study Complex Social Behaviors", + "facts": { + "abstract": [ + "Abstract\nSocial animals, including humans, engage in complex collective behaviors in the field. While\nthere are simple models of collective decision making and movement that are amenable to\nstudy in traditional laboratory environments, they inevitably fail to capture the full complexity\nof natural behaviors as they occur in the field. Moreover, standard mammalian laboratory\nspecies either exhibit only simple social behaviors (e.g., mice) or are too challenging to house\nin large groups (e.g., primates). Here, we will leverage decades of extensive experience\nstudying sheep in their normal pasture settings and during interactions between ewes and\ntheir lambs. We propose to develop a paradigm for acquiring high resolution (in space and\ntime) measurements of individual herd members, including head-mounted devices to sense\ntheir visual sensorium. We will test these devices in existing herds maintained for agricultural\nstudy, while also developing a robust paradigm for conducting neural recording experiments.\nIf successful this work will lay the foundation for future study of the neural circuits underlying\ncomplex collective behaviors in a large-brained highly social animal model." + ], + "award_amount": [ + "320892" ], "description": [ - "Project Summary\nObsessive compulsive disorder (OCD) affects approximately 2.2 million adults worldwide, with more than\n200,000 cases and a socioeconomic impact exceeding $8 billion in the United States every year. Provisional\nFDA approval treats OCD by delivering deep brain stimulation (DBS). We propose that real opportunity lies in a\nvastly underused resource: the chronically implanted brain electrodes. To date, however, ambulatory intracranial\nelectroencephalographic (iEEG) recordings from DBS" + "Towards High-Resolution Neuro-Behavioral Quantification of Sheep in the Field to Study Complex Social Behaviors" + ], + "external_url": [ + "https://reporter.nih.gov/project-details/5R34DA059514-02" ], "fiscal_year": [ - "2026" + "2025" ], "grant_number": [ - "U01MH144347" + "R34DA059514" + ], + "keywords": [ + "Collective behavior", + "Head-mounted sensors", + "Herd navigation", + "Sheep" ], "mechanism": [ - "U01" + "R34" ], "name": [ - "U01MH144347" + "R34DA059514" ], "nih_link": [ - "https://reporter.nih.gov/project-details/1U01MH144347-01" + "https://reporter.nih.gov/project-details/5R34DA059514-02" ], "onboarding_status": [ "not_started" ], "reporter_project_num": [ - "1U01MH144347-01" + "5R34DA059514-02" ], "studies_human": [ - "true" - ], - "studies_species_name": [ - "Homo sapiens" + "false" ], "title": [ - "SMART-DBS: A Symptom-Manipulating, Adaptive and Responsive Therapy for continuous brain-behavioral recording and stimulation" + "Towards High-Resolution Neuro-Behavioral Quantification of Sheep in the Field to Study Complex Social Behaviors" ] }, "out": [ { "predicate": "studies_species", - "target": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40" - } - ], - "in": [ - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/dbaa6f57-01e4-4168-88fa-7fa673a6cf6f" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/da20601e-5e20-41cc-a57b-63e66c143df4" + "target": "https://brain-bbqs.org/id/ec95cd91-709c-41ac-8bfb-bfdf3e2ea89c" }, { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/53e6a0e7-68a8-457d-8fa8-0763d062dcda" + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/851882bb-3321-45ed-af75-6ae08836c1fc" }, { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/9200c2fb-5bea-4d89-9115-1064c1387222" + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3" }, { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/f9acc694-4a05-45f7-b0be-24c6dd4a7637" + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e2c21bfc-1707-4f6d-aa18-c6db03f53c2d" }, { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/f2d69865-0ee2-4b99-81e8-b84658c9eb1e" - }, + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" + } + ], + "in": [ { "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/86c8c08c-3aa2-4ef9-a9a0-a7158781799b" + "source": "https://brain-bbqs.org/id/role/c33f2bff-071b-4550-9ea5-d3fd11e0ed0c" } ], "dangling": [], - "degree": 8, + "degree": 6, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152", + "id": "https://brain-bbqs.org/id/b02aaf9f-0a7e-4759-b1ba-cb100a2d4eed", "class": "Project", - "label": "U24DA064429 · BBQS AI Resource and Data Coordinating Center (BARD.CC)", + "label": "R34DA059716 · Interpersonal behavioral synchrony in virtual and in-person dyadic conversation", "facts": { "abstract": [ - "SUMMARY\nUnderstanding the complex relationship between brain activity and behavior is one of the most exciting and\nchallenging pursuits in neuroscience. The proposed BBQS AI Resource and Data Coordinating Center\n(BARD.CC) aims to facilitate innovative research in this area by managing, sharing, and harnessing the power\nof vast amounts of data and machine learning resources generated by various projects within the BBQS\nconsortium. We will focus on five interrelated aims: 1) Data Management; 2) Data Standards; 3) Machine\nLearning and Artificial Intelligence (ML/AI) Resources; 4) Data Ecosystem; and 5) Dissemination, Training, and\nCoordination. The first aim is to serve as a hub for efficient data curation, management, and sharing. We will\ncollaborate with other BBQS projects and coordinate with existing BRAIN data archives to curate and\nharmonize project data. Data management will be handled by a combination of automated data ingestion and\nhuman oversight, transitioning to a fully automated system over time. We will work with scientists and relevant\ncommunities to implement robust quality assurance and control solutions. The second aim focuses on\nestablishing data standards for novel sensors and multimodal data integration, as informed by the use of\nexisting standards and best practices from similar efforts. We will aggregate relevant standards for data and\nmetadata, data processing methods, appropriate ontologies, and common data elements, and adapt as\nneeded for evolving methodologies. The third aim involves the development and definition of ML/AI resources\nfor BBQS. We will evaluate and curate relevant ML/AI models and platforms, aggregating datasets, models,\nand other ML/AI resources from both within and outside the BBQS consortium. These resources will be made\navailable to consortium members, with each resource's origin documented and evaluated for performance and\nethical generation and use. Moreover, all models will be made available through public repositories, allowing\nfor widespread access and utilization. The fourth aim involves creating a cloud-based data ecosystem and\ncomputational platform. We will collaborate with relevant archives and computing facilities to develop a\ncomputational platform in the cloud. This platform will enable access to and processing of even very large data\nsets with commonly used pipelines and provide a wide range of users, even those with limited resources, with\ncomputational capability to analyze and visualize data, models, and model outputs. Finally, the fifth aim is\ncentered around efficient dissemination, training, and coordination of BBQS research resources. We will\ncoordinate data sharing, offer training on relevant topics like neuroinformatics, neuroethics, and ML/AI, and\nmaintain a consortium Web portal. Furthermore, center staff will coordinate consortium activities like meetings,\nworking groups, and policy and ethics discussions, ensuring smooth and effective operation. In summary,\nBARD.CC aims to catalyze the discovery of valuable insights from intricate relationships between brain activity\nand behavior, which in turn could advance neuroscience and our understanding of the human mind." + "PROJECT SUMMARY/ABSTRACT\nHuman dyadic social communication entails a rich repertoire of expression, including not only face expression\n(and gaze), but also acoustics (prosody and pauses) turn-taking, gestures and language. Communication has\nevolved in humans within a social context, beginning with the parent-infant dyad, with mirroring of facial\nexpressions and sounds. Its natural ecology is face-to-face dyadic interactions, both in-person and increasingly\nvia remote platforms for teleconferencing and telehealth. Social communication is a “complex orchestration” in\nreal time: its signals are multiple and temporally offset. It is a continuous exchange that is highly coordinated\nbetween speakers, with norms for turn-taking and alignment of face expression, gesture, semantic content and\nspeech rates. As yet, a critical gap exists in that we lack the tools to quantify and analyze temporal patterns of\nmultimodal communication behavior between two individuals in face-to-face communication, in an ecologically\nvalid setting, that have the same rigor and reproducibility as do hyperscanning approaches to record brain activity\nduring dyadic conversation. This tool must be developed to realize the true potential of second-person\nneuroscience. This planning proposal for tool development entails several key activities, beginning with the\nconvening of a diverse multidisciplinary team of experts from various fields, including ethics/regulatory,\nanthropology, cognitive neuroscience, computer science, engineering, physics, mathematics, psychiatry and\nneurology. This team will discuss ethics, diversity, paradigm development, and computational frameworks, and\nproviding iterative feedback and convening also with advocacy groups. Also, we will build two testing rooms for\nmultimodal recording of dyadic communication, to demonstrate feasibility of acquiring and synching high\ntemporal resolution data. Pilot EEG hyperscanning will be done concurrently in a subcohort. Further, given\nincreased use of teleconferencing, dyadic communication data will be collected via remote platform and\ncompared with in-person data, to determine how information may be degraded by differences in resolution and\nstreaming delays. We will also develop computational frameworks for analyses of multimodal data." ], "award_amount": [ - "1777333" + "342678" ], "description": [ - "BBQS AI Resource and Data Coordinating Center (BARD.CC)" + "Interpersonal behavioral synchrony in virtual and in-person dyadic conversation" ], "external_url": [ - "https://reporter.nih.gov/project-details/U24DA064429" + "https://reporter.nih.gov/project-details/5R34DA059716-02" ], "fiscal_year": [ - "2026" + "2025" ], "grant_number": [ - "U24DA064429" + "R34DA059716" ], "keywords": [ - "BARD.CC", - "BrainKB", - "Data Coordinating Center", - "Federated ML", - "Infrastructure" + "Dyadic conversation", + "EEG", + "Hyperscanning", + "Multimodal synchronization", + "Turn-taking" ], "mechanism": [ - "U24" + "R34" ], "name": [ - "U24DA064429" + "R34DA059716" ], "nih_link": [ - "https://reporter.nih.gov/project-details/U24DA064429" + "https://reporter.nih.gov/project-details/5R34DA059716-02" ], "onboarding_status": [ "not_started" ], "reporter_project_num": [ - "5U24DA064429-03" + "5R34DA059716-02" ], "studies_human": [ "true" ], - "study_scope": [ - "All Species" - ], "title": [ - "BBQS AI Resource and Data Coordinating Center (BARD.CC)" + "Interpersonal behavioral synchrony in virtual and in-person dyadic conversation" ] }, "out": [ { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/276aa727-0539-4f2b-9fa0-c0b86a868876" + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40" }, { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/2a2ae141-5d5c-464a-809f-1e3a19a81293" + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/006caa68-8b24-474f-867f-82a6199a84b1" }, { - "predicate": "produced", - "target": "https://brain-bbqs.org/id/59585a8a-8f7e-4f02-af19-c40c797d9ddf" + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e80e0495-82ff-4d51-995f-36e9349b40fb" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/f328ad53-2dd2-490f-adf1-40e9cd85b5bd" } ], "in": [ { "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/39fa5a3f-6869-4e43-a085-b6d94ee497fa" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/800262fc-b2dd-4041-ab94-e9cf166d50b3" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/57b86bca-ace5-49e8-8145-7c49011d8cd6" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/c6847ede-7f3e-4557-9af6-0740d2a0babc" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/3df7974f-d227-4954-a984-3d403436fa70" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/29a72f60-6de3-4c19-928c-05cd16342d6e" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/d1bb4677-b510-48ad-a89b-680830403a37" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/d530f31d-a94a-4d0d-8e40-3c41610d768a" - }, - { - "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/eed7f06b-7ec2-42e5-8307-da70b41c7482" + "source": "https://brain-bbqs.org/id/role/70324d1e-344b-402d-bac2-afd900606e16" }, { "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/c70a461e-5956-4c4f-aaba-40f11cc7b350" + "source": "https://brain-bbqs.org/id/role/3027bce5-12b7-4205-9873-9cc8efbed2c0" }, { "predicate": "on_project", - "source": "https://brain-bbqs.org/id/role/540b143e-459b-41df-98bd-9ec0b18d9bd6" + "source": "https://brain-bbqs.org/id/role/43ee45a2-22ea-4e73-9885-1efe24dc4caf" } ], "dangling": [], - "degree": 14, + "degree": 7, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/b450bf2e-e124-481f-8950-2e7b03832f17", - "class": "ProjectRole", - "label": "co-investigator on R24MH136632", + "id": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e", + "class": "Project", + "label": "R34DA059718 · Harnessing biological rhythms for a resilient social motif generator", "facts": { - "project_role": [ - "co-investigator" + "abstract": [ + "Summary\nHow does the brain enable social interactions? The study of social behavior in non-human animals has long\nrelied on coarse behavioral metrics like time spent interacting with another animal or simply the numbers of\ninteractions. Although this approach has informed major insights into neural circuits which have a role in\nsociability, we still do not know how these circuits orchestrate patterns of social behaviors, especially under\ndifferent social contexts where interactions have nuanced differences. Our long-term goal is to identify the\nneural mechanisms supporting social behavior in affiliative vs. antagonistic social contexts. To close the\nknowledge gap towards this goal, in this R34 we will build artificial intelligence (AI) tools that are capable of\nintegrating multivariate sources of behavior data to quantify spatiotemporal signatures or “motifs” of diverse\nrepertoires of social behaviors. Behavioral motifs have the potential to be captured by means of examining\nconcurrent autonomic rhythms, especially breathing and heart rate. Indeed, we have long known that changes\nin the frequency of these rhythms coincide with specific affective and behavioral contexts. However,\nspatiotemporal signatures of social behaviors have not been captured in prior studies which have considered\neither breathing or heart rate in isolation. Nor have prior studies unleashed the potential to identify novel social\nbehavioral motifs by using these autonomic rhythms in combination with video measures. The research\nobjective of this Brain Initiative proposal is to develop semi-supervised artificial intelligence methods that result\nin a hierarchical multi-timescale model of social behavioral motifs directly from video, breathing, heart rate, and\nmovement data via a head-mounted accelerometer. To accomplish this, we will use partial labels of mouse\nsocial behaviors, as well as physiologic measurements, in order to elucidate the full range of social behavior\nmotifs across affiliative vs. antagonistic contexts. In Aim 1, we will define low-dimensional social behavioral\nstates while incorporating autonomic rhythms, while in Aim 2, we will elucidate a multi-timescale hierarchical\nrepresentation of social behavior in affiliative vs. agonistic social contexts. For both aims, we will integrate\ncomputer vision techniques with high-dimensional video and physiological data from mice while varying their\nisolation levels and who they are interacting with. The end-product will be a validated toolkit enabling the\nsensitive and robust identification of behavioral motifs. The easy-to-use toolkit which we call the Social Motif\ngenerator (So-Mo) will enable future studies to probe neural circuits during complex mouse behaviors at\nunprecedented resolution." ], - "role_source": [ - "curator" - ] - }, - "out": [ - { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/8e52b630-7ecc-4336-9f31-d0b6a1c85100" - }, - { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" - } - ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/a474b99d-19ed-4d37-b39f-c22ba57b2101", - "class": "ProjectRole", - "label": "co-investigator on R61MH138966", - "facts": { - "project_role": [ - "co-investigator" + "award_amount": [ + "337875" ], - "role_source": [ - "curator" + "description": [ + "Harnessing biological rhythms for a resilient social motif generator" + ], + "external_url": [ + "https://reporter.nih.gov/project-details/5R34DA059718-02" + ], + "fiscal_year": [ + "2025" + ], + "grant_number": [ + "R34DA059718" + ], + "keywords": [ + "Autonomic", + "Behavioral segmentation", + "Biological rhythms", + "Social motifs" + ], + "mechanism": [ + "R34" + ], + "name": [ + "R34DA059718" + ], + "nih_link": [ + "https://reporter.nih.gov/project-details/5R34DA059718-02" + ], + "onboarding_status": [ + "not_started" + ], + "reporter_project_num": [ + "5R34DA059718-02" + ], + "studies_human": [ + "false" + ], + "title": [ + "Harnessing biological rhythms for a resilient social motif generator" ] }, "out": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/4543ce04-8f6e-4713-8fa7-2552664e28ae" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/03a34599-787d-42ac-83a3-e002bd419d37" }, { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/adc6c1dd-57a9-49bb-a57d-521fd1208a76" - } - ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/0a29a35d-e673-42f7-a590-23f0fe7055f7", - "class": "ProjectRole", - "label": "co_pi on R34DA059500", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "predicate": "produced", + "target": "https://brain-bbqs.org/id/6a564dd1-f227-40f8-be3c-06bbd09c430c" + }, { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/47485e5b-3455-44a3-a716-70069176b11f" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/7d69f10e-ffa5-4d44-b92b-ffb24e71b969" }, { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/9552ba2e-28e2-4237-b865-ec747251a036" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/d164ed89-3894-4cbc-a952-84e7161554d7" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/f97c2277-9e93-4712-ac91-7f5e04482ba8" + }, + { + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/9f227f88-53ba-4c7c-91e7-334641e4b759" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/851882bb-3321-45ed-af75-6ae08836c1fc" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e2c21bfc-1707-4f6d-aa18-c6db03f53c2d" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" } ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/bf82a7b1-f5dc-4ec7-8117-927452fa5027", - "class": "ProjectRole", - "label": "co_pi on R34DA059500", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "in": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/7a2ad901-f50d-40bc-a404-b4ef0c33944b" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/2248b93b-ea65-48b3-a940-f45b80c06346" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608" + "source": "https://brain-bbqs.org/id/role/692b00f5-b8e0-4344-8bd0-75def6c4b99e" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/3300103b-a7d5-4bdd-8f50-24fb3e24767a" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 14, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/fa7fab82-ca22-484b-a5aa-f775d831c4a6", - "class": "ProjectRole", - "label": "co_pi on R34DA059500", + "id": "https://brain-bbqs.org/id/2db5ee93-296a-446a-a3e6-59fd3d28c4a6", + "class": "Project", + "label": "R34DA059723 · Multimodal behavioral analysis of oromanual food-handling in freely moving animals", "facts": { - "project_role": [ - "co_pi" + "abstract": [ + "PROJECT SUMMARY\nOromanual food-handling – in which the hands and forelimbs work in a coordinated manner with the mouth and\njaw to manipulate and consume a food item – is a fundamental behavior common to many rodent species as\nwell as primates. Despite its ethological significance, oromanual food-handling has received remarkably little\nexperimental attention, reflecting the technical challenges of recording at sufficient spatiotemporal resolution a\nbehavior involving small, fast, and often visually occluded movements. We recently initiated efforts to overcome\nthese challenges, developing paradigms for analyzing food-handling in mice using high-speed close-up video\nmethods coupled with AI-based kinematic tracking. Here we propose to build on these advances through a set\nof planning activities leading to a powerful new approach for in-depth investigation of this behavior. The overall\nobjective is to develop new experimental and analytical paradigms for recording food-handling behavior with\nhigh spatiotemporal resolution in freely moving animals, with a focus on understanding how elemental sub-\nmovements are assembled into distinct goal-directed actions coordinated across multiple body parts. The\ntechnical approach includes design of a videographic recording arena incorporating a robotic camera positioning\nsystem. Electromyography from jaw-controller and forelimb muscles in freely moving mice will enable\ncharacterization of the elements of dexterous coordination involved in manipulating the food with both hands and\njaw. Intranasal detection of breathing will enable characterization of sniff-related movements during food-\nhandling, posited to represent an additional aspect of the behavior engaging the olfactory and respiratory\nsystems. Exploratory studies will extend the approach in comparative, ecological, and developmental directions.\nThe analytical approach will conceptualize the behavior in terms of the multiple components of the motor plant\nand behavioral modes and actions, including detailed ethogramming and incorporating machine learning-based\ntracking, modeling, and related computational methods. The anticipated results will constitute an innovative\nparadigm for quantitative analysis of food-handling, setting the stage for a future investigation of the neural\nmechanisms of this natural form of goal-directed dexterous behavior. Results from this research program\nfurthermore have high potential to identify common principles of natural, complex, motor behavior in mammals\nin general." ], - "role_source": [ - "reporter" + "award_amount": [ + "360000" + ], + "description": [ + "Multimodal behavioral analysis of oromanual food-handling in freely moving animals" + ], + "external_url": [ + "https://reporter.nih.gov/project-details/5R34DA059723-02" + ], + "fiscal_year": [ + "2025" + ], + "grant_number": [ + "R34DA059723" + ], + "keywords": [ + "Food-handling", + "Foraging", + "Kinematics", + "Oromanual", + "Sensorimotor" + ], + "mechanism": [ + "R34" + ], + "name": [ + "R34DA059723" + ], + "nih_link": [ + "https://reporter.nih.gov/project-details/5R34DA059723-02" + ], + "onboarding_status": [ + "not_started" + ], + "reporter_project_num": [ + "5R34DA059723-02" + ], + "studies_human": [ + "false" + ], + "title": [ + "Multimodal behavioral analysis of oromanual food-handling in freely moving animals" ] }, "out": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/1a8f0486-7381-4156-824c-b2e9ff0dc817" + "predicate": "funded_datasets", + "target": "https://brain-bbqs.org/id/99f38f2a-e4e4-49f7-bd61-5d3ba17134cc" }, { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/58b76015-dbdd-401e-92e7-4dc15e6183d9" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/820bf47c-7868-47f1-a5a7-b4a900ee16de" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/a346f802-eb1b-4438-a13c-9ee20e28db4c" + }, + { + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/9f227f88-53ba-4c7c-91e7-334641e4b759" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" } ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/82abd87d-c378-4049-8c84-4eede3066410", - "class": "ProjectRole", - "label": "co_pi on R34DA059506", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "in": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/c3604b73-537c-411b-b963-cd8df608f086" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/0b8db858-64e3-41bc-8ecc-948b44cdf963" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/4f2619b1-a6a4-48e5-b21a-0f5455354ea9" + "source": "https://brain-bbqs.org/id/role/c3e5b648-cf18-47f4-b514-fc38390d2431" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 9, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/2de0b139-4980-4479-9362-e6d68c33d1c8", - "class": "ProjectRole", - "label": "co_pi on R34DA059507", + "id": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0", + "class": "Project", + "label": "R34DA061924 · Mapping dynamic transitions across neural, behavioral, and social scales in interacting animals", "facts": { - "project_role": [ - "co_pi" + "abstract": [ + "Project Summary BBQS R34 – Zhang & Frohlich\nMapping dynamic transitions across neural, behavioral, and social scales in interacting animals\nHuman and animal behavior is shaped by many processes across spatiotemporal scales – from the activities\nof neurons to the dynamics of social interaction. Mapping behavior and brain dynamics across scales is key to\na systemic understanding of cognition, neuropsychiatric disorders, and developing personalized interventions.\nIn social neuroscience, the mapping between social behavior and brain dynamics was primarily achieved by\nconstraining the behavior to a well-controlled, low-dimensional task space, where common linear statistical\nmethods suffice to discover cross-scale relations. However, the complex, dynamic, and interactive nature of\nreal-world social interaction is largely lost in such task-constrained settings. More recently, both human and\nanimal social neuroscience began to embrace a multi-brain interactive approach, where brain activities were\nsimultaneously recorded and found to be synchronized during live social interaction. Without task constraints,\nanimals can adopt and transition between a diverse range of behavioral patterns, which are signs of nonlinear,\nhigh-dimensional dynamical systems. There is a critical need for a computational-experimental framework to\ncharacterize the complex dynamics of naturalistic interaction and connect them across neural and behavior\nscales. The main objective of this project is to develop a computational-experimental framework to construct\nmultiscale models of naturalistic social interaction connecting the spiking dynamics of neurons, brain\noscillations, body movements, and macroscopic behavioral states. To achieve this objective, the project will\nutilize simultaneously recorded behavioral and electrophysiology data from ferrets during naturalistic\ninteraction. Ferrets are chosen as a model of dynamic social interaction for their high social skills and complex\nvisuomotor communication, which allows for fine-grained characterization of social dynamics based on\nexpressive body movements. At the neural level, ferrets’ frontoparietal networks exhibit similar oscillations to\nthose of humans that were found to synchronize during social interaction, paving the way to future comparative\nstudies. Animal data also provides the opportunity to include neuronal activity in the multiscale framework,\nwhich is not commonly accessible in humans. Computationally, the toolbox will build upon recent advances in\ntopological time series analysis to extract states and transitions from complex dynamics at different scales of\nmeasurements, combined with computer vision techniques for motion tracking, machine learning for cross-\nscale mapping of state transitions, and expert annotations. This project integrates diverse perspectives from\ncognitive social neuroscience to nonlinear dynamics, computational topology, and machine learning. The\nproject will significantly impact neuroscience by providing much-needed tools to examine multiscale relations in\nthe brain and behavior in real-world settings and the future design of state-dependent treatments for\nneuropsychiatric and behavioral disorders, combining pharmacological treatments, brain stimulations, and\npsychosocial interventions." ], - "role_source": [ - "reporter" + "award_amount": [ + "336353" + ], + "description": [ + "Mapping dynamic transitions across neural, behavioral, and social scales in interacting animals" + ], + "external_url": [ + "https://reporter.nih.gov/project-details/5R34DA061924-02" + ], + "fiscal_year": [ + "2026" + ], + "grant_number": [ + "R34DA061924" + ], + "keywords": [ + "Complex systems", + "Dynamic transitions", + "Phase transitions", + "Social scales" + ], + "mechanism": [ + "R34" + ], + "name": [ + "R34DA061924" + ], + "nih_link": [ + "https://reporter.nih.gov/project-details/5R34DA061924-02" + ], + "onboarding_status": [ + "not_started" + ], + "reporter_project_num": [ + "5R34DA061924-02" + ], + "studies_human": [ + "false" + ], + "title": [ + "Mapping dynamic transitions across neural, behavioral, and social scales in interacting animals" ] }, "out": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/e3335c53-2c38-444e-aff5-43a4268c97bf" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/579fcaf5-df6d-42f9-a62d-59bd79fe3fae" }, { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/e285ab2b-1a7d-4b2e-9400-b24d6faff6de" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/8b505d92-14d0-43cd-9cb3-62ae42e26744" + }, + { + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/311017ec-9209-4d63-95fb-1967bc8a81b7" + }, + { + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/006caa68-8b24-474f-867f-82a6199a84b1" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/851882bb-3321-45ed-af75-6ae08836c1fc" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e2c21bfc-1707-4f6d-aa18-c6db03f53c2d" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e9d52180-5701-46ba-b5dc-7fc6fa32233b" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/f328ad53-2dd2-490f-adf1-40e9cd85b5bd" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" } ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/8f554f84-7a48-4b4a-8032-cbab841613fd", - "class": "ProjectRole", - "label": "co_pi on R34DA059507", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "in": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/5b057d86-6fdd-4b5e-b2ab-111360c5b537" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/cfcdf43e-bc65-4c3b-8046-9429be511ed1" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/e285ab2b-1a7d-4b2e-9400-b24d6faff6de" - } - ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/db582fe3-ef66-4a67-aca9-9daec764cd4c", - "class": "ProjectRole", - "label": "co_pi on R34DA059507", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "source": "https://brain-bbqs.org/id/role/c35db851-d42d-43ad-b30c-64fb5b933dcf" + }, { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/e0179c68-8fe6-48ca-9140-84a567b5f661" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/dce97439-b94a-4549-af78-4839bc63d315" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/e285ab2b-1a7d-4b2e-9400-b24d6faff6de" + "source": "https://brain-bbqs.org/id/role/068fdb34-5151-4b7f-b854-c9e147bdfcd1" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/cc0de44a-82ef-4fcf-811e-9695a46b47df" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 16, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/2cf61a9f-a799-4586-94fc-a71bc80104d6", - "class": "ProjectRole", - "label": "co_pi on R34DA059509", + "id": "https://brain-bbqs.org/id/1573f2f2-dfe7-476f-ba44-55011c0f5d1b", + "class": "Project", + "label": "R34DA061925 · Building an “AI Forest” to identify the social and environmental factors underlying complex behavioral traits in wild primates.", "facts": { - "project_role": [ - "co_pi" + "abstract": [ + "PROJECT SUMMARY/ABSTRACT\nWith the advent of new technologies to probe brain-behavior relationships deeper than ever before, the field of\nbehavioral neuroscience finds itself at a crossroads for translation. The rich theoretical foundations upon which\nmany behavioral assays are based have largely been lost; and factors known to impact motivated behavior,\nsuch as social and environmental challenges, tend to be ignored. Here, the rich neurobiological understanding\nthat has been obtained from captive animals will be leveraged to assess individual differences in motivated\nbehavior that derive from social and/or environmental adversity (or advantage) in a natural environment.\nLaboratory-based paradigms will be brought to a wild population of ~350 white-faced capuchin monkeys\n(Cebus imitator) living in a small, tractable forest in Costa Rica (Taboga Forest Reserve). Approximately 70 of\nthese capuchins have been tracked and studied near-daily for the past 7 years, generating a rich life-history\ndatabase for these individuals. These capuchins are habituated to humans and readily interact with stimuli on\nexperimental platforms. But importantly, they are also exposed to the natural elements – predators, droughts,\ndisease, and social adversaries – without human intervention. This project will lay the groundwork for an\nArtificial Intelligence (AI) Forest that will transform our ability to study these animals as they develop, live, and\ndie in their natural environment. The AI Forest will be the first of its kind; an experimental forest allowing us to\nprobe laboratory-based behaviors in a wild primate population. Smart testing stations will be placed throughout\nthe forest to assess reward valuation, inhibitory control, and behavioral flexibility. A visual deep-learning\nalgorithm will be harnessed to recognize individuals as they voluntarily approach and perform at testing\nstations. The AI system will automatically guide capuchins through experiments, allowing them to “self-pace”\nas they complete each assessment. Data collection at the smart testing stations will be automated, potentially\nyielding the largest dataset of its kind from a wild primate population. In addition, a vocal deep-learning\nalgorithm will be used to track movements of individuals and groups and to detect their social and\nenvironmental challenges (intergroup and predator encounters). The multidimensional behavioral and\nenvironmental data will be integrated to examine the impact of environmental adversity (or advantage) on\nbehavioral traits across the lifespan. This AI Forest represents an exciting possibility of what the future of\nbehavioral neuroscience could be – bridging studies of complex behaviors with function (adaptive evolution) –\nto inform translational science and ultimately enhance our understanding of human health and disease." ], - "role_source": [ - "reporter" + "award_amount": [ + "279522" + ], + "description": [ + "Building an “AI Forest” to identify the social and environmental factors underlying complex behavioral traits in wild primates." + ], + "external_url": [ + "https://reporter.nih.gov/project-details/1R34DA061925-01" + ], + "fiscal_year": [ + "2026" + ], + "grant_number": [ + "R34DA061925" + ], + "keywords": [ + "AI Forest", + "Computer vision", + "Ecological factors", + "Edge computing", + "Wild primates" + ], + "mechanism": [ + "R34" + ], + "name": [ + "R34DA061925" + ], + "nih_link": [ + "https://reporter.nih.gov/project-details/5R34DA061925-02" + ], + "onboarding_status": [ + "not_started" + ], + "reporter_project_num": [ + "5R34DA061925-02" + ], + "studies_human": [ + "false" + ], + "title": [ + "Building an “AI Forest” to identify the social and environmental factors underlying complex behavioral traits in wild primates." ] }, "out": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/16d82048-d1f5-4b80-a6e0-2baf5c1bed4f" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/933edfb2-8cdf-4a82-a113-102e200d5619" }, { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/eef56f64-7e55-48ea-891a-b5c9b4c85b7c" + }, + { + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/491ac537-b3f6-45b9-93f3-1249fd809ebc" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/006caa68-8b24-474f-867f-82a6199a84b1" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/f328ad53-2dd2-490f-adf1-40e9cd85b5bd" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" } ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/6e99e32c-bc60-4da2-80ac-d6438cc1d6c6", - "class": "ProjectRole", - "label": "co_pi on R34DA059509", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "in": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/75313083-49bd-45dd-a4a2-fd5fc0bf8949" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/d7f6d7e4-401f-43ea-a3e2-ac34d7e73f1f" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" + "source": "https://brain-bbqs.org/id/role/73cef7ce-8dbb-48ba-8ee3-bcc0cca5fce8" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/9478d651-eb81-4c6f-8b55-4cabb137e46d" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/86821e6a-b746-49fd-b4b6-5ea4dd02e5d7" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 11, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/ad57ca2b-08ac-42a0-991e-61feaf2c5e39", - "class": "ProjectRole", - "label": "co_pi on R34DA059509", + "id": "https://brain-bbqs.org/id/ca25b66c-c03f-4d7e-90e8-93bc12fafeb1", + "class": "Project", + "label": "R34DA061984 · Quantifying organism-environment interactions in a new model system for neuroscience", "facts": { - "project_role": [ - "co_pi" + "abstract": [ + "PROJECT SUMMARY\nStudies of model organisms have revealed many insights into how animals sense their environment and how\nthis input is processed by their brains to produce behavioral output. However, our current understanding of\nhow the brain controls behavior is derived from a handful of species that share certain features, e.g., their\nbrains are highly regionalized and stereotyped. Yet, not all animal brains are structured in this manner, and to\nidentify general principles for the control of animal behavior, a broader diversity of brains needs to be\ninvestigated. We will study the acoel worm, Hofstenia miamia, which is a new research organism with key\nfeatures that position it to address major questions in behavioral neuroscience. First, Hofstenia, a voracious\nmangrove predator, is a marine invertebrate that performs complex behaviors in the lab, and our recent work\nhas shown that it is amenable to rigorous, quantitative studies of its behaviors and of behavior-induced\nphysical changes in its aquatic environment. Second, as an acoel, Hofstenia diverged from models such as\nflies and mice 550 million years ago and possesses a brain that does not show evidence of regionalization,\nproviding an opportunity to study distributed computation. Third, the Hofstenia brain can regenerate from any\nstarting condition, enabling the study of how robustness is encoded in the brain. Fourth, Hofstenia is highly\ntractable in the lab, offering many genomic resources and tools for functional genetics, which will make it\npossible to collect neural activity data. Given these features, the overall objective in this proposal is to leverage\nHofstenia to study its behavior and environment at the whole-organism level. Specifically, we aim to: 1)\nDevelop methods for rigorous measurement and quantification of worm behavior and its environment, using\npose estimation to infer worm action sequences, water flow measurement to quantify physical changes around\nworms, and tracking of prey to quantify the worm’s biological environment. 2) Perturb both organism and\nenvironment to uncover mechanisms of behavioral control. We will amputate animals to determine how\nregenerating brain features correlate with elements of behavior, and deliver artificial mechanical flow stimuli to\nunderstand how animals read their physical environment. 3) We will assemble a team of researchers with\nexpertise in behavioral neuroscience, pose estimation, connectomics, neural activity dynamics, fluid\nmechanics, computational modeling of behavior, and in the organism and its regenerative abilities to plan work\nthat will enable the integration of neural activity data with behavioral and environmental data to reveal how\ndistributed computations in the brain enable the animal to produce action sequences that successfully navigate\nthe environment and capture prey. This proposal is innovative in its use of a new research organism, in its\npursuit of behavior-environment quantification in the whole-organism context, and in its potential to reveal\ngeneral principles of behavioral control, particularly via distributed computation." ], - "role_source": [ - "reporter" + "award_amount": [ + "370423" + ], + "description": [ + "Quantifying organism-environment interactions in a new model system for neuroscience" + ], + "external_url": [ + "https://reporter.nih.gov/project-details/5R34DA061984-02" + ], + "fiscal_year": [ + "2026" + ], + "grant_number": [ + "R34DA061984" + ], + "keywords": [ + "New model system", + "Organism-environment", + "Sensory ecology" + ], + "mechanism": [ + "R34" + ], + "name": [ + "R34DA061984" + ], + "nih_link": [ + "https://reporter.nih.gov/project-details/5R34DA061984-02" + ], + "onboarding_status": [ + "not_started" + ], + "reporter_project_num": [ + "5R34DA061984-02" + ], + "studies_human": [ + "false" + ], + "title": [ + "Quantifying organism-environment interactions in a new model system for neuroscience" ] }, "out": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/ebbb8fee-72ed-4cb0-9d25-94e670379f08" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/12c95d56-76ab-4519-8bf9-e406bf79736d" }, { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" - } - ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/b8a0aee0-0fb1-4ede-9846-a717a2b63d47", - "class": "ProjectRole", - "label": "co_pi on R34DA059510", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/d6fbdcc7-30d7-48ba-9c46-b70e227c59cf" + }, { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/bf6867b2-09d3-4cc3-89ba-b931b646cd42" + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/006caa68-8b24-474f-867f-82a6199a84b1" }, { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/e5bb6e4f-d3cf-44d4-ac1a-59f76724c0d2" - } - ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/4a0c2ae2-92fd-447a-a95e-419db4773d8f", - "class": "ProjectRole", - "label": "co_pi on R34DA059512", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3" + }, { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/1a33a814-fbd1-4acf-bc5d-f0077bc180d1" + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/f328ad53-2dd2-490f-adf1-40e9cd85b5bd" }, { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/1e1fc06b-fe5c-4ec2-9f64-474f98ae31e8" + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" } ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/a31e280c-89d7-4d68-b3a3-4ecc10429cee", - "class": "ProjectRole", - "label": "co_pi on R34DA059512", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ - { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/fd89f05c-a37e-4d93-80fc-47dfc8aa3931" - }, + "in": [ { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/1e1fc06b-fe5c-4ec2-9f64-474f98ae31e8" + "source": "https://brain-bbqs.org/id/role/f33023b3-374b-44c3-a158-5487f3bbfafc" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 7, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/62fcc478-1ee4-43f5-a5b0-ae02c6955cbf", - "class": "ProjectRole", - "label": "co_pi on R34DA059513", + "id": "https://brain-bbqs.org/id/f294b0d9-175a-47c7-854c-d4d750009812", + "class": "Project", + "label": "R34DA062119 · Adversity and Resilience Consortium (ARC): A collaboration for the standardized study of experience-dependent brain and behavioral development", "facts": { - "project_role": [ - "co_pi" + "abstract": [ + "It is increasingly clear that experience of adversity including poverty, trauma, and other stressors during childhood can enhance risk for mental and physical health problems later in life. These adverse experiences can be highly varied and include elements such as food insecurity, family and community violence, and multiple forms of neglect. To efficiently target interventions and to build resilience, it is imperative to understand which forms of adversity have which effects on behavior, and to determine what timing and combination of adversities puts an individual most at risk. We also need to recognize that these questions have a deep biological history. Experience in different domains likely acts on a developing organism’s developmental programming where it adjusts gene expression to adapt an individual’s phenotype in response to the environment. This adaptation may differ depending on the type of experience (for example, threat, deprivation or scarcity and other forms of uncertainty may drive different outcomes).\nTo study these important epidemiological and biological questions in a controlled fashion we can turn to the study of the effects of developmental experience on mice whose genetics, rearing and testing conditions can be carefully controlled. However, to get a big picture view of how different forms of experience compare to one another in the field of neuroscience and behavior, we need to adopt better scientific methods that use richer, more ethologically informed behavioral tasks and rigorously standardize our protocols across sites, share data in readily comparable formats. Here we propose to initiate a team science effort, the Adversity and Resilience Consortium (ARC), to address these challenges. We will begin by comparing our existing data sets from control mice and mice that experienced adversity in development to assess how they might be combined across sites. Based on the interests of our initial team these data will focus on adolescent experience and adult learning and decision making, but can later be expanded. Next, we will develop 1) a standardized set of methods and protocols to assess behavior and 2) a public forum for sharing protocols, resources, and data that also facilitates exploration and analysis based on Open Source Brain as a model. In future work supported by larger grant mechanisms, we will work as a team using our newly standardized methods to vary exposure to deprivation, threat, and unpredictability and study behavior and brain development along with neural recordings. We predict that dimensionality reduction methods and computational models of latent processes will reveal distinct effects of different forms of adversity on mouse behavior that can be mapped back to distinct contrasts in cellular and circuit function." ], - "role_source": [ - "reporter" + "award_amount": [ + "707108" + ], + "description": [ + "Adversity and Resilience Consortium (PI: Linda Wilbrecht)" + ], + "external_url": [ + "https://reporter.nih.gov/project-details/1R34DA062119-01" + ], + "fiscal_year": [ + "2025" + ], + "grant_number": [ + "R34DA062119" + ], + "keywords": [ + "Harmonization", + "International Development Project", + "Longitudinal", + "Ontogeny" + ], + "mechanism": [ + "R34" + ], + "name": [ + "R34DA062119" + ], + "nih_link": [ + "https://reporter.nih.gov/project-details/1R34DA062119-01" + ], + "onboarding_status": [ + "not_started" + ], + "reporter_project_num": [ + "1R34DA062119-01" + ], + "studies_human": [ + "false" + ], + "title": [ + "Adversity and Resilience Consortium (ARC): A collaboration for the standardized study of experience-dependent brain and behavioral development" ] }, "out": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/3161638e-fa1b-4af1-a998-a34139b2a0b1" + "predicate": "funded_datasets", + "target": "https://brain-bbqs.org/id/44376171-f0d7-4e91-9c91-6558f6253fe3" }, { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/9f227f88-53ba-4c7c-91e7-334641e4b759" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/006caa68-8b24-474f-867f-82a6199a84b1" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/f328ad53-2dd2-490f-adf1-40e9cd85b5bd" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" } ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/f0b8e0cd-ac28-4f72-8410-be9b81689d08", - "class": "ProjectRole", - "label": "co_pi on R34DA059513", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "in": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/f2372c9c-91ac-449f-8ae8-182327e93a85" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/02220da7-1bf8-49e9-8ff0-ed008ea8d03e" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" + "source": "https://brain-bbqs.org/id/role/d2505ade-278d-4203-8ebf-bbc8ebfc48c9" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/535c5cae-fbd2-4199-a1c2-02af47928538" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 9, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/43ee45a2-22ea-4e73-9885-1efe24dc4caf", - "class": "ProjectRole", - "label": "co_pi on R34DA059716", + "id": "https://brain-bbqs.org/id/80db3a04-a9ad-486d-abf1-4b20f8370ff9", + "class": "Project", + "label": "R61MH135106 · Synchronized neuronal and peripheral biomarker recordings in freely moving humans", "facts": { - "project_role": [ - "co_pi" + "abstract": [ + "Project Summary/Abstract\nRecent technological advancements have allowed for single-neuron and intracranial electroencephalographic\n(iEEG) recordings in freely moving humans. However, these implanted neural recording devices have not been\nintegrated with non-invasive peripheral biochemical recordings. The emergence of an experimental platform\ncombining mobile deep brain recordings with wearable biochemical and biophysical sensors for use in real-world\nsettings is unprecedented. The proposed project will develop a novel platform that enables simultaneous single-\nneuron or iEEG, biochemical (cortisol, epinephrine), and biophysical (heart rate, skin conductance, and body\nand eye movements) activity to be recorded in freely moving human participants. As proof-of-concept, we will\nuse this platform to investigate the neural and peripheral biomarker mechanisms underlying approach-avoidance\nbehaviors during spatial navigation. Through an interdisciplinary collaboration between UCLA, Stanford\nUniversity, and the Veteran’s Administration Greater Los Angeles Healthcare System (VAGLAHS), the program\nwill have access to human participants whom will have implanted electrodes within prefrontal cortex, amygdala,\nhippocampus, or nucleus accumbens regions. The proposed project outcomes will empower future studies and\nother researchers to investigate, for the first-time, deep brain and peripheral biomarker mechanisms underlying\nfreely moving human behavior in naturalistic and ecologically valid environments." ], - "role_source": [ - "reporter" + "award_amount": [ + "1015188" + ], + "description": [ + "Synchronized neuronal and peripheral biomarker recordings in freely moving humans" + ], + "external_url": [ + "https://reporter.nih.gov/project-details/5R61MH135106-02" + ], + "fiscal_year": [ + "2026" + ], + "grant_number": [ + "R61MH135106" + ], + "keywords": [ + "Approach-avoidance", + "Biomarkers", + "Freely moving", + "Spatial navigation", + "iEEG" + ], + "mechanism": [ + "R61" + ], + "name": [ + "R61MH135106" + ], + "nih_link": [ + "https://reporter.nih.gov/project-details/7R61MH135106-03" + ], + "onboarding_status": [ + "not_started" + ], + "reporter_project_num": [ + "7R61MH135106-03" + ], + "studies_human": [ + "true" + ], + "title": [ + "Synchronized neuronal and peripheral biomarker recordings in freely moving humans" ] }, "out": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/3d87d6b0-c802-4610-813b-86b94e3e76d6" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27" }, { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/b02aaf9f-0a7e-4759-b1ba-cb100a2d4eed" - } - ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/70324d1e-344b-402d-bac2-afd900606e16", - "class": "ProjectRole", - "label": "co_pi on R34DA059716", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "predicate": "produced", + "target": "https://brain-bbqs.org/id/51afd359-3797-4082-8f34-f356eaa33848" + }, { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/1e23d697-bec8-48a1-ae97-96434e7343c2" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/c8a72b45-43f3-42d0-8cd6-aedc7f1242c0" }, { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/b02aaf9f-0a7e-4759-b1ba-cb100a2d4eed" - } - ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/2248b93b-ea65-48b3-a940-f45b80c06346", - "class": "ProjectRole", - "label": "co_pi on R34DA059718", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40" + }, { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/2dd8fea9-363a-43da-8bd1-6ae4674c60b9" + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/006caa68-8b24-474f-867f-82a6199a84b1" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/851882bb-3321-45ed-af75-6ae08836c1fc" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e2c21bfc-1707-4f6d-aa18-c6db03f53c2d" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/f328ad53-2dd2-490f-adf1-40e9cd85b5bd" }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" + } + ], + "in": [ { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e" + "source": "https://brain-bbqs.org/id/role/3dba6e02-b3c4-4cc8-89d8-bd8ef07d5341" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 11, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/692b00f5-b8e0-4344-8bd0-75def6c4b99e", - "class": "ProjectRole", - "label": "co_pi on R34DA059718", + "id": "https://brain-bbqs.org/id/3352859e-5677-46dd-89d6-17c898b6f097", + "class": "Project", + "label": "R61MH135109 · Capturing Autobiographical memory formation in People moving Through real-world spaces Using synchronized wearables and intracranial Recordings of EEG", "facts": { - "project_role": [ - "co_pi" + "abstract": [ + "Project Summary\nThis project aims to unlock the potential of combining wearable mobile recording devices, such as\nsmartphones with continuous audio-visual, accelerometry, GPS, subjective report, autonomic physiology, and\nwearable eye tracking recordings, with precisely synchronized intracranial neural recordings during real-world\nbehaviors. Autobiographical memory (AM) formation is a critical human behavior that has been difficult to study\nwith traditional neuroimaging methods. It involves a range of real-world cognitive processes, including\nattention, decision making, emotion, episodic memory, social interactions, and navigation. AM refers to\nmemory for one’s own life experiences. AMs are typically more detailed and personal than general episodic\nmemories and due to this feature have thus been difficult to capture as they are being formed, particularly the\nneural correlates of AM encoding. By studying how the brain processes, encodes, and retrieves verifiable,\nreal-world autobiographical experiences, we hope to gain new insights into cognitive and neural processes that\ncan fail in neurological disorders like Alzheimer’s disease. There is a critical need to develop technical,\nmethodological, and computational approaches to understanding the cognitive and neural mechanisms\nunderlying memory-related behaviors in continuous, complex real-world settings, to then translate this\nunderstanding into reliable treatments for enhancing memory or cognition in daily life. The proposed project will\ntake important first steps towards addressing these dire needs with a novel and unique approach to recording\ndirectly from the human brain as people navigate and create AMs in the temporal contexts and at the spatial\nscales of daily life. By capturing electrophysiological recordings synchronized with a novel experiential\nrecording device, our project will take the key translational step needed to push our neuroscientific insights of\nautobiographical memory from the laboratory to one day restoring real-world memory for those suffering from\ndevastating memory disorders. As neural stimulation tools and techniques for memory enhancement develop,\ninsights from the proposed study will establish the foundation on which to build neuromodulation approaches\nthat can rescue memory during real-world experiences. Thus the proposed research project aims to develop a\nsmartphone-based recording application (CAPTURE app; R61 phase) synchronized with wearables and\ninvasive neural recordings during real-world behaviors like autobiographical memory encoding (R33 phase).\nWe will develop novel recording and analytic methods for integrating multimodal data streams with invasive\nneural recordings in humans during real-world experiences. Over 2,000 potential research participants have\nsensing and stimulation devices (i.e., NeuroPace Responsive Neurostimulation System; RNS) chronically\nimplanted in their brains for the treatment of epilepsy in the U.S. Our next-generation tool and approach will\nallow us to precisely capture real-world behaviors that encompass a variety of cognitive processes like\nautobiographical memory formation, and synchronize this data with direct neural recordings in humans." ], - "role_source": [ - "reporter" + "award_amount": [ + "890660" + ], + "description": [ + "Capturing Autobiographical memory formation in People moving Through real-world spaces Using synchronized wearables and intracranial Recordings of EEG" + ], + "external_url": [ + "https://reporter.nih.gov/project-details/5R61MH135109-02" + ], + "fiscal_year": [ + "2026" + ], + "grant_number": [ + "R61MH135109" + ], + "keywords": [ + "Autobiographical memory", + "CAPTURE app", + "Real-world spaces", + "Wearables", + "iEEG" + ], + "mechanism": [ + "R61" + ], + "name": [ + "R61MH135109" + ], + "nih_link": [ + "https://reporter.nih.gov/project-details/5R61MH135109-03" + ], + "onboarding_status": [ + "not_started" + ], + "reporter_project_num": [ + "5R61MH135109-03" + ], + "studies_human": [ + "true" + ], + "title": [ + "Capturing Autobiographical memory formation in People moving Through real-world spaces Using synchronized wearables and intracranial Recordings of EEG" ] }, "out": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/0f0ad5c2-496b-42a8-91b7-b798742bcdc3" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/987e3cf1-5d05-4e16-8849-4b5899ac84dc" }, { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/d3fb7a56-6a64-43c8-9fd6-7087d906d413" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/d951e426-557c-44e1-a830-212bbdd1514c" + }, + { + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/006caa68-8b24-474f-867f-82a6199a84b1" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/851882bb-3321-45ed-af75-6ae08836c1fc" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/d8cef433-7209-4e63-bdd5-a3f52bd9dd89" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e2c21bfc-1707-4f6d-aa18-c6db03f53c2d" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e80e0495-82ff-4d51-995f-36e9349b40fb" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e9d52180-5701-46ba-b5dc-7fc6fa32233b" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/f328ad53-2dd2-490f-adf1-40e9cd85b5bd" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" } ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/c35db851-d42d-43ad-b30c-64fb5b933dcf", - "class": "ProjectRole", - "label": "co_pi on R34DA061924", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "in": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/1d3b5b5b-7a52-4380-82f4-931b67831917" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/c7360c73-0ef1-4e34-88ac-585b15257b2d" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0" + "source": "https://brain-bbqs.org/id/role/d64865d3-893f-4968-bcba-e3b33a6a4f1b" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 15, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/73cef7ce-8dbb-48ba-8ee3-bcc0cca5fce8", - "class": "ProjectRole", - "label": "co_pi on R34DA061925", + "id": "https://brain-bbqs.org/id/4614269a-0d7f-4390-b4cc-568a09fa6a45", + "class": "Project", + "label": "R61MH135114 · Integrated movement tracking for pediatric OPM-MEG studies of intellectual disability", "facts": { - "project_role": [ - "co_pi" + "abstract": [ + "Abstract\nThis R61/R33 project will develop an advanced technology for non-invasive recording of whole-brain physiology\nwith synchronized video-tracking of movement for use in children with intellectual disability and will use it to\nelucidate the brain-circuit electrophysiology of intellectual development. The technological advances will have\nimmediate benefits for pediatric neurology and will be widely applicable to many neurological disorders in which\nsafe and convenient, non-invasive recordings of brain physiology are desired to inform diagnosis, prognosis, and\ntreatment. The R61 phase will be performed by FieldLine Medical (Boulder, CO) which will contribute their recent\nadvances in optically-pumped magnetometer magnetoencephalography (OPM-MEG), a transformative\ntechnology for safe, physiological brain imaging that greatly increases sensitivity to brain electrical signals as\ncompared to SQUID-MEG and EEG and provides greater coverage than invasive electrophysiology. FieldLine\nwill: 1) expand the capabilities of their HEDscan OPM-MEG system, as a “wearable” brainwave scanning\ntechnology, for high-fidelity MEG recordings in freely moving children; and 2) integrate synchronized video-\ntracking of voluntary movements for kinematic analysis to create a technology named HEDscanV. The R33\nphase will deploy HEDscanV in two pediatric neuroscience laboratories at the Children's Hospital of Philadelphia\nand Seattle Children's Research Institute. After validating HEDscanV in children against SQUID-MEG, the R33\nphase will leverage advances in autism research enabled by sensory, motor, and associative learning paradigms\nthat were developed by the MPIs to identify intellectual disability with high accuracy. By disseminating HEDscanV\nand sensory-motor paradigms across clinical sites in Philadelphia and Seattle, we will work together to identify\nthe bandwidths of electrical activity coherence in brain circuits at the interface of movement and cognition that\npromote intellectual development. Our success will be ensured by the support of two nationally-recognized\nautism centers at the University of Washington and Children's Hospital of Philadelphia, where high-fidelity clinical\nassessments and diagnostic testing will be conducted. By establishing the locations and bandwidths of activity\ncoherence in the brains of children that promote intellectual development, the project will begin to lay the\nessential groundwork needed to establish therapies intending to normalize brain pathophysiology and facilitate\nintellectual development in children with neurodevelopmental disorders." ], - "role_source": [ - "reporter" + "award_amount": [ + "2248476" + ], + "description": [ + "Integrated movement tracking for pediatric OPM-MEG studies of intellectual disability" + ], + "external_url": [ + "https://reporter.nih.gov/project-details/5R61MH135114-02" + ], + "fiscal_year": [ + "2025" + ], + "grant_number": [ + "R61MH135114" + ], + "keywords": [ + "Artifact removal", + "Intellectual disability", + "Motion tracking", + "OPM-MEG", + "Pediatric" + ], + "mechanism": [ + "R61" + ], + "name": [ + "R61MH135114" + ], + "nih_link": [ + "https://reporter.nih.gov/project-details/5R61MH135114-02" + ], + "onboarding_status": [ + "not_started" + ], + "reporter_project_num": [ + "5R61MH135114-02" + ], + "studies_human": [ + "true" + ], + "title": [ + "Integrated movement tracking for pediatric OPM-MEG studies of intellectual disability" ] }, "out": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/d3cae382-1e79-42c1-8f37-75cd049d0ff6" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/419155ad-faba-4e10-8029-5339960877a1" }, { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/1573f2f2-dfe7-476f-ba44-55011c0f5d1b" + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/006caa68-8b24-474f-867f-82a6199a84b1" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/851882bb-3321-45ed-af75-6ae08836c1fc" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e2c21bfc-1707-4f6d-aa18-c6db03f53c2d" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/f328ad53-2dd2-490f-adf1-40e9cd85b5bd" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" } ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/9478d651-eb81-4c6f-8b55-4cabb137e46d", - "class": "ProjectRole", - "label": "co_pi on R34DA061925", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "in": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/22edcc49-fd41-4423-92b6-89e7abba292d" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/295a454b-56ba-4d13-b630-75e3a333f965" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/1573f2f2-dfe7-476f-ba44-55011c0f5d1b" - } - ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/60988e88-27ec-4264-9203-98d80d2f3489", - "class": "ProjectRole", - "label": "co_pi on R61MH135114", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "source": "https://brain-bbqs.org/id/role/d940349f-ae79-43ae-8931-2c4b17d14f44" + }, { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/32937527-a5e9-4a99-84c0-719435f25f8b" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/b5ea3f60-fb2d-4b61-b6ca-04c67600b8b0" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/4614269a-0d7f-4390-b4cc-568a09fa6a45" + "source": "https://brain-bbqs.org/id/role/60988e88-27ec-4264-9203-98d80d2f3489" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 12, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/8c42852d-0c57-4a3e-b874-3ba8874287a7", - "class": "ProjectRole", - "label": "co_pi on R61MH135405", + "id": "https://brain-bbqs.org/id/22e61529-38ba-465f-b38b-274e24160fb6", + "class": "Project", + "label": "R61MH135405 · Developing the Context-Aware Multimodal Ecological Research and Assessment (CAMERA) Platform for Continuous Measurement and Prediction of Anxiety and Memory State", "facts": { - "project_role": [ - "co_pi" + "abstract": [ + "Summary/Abstract (30 line max):\nThis project seeks to develop the CAMERA (Context-Aware Multimodal Ecological Research\nand Assessment) platform, a state-of-the-art open multimodal hardware/software system for\nmeasuring human brain–behavior relationships. CAMERA will record neural, physiological,\nbehavioral, and environmental signals, as well as measurements from ecological momentary\nassessments (EMAs), to develop a continuous high-resolution prediction of a person’s level of\nanxiety and cognitive performance. CAMERA will provide a significant advance over current\nmethods for human behavioral measurement because it leverages the complementary features\nof multimodal data sources and combines them with interpretable machine learning to predict\nhuman behavior. A further distinctive aspect of CAMERA is that it incorporates context-aware,\nadaptive EMA, where the timing of assessments depend on the subject’s physiology and\nbehavior to improve response rates and model learning. Our initial work on CAMERA focuses\non predicting anxiety state and concurrent memory performance, but the platform is flexible for\nuse in various domains.\nOur work on CAMERA consists of two phases. First, in the R61 phase, we will develop the\nCAMERA hardware/software framework, which includes methods for recording continuous\nneural, physiologic, audiovisual, and smartphone-usage data (Aim 1) and synchronizing these\nsignals with intermittent EMAs (Aim 2). After demonstrating that CAMERA can successfully\ncombine multimodal features to predict a subject’s anxiety state and memory efficiency (Aim 3),\nwe will proceed to the R33 phase of the project. In the R33, we will use CAMERA in conjunction\nwith closed-loop neurostimulation to modulate the subject’s anxiety state and associated\nmemory performance (Aim 1), and to characterize the causal effect of modulation on neural,\nphysiologic, and behavioral biomarkers (Aim 2). Beyond our initial work in the domain of anxiety\nand memory, we anticipate that CAMERA will have widespread impact by providing a general\nplatform for exploratory and hypothesis-driven research on various aspects of complex human\ninternal states, behavior, and cognition in real-world environments while minimizing burden on\nsubjects." ], - "role_source": [ - "reporter" + "award_amount": [ + "988446" + ], + "description": [ + "Developing the Context-Aware Multimodal Ecological Research and Assessment (CAMERA) Platform for Continuous Measurement and Prediction of Anxiety and Memory State" + ], + "external_url": [ + "https://reporter.nih.gov/project-details/5R61MH135405-02" + ], + "fiscal_year": [ + "2026" + ], + "grant_number": [ + "R61MH135405" + ], + "keywords": [ + "Anxiety", + "CAMERA Platform", + "Continuous Measurement", + "Ecological Assessment", + "Memory State" + ], + "mechanism": [ + "R61" + ], + "name": [ + "R61MH135405" + ], + "nih_link": [ + "https://reporter.nih.gov/project-details/5R61MH135405-03" + ], + "onboarding_status": [ + "not_started" + ], + "reporter_project_num": [ + "5R61MH135405-03" + ], + "studies_human": [ + "true" + ], + "title": [ + "Developing the Context-Aware Multimodal Ecological Research and Assessment (CAMERA) Platform for Continuous Measurement and Prediction of Anxiety and Memory State" ] }, "out": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/ee077b61-eb2c-4cd9-b587-a46418c45265" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/0efd86da-44c1-4222-9b30-72000b833267" }, { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/22e61529-38ba-465f-b38b-274e24160fb6" + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/851882bb-3321-45ed-af75-6ae08836c1fc" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e2c21bfc-1707-4f6d-aa18-c6db03f53c2d" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e80e0495-82ff-4d51-995f-36e9349b40fb" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e9d52180-5701-46ba-b5dc-7fc6fa32233b" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" } ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/d1c407f2-001d-44da-ada2-0c59c6f8503a", - "class": "ProjectRole", - "label": "co_pi on R61MH135405", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "in": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/00618660-a724-4059-85c1-c6ca3ccc1744" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/d1c407f2-001d-44da-ada2-0c59c6f8503a" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/22e61529-38ba-465f-b38b-274e24160fb6" + "source": "https://brain-bbqs.org/id/role/a617a421-6fe5-4f66-9c63-ce24bbea02eb" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/f25003fd-234f-453b-9bc8-238213a55269" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/8c42852d-0c57-4a3e-b874-3ba8874287a7" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 12, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/f25003fd-234f-453b-9bc8-238213a55269", - "class": "ProjectRole", - "label": "co_pi on R61MH135405", + "id": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b", + "class": "Project", + "label": "R61MH135407 · Novel multimodal neural, physiological, and behavioral sensing and machine learning for mental states", "facts": { - "project_role": [ - "co_pi" + "abstract": [ + "PROJECT SUMMARY\nStudying how human brain activity gives rise to mental states can reveal the neural mechanisms of emotional\nfunctioning and provide novel neural-physiological markers to enable personalized therapies for diverse mental\ndisorders. For brain monitoring alone, intracranial EEG (iEEG) can measure multi-region multiday brain activity\nwith high temporal resolution. However, the above goals hinge upon the ability for simultaneous brain-behavior\nmonitoring, which remains immensely difficult for mental states due to challenges on the physiology, behavior,\nmachine learning, and ethics fronts. First, physiological monitoring beyond a single modality – e.g., electrodermal\nvs. cortisol – is not possible with current wearables and the demonstrated wearables do not measure cortisol.\nSecond, behavioral monitoring during intracranial recordings is largely limited to self-reports, which are sparse.\nAlso, while social processes are a major trans-diagnostic domain of emotional functioning in NIMH’s RDoC\nframework and adversely affected in diverse mental disorders, they are largely absent in current brain-behavior\nmonitoring, which does not afford systematic scalable measurement of mental states during social interactions.\nThird, modeling of concurrent neural-physiological-behavioral data introduces a machine learning challenge,\ninvolving many modalities, nonlinearity, and mixed behaviorally relevant and irrelevant dynamics to dissociate.\nFinally, there are ethical issues. We build an interdisciplinary team of engineers, psychiatrists and behavioral\nscientists, computer scientists, neurosurgeons, neuroscientists, and neuroethicists to address these challenges.\nWe will develop novel software and hardware tools to enable multimodal neural-physiological-behavioral\nsensing and machine learning for mental states within social processes and beyond. The R61 in years 1-\n4 will develop and validate the tools in healthy subjects (Aims 1,2) and in epilepsy patients with already-implanted\niEEG electrodes which cover many regions related to mental states (Aim 3). In R61, we develop i) an integrated\nwearable skin-like sensor for multimodal physiological, biomechanical, and cortisol sensing; ii) conversational\nvirtual humans to evoke naturalistic social processes and enable emotion recognition using multimodal audio-\nvisual-language modalities; and iii) a nonlinear, multimodal, brain-behavior modeling, learning, and inference\nframework for mental states. We will also study the ethics of multimodal data collection, mental privacy, and self-\ntrust. Once the R61 tools are validated, we will combine them with intracranial brain activity in epilepsy patients\nin R33 in year 5 to learn multimodal biomarkers of mental states. Our approach spans multiple RDoC systems\nincluding Negative Valence, Arousal and Regulatory Systems, and Social Processes. It enables several levels\nof analysis including Circuits, Physiology, Behavior, and Self-Report. These systems span diverse disorders\nsuch as anxiety and depression. Thus, our multimodal, convergent, and integrated approach will likely enable\nunique brain-behavior insights into human emotion functioning applicable to broad domains of mental health." ], - "role_source": [ - "reporter" + "award_amount": [ + "908700" + ], + "description": [ + "Novel multimodal neural, physiological, and behavioral sensing and machine learning for mental states" + ], + "external_url": [ + "https://reporter.nih.gov/project-details/5R61MH135407-03" + ], + "fiscal_year": [ + "2026" + ], + "grant_number": [ + "R61MH135407" + ], + "keywords": [ + "Machine learning", + "Mental states", + "Multimodal sensing", + "Nonlinear latent factors" + ], + "mechanism": [ + "R61" + ], + "name": [ + "R61MH135407" + ], + "nih_link": [ + "https://reporter.nih.gov/project-details/5R61MH135407-03" + ], + "onboarding_status": [ + "not_started" + ], + "reporter_project_num": [ + "5R61MH135407-03" + ], + "studies_human": [ + "true" + ], + "title": [ + "Novel multimodal neural, physiological, and behavioral sensing and machine learning for mental states" ] }, "out": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/3d7564b9-e839-4737-874a-2e3b5319e11a" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/0c13ec6b-1864-453c-a447-cf938ec53940" }, { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/22e61529-38ba-465f-b38b-274e24160fb6" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/20a8f7ad-ea28-4624-9cae-4c73d8e74549" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/3a906d0f-416c-4fda-bdf9-c9e42ca31ab8" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/507c97c9-3940-4476-af59-4736c645c519" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/50808fc1-e0bd-44c6-a772-364f8a35a23e" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/5935dae3-756d-4c4c-8742-f067e81a8012" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/5ec5db0e-0458-498c-9ebd-38f78c2d139c" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/71dda42b-ccf2-4447-b3f1-d25aa8f8b0bb" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/7d6d3ede-5075-44de-87e0-829d557a6887" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/7fd65aca-ff11-4642-ab3d-17489049db10" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/8b727552-b37c-4088-a4ff-63f55dd59281" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/93b1ea26-0dae-458a-a946-13dca91b5382" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/c3f26370-becc-4d39-af05-abeb0433bee9" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/c7423364-c703-42a4-bde0-cdad1bc6f896" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/d2dadb0b-c44c-4e29-bc95-dce3ad1874ff" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/d956ef6b-0f6d-4bf3-a920-76a3db659efc" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/e96d4fb7-c4d6-4776-b39c-dfb97dc12f41" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/e9749351-6773-473d-8fd0-ec88e5a8ba07" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/f162cf66-a805-4425-9e9f-ee40c5c89bb2" + }, + { + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/006caa68-8b24-474f-867f-82a6199a84b1" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/851882bb-3321-45ed-af75-6ae08836c1fc" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e2c21bfc-1707-4f6d-aa18-c6db03f53c2d" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e80e0495-82ff-4d51-995f-36e9349b40fb" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/f328ad53-2dd2-490f-adf1-40e9cd85b5bd" } ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/1711154b-0f87-42e9-8cf6-c1316bdf48a5", - "class": "ProjectRole", - "label": "co_pi on R61MH138612", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "curator" - ] - }, - "out": [ + "in": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/c6056429-1e03-4506-8484-5be9acff8170" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/e165b281-959b-4738-b6c6-cd404994d003" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/80e226a5-f7e6-49d2-a64a-524940d498a5" + "source": "https://brain-bbqs.org/id/role/2849f8eb-0feb-48ba-b73e-577eb81e4b91" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 27, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/b0b35286-4168-48d3-93d4-75ef191c6174", - "class": "ProjectRole", - "label": "co_pi on R61MH138612", + "id": "https://brain-bbqs.org/id/80e226a5-f7e6-49d2-a64a-524940d498a5", + "class": "Project", + "label": "R61MH138612 · SeeMe: A multimodal behavioral-electrophysiological tool for real-time detection of consciousness", "facts": { - "project_role": [ - "co_pi" + "abstract": [ + "SeeMe: A multimodal behavioral-electrophysiological tool for real-time detection\n of motor behavior in brain injury patients\nAbstract\nAn obstacle in clinical and basic science consciousness research is the lack of quantitative techniques to assess\nthe recovery of voluntary behavior. Standard techniques for consciousness detection depend on subjective\nassessment of voluntary behavior. These methods are slow, observer-dependent, and lack the temporal\nresolution to study brain circuits supporting consciousness. In Phase R61 of this proposal, SeeMe, a novel,\nobjective, real-time tool, will be developed to detect voluntary behavior. This multi-modal tool is based on the\nmeasurement of face and hand movements to command in recovering traumatic brain injury (TBI) patients who\nmay appear unresponsive. SeeMe detects early signs of low-amplitude voluntary behavior currently unseen by\nclinical examiners. These detected movements will be linked with neural recordings to interrogate underlying\ncircuits supporting voluntary behavior. This tool will be made freely available to researchers interested in\nconsciousness and more generally studying brain-behavior relationships. Phase R33 will use SeeMe to time-\nlock vagus nerve stimulation to voluntary behavior in recovering TBI patients, analogous to its FDA-approved\nuse in stroke. This framework will be used to study the neural correlates of voluntary behavior in TBI patients.\nWhen complete, this project will deliver 1.) a novel objective tool for analyzing voluntary behavior, 2.) a\ncomputational framework for synchronizing behavior with brain activity, and 3.) a closed-loop stimulation system\nto develop future neuromodulatory therapeutic approaches to facilitate the return of motor behavior after injury." ], - "role_source": [ - "reporter" + "award_amount": [ + "466843" + ], + "description": [ + "R61 grant for consciousness detection in brain injury patients" + ], + "fiscal_year": [ + "2026" + ], + "grant_number": [ + "R61MH138612" + ], + "keywords": [ + "Brain Injury", + "Consciousness", + "Electrophysiology", + "Motor Behavior", + "Real-time Detection" + ], + "mechanism": [ + "R61" + ], + "name": [ + "R61MH138612" + ], + "nih_link": [ + "https://reporter.nih.gov/project-details/1R61MH138612-01" + ], + "onboarding_status": [ + "not_started" + ], + "reporter_project_num": [ + "1R61MH138612-01" + ], + "studies_human": [ + "true" + ], + "title": [ + "SeeMe: A multimodal behavioral-electrophysiological tool for real-time detection of consciousness" ] }, "out": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/223a91b2-1ffb-49e6-9cd7-d97f6f2beece" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/0885bc24-79d7-45c1-ad73-fd4301e68ff6" + }, + { + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/006caa68-8b24-474f-867f-82a6199a84b1" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/851882bb-3321-45ed-af75-6ae08836c1fc" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e2c21bfc-1707-4f6d-aa18-c6db03f53c2d" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e9d52180-5701-46ba-b5dc-7fc6fa32233b" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/f328ad53-2dd2-490f-adf1-40e9cd85b5bd" + } + ], + "in": [ + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/1711154b-0f87-42e9-8cf6-c1316bdf48a5" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/80e226a5-f7e6-49d2-a64a-524940d498a5" + "source": "https://brain-bbqs.org/id/role/fbe6026f-8aad-439e-8fe2-da3cce084d1c" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/b0b35286-4168-48d3-93d4-75ef191c6174" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 10, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/4ee3ec6b-290f-4731-b8af-788bc47217e8", - "class": "ProjectRole", - "label": "co_pi on R61MH138713", + "id": "https://brain-bbqs.org/id/38289d36-f3a6-43e1-955b-db1d3d400cb2", + "class": "Project", + "label": "R61MH138705 · Neural and Behavioral Correlates of Live Face-to-Face Interactions", "facts": { - "project_role": [ - "co_pi" + "abstract": [ + "Summary\nRecent interest in the neural correlates of naturalistic behaviors has increased the need for tools to acquire\nmultimodal measures during real world contexts. Human faces in natural settings are primary sources of socially\ncommunicated information but are traditionally studied in non-interactive contexts. Faces not only carry the\nstructural information that serves identification, but also communicate social cues driven by live and spontaneous\ndynamics that convey emotion, direct attention, and regulate eye-to-eye contact. However, this domain of live\nand natural interacting faces has not been widely studied due to the absence of reliable and validated\nmeasurement methods appropriate for observing such interaction under ecologically valid conditions. We\naddress this knowledge gap here by proposing to establish a Social Interaction Suite (SIS) of synchronized\nneural and behavioral tools designed for measurements of cognitive networks associated with processing facial\ncues and their correlated behaviors exchanged in live social interactions. SIS is developed on a neural imaging\nplatform based on functional near infrared spectroscopy (fNIRS), a head mounted optical imaging system, to\nacquire hemodynamic signals that originate from superficial cortex. This suite of tools will include simultaneous\nand synchronized electroencephalography (EEG), eye-tracking, pupillometry, facial feature tracking and\nassociated emotive categorization, subjective responses (dial ratings), and physiological monitoring during live\neye-to-eye contact and emotional contagion tasks. Prior studies of dyadic face interactions provide evidence that\nreal faces engage specialized neural circuits beyond the well-known ventral stream face processing circuits and\ninclude right superior temporal gyrus (rSTG), supramarginal gyrus (rSMG) and angular gyrus (rAG). Eye-to-eye\ncontact additionally engages regions in the dorsal parietal area, right somatosensory cortex (rSSAC). We aim\nto advance a theoretical framework for this interactive face and eye-contact model by testing the hypothesis that\nthe live-face and the eye-to-eye contact systems are dissociable cortical pathways. Validation and\ncharacterization of the model will be performed by continuous transcranial brain stimulation (cTBS) to disrupt\ncandidate regions in the live face processing systems at sites informed by the previous pilot fNIRS and behavioral\ndata. Following the completion of the initial tool development and validation phase, the obtained results will be\nused in the application of functionally defined multi-electrode targeted transcranial direct current stimulation\n(tDCS) to test hypotheses related to up and down regulation of the dorsal parietal and lateral face processing\nregions. Successful manipulation of eye contact under excitatory and inhibitory tDCS stimulation of the dorsal\nregion will extend our cTBS results and provide proof of concept for the application of neural modulation as a\ntool for facilitating social interaction." ], - "role_source": [ - "reporter" + "award_amount": [ + "605277" + ], + "description": [ + "Neural and Behavioral Correlates of Live Face-to-Face Interactions" + ], + "external_url": [ + "https://reporter.nih.gov/project-details/1R61MH138705-01" + ], + "fiscal_year": [ + "2026" + ], + "grant_number": [ + "R61MH138705" + ], + "keywords": [ + "Face-to-face interactions", + "Facial keypoint extraction", + "Micro-dynamics", + "Social coupling" + ], + "mechanism": [ + "R61" + ], + "name": [ + "R61MH138705" + ], + "nih_link": [ + "https://reporter.nih.gov/project-details/1R61MH138705-01" + ], + "onboarding_status": [ + "not_started" + ], + "reporter_project_num": [ + "5R61MH138705-02" + ], + "studies_human": [ + "true" + ], + "title": [ + "Neural and Behavioral Correlates of Live Face-to-Face Interactions" ] }, "out": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/5fd6169e-d169-41be-8cd0-e8a691f0b345" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/fd825a1b-0bb9-4d2d-83e0-d901810e15b5" }, { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" - } - ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/d0517883-23dc-4702-9f1b-374497c94486", - "class": "ProjectRole", - "label": "co_pi on R61MH138713", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40" + }, { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/b050adf2-88b1-42e2-912b-2843d5b96854" + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/006caa68-8b24-474f-867f-82a6199a84b1" }, { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" - } - ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/9217ceed-1e78-4c40-b15b-66077b5569db", - "class": "ProjectRole", - "label": "co_pi on R61MH138967", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/851882bb-3321-45ed-af75-6ae08836c1fc" + }, { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/0a076358-2298-4693-b3cf-d75114552163" + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/d8cef433-7209-4e63-bdd5-a3f52bd9dd89" }, { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/797fd7cf-49dc-40a2-811d-aeec94460ead" - } - ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/b096be30-abda-4dbf-b167-4dea42f69dfa", - "class": "ProjectRole", - "label": "co_pi on R61MH138967", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3" + }, { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/f4d7cfd7-30aa-4f19-8601-f85f9689884a" + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e2c21bfc-1707-4f6d-aa18-c6db03f53c2d" }, { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/797fd7cf-49dc-40a2-811d-aeec94460ead" - } - ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/58923333-d8e5-4e54-a86d-c229e523fec8", - "class": "ProjectRole", - "label": "co_pi on U01DA063534", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e9d52180-5701-46ba-b5dc-7fc6fa32233b" + }, { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/0f0ad5c2-496b-42a8-91b7-b798742bcdc3" + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/f328ad53-2dd2-490f-adf1-40e9cd85b5bd" }, { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/1e2423ff-965b-4485-8557-797c1e1dee38" + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" } ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/c3efc4fa-34d8-4630-93b5-7dd34f4e03cd", - "class": "ProjectRole", - "label": "co_pi on U01DA063534", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "in": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/b1b421fc-5477-4c2f-8968-ab757344ab2d" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/66819421-258e-42c3-b30a-5ed7345463e3" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/1e2423ff-965b-4485-8557-797c1e1dee38" + "source": "https://brain-bbqs.org/id/role/173d4dd7-5a55-48f7-b5ee-e08bfe25ac71" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 12, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/cee6c154-1e7f-4a7a-afa7-5117b7f7e384", - "class": "ProjectRole", - "label": "co_pi on U01DA063534", + "id": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae", + "class": "Project", + "label": "R61MH138713 · Combining neural oscillations, physiology and privacy-preserving LiDAR/millimeter wave sensing technology to track attention states in natural contexts", "facts": { - "project_role": [ - "co_pi" + "abstract": [ + "Project Summary\nImpairments of attention are common across neurodevelopmental disorders (e.g., ADHD), and contribute to\nnegative life outcomes such as in academic achievement. Critically, leading treatment strategies are ineffective\nat improving educational outcomes. Lacking is assessment of attention deficits in real-life contexts, where\nvisuospatial attention circuitry is influenced by interactions with regulatory systems including arousal and\nmotivation. As such, tracking of neuro-behavioral attention states in natural environments has been\nincreasingly recognized as crucial to: (i) understanding the interaction between neural circuitry of attention and\nregulatory influences, and (ii) identifying pathways to improving behavioral outcomes. Several technical\nchallenges in this effort exist, however, and include quantification and synchronization of objective measures\nof such interacting systems with neural indicators of attention, portability of such multi-modal assessment\nsystems, and increasingly, protection of privacy, with video recordings a gold standard in the field. The\nobjective of this R61/33 proposal is to address these challenges.\nWe will (Aim 1) develop an integrated, portable sensor suite for concurrent recording of neural activity,\nphysiological arousal, motor signals, and physical interactions in social environments. We will integrate our\npreviously developed tracking of neural oscillatory features of visual attention with additional sensors (heart\nrate, motor, and novel LiDAR/millimeter wave sensing) to extract physiological and movement-derived\nfeatures of arousal and motivation. Project milestones quantify our aims to (i) optimize synchronization &\nportability, while (ii) introducing privacy-preservation technology to eliminate reliance on video recordings, and\n(iii) achieve above-chance classification of system states, and overall attention state as expressed in behavior.\nNext, we will deploy this technology to explain and predict neuro-behavioral attention states during mock-\nclassroom and real-classroom learning activities, while manipulating contextual variables such as degree of\nattention support (group vs individual work), motivation (rewarded activities) and arousal (testing context). We\nwill test the hypotheses (Aim 2) that (i) a multi-dimensional profile of attention states will improve prediction of\nneural activity and behavioral attention states and delineate how visual attention circuitry and regulatory\ninfluences interact in natural contexts, while also (ii) accounting for individual variability in inattention by\ndifferentiating between causal pathways to inattention, and (iii) identifying individual learning contexts that\noptimize an individual’s attention.\nThe result of the project will be a scalable, integrated, portable technology designed to improve the accuracy\nof determining sources of inattention on individual basis, thus allowing for more targeted treatments." ], - "role_source": [ - "reporter" + "award_amount": [ + "601485" + ], + "description": [ + "Combining neural oscillations, physiology and privacy-preserving LiDAR/millimeter wave sensing technology to track attention states in natural contexts" + ], + "external_url": [ + "https://reporter.nih.gov/project-details/1R61MH138713-01" + ], + "fiscal_year": [ + "2026" + ], + "grant_number": [ + "R61MH138713" + ], + "keywords": [ + "Attention states", + "LiDAR", + "Millimeter wave", + "Neural oscillations", + "Privacy-preserving" + ], + "mechanism": [ + "R61" + ], + "name": [ + "R61MH138713" + ], + "nih_link": [ + "https://reporter.nih.gov/project-details/1R61MH138713-01" + ], + "onboarding_status": [ + "not_started" + ], + "reporter_project_num": [ + "5R61MH138713-02" + ], + "studies_human": [ + "true" + ], + "title": [ + "Combining neural oscillations, physiology and privacy-preserving LiDAR/millimeter wave sensing technology to track attention states in natural contexts" ] }, "out": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/27d7f30b-e152-4999-a63e-8dd4e800f3bc" - }, + "predicate": "produced", + "target": "https://brain-bbqs.org/id/162437eb-ce44-46a5-b994-5741d334c6fb" + }, { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/1e2423ff-965b-4485-8557-797c1e1dee38" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/1c345b47-9c5c-4a88-a8e4-bd8737d97483" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/39a5e171-49ad-4125-bb84-9feb6e3ef28e" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/42fe776f-9741-4820-a9c4-d11b14474575" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/4318c6a2-b27a-4d99-b209-f55c57a824eb" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/563136c5-57a1-44da-9364-e1c22ce685f8" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/6e93a7ef-b7d8-45c7-891f-0b42a690f4ed" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/7e3ed91a-e0eb-45d6-aa86-cb785dfba7ba" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/7e6d2d83-a6f6-449d-96cf-c8b0a014e86f" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/9b2f7713-e1e1-4bd6-a2d3-2bfc9f00cd11" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/a0ce7dc8-e0b9-4b44-85b8-8955d6a36a59" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/e483d68e-7bc8-4fcb-9a75-3d97825c02c9" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/e6a2c1d6-43e9-4dd7-b24d-769b7c8ac4a8" + }, + { + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/006caa68-8b24-474f-867f-82a6199a84b1" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/851882bb-3321-45ed-af75-6ae08836c1fc" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e2c21bfc-1707-4f6d-aa18-c6db03f53c2d" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/f328ad53-2dd2-490f-adf1-40e9cd85b5bd" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" } ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/182007aa-956e-44c7-92ff-39e22486c0a1", - "class": "ProjectRole", - "label": "co_pi on U01DA063565", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "in": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/c140b518-3ea9-4cad-a8b2-c7b30385589b" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/caef691a-ad28-4fbe-b098-6536757b49d6" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/bf3493c0-de28-4731-9baf-c976ccc7c484" - } - ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/99b4e8a5-97d9-4392-9cfd-da2d0cc46470", - "class": "ProjectRole", - "label": "co_pi on U01DA063565", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "source": "https://brain-bbqs.org/id/role/bd6b0699-938f-4117-94d2-97177837e94c" + }, { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/03f8e307-5f04-4d22-9aef-c1bb9d3e6905" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/4ee3ec6b-290f-4731-b8af-788bc47217e8" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/bf3493c0-de28-4731-9baf-c976ccc7c484" + "source": "https://brain-bbqs.org/id/role/63cd8c2a-0860-4130-857c-c33765b115d5" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/d0517883-23dc-4702-9f1b-374497c94486" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 25, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/a8d46449-f002-41d2-8fad-ee7cd5126178", - "class": "ProjectRole", - "label": "co_pi on U01DA063565", + "id": "https://brain-bbqs.org/id/adc6c1dd-57a9-49bb-a57d-521fd1208a76", + "class": "Project", + "label": "R61MH138966 · A naturalistic multimodal platform for capturing brain-body interactions in people during physical effort-based decision making", "facts": { - "project_role": [ - "co_pi" + "abstract": [ + "PROJECT SUMMARY\nThe challenge of understanding how neural activity results in human behavior and cognition in health and disease is a\ncrucial one for neuroscience. Traditional research methods often employ abstract tasks focusing on discrete cognitive\nprocesses, which may not fully capture the complexity of real-world behaviors and their neural underpinnings. This\nlimitation has hindered progress in understanding and treating psychiatric disorders. In particular, motivational deficits,\ncharacterized by a reduced propensity to expend effort for rewarding outcomes, are pervasive across various disorders like\nmajor depression as well as many others (e.g., Parkinson's disease, schizophrenia). This deficit in effort-based decision-\nmaking (EBDM) leads to reduced quality of life in patients who experience these symptoms. To address this gap, there is\na need to employ naturalistic paradigms with concurrent measurements of different systems of the body to characterize\nbehavior comprehensively. The proposed project aims to develop and pilot a platform for synchronized multimodal\nmeasurement, the HOlistic Realtime Measurement of Effort-based deciSion-making (HORMES) system. The HORMES\nsystem will be centered around a new naturalistic EBDM (nEBDM) task in an immersive virtual environment requiring\neffortful locomotion. The system will measure behavior across decision-making, embodied, affective, and clinical\ndomains, synchronized with measurements of relevant neural circuits at appropriate spatial and temporal scales, and\ninclude new analysis methods based on latent variable models to characterize brain-body interactions.\nThe project consists of two phases: the R61 phase activities will include the design and refinement of the HORMES\nsystem using data from healthy participants and patients with major depression, while the R33 phase will pilot the system\nin a clinical trial with treatment-resistant depression patients undergoing subcallosal cingulate cortex deep brain\nstimulation. This experimental neuromodulation therapy often leads to changes in psychomotor, interoceptive, and\ncognitive symptoms at different timescales, as well as provides access to intracortical electrophysiology with extreme\nspatial specificity in a brain network known to be critical in nEBDM. Taken together, this trial is an ideal context for a\npilot evaluation of the HORMES system in a longitudinal study. Furthermore, the project integrates neuroethics research\nand involves the creation of a Council of Lived Experience Advocates (CLEA), comprising patients with intracranial\nimplants across a variety of disorders. The CLEA will provide input on the HORMES project and offer guidance on the\nethical implications and future applications of high-resolution biobehavioral data. Successful completion of the project is\nexpected to advance our understanding of motivational deficits and inform novel treatment for symptoms, representing a\nsignificant step towards bridging the gap between basic neuroscience research and clinical practice in psychiatry." ], - "role_source": [ - "reporter" + "award_amount": [ + "999986" + ], + "description": [ + "A naturalistic multimodal platform for capturing brain-body interactions in people during physical effort-based decision making" + ], + "external_url": [ + "https://reporter.nih.gov/project-details/5R61MH138966-02" + ], + "fiscal_year": [ + "2026" + ], + "grant_number": [ + "R61MH138966" + ], + "keywords": [ + "Brain-body interactions", + "Effort-based decision making", + "Neuroeconomics", + "Physical exertion" + ], + "mechanism": [ + "R61" + ], + "name": [ + "R61MH138966" + ], + "nih_link": [ + "https://reporter.nih.gov/project-details/5R61MH138966-02" + ], + "onboarding_status": [ + "not_started" + ], + "reporter_project_num": [ + "5R61MH138966-02" + ], + "studies_human": [ + "true" + ], + "title": [ + "A naturalistic multimodal platform for capturing brain-body interactions in people during physical effort-based decision making" ] }, "out": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/831a48e1-025d-499a-bf11-83d05285ed4b" + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40" }, { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/bf3493c0-de28-4731-9baf-c976ccc7c484" + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/006caa68-8b24-474f-867f-82a6199a84b1" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/851882bb-3321-45ed-af75-6ae08836c1fc" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e2c21bfc-1707-4f6d-aa18-c6db03f53c2d" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e9d52180-5701-46ba-b5dc-7fc6fa32233b" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/f328ad53-2dd2-490f-adf1-40e9cd85b5bd" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" } ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/1de9735a-b2fe-4554-85a2-01fb284ebd01", - "class": "ProjectRole", - "label": "co_pi on U01DA063581", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "in": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/3161638e-fa1b-4af1-a998-a34139b2a0b1" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/a474b99d-19ed-4d37-b39f-c22ba57b2101" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/a98fe953-d2ad-4770-8c8c-1759f8500c4a" + "source": "https://brain-bbqs.org/id/role/8730c049-9ec8-4a10-9e6f-0e5f0b33144e" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 10, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/63311822-3561-4d3f-929d-42da23209e90", - "class": "ProjectRole", - "label": "co_pi on U01DA063581", + "id": "https://brain-bbqs.org/id/797fd7cf-49dc-40a2-811d-aeec94460ead", + "class": "Project", + "label": "R61MH138967 · A Day in the Life of the Human Brain: Investigating the Dynamic Interrelationship Between Brain, Cognition, Behavior, and Physiology", "facts": { - "project_role": [ - "co_pi" + "abstract": [ + "Summary/Abstract\nWhether we are fatigued from a teleconference call, eager to read a book, energetic and ready to start our day or\ntired and preparing for sleep, anxious or happy, in the real world key neurocognitive processes and moods\nfluctuate over minutes-to-hours. Hunger, circadian rhythms, hormone levels, blood sugar, heart rate, body\ntemperature, all fluctuate at the mesoscopic timescale of minutes-to-hours modulating how we respond to the\nworld. For example, the response of the brain to the odor of fresh cookies just out of the oven is different when\none is hungry versus for someone who just ate. These state fluctuations also influence why the same event will\ntrigger pathological symptoms at some times, but not others, in individuals with neurological or psychiatric\ndisorders. Despite the critical importance of interrelated brain, cognitive, behavioral, and physiological\nfluctuations at the timescale of minutes-to-hours in the real world, nearly everything we know about human\nbrain function mostly comes from highly controlled experiments lasting milliseconds-to-seconds, or longitudinal\nstudies from months-to-years. This has left a critical gap in scientific knowledge regarding the dynamics of brain,\ncognitive, behavioral, and physiological interactions at the timescale of minutes-to-hours in real world settings.\n To fill this gap, we will develop a platform for measuring and analyzing brain activity, cognitive states,\nbehavior, and physiology leveraging the unique opportunity to record multiday neural activity during natural\nbehavior in the real world in individuals undergoing the surgical treatment for epilepsy. We will integrate cutting-\nedge wearable and artificial intelligence technology for rich behavioral and physiological monitoring along with\nneural network and dynamical systems learning approaches. We will rigorously quality control and validate this\nplatform to ensure the highest quality data. We will also perform a bioethics study to develop a paradigm that\naddresses the unique privacy concerns that arise in using ubiquitous measurements for real-world neuroscience\nin this participant population. In the R33 phase of this project, we will then use this platform to examine how\nbrain, cognitive, behavioral, and physiological interrelationships fluctuate with circadian rhythms and relate to\nbrain network excitability. Given the ubiquity of circadian rhythms across the brain and body, their influence on\ncognition and behavior, and their relationship with many neurological and psychiatric disorders, the R33 study\nhas broad implications for both our understanding of the brain and for potential treatment strategies for many\ndisorders. For example, knowing when brain networks are in high or low excitability states can suggest windows\nof opportunity for maximally beneficial clinical interventions. The development of this integrated brain,\ncognitive, behavioral, and physiological measurement and analysis platform in the R61 phase of this project will\nopen up new neuroscientific and translational research opportunities. The studies on circadian rhythms and\nbrain network excitability in the R33 phase will lead to new understanding of these important neurobiological\nprocesses and provides insights with broad clinical and translational implications." ], - "role_source": [ - "reporter" - ] - }, - "out": [ - { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/93a3260d-e267-451b-9960-06cc9ae3a40c" - }, - { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/a98fe953-d2ad-4770-8c8c-1759f8500c4a" - } - ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/bf0e6573-c228-4923-badd-e3667105e287", - "class": "ProjectRole", - "label": "co_pi on U01DA063581", - "facts": { - "project_role": [ - "co_pi" + "award_amount": [ + "1004971" ], - "role_source": [ - "reporter" + "description": [ + "Summary/Abstract\nWhether we are fatigued from a teleconference call, eager to read a book, energetic and ready to start our day or\ntired and preparing for sleep, anxious or happy, in the real world key neurocognitive processes and moods\nfluctuate over minutes-to-hours. Hunger, circadian rhythms, hormone levels, blood sugar, heart rate, body\ntemperature, all fluctuate at the mesoscopic timescale of minutes-to-hours modulating how we respond to the\nworld. For example, the response of the brain to " + ], + "fiscal_year": [ + "2026" + ], + "grant_number": [ + "R61MH138967" + ], + "mechanism": [ + "R61" + ], + "name": [ + "R61MH138967" + ], + "nih_link": [ + "https://reporter.nih.gov/project-details/1R61MH138967-01" + ], + "onboarding_status": [ + "not_started" + ], + "reporter_project_num": [ + "1R61MH138967-01" + ], + "studies_human": [ + "true" + ], + "title": [ + "A Day in the Life of the Human Brain: Investigating the Dynamic Interrelationship Between Brain, Cognition, Behavior, and Physiology" ] }, "out": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/f2372c9c-91ac-449f-8ae8-182327e93a85" + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40" }, { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/a98fe953-d2ad-4770-8c8c-1759f8500c4a" - } - ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/da20601e-5e20-41cc-a57b-63e66c143df4", - "class": "ProjectRole", - "label": "co_pi on U01MH144347", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/006caa68-8b24-474f-867f-82a6199a84b1" + }, { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/3516554a-8253-4773-af22-a89b3ccb3267" + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/851882bb-3321-45ed-af75-6ae08836c1fc" }, { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/8095d361-d12f-4015-86e7-67fced46f2e9" + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e2c21bfc-1707-4f6d-aa18-c6db03f53c2d" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/f328ad53-2dd2-490f-adf1-40e9cd85b5bd" } ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/dbaa6f57-01e4-4168-88fa-7fa673a6cf6f", - "class": "ProjectRole", - "label": "co_pi on U01MH144347", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "curator" - ] - }, - "out": [ + "in": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/e0179c68-8fe6-48ca-9140-84a567b5f661" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/9217ceed-1e78-4c40-b15b-66077b5569db" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/8095d361-d12f-4015-86e7-67fced46f2e9" - } - ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/f2d69865-0ee2-4b99-81e8-b84658c9eb1e", - "class": "ProjectRole", - "label": "co_pi on U01MH144347", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "curator" - ] - }, - "out": [ + "source": "https://brain-bbqs.org/id/role/6344ea60-1fad-4b96-ac49-43e00f2acf04" + }, { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/961fb77d-16c1-4efd-9fc7-ac7bd552c983" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/776f6ad8-5dbf-4a6b-a49e-4bdff826a969" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/8095d361-d12f-4015-86e7-67fced46f2e9" + "source": "https://brain-bbqs.org/id/role/29154919-0da2-4db6-a005-c5cf8451746d" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/b096be30-abda-4dbf-b167-4dea42f69dfa" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 10, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/f9acc694-4a05-45f7-b0be-24c6dd4a7637", - "class": "ProjectRole", - "label": "co_pi on U01MH144347", + "id": "https://brain-bbqs.org/id/cbc8640e-6d05-4872-bf01-6e3f7d89c349", + "class": "Project", + "label": "R61MH142354 · Multimodal AI-enabled synchronized neural, physiological, and behavioral recordings in humans during unstructured behavior to study dynamic task control", "facts": { - "project_role": [ - "co_pi" + "abstract": [ + "Project summary\nComplex human behavior - such as driving a car - involves the flexible sequencing of many brief tasks in order\nto achieve a goal. Current constrained cognitive tasks completely miss this “task control” aspect of cognition,\nleaving us with little understanding of the underlying mechanisms. The behavior of subjects with lesions in the\nfrontal cortex or with neuropsychiatric disease illustrates what is being missed: such patients can often perform\nsimple behaviors, but fail to properly sequence these behaviors to achieve a goal. Therefore, the fundamental\ndeficit that these patients suffer from is not visible during simple behaviors, making its study impossible. There\nare two major challenges to studying sufficiently complex behavior that involves task control. First one needs to\nquantify complex unconstrained behaviors such as social interactions or driving a car. Second, one needs to\nsimultaneously observe human brain activity at cellular-level resolution. Here, as part of the BRAIN initiatives\nBrain and Behavior Quantification and Synchronization consortium, we tackle these challenges by (i)\ndeveloping instrumentation to monitor and quantify human behavior in unprecedented detail, and (ii) combining\nthis new system with large-scale recordings from single neurons in the brains of epilepsy patients. We will\ndevelop a system to acquire and synchronize multi-modal streams of behavioral data, including a head-\nmounted eye tracking device to track gaze position, egocentric and allocentric video and audio, and a wearable\ndevice to track biophysiological signals (Aim 1, R61). This data will then be labeled automatically using artificial\nintelligence methods, including labeling objects fixated by the subject, transcribing what is being said from\naudio, and identifying behavioral states based on the biophysiology (Aim 2). The new system will be validated\nfor two use cases: ambulatory control subjects and patients in the epilepsy monitoring unit. We will then utilize\nthe newly developed system to examine the neural mechanisms of task control with synchronized\nsimultaneous single-neuron recordings in human epilepsy patients (Aim 3). We will identify behavioral and\nneural modules (“microtasks”) and the sequence by which they are engaged, and will then examine the\noverarching hypothesis that groups of neurons are specialized for executing a specific microtask. These\nexperiments promise to reveal new insights into the brain architecture of task control that were made possible\nby the availability of quantified multi-modal behavior. Lastly, an overarching aim is to construct and train a large\nfoundation model that learns relationships between the different streams of behavior and the neural recordings.\nOur system will be released as open source and requires only commercially available devices and a cellphone,\nmaking the system widely available for others to use in their research. Our multi-modal behavior and\nsynchronized neural recording approach will lay the groundwork for revealing how the human brain achieves\n“task control”, an understanding of which is urgently needed to develop new treatments for the effects of frontal\nlobe lesions and psychiatric diseases that affect executive control." ], - "role_source": [ - "reporter" + "award_amount": [ + "1417650" + ], + "description": [ + "Project summary\nComplex human behavior - such as driving a car - involves the flexible sequencing of many brief tasks in order\nto achieve a goal. Current constrained cognitive tasks completely miss this “task control” aspect of cognition,\nleaving us with little understanding of the underlying mechanisms. The behavior of subjects with lesions in the\nfrontal cortex or with neuropsychiatric disease illustrates what is being missed: such patients can often perform\nsimple behaviors, but fail to prope" + ], + "fiscal_year": [ + "2026" + ], + "grant_number": [ + "R61MH142354" + ], + "mechanism": [ + "R61" + ], + "name": [ + "R61MH142354" + ], + "nih_link": [ + "https://reporter.nih.gov/project-details/1R61MH142354-01" + ], + "onboarding_status": [ + "not_started" + ], + "reporter_project_num": [ + "1R61MH142354-01" + ], + "studies_human": [ + "true" + ], + "title": [ + "Multimodal AI-enabled synchronized neural, physiological, and behavioral recordings in humans during unstructured behavior to study dynamic task control" ] }, "out": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/fedfc5af-eb8e-4ee5-88e7-a18ab2f00b26" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/1424d10f-795c-47e5-a6d7-d6705fad611a" + } + ], + "in": [ + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/182058c5-770d-4ac3-984a-ea1f4d8d48f1" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/8095d361-d12f-4015-86e7-67fced46f2e9" - } - ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/39fa5a3f-6869-4e43-a085-b6d94ee497fa", - "class": "ProjectRole", - "label": "co_pi on U24DA064429", - "facts": { - "project_role": [ - "co_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "source": "https://brain-bbqs.org/id/role/bc9cb644-1dc5-4caf-ae76-da464cb8e2dc" + }, { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/b359432d-39e2-4ab8-bb3b-16afe458820c" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/2c2dc99f-9c5e-43ad-8c5a-7012d2feedba" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" + "source": "https://brain-bbqs.org/id/role/a2f1ea9f-aab3-4407-b7d3-4570537c2678" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 5, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/800262fc-b2dd-4041-ab94-e9cf166d50b3", - "class": "ProjectRole", - "label": "co_pi on U24DA064429", + "id": "https://brain-bbqs.org/id/1e2423ff-965b-4485-8557-797c1e1dee38", + "class": "Project", + "label": "U01DA063534 · Toward comprehensive models of naturalistic cooperation and competition in primates", "facts": { - "project_role": [ - "co_pi" + "abstract": [ + "Project Summary\nThe flexible ability to work together for mutual benefits while competing against others for limited resources is a\nhallmark of advanced social cognition. Cooperative and competitive interactions are highly dynamic and\ncomplex. However, studying the precise behavioral mechanisms of these interactions has been challenging.\nThis is partly due to the fact that the standard animal models in lab studies do not reliably cooperate. Moreover,\ntypical studies do not include multidimensional behavioral measurements that are essential to understand such\ncomplex interactions. Therefore, there is a need to investigate complex social interactions in a species whose\nsocial structure strongly depends on both cooperation and competition, while tracking multiple action-based and\ninternal state-related variables to obtain a comprehensive understanding of social behavior. The marmoset is an\nexcellent species for studying complex social interactions grounded in context-dependent cooperative and\ncompetitive tendencies within their natural ethology. The first major goal of this proposal is to simultaneously and\ncontinuously collect multidimensional biobehavioral measurements, both action-based and internal state-based,\nduring naturalistic cooperative and competitive interactions between freely moving marmosets. We aim to\nunderstand the functional and directionally causal dependencies of these biobehavioral variables in cooperative\nand competitive behaviors. The second major goal is to build comprehensive and empirically testable generative\nmodels of primate social interaction and to validate our understanding iteratively between the models and the\nexperiments. We will use multiple modeling approaches to exploit their strengths: multi-agent reinforcement\nlearning with recurrent neural networks will be used to learn complex patterns for prediction, and the structure\nand inputs to these models will be informed by dynamic Bayesian networks to increase the interpretability of the\nmodels. We will use an embodied agent-based framework, with the recurrent neural networks driving\nmusculoskeletal models of marmosets, to better model cooperative and competitive interactions of nonhuman\nprimates. With the comprehensive biobehavioral data and the musculoskeletal model, we will build generalizable\nmodels of primate social interaction via a multi-level constraints-based framework. Finally, we will validate the\ngenerative models of primate social interaction by inducing multiple types of in silico environmental and task\nmanipulations that are designed to predictably alter social strategies and carrying out those experiments in vivo\nthat significantly alter the resulting social strategy. Overall, we aim to provide the most comprehensive\nunderstanding of primate social interactions to date, along with novel generative models of such behavior." ], - "role_source": [ - "reporter" - ] - }, - "out": [ - { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/fe4790d5-bf32-469d-b098-cb4f44f6fa19" - }, - { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" - } - ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/3d109ffa-adb1-4a1e-b2fd-5f516280d7f7", - "class": "ProjectRole", - "label": "contact_pi on R24MH136632", - "facts": { - "project_role": [ - "contact_pi" + "award_amount": [ + "4888497" ], - "role_source": [ - "reporter" + "description": [ + "Toward comprehensive models of naturalistic cooperation and competition in primates" + ], + "external_url": [ + "https://reporter.nih.gov/project-details/1U01DA063534-01" + ], + "fiscal_year": [ + "2025" + ], + "grant_number": [ + "U01DA063534" + ], + "keywords": [ + "Competition", + "Cooperation", + "Embodied framework", + "Marmosets", + "Recurrent Neural Networks" + ], + "mechanism": [ + "U01" + ], + "name": [ + "U01DA063534" + ], + "nih_link": [ + "https://reporter.nih.gov/project-details/1U01DA063534-01" + ], + "onboarding_status": [ + "not_started" + ], + "reporter_project_num": [ + "1U01DA063534-01" + ], + "studies_human": [ + "false" + ], + "title": [ + "Toward comprehensive models of naturalistic cooperation and competition in primates" ] }, "out": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/d2f77d44-3a20-4759-be29-69403ae039ef" + "predicate": "produced", + "target": "https://brain-bbqs.org/id/31b0954a-08ab-46b1-a4e3-39a951d09e23" }, { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/bef479f9-d7a4-472b-8ff7-eb0b098beb7c" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" } ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/92a2b8eb-f9ed-422a-9a23-d8a9e12cf331", - "class": "ProjectRole", - "label": "contact_pi on R34DA059500", - "facts": { - "project_role": [ - "contact_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "in": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/6fe1f186-133e-4490-b50b-4e5d7d4c6347" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/baae3ddb-11fc-48ce-a5f1-23a481b233da" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608" - } - ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/a8f54c17-5723-4efe-99dd-6568342c734d", - "class": "ProjectRole", - "label": "contact_pi on R34DA059506", - "facts": { - "project_role": [ - "contact_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "source": "https://brain-bbqs.org/id/role/58923333-d8e5-4e54-a86d-c229e523fec8" + }, { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/24981995-2cd1-407a-9d2c-0f89f026edeb" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/714db00c-3814-4ee2-878e-332e1894bc11" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/4f2619b1-a6a4-48e5-b21a-0f5455354ea9" + "source": "https://brain-bbqs.org/id/role/cee6c154-1e7f-4a7a-afa7-5117b7f7e384" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/4d3e76c2-2bbb-43b6-9950-982b6ac296cd" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/c3efc4fa-34d8-4630-93b5-7dd34f4e03cd" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/82015065-d290-4efc-982b-75d67daa4d00" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/b87d800c-a0aa-4ea4-aa2e-4fba4fbf8480" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 12, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/b6d6fbfc-f005-41e9-8e22-6651720030f6", - "class": "ProjectRole", - "label": "contact_pi on R34DA059507", + "id": "https://brain-bbqs.org/id/bf3493c0-de28-4731-9baf-c976ccc7c484", + "class": "Project", + "label": "U01DA063565 · Neurobehavioral Mechanisms of Social Behavior and Familial Structure", "facts": { - "project_role": [ - "contact_pi" + "abstract": [ + "Project Summary\nThe family is the canonical basis of social structure for mammalian species. Families help ensure that offspring\nsurvive, learn pivotal skills, and thrive. Adults initially find mates and have behavioral adaptations to ensure the\nwelfare of the mother and prepare for postnatal care. After parturition, offspring require intense caregiving by\none or more adults for nourishment, warmth, and protection over varying periods of postnatal development. This\ncommonly requires a lactating mother until infants transition to other food sources. Despite millennia of neuro-\nbehavioral adaptations, infant and adult mortality can be shockingly high, even in the seemingly ideal conditions\nof lab vivaria. In more natural environments, families must contend with other challenges: infection, weather,\npredators, and conspecific competition for scarce resources. The dynamic and unpredictable nature of such\nstressors means that flexible strategies are required for success and survival. This requires socially- or\nenvironmentally-induced neuroplasticity and complex decision-making in the face of life-or-death stakes.\n Here we propose a collaboration between behavioral neuroscientists, a theorist, and an engineer to\ndevelop and validate a new integrated system for life-long and high-resolution monitoring of mouse colony life.\nTechnological and computational advances over the last decade, in part pioneered by our groups, now enable\nstudies of neural circuits for social and parental behavior in complex environments in ways not formerly feasible\nor even possible. There have been major improvements in wireless recording, cell- and circuit-specific methods\nfor measuring and manipulating brain activity and behavior, algorithms for neural data analysis, methods for\nquantifying multi-animal behavioral interactions, and capacity to store and share large data sets. This now\nprovides an opportunity to build a theoretical and quantitative framework for understanding mouse social\nbehavior and family life, with models constrained by continuous video synchronized with neural recordings.\n Our main hypothesis is that the duties and challenges of parenting define many aspects of mouse adult\nsocial behavior. Specifically, we predict that the need to provide safety and support to offspring leads to\nsystematic engagement in territorialism, nest/burrow construction, foraging, mating, and then recruitment of co-\nparents initiated by the dam. In Aim 1, we will quantify behaviors in a new statistical framework of one or two\ncolonies of 5 mice each with a litter of pups, in 3-D engineered burrows with food and water above-ground, using\nmachine learning methods and a large data center provided by NYU. In Aim 2, we will validate and optimize a\nnew wireless high-frequency single-cell imaging system to reveal the activity of molecularly defined cell types as\nanimals engage in cooperative and competitive foraging and childcare, with a focus on the hypothalamus. In Aim\n3, we track individuals over time, perturbing specific hypothalamic cell types and updating our model to reflect\nindividual brain states and hormone systems on survival strategies." ], - "role_source": [ - "reporter" + "award_amount": [ + "1240576" + ], + "description": [ + "NIH Grant 1U01DA063565" + ], + "fiscal_year": [ + "2026" + ], + "grant_number": [ + "U01DA063565" + ], + "keywords": [ + "childcare", + "cooperative behavior", + "family structure", + "foraging", + "hypothalamus", + "neuroplasticity", + "parental behavior", + "social behavior", + "territorialism" + ], + "mechanism": [ + "U01" + ], + "name": [ + "U01DA063565" + ], + "nih_link": [ + "https://reporter.nih.gov/project-details/1U01DA063565-01" + ], + "onboarding_status": [ + "not_started" + ], + "reporter_project_num": [ + "1U01DA063565-01" + ], + "studies_human": [ + "false" + ], + "title": [ + "Neurobehavioral Mechanisms of Social Behavior and Familial Structure" ] }, "out": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/98076d7b-270f-4a2a-af91-53d1b7644c90" + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/9f227f88-53ba-4c7c-91e7-334641e4b759" }, { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/e285ab2b-1a7d-4b2e-9400-b24d6faff6de" + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" } ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/b6d62f54-1ff5-4355-8623-69dbe88aa41e", - "class": "ProjectRole", - "label": "contact_pi on R34DA059509", - "facts": { - "project_role": [ - "contact_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "in": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/1f6fa922-b662-4325-aac7-cb622ac10ef3" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/182007aa-956e-44c7-92ff-39e22486c0a1" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" + "source": "https://brain-bbqs.org/id/role/a8d46449-f002-41d2-8fad-ee7cd5126178" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/99b4e8a5-97d9-4392-9cfd-da2d0cc46470" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/4fe6e211-9d96-4f8b-8753-c5a002e13b72" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 7, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/0bfdefd7-14a0-48aa-93c2-9f80f19e8e72", - "class": "ProjectRole", - "label": "contact_pi on R34DA059510", + "id": "https://brain-bbqs.org/id/a98fe953-d2ad-4770-8c8c-1759f8500c4a", + "class": "Project", + "label": "U01DA063581 · Computational Analyses of Family Auditory Communication: Linking Behavior, Vocalization, and Neural Dynamics", "facts": { - "project_role": [ - "contact_pi" + "abstract": [ + "PROJECT SUMMARY\nVocalizations and other bioacoustic signals convey an individual’s identity, location, and behavioral state and\nthese sounds are used to guide social-acoustic interactions. While much stellar research has been done on the\nneural basis of vocal communication, it has largely focused on brief, stereotyped interactions between unfamiliar\nadults in featureless test cages. Here, we propose to study auditory communication within a cohesive social unit,\nthe family, of a highly social species, Mongolian gerbils, in a stable, naturalistic setting. By integrating audio,\nvideo, and neural data, we aim to uncover the behavioral meaning of distinctive vocal bouts and test how cortical\nmechanisms support the use of these vocalizations to make social decisions. In Aim 1, we will create and\ndisseminate general-purpose machine learning tools for studying auditory communication within family groups\nliving in undisturbed naturalistic environments. Aim 1A will establish multi-animal 3D body pose tracking in\ncomplex spacious environments. Aim 1B will develop deep learning methods to noninvasively localize and\nattribute vocalizations to specific family members, focusing on the multi-second vocal bouts that dominate\nauditory communication. Aim 1C will integrate body pose, bioacoustic signals, and neural data with a 3D\nenvironment model using Gaussian splatting, enabling us to estimate how auditory signals are combined with\nline-of-sight information. In Aim 1D, we collaborate with a team at Princeton to extend and validate sound\nattribution methods in a different species, environment, and behavioral paradigm (mouse courtship) to establish\ngeneral-purpose and open-source tools for the field. Aim 2 develops a machine learning approach to extract low-\ndimensional behavioral descriptors from this large data set that are used as variables in our predictive models.\nIn Aim 2A, we extract recurring bouts of acoustically driven behavior using a mixture of expert-supervised and\ndata-driven, unsupervised approaches to annotate continuous streams of natural behavior. Computational\ninnovations are proposed, and we employ playback and hearing attenuation manipulations to test causal\nrelationships between vocal bouts and behavior. In Aim 2B, we use these latent features and contextual variables\nto build linear Bayesian models that predict future actions, permitting us to ask how individual behavioral traits\nare explained by social (e.g., kinship, sex, age) and environmental factors. Aim 2C will characterize how auditory\ncortex activity represents vocal bouts, social and environmental factors, and subsequent behavioral decisions.\nAim 3 will test the cortical network mechanisms that give rise to social and contextual modulation during auditory\ncommunication. In Aim 3A we will silence auditory or frontal cortices, as well as projections between the two,\nand measure how these perturbations influence behavior. In Aim 3B, we will record wirelessly from frontal cortex\nduring sound-driven social interactions." ], - "role_source": [ - "reporter" + "award_amount": [ + "854818" + ], + "description": [ + "NIH Grant 1U01DA063581" + ], + "fiscal_year": [ + "2026" + ], + "grant_number": [ + "U01DA063581" + ], + "keywords": [ + "3D body pose tracking", + "auditory cortex", + "bioacoustic signals", + "family groups", + "frontal cortex", + "machine learning", + "naturalistic environment", + "social decision making", + "sound localization", + "vocal communication" + ], + "mechanism": [ + "U01" + ], + "name": [ + "U01DA063581" + ], + "nih_link": [ + "https://reporter.nih.gov/project-details/1U01DA063581-01" + ], + "onboarding_status": [ + "not_started" + ], + "reporter_project_num": [ + "1U01DA063581-01" + ], + "studies_human": [ + "false" + ], + "title": [ + "Computational Analyses of Family Auditory Communication: Linking Behavior, Vocalization, and Neural Dynamics" ] }, "out": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/709c64f2-d02c-48f9-b286-b9222a106f27" + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/7f92ea75-530c-40bf-83a4-3e1eba4d4179" }, { - "predicate": "on_project", - "target": "https://brain-bbqs.org/id/e5bb6e4f-d3cf-44d4-ac1a-59f76724c0d2" + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/dac56889-e81e-478e-827d-7f08bb15efd3" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/e80e0495-82ff-4d51-995f-36e9349b40fb" + }, + { + "predicate": "uses_device_category", + "target": "https://brain-bbqs.org/id/ffee4fa8-d435-43e4-8c3d-9c4570b54ab0" } ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/role/df63e239-d918-4780-9eaa-ed34a5748f01", - "class": "ProjectRole", - "label": "contact_pi on R34DA059512", - "facts": { - "project_role": [ - "contact_pi" - ], - "role_source": [ - "reporter" - ] - }, - "out": [ + "in": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/24981995-2cd1-407a-9d2c-0f89f026edeb" + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/1de9735a-b2fe-4554-85a2-01fb284ebd01" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/1e1fc06b-fe5c-4ec2-9f64-474f98ae31e8" + "source": "https://brain-bbqs.org/id/role/14faecbb-11c6-469d-aea3-8a57dba85867" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/63311822-3561-4d3f-929d-42da23209e90" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/bf0e6573-c228-4923-badd-e3667105e287" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/c325fdf0-4dc3-43aa-a2de-5a3607476ac5" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 9, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/95b0b77d-e396-4d0b-b80e-4b80592a2db6", - "class": "ProjectRole", - "label": "contact_pi on R34DA059513", + "id": "https://brain-bbqs.org/id/8facb614-80ac-4873-8619-b37c2ad0ed62", + "class": "Project", + "label": "U01MH143789 · A smart lens platform for real-world event capture and synchronized deep brain dynamics", "facts": { - "project_role": [ - "contact_pi" + "abstract": [ + "Project Summary/Abstract\nPost-traumatic stress disorder (PTSD) is marked by emotional dysregulation, hyperarousal, and intrusive\nautobiographical memories, yet current tools lack the ability to objectively monitor these symptoms in real time,\nespecially outside clinical settings. This project will develop a self-powered smart contact lens (SCL) platform\nthat integrates high-speed pupillometry with battery-free biosensing of tear film neurochemicals including cortisol,\nserotonin, and neuropeptide Y to assess emotional and autonomic states during naturalistic experiences. The\nlens will communicate wirelessly with custom smart glasses that power the system, record synchronized audio\nand video, and trigger intracranial EEG (iEEG) recordings via a wearable electromagnet cap. We will deploy the\nsystem in ambulatory participants with existing iEEG recording devices implanted in the amygdala and\nhippocampus, both in lab and at home, to characterize the correspondence between peripheral biosignals and\nneural activity during emotionally salient experiences. By enabling mobile, multimodal tracking of emotional\narousal and stress in real-world contexts, this platform offers transformative potential for understanding and\ntreating PTSD and related affective disorders." ], - "role_source": [ - "reporter" + "award_amount": [ + "1368212" + ], + "description": [ + "Project Summary/Abstract\nPost-traumatic stress disorder (PTSD) is marked by emotional dysregulation, hyperarousal, and intrusive\nautobiographical memories, yet current tools lack the ability to objectively monitor these symptoms in real time,\nespecially outside clinical settings. This project will develop a self-powered smart contact lens (SCL) platform\nthat integrates high-speed pupillometry with battery-free biosensing of tear film neurochemicals including cortisol,\nserotonin, and neuropeptide Y to assess emotional and autonomic states during naturalistic experiences. The\nlens will communicate wirelessly with custom smart glasses that power the system, record synchronized audio\nand video, and trigger intracranial EEG (iEEG) recordings via a wearable electromagnet cap. We will deploy the\nsystem in ambulatory participants with existing iEEG recording devices implanted in the amygdala and\nhippocampus, both in lab and at home, to characterize the correspondence between peripheral biosignals and\nneural activity during emotionally salient experiences. By enabling mobile, multimodal tracking of emotional\narousal and stress in real-world contexts, this platform offers transformative potential for understanding and\ntreating PTSD and related affective disorders." + ], + "fiscal_year": [ + "2026" + ], + "grant_number": [ + "U01MH143789" + ], + "mechanism": [ + "U01" + ], + "name": [ + "U01MH143789" + ], + "onboarding_status": [ + "not_started" + ], + "reporter_project_num": [ + "1U01MH143789-01" + ], + "studies_human": [ + "true" + ], + "title": [ + "A smart lens platform for real-world event capture and synchronized deep brain dynamics" ] }, "out": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/be8d825d-140a-4d72-a39a-2534cf2b4145" + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/93fa0810-51f4-4e71-badf-e5e8d3e40dc3" + } + ], + "in": [ + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/c381ea7d-4332-4bf6-8491-474a2f6b6b41" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" + "source": "https://brain-bbqs.org/id/role/eedb7237-95d4-4633-8431-0a94da8db187" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/c33f2bff-071b-4550-9ea5-d3fd11e0ed0c", - "class": "ProjectRole", - "label": "contact_pi on R34DA059514", + "id": "https://brain-bbqs.org/id/8095d361-d12f-4015-86e7-67fced46f2e9", + "class": "Project", + "label": "U01MH144347 · SMART-DBS: A Symptom-Manipulating, Adaptive and Responsive Therapy for continuous brain-behavioral recording and stimulation", "facts": { - "project_role": [ - "contact_pi" + "abstract": [ + "Project Summary\nObsessive compulsive disorder (OCD) affects approximately 2.2 million adults worldwide, with more than\n200,000 cases and a socioeconomic impact exceeding $8 billion in the United States every year. Provisional\nFDA approval treats OCD by delivering deep brain stimulation (DBS). We propose that real opportunity lies in a\nvastly underused resource: the chronically implanted brain electrodes. To date, however, ambulatory intracranial\nelectroencephalographic (iEEG) recordings from DBS leads have only been available under very specific\nconditions and without the benefit of synchronized disease-relevant behavioral monitoring to provide necessary\ncontext. The goal of this 5-year milestone-driven clinical trial proposal is to unlock the potential of DBS leads for\ncontinuous sensing of brain activity, enabling the real-time tracking of internal states linked to the full spectrum\nof motor and non-motor symptoms in OCD. Today, long-term continuous brain sensing is not feasible due to\nlimitations in battery life, power delivery, and data transmission bandwidth in existing DBS systems. We aim to\novercome these barriers by integrating new telemetry and wireless power solutions into an innovative wearable\nplatform, SMART-DBS, that supports chronic streaming of neural signals along with physiological signals based\non muscle activity, heart rate variability and accelerometry to provide additional symptom sensing. We will also\ncollect validated symptom measures via patient-reported outcomes (e.g., digital scales), structured clinical\ninstruments, and app-based logging. By aligning chronic brain recordings with subjective and objective\nmeasures of clinical symptoms in OCD, we will link brain states to clinical outcomes. This project develops\ninnovative technologies to directly address the major challenges in brain-behavioral quantification and\nsynchronization in order to enable a follow-up trial to treat OCD using adaptive, responsive DBS. Progress will\nalso indirectly advance a range of next-generation clinical studies of the brain mechanisms of human behavior\nsuch as in Parkinsons, epilepsy, depression and other applications of DBS in ambulatory populations." ], - "role_source": [ - "reporter" + "award_amount": [ + "1653363" + ], + "description": [ + "Project Summary\nObsessive compulsive disorder (OCD) affects approximately 2.2 million adults worldwide, with more than\n200,000 cases and a socioeconomic impact exceeding $8 billion in the United States every year. Provisional\nFDA approval treats OCD by delivering deep brain stimulation (DBS). We propose that real opportunity lies in a\nvastly underused resource: the chronically implanted brain electrodes. To date, however, ambulatory intracranial\nelectroencephalographic (iEEG) recordings from DBS" + ], + "fiscal_year": [ + "2026" + ], + "grant_number": [ + "U01MH144347" + ], + "mechanism": [ + "U01" + ], + "name": [ + "U01MH144347" + ], + "nih_link": [ + "https://reporter.nih.gov/project-details/1U01MH144347-01" + ], + "onboarding_status": [ + "not_started" + ], + "reporter_project_num": [ + "1U01MH144347-01" + ], + "studies_human": [ + "true" + ], + "title": [ + "SMART-DBS: A Symptom-Manipulating, Adaptive and Responsive Therapy for continuous brain-behavioral recording and stimulation" ] }, "out": [ { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/09865181-38c6-44d9-aba4-68e373f0286d" + "predicate": "studies_species", + "target": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40" + } + ], + "in": [ + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/dbaa6f57-01e4-4168-88fa-7fa673a6cf6f" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/3846417f-c783-484b-9cfc-fbbf8f83fdf5" + "source": "https://brain-bbqs.org/id/role/f2d69865-0ee2-4b99-81e8-b84658c9eb1e" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/da20601e-5e20-41cc-a57b-63e66c143df4" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/53e6a0e7-68a8-457d-8fa8-0763d062dcda" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/f9acc694-4a05-45f7-b0be-24c6dd4a7637" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/9200c2fb-5bea-4d89-9115-1064c1387222" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/86c8c08c-3aa2-4ef9-a9a0-a7158781799b" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 8, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/3027bce5-12b7-4205-9873-9cc8efbed2c0", - "class": "ProjectRole", - "label": "contact_pi on R34DA059716", + "id": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152", + "class": "Project", + "label": "U24DA064429 · BBQS AI Resource and Data Coordinating Center (BARD.CC)", "facts": { - "project_role": [ - "contact_pi" + "abstract": [ + "SUMMARY\nUnderstanding the complex relationship between brain activity and behavior is one of the most exciting and\nchallenging pursuits in neuroscience. The proposed BBQS AI Resource and Data Coordinating Center\n(BARD.CC) aims to facilitate innovative research in this area by managing, sharing, and harnessing the power\nof vast amounts of data and machine learning resources generated by various projects within the BBQS\nconsortium. We will focus on five interrelated aims: 1) Data Management; 2) Data Standards; 3) Machine\nLearning and Artificial Intelligence (ML/AI) Resources; 4) Data Ecosystem; and 5) Dissemination, Training, and\nCoordination. The first aim is to serve as a hub for efficient data curation, management, and sharing. We will\ncollaborate with other BBQS projects and coordinate with existing BRAIN data archives to curate and\nharmonize project data. Data management will be handled by a combination of automated data ingestion and\nhuman oversight, transitioning to a fully automated system over time. We will work with scientists and relevant\ncommunities to implement robust quality assurance and control solutions. The second aim focuses on\nestablishing data standards for novel sensors and multimodal data integration, as informed by the use of\nexisting standards and best practices from similar efforts. We will aggregate relevant standards for data and\nmetadata, data processing methods, appropriate ontologies, and common data elements, and adapt as\nneeded for evolving methodologies. The third aim involves the development and definition of ML/AI resources\nfor BBQS. We will evaluate and curate relevant ML/AI models and platforms, aggregating datasets, models,\nand other ML/AI resources from both within and outside the BBQS consortium. These resources will be made\navailable to consortium members, with each resource's origin documented and evaluated for performance and\nethical generation and use. Moreover, all models will be made available through public repositories, allowing\nfor widespread access and utilization. The fourth aim involves creating a cloud-based data ecosystem and\ncomputational platform. We will collaborate with relevant archives and computing facilities to develop a\ncomputational platform in the cloud. This platform will enable access to and processing of even very large data\nsets with commonly used pipelines and provide a wide range of users, even those with limited resources, with\ncomputational capability to analyze and visualize data, models, and model outputs. Finally, the fifth aim is\ncentered around efficient dissemination, training, and coordination of BBQS research resources. We will\ncoordinate data sharing, offer training on relevant topics like neuroinformatics, neuroethics, and ML/AI, and\nmaintain a consortium Web portal. Furthermore, center staff will coordinate consortium activities like meetings,\nworking groups, and policy and ethics discussions, ensuring smooth and effective operation. In summary,\nBARD.CC aims to catalyze the discovery of valuable insights from intricate relationships between brain activity\nand behavior, which in turn could advance neuroscience and our understanding of the human mind." ], - "role_source": [ - "reporter" - ] - }, - "out": [ - { - "predicate": "held_by", - "target": "https://brain-bbqs.org/id/f34a38e7-364a-4091-8436-a8c52b684cc2" + "award_amount": [ + "1777333" + ], + "description": [ + "BBQS AI Resource and Data Coordinating Center (BARD.CC)" + ], + "external_url": [ + "https://reporter.nih.gov/project-details/U24DA064429" + ], + "fiscal_year": [ + "2026" + ], + "grant_number": [ + "U24DA064429" + ], + "keywords": [ + "BARD.CC", + "BrainKB", + "Data Coordinating Center", + "Federated ML", + "Infrastructure" + ], + "mechanism": [ + "U24" + ], + "name": [ + "U24DA064429" + ], + "nih_link": [ + "https://reporter.nih.gov/project-details/U24DA064429" + ], + "onboarding_status": [ + "not_started" + ], + "reporter_project_num": [ + "5U24DA064429-03" + ], + "studies_human": [ + "true" + ], + "study_scope": [ + "All Species" + ], + "title": [ + "BBQS AI Resource and Data Coordinating Center (BARD.CC)" + ] + }, + "out": [ + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/276aa727-0539-4f2b-9fa0-c0b86a868876" + }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/2a2ae141-5d5c-464a-809f-1e3a19a81293" }, + { + "predicate": "produced", + "target": "https://brain-bbqs.org/id/59585a8a-8f7e-4f02-af19-c40c797d9ddf" + } + ], + "in": [ { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/b02aaf9f-0a7e-4759-b1ba-cb100a2d4eed" + "source": "https://brain-bbqs.org/id/role/3df7974f-d227-4954-a984-3d403436fa70" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/540b143e-459b-41df-98bd-9ec0b18d9bd6" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/eed7f06b-7ec2-42e5-8307-da70b41c7482" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/c70a461e-5956-4c4f-aaba-40f11cc7b350" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/d1bb4677-b510-48ad-a89b-680830403a37" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/c6847ede-7f3e-4557-9af6-0740d2a0babc" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/29a72f60-6de3-4c19-928c-05cd16342d6e" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/d530f31d-a94a-4d0d-8e40-3c41610d768a" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/57b86bca-ace5-49e8-8145-7c49011d8cd6" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/39fa5a3f-6869-4e43-a085-b6d94ee497fa" + }, + { + "predicate": "on_project", + "source": "https://brain-bbqs.org/id/role/800262fc-b2dd-4041-ab94-e9cf166d50b3" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 14, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/3300103b-a7d5-4bdd-8f50-24fb3e24767a", + "id": "https://brain-bbqs.org/id/role/b450bf2e-e124-481f-8950-2e7b03832f17", "class": "ProjectRole", - "label": "contact_pi on R34DA059718", + "label": "co-investigator on R24MH136632", "facts": { "project_role": [ - "contact_pi" + "co-investigator" ], "role_source": [ - "reporter" + "curator" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/28aec8d8-5202-4574-9a96-b01ddb53aeb4" + "target": "https://brain-bbqs.org/id/8e52b630-7ecc-4336-9f31-d0b6a1c85100" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e" + "target": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" } ], "in": [], @@ -20147,25 +21070,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/c3e5b648-cf18-47f4-b514-fc38390d2431", + "id": "https://brain-bbqs.org/id/role/a474b99d-19ed-4d37-b39f-c22ba57b2101", "class": "ProjectRole", - "label": "contact_pi on R34DA059723", + "label": "co-investigator on R61MH138966", "facts": { "project_role": [ - "contact_pi" + "co-investigator" ], "role_source": [ - "reporter" + "curator" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/c11ff83b-6ac9-4ebe-992b-f37c931e182b" + "target": "https://brain-bbqs.org/id/4543ce04-8f6e-4713-8fa7-2552664e28ae" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/2db5ee93-296a-446a-a3e6-59fd3d28c4a6" + "target": "https://brain-bbqs.org/id/adc6c1dd-57a9-49bb-a57d-521fd1208a76" } ], "in": [], @@ -20175,12 +21098,12 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/dce97439-b94a-4549-af78-4839bc63d315", + "id": "https://brain-bbqs.org/id/role/0a29a35d-e673-42f7-a590-23f0fe7055f7", "class": "ProjectRole", - "label": "contact_pi on R34DA061924", + "label": "co_pi on R34DA059500", "facts": { "project_role": [ - "contact_pi" + "co_pi" ], "role_source": [ "reporter" @@ -20189,11 +21112,11 @@ "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/d0f582a1-20fd-43ca-a9f1-21bf0ee548c1" + "target": "https://brain-bbqs.org/id/47485e5b-3455-44a3-a716-70069176b11f" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0" + "target": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608" } ], "in": [], @@ -20203,12 +21126,12 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/86821e6a-b746-49fd-b4b6-5ea4dd02e5d7", + "id": "https://brain-bbqs.org/id/role/bf82a7b1-f5dc-4ec7-8117-927452fa5027", "class": "ProjectRole", - "label": "contact_pi on R34DA061925", + "label": "co_pi on R34DA059500", "facts": { "project_role": [ - "contact_pi" + "co_pi" ], "role_source": [ "reporter" @@ -20217,11 +21140,11 @@ "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/fa291a57-48b1-4ad1-87da-4a04a01787e8" + "target": "https://brain-bbqs.org/id/7a2ad901-f50d-40bc-a404-b4ef0c33944b" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/1573f2f2-dfe7-476f-ba44-55011c0f5d1b" + "target": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608" } ], "in": [], @@ -20231,12 +21154,12 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/f33023b3-374b-44c3-a158-5487f3bbfafc", + "id": "https://brain-bbqs.org/id/role/fa7fab82-ca22-484b-a5aa-f775d831c4a6", "class": "ProjectRole", - "label": "contact_pi on R34DA061984", + "label": "co_pi on R34DA059500", "facts": { "project_role": [ - "contact_pi" + "co_pi" ], "role_source": [ "reporter" @@ -20245,11 +21168,11 @@ "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/db663fc5-af00-457b-beb7-f9ee831eef71" + "target": "https://brain-bbqs.org/id/1a8f0486-7381-4156-824c-b2e9ff0dc817" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/ca25b66c-c03f-4d7e-90e8-93bc12fafeb1" + "target": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608" } ], "in": [], @@ -20259,12 +21182,12 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/d2505ade-278d-4203-8ebf-bbc8ebfc48c9", + "id": "https://brain-bbqs.org/id/role/82abd87d-c378-4049-8c84-4eede3066410", "class": "ProjectRole", - "label": "contact_pi on R34DA062119", + "label": "co_pi on R34DA059506", "facts": { "project_role": [ - "contact_pi" + "co_pi" ], "role_source": [ "reporter" @@ -20273,11 +21196,11 @@ "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/e058af74-abc7-453f-8aa6-93cd056c50e3" + "target": "https://brain-bbqs.org/id/c3604b73-537c-411b-b963-cd8df608f086" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/f294b0d9-175a-47c7-854c-d4d750009812" + "target": "https://brain-bbqs.org/id/4f2619b1-a6a4-48e5-b21a-0f5455354ea9" } ], "in": [], @@ -20287,12 +21210,12 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/3dba6e02-b3c4-4cc8-89d8-bd8ef07d5341", + "id": "https://brain-bbqs.org/id/role/2de0b139-4980-4479-9362-e6d68c33d1c8", "class": "ProjectRole", - "label": "contact_pi on R61MH135106", + "label": "co_pi on R34DA059507", "facts": { "project_role": [ - "contact_pi" + "co_pi" ], "role_source": [ "reporter" @@ -20301,11 +21224,11 @@ "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/68fe4ee2-5beb-4a6e-ac58-2d31ad350cfd" + "target": "https://brain-bbqs.org/id/e3335c53-2c38-444e-aff5-43a4268c97bf" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/80db3a04-a9ad-486d-abf1-4b20f8370ff9" + "target": "https://brain-bbqs.org/id/e285ab2b-1a7d-4b2e-9400-b24d6faff6de" } ], "in": [], @@ -20315,12 +21238,12 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/c7360c73-0ef1-4e34-88ac-585b15257b2d", + "id": "https://brain-bbqs.org/id/role/8f554f84-7a48-4b4a-8032-cbab841613fd", "class": "ProjectRole", - "label": "contact_pi on R61MH135109", + "label": "co_pi on R34DA059507", "facts": { "project_role": [ - "contact_pi" + "co_pi" ], "role_source": [ "reporter" @@ -20329,11 +21252,11 @@ "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/77aecb31-a637-4d08-9a35-e72ea6a46fe5" + "target": "https://brain-bbqs.org/id/5b057d86-6fdd-4b5e-b2ab-111360c5b537" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/3352859e-5677-46dd-89d6-17c898b6f097" + "target": "https://brain-bbqs.org/id/e285ab2b-1a7d-4b2e-9400-b24d6faff6de" } ], "in": [], @@ -20343,12 +21266,12 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/b5ea3f60-fb2d-4b61-b6ca-04c67600b8b0", + "id": "https://brain-bbqs.org/id/role/db582fe3-ef66-4a67-aca9-9daec764cd4c", "class": "ProjectRole", - "label": "contact_pi on R61MH135114", + "label": "co_pi on R34DA059507", "facts": { "project_role": [ - "contact_pi" + "co_pi" ], "role_source": [ "reporter" @@ -20357,11 +21280,11 @@ "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/f0d2d9d0-b5e5-4f52-a40d-0d5a06229b14" + "target": "https://brain-bbqs.org/id/e0179c68-8fe6-48ca-9140-84a567b5f661" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/4614269a-0d7f-4390-b4cc-568a09fa6a45" + "target": "https://brain-bbqs.org/id/e285ab2b-1a7d-4b2e-9400-b24d6faff6de" } ], "in": [], @@ -20371,12 +21294,12 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/a617a421-6fe5-4f66-9c63-ce24bbea02eb", + "id": "https://brain-bbqs.org/id/role/2cf61a9f-a799-4586-94fc-a71bc80104d6", "class": "ProjectRole", - "label": "contact_pi on R61MH135405", + "label": "co_pi on R34DA059509", "facts": { "project_role": [ - "contact_pi" + "co_pi" ], "role_source": [ "reporter" @@ -20385,11 +21308,11 @@ "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/5bb15430-32e5-457f-b6ce-e4f3790687fa" + "target": "https://brain-bbqs.org/id/16d82048-d1f5-4b80-a6e0-2baf5c1bed4f" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/22e61529-38ba-465f-b38b-274e24160fb6" + "target": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" } ], "in": [], @@ -20399,12 +21322,12 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/2849f8eb-0feb-48ba-b73e-577eb81e4b91", + "id": "https://brain-bbqs.org/id/role/6e99e32c-bc60-4da2-80ac-d6438cc1d6c6", "class": "ProjectRole", - "label": "contact_pi on R61MH135407", + "label": "co_pi on R34DA059509", "facts": { "project_role": [ - "contact_pi" + "co_pi" ], "role_source": [ "reporter" @@ -20413,11 +21336,11 @@ "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/d69b71df-b5e8-490c-8df0-5a7883fac0d5" + "target": "https://brain-bbqs.org/id/75313083-49bd-45dd-a4a2-fd5fc0bf8949" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" + "target": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" } ], "in": [], @@ -20427,25 +21350,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/fbe6026f-8aad-439e-8fe2-da3cce084d1c", + "id": "https://brain-bbqs.org/id/role/ad57ca2b-08ac-42a0-991e-61feaf2c5e39", "class": "ProjectRole", - "label": "contact_pi on R61MH138612", + "label": "co_pi on R34DA059509", "facts": { "project_role": [ - "contact_pi" + "co_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/bcdcd220-fa82-47d4-9c1b-7a8da03dadd8" + "target": "https://brain-bbqs.org/id/ebbb8fee-72ed-4cb0-9d25-94e670379f08" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/80e226a5-f7e6-49d2-a64a-524940d498a5" + "target": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" } ], "in": [], @@ -20455,12 +21378,12 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/66819421-258e-42c3-b30a-5ed7345463e3", + "id": "https://brain-bbqs.org/id/role/b8a0aee0-0fb1-4ede-9846-a717a2b63d47", "class": "ProjectRole", - "label": "contact_pi on R61MH138705", + "label": "co_pi on R34DA059510", "facts": { "project_role": [ - "contact_pi" + "co_pi" ], "role_source": [ "reporter" @@ -20469,11 +21392,11 @@ "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/0fd7e9bf-a1c2-48ba-b235-75cee07f2fc2" + "target": "https://brain-bbqs.org/id/bf6867b2-09d3-4cc3-89ba-b931b646cd42" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/38289d36-f3a6-43e1-955b-db1d3d400cb2" + "target": "https://brain-bbqs.org/id/e5bb6e4f-d3cf-44d4-ac1a-59f76724c0d2" } ], "in": [], @@ -20483,12 +21406,12 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/bd6b0699-938f-4117-94d2-97177837e94c", + "id": "https://brain-bbqs.org/id/role/4a0c2ae2-92fd-447a-a95e-419db4773d8f", "class": "ProjectRole", - "label": "contact_pi on R61MH138713", + "label": "co_pi on R34DA059512", "facts": { "project_role": [ - "contact_pi" + "co_pi" ], "role_source": [ "reporter" @@ -20497,11 +21420,11 @@ "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/e6996650-b858-4ddb-b422-4fd92fdfaac4" + "target": "https://brain-bbqs.org/id/1a33a814-fbd1-4acf-bc5d-f0077bc180d1" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" + "target": "https://brain-bbqs.org/id/1e1fc06b-fe5c-4ec2-9f64-474f98ae31e8" } ], "in": [], @@ -20511,12 +21434,12 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/8730c049-9ec8-4a10-9e6f-0e5f0b33144e", + "id": "https://brain-bbqs.org/id/role/a31e280c-89d7-4d68-b3a3-4ecc10429cee", "class": "ProjectRole", - "label": "contact_pi on R61MH138966", + "label": "co_pi on R34DA059512", "facts": { "project_role": [ - "contact_pi" + "co_pi" ], "role_source": [ "reporter" @@ -20525,11 +21448,11 @@ "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/a5644db3-8ade-4026-9139-c1945c0869d6" + "target": "https://brain-bbqs.org/id/fd89f05c-a37e-4d93-80fc-47dfc8aa3931" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/adc6c1dd-57a9-49bb-a57d-521fd1208a76" + "target": "https://brain-bbqs.org/id/1e1fc06b-fe5c-4ec2-9f64-474f98ae31e8" } ], "in": [], @@ -20539,12 +21462,12 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/29154919-0da2-4db6-a005-c5cf8451746d", + "id": "https://brain-bbqs.org/id/role/62fcc478-1ee4-43f5-a5b0-ae02c6955cbf", "class": "ProjectRole", - "label": "contact_pi on R61MH138967", + "label": "co_pi on R34DA059513", "facts": { "project_role": [ - "contact_pi" + "co_pi" ], "role_source": [ "reporter" @@ -20553,11 +21476,11 @@ "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/dc09061c-41ce-4e6e-bfe9-5e4805b4356c" + "target": "https://brain-bbqs.org/id/3161638e-fa1b-4af1-a998-a34139b2a0b1" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/797fd7cf-49dc-40a2-811d-aeec94460ead" + "target": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" } ], "in": [], @@ -20567,25 +21490,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/182058c5-770d-4ac3-984a-ea1f4d8d48f1", + "id": "https://brain-bbqs.org/id/role/f0b8e0cd-ac28-4f72-8410-be9b81689d08", "class": "ProjectRole", - "label": "contact_pi on R61MH142354", + "label": "co_pi on R34DA059513", "facts": { "project_role": [ - "contact_pi" + "co_pi" ], "role_source": [ - "funder_notice" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/b2b7ce80-8dbf-4cf8-804c-9daebe9a9fa5" + "target": "https://brain-bbqs.org/id/f2372c9c-91ac-449f-8ae8-182327e93a85" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/cbc8640e-6d05-4872-bf01-6e3f7d89c349" + "target": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" } ], "in": [], @@ -20595,12 +21518,12 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/b87d800c-a0aa-4ea4-aa2e-4fba4fbf8480", + "id": "https://brain-bbqs.org/id/role/43ee45a2-22ea-4e73-9885-1efe24dc4caf", "class": "ProjectRole", - "label": "contact_pi on U01DA063534", + "label": "co_pi on R34DA059716", "facts": { "project_role": [ - "contact_pi" + "co_pi" ], "role_source": [ "reporter" @@ -20609,11 +21532,11 @@ "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/864e9b52-4173-4b92-bd81-d0bc6a7fc3cb" + "target": "https://brain-bbqs.org/id/3d87d6b0-c802-4610-813b-86b94e3e76d6" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/1e2423ff-965b-4485-8557-797c1e1dee38" + "target": "https://brain-bbqs.org/id/b02aaf9f-0a7e-4759-b1ba-cb100a2d4eed" } ], "in": [], @@ -20623,12 +21546,12 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/4fe6e211-9d96-4f8b-8753-c5a002e13b72", + "id": "https://brain-bbqs.org/id/role/70324d1e-344b-402d-bac2-afd900606e16", "class": "ProjectRole", - "label": "contact_pi on U01DA063565", + "label": "co_pi on R34DA059716", "facts": { "project_role": [ - "contact_pi" + "co_pi" ], "role_source": [ "reporter" @@ -20637,11 +21560,11 @@ "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/2634f607-be46-4d8d-baae-6ec0d66a5436" + "target": "https://brain-bbqs.org/id/1e23d697-bec8-48a1-ae97-96434e7343c2" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/bf3493c0-de28-4731-9baf-c976ccc7c484" + "target": "https://brain-bbqs.org/id/b02aaf9f-0a7e-4759-b1ba-cb100a2d4eed" } ], "in": [], @@ -20651,12 +21574,12 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/c325fdf0-4dc3-43aa-a2de-5a3607476ac5", + "id": "https://brain-bbqs.org/id/role/2248b93b-ea65-48b3-a940-f45b80c06346", "class": "ProjectRole", - "label": "contact_pi on U01DA063581", + "label": "co_pi on R34DA059718", "facts": { "project_role": [ - "contact_pi" + "co_pi" ], "role_source": [ "reporter" @@ -20665,11 +21588,11 @@ "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/be8d825d-140a-4d72-a39a-2534cf2b4145" + "target": "https://brain-bbqs.org/id/2dd8fea9-363a-43da-8bd1-6ae4674c60b9" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/a98fe953-d2ad-4770-8c8c-1759f8500c4a" + "target": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e" } ], "in": [], @@ -20679,25 +21602,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/eedb7237-95d4-4633-8431-0a94da8db187", + "id": "https://brain-bbqs.org/id/role/692b00f5-b8e0-4344-8bd0-75def6c4b99e", "class": "ProjectRole", - "label": "contact_pi on U01MH143789", + "label": "co_pi on R34DA059718", "facts": { "project_role": [ - "contact_pi" + "co_pi" ], "role_source": [ - "funder_notice" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/68fe4ee2-5beb-4a6e-ac58-2d31ad350cfd" + "target": "https://brain-bbqs.org/id/0f0ad5c2-496b-42a8-91b7-b798742bcdc3" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/8facb614-80ac-4873-8619-b37c2ad0ed62" + "target": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e" } ], "in": [], @@ -20707,25 +21630,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/86c8c08c-3aa2-4ef9-a9a0-a7158781799b", + "id": "https://brain-bbqs.org/id/role/c35db851-d42d-43ad-b30c-64fb5b933dcf", "class": "ProjectRole", - "label": "contact_pi on U01MH144347", + "label": "co_pi on R34DA061924", "facts": { "project_role": [ - "contact_pi" + "co_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/4626de5c-667e-4f70-be3e-44dffde3887b" + "target": "https://brain-bbqs.org/id/1d3b5b5b-7a52-4380-82f4-931b67831917" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/8095d361-d12f-4015-86e7-67fced46f2e9" + "target": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0" } ], "in": [], @@ -20735,12 +21658,12 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/29a72f60-6de3-4c19-928c-05cd16342d6e", + "id": "https://brain-bbqs.org/id/role/73cef7ce-8dbb-48ba-8ee3-bcc0cca5fce8", "class": "ProjectRole", - "label": "contact_pi on U24DA064429", + "label": "co_pi on R34DA061925", "facts": { "project_role": [ - "contact_pi" + "co_pi" ], "role_source": [ "reporter" @@ -20749,11 +21672,11 @@ "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/e5bdf58e-a1ff-4f5f-aa6d-667de414e16e" + "target": "https://brain-bbqs.org/id/d3cae382-1e79-42c1-8f37-75cd049d0ff6" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" + "target": "https://brain-bbqs.org/id/1573f2f2-dfe7-476f-ba44-55011c0f5d1b" } ], "in": [], @@ -20763,25 +21686,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/cc0de44a-82ef-4fcf-811e-9695a46b47df", + "id": "https://brain-bbqs.org/id/role/9478d651-eb81-4c6f-8b55-4cabb137e46d", "class": "ProjectRole", - "label": "graduate_student on R34DA061924", + "label": "co_pi on R34DA061925", "facts": { "project_role": [ - "graduate_student" + "co_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/afe5dc6f-8e97-48c9-bb79-5af130f1e62a" + "target": "https://brain-bbqs.org/id/22edcc49-fd41-4423-92b6-89e7abba292d" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0" + "target": "https://brain-bbqs.org/id/1573f2f2-dfe7-476f-ba44-55011c0f5d1b" } ], "in": [], @@ -20791,25 +21714,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/cfcdf43e-bc65-4c3b-8046-9429be511ed1", + "id": "https://brain-bbqs.org/id/role/60988e88-27ec-4264-9203-98d80d2f3489", "class": "ProjectRole", - "label": "graduate_student on R34DA061924", + "label": "co_pi on R61MH135114", "facts": { "project_role": [ - "graduate_student" + "co_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/53f6094d-cb6e-4899-8b0d-d358b863fab9" + "target": "https://brain-bbqs.org/id/32937527-a5e9-4a99-84c0-719435f25f8b" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0" + "target": "https://brain-bbqs.org/id/4614269a-0d7f-4390-b4cc-568a09fa6a45" } ], "in": [], @@ -20819,49 +21742,53 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/14faecbb-11c6-469d-aea3-8a57dba85867", + "id": "https://brain-bbqs.org/id/role/8c42852d-0c57-4a3e-b874-3ba8874287a7", "class": "ProjectRole", - "label": "graduate_student on U01DA063581", + "label": "co_pi on R61MH135405", "facts": { "project_role": [ - "graduate_student" + "co_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ + { + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/ee077b61-eb2c-4cd9-b587-a46418c45265" + }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/a98fe953-d2ad-4770-8c8c-1759f8500c4a" + "target": "https://brain-bbqs.org/id/22e61529-38ba-465f-b38b-274e24160fb6" } ], "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/d1bb4677-b510-48ad-a89b-680830403a37", + "id": "https://brain-bbqs.org/id/role/d1c407f2-001d-44da-ada2-0c59c6f8503a", "class": "ProjectRole", - "label": "graduate_student on U24DA064429", + "label": "co_pi on R61MH135405", "facts": { "project_role": [ - "graduate_student" + "co_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/20d3bb9f-8cbe-45b8-974e-1c84e0d9631f" + "target": "https://brain-bbqs.org/id/00618660-a724-4059-85c1-c6ca3ccc1744" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" + "target": "https://brain-bbqs.org/id/22e61529-38ba-465f-b38b-274e24160fb6" } ], "in": [], @@ -20871,25 +21798,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/02220da7-1bf8-49e9-8ff0-ed008ea8d03e", + "id": "https://brain-bbqs.org/id/role/f25003fd-234f-453b-9bc8-238213a55269", "class": "ProjectRole", - "label": "mpi on R34DA062119", + "label": "co_pi on R61MH135405", "facts": { "project_role": [ - "mpi" + "co_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/026f060a-5264-4ed0-89e7-d2cd2c436b38" + "target": "https://brain-bbqs.org/id/3d7564b9-e839-4737-874a-2e3b5319e11a" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/f294b0d9-175a-47c7-854c-d4d750009812" + "target": "https://brain-bbqs.org/id/22e61529-38ba-465f-b38b-274e24160fb6" } ], "in": [], @@ -20899,12 +21826,12 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/535c5cae-fbd2-4199-a1c2-02af47928538", + "id": "https://brain-bbqs.org/id/role/1711154b-0f87-42e9-8cf6-c1316bdf48a5", "class": "ProjectRole", - "label": "mpi on R34DA062119", + "label": "co_pi on R61MH138612", "facts": { "project_role": [ - "mpi" + "co_pi" ], "role_source": [ "curator" @@ -20913,11 +21840,11 @@ "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/13ccc90e-b105-48b2-8590-4804cd2b5f54" + "target": "https://brain-bbqs.org/id/c6056429-1e03-4506-8484-5be9acff8170" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/f294b0d9-175a-47c7-854c-d4d750009812" + "target": "https://brain-bbqs.org/id/80e226a5-f7e6-49d2-a64a-524940d498a5" } ], "in": [], @@ -20927,25 +21854,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/2c2dc99f-9c5e-43ad-8c5a-7012d2feedba", + "id": "https://brain-bbqs.org/id/role/b0b35286-4168-48d3-93d4-75ef191c6174", "class": "ProjectRole", - "label": "mpi on R61MH142354", + "label": "co_pi on R61MH138612", "facts": { "project_role": [ - "mpi" + "co_pi" ], "role_source": [ - "funder_notice" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/e1fcac8e-1f50-4dc8-8f14-f0ee62614861" + "target": "https://brain-bbqs.org/id/223a91b2-1ffb-49e6-9cd7-d97f6f2beece" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/cbc8640e-6d05-4872-bf01-6e3f7d89c349" + "target": "https://brain-bbqs.org/id/80e226a5-f7e6-49d2-a64a-524940d498a5" } ], "in": [], @@ -20955,25 +21882,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/a2f1ea9f-aab3-4407-b7d3-4570537c2678", + "id": "https://brain-bbqs.org/id/role/4ee3ec6b-290f-4731-b8af-788bc47217e8", "class": "ProjectRole", - "label": "mpi on R61MH142354", + "label": "co_pi on R61MH138713", "facts": { "project_role": [ - "mpi" + "co_pi" ], "role_source": [ - "funder_notice" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/156fb20f-5e40-4804-992d-dc353b5e99e4" + "target": "https://brain-bbqs.org/id/5fd6169e-d169-41be-8cd0-e8a691f0b345" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/cbc8640e-6d05-4872-bf01-6e3f7d89c349" + "target": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" } ], "in": [], @@ -20983,25 +21910,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/bc9cb644-1dc5-4caf-ae76-da464cb8e2dc", + "id": "https://brain-bbqs.org/id/role/d0517883-23dc-4702-9f1b-374497c94486", "class": "ProjectRole", - "label": "mpi on R61MH142354", + "label": "co_pi on R61MH138713", "facts": { "project_role": [ - "mpi" + "co_pi" ], "role_source": [ - "funder_notice" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/3be49154-45d9-45b4-9872-3271a67a5225" + "target": "https://brain-bbqs.org/id/b050adf2-88b1-42e2-912b-2843d5b96854" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/cbc8640e-6d05-4872-bf01-6e3f7d89c349" + "target": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" } ], "in": [], @@ -21011,25 +21938,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/0dca4f7e-50c2-4cc8-ac51-1cbe7cd5deaa", + "id": "https://brain-bbqs.org/id/role/9217ceed-1e78-4c40-b15b-66077b5569db", "class": "ProjectRole", - "label": "other on R24MH136632", + "label": "co_pi on R61MH138967", "facts": { "project_role": [ - "other" + "co_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/40a825b2-31fc-4ffe-b686-9b09a1576b33" + "target": "https://brain-bbqs.org/id/0a076358-2298-4693-b3cf-d75114552163" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" + "target": "https://brain-bbqs.org/id/797fd7cf-49dc-40a2-811d-aeec94460ead" } ], "in": [], @@ -21039,25 +21966,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/145ca46a-181b-4fb5-b546-3522f659e770", + "id": "https://brain-bbqs.org/id/role/b096be30-abda-4dbf-b167-4dea42f69dfa", "class": "ProjectRole", - "label": "other on R24MH136632", + "label": "co_pi on R61MH138967", "facts": { "project_role": [ - "other" + "co_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/2984e917-2448-4596-9648-b52dc92b2c5d" + "target": "https://brain-bbqs.org/id/f4d7cfd7-30aa-4f19-8601-f85f9689884a" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" + "target": "https://brain-bbqs.org/id/797fd7cf-49dc-40a2-811d-aeec94460ead" } ], "in": [], @@ -21067,25 +21994,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/3d7151df-4a2b-40cd-97ae-0f695e5d237e", + "id": "https://brain-bbqs.org/id/role/58923333-d8e5-4e54-a86d-c229e523fec8", "class": "ProjectRole", - "label": "other on R24MH136632", + "label": "co_pi on U01DA063534", "facts": { "project_role": [ - "other" + "co_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/850426b4-fca0-4cfc-a528-60b11208e652" + "target": "https://brain-bbqs.org/id/0f0ad5c2-496b-42a8-91b7-b798742bcdc3" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" + "target": "https://brain-bbqs.org/id/1e2423ff-965b-4485-8557-797c1e1dee38" } ], "in": [], @@ -21095,25 +22022,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/455424c4-b3b7-466e-b6f0-c959fbb74b77", + "id": "https://brain-bbqs.org/id/role/c3efc4fa-34d8-4630-93b5-7dd34f4e03cd", "class": "ProjectRole", - "label": "other on R24MH136632", + "label": "co_pi on U01DA063534", "facts": { "project_role": [ - "other" + "co_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/c302f348-ef46-4a60-801c-55a7783ca421" + "target": "https://brain-bbqs.org/id/b1b421fc-5477-4c2f-8968-ab757344ab2d" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" + "target": "https://brain-bbqs.org/id/1e2423ff-965b-4485-8557-797c1e1dee38" } ], "in": [], @@ -21123,25 +22050,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/5c64f851-de9f-4496-84da-58ed338ffa65", + "id": "https://brain-bbqs.org/id/role/cee6c154-1e7f-4a7a-afa7-5117b7f7e384", "class": "ProjectRole", - "label": "other on R24MH136632", + "label": "co_pi on U01DA063534", "facts": { "project_role": [ - "other" + "co_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/dfbc5c5d-f4a9-4b08-8454-321df0c98e18" + "target": "https://brain-bbqs.org/id/27d7f30b-e152-4999-a63e-8dd4e800f3bc" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" + "target": "https://brain-bbqs.org/id/1e2423ff-965b-4485-8557-797c1e1dee38" } ], "in": [], @@ -21151,25 +22078,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/642bc862-c174-48ba-8b1b-e7c1356e07ab", + "id": "https://brain-bbqs.org/id/role/182007aa-956e-44c7-92ff-39e22486c0a1", "class": "ProjectRole", - "label": "other on R24MH136632", + "label": "co_pi on U01DA063565", "facts": { "project_role": [ - "other" + "co_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/e6fb5750-5310-4d85-8beb-4cc8addbd988" + "target": "https://brain-bbqs.org/id/c140b518-3ea9-4cad-a8b2-c7b30385589b" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" + "target": "https://brain-bbqs.org/id/bf3493c0-de28-4731-9baf-c976ccc7c484" } ], "in": [], @@ -21179,25 +22106,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/68749a60-249f-4eb2-ad4a-7ae78c76a2f9", + "id": "https://brain-bbqs.org/id/role/99b4e8a5-97d9-4392-9cfd-da2d0cc46470", "class": "ProjectRole", - "label": "other on R24MH136632", + "label": "co_pi on U01DA063565", "facts": { "project_role": [ - "other" + "co_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/eaa38acf-84a1-44ce-a1c6-eda307583731" + "target": "https://brain-bbqs.org/id/03f8e307-5f04-4d22-9aef-c1bb9d3e6905" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" + "target": "https://brain-bbqs.org/id/bf3493c0-de28-4731-9baf-c976ccc7c484" } ], "in": [], @@ -21207,25 +22134,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/7492a89a-dd5f-46af-871d-c6f9a0bd6eb7", + "id": "https://brain-bbqs.org/id/role/a8d46449-f002-41d2-8fad-ee7cd5126178", "class": "ProjectRole", - "label": "other on R24MH136632", + "label": "co_pi on U01DA063565", "facts": { "project_role": [ - "other" + "co_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/b2c565ea-4b4a-4586-9543-e61df6570936" + "target": "https://brain-bbqs.org/id/831a48e1-025d-499a-bf11-83d05285ed4b" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" + "target": "https://brain-bbqs.org/id/bf3493c0-de28-4731-9baf-c976ccc7c484" } ], "in": [], @@ -21235,25 +22162,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/0b8db858-64e3-41bc-8ecc-948b44cdf963", + "id": "https://brain-bbqs.org/id/role/1de9735a-b2fe-4554-85a2-01fb284ebd01", "class": "ProjectRole", - "label": "other on R34DA059723", + "label": "co_pi on U01DA063581", "facts": { "project_role": [ - "other" + "co_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/a3de5020-ea6c-41c1-b397-3e0f6d43e98a" + "target": "https://brain-bbqs.org/id/3161638e-fa1b-4af1-a998-a34139b2a0b1" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/2db5ee93-296a-446a-a3e6-59fd3d28c4a6" + "target": "https://brain-bbqs.org/id/a98fe953-d2ad-4770-8c8c-1759f8500c4a" } ], "in": [], @@ -21263,25 +22190,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/d7f6d7e4-401f-43ea-a3e2-ac34d7e73f1f", + "id": "https://brain-bbqs.org/id/role/63311822-3561-4d3f-929d-42da23209e90", "class": "ProjectRole", - "label": "other on R34DA061925", + "label": "co_pi on U01DA063581", "facts": { "project_role": [ - "other" + "co_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/e0d25d6e-4879-436d-980f-e690e3e5a937" + "target": "https://brain-bbqs.org/id/93a3260d-e267-451b-9960-06cc9ae3a40c" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/1573f2f2-dfe7-476f-ba44-55011c0f5d1b" + "target": "https://brain-bbqs.org/id/a98fe953-d2ad-4770-8c8c-1759f8500c4a" } ], "in": [], @@ -21291,25 +22218,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/d64865d3-893f-4968-bcba-e3b33a6a4f1b", + "id": "https://brain-bbqs.org/id/role/bf0e6573-c228-4923-badd-e3667105e287", "class": "ProjectRole", - "label": "other on R61MH135109", + "label": "co_pi on U01DA063581", "facts": { "project_role": [ - "other" + "co_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/0410e3c0-a5b5-4f3f-a0e0-2dc7e71c2d18" + "target": "https://brain-bbqs.org/id/f2372c9c-91ac-449f-8ae8-182327e93a85" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/3352859e-5677-46dd-89d6-17c898b6f097" + "target": "https://brain-bbqs.org/id/a98fe953-d2ad-4770-8c8c-1759f8500c4a" } ], "in": [], @@ -21319,25 +22246,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/295a454b-56ba-4d13-b630-75e3a333f965", + "id": "https://brain-bbqs.org/id/role/da20601e-5e20-41cc-a57b-63e66c143df4", "class": "ProjectRole", - "label": "other on R61MH135114", + "label": "co_pi on U01MH144347", "facts": { "project_role": [ - "other" + "co_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/d25f9d24-5496-41a5-9a39-b686719d9eb7" + "target": "https://brain-bbqs.org/id/3516554a-8253-4773-af22-a89b3ccb3267" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/4614269a-0d7f-4390-b4cc-568a09fa6a45" + "target": "https://brain-bbqs.org/id/8095d361-d12f-4015-86e7-67fced46f2e9" } ], "in": [], @@ -21347,12 +22274,12 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/d940349f-ae79-43ae-8931-2c4b17d14f44", + "id": "https://brain-bbqs.org/id/role/dbaa6f57-01e4-4168-88fa-7fa673a6cf6f", "class": "ProjectRole", - "label": "other on R61MH135114", + "label": "co_pi on U01MH144347", "facts": { "project_role": [ - "other" + "co_pi" ], "role_source": [ "curator" @@ -21361,11 +22288,11 @@ "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/3afc2f32-f84c-4ca1-9fee-139597851004" + "target": "https://brain-bbqs.org/id/e0179c68-8fe6-48ca-9140-84a567b5f661" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/4614269a-0d7f-4390-b4cc-568a09fa6a45" + "target": "https://brain-bbqs.org/id/8095d361-d12f-4015-86e7-67fced46f2e9" } ], "in": [], @@ -21375,12 +22302,12 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/173d4dd7-5a55-48f7-b5ee-e08bfe25ac71", + "id": "https://brain-bbqs.org/id/role/f2d69865-0ee2-4b99-81e8-b84658c9eb1e", "class": "ProjectRole", - "label": "other on R61MH138705", + "label": "co_pi on U01MH144347", "facts": { "project_role": [ - "other" + "co_pi" ], "role_source": [ "curator" @@ -21389,11 +22316,11 @@ "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/67f260ea-2946-4086-9111-c926fb4e6df7" + "target": "https://brain-bbqs.org/id/961fb77d-16c1-4efd-9fc7-ac7bd552c983" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/38289d36-f3a6-43e1-955b-db1d3d400cb2" + "target": "https://brain-bbqs.org/id/8095d361-d12f-4015-86e7-67fced46f2e9" } ], "in": [], @@ -21403,25 +22330,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/eed7f06b-7ec2-42e5-8307-da70b41c7482", + "id": "https://brain-bbqs.org/id/role/f9acc694-4a05-45f7-b0be-24c6dd4a7637", "class": "ProjectRole", - "label": "other on U24DA064429", + "label": "co_pi on U01MH144347", "facts": { "project_role": [ - "other" + "co_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/0f3bb33c-e7ee-4013-af5d-894d1adfa0ee" + "target": "https://brain-bbqs.org/id/fedfc5af-eb8e-4ee5-88e7-a18ab2f00b26" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" + "target": "https://brain-bbqs.org/id/8095d361-d12f-4015-86e7-67fced46f2e9" } ], "in": [], @@ -21431,25 +22358,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/3cc8ceb9-f7ea-4724-91ed-546efb08242b", + "id": "https://brain-bbqs.org/id/role/39fa5a3f-6869-4e43-a085-b6d94ee497fa", "class": "ProjectRole", - "label": "postdoc on R24MH136632", + "label": "co_pi on U24DA064429", "facts": { "project_role": [ - "postdoc" + "co_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/196ba606-dec6-4863-876e-907559234c80" + "target": "https://brain-bbqs.org/id/b359432d-39e2-4ab8-bb3b-16afe458820c" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" + "target": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" } ], "in": [], @@ -21459,25 +22386,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/c65b0c08-04d4-42fb-9ca4-dcc64f2f78f8", + "id": "https://brain-bbqs.org/id/role/800262fc-b2dd-4041-ab94-e9cf166d50b3", "class": "ProjectRole", - "label": "postdoc on R34DA059506", + "label": "co_pi on U24DA064429", "facts": { "project_role": [ - "postdoc" + "co_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/0a39ab50-9241-4b17-b6d4-77d5ac81e519" + "target": "https://brain-bbqs.org/id/fe4790d5-bf32-469d-b098-cb4f44f6fa19" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/4f2619b1-a6a4-48e5-b21a-0f5455354ea9" + "target": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" } ], "in": [], @@ -21487,12 +22414,12 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/7ef4da01-8107-42b2-bc56-e4fe58d1c6a2", + "id": "https://brain-bbqs.org/id/role/57b86bca-ace5-49e8-8145-7c49011d8cd6", "class": "ProjectRole", - "label": "postdoc on R34DA059512", + "label": "collaborator on U24DA064429", "facts": { "project_role": [ - "postdoc" + "collaborator" ], "role_source": [ "curator" @@ -21501,11 +22428,11 @@ "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/6119344c-d2da-45d1-8d69-ea22d8859dd3" + "target": "https://brain-bbqs.org/id/f3f570c9-991c-4a67-a40a-5f0903f91762" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/1e1fc06b-fe5c-4ec2-9f64-474f98ae31e8" + "target": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" } ], "in": [], @@ -21515,25 +22442,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/068fdb34-5151-4b7f-b854-c9e147bdfcd1", + "id": "https://brain-bbqs.org/id/role/3d109ffa-adb1-4a1e-b2fd-5f516280d7f7", "class": "ProjectRole", - "label": "postdoc on R34DA061924", + "label": "contact_pi on R24MH136632", "facts": { "project_role": [ - "postdoc" + "contact_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/0681de3a-08d8-4a60-88c1-65ef2a02a93f" + "target": "https://brain-bbqs.org/id/d2f77d44-3a20-4759-be29-69403ae039ef" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0" + "target": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" } ], "in": [], @@ -21543,25 +22470,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/e165b281-959b-4738-b6c6-cd404994d003", + "id": "https://brain-bbqs.org/id/role/92a2b8eb-f9ed-422a-9a23-d8a9e12cf331", "class": "ProjectRole", - "label": "postdoc on R61MH135407", + "label": "contact_pi on R34DA059500", "facts": { "project_role": [ - "postdoc" + "contact_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/608bd920-0a69-4a7a-a0fe-0740195f0c64" + "target": "https://brain-bbqs.org/id/6fe1f186-133e-4490-b50b-4e5d7d4c6347" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" + "target": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608" } ], "in": [], @@ -21571,25 +22498,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/63cd8c2a-0860-4130-857c-c33765b115d5", + "id": "https://brain-bbqs.org/id/role/a8f54c17-5723-4efe-99dd-6568342c734d", "class": "ProjectRole", - "label": "postdoc on R61MH138713", + "label": "contact_pi on R34DA059506", "facts": { "project_role": [ - "postdoc" + "contact_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/88203e28-70c5-4730-af2d-93d7f09b4250" + "target": "https://brain-bbqs.org/id/24981995-2cd1-407a-9d2c-0f89f026edeb" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" + "target": "https://brain-bbqs.org/id/4f2619b1-a6a4-48e5-b21a-0f5455354ea9" } ], "in": [], @@ -21599,25 +22526,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/caef691a-ad28-4fbe-b098-6536757b49d6", + "id": "https://brain-bbqs.org/id/role/b6d6fbfc-f005-41e9-8e22-6651720030f6", "class": "ProjectRole", - "label": "postdoc on R61MH138713", + "label": "contact_pi on R34DA059507", "facts": { "project_role": [ - "postdoc" + "contact_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/82f53756-81ce-4348-a8bb-6bce2e685dee" + "target": "https://brain-bbqs.org/id/98076d7b-270f-4a2a-af91-53d1b7644c90" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" + "target": "https://brain-bbqs.org/id/e285ab2b-1a7d-4b2e-9400-b24d6faff6de" } ], "in": [], @@ -21627,25 +22554,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/6344ea60-1fad-4b96-ac49-43e00f2acf04", + "id": "https://brain-bbqs.org/id/role/b6d62f54-1ff5-4355-8623-69dbe88aa41e", "class": "ProjectRole", - "label": "postdoc on R61MH138967", + "label": "contact_pi on R34DA059509", "facts": { "project_role": [ - "postdoc" + "contact_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/9a233497-f3cd-4888-b5b6-a83630e5f1ee" + "target": "https://brain-bbqs.org/id/1f6fa922-b662-4325-aac7-cb622ac10ef3" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/797fd7cf-49dc-40a2-811d-aeec94460ead" + "target": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" } ], "in": [], @@ -21655,25 +22582,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/4d3e76c2-2bbb-43b6-9950-982b6ac296cd", + "id": "https://brain-bbqs.org/id/role/0bfdefd7-14a0-48aa-93c2-9f80f19e8e72", "class": "ProjectRole", - "label": "postdoc on U01DA063534", + "label": "contact_pi on R34DA059510", "facts": { "project_role": [ - "postdoc" + "contact_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/6cedc563-ca67-467e-9c98-48b5b67123de" + "target": "https://brain-bbqs.org/id/709c64f2-d02c-48f9-b286-b9222a106f27" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/1e2423ff-965b-4485-8557-797c1e1dee38" + "target": "https://brain-bbqs.org/id/e5bb6e4f-d3cf-44d4-ac1a-59f76724c0d2" } ], "in": [], @@ -21683,25 +22610,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/714db00c-3814-4ee2-878e-332e1894bc11", + "id": "https://brain-bbqs.org/id/role/df63e239-d918-4780-9eaa-ed34a5748f01", "class": "ProjectRole", - "label": "postdoc on U01DA063534", + "label": "contact_pi on R34DA059512", "facts": { "project_role": [ - "postdoc" + "contact_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/f6fd8ef2-e06f-4f72-bfc9-4464947fc0b9" + "target": "https://brain-bbqs.org/id/24981995-2cd1-407a-9d2c-0f89f026edeb" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/1e2423ff-965b-4485-8557-797c1e1dee38" + "target": "https://brain-bbqs.org/id/1e1fc06b-fe5c-4ec2-9f64-474f98ae31e8" } ], "in": [], @@ -21711,25 +22638,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/82015065-d290-4efc-982b-75d67daa4d00", + "id": "https://brain-bbqs.org/id/role/95b0b77d-e396-4d0b-b80e-4b80592a2db6", "class": "ProjectRole", - "label": "postdoc on U01DA063534", + "label": "contact_pi on R34DA059513", "facts": { "project_role": [ - "postdoc" + "contact_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/ace580b9-6f04-457f-aac0-3ac3a7243e3b" + "target": "https://brain-bbqs.org/id/be8d825d-140a-4d72-a39a-2534cf2b4145" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/1e2423ff-965b-4485-8557-797c1e1dee38" + "target": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" } ], "in": [], @@ -21739,25 +22666,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/baae3ddb-11fc-48ce-a5f1-23a481b233da", + "id": "https://brain-bbqs.org/id/role/c33f2bff-071b-4550-9ea5-d3fd11e0ed0c", "class": "ProjectRole", - "label": "postdoc on U01DA063534", + "label": "contact_pi on R34DA059514", "facts": { "project_role": [ - "postdoc" + "contact_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/7a5a1c11-f5f8-4643-b444-71228b1f298a" + "target": "https://brain-bbqs.org/id/09865181-38c6-44d9-aba4-68e373f0286d" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/1e2423ff-965b-4485-8557-797c1e1dee38" + "target": "https://brain-bbqs.org/id/3846417f-c783-484b-9cfc-fbbf8f83fdf5" } ], "in": [], @@ -21767,25 +22694,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/c6847ede-7f3e-4557-9af6-0740d2a0babc", + "id": "https://brain-bbqs.org/id/role/3027bce5-12b7-4205-9873-9cc8efbed2c0", "class": "ProjectRole", - "label": "postdoc on U24DA064429", + "label": "contact_pi on R34DA059716", "facts": { "project_role": [ - "postdoc" + "contact_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/6340c8ee-1d5b-45f0-87ff-c320a38df17d" + "target": "https://brain-bbqs.org/id/f34a38e7-364a-4091-8436-a8c52b684cc2" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" + "target": "https://brain-bbqs.org/id/b02aaf9f-0a7e-4759-b1ba-cb100a2d4eed" } ], "in": [], @@ -21795,25 +22722,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/776f6ad8-5dbf-4a6b-a49e-4bdff826a969", + "id": "https://brain-bbqs.org/id/role/3300103b-a7d5-4bdd-8f50-24fb3e24767a", "class": "ProjectRole", - "label": "research_staff on R61MH138967", + "label": "contact_pi on R34DA059718", "facts": { "project_role": [ - "research_staff" + "contact_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/2eafb009-97ac-4492-97fe-b77490371b34" + "target": "https://brain-bbqs.org/id/28aec8d8-5202-4574-9a96-b01ddb53aeb4" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/797fd7cf-49dc-40a2-811d-aeec94460ead" + "target": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e" } ], "in": [], @@ -21823,49 +22750,53 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/c381ea7d-4332-4bf6-8491-474a2f6b6b41", + "id": "https://brain-bbqs.org/id/role/c3e5b648-cf18-47f4-b514-fc38390d2431", "class": "ProjectRole", - "label": "research_staff on U01MH143789", + "label": "contact_pi on R34DA059723", "facts": { "project_role": [ - "research_staff" + "contact_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ + { + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/c11ff83b-6ac9-4ebe-992b-f37c931e182b" + }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/8facb614-80ac-4873-8619-b37c2ad0ed62" + "target": "https://brain-bbqs.org/id/2db5ee93-296a-446a-a3e6-59fd3d28c4a6" } ], "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/53e6a0e7-68a8-457d-8fa8-0763d062dcda", + "id": "https://brain-bbqs.org/id/role/dce97439-b94a-4549-af78-4839bc63d315", "class": "ProjectRole", - "label": "research_staff on U01MH144347", + "label": "contact_pi on R34DA061924", "facts": { "project_role": [ - "research_staff" + "contact_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/dd96356c-60d7-4a65-9be7-7a622de4287d" + "target": "https://brain-bbqs.org/id/d0f582a1-20fd-43ca-a9f1-21bf0ee548c1" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/8095d361-d12f-4015-86e7-67fced46f2e9" + "target": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0" } ], "in": [], @@ -21875,25 +22806,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/9200c2fb-5bea-4d89-9115-1064c1387222", + "id": "https://brain-bbqs.org/id/role/86821e6a-b746-49fd-b4b6-5ea4dd02e5d7", "class": "ProjectRole", - "label": "research_staff on U01MH144347", + "label": "contact_pi on R34DA061925", "facts": { "project_role": [ - "research_staff" + "contact_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/b2e8b421-674b-4e2d-8b61-f1e4a005c4f4" + "target": "https://brain-bbqs.org/id/fa291a57-48b1-4ad1-87da-4a04a01787e8" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/8095d361-d12f-4015-86e7-67fced46f2e9" + "target": "https://brain-bbqs.org/id/1573f2f2-dfe7-476f-ba44-55011c0f5d1b" } ], "in": [], @@ -21903,25 +22834,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/3df7974f-d227-4954-a984-3d403436fa70", + "id": "https://brain-bbqs.org/id/role/f33023b3-374b-44c3-a158-5487f3bbfafc", "class": "ProjectRole", - "label": "research_staff on U24DA064429", + "label": "contact_pi on R34DA061984", "facts": { "project_role": [ - "research_staff" + "contact_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/e03557cc-99aa-4b15-8786-bde9a5253fd1" + "target": "https://brain-bbqs.org/id/db663fc5-af00-457b-beb7-f9ee831eef71" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" + "target": "https://brain-bbqs.org/id/ca25b66c-c03f-4d7e-90e8-93bc12fafeb1" } ], "in": [], @@ -21931,25 +22862,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/540b143e-459b-41df-98bd-9ec0b18d9bd6", + "id": "https://brain-bbqs.org/id/role/d2505ade-278d-4203-8ebf-bbc8ebfc48c9", "class": "ProjectRole", - "label": "research_staff on U24DA064429", + "label": "contact_pi on R34DA062119", "facts": { "project_role": [ - "research_staff" + "contact_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/95406597-a11e-4809-834d-8a6926c32164" + "target": "https://brain-bbqs.org/id/e058af74-abc7-453f-8aa6-93cd056c50e3" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" + "target": "https://brain-bbqs.org/id/f294b0d9-175a-47c7-854c-d4d750009812" } ], "in": [], @@ -21959,25 +22890,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/57b86bca-ace5-49e8-8145-7c49011d8cd6", + "id": "https://brain-bbqs.org/id/role/3dba6e02-b3c4-4cc8-89d8-bd8ef07d5341", "class": "ProjectRole", - "label": "research_staff on U24DA064429", + "label": "contact_pi on R61MH135106", "facts": { "project_role": [ - "research_staff" + "contact_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/f3f570c9-991c-4a67-a40a-5f0903f91762" + "target": "https://brain-bbqs.org/id/68fe4ee2-5beb-4a6e-ac58-2d31ad350cfd" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" + "target": "https://brain-bbqs.org/id/80db3a04-a9ad-486d-abf1-4b20f8370ff9" } ], "in": [], @@ -21987,25 +22918,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/d530f31d-a94a-4d0d-8e40-3c41610d768a", + "id": "https://brain-bbqs.org/id/role/c7360c73-0ef1-4e34-88ac-585b15257b2d", "class": "ProjectRole", - "label": "research_staff on U24DA064429", + "label": "contact_pi on R61MH135109", "facts": { "project_role": [ - "research_staff" + "contact_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/5f8ac3c4-a0fb-44d6-ae2d-b505816d4141" + "target": "https://brain-bbqs.org/id/77aecb31-a637-4d08-9a35-e72ea6a46fe5" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" + "target": "https://brain-bbqs.org/id/3352859e-5677-46dd-89d6-17c898b6f097" } ], "in": [], @@ -22015,25 +22946,25 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/role/c70a461e-5956-4c4f-aaba-40f11cc7b350", + "id": "https://brain-bbqs.org/id/role/b5ea3f60-fb2d-4b61-b6ca-04c67600b8b0", "class": "ProjectRole", - "label": "trainee on U24DA064429", + "label": "contact_pi on R61MH135114", "facts": { "project_role": [ - "trainee" + "contact_pi" ], "role_source": [ - "curator" + "reporter" ] }, "out": [ { "predicate": "held_by", - "target": "https://brain-bbqs.org/id/a7318228-623e-4f94-a7e6-5e3fed968e1a" + "target": "https://brain-bbqs.org/id/f0d2d9d0-b5e5-4f52-a40d-0d5a06229b14" }, { "predicate": "on_project", - "target": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" + "target": "https://brain-bbqs.org/id/4614269a-0d7f-4390-b4cc-568a09fa6a45" } ], "in": [], @@ -22043,2368 +22974,1763 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/6cddb30f-f477-4ed4-be06-30e6ed290ec1", - "class": "Protocol", - "label": "DLC 3D Pose Protocol", + "id": "https://brain-bbqs.org/id/role/a617a421-6fe5-4f66-9c63-ce24bbea02eb", + "class": "ProjectRole", + "label": "contact_pi on R61MH135405", "facts": { - "description": [ - "Multi-camera 3D pose estimation methodology" - ], - "external_url": [ - "https://www.nature.com/articles/s41596-019-0176-0" + "project_role": [ + "contact_pi" ], - "name": [ - "DLC 3D Pose Protocol" + "role_source": [ + "reporter" ] }, - "out": [], + "out": [ + { + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/5bb15430-32e5-457f-b6ce-e4f3790687fa" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/22e61529-38ba-465f-b38b-274e24160fb6" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/38fab5c5-6eb6-4ba1-980a-78e5c2bf2312", - "class": "Publication", - "label": "A behavioral roadmap for the development of agency in the rodent.", + "id": "https://brain-bbqs.org/id/role/2849f8eb-0feb-48ba-b73e-577eb81e4b91", + "class": "ProjectRole", + "label": "contact_pi on R61MH135407", "facts": { - "author_orcids": [ - "https://orcid.org/0000-0003-0471-9816", - "https://orcid.org/0009-0007-1271-2434" - ], - "doi": [ - "10.1101/2023.11.10.566632" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/38014127/" - ], - "journal": [ - "bioRxiv" - ], - "name": [ - "A behavioral roadmap for the development of agency in the rodent." - ], - "pmid": [ - "38014127" - ], - "title": [ - "A behavioral roadmap for the development of agency in the rodent." + "project_role": [ + "contact_pi" ], - "year": [ - "2024" + "role_source": [ + "reporter" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/d69b71df-b5e8-490c-8df0-5a7883fac0d5" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" } ], + "in": [], "dangling": [], - "degree": 1, - "flags": [ - "warning" - ], - "violations": [ + "degree": 2, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/role/fbe6026f-8aad-439e-8fe2-da3cce084d1c", + "class": "ProjectRole", + "label": "contact_pi on R61MH138612", + "facts": { + "project_role": [ + "contact_pi" + ], + "role_source": [ + "curator" + ] + }, + "out": [ { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/38fab5c5-6eb6-4ba1-980a-78e5c2bf2312", - "severity": "warning" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/bcdcd220-fa82-47d4-9c1b-7a8da03dadd8" }, { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/38fab5c5-6eb6-4ba1-980a-78e5c2bf2312", - "severity": "warning" + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/80e226a5-f7e6-49d2-a64a-524940d498a5" } - ] + ], + "in": [], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] }, { - "id": "https://brain-bbqs.org/id/e96847f4-f5a5-4d3c-a358-be3fcc27f390", - "class": "Publication", - "label": "A cholinergic hub in the nucleus accumbens gates opioid-reward learning.", + "id": "https://brain-bbqs.org/id/role/66819421-258e-42c3-b30a-5ed7345463e3", + "class": "ProjectRole", + "label": "contact_pi on R61MH138705", "facts": { - "doi": [ - "10.1038/s41586-026-10887-9" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/42557321/" - ], - "journal": [ - "Nature" - ], - "name": [ - "A cholinergic hub in the nucleus accumbens gates opioid-reward learning." - ], - "pmid": [ - "42557321" - ], - "title": [ - "A cholinergic hub in the nucleus accumbens gates opioid-reward learning." + "project_role": [ + "contact_pi" ], - "year": [ - "2026" + "role_source": [ + "reporter" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/1e1fc06b-fe5c-4ec2-9f64-474f98ae31e8" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/0fd7e9bf-a1c2-48ba-b235-75cee07f2fc2" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/38289d36-f3a6-43e1-955b-db1d3d400cb2" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/9b5abbf9-7fe8-489b-9e27-fd2c4f7e5990", - "class": "Publication", - "label": "A microbiota-epigenetic circuit controls systematic circadian programs in the gut epithelium.", + "id": "https://brain-bbqs.org/id/role/bd6b0699-938f-4117-94d2-97177837e94c", + "class": "ProjectRole", + "label": "contact_pi on R61MH138713", "facts": { - "doi": [ - "10.3389/fsysb.2023.1175306" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/40747296/" - ], - "journal": [ - "Front Syst Biol" - ], - "name": [ - "A microbiota-epigenetic circuit controls systematic circadian programs in the gut epithelium." - ], - "pmid": [ - "40747296" - ], - "title": [ - "A microbiota-epigenetic circuit controls systematic circadian programs in the gut epithelium." + "project_role": [ + "contact_pi" ], - "year": [ - "2023" + "role_source": [ + "reporter" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/e6996650-b858-4ddb-b422-4fd92fdfaac4" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/36f00adf-1d84-4267-85c0-0af7379df8cc", - "class": "Publication", - "label": "A Multiparadigm Approach to Characterize Dominance Behaviors in CD1 and C57BL6 Male Mice.", + "id": "https://brain-bbqs.org/id/role/8730c049-9ec8-4a10-9e6f-0e5f0b33144e", + "class": "ProjectRole", + "label": "contact_pi on R61MH138966", "facts": { - "author_orcids": [ - "https://orcid.org/0000-0001-9293-2697", - "https://orcid.org/0000-0002-6329-7441", - "https://orcid.org/0009-0001-4532-5074", - "https://orcid.org/0009-0004-9299-992X" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/39500574/" - ], - "journal": [ - "eNeuro" - ], - "name": [ - "A Multiparadigm Approach to Characterize Dominance Behaviors in CD1 and C57BL6 Male Mice." - ], - "pmid": [ - "39500574" - ], - "title": [ - "A Multiparadigm Approach to Characterize Dominance Behaviors in CD1 and C57BL6 Male Mice." + "project_role": [ + "contact_pi" ], - "year": [ - "2024" + "role_source": [ + "reporter" ] }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated", - "warning" - ], - "violations": [ - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/36f00adf-1d84-4267-85c0-0af7379df8cc", - "severity": "warning" - }, + "out": [ { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/36f00adf-1d84-4267-85c0-0af7379df8cc", - "severity": "warning" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/a5644db3-8ade-4026-9139-c1945c0869d6" }, { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/36f00adf-1d84-4267-85c0-0af7379df8cc", - "severity": "warning" + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/adc6c1dd-57a9-49bb-a57d-521fd1208a76" } - ] + ], + "in": [], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] }, { - "id": "https://brain-bbqs.org/id/a0ce7dc8-e0b9-4b44-85b8-8955d6a36a59", - "class": "Publication", - "label": "A Network Approach to Understanding the Role of Executive Functioning and Alpha Oscillations in Inattention and Hyperactivity-Impulsivity Symptoms of ADHD.", + "id": "https://brain-bbqs.org/id/role/29154919-0da2-4db6-a005-c5cf8451746d", + "class": "ProjectRole", + "label": "contact_pi on R61MH138967", "facts": { - "doi": [ - "10.1177/10870547241253999" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/38798087/" - ], - "journal": [ - "J Atten Disord" - ], - "name": [ - "A Network Approach to Understanding the Role of Executive Functioning and Alpha Oscillations in Inattention and Hyperactivity-Impulsivity Symptoms of ADHD." - ], - "pmid": [ - "38798087" - ], - "title": [ - "A Network Approach to Understanding the Role of Executive Functioning and Alpha Oscillations in Inattention and Hyperactivity-Impulsivity Symptoms of ADHD." + "project_role": [ + "contact_pi" ], - "year": [ - "2024" + "role_source": [ + "reporter" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/dc09061c-41ce-4e6e-bfe9-5e4805b4356c" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/797fd7cf-49dc-40a2-811d-aeec94460ead" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/39a5e171-49ad-4125-bb84-9feb6e3ef28e", - "class": "Publication", - "label": "A new era for executive function research: On the transition from centralized to distributed executive functioning.", + "id": "https://brain-bbqs.org/id/role/182058c5-770d-4ac3-984a-ea1f4d8d48f1", + "class": "ProjectRole", + "label": "contact_pi on R61MH142354", "facts": { - "doi": [ - "10.1016/j.neubiorev.2021.02.011" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/33582233/" - ], - "journal": [ - "Neurosci Biobehav Rev" - ], - "name": [ - "A new era for executive function research: On the transition from centralized to distributed executive functioning." - ], - "pmid": [ - "33582233" - ], - "title": [ - "A new era for executive function research: On the transition from centralized to distributed executive functioning." + "project_role": [ + "contact_pi" ], - "year": [ - "2021" + "role_source": [ + "funder_notice" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/b2b7ce80-8dbf-4cf8-804c-9daebe9a9fa5" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/cbc8640e-6d05-4872-bf01-6e3f7d89c349" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/8b505d92-14d0-43cd-9cb3-62ae42e26744", - "class": "Publication", - "label": "A topological data analysis method for revealing dynamic changes in psychotherapy microprocesses.", + "id": "https://brain-bbqs.org/id/role/b87d800c-a0aa-4ea4-aa2e-4fba4fbf8480", + "class": "ProjectRole", + "label": "contact_pi on U01DA063534", "facts": { - "doi": [ - "10.3389/fpsyg.2025.1711782" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/41657836/" - ], - "journal": [ - "Front Psychol" - ], - "name": [ - "A topological data analysis method for revealing dynamic changes in psychotherapy microprocesses." - ], - "pmid": [ - "41657836" + "project_role": [ + "contact_pi" ], - "title": [ - "A topological data analysis method for revealing dynamic changes in psychotherapy microprocesses." - ], - "year": [ - "2025" + "role_source": [ + "reporter" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/864e9b52-4173-4b92-bd81-d0bc6a7fc3cb" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/1e2423ff-965b-4485-8557-797c1e1dee38" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/0c13ec6b-1864-453c-a447-cf938ec53940", - "class": "Publication", - "label": "A Wearable Sweat Rate Sensor with Adaptive Sweat Ion Concentration Calibration.", + "id": "https://brain-bbqs.org/id/role/4fe6e211-9d96-4f8b-8753-c5a002e13b72", + "class": "ProjectRole", + "label": "contact_pi on U01DA063565", "facts": { - "doi": [ - "10.1109/lsens.2025.3579329" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/41104294/" - ], - "journal": [ - "IEEE Sens Lett" - ], - "name": [ - "A Wearable Sweat Rate Sensor with Adaptive Sweat Ion Concentration Calibration." - ], - "pmid": [ - "41104294" - ], - "title": [ - "A Wearable Sweat Rate Sensor with Adaptive Sweat Ion Concentration Calibration." + "project_role": [ + "contact_pi" ], - "year": [ - "2025" + "role_source": [ + "reporter" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/2634f607-be46-4d8d-baae-6ec0d66a5436" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/bf3493c0-de28-4731-9baf-c976ccc7c484" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/1c345b47-9c5c-4a88-a8e4-bd8737d97483", - "class": "Publication", - "label": "Alpha event-related decreases during encoding in adults with ADHD - An investigation of sustained attention and working memory processes.", + "id": "https://brain-bbqs.org/id/role/c325fdf0-4dc3-43aa-a2de-5a3607476ac5", + "class": "ProjectRole", + "label": "contact_pi on U01DA063581", "facts": { - "doi": [ - "10.1016/j.bbr.2024.115003" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/38642862/" - ], - "journal": [ - "Behav Brain Res" - ], - "name": [ - "Alpha event-related decreases during encoding in adults with ADHD - An investigation of sustained attention and working memory processes." - ], - "pmid": [ - "38642862" - ], - "title": [ - "Alpha event-related decreases during encoding in adults with ADHD - An investigation of sustained attention and working memory processes." + "project_role": [ + "contact_pi" ], - "year": [ - "2024" + "role_source": [ + "reporter" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/be8d825d-140a-4d72-a39a-2534cf2b4145" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/a98fe953-d2ad-4770-8c8c-1759f8500c4a" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/d956ef6b-0f6d-4bf3-a920-76a3db659efc", - "class": "Publication", - "label": "An Empirical Model of Ion-Selective Organic Electrochemical Transistors.", + "id": "https://brain-bbqs.org/id/role/eedb7237-95d4-4633-8431-0a94da8db187", + "class": "ProjectRole", + "label": "contact_pi on U01MH143789", "facts": { - "doi": [ - "10.1002/admt.202501217" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/42022372/" - ], - "journal": [ - "Adv Mater Technol" - ], - "name": [ - "An Empirical Model of Ion-Selective Organic Electrochemical Transistors." - ], - "pmid": [ - "42022372" - ], - "title": [ - "An Empirical Model of Ion-Selective Organic Electrochemical Transistors." + "project_role": [ + "contact_pi" ], - "year": [ - "2026" + "role_source": [ + "funder_notice" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/68fe4ee2-5beb-4a6e-ac58-2d31ad350cfd" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/8facb614-80ac-4873-8619-b37c2ad0ed62" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/276aa727-0539-4f2b-9fa0-c0b86a868876", - "class": "Publication", - "label": "An Intelligent Infrastructure as a Foundation for Modern Science.", + "id": "https://brain-bbqs.org/id/role/86c8c08c-3aa2-4ef9-a9a0-a7158781799b", + "class": "ProjectRole", + "label": "contact_pi on U01MH144347", "facts": { - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/40832056/" - ], - "journal": [ - "ArXiv" - ], - "name": [ - "An Intelligent Infrastructure as a Foundation for Modern Science." - ], - "pmid": [ - "40832056" - ], - "title": [ - "An Intelligent Infrastructure as a Foundation for Modern Science." + "project_role": [ + "contact_pi" ], - "year": [ - "2025" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/4626de5c-667e-4f70-be3e-44dffde3887b" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/8095d361-d12f-4015-86e7-67fced46f2e9" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/c352d902-bd16-447b-b0ca-4b23a59655f9", - "class": "Publication", - "label": "Arkypallidal neurons in the external globus pallidus can mediate inhibitory control by altering competition in the striatum.", + "id": "https://brain-bbqs.org/id/role/29a72f60-6de3-4c19-928c-05cd16342d6e", + "class": "ProjectRole", + "label": "contact_pi on U24DA064429", "facts": { - "author_orcids": [ - "https://orcid.org/0000-0001-6873-4404", - "https://orcid.org/0000-0002-2858-5325", - "https://orcid.org/0000-0002-6305-9371", - "https://orcid.org/0000-0003-4720-0336" - ], - "doi": [ - "10.1073/pnas.2408505121" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/39536079/" - ], - "journal": [ - "Proc Natl Acad Sci U S A" - ], - "name": [ - "Arkypallidal neurons in the external globus pallidus can mediate inhibitory control by altering competition in the striatum." - ], - "pmid": [ - "39536079" - ], - "title": [ - "Arkypallidal neurons in the external globus pallidus can mediate inhibitory control by altering competition in the striatum." + "project_role": [ + "contact_pi" ], - "year": [ - "2024" + "role_source": [ + "reporter" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/e5bdf58e-a1ff-4f5f-aa6d-667de414e16e" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" } ], + "in": [], "dangling": [], - "degree": 1, - "flags": [ - "warning" - ], - "violations": [ - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/c352d902-bd16-447b-b0ca-4b23a59655f9", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/c352d902-bd16-447b-b0ca-4b23a59655f9", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/c352d902-bd16-447b-b0ca-4b23a59655f9", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/c352d902-bd16-447b-b0ca-4b23a59655f9", - "severity": "warning" - } - ] + "degree": 2, + "flags": [], + "violations": [] }, { - "id": "https://brain-bbqs.org/id/f162cf66-a805-4425-9e9f-ee40c5c89bb2", - "class": "Publication", - "label": "AVERE: Improving Audiovisual Emotion Reasoning with Preference Optimization.", + "id": "https://brain-bbqs.org/id/role/cc0de44a-82ef-4fcf-811e-9695a46b47df", + "class": "ProjectRole", + "label": "graduate_student on R34DA061924", "facts": { - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/42801257/" - ], - "journal": [ - "Int Conf Learn Represent" - ], - "name": [ - "AVERE: Improving Audiovisual Emotion Reasoning with Preference Optimization." - ], - "pmid": [ - "42801257" - ], - "title": [ - "AVERE: Improving Audiovisual Emotion Reasoning with Preference Optimization." + "project_role": [ + "graduate_student" ], - "year": [ - "2026" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/afe5dc6f-8e97-48c9-bb79-5af130f1e62a" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/4308a85a-925b-4012-9d19-ea11860d7bf1", - "class": "Publication", - "label": "Ballistic food approaches in Parhyale hawaiensis require the antennae.", + "id": "https://brain-bbqs.org/id/role/cfcdf43e-bc65-4c3b-8046-9429be511ed1", + "class": "ProjectRole", + "label": "graduate_student on R34DA061924", "facts": { - "doi": [ - "10.64898/2026.06.16.732625" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/42395462/" - ], - "journal": [ - "bioRxiv" - ], - "name": [ - "Ballistic food approaches in Parhyale hawaiensis require the antennae." - ], - "pmid": [ - "42395462" - ], - "title": [ - "Ballistic food approaches in Parhyale hawaiensis require the antennae." + "project_role": [ + "graduate_student" ], - "year": [ - "2026" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/53f6094d-cb6e-4899-8b0d-d358b863fab9" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/5ec5db0e-0458-498c-9ebd-38f78c2d139c", - "class": "Publication", - "label": "BaRISTA: Brain Scale Informed Spatiotemporal Representation of Human Intracranial Neural Activity.", + "id": "https://brain-bbqs.org/id/role/14faecbb-11c6-469d-aea3-8a57dba85867", + "class": "ProjectRole", + "label": "graduate_student on U01DA063581", "facts": { - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/42662669/" - ], - "journal": [ - "Adv Neural Inf Process Syst" - ], - "name": [ - "BaRISTA: Brain Scale Informed Spatiotemporal Representation of Human Intracranial Neural Activity." - ], - "pmid": [ - "42662669" - ], - "title": [ - "BaRISTA: Brain Scale Informed Spatiotemporal Representation of Human Intracranial Neural Activity." + "project_role": [ + "graduate_student" ], - "year": [ - "2025" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/a98fe953-d2ad-4770-8c8c-1759f8500c4a" } ], + "in": [], "dangling": [], "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/3575b5d6-de13-43e9-9391-c5dc106f4dc3", - "class": "Publication", - "label": "BCL2 regulates antibacterial autophagy in the intestinal epithelium.", + "id": "https://brain-bbqs.org/id/role/d1bb4677-b510-48ad-a89b-680830403a37", + "class": "ProjectRole", + "label": "graduate_student on U24DA064429", "facts": { - "author_orcids": [ - "https://orcid.org/0000-0002-2759-4641", - "https://orcid.org/0000-0002-7166-4870" - ], - "doi": [ - "10.1073/pnas.2410205121" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/39602254/" - ], - "journal": [ - "Proc Natl Acad Sci U S A" - ], - "name": [ - "BCL2 regulates antibacterial autophagy in the intestinal epithelium." - ], - "pmid": [ - "39602254" - ], - "title": [ - "BCL2 regulates antibacterial autophagy in the intestinal epithelium." + "project_role": [ + "graduate_student" ], - "year": [ - "2024" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ - { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" - } - ], - "dangling": [], - "degree": 1, - "flags": [ - "warning" - ], - "violations": [ + "out": [ { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/3575b5d6-de13-43e9-9391-c5dc106f4dc3", - "severity": "warning" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/20d3bb9f-8cbe-45b8-974e-1c84e0d9631f" }, { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/3575b5d6-de13-43e9-9391-c5dc106f4dc3", - "severity": "warning" + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" } - ] + ], + "in": [], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] }, { - "id": "https://brain-bbqs.org/id/9b2f7713-e1e1-4bd6-a2d3-2bfc9f00cd11", - "class": "Publication", - "label": "Beyond the Beta Rebound: Post-Task Responses in Oscillatory Activity follow Cessation of Working Memory Processes.", + "id": "https://brain-bbqs.org/id/role/02220da7-1bf8-49e9-8ff0-ed008ea8d03e", + "class": "ProjectRole", + "label": "mpi on R34DA062119", "facts": { - "doi": [ - "10.1016/j.neuroimage.2022.119801" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/36496181/" - ], - "journal": [ - "Neuroimage" - ], - "name": [ - "Beyond the Beta Rebound: Post-Task Responses in Oscillatory Activity follow Cessation of Working Memory Processes." - ], - "pmid": [ - "36496181" - ], - "title": [ - "Beyond the Beta Rebound: Post-Task Responses in Oscillatory Activity follow Cessation of Working Memory Processes." + "project_role": [ + "mpi" ], - "year": [ - "2023" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/026f060a-5264-4ed0-89e7-d2cd2c436b38" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/f294b0d9-175a-47c7-854c-d4d750009812" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/7d6d3ede-5075-44de-87e0-829d557a6887", - "class": "Publication", - "label": "BRAID: Input-driven nonlinear dynamical modeling of neural-behavioral data.", + "id": "https://brain-bbqs.org/id/role/535c5cae-fbd2-4199-a1c2-02af47928538", + "class": "ProjectRole", + "label": "mpi on R34DA062119", "facts": { - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/42131509/" - ], - "journal": [ - "Int Conf Learn Represent" - ], - "name": [ - "BRAID: Input-driven nonlinear dynamical modeling of neural-behavioral data." + "project_role": [ + "mpi" ], - "pmid": [ - "42131509" - ], - "title": [ - "BRAID: Input-driven nonlinear dynamical modeling of neural-behavioral data." - ], - "year": [ - "2025" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/13ccc90e-b105-48b2-8590-4804cd2b5f54" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/f294b0d9-175a-47c7-854c-d4d750009812" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/e96d4fb7-c4d6-4776-b39c-dfb97dc12f41", - "class": "Publication", - "label": "BRAID: Input-driven nonlinear dynamical modeling of neural-behavioral data.", + "id": "https://brain-bbqs.org/id/role/2c2dc99f-9c5e-43ad-8c5a-7012d2feedba", + "class": "ProjectRole", + "label": "mpi on R61MH142354", "facts": { - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/41040807/" - ], - "journal": [ - "ArXiv" - ], - "name": [ - "BRAID: Input-driven nonlinear dynamical modeling of neural-behavioral data." - ], - "pmid": [ - "41040807" - ], - "title": [ - "BRAID: Input-driven nonlinear dynamical modeling of neural-behavioral data." + "project_role": [ + "mpi" ], - "year": [ - "2025" + "role_source": [ + "funder_notice" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/e1fcac8e-1f50-4dc8-8f14-f0ee62614861" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/cbc8640e-6d05-4872-bf01-6e3f7d89c349" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/93b1ea26-0dae-458a-a946-13dca91b5382", - "class": "Publication", - "label": "Brain-computer interfaces for neuropsychiatric disorders.", + "id": "https://brain-bbqs.org/id/role/a2f1ea9f-aab3-4407-b7d3-4570537c2678", + "class": "ProjectRole", + "label": "mpi on R61MH142354", "facts": { - "doi": [ - "10.1038/s44222-024-00177-2" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/40988938/" - ], - "journal": [ - "Nat Rev Bioeng" - ], - "name": [ - "Brain-computer interfaces for neuropsychiatric disorders." - ], - "pmid": [ - "40988938" - ], - "title": [ - "Brain-computer interfaces for neuropsychiatric disorders." + "project_role": [ + "mpi" ], - "year": [ - "2024" + "role_source": [ + "funder_notice" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/156fb20f-5e40-4804-992d-dc353b5e99e4" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/cbc8640e-6d05-4872-bf01-6e3f7d89c349" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "class": "Publication", - "label": "CaBLAM! A high-contrast bioluminescent Ca[2+] indicator derived from an engineered Oplophorus gracilirostris luciferase.", + "id": "https://brain-bbqs.org/id/role/bc9cb644-1dc5-4caf-ae76-da464cb8e2dc", + "class": "ProjectRole", + "label": "mpi on R61MH142354", "facts": { - "author_orcids": [ - "https://orcid.org/0000-0001-5165-6518", - "https://orcid.org/0000-0001-5595-8548", - "https://orcid.org/0000-0001-5991-5991", - "https://orcid.org/0000-0001-6585-2413", - "https://orcid.org/0000-0001-7969-9632", - "https://orcid.org/0000-0001-9151-0257", - "https://orcid.org/0000-0001-9974-4226", - "https://orcid.org/0000-0002-0148-0769", - "https://orcid.org/0000-0002-1016-6093", - "https://orcid.org/0000-0002-1607-1124", - "https://orcid.org/0000-0002-2653-265X", - "https://orcid.org/0000-0002-3044-7079", - "https://orcid.org/0000-0002-3685-576X", - "https://orcid.org/0000-0002-6701-3901", - "https://orcid.org/0000-0002-6824-8112", - "https://orcid.org/0000-0002-7146-9119", - "https://orcid.org/0000-0002-7970-796X", - "https://orcid.org/0000-0002-8580-7924", - "https://orcid.org/0000-0003-0376-3495", - "https://orcid.org/0000-0003-1806-2421", - "https://orcid.org/0000-0003-2474-2714", - "https://orcid.org/0000-0003-4534-1602", - "https://orcid.org/0000-0003-4631-4139", - "https://orcid.org/0009-0005-5363-2620", - "https://orcid.org/0009-0007-6475-0379", - "https://orcid.org/0009-0008-4732-4340", - "https://orcid.org/0009-0009-2804-6821" - ], - "doi": [ - "10.1101/2023.06.25.546478" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/37425712/" - ], - "journal": [ - "bioRxiv" - ], - "name": [ - "CaBLAM! A high-contrast bioluminescent Ca[2+] indicator derived from an engineered Oplophorus gracilirostris luciferase." - ], - "pmid": [ - "37425712" - ], - "title": [ - "CaBLAM! A high-contrast bioluminescent Ca[2+] indicator derived from an engineered Oplophorus gracilirostris luciferase." + "project_role": [ + "mpi" ], - "year": [ - "2025" + "role_source": [ + "funder_notice" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/3be49154-45d9-45b4-9872-3271a67a5225" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/cbc8640e-6d05-4872-bf01-6e3f7d89c349" } ], + "in": [], "dangling": [], - "degree": 1, - "flags": [ - "warning" - ], - "violations": [ - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "severity": "warning" - }, + "degree": 2, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/role/0dca4f7e-50c2-4cc8-ac51-1cbe7cd5deaa", + "class": "ProjectRole", + "label": "other on R24MH136632", + "facts": { + "project_role": [ + "other" + ], + "role_source": [ + "curator" + ] + }, + "out": [ { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "severity": "warning" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/40a825b2-31fc-4ffe-b686-9b09a1576b33" }, { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "severity": "warning" - }, + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" + } + ], + "in": [], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/role/145ca46a-181b-4fb5-b546-3522f659e770", + "class": "ProjectRole", + "label": "other on R24MH136632", + "facts": { + "project_role": [ + "other" + ], + "role_source": [ + "curator" + ] + }, + "out": [ { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "severity": "warning" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/2984e917-2448-4596-9648-b52dc92b2c5d" }, { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "severity": "warning" - }, + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" + } + ], + "in": [], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/role/3d7151df-4a2b-40cd-97ae-0f695e5d237e", + "class": "ProjectRole", + "label": "other on R24MH136632", + "facts": { + "project_role": [ + "other" + ], + "role_source": [ + "curator" + ] + }, + "out": [ { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "severity": "warning" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/850426b4-fca0-4cfc-a528-60b11208e652" }, { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "severity": "warning" - }, + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" + } + ], + "in": [], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/role/455424c4-b3b7-466e-b6f0-c959fbb74b77", + "class": "ProjectRole", + "label": "other on R24MH136632", + "facts": { + "project_role": [ + "other" + ], + "role_source": [ + "curator" + ] + }, + "out": [ { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "severity": "warning" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/c302f348-ef46-4a60-801c-55a7783ca421" }, { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "severity": "warning" - }, + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" + } + ], + "in": [], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/role/5c64f851-de9f-4496-84da-58ed338ffa65", + "class": "ProjectRole", + "label": "other on R24MH136632", + "facts": { + "project_role": [ + "other" + ], + "role_source": [ + "curator" + ] + }, + "out": [ { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "severity": "warning" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/dfbc5c5d-f4a9-4b08-8454-321df0c98e18" }, { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "severity": "warning" - }, + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" + } + ], + "in": [], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/role/642bc862-c174-48ba-8b1b-e7c1356e07ab", + "class": "ProjectRole", + "label": "other on R24MH136632", + "facts": { + "project_role": [ + "other" + ], + "role_source": [ + "curator" + ] + }, + "out": [ { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "severity": "warning" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/e6fb5750-5310-4d85-8beb-4cc8addbd988" }, { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "severity": "warning" - }, + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" + } + ], + "in": [], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/role/68749a60-249f-4eb2-ad4a-7ae78c76a2f9", + "class": "ProjectRole", + "label": "other on R24MH136632", + "facts": { + "project_role": [ + "other" + ], + "role_source": [ + "curator" + ] + }, + "out": [ { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "severity": "warning" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/eaa38acf-84a1-44ce-a1c6-eda307583731" }, { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "severity": "warning" - }, + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" + } + ], + "in": [], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/role/7492a89a-dd5f-46af-871d-c6f9a0bd6eb7", + "class": "ProjectRole", + "label": "other on R24MH136632", + "facts": { + "project_role": [ + "other" + ], + "role_source": [ + "curator" + ] + }, + "out": [ { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "severity": "warning" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/b2c565ea-4b4a-4586-9543-e61df6570936" }, { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "severity": "warning" - }, + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" + } + ], + "in": [], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/role/0b8db858-64e3-41bc-8ecc-948b44cdf963", + "class": "ProjectRole", + "label": "other on R34DA059723", + "facts": { + "project_role": [ + "other" + ], + "role_source": [ + "curator" + ] + }, + "out": [ { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "severity": "warning" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/a3de5020-ea6c-41c1-b397-3e0f6d43e98a" }, { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", - "severity": "warning" + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/2db5ee93-296a-446a-a3e6-59fd3d28c4a6" } - ] + ], + "in": [], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] }, { - "id": "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180", - "class": "Publication", - "label": "CaBLAM: a high-contrast bioluminescent Ca2+ indicator derived from an engineered Oplophorus gracilirostris luciferase.", + "id": "https://brain-bbqs.org/id/role/d7f6d7e4-401f-43ea-a3e2-ac34d7e73f1f", + "class": "ProjectRole", + "label": "other on R34DA061925", "facts": { - "author_orcids": [ - "https://orcid.org/0000-0001-5032-3834", - "https://orcid.org/0000-0001-5595-8548", - "https://orcid.org/0000-0001-7969-9632", - "https://orcid.org/0000-0001-9974-4226", - "https://orcid.org/0000-0002-0148-0769", - "https://orcid.org/0000-0002-1016-6093", - "https://orcid.org/0000-0002-3044-7079", - "https://orcid.org/0000-0002-7970-796X", - "https://orcid.org/0000-0003-4534-1602", - "https://orcid.org/0000-0003-4631-4139", - "https://orcid.org/0009-0007-6475-0379" - ], - "doi": [ - "10.1038/s41592-025-02972-0" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/41331138/" - ], - "journal": [ - "Nat Methods" - ], - "name": [ - "CaBLAM: a high-contrast bioluminescent Ca2+ indicator derived from an engineered Oplophorus gracilirostris luciferase." - ], - "pmid": [ - "41331138" - ], - "title": [ - "CaBLAM: a high-contrast bioluminescent Ca2+ indicator derived from an engineered Oplophorus gracilirostris luciferase." + "project_role": [ + "other" ], - "year": [ - "2026" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/e0d25d6e-4879-436d-980f-e690e3e5a937" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/1573f2f2-dfe7-476f-ba44-55011c0f5d1b" } ], + "in": [], "dangling": [], - "degree": 1, - "flags": [ - "warning" - ], - "violations": [ - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180", - "severity": "warning" - }, + "degree": 2, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/role/d64865d3-893f-4968-bcba-e3b33a6a4f1b", + "class": "ProjectRole", + "label": "other on R61MH135109", + "facts": { + "project_role": [ + "other" + ], + "role_source": [ + "curator" + ] + }, + "out": [ { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180", - "severity": "warning" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/0410e3c0-a5b5-4f3f-a0e0-2dc7e71c2d18" }, { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180", - "severity": "warning" + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/3352859e-5677-46dd-89d6-17c898b6f097" } - ] + ], + "in": [], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] }, { - "id": "https://brain-bbqs.org/id/933edfb2-8cdf-4a82-a113-102e200d5619", - "class": "Publication", - "label": "CapuchinAI 1.0: Development of a machine learning-based touchscreen paradigm to test cognition in wild capuchins.", + "id": "https://brain-bbqs.org/id/role/295a454b-56ba-4d13-b630-75e3a333f965", + "class": "ProjectRole", + "label": "other on R61MH135114", "facts": { - "author_orcids": [ - "https://orcid.org/0000-0001-7425-9507", - "https://orcid.org/0000-0002-3115-6804", - "https://orcid.org/0000-0003-3549-4437", - "https://orcid.org/0009-0000-5456-5881" - ], - "doi": [ - "10.1101/2025.11.07.687266" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/41292955/" - ], - "journal": [ - "bioRxiv" - ], - "name": [ - "CapuchinAI 1.0: Development of a machine learning-based touchscreen paradigm to test cognition in wild capuchins." - ], - "pmid": [ - "41292955" - ], - "title": [ - "CapuchinAI 1.0: Development of a machine learning-based touchscreen paradigm to test cognition in wild capuchins." + "project_role": [ + "other" ], - "year": [ - "2025" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/1573f2f2-dfe7-476f-ba44-55011c0f5d1b" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/d25f9d24-5496-41a5-9a39-b686719d9eb7" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/4614269a-0d7f-4390-b4cc-568a09fa6a45" } ], + "in": [], "dangling": [], - "degree": 1, - "flags": [ - "warning" - ], - "violations": [ + "degree": 2, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/role/d940349f-ae79-43ae-8931-2c4b17d14f44", + "class": "ProjectRole", + "label": "other on R61MH135114", + "facts": { + "project_role": [ + "other" + ], + "role_source": [ + "curator" + ] + }, + "out": [ { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/933edfb2-8cdf-4a82-a113-102e200d5619", - "severity": "warning" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/3afc2f32-f84c-4ca1-9fee-139597851004" }, { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/933edfb2-8cdf-4a82-a113-102e200d5619", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/933edfb2-8cdf-4a82-a113-102e200d5619", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/933edfb2-8cdf-4a82-a113-102e200d5619", - "severity": "warning" + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/4614269a-0d7f-4390-b4cc-568a09fa6a45" } - ] + ], + "in": [], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] }, { - "id": "https://brain-bbqs.org/id/eef56f64-7e55-48ea-891a-b5c9b4c85b7c", - "class": "Publication", - "label": "CapuchinAI 1.0: Development of a Machine Learning-Based Touchscreen Paradigm to Test Cognition in Wild Capuchins.", + "id": "https://brain-bbqs.org/id/role/173d4dd7-5a55-48f7-b5ee-e08bfe25ac71", + "class": "ProjectRole", + "label": "other on R61MH138705", "facts": { - "doi": [ - "10.1002/ajp.70194" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/42516064/" - ], - "journal": [ - "Am J Primatol" - ], - "name": [ - "CapuchinAI 1.0: Development of a Machine Learning-Based Touchscreen Paradigm to Test Cognition in Wild Capuchins." - ], - "pmid": [ - "42516064" - ], - "title": [ - "CapuchinAI 1.0: Development of a Machine Learning-Based Touchscreen Paradigm to Test Cognition in Wild Capuchins." + "project_role": [ + "other" ], - "year": [ - "2026" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/1573f2f2-dfe7-476f-ba44-55011c0f5d1b" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/67f260ea-2946-4086-9111-c926fb4e6df7" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/38289d36-f3a6-43e1-955b-db1d3d400cb2" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/bd142774-20d3-461d-a99f-7fdc94c120bd", - "class": "Publication", - "label": "Central complex representations of self-movement are sufficient to compute wind direction in flight.", + "id": "https://brain-bbqs.org/id/role/eed7f06b-7ec2-42e5-8307-da70b41c7482", + "class": "ProjectRole", + "label": "other on U24DA064429", "facts": { - "doi": [ - "10.1126/sciadv.aeh7220" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/42664356/" - ], - "journal": [ - "Sci Adv" - ], - "name": [ - "Central complex representations of self-movement are sufficient to compute wind direction in flight." - ], - "pmid": [ - "42664356" - ], - "title": [ - "Central complex representations of self-movement are sufficient to compute wind direction in flight." + "project_role": [ + "other" ], - "year": [ - "2026" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/0f3bb33c-e7ee-4013-af5d-894d1adfa0ee" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/507c97c9-3940-4476-af59-4736c645c519", - "class": "Publication", - "label": "Challenges and opportunities of acquiring cortical recordings for chronic adaptive deep brain stimulation.", + "id": "https://brain-bbqs.org/id/role/3cc8ceb9-f7ea-4724-91ed-546efb08242b", + "class": "ProjectRole", + "label": "postdoc on R24MH136632", "facts": { - "author_orcids": [ - "https://orcid.org/0000-0001-6625-2946", - "https://orcid.org/0000-0001-8510-341X", - "https://orcid.org/0000-0002-0544-7720", - "https://orcid.org/0000-0002-6758-9708", - "https://orcid.org/0000-0002-6952-5417", - "https://orcid.org/0000-0002-9813-0094", - "https://orcid.org/0000-0003-2733-4003" - ], - "doi": [ - "10.1038/s41551-024-01314-3" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/39730913/" - ], - "journal": [ - "Nat Biomed Eng" - ], - "name": [ - "Challenges and opportunities of acquiring cortical recordings for chronic adaptive deep brain stimulation." - ], - "pmid": [ - "39730913" - ], - "title": [ - "Challenges and opportunities of acquiring cortical recordings for chronic adaptive deep brain stimulation." + "project_role": [ + "postdoc" ], - "year": [ - "2025" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ - { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" - } - ], - "dangling": [], - "degree": 1, - "flags": [ - "warning" - ], - "violations": [ - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/507c97c9-3940-4476-af59-4736c645c519", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/507c97c9-3940-4476-af59-4736c645c519", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/507c97c9-3940-4476-af59-4736c645c519", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/507c97c9-3940-4476-af59-4736c645c519", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/507c97c9-3940-4476-af59-4736c645c519", - "severity": "warning" - }, + "out": [ { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/507c97c9-3940-4476-af59-4736c645c519", - "severity": "warning" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/196ba606-dec6-4863-876e-907559234c80" }, { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/507c97c9-3940-4476-af59-4736c645c519", - "severity": "warning" + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" } - ] + ], + "in": [], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] }, { - "id": "https://brain-bbqs.org/id/91a308e7-a52f-4a5e-bce6-699f43554234", - "class": "Publication", - "label": "Chemical interplay between gut microbiota and epigenetics: Implications in circadian biology.", + "id": "https://brain-bbqs.org/id/role/c65b0c08-04d4-42fb-9ca4-dcc64f2f78f8", + "class": "ProjectRole", + "label": "postdoc on R34DA059506", "facts": { - "doi": [ - "10.1016/j.chembiol.2024.04.016" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/38776923/" - ], - "journal": [ - "Cell Chem Biol" - ], - "name": [ - "Chemical interplay between gut microbiota and epigenetics: Implications in circadian biology." - ], - "pmid": [ - "38776923" - ], - "title": [ - "Chemical interplay between gut microbiota and epigenetics: Implications in circadian biology." + "project_role": [ + "postdoc" ], - "year": [ - "2025" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/0a39ab50-9241-4b17-b6d4-77d5ac81e519" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/4f2619b1-a6a4-48e5-b21a-0f5455354ea9" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/750a9501-b64d-4947-91e5-b8ed542420a5", - "class": "Publication", - "label": "Co-delivery of synaptogenic and angiogenic nanoparticles in MAP scaffolds enhances post-stroke synapse formation.", + "id": "https://brain-bbqs.org/id/role/7ef4da01-8107-42b2-bc56-e4fe58d1c6a2", + "class": "ProjectRole", + "label": "postdoc on R34DA059512", "facts": { - "doi": [ - "10.1039/d5tb02179k" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/41670401/" - ], - "journal": [ - "J Mater Chem B" - ], - "name": [ - "Co-delivery of synaptogenic and angiogenic nanoparticles in MAP scaffolds enhances post-stroke synapse formation." - ], - "pmid": [ - "41670401" - ], - "title": [ - "Co-delivery of synaptogenic and angiogenic nanoparticles in MAP scaffolds enhances post-stroke synapse formation." + "project_role": [ + "postdoc" ], - "year": [ - "2026" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/1e1fc06b-fe5c-4ec2-9f64-474f98ae31e8" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/6119344c-d2da-45d1-8d69-ea22d8859dd3" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/1e1fc06b-fe5c-4ec2-9f64-474f98ae31e8" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/2370e3b0-8941-46f8-99b0-a30d467e764e", - "class": "Publication", - "label": "Continuous monitoring and machine vision reveals that developing gerbils exhibit structured social behaviors prior to the emergence of autonomy.", + "id": "https://brain-bbqs.org/id/role/068fdb34-5151-4b7f-b854-c9e147bdfcd1", + "class": "ProjectRole", + "label": "postdoc on R34DA061924", "facts": { - "doi": [ - "10.1371/journal.pbio.3003348" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/40920747/" - ], - "journal": [ - "PLoS Biol" - ], - "name": [ - "Continuous monitoring and machine vision reveals that developing gerbils exhibit structured social behaviors prior to the emergence of autonomy." - ], - "pmid": [ - "40920747" - ], - "title": [ - "Continuous monitoring and machine vision reveals that developing gerbils exhibit structured social behaviors prior to the emergence of autonomy." + "project_role": [ + "postdoc" ], - "year": [ - "2025" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/0681de3a-08d8-4a60-88c1-65ef2a02a93f" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/31b0954a-08ab-46b1-a4e3-39a951d09e23", - "class": "Publication", - "label": "Cooperation: Behavioral manifestations and neural mechanisms.", + "id": "https://brain-bbqs.org/id/role/e165b281-959b-4738-b6c6-cd404994d003", + "class": "ProjectRole", + "label": "postdoc on R61MH135407", "facts": { - "doi": [ - "10.1016/j.conb.2026.103177" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/41719608/" - ], - "journal": [ - "Curr Opin Neurobiol" - ], - "name": [ - "Cooperation: Behavioral manifestations and neural mechanisms." - ], - "pmid": [ - "41719608" - ], - "title": [ - "Cooperation: Behavioral manifestations and neural mechanisms." + "project_role": [ + "postdoc" ], - "year": [ - "2026" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/1e2423ff-965b-4485-8557-797c1e1dee38" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/608bd920-0a69-4a7a-a0fe-0740195f0c64" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/7fd65aca-ff11-4642-ab3d-17489049db10", - "class": "Publication", - "label": "Cross-Modal Representational Knowledge Distillation for Enhanced Spike-Informed LFP Modeling.", + "id": "https://brain-bbqs.org/id/role/63cd8c2a-0860-4130-857c-c33765b115d5", + "class": "ProjectRole", + "label": "postdoc on R61MH138713", "facts": { - "doi": [ - "10.52202/085713-1792" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/42662695/" - ], - "journal": [ - "Adv Neural Inf Process Syst" - ], - "name": [ - "Cross-Modal Representational Knowledge Distillation for Enhanced Spike-Informed LFP Modeling." - ], - "pmid": [ - "42662695" - ], - "title": [ - "Cross-Modal Representational Knowledge Distillation for Enhanced Spike-Informed LFP Modeling." + "project_role": [ + "postdoc" ], - "year": [ - "2025" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/88203e28-70c5-4730-af2d-93d7f09b4250" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/d951e426-557c-44e1-a830-212bbdd1514c", - "class": "Publication", - "label": "Cycle-by-cycle respiration waveforms are coupled with the shape of neural oscillations.", + "id": "https://brain-bbqs.org/id/role/caef691a-ad28-4fbe-b098-6536757b49d6", + "class": "ProjectRole", + "label": "postdoc on R61MH138713", "facts": { - "doi": [ - "10.64898/2026.04.13.718339" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/42039630/" - ], - "journal": [ - "bioRxiv" - ], - "name": [ - "Cycle-by-cycle respiration waveforms are coupled with the shape of neural oscillations." - ], - "pmid": [ - "42039630" - ], - "title": [ - "Cycle-by-cycle respiration waveforms are coupled with the shape of neural oscillations." + "project_role": [ + "postdoc" ], - "year": [ - "2026" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/3352859e-5677-46dd-89d6-17c898b6f097" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/82f53756-81ce-4348-a8bb-6bce2e685dee" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/4b31df5d-6d5c-49d5-9abd-ecc1cbafe965", - "class": "Publication", - "label": "Delivery of Angiogenic Therapy from Flowable Hyaluronic Acid Porous Scaffolds Results in Functional Improvement without Anti-Inflammatory Agents.", + "id": "https://brain-bbqs.org/id/role/6344ea60-1fad-4b96-ac49-43e00f2acf04", + "class": "ProjectRole", + "label": "postdoc on R61MH138967", "facts": { - "doi": [ - "10.1002/adfm.202500696" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/41536438/" - ], - "journal": [ - "Adv Funct Mater" - ], - "name": [ - "Delivery of Angiogenic Therapy from Flowable Hyaluronic Acid Porous Scaffolds Results in Functional Improvement without Anti-Inflammatory Agents." - ], - "pmid": [ - "41536438" - ], - "title": [ - "Delivery of Angiogenic Therapy from Flowable Hyaluronic Acid Porous Scaffolds Results in Functional Improvement without Anti-Inflammatory Agents." + "project_role": [ + "postdoc" ], - "year": [ - "2025" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/1e1fc06b-fe5c-4ec2-9f64-474f98ae31e8" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/9a233497-f3cd-4888-b5b6-a83630e5f1ee" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/797fd7cf-49dc-40a2-811d-aeec94460ead" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/820bf47c-7868-47f1-a5a7-b4a900ee16de", - "class": "Publication", - "label": "Dexterous single sniffs for ethological active olfaction.", + "id": "https://brain-bbqs.org/id/role/4d3e76c2-2bbb-43b6-9950-982b6ac296cd", + "class": "ProjectRole", + "label": "postdoc on U01DA063534", "facts": { - "doi": [ - "10.1126/sciadv.aed3610" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/42397911/" - ], - "journal": [ - "Sci Adv" - ], - "name": [ - "Dexterous single sniffs for ethological active olfaction." - ], - "pmid": [ - "42397911" - ], - "title": [ - "Dexterous single sniffs for ethological active olfaction." + "project_role": [ + "postdoc" ], - "year": [ - "2026" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/2db5ee93-296a-446a-a3e6-59fd3d28c4a6" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/6cedc563-ca67-467e-9c98-48b5b67123de" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/1e2423ff-965b-4485-8557-797c1e1dee38" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/d164ed89-3894-4cbc-a952-84e7161554d7", - "class": "Publication", - "label": "Directing negative emotional states through parallel genetically-distinct basolateral amygdala pathways to ventral striatum subregions.", + "id": "https://brain-bbqs.org/id/role/714db00c-3814-4ee2-878e-332e1894bc11", + "class": "ProjectRole", + "label": "postdoc on U01DA063534", "facts": { - "author_orcids": [ - "https://orcid.org/0000-0001-6324-4115", - "https://orcid.org/0000-0002-3192-3866", - "https://orcid.org/0000-0002-4102-1380", - "https://orcid.org/0009-0000-9480-7179", - "https://orcid.org/0009-0003-1298-457X", - "https://orcid.org/0009-0006-6711-2025" - ], - "doi": [ - "10.1038/s41380-025-03075-0" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/40514388/" - ], - "journal": [ - "Mol Psychiatry" - ], - "name": [ - "Directing negative emotional states through parallel genetically-distinct basolateral amygdala pathways to ventral striatum subregions." - ], - "pmid": [ - "40514388" - ], - "title": [ - "Directing negative emotional states through parallel genetically-distinct basolateral amygdala pathways to ventral striatum subregions." + "project_role": [ + "postdoc" ], - "year": [ - "2025" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/f6fd8ef2-e06f-4f72-bfc9-4464947fc0b9" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/1e2423ff-965b-4485-8557-797c1e1dee38" } ], + "in": [], "dangling": [], - "degree": 1, - "flags": [ - "warning" - ], - "violations": [ - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/d164ed89-3894-4cbc-a952-84e7161554d7", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/d164ed89-3894-4cbc-a952-84e7161554d7", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/d164ed89-3894-4cbc-a952-84e7161554d7", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/d164ed89-3894-4cbc-a952-84e7161554d7", - "severity": "warning" - }, + "degree": 2, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/role/82015065-d290-4efc-982b-75d67daa4d00", + "class": "ProjectRole", + "label": "postdoc on U01DA063534", + "facts": { + "project_role": [ + "postdoc" + ], + "role_source": [ + "curator" + ] + }, + "out": [ { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/d164ed89-3894-4cbc-a952-84e7161554d7", - "severity": "warning" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/ace580b9-6f04-457f-aac0-3ac3a7243e3b" }, { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/d164ed89-3894-4cbc-a952-84e7161554d7", - "severity": "warning" + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/1e2423ff-965b-4485-8557-797c1e1dee38" } - ] + ], + "in": [], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] }, { - "id": "https://brain-bbqs.org/id/3a906d0f-416c-4fda-bdf9-c9e42ca31ab8", - "class": "Publication", - "label": "Dissociative and prioritized modeling of behaviorally relevant neural dynamics using recurrent neural networks.", + "id": "https://brain-bbqs.org/id/role/baae3ddb-11fc-48ce-a5f1-23a481b233da", + "class": "ProjectRole", + "label": "postdoc on U01DA063534", "facts": { - "author_orcids": [ - "https://orcid.org/0000-0002-0544-7720", - "https://orcid.org/0000-0003-3032-5669", - "https://orcid.org/0000-0003-4116-0038" - ], - "doi": [ - "10.1038/s41593-024-01731-2" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/39242944/" - ], - "journal": [ - "Nat Neurosci" - ], - "name": [ - "Dissociative and prioritized modeling of behaviorally relevant neural dynamics using recurrent neural networks." - ], - "pmid": [ - "39242944" - ], - "title": [ - "Dissociative and prioritized modeling of behaviorally relevant neural dynamics using recurrent neural networks." + "project_role": [ + "postdoc" ], - "year": [ - "2024" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/7a5a1c11-f5f8-4643-b444-71228b1f298a" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/1e2423ff-965b-4485-8557-797c1e1dee38" } ], + "in": [], "dangling": [], - "degree": 1, - "flags": [ - "warning" - ], - "violations": [ - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/3a906d0f-416c-4fda-bdf9-c9e42ca31ab8", - "severity": "warning" - }, + "degree": 2, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/role/c6847ede-7f3e-4557-9af6-0740d2a0babc", + "class": "ProjectRole", + "label": "postdoc on U24DA064429", + "facts": { + "project_role": [ + "postdoc" + ], + "role_source": [ + "curator" + ] + }, + "out": [ { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/3a906d0f-416c-4fda-bdf9-c9e42ca31ab8", - "severity": "warning" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/6340c8ee-1d5b-45f0-87ff-c320a38df17d" }, { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/3a906d0f-416c-4fda-bdf9-c9e42ca31ab8", - "severity": "warning" + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" } - ] + ], + "in": [], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] }, { - "id": "https://brain-bbqs.org/id/93e8de08-1a43-4cbd-b120-7b9306a4a44b", - "class": "Publication", - "label": "Distinct dopaminergic spike-timing-dependent plasticity rules are suited to different functional roles.", + "id": "https://brain-bbqs.org/id/role/776f6ad8-5dbf-4a6b-a49e-4bdff826a969", + "class": "ProjectRole", + "label": "research_staff on R61MH138967", "facts": { - "author_orcids": [ - "https://orcid.org/0000-0002-1513-1551", - "https://orcid.org/0009-0008-0033-5691" - ], - "doi": [ - "10.1101/2024.06.24.600372" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/38979377/" - ], - "journal": [ - "bioRxiv" - ], - "name": [ - "Distinct dopaminergic spike-timing-dependent plasticity rules are suited to different functional roles." - ], - "pmid": [ - "38979377" - ], - "title": [ - "Distinct dopaminergic spike-timing-dependent plasticity rules are suited to different functional roles." + "project_role": [ + "research_staff" ], - "year": [ - "2025" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ - { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" - } - ], - "dangling": [], - "degree": 1, - "flags": [ - "warning" - ], - "violations": [ + "out": [ { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/93e8de08-1a43-4cbd-b120-7b9306a4a44b", - "severity": "warning" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/2eafb009-97ac-4492-97fe-b77490371b34" }, { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/93e8de08-1a43-4cbd-b120-7b9306a4a44b", - "severity": "warning" + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/797fd7cf-49dc-40a2-811d-aeec94460ead" } - ] + ], + "in": [], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] }, { - "id": "https://brain-bbqs.org/id/12c95d56-76ab-4519-8bf9-e406bf79736d", - "class": "Publication", - "label": "Distributed neural computation and the evolution of the first brains.", + "id": "https://brain-bbqs.org/id/role/c381ea7d-4332-4bf6-8491-474a2f6b6b41", + "class": "ProjectRole", + "label": "research_staff on U01MH143789", "facts": { - "author_orcids": [ - "https://orcid.org/0000-0002-2126-8634", - "https://orcid.org/0000-0002-4670-9141", - "https://orcid.org/0000-0002-5114-0519", - "https://orcid.org/0000-0002-8020-0664", - "https://orcid.org/0000-0003-0111-9081" - ], - "doi": [ - "10.1101/2025.10.03.680388" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/41256607/" - ], - "journal": [ - "bioRxiv" - ], - "name": [ - "Distributed neural computation and the evolution of the first brains." - ], - "pmid": [ - "41256607" - ], - "title": [ - "Distributed neural computation and the evolution of the first brains." + "project_role": [ + "research_staff" ], - "year": [ - "2025" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/ca25b66c-c03f-4d7e-90e8-93bc12fafeb1" + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/8facb614-80ac-4873-8619-b37c2ad0ed62" } ], + "in": [], "dangling": [], "degree": 1, - "flags": [ - "warning" - ], - "violations": [ - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/12c95d56-76ab-4519-8bf9-e406bf79736d", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/12c95d56-76ab-4519-8bf9-e406bf79736d", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/12c95d56-76ab-4519-8bf9-e406bf79736d", - "severity": "warning" - }, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/role/53e6a0e7-68a8-457d-8fa8-0763d062dcda", + "class": "ProjectRole", + "label": "research_staff on U01MH144347", + "facts": { + "project_role": [ + "research_staff" + ], + "role_source": [ + "curator" + ] + }, + "out": [ { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/12c95d56-76ab-4519-8bf9-e406bf79736d", - "severity": "warning" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/dd96356c-60d7-4a65-9be7-7a622de4287d" }, { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/12c95d56-76ab-4519-8bf9-e406bf79736d", - "severity": "warning" + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/8095d361-d12f-4015-86e7-67fced46f2e9" } - ] + ], + "in": [], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] }, { - "id": "https://brain-bbqs.org/id/c34d88e6-5348-4ef1-87ac-3b5d90417a1f", - "class": "Publication", - "label": "Dopamine depletion weakens direct pathway modulation of SNr neurons.", + "id": "https://brain-bbqs.org/id/role/9200c2fb-5bea-4d89-9115-1064c1387222", + "class": "ProjectRole", + "label": "research_staff on U01MH144347", "facts": { - "doi": [ - "10.1016/j.nbd.2024.106512" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/38670278/" - ], - "journal": [ - "Neurobiol Dis" - ], - "name": [ - "Dopamine depletion weakens direct pathway modulation of SNr neurons." - ], - "pmid": [ - "38670278" - ], - "title": [ - "Dopamine depletion weakens direct pathway modulation of SNr neurons." + "project_role": [ + "research_staff" ], - "year": [ - "2024" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/b2e8b421-674b-4e2d-8b61-f1e4a005c4f4" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/8095d361-d12f-4015-86e7-67fced46f2e9" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/9552ba2e-28e2-4237-b865-ec747251a036", - "class": "Publication", - "label": "Dopaminergic signaling to ventral striatum neurons initiates sniffing behavior.", + "id": "https://brain-bbqs.org/id/role/3df7974f-d227-4954-a984-3d403436fa70", + "class": "ProjectRole", + "label": "research_staff on U24DA064429", "facts": { - "author_orcids": [ - "https://orcid.org/0000-0002-3192-3866", - "https://orcid.org/0000-0002-5027-9623", - "https://orcid.org/0000-0002-5247-4860" - ], - "doi": [ - "10.1038/s41467-024-55644-6" - ], - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/39747223/" - ], - "journal": [ - "Nat Commun" - ], - "name": [ - "Dopaminergic signaling to ventral striatum neurons initiates sniffing behavior." - ], - "pmid": [ - "39747223" - ], - "title": [ - "Dopaminergic signaling to ventral striatum neurons initiates sniffing behavior." + "project_role": [ + "research_staff" ], - "year": [ - "2025" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/e03557cc-99aa-4b15-8786-bde9a5253fd1" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" } ], + "in": [], "dangling": [], - "degree": 1, - "flags": [ - "warning" - ], - "violations": [ - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/9552ba2e-28e2-4237-b865-ec747251a036", - "severity": "warning" - }, + "degree": 2, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/role/540b143e-459b-41df-98bd-9ec0b18d9bd6", + "class": "ProjectRole", + "label": "research_staff on U24DA064429", + "facts": { + "project_role": [ + "research_staff" + ], + "role_source": [ + "curator" + ] + }, + "out": [ { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/9552ba2e-28e2-4237-b865-ec747251a036", - "severity": "warning" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/95406597-a11e-4809-834d-8a6926c32164" }, { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/9552ba2e-28e2-4237-b865-ec747251a036", - "severity": "warning" + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" } - ] + ], + "in": [], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] }, { - "id": "https://brain-bbqs.org/id/50808fc1-e0bd-44c6-a772-364f8a35a23e", - "class": "Publication", - "label": "Dynamical Modeling of Behaviorally Relevant Spatiotemporal Patterns in Neural Imaging Data.", + "id": "https://brain-bbqs.org/id/role/d530f31d-a94a-4d0d-8e40-3c41610d768a", + "class": "ProjectRole", + "label": "research_staff on U24DA064429", "facts": { - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/41040797/" - ], - "journal": [ - "ArXiv" - ], - "name": [ - "Dynamical Modeling of Behaviorally Relevant Spatiotemporal Patterns in Neural Imaging Data." - ], - "pmid": [ - "41040797" - ], - "title": [ - "Dynamical Modeling of Behaviorally Relevant Spatiotemporal Patterns in Neural Imaging Data." + "project_role": [ + "research_staff" ], - "year": [ - "2025" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/5f8ac3c4-a0fb-44d6-ae2d-b505816d4141" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/71dda42b-ccf2-4447-b3f1-d25aa8f8b0bb", - "class": "Publication", - "label": "Dynamical Modeling of Behaviorally Relevant Spatiotemporal Patterns in Neural Imaging Data.", + "id": "https://brain-bbqs.org/id/role/c70a461e-5956-4c4f-aaba-40f11cc7b350", + "class": "ProjectRole", + "label": "trainee on U24DA064429", "facts": { - "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/41321375/" - ], - "journal": [ - "Proc Mach Learn Res" - ], - "name": [ - "Dynamical Modeling of Behaviorally Relevant Spatiotemporal Patterns in Neural Imaging Data." - ], - "pmid": [ - "41321375" - ], - "title": [ - "Dynamical Modeling of Behaviorally Relevant Spatiotemporal Patterns in Neural Imaging Data." + "project_role": [ + "trainee" ], - "year": [ - "2025" + "role_source": [ + "curator" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" + "predicate": "held_by", + "target": "https://brain-bbqs.org/id/a7318228-623e-4f94-a7e6-5e3fed968e1a" + }, + { + "predicate": "on_project", + "target": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/8b727552-b37c-4088-a4ff-63f55dd59281", - "class": "Publication", - "label": "Dynamical modeling of nonlinear latent factors in multiscale neural activity with real-time inference.", + "id": "https://brain-bbqs.org/id/6cddb30f-f477-4ed4-be06-30e6ed290ec1", + "class": "Protocol", + "label": "DLC 3D Pose Protocol", "facts": { - "doi": [ - "10.52202/085713-0927" + "description": [ + "Multi-camera 3D pose estimation methodology" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/42662968/" - ], - "journal": [ - "Adv Neural Inf Process Syst" + "https://www.nature.com/articles/s41596-019-0176-0" ], "name": [ - "Dynamical modeling of nonlinear latent factors in multiscale neural activity with real-time inference." - ], - "pmid": [ - "42662968" - ], - "title": [ - "Dynamical modeling of nonlinear latent factors in multiscale neural activity with real-time inference." - ], - "year": [ - "2025" + "DLC 3D Pose Protocol" ] }, "out": [], - "in": [ - { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" - } - ], + "in": [], "dangling": [], - "degree": 1, - "flags": [], + "degree": 0, + "flags": [ + "isolated" + ], "violations": [] }, { - "id": "https://brain-bbqs.org/id/e6a2c1d6-43e9-4dd7-b24d-769b7c8ac4a8", + "id": "https://brain-bbqs.org/id/38fab5c5-6eb6-4ba1-980a-78e5c2bf2312", "class": "Publication", - "label": "EEG Data Quality in Real-World Settings: Examining Neural Correlates of Attention in School-Aged Children.", + "label": "A behavioral roadmap for the development of agency in the rodent.", "facts": { + "author_orcids": [ + "https://orcid.org/0000-0003-0471-9816", + "https://orcid.org/0009-0007-1271-2434" + ], "doi": [ - "10.1111/mbe.12314" + "10.1101/2023.11.10.566632" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/38169954/" + "https://pubmed.ncbi.nlm.nih.gov/38014127/" ], "journal": [ - "Mind Brain Educ" + "bioRxiv" ], "name": [ - "EEG Data Quality in Real-World Settings: Examining Neural Correlates of Attention in School-Aged Children." + "A behavioral roadmap for the development of agency in the rodent." ], "pmid": [ - "38169954" + "38014127" ], "title": [ - "EEG Data Quality in Real-World Settings: Examining Neural Correlates of Attention in School-Aged Children." + "A behavioral roadmap for the development of agency in the rodent." ], "year": [ - "2022" + "2024" ] }, "out": [], "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" + "source": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" } ], "dangling": [], "degree": 1, - "flags": [], - "violations": [] + "flags": [ + "warning" + ], + "violations": [ + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/38fab5c5-6eb6-4ba1-980a-78e5c2bf2312", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/38fab5c5-6eb6-4ba1-980a-78e5c2bf2312", + "severity": "warning" + } + ] }, { - "id": "https://brain-bbqs.org/id/6e93a7ef-b7d8-45c7-891f-0b42a690f4ed", + "id": "https://brain-bbqs.org/id/e96847f4-f5a5-4d3c-a358-be3fcc27f390", "class": "Publication", - "label": "Effects of context on the neural correlates of attention in a college classroom.", + "label": "A cholinergic hub in the nucleus accumbens gates opioid-reward learning.", "facts": { "doi": [ - "10.1038/s41539-021-00094-8" + "10.1038/s41586-026-10887-9" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/34230485/" + "https://pubmed.ncbi.nlm.nih.gov/42557321/" ], "journal": [ - "NPJ Sci Learn" + "Nature" ], "name": [ - "Effects of context on the neural correlates of attention in a college classroom." + "A cholinergic hub in the nucleus accumbens gates opioid-reward learning." ], "pmid": [ - "34230485" + "42557321" ], "title": [ - "Effects of context on the neural correlates of attention in a college classroom." + "A cholinergic hub in the nucleus accumbens gates opioid-reward learning." ], "year": [ - "2021" + "2026" ] }, "out": [], "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" + "source": "https://brain-bbqs.org/id/1e1fc06b-fe5c-4ec2-9f64-474f98ae31e8" } ], "dangling": [], @@ -24413,27 +24739,27 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/563136c5-57a1-44da-9364-e1c22ce685f8", + "id": "https://brain-bbqs.org/id/9b5abbf9-7fe8-489b-9e27-fd2c4f7e5990", "class": "Publication", - "label": "Electrophysiological and Clinical Predictors of Methylphenidate, Guanfacine, and Combined Treatment Outcomes in Children With Attention-Deficit/Hyperactivity Disorder.", + "label": "A microbiota-epigenetic circuit controls systematic circadian programs in the gut epithelium.", "facts": { "doi": [ - "10.1016/j.jaac.2022.08.001" + "10.3389/fsysb.2023.1175306" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/35963559/" + "https://pubmed.ncbi.nlm.nih.gov/40747296/" ], "journal": [ - "J Am Acad Child Adolesc Psychiatry" + "Front Syst Biol" ], "name": [ - "Electrophysiological and Clinical Predictors of Methylphenidate, Guanfacine, and Combined Treatment Outcomes in Children With Attention-Deficit/Hyperactivity Disorder." + "A microbiota-epigenetic circuit controls systematic circadian programs in the gut epithelium." ], "pmid": [ - "35963559" + "40747296" ], "title": [ - "Electrophysiological and Clinical Predictors of Methylphenidate, Guanfacine, and Combined Treatment Outcomes in Children With Attention-Deficit/Hyperactivity Disorder." + "A microbiota-epigenetic circuit controls systematic circadian programs in the gut epithelium." ], "year": [ "2023" @@ -24443,7 +24769,7 @@ "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" + "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" } ], "dangling": [], @@ -24452,66 +24778,86 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/59585a8a-8f7e-4f02-af19-c40c797d9ddf", + "id": "https://brain-bbqs.org/id/36f00adf-1d84-4267-85c0-0af7379df8cc", "class": "Publication", - "label": "Ethical considerations for multimodal artificial intelligence in healthcare.", + "label": "A Multiparadigm Approach to Characterize Dominance Behaviors in CD1 and C57BL6 Male Mice.", "facts": { - "doi": [ - "10.1007/s43681-026-01259-0" + "author_orcids": [ + "https://orcid.org/0000-0001-9293-2697", + "https://orcid.org/0000-0002-6329-7441", + "https://orcid.org/0009-0001-4532-5074", + "https://orcid.org/0009-0004-9299-992X" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/42568704/" + "https://pubmed.ncbi.nlm.nih.gov/39500574/" ], "journal": [ - "AI Ethics" + "eNeuro" ], "name": [ - "Ethical considerations for multimodal artificial intelligence in healthcare." + "A Multiparadigm Approach to Characterize Dominance Behaviors in CD1 and C57BL6 Male Mice." ], "pmid": [ - "42568704" + "39500574" ], "title": [ - "Ethical considerations for multimodal artificial intelligence in healthcare." + "A Multiparadigm Approach to Characterize Dominance Behaviors in CD1 and C57BL6 Male Mice." ], "year": [ - "2026" + "2024" ] }, "out": [], - "in": [ + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated", + "warning" + ], + "violations": [ { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/36f00adf-1d84-4267-85c0-0af7379df8cc", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/36f00adf-1d84-4267-85c0-0af7379df8cc", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/36f00adf-1d84-4267-85c0-0af7379df8cc", + "severity": "warning" } - ], - "dangling": [], - "degree": 1, - "flags": [], - "violations": [] + ] }, { - "id": "https://brain-bbqs.org/id/691a3644-7a61-4b35-9aa2-9753a810792b", + "id": "https://brain-bbqs.org/id/a0ce7dc8-e0b9-4b44-85b8-8955d6a36a59", "class": "Publication", - "label": "Evaluating diurnal rhythms of host responses to enteric norovirus infection in mouse models.", + "label": "A Network Approach to Understanding the Role of Executive Functioning and Alpha Oscillations in Inattention and Hyperactivity-Impulsivity Symptoms of ADHD.", "facts": { "doi": [ - "10.1097/IN9.0000000000000052" + "10.1177/10870547241253999" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/39634021/" + "https://pubmed.ncbi.nlm.nih.gov/38798087/" ], "journal": [ - "Immunometabolism (Cobham)" + "J Atten Disord" ], "name": [ - "Evaluating diurnal rhythms of host responses to enteric norovirus infection in mouse models." + "A Network Approach to Understanding the Role of Executive Functioning and Alpha Oscillations in Inattention and Hyperactivity-Impulsivity Symptoms of ADHD." ], "pmid": [ - "39634021" + "38798087" ], "title": [ - "Evaluating diurnal rhythms of host responses to enteric norovirus infection in mouse models." + "A Network Approach to Understanding the Role of Executive Functioning and Alpha Oscillations in Inattention and Hyperactivity-Impulsivity Symptoms of ADHD." ], "year": [ "2024" @@ -24521,7 +24867,7 @@ "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" + "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" } ], "dangling": [], @@ -24530,30 +24876,30 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/42fe776f-9741-4820-a9c4-d11b14474575", + "id": "https://brain-bbqs.org/id/39a5e171-49ad-4125-bb84-9feb6e3ef28e", "class": "Publication", - "label": "Event-related brain oscillations in attention-deficit/hyperactivity disorder (ADHD): A systematic review and meta-analysis.", + "label": "A new era for executive function research: On the transition from centralized to distributed executive functioning.", "facts": { "doi": [ - "10.1016/j.ijpsycho.2022.01.014" + "10.1016/j.neubiorev.2021.02.011" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/35124111/" + "https://pubmed.ncbi.nlm.nih.gov/33582233/" ], "journal": [ - "Int J Psychophysiol" + "Neurosci Biobehav Rev" ], "name": [ - "Event-related brain oscillations in attention-deficit/hyperactivity disorder (ADHD): A systematic review and meta-analysis." + "A new era for executive function research: On the transition from centralized to distributed executive functioning." ], "pmid": [ - "35124111" + "33582233" ], "title": [ - "Event-related brain oscillations in attention-deficit/hyperactivity disorder (ADHD): A systematic review and meta-analysis." + "A new era for executive function research: On the transition from centralized to distributed executive functioning." ], "year": [ - "2022" + "2021" ] }, "out": [], @@ -24569,27 +24915,27 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/58b76015-dbdd-401e-92e7-4dc15e6183d9", + "id": "https://brain-bbqs.org/id/8b505d92-14d0-43cd-9cb3-62ae42e26744", "class": "Publication", - "label": "Evolution of thumbnails across Rodentia.", + "label": "A topological data analysis method for revealing dynamic changes in psychotherapy microprocesses.", "facts": { "doi": [ - "10.1126/science.ads7926" + "10.3389/fpsyg.2025.1711782" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/40906837/" + "https://pubmed.ncbi.nlm.nih.gov/41657836/" ], "journal": [ - "Science" + "Front Psychol" ], "name": [ - "Evolution of thumbnails across Rodentia." + "A topological data analysis method for revealing dynamic changes in psychotherapy microprocesses." ], "pmid": [ - "40906837" + "41657836" ], "title": [ - "Evolution of thumbnails across Rodentia." + "A topological data analysis method for revealing dynamic changes in psychotherapy microprocesses." ], "year": [ "2025" @@ -24599,7 +24945,7 @@ "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/2db5ee93-296a-446a-a3e6-59fd3d28c4a6" + "source": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0" } ], "dangling": [], @@ -24608,37 +24954,37 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/7cccc8d1-98d9-4ca2-aaf8-cb9c9f836f06", + "id": "https://brain-bbqs.org/id/0c13ec6b-1864-453c-a447-cf938ec53940", "class": "Publication", - "label": "Eye-Tracking-BIDS: the Brain Imaging Data Structure extended to gaze position and pupil data.", + "label": "A Wearable Sweat Rate Sensor with Adaptive Sweat Ion Concentration Calibration.", "facts": { "doi": [ - "10.64898/2026.02.03.703514" + "10.1109/lsens.2025.3579329" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/41676644/" + "https://pubmed.ncbi.nlm.nih.gov/41104294/" ], "journal": [ - "bioRxiv" + "IEEE Sens Lett" ], "name": [ - "Eye-Tracking-BIDS: the Brain Imaging Data Structure extended to gaze position and pupil data." + "A Wearable Sweat Rate Sensor with Adaptive Sweat Ion Concentration Calibration." ], "pmid": [ - "41676644" + "41104294" ], "title": [ - "Eye-Tracking-BIDS: the Brain Imaging Data Structure extended to gaze position and pupil data." + "A Wearable Sweat Rate Sensor with Adaptive Sweat Ion Concentration Calibration." ], "year": [ - "2026" + "2025" ] }, "out": [], "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" + "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" } ], "dangling": [], @@ -24647,27 +24993,27 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/987e3cf1-5d05-4e16-8849-4b5899ac84dc", + "id": "https://brain-bbqs.org/id/1c345b47-9c5c-4a88-a8e4-bd8737d97483", "class": "Publication", - "label": "FMRI correlates of autobiographical memory: Comparing silent retrieval with narrated retrieval.", + "label": "Alpha event-related decreases during encoding in adults with ADHD - An investigation of sustained attention and working memory processes.", "facts": { "doi": [ - "10.1016/j.neuropsychologia.2024.108842" + "10.1016/j.bbr.2024.115003" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/38428520/" + "https://pubmed.ncbi.nlm.nih.gov/38642862/" ], "journal": [ - "Neuropsychologia" + "Behav Brain Res" ], "name": [ - "FMRI correlates of autobiographical memory: Comparing silent retrieval with narrated retrieval." + "Alpha event-related decreases during encoding in adults with ADHD - An investigation of sustained attention and working memory processes." ], "pmid": [ - "38428520" + "38642862" ], "title": [ - "FMRI correlates of autobiographical memory: Comparing silent retrieval with narrated retrieval." + "Alpha event-related decreases during encoding in adults with ADHD - An investigation of sustained attention and working memory processes." ], "year": [ "2024" @@ -24677,7 +25023,7 @@ "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/3352859e-5677-46dd-89d6-17c898b6f097" + "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" } ], "dangling": [], @@ -24686,30 +25032,30 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/c7423364-c703-42a4-bde0-cdad1bc6f896", + "id": "https://brain-bbqs.org/id/d956ef6b-0f6d-4bf3-a920-76a3db659efc", "class": "Publication", - "label": "Fully-Printed Sensor Based Extended Gate Field Effect Transistors for Wireless Monitoring of Potassium and Ammonium Ions.", + "label": "An Empirical Model of Ion-Selective Organic Electrochemical Transistors.", "facts": { "doi": [ - "10.1109/sensors60989.2024.10784525" + "10.1002/admt.202501217" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/41048822/" + "https://pubmed.ncbi.nlm.nih.gov/42022372/" ], "journal": [ - "Proc IEEE Sens" + "Adv Mater Technol" ], "name": [ - "Fully-Printed Sensor Based Extended Gate Field Effect Transistors for Wireless Monitoring of Potassium and Ammonium Ions." + "An Empirical Model of Ion-Selective Organic Electrochemical Transistors." ], "pmid": [ - "41048822" + "42022372" ], "title": [ - "Fully-Printed Sensor Based Extended Gate Field Effect Transistors for Wireless Monitoring of Potassium and Ammonium Ions." + "An Empirical Model of Ion-Selective Organic Electrochemical Transistors." ], "year": [ - "2024" + "2026" ] }, "out": [], @@ -24725,27 +25071,24 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/c8a72b45-43f3-42d0-8cd6-aedc7f1242c0", + "id": "https://brain-bbqs.org/id/276aa727-0539-4f2b-9fa0-c0b86a868876", "class": "Publication", - "label": "GMFOLD: Subgraph matching for high-throughput DNA-aptamer secondary structure classification and machine learning interpretability.", + "label": "An Intelligent Infrastructure as a Foundation for Modern Science.", "facts": { - "doi": [ - "10.1016/j.mbs.2025.109485" - ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/40582587/" + "https://pubmed.ncbi.nlm.nih.gov/40832056/" ], "journal": [ - "Math Biosci" + "ArXiv" ], "name": [ - "GMFOLD: Subgraph matching for high-throughput DNA-aptamer secondary structure classification and machine learning interpretability." + "An Intelligent Infrastructure as a Foundation for Modern Science." ], "pmid": [ - "40582587" + "40832056" ], "title": [ - "GMFOLD: Subgraph matching for high-throughput DNA-aptamer secondary structure classification and machine learning interpretability." + "An Intelligent Infrastructure as a Foundation for Modern Science." ], "year": [ "2025" @@ -24755,7 +25098,7 @@ "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/80db3a04-a9ad-486d-abf1-4b20f8370ff9" + "source": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" } ], "dangling": [], @@ -24764,27 +25107,33 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/a346f802-eb1b-4438-a13c-9ee20e28db4c", + "id": "https://brain-bbqs.org/id/c352d902-bd16-447b-b0ca-4b23a59655f9", "class": "Publication", - "label": "Hand-Jaw Coordination as Mice Handle Food Is Organized around Intrinsic Structure-Function Relationships.", + "label": "Arkypallidal neurons in the external globus pallidus can mediate inhibitory control by altering competition in the striatum.", "facts": { + "author_orcids": [ + "https://orcid.org/0000-0001-6873-4404", + "https://orcid.org/0000-0002-2858-5325", + "https://orcid.org/0000-0002-6305-9371", + "https://orcid.org/0000-0003-4720-0336" + ], "doi": [ - "10.1523/JNEUROSCI.0856-24.2024" + "10.1073/pnas.2408505121" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/39251351/" + "https://pubmed.ncbi.nlm.nih.gov/39536079/" ], "journal": [ - "J Neurosci" + "Proc Natl Acad Sci U S A" ], "name": [ - "Hand-Jaw Coordination as Mice Handle Food Is Organized around Intrinsic Structure-Function Relationships." + "Arkypallidal neurons in the external globus pallidus can mediate inhibitory control by altering competition in the striatum." ], "pmid": [ - "39251351" + "39536079" ], "title": [ - "Hand-Jaw Coordination as Mice Handle Food Is Organized around Intrinsic Structure-Function Relationships." + "Arkypallidal neurons in the external globus pallidus can mediate inhibitory control by altering competition in the striatum." ], "year": [ "2024" @@ -24794,46 +25143,70 @@ "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/2db5ee93-296a-446a-a3e6-59fd3d28c4a6" + "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" } ], "dangling": [], "degree": 1, - "flags": [], - "violations": [] + "flags": [ + "warning" + ], + "violations": [ + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/c352d902-bd16-447b-b0ca-4b23a59655f9", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/c352d902-bd16-447b-b0ca-4b23a59655f9", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/c352d902-bd16-447b-b0ca-4b23a59655f9", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/c352d902-bd16-447b-b0ca-4b23a59655f9", + "severity": "warning" + } + ] }, { - "id": "https://brain-bbqs.org/id/4cbadc61-5660-48d8-9b16-7a8749f0defe", + "id": "https://brain-bbqs.org/id/f162cf66-a805-4425-9e9f-ee40c5c89bb2", "class": "Publication", - "label": "HDAC3 regulates the diurnal rhythms of claudin expression and intestinal permeability.", + "label": "AVERE: Improving Audiovisual Emotion Reasoning with Preference Optimization.", "facts": { - "doi": [ - "10.3389/freae.2024.1496999" - ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/40761288/" + "https://pubmed.ncbi.nlm.nih.gov/42801257/" ], "journal": [ - "Front Epigenet Epigenom" + "Int Conf Learn Represent" ], "name": [ - "HDAC3 regulates the diurnal rhythms of claudin expression and intestinal permeability." + "AVERE: Improving Audiovisual Emotion Reasoning with Preference Optimization." ], "pmid": [ - "40761288" + "42801257" ], "title": [ - "HDAC3 regulates the diurnal rhythms of claudin expression and intestinal permeability." + "AVERE: Improving Audiovisual Emotion Reasoning with Preference Optimization." ], "year": [ - "2024" + "2026" ] }, "out": [], "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" + "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" } ], "dangling": [], @@ -24842,92 +25215,63 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/eb63ab45-d094-4b5f-99a8-3fe0cb8529eb", + "id": "https://brain-bbqs.org/id/4308a85a-925b-4012-9d19-ea11860d7bf1", "class": "Publication", - "label": "How cortico-basal ganglia-thalamic subnetworks can shift decision policies to maximize reward rate.", + "label": "Ballistic food approaches in Parhyale hawaiensis require the antennae.", "facts": { - "author_orcids": [ - "https://orcid.org/0000-0002-1513-1551", - "https://orcid.org/0000-0002-2858-5325", - "https://orcid.org/0000-0003-4720-0336" - ], "doi": [ - "10.1101/2024.05.21.595174" + "10.64898/2026.06.16.732625" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/38826315/" + "https://pubmed.ncbi.nlm.nih.gov/42395462/" ], "journal": [ "bioRxiv" ], "name": [ - "How cortico-basal ganglia-thalamic subnetworks can shift decision policies to maximize reward rate." + "Ballistic food approaches in Parhyale hawaiensis require the antennae." ], "pmid": [ - "38826315" + "42395462" ], "title": [ - "How cortico-basal ganglia-thalamic subnetworks can shift decision policies to maximize reward rate." + "Ballistic food approaches in Parhyale hawaiensis require the antennae." ], "year": [ - "2025" + "2026" ] }, "out": [], "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" + "source": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608" } ], "dangling": [], "degree": 1, - "flags": [ - "warning" - ], - "violations": [ - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/eb63ab45-d094-4b5f-99a8-3fe0cb8529eb", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/eb63ab45-d094-4b5f-99a8-3fe0cb8529eb", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/eb63ab45-d094-4b5f-99a8-3fe0cb8529eb", - "severity": "warning" - } - ] + "flags": [], + "violations": [] }, { - "id": "https://brain-bbqs.org/id/03a34599-787d-42ac-83a3-e002bd419d37", + "id": "https://brain-bbqs.org/id/5ec5db0e-0458-498c-9ebd-38f78c2d139c", "class": "Publication", - "label": "How dopamine guides our social world.", + "label": "BaRISTA: Brain Scale Informed Spatiotemporal Representation of Human Intracranial Neural Activity.", "facts": { - "doi": [ - "10.1016/j.pharmr.2025.100085" - ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/40850269/" + "https://pubmed.ncbi.nlm.nih.gov/42662669/" ], "journal": [ - "Pharmacol Rev" + "Adv Neural Inf Process Syst" ], "name": [ - "How dopamine guides our social world." + "BaRISTA: Brain Scale Informed Spatiotemporal Representation of Human Intracranial Neural Activity." ], "pmid": [ - "40850269" + "42662669" ], "title": [ - "How dopamine guides our social world." + "BaRISTA: Brain Scale Informed Spatiotemporal Representation of Human Intracranial Neural Activity." ], "year": [ "2025" @@ -24937,7 +25281,7 @@ "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e" + "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" } ], "dangling": [], @@ -24946,35 +25290,34 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/bcf4ee35-21a5-473e-a2f2-75fa77147072", + "id": "https://brain-bbqs.org/id/3575b5d6-de13-43e9-9391-c5dc106f4dc3", "class": "Publication", - "label": "How the dynamic interplay of cortico-basal ganglia-thalamic pathways shapes the time course of deliberation and commitment.", + "label": "BCL2 regulates antibacterial autophagy in the intestinal epithelium.", "facts": { "author_orcids": [ - "https://orcid.org/0000-0002-1513-1551", - "https://orcid.org/0000-0002-4243-2405", - "https://orcid.org/0000-0003-4720-0336" + "https://orcid.org/0000-0002-2759-4641", + "https://orcid.org/0000-0002-7166-4870" ], "doi": [ - "10.1101/2025.03.17.643668" + "10.1073/pnas.2410205121" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/40166196/" + "https://pubmed.ncbi.nlm.nih.gov/39602254/" ], "journal": [ - "bioRxiv" + "Proc Natl Acad Sci U S A" ], "name": [ - "How the dynamic interplay of cortico-basal ganglia-thalamic pathways shapes the time course of deliberation and commitment." + "BCL2 regulates antibacterial autophagy in the intestinal epithelium." ], "pmid": [ - "40166196" + "39602254" ], "title": [ - "How the dynamic interplay of cortico-basal ganglia-thalamic pathways shapes the time course of deliberation and commitment." + "BCL2 regulates antibacterial autophagy in the intestinal epithelium." ], "year": [ - "2025" + "2024" ] }, "out": [], @@ -24993,441 +25336,559 @@ { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/bcf4ee35-21a5-473e-a2f2-75fa77147072", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/bcf4ee35-21a5-473e-a2f2-75fa77147072", + "value": "https://brain-bbqs.org/id/3575b5d6-de13-43e9-9391-c5dc106f4dc3", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/bcf4ee35-21a5-473e-a2f2-75fa77147072", + "value": "https://brain-bbqs.org/id/3575b5d6-de13-43e9-9391-c5dc106f4dc3", "severity": "warning" } ] }, { - "id": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "id": "https://brain-bbqs.org/id/9b2f7713-e1e1-4bd6-a2d3-2bfc9f00cd11", "class": "Publication", - "label": "Interfacing with the Brain: How Nanotechnology Can Contribute.", + "label": "Beyond the Beta Rebound: Post-Task Responses in Oscillatory Activity follow Cessation of Working Memory Processes.", "facts": { - "author_orcids": [ - "https://orcid.org/0000-0001-5527-6248", - "https://orcid.org/0000-0001-5621-1067", - "https://orcid.org/0000-0001-5739-8820", - "https://orcid.org/0000-0001-5959-6257", - "https://orcid.org/0000-0001-6518-6422", - "https://orcid.org/0000-0001-7323-9504", - "https://orcid.org/0000-0001-8248-5248", - "https://orcid.org/0000-0001-8420-0787", - "https://orcid.org/0000-0001-8556-5710", - "https://orcid.org/0000-0001-8948-5929", - "https://orcid.org/0000-0001-9245-3936", - "https://orcid.org/0000-0002-0405-2727", - "https://orcid.org/0000-0002-0645-5386", - "https://orcid.org/0000-0002-0944-1115", - "https://orcid.org/0000-0002-1641-7068", - "https://orcid.org/0000-0002-1961-4833", - "https://orcid.org/0000-0002-2126-9100", - "https://orcid.org/0000-0002-2224-6672", - "https://orcid.org/0000-0002-2312-7528", - "https://orcid.org/0000-0002-2972-2803", - "https://orcid.org/0000-0002-3312-1664", - "https://orcid.org/0000-0002-4499-6116", - "https://orcid.org/0000-0002-4722-1893", - "https://orcid.org/0000-0002-5636-4976", - "https://orcid.org/0000-0002-5643-0734", - "https://orcid.org/0000-0002-5666-6042", - "https://orcid.org/0000-0002-6079-109X", - "https://orcid.org/0000-0002-6526-4141", - "https://orcid.org/0000-0002-7323-2449", - "https://orcid.org/0000-0002-8329-4459", - "https://orcid.org/0000-0002-8869-8612", - "https://orcid.org/0000-0002-9236-157X", - "https://orcid.org/0000-0002-9845-9885", - "https://orcid.org/0000-0003-0292-0970", - "https://orcid.org/0000-0003-0368-7031", - "https://orcid.org/0000-0003-0517-1880", - "https://orcid.org/0000-0003-1614-2698", - "https://orcid.org/0000-0003-1672-6650", - "https://orcid.org/0000-0003-1938-553X", - "https://orcid.org/0000-0003-2401-3562", - "https://orcid.org/0000-0003-4195-9384", - "https://orcid.org/0000-0003-4440-3680", - "https://orcid.org/0000-0003-4770-5756", - "https://orcid.org/0000-0003-4872-3403", - "https://orcid.org/0009-0004-5439-6730", - "https://orcid.org/0009-0006-4347-1429", - "https://orcid.org/0009-0007-1504-921X", - "https://orcid.org/0009-0008-3948-2293" - ], "doi": [ - "10.1021/acsnano.4c10525" + "10.1016/j.neuroimage.2022.119801" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/40063703/" + "https://pubmed.ncbi.nlm.nih.gov/36496181/" ], "journal": [ - "ACS Nano" + "Neuroimage" ], "name": [ - "Interfacing with the Brain: How Nanotechnology Can Contribute." + "Beyond the Beta Rebound: Post-Task Responses in Oscillatory Activity follow Cessation of Working Memory Processes." ], "pmid": [ - "40063703" + "36496181" ], "title": [ - "Interfacing with the Brain: How Nanotechnology Can Contribute." + "Beyond the Beta Rebound: Post-Task Responses in Oscillatory Activity follow Cessation of Working Memory Processes." ], "year": [ - "2025" + "2023" ] }, "out": [], "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/80db3a04-a9ad-486d-abf1-4b20f8370ff9" + "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" } ], "dangling": [], "degree": 1, - "flags": [ - "warning" - ], - "violations": [ - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", - "severity": "warning" - }, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/7d6d3ede-5075-44de-87e0-829d557a6887", + "class": "Publication", + "label": "BRAID: Input-driven nonlinear dynamical modeling of neural-behavioral data.", + "facts": { + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/42131509/" + ], + "journal": [ + "Int Conf Learn Represent" + ], + "name": [ + "BRAID: Input-driven nonlinear dynamical modeling of neural-behavioral data." + ], + "pmid": [ + "42131509" + ], + "title": [ + "BRAID: Input-driven nonlinear dynamical modeling of neural-behavioral data." + ], + "year": [ + "2025" + ] + }, + "out": [], + "in": [ { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", - "severity": "warning" - }, + "predicate": "produced", + "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" + } + ], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/e96d4fb7-c4d6-4776-b39c-dfb97dc12f41", + "class": "Publication", + "label": "BRAID: Input-driven nonlinear dynamical modeling of neural-behavioral data.", + "facts": { + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/41040807/" + ], + "journal": [ + "ArXiv" + ], + "name": [ + "BRAID: Input-driven nonlinear dynamical modeling of neural-behavioral data." + ], + "pmid": [ + "41040807" + ], + "title": [ + "BRAID: Input-driven nonlinear dynamical modeling of neural-behavioral data." + ], + "year": [ + "2025" + ] + }, + "out": [], + "in": [ { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", - "severity": "warning" - }, + "predicate": "produced", + "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" + } + ], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/93b1ea26-0dae-458a-a946-13dca91b5382", + "class": "Publication", + "label": "Brain-computer interfaces for neuropsychiatric disorders.", + "facts": { + "doi": [ + "10.1038/s44222-024-00177-2" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/40988938/" + ], + "journal": [ + "Nat Rev Bioeng" + ], + "name": [ + "Brain-computer interfaces for neuropsychiatric disorders." + ], + "pmid": [ + "40988938" + ], + "title": [ + "Brain-computer interfaces for neuropsychiatric disorders." + ], + "year": [ + "2024" + ] + }, + "out": [], + "in": [ { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", - "severity": "warning" - }, + "predicate": "produced", + "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" + } + ], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", + "class": "Publication", + "label": "CaBLAM! A high-contrast bioluminescent Ca[2+] indicator derived from an engineered Oplophorus gracilirostris luciferase.", + "facts": { + "author_orcids": [ + "https://orcid.org/0000-0001-5165-6518", + "https://orcid.org/0000-0001-5595-8548", + "https://orcid.org/0000-0001-5991-5991", + "https://orcid.org/0000-0001-6585-2413", + "https://orcid.org/0000-0001-7969-9632", + "https://orcid.org/0000-0001-9151-0257", + "https://orcid.org/0000-0001-9974-4226", + "https://orcid.org/0000-0002-0148-0769", + "https://orcid.org/0000-0002-1016-6093", + "https://orcid.org/0000-0002-1607-1124", + "https://orcid.org/0000-0002-2653-265X", + "https://orcid.org/0000-0002-3044-7079", + "https://orcid.org/0000-0002-3685-576X", + "https://orcid.org/0000-0002-6701-3901", + "https://orcid.org/0000-0002-6824-8112", + "https://orcid.org/0000-0002-7146-9119", + "https://orcid.org/0000-0002-7970-796X", + "https://orcid.org/0000-0002-8580-7924", + "https://orcid.org/0000-0003-0376-3495", + "https://orcid.org/0000-0003-1806-2421", + "https://orcid.org/0000-0003-2474-2714", + "https://orcid.org/0000-0003-4534-1602", + "https://orcid.org/0000-0003-4631-4139", + "https://orcid.org/0009-0005-5363-2620", + "https://orcid.org/0009-0007-6475-0379", + "https://orcid.org/0009-0008-4732-4340", + "https://orcid.org/0009-0009-2804-6821" + ], + "doi": [ + "10.1101/2023.06.25.546478" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/37425712/" + ], + "journal": [ + "bioRxiv" + ], + "name": [ + "CaBLAM! A high-contrast bioluminescent Ca[2+] indicator derived from an engineered Oplophorus gracilirostris luciferase." + ], + "pmid": [ + "37425712" + ], + "title": [ + "CaBLAM! A high-contrast bioluminescent Ca[2+] indicator derived from an engineered Oplophorus gracilirostris luciferase." + ], + "year": [ + "2025" + ] + }, + "out": [], + "in": [ { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", - "severity": "warning" - }, + "predicate": "produced", + "source": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608" + } + ], + "dangling": [], + "degree": 1, + "flags": [ + "warning" + ], + "violations": [ { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", "severity": "warning" - }, + } + ] + }, + { + "id": "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180", + "class": "Publication", + "label": "CaBLAM: a high-contrast bioluminescent Ca2+ indicator derived from an engineered Oplophorus gracilirostris luciferase.", + "facts": { + "author_orcids": [ + "https://orcid.org/0000-0001-5032-3834", + "https://orcid.org/0000-0001-5595-8548", + "https://orcid.org/0000-0001-7969-9632", + "https://orcid.org/0000-0001-9974-4226", + "https://orcid.org/0000-0002-0148-0769", + "https://orcid.org/0000-0002-1016-6093", + "https://orcid.org/0000-0002-3044-7079", + "https://orcid.org/0000-0002-7970-796X", + "https://orcid.org/0000-0003-4534-1602", + "https://orcid.org/0000-0003-4631-4139", + "https://orcid.org/0009-0007-6475-0379" + ], + "doi": [ + "10.1038/s41592-025-02972-0" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/41331138/" + ], + "journal": [ + "Nat Methods" + ], + "name": [ + "CaBLAM: a high-contrast bioluminescent Ca2+ indicator derived from an engineered Oplophorus gracilirostris luciferase." + ], + "pmid": [ + "41331138" + ], + "title": [ + "CaBLAM: a high-contrast bioluminescent Ca2+ indicator derived from an engineered Oplophorus gracilirostris luciferase." + ], + "year": [ + "2026" + ] + }, + "out": [], + "in": [ + { + "predicate": "produced", + "source": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608" + } + ], + "dangling": [], + "degree": 1, + "flags": [ + "warning" + ], + "violations": [ { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "value": "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180", "severity": "warning" } ] }, { - "id": "https://brain-bbqs.org/id/d59fccae-d62c-44f8-9b6d-bf9ab2721553", + "id": "https://brain-bbqs.org/id/933edfb2-8cdf-4a82-a113-102e200d5619", "class": "Publication", - "label": "Introducing the STReaC (Spike Train Response Classification) toolbox.", + "label": "CapuchinAI 1.0: Development of a machine learning-based touchscreen paradigm to test cognition in wild capuchins.", "facts": { "author_orcids": [ - "https://orcid.org/0000-0002-1407-4356", - "https://orcid.org/0000-0002-1513-1551", - "https://orcid.org/0000-0002-3591-5775", - "https://orcid.org/0000-0002-8754-6828" + "https://orcid.org/0000-0001-7425-9507", + "https://orcid.org/0000-0002-3115-6804", + "https://orcid.org/0000-0003-3549-4437", + "https://orcid.org/0009-0000-5456-5881" ], "doi": [ - "10.1016/j.jneumeth.2023.110000" + "10.1101/2025.11.07.687266" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/38486714/" + "https://pubmed.ncbi.nlm.nih.gov/41292955/" ], "journal": [ - "J Neurosci Methods" + "bioRxiv" ], "name": [ - "Introducing the STReaC (Spike Train Response Classification) toolbox." + "CapuchinAI 1.0: Development of a machine learning-based touchscreen paradigm to test cognition in wild capuchins." ], "pmid": [ - "38486714" + "41292955" ], "title": [ - "Introducing the STReaC (Spike Train Response Classification) toolbox." + "CapuchinAI 1.0: Development of a machine learning-based touchscreen paradigm to test cognition in wild capuchins." ], "year": [ - "2024" + "2025" ] }, "out": [], "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" + "source": "https://brain-bbqs.org/id/1573f2f2-dfe7-476f-ba44-55011c0f5d1b" } ], "dangling": [], @@ -25439,51 +25900,51 @@ { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/d59fccae-d62c-44f8-9b6d-bf9ab2721553", + "value": "https://brain-bbqs.org/id/933edfb2-8cdf-4a82-a113-102e200d5619", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/d59fccae-d62c-44f8-9b6d-bf9ab2721553", + "value": "https://brain-bbqs.org/id/933edfb2-8cdf-4a82-a113-102e200d5619", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/d59fccae-d62c-44f8-9b6d-bf9ab2721553", + "value": "https://brain-bbqs.org/id/933edfb2-8cdf-4a82-a113-102e200d5619", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/d59fccae-d62c-44f8-9b6d-bf9ab2721553", + "value": "https://brain-bbqs.org/id/933edfb2-8cdf-4a82-a113-102e200d5619", "severity": "warning" } ] }, { - "id": "https://brain-bbqs.org/id/0efd86da-44c1-4222-9b30-72000b833267", + "id": "https://brain-bbqs.org/id/eef56f64-7e55-48ea-891a-b5c9b4c85b7c", "class": "Publication", - "label": "Investigating the Dynamic Relationship Between Anxiety and Spatial Memory Using Autonomous Ecological Momentary Assessment.", + "label": "CapuchinAI 1.0: Development of a Machine Learning-Based Touchscreen Paradigm to Test Cognition in Wild Capuchins.", "facts": { "doi": [ - "10.21203/rs.3.rs-9728773/v1" + "10.1002/ajp.70194" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/42282021/" + "https://pubmed.ncbi.nlm.nih.gov/42516064/" ], "journal": [ - "Res Sq" + "Am J Primatol" ], "name": [ - "Investigating the Dynamic Relationship Between Anxiety and Spatial Memory Using Autonomous Ecological Momentary Assessment." + "CapuchinAI 1.0: Development of a Machine Learning-Based Touchscreen Paradigm to Test Cognition in Wild Capuchins." ], "pmid": [ - "42282021" + "42516064" ], "title": [ - "Investigating the Dynamic Relationship Between Anxiety and Spatial Memory Using Autonomous Ecological Momentary Assessment." + "CapuchinAI 1.0: Development of a Machine Learning-Based Touchscreen Paradigm to Test Cognition in Wild Capuchins." ], "year": [ "2026" @@ -25493,7 +25954,7 @@ "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/22e61529-38ba-465f-b38b-274e24160fb6" + "source": "https://brain-bbqs.org/id/1573f2f2-dfe7-476f-ba44-55011c0f5d1b" } ], "dangling": [], @@ -25502,24 +25963,27 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/f97c2277-9e93-4712-ac91-7f5e04482ba8", + "id": "https://brain-bbqs.org/id/bd142774-20d3-461d-a99f-7fdc94c120bd", "class": "Publication", - "label": "Learning Mixtures of Linear Dynamical Systems via Hybrid Tensor-EM Method.", + "label": "Central complex representations of self-movement are sufficient to compute wind direction in flight.", "facts": { + "doi": [ + "10.1126/sciadv.aeh7220" + ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/41810029/" + "https://pubmed.ncbi.nlm.nih.gov/42664356/" ], "journal": [ - "ArXiv" + "Sci Adv" ], "name": [ - "Learning Mixtures of Linear Dynamical Systems via Hybrid Tensor-EM Method." + "Central complex representations of self-movement are sufficient to compute wind direction in flight." ], "pmid": [ - "41810029" + "42664356" ], "title": [ - "Learning Mixtures of Linear Dynamical Systems via Hybrid Tensor-EM Method." + "Central complex representations of self-movement are sufficient to compute wind direction in flight." ], "year": [ "2026" @@ -25529,7 +25993,7 @@ "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e" + "source": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608" } ], "dangling": [], @@ -25538,30 +26002,39 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/5935dae3-756d-4c4c-8742-f067e81a8012", + "id": "https://brain-bbqs.org/id/507c97c9-3940-4476-af59-4736c645c519", "class": "Publication", - "label": "LibreFace 2.0: A Generalizable Facial Expression Analysis Toolkit Leveraging Synthetic Data.", + "label": "Challenges and opportunities of acquiring cortical recordings for chronic adaptive deep brain stimulation.", "facts": { + "author_orcids": [ + "https://orcid.org/0000-0001-6625-2946", + "https://orcid.org/0000-0001-8510-341X", + "https://orcid.org/0000-0002-0544-7720", + "https://orcid.org/0000-0002-6758-9708", + "https://orcid.org/0000-0002-6952-5417", + "https://orcid.org/0000-0002-9813-0094", + "https://orcid.org/0000-0003-2733-4003" + ], "doi": [ - "10.1109/fg67764.2026.11556988" + "10.1038/s41551-024-01314-3" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/42763731/" + "https://pubmed.ncbi.nlm.nih.gov/39730913/" ], "journal": [ - "Proc Int Conf Autom Face Gesture Recognit" + "Nat Biomed Eng" ], "name": [ - "LibreFace 2.0: A Generalizable Facial Expression Analysis Toolkit Leveraging Synthetic Data." + "Challenges and opportunities of acquiring cortical recordings for chronic adaptive deep brain stimulation." ], "pmid": [ - "42763731" + "39730913" ], "title": [ - "LibreFace 2.0: A Generalizable Facial Expression Analysis Toolkit Leveraging Synthetic Data." + "Challenges and opportunities of acquiring cortical recordings for chronic adaptive deep brain stimulation." ], "year": [ - "2026" + "2025" ] }, "out": [], @@ -25573,41 +26046,86 @@ ], "dangling": [], "degree": 1, - "flags": [], - "violations": [] + "flags": [ + "warning" + ], + "violations": [ + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/507c97c9-3940-4476-af59-4736c645c519", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/507c97c9-3940-4476-af59-4736c645c519", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/507c97c9-3940-4476-af59-4736c645c519", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/507c97c9-3940-4476-af59-4736c645c519", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/507c97c9-3940-4476-af59-4736c645c519", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/507c97c9-3940-4476-af59-4736c645c519", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/507c97c9-3940-4476-af59-4736c645c519", + "severity": "warning" + } + ] }, { - "id": "https://brain-bbqs.org/id/fd825a1b-0bb9-4d2d-83e0-d901810e15b5", + "id": "https://brain-bbqs.org/id/91a308e7-a52f-4a5e-bce6-699f43554234", "class": "Publication", - "label": "Listening to a Consonant Chord Progression during Live Face-to-Face Gaze Enhances Neural Activity in Social Systems.", + "label": "Chemical interplay between gut microbiota and epigenetics: Implications in circadian biology.", "facts": { "doi": [ - "10.1523/JNEUROSCI.1116-25.2026" + "10.1016/j.chembiol.2024.04.016" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/41786608/" + "https://pubmed.ncbi.nlm.nih.gov/38776923/" ], "journal": [ - "J Neurosci" + "Cell Chem Biol" ], "name": [ - "Listening to a Consonant Chord Progression during Live Face-to-Face Gaze Enhances Neural Activity in Social Systems." + "Chemical interplay between gut microbiota and epigenetics: Implications in circadian biology." ], "pmid": [ - "41786608" + "38776923" ], "title": [ - "Listening to a Consonant Chord Progression during Live Face-to-Face Gaze Enhances Neural Activity in Social Systems." + "Chemical interplay between gut microbiota and epigenetics: Implications in circadian biology." ], "year": [ - "2026" + "2025" ] }, "out": [], "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/38289d36-f3a6-43e1-955b-db1d3d400cb2" + "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" } ], "dangling": [], @@ -25616,80 +26134,76 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/fa14bcd8-d960-44b1-874c-49e040b64e61", + "id": "https://brain-bbqs.org/id/750a9501-b64d-4947-91e5-b8ed542420a5", "class": "Publication", - "label": "Mapping the landscape of social behavior.", + "label": "Co-delivery of synaptogenic and angiogenic nanoparticles in MAP scaffolds enhances post-stroke synapse formation.", "facts": { "doi": [ - "10.1016/j.cell.2025.01.044" + "10.1039/d5tb02179k" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/40043703/" + "https://pubmed.ncbi.nlm.nih.gov/41670401/" ], "journal": [ - "Cell" + "J Mater Chem B" ], "name": [ - "Mapping the landscape of social behavior." + "Co-delivery of synaptogenic and angiogenic nanoparticles in MAP scaffolds enhances post-stroke synapse formation." ], "pmid": [ - "40043703" + "41670401" ], "title": [ - "Mapping the landscape of social behavior." + "Co-delivery of synaptogenic and angiogenic nanoparticles in MAP scaffolds enhances post-stroke synapse formation." ], "year": [ - "2025" + "2026" ] }, "out": [], "in": [ - { - "predicate": "produced", - "source": "https://brain-bbqs.org/id/4f2619b1-a6a4-48e5-b21a-0f5455354ea9" - }, { "predicate": "produced", "source": "https://brain-bbqs.org/id/1e1fc06b-fe5c-4ec2-9f64-474f98ae31e8" } ], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/419155ad-faba-4e10-8029-5339960877a1", + "id": "https://brain-bbqs.org/id/2370e3b0-8941-46f8-99b0-a30d467e764e", "class": "Publication", - "label": "Measurement Equivalence of On-Scalp OPM-MEG and Cryogenic MEG for Auditory and Somatosensory Cortical Mapping Across Development.", + "label": "Continuous monitoring and machine vision reveals that developing gerbils exhibit structured social behaviors prior to the emergence of autonomy.", "facts": { "doi": [ - "10.64898/2026.06.01.728862" + "10.1371/journal.pbio.3003348" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/42282642/" + "https://pubmed.ncbi.nlm.nih.gov/40920747/" ], "journal": [ - "bioRxiv" + "PLoS Biol" ], "name": [ - "Measurement Equivalence of On-Scalp OPM-MEG and Cryogenic MEG for Auditory and Somatosensory Cortical Mapping Across Development." + "Continuous monitoring and machine vision reveals that developing gerbils exhibit structured social behaviors prior to the emergence of autonomy." ], "pmid": [ - "42282642" + "40920747" ], "title": [ - "Measurement Equivalence of On-Scalp OPM-MEG and Cryogenic MEG for Auditory and Somatosensory Cortical Mapping Across Development." + "Continuous monitoring and machine vision reveals that developing gerbils exhibit structured social behaviors prior to the emergence of autonomy." ], "year": [ - "2026" + "2025" ] }, "out": [], "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/4614269a-0d7f-4390-b4cc-568a09fa6a45" + "source": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" } ], "dangling": [], @@ -25698,37 +26212,37 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/162437eb-ce44-46a5-b994-5741d334c6fb", + "id": "https://brain-bbqs.org/id/31b0954a-08ab-46b1-a4e3-39a951d09e23", "class": "Publication", - "label": "Methylphenidate, Guanfacine, and Combined Treatment Effects on Electroencephalography Correlates of Spatial Working Memory in Attention-Deficit/Hyperactivity Disorder.", + "label": "Cooperation: Behavioral manifestations and neural mechanisms.", "facts": { "doi": [ - "10.1016/j.jaac.2022.06.017" + "10.1016/j.conb.2026.103177" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/35963558/" + "https://pubmed.ncbi.nlm.nih.gov/41719608/" ], "journal": [ - "J Am Acad Child Adolesc Psychiatry" + "Curr Opin Neurobiol" ], "name": [ - "Methylphenidate, Guanfacine, and Combined Treatment Effects on Electroencephalography Correlates of Spatial Working Memory in Attention-Deficit/Hyperactivity Disorder." + "Cooperation: Behavioral manifestations and neural mechanisms." ], "pmid": [ - "35963558" + "41719608" ], "title": [ - "Methylphenidate, Guanfacine, and Combined Treatment Effects on Electroencephalography Correlates of Spatial Working Memory in Attention-Deficit/Hyperactivity Disorder." + "Cooperation: Behavioral manifestations and neural mechanisms." ], "year": [ - "2023" + "2026" ] }, "out": [], "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" + "source": "https://brain-bbqs.org/id/1e2423ff-965b-4485-8557-797c1e1dee38" } ], "dangling": [], @@ -25737,30 +26251,27 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/205009f7-ea15-4e13-9b73-292de432b467", + "id": "https://brain-bbqs.org/id/7fd65aca-ff11-4642-ab3d-17489049db10", "class": "Publication", - "label": "Mimicking opioid analgesia in cortical pain circuits.", + "label": "Cross-Modal Representational Knowledge Distillation for Enhanced Spike-Informed LFP Modeling.", "facts": { - "author_orcids": [ - "https://orcid.org/0000-0001-7248-2932" - ], "doi": [ - "10.1101/2024.04.26.591113" + "10.52202/085713-1792" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/38746090/" + "https://pubmed.ncbi.nlm.nih.gov/42662695/" ], "journal": [ - "bioRxiv" + "Adv Neural Inf Process Syst" ], "name": [ - "Mimicking opioid analgesia in cortical pain circuits." + "Cross-Modal Representational Knowledge Distillation for Enhanced Spike-Informed LFP Modeling." ], "pmid": [ - "38746090" + "42662695" ], "title": [ - "Mimicking opioid analgesia in cortical pain circuits." + "Cross-Modal Representational Knowledge Distillation for Enhanced Spike-Informed LFP Modeling." ], "year": [ "2025" @@ -25770,55 +26281,85 @@ "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" + "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" } ], "dangling": [], "degree": 1, - "flags": [ - "warning" - ], - "violations": [ + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/d951e426-557c-44e1-a830-212bbdd1514c", + "class": "Publication", + "label": "Cycle-by-cycle respiration waveforms are coupled with the shape of neural oscillations.", + "facts": { + "doi": [ + "10.64898/2026.04.13.718339" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/42039630/" + ], + "journal": [ + "bioRxiv" + ], + "name": [ + "Cycle-by-cycle respiration waveforms are coupled with the shape of neural oscillations." + ], + "pmid": [ + "42039630" + ], + "title": [ + "Cycle-by-cycle respiration waveforms are coupled with the shape of neural oscillations." + ], + "year": [ + "2026" + ] + }, + "out": [], + "in": [ { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/205009f7-ea15-4e13-9b73-292de432b467", - "severity": "warning" + "predicate": "produced", + "source": "https://brain-bbqs.org/id/3352859e-5677-46dd-89d6-17c898b6f097" } - ] + ], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] }, { - "id": "https://brain-bbqs.org/id/4318c6a2-b27a-4d99-b209-f55c57a824eb", + "id": "https://brain-bbqs.org/id/4b31df5d-6d5c-49d5-9abd-ecc1cbafe965", "class": "Publication", - "label": "Neurocognitive subprocesses of working memory performance.", + "label": "Delivery of Angiogenic Therapy from Flowable Hyaluronic Acid Porous Scaffolds Results in Functional Improvement without Anti-Inflammatory Agents.", "facts": { "doi": [ - "10.3758/s13415-021-00924-7" + "10.1002/adfm.202500696" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/34155599/" + "https://pubmed.ncbi.nlm.nih.gov/41536438/" ], "journal": [ - "Cogn Affect Behav Neurosci" + "Adv Funct Mater" ], "name": [ - "Neurocognitive subprocesses of working memory performance." + "Delivery of Angiogenic Therapy from Flowable Hyaluronic Acid Porous Scaffolds Results in Functional Improvement without Anti-Inflammatory Agents." ], "pmid": [ - "34155599" + "41536438" ], "title": [ - "Neurocognitive subprocesses of working memory performance." + "Delivery of Angiogenic Therapy from Flowable Hyaluronic Acid Porous Scaffolds Results in Functional Improvement without Anti-Inflammatory Agents." ], "year": [ - "2021" + "2025" ] }, "out": [], "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" + "source": "https://brain-bbqs.org/id/1e1fc06b-fe5c-4ec2-9f64-474f98ae31e8" } ], "dangling": [], @@ -25827,27 +26368,27 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/d3fb7a56-6a64-43c8-9fd6-7087d906d413", + "id": "https://brain-bbqs.org/id/820bf47c-7868-47f1-a5a7-b4a900ee16de", "class": "Publication", - "label": "Potential mechanisms and functional significance of aperiodic neural activity.", + "label": "Dexterous single sniffs for ethological active olfaction.", "facts": { "doi": [ - "10.1038/s41562-026-02503-7" + "10.1126/sciadv.aed3610" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/42332113/" + "https://pubmed.ncbi.nlm.nih.gov/42397911/" ], "journal": [ - "Nat Hum Behav" + "Sci Adv" ], "name": [ - "Potential mechanisms and functional significance of aperiodic neural activity." + "Dexterous single sniffs for ethological active olfaction." ], "pmid": [ - "42332113" + "42397911" ], "title": [ - "Potential mechanisms and functional significance of aperiodic neural activity." + "Dexterous single sniffs for ethological active olfaction." ], "year": [ "2026" @@ -25857,7 +26398,7 @@ "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/3352859e-5677-46dd-89d6-17c898b6f097" + "source": "https://brain-bbqs.org/id/2db5ee93-296a-446a-a3e6-59fd3d28c4a6" } ], "dangling": [], @@ -25866,34 +26407,35 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/7d69f10e-ffa5-4d44-b92b-ffb24e71b969", + "id": "https://brain-bbqs.org/id/d164ed89-3894-4cbc-a952-84e7161554d7", "class": "Publication", - "label": "Prefrontal and Subcortical c-Fos Mapping of Reward Responses across Competitive and Social Contexts.", + "label": "Directing negative emotional states through parallel genetically-distinct basolateral amygdala pathways to ventral striatum subregions.", "facts": { "author_orcids": [ - "https://orcid.org/0000-0001-9293-2697", - "https://orcid.org/0009-0000-8962-6904", - "https://orcid.org/0009-0001-4532-5074", - "https://orcid.org/0009-0004-9299-992X", - "https://orcid.org/0009-0005-4097-1666" + "https://orcid.org/0000-0001-6324-4115", + "https://orcid.org/0000-0002-3192-3866", + "https://orcid.org/0000-0002-4102-1380", + "https://orcid.org/0009-0000-9480-7179", + "https://orcid.org/0009-0003-1298-457X", + "https://orcid.org/0009-0006-6711-2025" ], "doi": [ - "10.1523/ENEURO.0158-25.2025" + "10.1038/s41380-025-03075-0" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/41093749/" + "https://pubmed.ncbi.nlm.nih.gov/40514388/" ], "journal": [ - "eNeuro" + "Mol Psychiatry" ], "name": [ - "Prefrontal and Subcortical c-Fos Mapping of Reward Responses across Competitive and Social Contexts." + "Directing negative emotional states through parallel genetically-distinct basolateral amygdala pathways to ventral striatum subregions." ], "pmid": [ - "41093749" + "40514388" ], "title": [ - "Prefrontal and Subcortical c-Fos Mapping of Reward Responses across Competitive and Social Contexts." + "Directing negative emotional states through parallel genetically-distinct basolateral amygdala pathways to ventral striatum subregions." ], "year": [ "2025" @@ -25915,54 +26457,71 @@ { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/7d69f10e-ffa5-4d44-b92b-ffb24e71b969", + "value": "https://brain-bbqs.org/id/d164ed89-3894-4cbc-a952-84e7161554d7", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/7d69f10e-ffa5-4d44-b92b-ffb24e71b969", + "value": "https://brain-bbqs.org/id/d164ed89-3894-4cbc-a952-84e7161554d7", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/7d69f10e-ffa5-4d44-b92b-ffb24e71b969", + "value": "https://brain-bbqs.org/id/d164ed89-3894-4cbc-a952-84e7161554d7", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/7d69f10e-ffa5-4d44-b92b-ffb24e71b969", + "value": "https://brain-bbqs.org/id/d164ed89-3894-4cbc-a952-84e7161554d7", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/d164ed89-3894-4cbc-a952-84e7161554d7", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/d164ed89-3894-4cbc-a952-84e7161554d7", "severity": "warning" } ] }, { - "id": "https://brain-bbqs.org/id/c3f26370-becc-4d39-af05-abeb0433bee9", + "id": "https://brain-bbqs.org/id/3a906d0f-416c-4fda-bdf9-c9e42ca31ab8", "class": "Publication", - "label": "Printed Wearable Sweat Rate Sensor for Continuous in-situ Perspiration Measurement.", + "label": "Dissociative and prioritized modeling of behaviorally relevant neural dynamics using recurrent neural networks.", "facts": { + "author_orcids": [ + "https://orcid.org/0000-0002-0544-7720", + "https://orcid.org/0000-0003-3032-5669", + "https://orcid.org/0000-0003-4116-0038" + ], "doi": [ - "10.1002/aisy.202400927" + "10.1038/s41593-024-01731-2" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/41122417/" + "https://pubmed.ncbi.nlm.nih.gov/39242944/" ], "journal": [ - "Adv Intell Syst" + "Nat Neurosci" ], "name": [ - "Printed Wearable Sweat Rate Sensor for Continuous in-situ Perspiration Measurement." + "Dissociative and prioritized modeling of behaviorally relevant neural dynamics using recurrent neural networks." ], "pmid": [ - "41122417" + "39242944" ], "title": [ - "Printed Wearable Sweat Rate Sensor for Continuous in-situ Perspiration Measurement." + "Dissociative and prioritized modeling of behaviorally relevant neural dynamics using recurrent neural networks." ], "year": [ - "2025" + "2024" ] }, "out": [], @@ -25974,37 +26533,56 @@ ], "dangling": [], "degree": 1, - "flags": [], - "violations": [] + "flags": [ + "warning" + ], + "violations": [ + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/3a906d0f-416c-4fda-bdf9-c9e42ca31ab8", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/3a906d0f-416c-4fda-bdf9-c9e42ca31ab8", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/3a906d0f-416c-4fda-bdf9-c9e42ca31ab8", + "severity": "warning" + } + ] }, { - "id": "https://brain-bbqs.org/id/20a8f7ad-ea28-4624-9cae-4c73d8e74549", + "id": "https://brain-bbqs.org/id/93e8de08-1a43-4cbd-b120-7b9306a4a44b", "class": "Publication", - "label": "Prioritized learning of cross-population neural dynamics.", + "label": "Distinct dopaminergic spike-timing-dependent plasticity rules are suited to different functional roles.", "facts": { "author_orcids": [ - "https://orcid.org/0000-0002-0544-7720", - "https://orcid.org/0000-0003-3032-5669", - "https://orcid.org/0000-0003-4116-0038", - "https://orcid.org/0009-0002-7532-8142" + "https://orcid.org/0000-0002-1513-1551", + "https://orcid.org/0009-0008-0033-5691" ], "doi": [ - "10.1088/1741-2552/ade569" + "10.1101/2024.06.24.600372" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/40527329/" + "https://pubmed.ncbi.nlm.nih.gov/38979377/" ], "journal": [ - "J Neural Eng" + "bioRxiv" ], "name": [ - "Prioritized learning of cross-population neural dynamics." + "Distinct dopaminergic spike-timing-dependent plasticity rules are suited to different functional roles." ], "pmid": [ - "40527329" + "38979377" ], "title": [ - "Prioritized learning of cross-population neural dynamics." + "Distinct dopaminergic spike-timing-dependent plasticity rules are suited to different functional roles." ], "year": [ "2025" @@ -26014,7 +26592,7 @@ "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" + "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" } ], "dangling": [], @@ -26026,100 +26604,128 @@ { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/20a8f7ad-ea28-4624-9cae-4c73d8e74549", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/20a8f7ad-ea28-4624-9cae-4c73d8e74549", - "severity": "warning" - }, - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/20a8f7ad-ea28-4624-9cae-4c73d8e74549", + "value": "https://brain-bbqs.org/id/93e8de08-1a43-4cbd-b120-7b9306a4a44b", "severity": "warning" }, { "shape": "AuthorOrcidResolvesShape", "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/20a8f7ad-ea28-4624-9cae-4c73d8e74549", + "value": "https://brain-bbqs.org/id/93e8de08-1a43-4cbd-b120-7b9306a4a44b", "severity": "warning" } ] }, { - "id": "https://brain-bbqs.org/id/7e6d2d83-a6f6-449d-96cf-c8b0a014e86f", + "id": "https://brain-bbqs.org/id/12c95d56-76ab-4519-8bf9-e406bf79736d", "class": "Publication", - "label": "Pupillary dilations in a Target/Distractor visual task paradigm and attention deficit hyperactivity disorder (ADHD).", + "label": "Distributed neural computation and the evolution of the first brains.", "facts": { + "author_orcids": [ + "https://orcid.org/0000-0002-2126-8634", + "https://orcid.org/0000-0002-4670-9141", + "https://orcid.org/0000-0002-5114-0519", + "https://orcid.org/0000-0002-8020-0664", + "https://orcid.org/0000-0003-0111-9081" + ], "doi": [ - "10.1016/j.neulet.2023.137556" + "10.1101/2025.10.03.680388" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/37951300/" + "https://pubmed.ncbi.nlm.nih.gov/41256607/" ], "journal": [ - "Neurosci Lett" + "bioRxiv" ], "name": [ - "Pupillary dilations in a Target/Distractor visual task paradigm and attention deficit hyperactivity disorder (ADHD)." + "Distributed neural computation and the evolution of the first brains." ], "pmid": [ - "37951300" + "41256607" ], "title": [ - "Pupillary dilations in a Target/Distractor visual task paradigm and attention deficit hyperactivity disorder (ADHD)." + "Distributed neural computation and the evolution of the first brains." ], "year": [ - "2024" + "2025" ] }, "out": [], "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" + "source": "https://brain-bbqs.org/id/ca25b66c-c03f-4d7e-90e8-93bc12fafeb1" } ], "dangling": [], "degree": 1, - "flags": [], - "violations": [] + "flags": [ + "warning" + ], + "violations": [ + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/12c95d56-76ab-4519-8bf9-e406bf79736d", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/12c95d56-76ab-4519-8bf9-e406bf79736d", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/12c95d56-76ab-4519-8bf9-e406bf79736d", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/12c95d56-76ab-4519-8bf9-e406bf79736d", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/12c95d56-76ab-4519-8bf9-e406bf79736d", + "severity": "warning" + } + ] }, { - "id": "https://brain-bbqs.org/id/51afd359-3797-4082-8f34-f356eaa33848", + "id": "https://brain-bbqs.org/id/c34d88e6-5348-4ef1-87ac-3b5d90417a1f", "class": "Publication", - "label": "Resilient nanostructured bioanalytic microneedle longitudinally monitors preclinical renal and hepatic drug clearance and dysfunction.", + "label": "Dopamine depletion weakens direct pathway modulation of SNr neurons.", "facts": { "doi": [ - "10.1126/scitranslmed.adr5493" + "10.1016/j.nbd.2024.106512" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/41920968/" + "https://pubmed.ncbi.nlm.nih.gov/38670278/" ], "journal": [ - "Sci Transl Med" + "Neurobiol Dis" ], "name": [ - "Resilient nanostructured bioanalytic microneedle longitudinally monitors preclinical renal and hepatic drug clearance and dysfunction." + "Dopamine depletion weakens direct pathway modulation of SNr neurons." ], "pmid": [ - "41920968" + "38670278" ], "title": [ - "Resilient nanostructured bioanalytic microneedle longitudinally monitors preclinical renal and hepatic drug clearance and dysfunction." + "Dopamine depletion weakens direct pathway modulation of SNr neurons." ], "year": [ - "2026" + "2024" ] }, "out": [], "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/80db3a04-a9ad-486d-abf1-4b20f8370ff9" + "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" } ], "dangling": [], @@ -26128,73 +26734,99 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/e0e97a3f-d239-4739-a9d8-6a2af1c6a838", + "id": "https://brain-bbqs.org/id/9552ba2e-28e2-4237-b865-ec747251a036", "class": "Publication", - "label": "Rethinking the external globus pallidus and information flow in cortico-basal ganglia-thalamic circuits.", + "label": "Dopaminergic signaling to ventral striatum neurons initiates sniffing behavior.", "facts": { + "author_orcids": [ + "https://orcid.org/0000-0002-3192-3866", + "https://orcid.org/0000-0002-5027-9623", + "https://orcid.org/0000-0002-5247-4860" + ], + "doi": [ + "10.1038/s41467-024-55644-6" + ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/38196745/" + "https://pubmed.ncbi.nlm.nih.gov/39747223/" ], "journal": [ - "ArXiv" + "Nat Commun" ], "name": [ - "Rethinking the external globus pallidus and information flow in cortico-basal ganglia-thalamic circuits." + "Dopaminergic signaling to ventral striatum neurons initiates sniffing behavior." ], "pmid": [ - "38196745" + "39747223" ], "title": [ - "Rethinking the external globus pallidus and information flow in cortico-basal ganglia-thalamic circuits." + "Dopaminergic signaling to ventral striatum neurons initiates sniffing behavior." ], "year": [ - "2023" + "2025" ] }, "out": [], "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" + "source": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e" } ], "dangling": [], "degree": 1, - "flags": [], - "violations": [] + "flags": [ + "warning" + ], + "violations": [ + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/9552ba2e-28e2-4237-b865-ec747251a036", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/9552ba2e-28e2-4237-b865-ec747251a036", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/9552ba2e-28e2-4237-b865-ec747251a036", + "severity": "warning" + } + ] }, { - "id": "https://brain-bbqs.org/id/154b96da-c04a-442c-868f-1586b692dc42", + "id": "https://brain-bbqs.org/id/50808fc1-e0bd-44c6-a772-364f8a35a23e", "class": "Publication", - "label": "SARTAB, a scalable system for automated real-time behavior detection based on animal tracking and Region Of Interest analysis: validation on fish courtship behavior.", + "label": "Dynamical Modeling of Behaviorally Relevant Spatiotemporal Patterns in Neural Imaging Data.", "facts": { - "doi": [ - "10.3389/fnbeh.2024.1509369" - ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/39703614/" + "https://pubmed.ncbi.nlm.nih.gov/41040797/" ], "journal": [ - "Front Behav Neurosci" + "ArXiv" ], "name": [ - "SARTAB, a scalable system for automated real-time behavior detection based on animal tracking and Region Of Interest analysis: validation on fish courtship behavior." + "Dynamical Modeling of Behaviorally Relevant Spatiotemporal Patterns in Neural Imaging Data." ], "pmid": [ - "39703614" + "41040797" ], "title": [ - "SARTAB, a scalable system for automated real-time behavior detection based on animal tracking and Region Of Interest analysis: validation on fish courtship behavior." + "Dynamical Modeling of Behaviorally Relevant Spatiotemporal Patterns in Neural Imaging Data." ], "year": [ - "2024" + "2025" ] }, "out": [], "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/e5bb6e4f-d3cf-44d4-ac1a-59f76724c0d2" + "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" } ], "dangling": [], @@ -26203,24 +26835,24 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/6a564dd1-f227-40f8-be3c-06bbd09c430c", + "id": "https://brain-bbqs.org/id/71dda42b-ccf2-4447-b3f1-d25aa8f8b0bb", "class": "Publication", - "label": "Shared-AE: Automatic Identification of Shared Subspaces in High-dimensional Neural and Behavioral Activity.", + "label": "Dynamical Modeling of Behaviorally Relevant Spatiotemporal Patterns in Neural Imaging Data.", "facts": { "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/41717318/" + "https://pubmed.ncbi.nlm.nih.gov/41321375/" ], "journal": [ - "Int Conf Learn Represent" + "Proc Mach Learn Res" ], "name": [ - "Shared-AE: Automatic Identification of Shared Subspaces in High-dimensional Neural and Behavioral Activity." + "Dynamical Modeling of Behaviorally Relevant Spatiotemporal Patterns in Neural Imaging Data." ], "pmid": [ - "41717318" + "41321375" ], "title": [ - "Shared-AE: Automatic Identification of Shared Subspaces in High-dimensional Neural and Behavioral Activity." + "Dynamical Modeling of Behaviorally Relevant Spatiotemporal Patterns in Neural Imaging Data." ], "year": [ "2025" @@ -26230,7 +26862,7 @@ "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e" + "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" } ], "dangling": [], @@ -26239,30 +26871,30 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/d2dadb0b-c44c-4e29-bc95-dce3ad1874ff", + "id": "https://brain-bbqs.org/id/8b727552-b37c-4088-a4ff-63f55dd59281", "class": "Publication", - "label": "Spectral Learning of Shared Dynamics Between Generalized-Linear Processes.", + "label": "Dynamical modeling of nonlinear latent factors in multiscale neural activity with real-time inference.", "facts": { "doi": [ - "10.52202/079017-2829" + "10.52202/085713-0927" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/41306626/" + "https://pubmed.ncbi.nlm.nih.gov/42662968/" ], "journal": [ "Adv Neural Inf Process Syst" ], "name": [ - "Spectral Learning of Shared Dynamics Between Generalized-Linear Processes." + "Dynamical modeling of nonlinear latent factors in multiscale neural activity with real-time inference." ], "pmid": [ - "41306626" + "42662968" ], "title": [ - "Spectral Learning of Shared Dynamics Between Generalized-Linear Processes." + "Dynamical modeling of nonlinear latent factors in multiscale neural activity with real-time inference." ], "year": [ - "2024" + "2025" ] }, "out": [], @@ -26278,37 +26910,37 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/44b1ac85-feb2-4792-9f46-109cf7876f4a", + "id": "https://brain-bbqs.org/id/e6a2c1d6-43e9-4dd7-b24d-769b7c8ac4a8", "class": "Publication", - "label": "Suppressing Sensation during Action across Species and Sensory Modalities: Predictive and Nonpredictive Mechanisms of Sensory Modulation.", + "label": "EEG Data Quality in Real-World Settings: Examining Neural Correlates of Attention in School-Aged Children.", "facts": { "doi": [ - "10.1523/JNEUROSCI.1351-25.2025" + "10.1111/mbe.12314" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/41224663/" + "https://pubmed.ncbi.nlm.nih.gov/38169954/" ], "journal": [ - "J Neurosci" + "Mind Brain Educ" ], "name": [ - "Suppressing Sensation during Action across Species and Sensory Modalities: Predictive and Nonpredictive Mechanisms of Sensory Modulation." + "EEG Data Quality in Real-World Settings: Examining Neural Correlates of Attention in School-Aged Children." ], "pmid": [ - "41224663" + "38169954" ], "title": [ - "Suppressing Sensation during Action across Species and Sensory Modalities: Predictive and Nonpredictive Mechanisms of Sensory Modulation." + "EEG Data Quality in Real-World Settings: Examining Neural Correlates of Attention in School-Aged Children." ], "year": [ - "2025" + "2022" ] }, "out": [], "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" + "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" } ], "dangling": [], @@ -26317,37 +26949,37 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/2a2ae141-5d5c-464a-809f-1e3a19a81293", + "id": "https://brain-bbqs.org/id/6e93a7ef-b7d8-45c7-891f-0b42a690f4ed", "class": "Publication", - "label": "The FDA's plan to phase out animal testing.", + "label": "Effects of context on the neural correlates of attention in a college classroom.", "facts": { "doi": [ - "10.1016/j.tibtech.2025.12.011" + "10.1038/s41539-021-00094-8" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/41571550/" + "https://pubmed.ncbi.nlm.nih.gov/34230485/" ], "journal": [ - "Trends Biotechnol" + "NPJ Sci Learn" ], "name": [ - "The FDA's plan to phase out animal testing." + "Effects of context on the neural correlates of attention in a college classroom." ], "pmid": [ - "41571550" + "34230485" ], "title": [ - "The FDA's plan to phase out animal testing." + "Effects of context on the neural correlates of attention in a college classroom." ], "year": [ - "2026" + "2021" ] }, "out": [], "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" + "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" } ], "dangling": [], @@ -26356,37 +26988,37 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/579fcaf5-df6d-42f9-a62d-59bd79fe3fae", + "id": "https://brain-bbqs.org/id/563136c5-57a1-44da-9364-e1c22ce685f8", "class": "Publication", - "label": "Topological data analysis captures complex behavioral dynamics during naturalistic social interaction between domestic ferrets.", + "label": "Electrophysiological and Clinical Predictors of Methylphenidate, Guanfacine, and Combined Treatment Outcomes in Children With Attention-Deficit/Hyperactivity Disorder.", "facts": { "doi": [ - "10.64898/2026.07.01.735818" + "10.1016/j.jaac.2022.08.001" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/42465299/" + "https://pubmed.ncbi.nlm.nih.gov/35963559/" ], "journal": [ - "bioRxiv" + "J Am Acad Child Adolesc Psychiatry" ], "name": [ - "Topological data analysis captures complex behavioral dynamics during naturalistic social interaction between domestic ferrets." + "Electrophysiological and Clinical Predictors of Methylphenidate, Guanfacine, and Combined Treatment Outcomes in Children With Attention-Deficit/Hyperactivity Disorder." ], "pmid": [ - "42465299" + "35963559" ], "title": [ - "Topological data analysis captures complex behavioral dynamics during naturalistic social interaction between domestic ferrets." + "Electrophysiological and Clinical Predictors of Methylphenidate, Guanfacine, and Combined Treatment Outcomes in Children With Attention-Deficit/Hyperactivity Disorder." ], "year": [ - "2026" + "2023" ] }, "out": [], "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0" + "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" } ], "dangling": [], @@ -26395,37 +27027,37 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/7e3ed91a-e0eb-45d6-aa86-cb785dfba7ba", + "id": "https://brain-bbqs.org/id/59585a8a-8f7e-4f02-af19-c40c797d9ddf", "class": "Publication", - "label": "Training of Awareness in ADHD: Leveraging Metacognition.", + "label": "Ethical considerations for multimodal artificial intelligence in healthcare.", "facts": { "doi": [ - "10.20900/jpbs.20240006" + "10.1007/s43681-026-01259-0" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/39493272/" + "https://pubmed.ncbi.nlm.nih.gov/42568704/" ], "journal": [ - "J Psychiatr Brain Sci" + "AI Ethics" ], "name": [ - "Training of Awareness in ADHD: Leveraging Metacognition." + "Ethical considerations for multimodal artificial intelligence in healthcare." ], "pmid": [ - "39493272" + "42568704" ], "title": [ - "Training of Awareness in ADHD: Leveraging Metacognition." + "Ethical considerations for multimodal artificial intelligence in healthcare." ], "year": [ - "2024" + "2026" ] }, "out": [], "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" + "source": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" } ], "dangling": [], @@ -26434,27 +27066,27 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/e483d68e-7bc8-4fcb-9a75-3d97825c02c9", + "id": "https://brain-bbqs.org/id/691a3644-7a61-4b35-9aa2-9753a810792b", "class": "Publication", - "label": "Unraveling robust brain-behavior links of depressive complaints through granular network models for understanding heterogeneity.", + "label": "Evaluating diurnal rhythms of host responses to enteric norovirus infection in mouse models.", "facts": { "doi": [ - "10.1016/j.jad.2024.05.060" + "10.1097/IN9.0000000000000052" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/38754596/" + "https://pubmed.ncbi.nlm.nih.gov/39634021/" ], "journal": [ - "J Affect Disord" + "Immunometabolism (Cobham)" ], "name": [ - "Unraveling robust brain-behavior links of depressive complaints through granular network models for understanding heterogeneity." + "Evaluating diurnal rhythms of host responses to enteric norovirus infection in mouse models." ], "pmid": [ - "38754596" + "39634021" ], "title": [ - "Unraveling robust brain-behavior links of depressive complaints through granular network models for understanding heterogeneity." + "Evaluating diurnal rhythms of host responses to enteric norovirus infection in mouse models." ], "year": [ "2024" @@ -26464,7 +27096,7 @@ "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" + "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" } ], "dangling": [], @@ -26473,90 +27105,76 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/0e032f88-c50f-4527-9c40-68e9b782173d", + "id": "https://brain-bbqs.org/id/42fe776f-9741-4820-a9c4-d11b14474575", "class": "Publication", - "label": "Unsupervised discovery of family specific vocal usage in the Mongolian gerbil.", + "label": "Event-related brain oscillations in attention-deficit/hyperactivity disorder (ADHD): A systematic review and meta-analysis.", "facts": { - "author_orcids": [ - "https://orcid.org/0000-0002-2692-5955", - "https://orcid.org/0000-0002-3783-6165", - "https://orcid.org/0000-0003-0471-9816" - ], "doi": [ - "10.7554/eLife.89892" + "10.1016/j.ijpsycho.2022.01.014" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/39680425/" + "https://pubmed.ncbi.nlm.nih.gov/35124111/" ], "journal": [ - "Elife" + "Int J Psychophysiol" ], "name": [ - "Unsupervised discovery of family specific vocal usage in the Mongolian gerbil." + "Event-related brain oscillations in attention-deficit/hyperactivity disorder (ADHD): A systematic review and meta-analysis." ], "pmid": [ - "39680425" + "35124111" ], "title": [ - "Unsupervised discovery of family specific vocal usage in the Mongolian gerbil." + "Event-related brain oscillations in attention-deficit/hyperactivity disorder (ADHD): A systematic review and meta-analysis." ], "year": [ - "2024" + "2022" ] }, "out": [], "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" + "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" } ], "dangling": [], "degree": 1, - "flags": [ - "warning" - ], - "violations": [ - { - "shape": "AuthorOrcidResolvesShape", - "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", - "value": "https://brain-bbqs.org/id/0e032f88-c50f-4527-9c40-68e9b782173d", - "severity": "warning" - } - ] + "flags": [], + "violations": [] }, { - "id": "https://brain-bbqs.org/id/b75b460e-560d-48d4-af7d-1152d34c1d79", + "id": "https://brain-bbqs.org/id/58b76015-dbdd-401e-92e7-4dc15e6183d9", "class": "Publication", - "label": "Unsupervised discovery of family specific vocal usage in the Mongolian gerbil.", + "label": "Evolution of thumbnails across Rodentia.", "facts": { "doi": [ - "10.1101/2023.03.11.532197" + "10.1126/science.ads7926" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/39282260/" + "https://pubmed.ncbi.nlm.nih.gov/40906837/" ], "journal": [ - "bioRxiv" + "Science" ], "name": [ - "Unsupervised discovery of family specific vocal usage in the Mongolian gerbil." + "Evolution of thumbnails across Rodentia." ], "pmid": [ - "39282260" + "40906837" ], "title": [ - "Unsupervised discovery of family specific vocal usage in the Mongolian gerbil." + "Evolution of thumbnails across Rodentia." ], "year": [ - "2024" + "2025" ] }, "out": [], "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" + "source": "https://brain-bbqs.org/id/2db5ee93-296a-446a-a3e6-59fd3d28c4a6" } ], "dangling": [], @@ -26565,37 +27183,37 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/a79d14cd-ae0e-4bce-b09f-8d16e6e15f7f", + "id": "https://brain-bbqs.org/id/7cccc8d1-98d9-4ca2-aaf8-cb9c9f836f06", "class": "Publication", - "label": "Vocal Call Locator Benchmark (VCL) for localizing rodent vocalizations from multi-channel audio.", + "label": "Eye-Tracking-BIDS: the Brain Imaging Data Structure extended to gaze position and pupil data.", "facts": { "doi": [ - "10.1101/2024.09.20.613758" + "10.64898/2026.02.03.703514" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/39345431/" + "https://pubmed.ncbi.nlm.nih.gov/41676644/" ], "journal": [ "bioRxiv" ], "name": [ - "Vocal Call Locator Benchmark (VCL) for localizing rodent vocalizations from multi-channel audio." + "Eye-Tracking-BIDS: the Brain Imaging Data Structure extended to gaze position and pupil data." ], "pmid": [ - "39345431" + "41676644" ], "title": [ - "Vocal Call Locator Benchmark (VCL) for localizing rodent vocalizations from multi-channel audio." + "Eye-Tracking-BIDS: the Brain Imaging Data Structure extended to gaze position and pupil data." ], "year": [ - "2024" + "2026" ] }, "out": [], "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" + "source": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540" } ], "dangling": [], @@ -26604,37 +27222,37 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/e9749351-6773-473d-8fd0-ec88e5a8ba07", + "id": "https://brain-bbqs.org/id/987e3cf1-5d05-4e16-8849-4b5899ac84dc", "class": "Publication", - "label": "Wearable organic-electrochemical-transistor-based lithium sensor for precision mental health.", + "label": "FMRI correlates of autobiographical memory: Comparing silent retrieval with narrated retrieval.", "facts": { "doi": [ - "10.1016/j.device.2025.100862" + "10.1016/j.neuropsychologia.2024.108842" ], "external_url": [ - "https://pubmed.ncbi.nlm.nih.gov/41393219/" + "https://pubmed.ncbi.nlm.nih.gov/38428520/" ], "journal": [ - "Device" + "Neuropsychologia" ], "name": [ - "Wearable organic-electrochemical-transistor-based lithium sensor for precision mental health." + "FMRI correlates of autobiographical memory: Comparing silent retrieval with narrated retrieval." ], "pmid": [ - "41393219" + "38428520" ], "title": [ - "Wearable organic-electrochemical-transistor-based lithium sensor for precision mental health." + "FMRI correlates of autobiographical memory: Comparing silent retrieval with narrated retrieval." ], "year": [ - "2025" + "2024" ] }, "out": [], "in": [ { "predicate": "produced", - "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" + "source": "https://brain-bbqs.org/id/3352859e-5677-46dd-89d6-17c898b6f097" } ], "dangling": [], @@ -26643,782 +27261,1010 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/766331fd-daea-4a31-86c4-589737e533ea", - "class": "ResearchOrganization", - "label": "BBQS Consortium", + "id": "https://brain-bbqs.org/id/c7423364-c703-42a4-bde0-cdad1bc6f896", + "class": "Publication", + "label": "Fully-Printed Sensor Based Extended Gate Field Effect Transistors for Wireless Monitoring of Potassium and Ammonium Ions.", "facts": { + "doi": [ + "10.1109/sensors60989.2024.10784525" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/41048822/" + ], + "journal": [ + "Proc IEEE Sens" + ], "name": [ - "BBQS Consortium" + "Fully-Printed Sensor Based Extended Gate Field Effect Transistors for Wireless Monitoring of Potassium and Ammonium Ions." + ], + "pmid": [ + "41048822" + ], + "title": [ + "Fully-Printed Sensor Based Extended Gate Field Effect Transistors for Wireless Monitoring of Potassium and Ammonium Ions." + ], + "year": [ + "2024" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "produced", + "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" + } ], + "dangling": [], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/1424d10f-795c-47e5-a6d7-d6705fad611a", - "class": "ResearchOrganization", - "label": "CALIFORNIA INSTITUTE OF TECHNOLOGY", + "id": "https://brain-bbqs.org/id/c8a72b45-43f3-42d0-8cd6-aedc7f1242c0", + "class": "Publication", + "label": "GMFOLD: Subgraph matching for high-throughput DNA-aptamer secondary structure classification and machine learning interpretability.", "facts": { + "doi": [ + "10.1016/j.mbs.2025.109485" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/40582587/" + ], + "journal": [ + "Math Biosci" + ], "name": [ - "CALIFORNIA INSTITUTE OF TECHNOLOGY" + "GMFOLD: Subgraph matching for high-throughput DNA-aptamer secondary structure classification and machine learning interpretability." + ], + "pmid": [ + "40582587" + ], + "title": [ + "GMFOLD: Subgraph matching for high-throughput DNA-aptamer secondary structure classification and machine learning interpretability." + ], + "year": [ + "2025" ] }, - "out": [ - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/156fb20f-5e40-4804-992d-dc353b5e99e4" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/3be49154-45d9-45b4-9872-3271a67a5225" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/b2b7ce80-8dbf-4cf8-804c-9daebe9a9fa5" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/e1fcac8e-1f50-4dc8-8f14-f0ee62614861" - } - ], + "out": [], "in": [ { - "predicate": "part_of_org", - "source": "https://brain-bbqs.org/id/cbc8640e-6d05-4872-bf01-6e3f7d89c349" + "predicate": "produced", + "source": "https://brain-bbqs.org/id/80db3a04-a9ad-486d-abf1-4b20f8370ff9" } ], "dangling": [], - "degree": 5, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/fb3cf5ef-e850-44d2-887c-0d0ef608f48c", - "class": "ResearchOrganization", - "label": "CARNEGIE-MELLON UNIVERSITY", + "id": "https://brain-bbqs.org/id/a346f802-eb1b-4438-a13c-9ee20e28db4c", + "class": "Publication", + "label": "Hand-Jaw Coordination as Mice Handle Food Is Organized around Intrinsic Structure-Function Relationships.", "facts": { + "doi": [ + "10.1523/JNEUROSCI.0856-24.2024" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/39251351/" + ], + "journal": [ + "J Neurosci" + ], "name": [ - "CARNEGIE-MELLON UNIVERSITY" + "Hand-Jaw Coordination as Mice Handle Food Is Organized around Intrinsic Structure-Function Relationships." + ], + "pmid": [ + "39251351" + ], + "title": [ + "Hand-Jaw Coordination as Mice Handle Food Is Organized around Intrinsic Structure-Function Relationships." + ], + "year": [ + "2024" ] }, - "out": [ - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/16d82048-d1f5-4b80-a6e0-2baf5c1bed4f" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/1f6fa922-b662-4325-aac7-cb622ac10ef3" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/75313083-49bd-45dd-a4a2-fd5fc0bf8949" - }, + "out": [], + "in": [ { - "predicate": "members", - "target": "https://brain-bbqs.org/id/ebbb8fee-72ed-4cb0-9d25-94e670379f08" + "predicate": "produced", + "source": "https://brain-bbqs.org/id/2db5ee93-296a-446a-a3e6-59fd3d28c4a6" } ], - "in": [], "dangling": [], - "degree": 4, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/9515d721-456a-45d1-885c-d97a482317f8", - "class": "ResearchOrganization", - "label": "CEDARS-SINAI MEDICAL CENTER", + "id": "https://brain-bbqs.org/id/4cbadc61-5660-48d8-9b16-7a8749f0defe", + "class": "Publication", + "label": "HDAC3 regulates the diurnal rhythms of claudin expression and intestinal permeability.", "facts": { - "name": [ - "CEDARS-SINAI MEDICAL CENTER" - ] + "doi": [ + "10.3389/freae.2024.1496999" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/40761288/" + ], + "journal": [ + "Front Epigenet Epigenom" + ], + "name": [ + "HDAC3 regulates the diurnal rhythms of claudin expression and intestinal permeability." + ], + "pmid": [ + "40761288" + ], + "title": [ + "HDAC3 regulates the diurnal rhythms of claudin expression and intestinal permeability." + ], + "year": [ + "2024" + ] }, - "out": [ + "out": [], + "in": [ { - "predicate": "members", - "target": "https://brain-bbqs.org/id/e1fcac8e-1f50-4dc8-8f14-f0ee62614861" + "predicate": "produced", + "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" } ], - "in": [], "dangling": [], "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/f28a2f16-5259-4e2f-9c8e-a5d11d2b5c5f", - "class": "ResearchOrganization", - "label": "CHILDREN'S HOSP OF PHILADELPHIA", + "id": "https://brain-bbqs.org/id/eb63ab45-d094-4b5f-99a8-3fe0cb8529eb", + "class": "Publication", + "label": "How cortico-basal ganglia-thalamic subnetworks can shift decision policies to maximize reward rate.", "facts": { + "author_orcids": [ + "https://orcid.org/0000-0002-1513-1551", + "https://orcid.org/0000-0002-2858-5325", + "https://orcid.org/0000-0003-4720-0336" + ], + "doi": [ + "10.1101/2024.05.21.595174" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/38826315/" + ], + "journal": [ + "bioRxiv" + ], "name": [ - "CHILDREN'S HOSP OF PHILADELPHIA" + "How cortico-basal ganglia-thalamic subnetworks can shift decision policies to maximize reward rate." + ], + "pmid": [ + "38826315" + ], + "title": [ + "How cortico-basal ganglia-thalamic subnetworks can shift decision policies to maximize reward rate." + ], + "year": [ + "2025" ] }, - "out": [ - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/1b3e8304-f2d6-4ed6-aa5c-7d49ca278344" - }, + "out": [], + "in": [ { - "predicate": "members", - "target": "https://brain-bbqs.org/id/32937527-a5e9-4a99-84c0-719435f25f8b" + "predicate": "produced", + "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" } ], - "in": [], "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/9f75488b-59d0-4d50-b7db-869f26066743", - "class": "ResearchOrganization", - "label": "COLUMBIA UNIVERSITY HEALTH SCIENCES", - "facts": { - "name": [ - "COLUMBIA UNIVERSITY HEALTH SCIENCES" - ] - }, - "out": [ - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/00618660-a724-4059-85c1-c6ca3ccc1744" - }, + "degree": 1, + "flags": [ + "warning" + ], + "violations": [ { - "predicate": "members", - "target": "https://brain-bbqs.org/id/3d7564b9-e839-4737-874a-2e3b5319e11a" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/eb63ab45-d094-4b5f-99a8-3fe0cb8529eb", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/5bb15430-32e5-457f-b6ce-e4f3790687fa" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/eb63ab45-d094-4b5f-99a8-3fe0cb8529eb", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/ee077b61-eb2c-4cd9-b587-a46418c45265" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/eb63ab45-d094-4b5f-99a8-3fe0cb8529eb", + "severity": "warning" } - ], - "in": [], - "dangling": [], - "degree": 4, - "flags": [], - "violations": [] + ] }, { - "id": "https://brain-bbqs.org/id/d17a5c60-e529-48ed-b4af-11976e4eb3fb", - "class": "ResearchOrganization", - "label": "DARTMOUTH COLLEGE", + "id": "https://brain-bbqs.org/id/03a34599-787d-42ac-83a3-e002bd419d37", + "class": "Publication", + "label": "How dopamine guides our social world.", "facts": { + "doi": [ + "10.1016/j.pharmr.2025.100085" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/40850269/" + ], + "journal": [ + "Pharmacol Rev" + ], "name": [ - "DARTMOUTH COLLEGE" + "How dopamine guides our social world." + ], + "pmid": [ + "40850269" + ], + "title": [ + "How dopamine guides our social world." + ], + "year": [ + "2025" ] }, - "out": [ - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/25f1bccb-0c04-4e0e-8951-ac2620fb969c" - }, + "out": [], + "in": [ { - "predicate": "members", - "target": "https://brain-bbqs.org/id/c9fb9f5b-29a9-4138-9434-894ab7b7a909" + "predicate": "produced", + "source": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/93fa0810-51f4-4e71-badf-e5e8d3e40dc3", - "class": "ResearchOrganization", - "label": "DUKE UNIVERSITY", + "id": "https://brain-bbqs.org/id/bcf4ee35-21a5-473e-a2f2-75fa77147072", + "class": "Publication", + "label": "How the dynamic interplay of cortico-basal ganglia-thalamic pathways shapes the time course of deliberation and commitment.", "facts": { + "author_orcids": [ + "https://orcid.org/0000-0002-1513-1551", + "https://orcid.org/0000-0002-4243-2405", + "https://orcid.org/0000-0003-4720-0336" + ], + "doi": [ + "10.1101/2025.03.17.643668" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/40166196/" + ], + "journal": [ + "bioRxiv" + ], "name": [ - "DUKE UNIVERSITY" + "How the dynamic interplay of cortico-basal ganglia-thalamic pathways shapes the time course of deliberation and commitment." + ], + "pmid": [ + "40166196" + ], + "title": [ + "How the dynamic interplay of cortico-basal ganglia-thalamic pathways shapes the time course of deliberation and commitment." + ], + "year": [ + "2025" ] }, - "out": [ - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/1962a240-a592-484c-b812-122a5dad2951" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/1a33a814-fbd1-4acf-bc5d-f0077bc180d1" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/24981995-2cd1-407a-9d2c-0f89f026edeb" - }, + "out": [], + "in": [ { - "predicate": "members", - "target": "https://brain-bbqs.org/id/68fe4ee2-5beb-4a6e-ac58-2d31ad350cfd" - }, + "predicate": "produced", + "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" + } + ], + "dangling": [], + "degree": 1, + "flags": [ + "warning" + ], + "violations": [ { - "predicate": "members", - "target": "https://brain-bbqs.org/id/b7b55255-04e1-45e6-934e-af38990ff414" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/bcf4ee35-21a5-473e-a2f2-75fa77147072", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/c3604b73-537c-411b-b963-cd8df608f086" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/bcf4ee35-21a5-473e-a2f2-75fa77147072", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/fd89f05c-a37e-4d93-80fc-47dfc8aa3931" - } - ], - "in": [ - { - "predicate": "part_of_org", - "source": "https://brain-bbqs.org/id/8facb614-80ac-4873-8619-b37c2ad0ed62" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/bcf4ee35-21a5-473e-a2f2-75fa77147072", + "severity": "warning" } - ], - "dangling": [], - "degree": 8, - "flags": [], - "violations": [] + ] }, { - "id": "https://brain-bbqs.org/id/98f1fdd4-77a8-4bd5-8703-ed6fb8c4af0e", - "class": "ResearchOrganization", - "label": "Empire AI Consortium", - "facts": { - "name": [ - "Empire AI Consortium" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/292698fe-d705-45ac-a255-3c699228f21a", - "class": "ResearchOrganization", - "label": "Eunice Kennedy Shriver National Institute of Child Health and Human Development", + "id": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "class": "Publication", + "label": "Interfacing with the Brain: How Nanotechnology Can Contribute.", "facts": { + "author_orcids": [ + "https://orcid.org/0000-0001-5527-6248", + "https://orcid.org/0000-0001-5621-1067", + "https://orcid.org/0000-0001-5739-8820", + "https://orcid.org/0000-0001-5959-6257", + "https://orcid.org/0000-0001-6518-6422", + "https://orcid.org/0000-0001-7323-9504", + "https://orcid.org/0000-0001-8248-5248", + "https://orcid.org/0000-0001-8420-0787", + "https://orcid.org/0000-0001-8556-5710", + "https://orcid.org/0000-0001-8948-5929", + "https://orcid.org/0000-0001-9245-3936", + "https://orcid.org/0000-0002-0405-2727", + "https://orcid.org/0000-0002-0645-5386", + "https://orcid.org/0000-0002-0944-1115", + "https://orcid.org/0000-0002-1641-7068", + "https://orcid.org/0000-0002-1961-4833", + "https://orcid.org/0000-0002-2126-9100", + "https://orcid.org/0000-0002-2224-6672", + "https://orcid.org/0000-0002-2312-7528", + "https://orcid.org/0000-0002-2972-2803", + "https://orcid.org/0000-0002-3312-1664", + "https://orcid.org/0000-0002-4499-6116", + "https://orcid.org/0000-0002-4722-1893", + "https://orcid.org/0000-0002-5636-4976", + "https://orcid.org/0000-0002-5643-0734", + "https://orcid.org/0000-0002-5666-6042", + "https://orcid.org/0000-0002-6079-109X", + "https://orcid.org/0000-0002-6526-4141", + "https://orcid.org/0000-0002-7323-2449", + "https://orcid.org/0000-0002-8329-4459", + "https://orcid.org/0000-0002-8869-8612", + "https://orcid.org/0000-0002-9236-157X", + "https://orcid.org/0000-0002-9845-9885", + "https://orcid.org/0000-0003-0292-0970", + "https://orcid.org/0000-0003-0368-7031", + "https://orcid.org/0000-0003-0517-1880", + "https://orcid.org/0000-0003-1614-2698", + "https://orcid.org/0000-0003-1672-6650", + "https://orcid.org/0000-0003-1938-553X", + "https://orcid.org/0000-0003-2401-3562", + "https://orcid.org/0000-0003-4195-9384", + "https://orcid.org/0000-0003-4440-3680", + "https://orcid.org/0000-0003-4770-5756", + "https://orcid.org/0000-0003-4872-3403", + "https://orcid.org/0009-0004-5439-6730", + "https://orcid.org/0009-0006-4347-1429", + "https://orcid.org/0009-0007-1504-921X", + "https://orcid.org/0009-0008-3948-2293" + ], + "doi": [ + "10.1021/acsnano.4c10525" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/40063703/" + ], + "journal": [ + "ACS Nano" + ], "name": [ - "Eunice Kennedy Shriver National Institute of Child Health and Human Development" + "Interfacing with the Brain: How Nanotechnology Can Contribute." + ], + "pmid": [ + "40063703" + ], + "title": [ + "Interfacing with the Brain: How Nanotechnology Can Contribute." + ], + "year": [ + "2025" ] }, "out": [], - "in": [], + "in": [ + { + "predicate": "produced", + "source": "https://brain-bbqs.org/id/80db3a04-a9ad-486d-abf1-4b20f8370ff9" + } + ], "dangling": [], - "degree": 0, + "degree": 1, "flags": [ - "isolated" + "warning" ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/92f22292-007f-4091-83e9-10df11f14110", - "class": "ResearchOrganization", - "label": "GEORGIA INSTITUTE OF TECHNOLOGY", - "facts": { - "name": [ - "GEORGIA INSTITUTE OF TECHNOLOGY" - ] - }, - "out": [ + "violations": [ { - "predicate": "members", - "target": "https://brain-bbqs.org/id/4f18ae48-4099-486d-8e89-1a8a736e59e4" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/709c64f2-d02c-48f9-b286-b9222a106f27" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/732f511e-4b61-412b-b54d-9c8dbd93c273" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/a5644db3-8ade-4026-9139-c1945c0869d6" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/bf6867b2-09d3-4cc3-89ba-b931b646cd42" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/f33c9c03-f685-4166-b0bf-9ce704b5fa78" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/feeae3ca-856c-462b-8b35-0fe35e294242" - } - ], - "in": [], - "dangling": [], - "degree": 7, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/99bc7f7b-2a3d-4e34-99f1-ec08e12133b2", - "class": "ResearchOrganization", - "label": "HARVARD UNIVERSITY", - "facts": { - "name": [ - "HARVARD UNIVERSITY" - ] - }, - "out": [ + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" + }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/c3604b73-537c-411b-b963-cd8df608f086" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/db663fc5-af00-457b-beb7-f9ee831eef71" - } - ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/dbdb11c4-5082-4c5f-b50b-0046aaa0f8d9", - "class": "ResearchOrganization", - "label": "ICAHN SCHOOL OF MEDICINE AT MOUNT SINAI", - "facts": { - "name": [ - "ICAHN SCHOOL OF MEDICINE AT MOUNT SINAI" - ] - }, - "out": [ + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" + }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/1e23d697-bec8-48a1-ae97-96434e7343c2" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/3d87d6b0-c802-4610-813b-86b94e3e76d6" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/4cd9c282-4677-471a-81c0-aa97d94a687e" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/af52d4d6-a0e2-4a87-b747-6ede8ebf212f" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/c3989bae-203d-43b6-8f09-90935634f1d2" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/cf033709-106e-4288-a326-f7bb353ba0a4" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/f34a38e7-364a-4091-8436-a8c52b684cc2" - } - ], - "in": [], - "dangling": [], - "degree": 7, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/117670d4-58c8-49ed-acb8-311c357126ce", - "class": "ResearchOrganization", - "label": "INTERNATIONAL BRAIN LABORATORY", - "facts": { - "name": [ - "INTERNATIONAL BRAIN LABORATORY" - ] - }, - "out": [], - "in": [ + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" + }, { - "predicate": "part_of_org", - "source": "https://brain-bbqs.org/id/ca41ad35-92a2-4391-95c3-0db49351b9a5" - } - ], - "dangling": [], - "degree": 1, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/315a0694-ce8d-4010-abca-5438e5f6b560", - "class": "ResearchOrganization", - "label": "JOHNS HOPKINS UNIVERSITY", - "facts": { - "name": [ - "JOHNS HOPKINS UNIVERSITY" - ] - }, - "out": [ + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" + }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/d2f77d44-3a20-4759-be29-69403ae039ef" - } - ], - "in": [], - "dangling": [], - "degree": 1, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/7924e7d9-5b53-4525-95ef-3f5a6b9112a5", - "class": "ResearchOrganization", - "label": "MASSACHUSETTS INSTITUTE OF TECHNOLOGY", - "facts": { - "name": [ - "MASSACHUSETTS INSTITUTE OF TECHNOLOGY" - ] - }, - "out": [ + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" + }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/0f3bb33c-e7ee-4013-af5d-894d1adfa0ee" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/20d3bb9f-8cbe-45b8-974e-1c84e0d9631f" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/4d8bb1b1-0cd6-4ca6-a5f7-7b0bc3ba537d" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/5f8ac3c4-a0fb-44d6-ae2d-b505816d4141" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/95406597-a11e-4809-834d-8a6926c32164" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/a7318228-623e-4f94-a7e6-5e3fed968e1a" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/b359432d-39e2-4ab8-bb3b-16afe458820c" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/e03557cc-99aa-4b15-8786-bde9a5253fd1" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/e5bdf58e-a1ff-4f5f-aa6d-667de414e16e" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/fe4790d5-bf32-469d-b098-cb4f44f6fa19" - } - ], - "in": [], - "dangling": [], - "degree": 10, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/c28b3fe8-8dbf-4037-ab56-fda6d170cfc4", - "class": "ResearchOrganization", - "label": "MCGILL UNIVERSITY", - "facts": { - "name": [ - "MCGILL UNIVERSITY" - ] - }, - "out": [], - "in": [ + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" + }, { - "predicate": "part_of_org", - "source": "https://brain-bbqs.org/id/8515cd09-418b-43c0-89b2-9076744b17e6" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" }, { - "predicate": "part_of_org", - "source": "https://brain-bbqs.org/id/c4b8f5ff-4ac3-4c1b-a978-bd7d1c2dbb86" - } - ], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/7de07dc9-72c0-4900-be0d-c375d927a6b4", - "class": "ResearchOrganization", - "label": "MICHIGAN STATE UNIVERSITY", - "facts": { - "name": [ - "MICHIGAN STATE UNIVERSITY" - ] - }, - "out": [ + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" + }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/1d3b5b5b-7a52-4380-82f4-931b67831917" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/afe5dc6f-8e97-48c9-bb79-5af130f1e62a" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/d0f582a1-20fd-43ca-a9f1-21bf0ee548c1" - } - ], - "in": [], - "dangling": [], - "degree": 3, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/c93dcda4-c504-4ca5-a8a5-a62aecf9e841", - "class": "ResearchOrganization", - "label": "National Center for Complementary and Integrative Health", - "facts": { - "name": [ - "National Center for Complementary and Integrative Health" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/c39b3d7a-4ea4-4711-837c-45cef389b959", - "class": "ResearchOrganization", - "label": "National Eye Institute", - "facts": { - "name": [ - "National Eye Institute" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/f1f7e238-efa6-42a5-b5f2-530e56d6cd35", - "class": "ResearchOrganization", - "label": "National Institute of Biomedical Imaging and Bioengineering", - "facts": { - "name": [ - "National Institute of Biomedical Imaging and Bioengineering" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/28609b98-6f97-4a46-b875-9f5084f1c7cd", - "class": "ResearchOrganization", - "label": "National Institute of Mental Health", - "facts": { - "name": [ - "National Institute of Mental Health" - ] - }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "severity": "warning" + } + ] }, { - "id": "https://brain-bbqs.org/id/69aa906c-2a0c-4524-8958-4e1009f96060", - "class": "ResearchOrganization", - "label": "National Institute of Neurological Disorders and Stroke", + "id": "https://brain-bbqs.org/id/d59fccae-d62c-44f8-9b6d-bf9ab2721553", + "class": "Publication", + "label": "Introducing the STReaC (Spike Train Response Classification) toolbox.", "facts": { + "author_orcids": [ + "https://orcid.org/0000-0002-1407-4356", + "https://orcid.org/0000-0002-1513-1551", + "https://orcid.org/0000-0002-3591-5775", + "https://orcid.org/0000-0002-8754-6828" + ], + "doi": [ + "10.1016/j.jneumeth.2023.110000" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/38486714/" + ], + "journal": [ + "J Neurosci Methods" + ], "name": [ - "National Institute of Neurological Disorders and Stroke" + "Introducing the STReaC (Spike Train Response Classification) toolbox." + ], + "pmid": [ + "38486714" + ], + "title": [ + "Introducing the STReaC (Spike Train Response Classification) toolbox." + ], + "year": [ + "2024" ] }, "out": [], - "in": [], + "in": [ + { + "predicate": "produced", + "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" + } + ], "dangling": [], - "degree": 0, + "degree": 1, "flags": [ - "isolated" + "warning" ], - "violations": [] + "violations": [ + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/d59fccae-d62c-44f8-9b6d-bf9ab2721553", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/d59fccae-d62c-44f8-9b6d-bf9ab2721553", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/d59fccae-d62c-44f8-9b6d-bf9ab2721553", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/d59fccae-d62c-44f8-9b6d-bf9ab2721553", + "severity": "warning" + } + ] }, { - "id": "https://brain-bbqs.org/id/6db7f54b-3093-42cc-8011-007e7c9012f2", - "class": "ResearchOrganization", - "label": "National Institute on Aging", + "id": "https://brain-bbqs.org/id/0efd86da-44c1-4222-9b30-72000b833267", + "class": "Publication", + "label": "Investigating the Dynamic Relationship Between Anxiety and Spatial Memory Using Autonomous Ecological Momentary Assessment.", "facts": { + "doi": [ + "10.21203/rs.3.rs-9728773/v1" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/42282021/" + ], + "journal": [ + "Res Sq" + ], "name": [ - "National Institute on Aging" + "Investigating the Dynamic Relationship Between Anxiety and Spatial Memory Using Autonomous Ecological Momentary Assessment." + ], + "pmid": [ + "42282021" + ], + "title": [ + "Investigating the Dynamic Relationship Between Anxiety and Spatial Memory Using Autonomous Ecological Momentary Assessment." + ], + "year": [ + "2026" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "produced", + "source": "https://brain-bbqs.org/id/22e61529-38ba-465f-b38b-274e24160fb6" + } ], + "dangling": [], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/ec41db91-9533-4a3c-8956-8ae3d9030c8c", - "class": "ResearchOrganization", - "label": "National Institute on Alcohol Abuse and Alcoholism", + "id": "https://brain-bbqs.org/id/f97c2277-9e93-4712-ac91-7f5e04482ba8", + "class": "Publication", + "label": "Learning Mixtures of Linear Dynamical Systems via Hybrid Tensor-EM Method.", "facts": { + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/41810029/" + ], + "journal": [ + "ArXiv" + ], "name": [ - "National Institute on Alcohol Abuse and Alcoholism" + "Learning Mixtures of Linear Dynamical Systems via Hybrid Tensor-EM Method." + ], + "pmid": [ + "41810029" + ], + "title": [ + "Learning Mixtures of Linear Dynamical Systems via Hybrid Tensor-EM Method." + ], + "year": [ + "2026" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "produced", + "source": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e" + } ], + "dangling": [], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/a6ed8610-4f99-43cb-b0fa-ed983bfa2f20", - "class": "ResearchOrganization", - "label": "National Institute on Deafness and Other Communication Disorders", + "id": "https://brain-bbqs.org/id/5935dae3-756d-4c4c-8742-f067e81a8012", + "class": "Publication", + "label": "LibreFace 2.0: A Generalizable Facial Expression Analysis Toolkit Leveraging Synthetic Data.", "facts": { - "name": [ - "National Institute on Deafness and Other Communication Disorders" - ] - }, + "doi": [ + "10.1109/fg67764.2026.11556988" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/42763731/" + ], + "journal": [ + "Proc Int Conf Autom Face Gesture Recognit" + ], + "name": [ + "LibreFace 2.0: A Generalizable Facial Expression Analysis Toolkit Leveraging Synthetic Data." + ], + "pmid": [ + "42763731" + ], + "title": [ + "LibreFace 2.0: A Generalizable Facial Expression Analysis Toolkit Leveraging Synthetic Data." + ], + "year": [ + "2026" + ] + }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "produced", + "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" + } ], + "dangling": [], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/32f761ce-6857-451c-9eb7-fc5b8b221449", - "class": "ResearchOrganization", - "label": "National Institute on Drug Abuse", + "id": "https://brain-bbqs.org/id/fd825a1b-0bb9-4d2d-83e0-d901810e15b5", + "class": "Publication", + "label": "Listening to a Consonant Chord Progression during Live Face-to-Face Gaze Enhances Neural Activity in Social Systems.", "facts": { + "doi": [ + "10.1523/JNEUROSCI.1116-25.2026" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/41786608/" + ], + "journal": [ + "J Neurosci" + ], "name": [ - "National Institute on Drug Abuse" + "Listening to a Consonant Chord Progression during Live Face-to-Face Gaze Enhances Neural Activity in Social Systems." + ], + "pmid": [ + "41786608" + ], + "title": [ + "Listening to a Consonant Chord Progression during Live Face-to-Face Gaze Enhances Neural Activity in Social Systems." + ], + "year": [ + "2026" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "produced", + "source": "https://brain-bbqs.org/id/38289d36-f3a6-43e1-955b-db1d3d400cb2" + } ], + "dangling": [], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/208980e9-92b9-447e-a2ca-e83bf61db159", - "class": "ResearchOrganization", - "label": "National Institutes of Health", + "id": "https://brain-bbqs.org/id/fa14bcd8-d960-44b1-874c-49e040b64e61", + "class": "Publication", + "label": "Mapping the landscape of social behavior.", "facts": { + "doi": [ + "10.1016/j.cell.2025.01.044" + ], "external_url": [ - "https://www.nih.gov", - "https://www.nih.gov" + "https://pubmed.ncbi.nlm.nih.gov/40043703/" + ], + "journal": [ + "Cell" ], "name": [ - "National Institutes of Health" + "Mapping the landscape of social behavior." + ], + "pmid": [ + "40043703" + ], + "title": [ + "Mapping the landscape of social behavior." + ], + "year": [ + "2025" ] }, - "out": [ - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/71d734ad-e355-473d-aaf7-577be85186d5" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/83a4df24-ed1c-462a-bf74-36c68150c42c" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/8f429fce-6c38-4707-bd9c-30fd796e9137" - } - ], + "out": [], "in": [ { - "predicate": "part_of_org", - "source": "https://brain-bbqs.org/id/7766280c-d6f3-4c55-8e7e-f9207dbc1d1f" - }, - { - "predicate": "part_of_org", - "source": "https://brain-bbqs.org/id/7395b261-f13c-4d69-b455-6b58f52b0d5a" - }, - { - "predicate": "part_of_org", - "source": "https://brain-bbqs.org/id/30ae82dc-0473-443d-96ae-8bbf8b0206cb" - }, - { - "predicate": "part_of_org", - "source": "https://brain-bbqs.org/id/0cdfab9b-92fe-45c6-afbe-9f22d7eda7dd" + "predicate": "produced", + "source": "https://brain-bbqs.org/id/4f2619b1-a6a4-48e5-b21a-0f5455354ea9" }, { - "predicate": "part_of_org", - "source": "https://brain-bbqs.org/id/1cf7c61c-a403-4eb5-8a84-07a1e2da8fb4" + "predicate": "produced", + "source": "https://brain-bbqs.org/id/1e1fc06b-fe5c-4ec2-9f64-474f98ae31e8" } ], "dangling": [], - "degree": 8, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/62826284-8258-4f21-af3e-64fc755ef2b2", - "class": "ResearchOrganization", - "label": "National Science Foundation", + "id": "https://brain-bbqs.org/id/419155ad-faba-4e10-8029-5339960877a1", + "class": "Publication", + "label": "Measurement Equivalence of On-Scalp OPM-MEG and Cryogenic MEG for Auditory and Somatosensory Cortical Mapping Across Development.", "facts": { + "doi": [ + "10.64898/2026.06.01.728862" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/42282642/" + ], + "journal": [ + "bioRxiv" + ], "name": [ - "National Science Foundation" + "Measurement Equivalence of On-Scalp OPM-MEG and Cryogenic MEG for Auditory and Somatosensory Cortical Mapping Across Development." + ], + "pmid": [ + "42282642" + ], + "title": [ + "Measurement Equivalence of On-Scalp OPM-MEG and Cryogenic MEG for Auditory and Somatosensory Cortical Mapping Across Development." + ], + "year": [ + "2026" ] }, "out": [], "in": [ { - "predicate": "part_of_org", - "source": "https://brain-bbqs.org/id/0f875168-9793-465b-9ab1-bf8f18492778" + "predicate": "produced", + "source": "https://brain-bbqs.org/id/4614269a-0d7f-4390-b4cc-568a09fa6a45" } ], "dangling": [], @@ -27427,325 +28273,464 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/5b794afd-cf08-4107-81c8-522a29714830", - "class": "ResearchOrganization", - "label": "NEW YORK UNIVERSITY", + "id": "https://brain-bbqs.org/id/162437eb-ce44-46a5-b994-5741d334c6fb", + "class": "Publication", + "label": "Methylphenidate, Guanfacine, and Combined Treatment Effects on Electroencephalography Correlates of Spatial Working Memory in Attention-Deficit/Hyperactivity Disorder.", "facts": { + "doi": [ + "10.1016/j.jaac.2022.06.017" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/35963558/" + ], + "journal": [ + "J Am Acad Child Adolesc Psychiatry" + ], "name": [ - "NEW YORK UNIVERSITY" + "Methylphenidate, Guanfacine, and Combined Treatment Effects on Electroencephalography Correlates of Spatial Working Memory in Attention-Deficit/Hyperactivity Disorder." + ], + "pmid": [ + "35963558" + ], + "title": [ + "Methylphenidate, Guanfacine, and Combined Treatment Effects on Electroencephalography Correlates of Spatial Working Memory in Attention-Deficit/Hyperactivity Disorder." + ], + "year": [ + "2023" ] }, - "out": [ - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/3161638e-fa1b-4af1-a998-a34139b2a0b1" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/93a3260d-e267-451b-9960-06cc9ae3a40c" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/af80d437-679c-42d0-aeed-fc7129b8a7b7" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/be8d825d-140a-4d72-a39a-2534cf2b4145" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/f2372c9c-91ac-449f-8ae8-182327e93a85" - } - ], + "out": [], "in": [ { - "predicate": "part_of_org", - "source": "https://brain-bbqs.org/id/12234308-3c6b-4d75-a135-f8fb127d4389" + "predicate": "produced", + "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" } ], "dangling": [], - "degree": 6, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/6efc2552-7cd7-4e53-bd2d-41fee6824cf7", - "class": "ResearchOrganization", - "label": "NEW YORK UNIVERSITY SCHOOL OF MEDICINE", + "id": "https://brain-bbqs.org/id/205009f7-ea15-4e13-9b73-292de432b467", + "class": "Publication", + "label": "Mimicking opioid analgesia in cortical pain circuits.", "facts": { + "author_orcids": [ + "https://orcid.org/0000-0001-7248-2932" + ], + "doi": [ + "10.1101/2024.04.26.591113" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/38746090/" + ], + "journal": [ + "bioRxiv" + ], "name": [ - "NEW YORK UNIVERSITY SCHOOL OF MEDICINE" + "Mimicking opioid analgesia in cortical pain circuits." + ], + "pmid": [ + "38746090" + ], + "title": [ + "Mimicking opioid analgesia in cortical pain circuits." + ], + "year": [ + "2025" ] }, - "out": [ + "out": [], + "in": [ { - "predicate": "members", - "target": "https://brain-bbqs.org/id/03f8e307-5f04-4d22-9aef-c1bb9d3e6905" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/1a8f0486-7381-4156-824c-b2e9ff0dc817" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/2634f607-be46-4d8d-baae-6ec0d66a5436" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/47485e5b-3455-44a3-a716-70069176b11f" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/6fe1f186-133e-4490-b50b-4e5d7d4c6347" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/7a2ad901-f50d-40bc-a404-b4ef0c33944b" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/831a48e1-025d-499a-bf11-83d05285ed4b" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/c140b518-3ea9-4cad-a8b2-c7b30385589b" + "predicate": "produced", + "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" } ], - "in": [], - "dangling": [], - "degree": 8, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/d5a4e8e7-26ef-474d-bb33-055d3b151a83", - "class": "ResearchOrganization", - "label": "NIH Office of Behavioral and Social Sciences Research", - "facts": { - "name": [ - "NIH Office of Behavioral and Social Sciences Research" - ] - }, - "out": [], - "in": [], "dangling": [], - "degree": 0, + "degree": 1, "flags": [ - "isolated" + "warning" ], - "violations": [] + "violations": [ + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/205009f7-ea15-4e13-9b73-292de432b467", + "severity": "warning" + } + ] }, { - "id": "https://brain-bbqs.org/id/9860f60e-6ccf-44b5-b941-45c88e0ffed7", - "class": "ResearchOrganization", - "label": "NIH Office of Research on Women's Health", + "id": "https://brain-bbqs.org/id/4318c6a2-b27a-4d99-b209-f55c57a824eb", + "class": "Publication", + "label": "Neurocognitive subprocesses of working memory performance.", "facts": { + "doi": [ + "10.3758/s13415-021-00924-7" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/34155599/" + ], + "journal": [ + "Cogn Affect Behav Neurosci" + ], "name": [ - "NIH Office of Research on Women's Health" + "Neurocognitive subprocesses of working memory performance." + ], + "pmid": [ + "34155599" + ], + "title": [ + "Neurocognitive subprocesses of working memory performance." + ], + "year": [ + "2021" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "produced", + "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" + } ], + "dangling": [], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/2548a017-fd14-4934-9762-b30d7071821a", - "class": "ResearchOrganization", - "label": "NIH Office of the Director (Common Fund)", + "id": "https://brain-bbqs.org/id/d3fb7a56-6a64-43c8-9fd6-7087d906d413", + "class": "Publication", + "label": "Potential mechanisms and functional significance of aperiodic neural activity.", "facts": { + "doi": [ + "10.1038/s41562-026-02503-7" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/42332113/" + ], + "journal": [ + "Nat Hum Behav" + ], "name": [ - "NIH Office of the Director (Common Fund)" + "Potential mechanisms and functional significance of aperiodic neural activity." + ], + "pmid": [ + "42332113" + ], + "title": [ + "Potential mechanisms and functional significance of aperiodic neural activity." + ], + "year": [ + "2026" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "produced", + "source": "https://brain-bbqs.org/id/3352859e-5677-46dd-89d6-17c898b6f097" + } ], + "dangling": [], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/ef820011-b44d-40f5-a4ab-2069fa9805df", - "class": "ResearchOrganization", - "label": "NORTHWESTERN UNIVERSITY AT CHICAGO", + "id": "https://brain-bbqs.org/id/7d69f10e-ffa5-4d44-b92b-ffb24e71b969", + "class": "Publication", + "label": "Prefrontal and Subcortical c-Fos Mapping of Reward Responses across Competitive and Social Contexts.", "facts": { + "author_orcids": [ + "https://orcid.org/0000-0001-9293-2697", + "https://orcid.org/0009-0000-8962-6904", + "https://orcid.org/0009-0001-4532-5074", + "https://orcid.org/0009-0004-9299-992X", + "https://orcid.org/0009-0005-4097-1666" + ], + "doi": [ + "10.1523/ENEURO.0158-25.2025" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/41093749/" + ], + "journal": [ + "eNeuro" + ], "name": [ - "NORTHWESTERN UNIVERSITY AT CHICAGO" + "Prefrontal and Subcortical c-Fos Mapping of Reward Responses across Competitive and Social Contexts." + ], + "pmid": [ + "41093749" + ], + "title": [ + "Prefrontal and Subcortical c-Fos Mapping of Reward Responses across Competitive and Social Contexts." + ], + "year": [ + "2025" ] }, - "out": [ + "out": [], + "in": [ { - "predicate": "members", - "target": "https://brain-bbqs.org/id/c11ff83b-6ac9-4ebe-992b-f37c931e182b" + "predicate": "produced", + "source": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e" } ], - "in": [], "dangling": [], "degree": 1, - "flags": [], - "violations": [] + "flags": [ + "warning" + ], + "violations": [ + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/7d69f10e-ffa5-4d44-b92b-ffb24e71b969", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/7d69f10e-ffa5-4d44-b92b-ffb24e71b969", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/7d69f10e-ffa5-4d44-b92b-ffb24e71b969", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/7d69f10e-ffa5-4d44-b92b-ffb24e71b969", + "severity": "warning" + } + ] }, { - "id": "https://brain-bbqs.org/id/1ec93ddb-bb26-4062-9a18-1214bc458102", - "class": "ResearchOrganization", - "label": "PENNSYLVANIA STATE UNIVERSITY", + "id": "https://brain-bbqs.org/id/c3f26370-becc-4d39-af05-abeb0433bee9", + "class": "Publication", + "label": "Printed Wearable Sweat Rate Sensor for Continuous in-situ Perspiration Measurement.", "facts": { + "doi": [ + "10.1002/aisy.202400927" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/41122417/" + ], + "journal": [ + "Adv Intell Syst" + ], "name": [ - "PENNSYLVANIA STATE UNIVERSITY" + "Printed Wearable Sweat Rate Sensor for Continuous in-situ Perspiration Measurement." + ], + "pmid": [ + "41122417" + ], + "title": [ + "Printed Wearable Sweat Rate Sensor for Continuous in-situ Perspiration Measurement." + ], + "year": [ + "2025" ] }, - "out": [ - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/6340c8ee-1d5b-45f0-87ff-c320a38df17d" - }, + "out": [], + "in": [ { - "predicate": "members", - "target": "https://brain-bbqs.org/id/b359432d-39e2-4ab8-bb3b-16afe458820c" + "predicate": "produced", + "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" } ], - "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/6a224a59-b37c-40b2-a4ef-f43393d94357", - "class": "ResearchOrganization", - "label": "RICE UNIVERSITY", + "id": "https://brain-bbqs.org/id/20a8f7ad-ea28-4624-9cae-4c73d8e74549", + "class": "Publication", + "label": "Prioritized learning of cross-population neural dynamics.", "facts": { + "author_orcids": [ + "https://orcid.org/0000-0002-0544-7720", + "https://orcid.org/0000-0003-3032-5669", + "https://orcid.org/0000-0003-4116-0038", + "https://orcid.org/0009-0002-7532-8142" + ], + "doi": [ + "10.1088/1741-2552/ade569" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/40527329/" + ], + "journal": [ + "J Neural Eng" + ], "name": [ - "RICE UNIVERSITY" + "Prioritized learning of cross-population neural dynamics." + ], + "pmid": [ + "40527329" + ], + "title": [ + "Prioritized learning of cross-population neural dynamics." + ], + "year": [ + "2025" ] }, - "out": [ - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/09865181-38c6-44d9-aba4-68e373f0286d" - }, + "out": [], + "in": [ { - "predicate": "members", - "target": "https://brain-bbqs.org/id/2fb1cdc9-28b2-4709-adf4-c914a44e042d" + "predicate": "produced", + "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" } ], - "in": [], "dangling": [], - "degree": 2, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/db72ef76-b8e2-4d0e-85da-c8d475d70628", - "class": "ResearchOrganization", - "label": "SEATTLE CHILDREN'S HOSPITAL", - "facts": { - "name": [ - "SEATTLE CHILDREN'S HOSPITAL" - ] - }, - "out": [ + "degree": 1, + "flags": [ + "warning" + ], + "violations": [ { - "predicate": "members", - "target": "https://brain-bbqs.org/id/32937527-a5e9-4a99-84c0-719435f25f8b" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/20a8f7ad-ea28-4624-9cae-4c73d8e74549", + "severity": "warning" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/f0d2d9d0-b5e5-4f52-a40d-0d5a06229b14" + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/20a8f7ad-ea28-4624-9cae-4c73d8e74549", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/20a8f7ad-ea28-4624-9cae-4c73d8e74549", + "severity": "warning" + }, + { + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/20a8f7ad-ea28-4624-9cae-4c73d8e74549", + "severity": "warning" } - ], - "in": [], - "dangling": [], - "degree": 2, - "flags": [], - "violations": [] + ] }, { - "id": "https://brain-bbqs.org/id/1a88610e-c3bc-41b8-a97e-36698d0b0c28", - "class": "ResearchOrganization", - "label": "Simons Foundation", + "id": "https://brain-bbqs.org/id/7e6d2d83-a6f6-449d-96cf-c8b0a014e86f", + "class": "Publication", + "label": "Pupillary dilations in a Target/Distractor visual task paradigm and attention deficit hyperactivity disorder (ADHD).", "facts": { + "doi": [ + "10.1016/j.neulet.2023.137556" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/37951300/" + ], + "journal": [ + "Neurosci Lett" + ], "name": [ - "Simons Foundation" + "Pupillary dilations in a Target/Distractor visual task paradigm and attention deficit hyperactivity disorder (ADHD)." + ], + "pmid": [ + "37951300" + ], + "title": [ + "Pupillary dilations in a Target/Distractor visual task paradigm and attention deficit hyperactivity disorder (ADHD)." + ], + "year": [ + "2024" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "produced", + "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" + } ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/00b6e913-54e0-4cb5-bfdb-7c4123de51d6", - "class": "ResearchOrganization", - "label": "Society for Neuroscience", - "facts": { - "name": [ - "Society for Neuroscience" - ] - }, - "out": [], - "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/c04b3bcd-d1db-4b3c-9dc6-a4c97039cad6", - "class": "ResearchOrganization", - "label": "STATE UNIVERSITY NEW YORK STONY BROOK", + "id": "https://brain-bbqs.org/id/51afd359-3797-4082-8f34-f356eaa33848", + "class": "Publication", + "label": "Resilient nanostructured bioanalytic microneedle longitudinally monitors preclinical renal and hepatic drug clearance and dysfunction.", "facts": { + "doi": [ + "10.1126/scitranslmed.adr5493" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/41920968/" + ], + "journal": [ + "Sci Transl Med" + ], "name": [ - "STATE UNIVERSITY NEW YORK STONY BROOK" + "Resilient nanostructured bioanalytic microneedle longitudinally monitors preclinical renal and hepatic drug clearance and dysfunction." + ], + "pmid": [ + "41920968" + ], + "title": [ + "Resilient nanostructured bioanalytic microneedle longitudinally monitors preclinical renal and hepatic drug clearance and dysfunction." + ], + "year": [ + "2026" ] }, - "out": [ - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/223a91b2-1ffb-49e6-9cd7-d97f6f2beece" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/bcdcd220-fa82-47d4-9c1b-7a8da03dadd8" - }, + "out": [], + "in": [ { - "predicate": "members", - "target": "https://brain-bbqs.org/id/c6056429-1e03-4506-8484-5be9acff8170" + "predicate": "produced", + "source": "https://brain-bbqs.org/id/80db3a04-a9ad-486d-abf1-4b20f8370ff9" } ], - "in": [], "dangling": [], - "degree": 3, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/0885bc24-79d7-45c1-ad73-fd4301e68ff6", - "class": "ResearchOrganization", - "label": "State University of New York at Stony Brook", + "id": "https://brain-bbqs.org/id/e0e97a3f-d239-4739-a9d8-6a2af1c6a838", + "class": "Publication", + "label": "Rethinking the external globus pallidus and information flow in cortico-basal ganglia-thalamic circuits.", "facts": { + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/38196745/" + ], + "journal": [ + "ArXiv" + ], "name": [ - "State University of New York at Stony Brook" + "Rethinking the external globus pallidus and information flow in cortico-basal ganglia-thalamic circuits." + ], + "pmid": [ + "38196745" + ], + "title": [ + "Rethinking the external globus pallidus and information flow in cortico-basal ganglia-thalamic circuits." + ], + "year": [ + "2023" ] }, "out": [], "in": [ { - "predicate": "part_of_org", - "source": "https://brain-bbqs.org/id/80e226a5-f7e6-49d2-a64a-524940d498a5" + "predicate": "produced", + "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" } ], "dangling": [], @@ -27754,400 +28739,609 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/4284d761-dde2-4e72-8cb4-d3724f2d4b32", - "class": "ResearchOrganization", - "label": "UNIV OF MASSACHUSETTS MED SCH WORCESTER", + "id": "https://brain-bbqs.org/id/154b96da-c04a-442c-868f-1586b692dc42", + "class": "Publication", + "label": "SARTAB, a scalable system for automated real-time behavior detection based on animal tracking and Region Of Interest analysis: validation on fish courtship behavior.", "facts": { + "doi": [ + "10.3389/fnbeh.2024.1509369" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/39703614/" + ], + "journal": [ + "Front Behav Neurosci" + ], "name": [ - "UNIV OF MASSACHUSETTS MED SCH WORCESTER" + "SARTAB, a scalable system for automated real-time behavior detection based on animal tracking and Region Of Interest analysis: validation on fish courtship behavior." + ], + "pmid": [ + "39703614" + ], + "title": [ + "SARTAB, a scalable system for automated real-time behavior detection based on animal tracking and Region Of Interest analysis: validation on fish courtship behavior." + ], + "year": [ + "2024" ] }, - "out": [ + "out": [], + "in": [ { - "predicate": "members", - "target": "https://brain-bbqs.org/id/fe4790d5-bf32-469d-b098-cb4f44f6fa19" + "predicate": "produced", + "source": "https://brain-bbqs.org/id/e5bb6e4f-d3cf-44d4-ac1a-59f76724c0d2" } ], - "in": [], "dangling": [], "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/52fcb5e7-1274-4621-b368-17f269eaec86", - "class": "ResearchOrganization", - "label": "UNIV OF NORTH CAROLINA CHAPEL HILL", + "id": "https://brain-bbqs.org/id/6a564dd1-f227-40f8-be3c-06bbd09c430c", + "class": "Publication", + "label": "Shared-AE: Automatic Identification of Shared Subspaces in High-dimensional Neural and Behavioral Activity.", "facts": { - "name": [ - "UNIV OF NORTH CAROLINA CHAPEL HILL" + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/41717318/" + ], + "journal": [ + "Int Conf Learn Represent" + ], + "name": [ + "Shared-AE: Automatic Identification of Shared Subspaces in High-dimensional Neural and Behavioral Activity." + ], + "pmid": [ + "41717318" + ], + "title": [ + "Shared-AE: Automatic Identification of Shared Subspaces in High-dimensional Neural and Behavioral Activity." + ], + "year": [ + "2025" ] }, - "out": [ + "out": [], + "in": [ { - "predicate": "members", - "target": "https://brain-bbqs.org/id/1d3b5b5b-7a52-4380-82f4-931b67831917" + "predicate": "produced", + "source": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e" } ], - "in": [], "dangling": [], "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/7867bb2b-3001-431a-9a3b-0f5bd5ad64f2", - "class": "ResearchOrganization", - "label": "UNIVERSITY OF ALABAMA AT BIRMINGHAM", + "id": "https://brain-bbqs.org/id/d2dadb0b-c44c-4e29-bc95-dce3ad1874ff", + "class": "Publication", + "label": "Spectral Learning of Shared Dynamics Between Generalized-Linear Processes.", "facts": { + "doi": [ + "10.52202/079017-2829" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/41306626/" + ], + "journal": [ + "Adv Neural Inf Process Syst" + ], "name": [ - "UNIVERSITY OF ALABAMA AT BIRMINGHAM" + "Spectral Learning of Shared Dynamics Between Generalized-Linear Processes." + ], + "pmid": [ + "41306626" + ], + "title": [ + "Spectral Learning of Shared Dynamics Between Generalized-Linear Processes." + ], + "year": [ + "2024" ] }, - "out": [ + "out": [], + "in": [ { - "predicate": "members", - "target": "https://brain-bbqs.org/id/3161638e-fa1b-4af1-a998-a34139b2a0b1" + "predicate": "produced", + "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" } ], - "in": [], "dangling": [], "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/8f22c7e2-06f2-4c84-aa53-071dcce8f875", - "class": "ResearchOrganization", - "label": "UNIVERSITY OF CALIFORNIA BERKELEY", + "id": "https://brain-bbqs.org/id/44b1ac85-feb2-4792-9f46-109cf7876f4a", + "class": "Publication", + "label": "Suppressing Sensation during Action across Species and Sensory Modalities: Predictive and Nonpredictive Mechanisms of Sensory Modulation.", "facts": { + "doi": [ + "10.1523/JNEUROSCI.1351-25.2025" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/41224663/" + ], + "journal": [ + "J Neurosci" + ], "name": [ - "UNIVERSITY OF CALIFORNIA BERKELEY" + "Suppressing Sensation during Action across Species and Sensory Modalities: Predictive and Nonpredictive Mechanisms of Sensory Modulation." + ], + "pmid": [ + "41224663" + ], + "title": [ + "Suppressing Sensation during Action across Species and Sensory Modalities: Predictive and Nonpredictive Mechanisms of Sensory Modulation." + ], + "year": [ + "2025" ] }, - "out": [ - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/e058af74-abc7-453f-8aa6-93cd056c50e3" - } - ], + "out": [], "in": [ { - "predicate": "part_of_org", - "source": "https://brain-bbqs.org/id/7117c8b9-6d2f-4737-9490-09934fd89aeb" - }, - { - "predicate": "part_of_org", - "source": "https://brain-bbqs.org/id/35e3244e-6533-49e7-b63a-3619d2cf18dc" + "predicate": "produced", + "source": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" } ], "dangling": [], - "degree": 3, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/32f14ee1-e0b4-4753-869a-f630f1786682", - "class": "ResearchOrganization", - "label": "UNIVERSITY OF CALIFORNIA LOS ANGELES", + "id": "https://brain-bbqs.org/id/2a2ae141-5d5c-464a-809f-1e3a19a81293", + "class": "Publication", + "label": "The FDA's plan to phase out animal testing.", "facts": { + "doi": [ + "10.1016/j.tibtech.2025.12.011" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/41571550/" + ], + "journal": [ + "Trends Biotechnol" + ], "name": [ - "UNIVERSITY OF CALIFORNIA LOS ANGELES" + "The FDA's plan to phase out animal testing." + ], + "pmid": [ + "41571550" + ], + "title": [ + "The FDA's plan to phase out animal testing." + ], + "year": [ + "2026" ] }, - "out": [ - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/1a33a814-fbd1-4acf-bc5d-f0077bc180d1" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/5fd6169e-d169-41be-8cd0-e8a691f0b345" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/68fe4ee2-5beb-4a6e-ac58-2d31ad350cfd" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/b050adf2-88b1-42e2-912b-2843d5b96854" - }, + "out": [], + "in": [ { - "predicate": "members", - "target": "https://brain-bbqs.org/id/e6996650-b858-4ddb-b422-4fd92fdfaac4" + "predicate": "produced", + "source": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152" } ], - "in": [], "dangling": [], - "degree": 5, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/d2821755-977a-46a2-a089-169f6e66aeea", - "class": "ResearchOrganization", - "label": "UNIVERSITY OF CALIFORNIA, SAN DIEGO", + "id": "https://brain-bbqs.org/id/579fcaf5-df6d-42f9-a62d-59bd79fe3fae", + "class": "Publication", + "label": "Topological data analysis captures complex behavioral dynamics during naturalistic social interaction between domestic ferrets.", "facts": { + "doi": [ + "10.64898/2026.07.01.735818" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/42465299/" + ], + "journal": [ + "bioRxiv" + ], "name": [ - "UNIVERSITY OF CALIFORNIA, SAN DIEGO" + "Topological data analysis captures complex behavioral dynamics during naturalistic social interaction between domestic ferrets." + ], + "pmid": [ + "42465299" + ], + "title": [ + "Topological data analysis captures complex behavioral dynamics during naturalistic social interaction between domestic ferrets." + ], + "year": [ + "2026" ] }, - "out": [ + "out": [], + "in": [ { - "predicate": "members", - "target": "https://brain-bbqs.org/id/7a2ad901-f50d-40bc-a404-b4ef0c33944b" + "predicate": "produced", + "source": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0" } ], - "in": [], "dangling": [], "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/622f970b-e529-441d-b5f3-739025a38aa9", - "class": "ResearchOrganization", - "label": "UNIVERSITY OF FLORIDA", + "id": "https://brain-bbqs.org/id/7e3ed91a-e0eb-45d6-aa86-cb785dfba7ba", + "class": "Publication", + "label": "Training of Awareness in ADHD: Leveraging Metacognition.", "facts": { + "doi": [ + "10.20900/jpbs.20240006" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/39493272/" + ], + "journal": [ + "J Psychiatr Brain Sci" + ], "name": [ - "UNIVERSITY OF FLORIDA" + "Training of Awareness in ADHD: Leveraging Metacognition." + ], + "pmid": [ + "39493272" + ], + "title": [ + "Training of Awareness in ADHD: Leveraging Metacognition." + ], + "year": [ + "2024" ] }, - "out": [ - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/0f0ad5c2-496b-42a8-91b7-b798742bcdc3" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/28aec8d8-5202-4574-9a96-b01ddb53aeb4" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/2dd8fea9-363a-43da-8bd1-6ae4674c60b9" - }, + "out": [], + "in": [ { - "predicate": "members", - "target": "https://brain-bbqs.org/id/8d6214d3-a2d9-40c2-8cf6-f5e0d0e6afa9" + "predicate": "produced", + "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" } ], - "in": [], "dangling": [], - "degree": 4, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/8f896b71-c64d-4041-9f33-f3477caf8b74", - "class": "ResearchOrganization", - "label": "UNIVERSITY OF MEMPHIS", + "id": "https://brain-bbqs.org/id/e483d68e-7bc8-4fcb-9a75-3d97825c02c9", + "class": "Publication", + "label": "Unraveling robust brain-behavior links of depressive complaints through granular network models for understanding heterogeneity.", "facts": { + "doi": [ + "10.1016/j.jad.2024.05.060" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/38754596/" + ], + "journal": [ + "J Affect Disord" + ], "name": [ - "UNIVERSITY OF MEMPHIS" - ] - }, - "out": [ - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/b050adf2-88b1-42e2-912b-2843d5b96854" + "Unraveling robust brain-behavior links of depressive complaints through granular network models for understanding heterogeneity." + ], + "pmid": [ + "38754596" + ], + "title": [ + "Unraveling robust brain-behavior links of depressive complaints through granular network models for understanding heterogeneity." + ], + "year": [ + "2024" + ] + }, + "out": [], + "in": [ + { + "predicate": "produced", + "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" } ], - "in": [], "dangling": [], "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/1c181fed-73e8-46be-8d27-198f64e936ea", - "class": "ResearchOrganization", - "label": "UNIVERSITY OF MICHIGAN AT ANN ARBOR", + "id": "https://brain-bbqs.org/id/0e032f88-c50f-4527-9c40-68e9b782173d", + "class": "Publication", + "label": "Unsupervised discovery of family specific vocal usage in the Mongolian gerbil.", "facts": { + "author_orcids": [ + "https://orcid.org/0000-0002-2692-5955", + "https://orcid.org/0000-0002-3783-6165", + "https://orcid.org/0000-0003-0471-9816" + ], + "doi": [ + "10.7554/eLife.89892" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/39680425/" + ], + "journal": [ + "Elife" + ], "name": [ - "UNIVERSITY OF MICHIGAN AT ANN ARBOR" + "Unsupervised discovery of family specific vocal usage in the Mongolian gerbil." + ], + "pmid": [ + "39680425" + ], + "title": [ + "Unsupervised discovery of family specific vocal usage in the Mongolian gerbil." + ], + "year": [ + "2024" ] }, - "out": [ + "out": [], + "in": [ { - "predicate": "members", - "target": "https://brain-bbqs.org/id/22edcc49-fd41-4423-92b6-89e7abba292d" - }, + "predicate": "produced", + "source": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" + } + ], + "dangling": [], + "degree": 1, + "flags": [ + "warning" + ], + "violations": [ { - "predicate": "members", - "target": "https://brain-bbqs.org/id/d3cae382-1e79-42c1-8f37-75cd049d0ff6" - }, + "shape": "AuthorOrcidResolvesShape", + "message": "author_orcids has an ORCID with no matching Investigator node -- unresolved author identity (#17).", + "value": "https://brain-bbqs.org/id/0e032f88-c50f-4527-9c40-68e9b782173d", + "severity": "warning" + } + ] + }, + { + "id": "https://brain-bbqs.org/id/b75b460e-560d-48d4-af7d-1152d34c1d79", + "class": "Publication", + "label": "Unsupervised discovery of family specific vocal usage in the Mongolian gerbil.", + "facts": { + "doi": [ + "10.1101/2023.03.11.532197" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/39282260/" + ], + "journal": [ + "bioRxiv" + ], + "name": [ + "Unsupervised discovery of family specific vocal usage in the Mongolian gerbil." + ], + "pmid": [ + "39282260" + ], + "title": [ + "Unsupervised discovery of family specific vocal usage in the Mongolian gerbil." + ], + "year": [ + "2024" + ] + }, + "out": [], + "in": [ { - "predicate": "members", - "target": "https://brain-bbqs.org/id/fa291a57-48b1-4ad1-87da-4a04a01787e8" + "predicate": "produced", + "source": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" } ], - "in": [], "dangling": [], - "degree": 3, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/7848212f-5c1c-4170-bdad-44cc3273d0f1", - "class": "ResearchOrganization", - "label": "UNIVERSITY OF MINNESOTA", + "id": "https://brain-bbqs.org/id/a79d14cd-ae0e-4bce-b09f-8d16e6e15f7f", + "class": "Publication", + "label": "Vocal Call Locator Benchmark (VCL) for localizing rodent vocalizations from multi-channel audio.", + "facts": { + "doi": [ + "10.1101/2024.09.20.613758" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/39345431/" + ], + "journal": [ + "bioRxiv" + ], + "name": [ + "Vocal Call Locator Benchmark (VCL) for localizing rodent vocalizations from multi-channel audio." + ], + "pmid": [ + "39345431" + ], + "title": [ + "Vocal Call Locator Benchmark (VCL) for localizing rodent vocalizations from multi-channel audio." + ], + "year": [ + "2024" + ] + }, + "out": [], + "in": [ + { + "predicate": "produced", + "source": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" + } + ], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/e9749351-6773-473d-8fd0-ec88e5a8ba07", + "class": "Publication", + "label": "Wearable organic-electrochemical-transistor-based lithium sensor for precision mental health.", "facts": { + "doi": [ + "10.1016/j.device.2025.100862" + ], + "external_url": [ + "https://pubmed.ncbi.nlm.nih.gov/41393219/" + ], + "journal": [ + "Device" + ], "name": [ - "UNIVERSITY OF MINNESOTA" + "Wearable organic-electrochemical-transistor-based lithium sensor for precision mental health." + ], + "pmid": [ + "41393219" + ], + "title": [ + "Wearable organic-electrochemical-transistor-based lithium sensor for precision mental health." + ], + "year": [ + "2025" ] }, - "out": [ + "out": [], + "in": [ { - "predicate": "members", - "target": "https://brain-bbqs.org/id/3d7564b9-e839-4737-874a-2e3b5319e11a" + "predicate": "produced", + "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" } ], - "in": [], "dangling": [], "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad", + "id": "https://brain-bbqs.org/id/766331fd-daea-4a31-86c4-589737e533ea", "class": "ResearchOrganization", - "label": "UNIVERSITY OF PENNSYLVANIA", + "label": "BBQS Consortium", "facts": { "name": [ - "UNIVERSITY OF PENNSYLVANIA" + "BBQS Consortium" ] }, - "out": [ - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/3516554a-8253-4773-af22-a89b3ccb3267" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/4626de5c-667e-4f70-be3e-44dffde3887b" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/5b057d86-6fdd-4b5e-b2ab-111360c5b537" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/623a564c-f5bf-4d95-a233-027850148145" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/8e52b630-7ecc-4336-9f31-d0b6a1c85100" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/961fb77d-16c1-4efd-9fc7-ac7bd552c983" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/98076d7b-270f-4a2a-af91-53d1b7644c90" - }, - { - "predicate": "members", - "target": "https://brain-bbqs.org/id/9fd2cbaa-449d-4c9d-bcbb-b627f245cbf3" - }, + "out": [], + "in": [ { - "predicate": "members", - "target": "https://brain-bbqs.org/id/b2e8b421-674b-4e2d-8b61-f1e4a005c4f4" + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/42efe7fa-561b-4a00-af58-78b71f9d4b1a" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/dd96356c-60d7-4a65-9be7-7a622de4287d" + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/46841d0e-4d55-4690-81f0-41c33f424bc8" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/e0179c68-8fe6-48ca-9140-84a567b5f661" + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/00343fc4-d3b9-4b22-8445-dcef0a11a5e4" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/e3335c53-2c38-444e-aff5-43a4268c97bf" + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/5b87def1-786b-470f-879c-9089ebde049d" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/eaa38acf-84a1-44ce-a1c6-eda307583731" + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/1b79d65a-57fd-455c-96e7-acc3b3eb6c01" }, { - "predicate": "members", - "target": "https://brain-bbqs.org/id/fedfc5af-eb8e-4ee5-88e7-a18ab2f00b26" + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/eac8b2aa-4353-4d9a-af21-601294a8ef4a" } ], - "in": [], "dangling": [], - "degree": 14, + "degree": 6, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/e46a4832-3f63-49d7-acad-8567ed641589", + "id": "https://brain-bbqs.org/id/1424d10f-795c-47e5-a6d7-d6705fad611a", "class": "ResearchOrganization", - "label": "UNIVERSITY OF PITTSBURGH AT PITTSBURGH", + "label": "CALIFORNIA INSTITUTE OF TECHNOLOGY", "facts": { "name": [ - "UNIVERSITY OF PITTSBURGH AT PITTSBURGH" + "CALIFORNIA INSTITUTE OF TECHNOLOGY" ] }, "out": [ { "predicate": "members", - "target": "https://brain-bbqs.org/id/0a076358-2298-4693-b3cf-d75114552163" + "target": "https://brain-bbqs.org/id/156fb20f-5e40-4804-992d-dc353b5e99e4" }, { "predicate": "members", - "target": "https://brain-bbqs.org/id/9a233497-f3cd-4888-b5b6-a83630e5f1ee" + "target": "https://brain-bbqs.org/id/3be49154-45d9-45b4-9872-3271a67a5225" }, { "predicate": "members", - "target": "https://brain-bbqs.org/id/dc09061c-41ce-4e6e-bfe9-5e4805b4356c" + "target": "https://brain-bbqs.org/id/b2b7ce80-8dbf-4cf8-804c-9daebe9a9fa5" }, { "predicate": "members", - "target": "https://brain-bbqs.org/id/f4d7cfd7-30aa-4f19-8601-f85f9689884a" + "target": "https://brain-bbqs.org/id/e1fcac8e-1f50-4dc8-8f14-f0ee62614861" + } + ], + "in": [ + { + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/cbc8640e-6d05-4872-bf01-6e3f7d89c349" } ], - "in": [], "dangling": [], - "degree": 4, + "degree": 5, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/180457cc-1c85-4ee9-a13c-7fc8023528c3", + "id": "https://brain-bbqs.org/id/fb3cf5ef-e850-44d2-887c-0d0ef608f48c", "class": "ResearchOrganization", - "label": "UNIVERSITY OF SOUTHERN CALIFORNIA", + "label": "CARNEGIE-MELLON UNIVERSITY", "facts": { "name": [ - "UNIVERSITY OF SOUTHERN CALIFORNIA" + "CARNEGIE-MELLON UNIVERSITY" ] }, "out": [ { "predicate": "members", - "target": "https://brain-bbqs.org/id/d69b71df-b5e8-490c-8df0-5a7883fac0d5" + "target": "https://brain-bbqs.org/id/16d82048-d1f5-4b80-a6e0-2baf5c1bed4f" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/1f6fa922-b662-4325-aac7-cb622ac10ef3" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/75313083-49bd-45dd-a4a2-fd5fc0bf8949" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/ebbb8fee-72ed-4cb0-9d25-94e670379f08" } ], "in": [], "dangling": [], - "degree": 1, + "degree": 4, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/da6f9584-5487-4fe8-a9ed-462fface8db2", + "id": "https://brain-bbqs.org/id/9515d721-456a-45d1-885c-d97a482317f8", "class": "ResearchOrganization", - "label": "UTAH STATE HIGHER EDUCATION SYSTEM--UNIVERSITY OF UTAH", + "label": "CEDARS-SINAI MEDICAL CENTER", "facts": { "name": [ - "UTAH STATE HIGHER EDUCATION SYSTEM--UNIVERSITY OF UTAH" + "CEDARS-SINAI MEDICAL CENTER" ] }, "out": [ { "predicate": "members", - "target": "https://brain-bbqs.org/id/77aecb31-a637-4d08-9a35-e72ea6a46fe5" + "target": "https://brain-bbqs.org/id/e1fcac8e-1f50-4dc8-8f14-f0ee62614861" } ], "in": [], @@ -28157,109 +29351,162 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941", + "id": "https://brain-bbqs.org/id/f28a2f16-5259-4e2f-9c8e-a5d11d2b5c5f", "class": "ResearchOrganization", - "label": "YALE UNIVERSITY", + "label": "CHILDREN'S HOSP OF PHILADELPHIA", "facts": { "name": [ - "YALE UNIVERSITY" + "CHILDREN'S HOSP OF PHILADELPHIA" ] }, "out": [ { "predicate": "members", - "target": "https://brain-bbqs.org/id/0da76ce9-654a-4940-a9c6-d0785167ebad" + "target": "https://brain-bbqs.org/id/1b3e8304-f2d6-4ed6-aa5c-7d49ca278344" }, { "predicate": "members", - "target": "https://brain-bbqs.org/id/0f0ad5c2-496b-42a8-91b7-b798742bcdc3" + "target": "https://brain-bbqs.org/id/32937527-a5e9-4a99-84c0-719435f25f8b" }, { "predicate": "members", - "target": "https://brain-bbqs.org/id/0fd7e9bf-a1c2-48ba-b235-75cee07f2fc2" - }, + "target": "https://brain-bbqs.org/id/aa9445fe-736e-4a1e-b8a4-4b709c4a6603" + } + ], + "in": [], + "dangling": [], + "degree": 3, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/9f75488b-59d0-4d50-b7db-869f26066743", + "class": "ResearchOrganization", + "label": "COLUMBIA UNIVERSITY HEALTH SCIENCES", + "facts": { + "name": [ + "COLUMBIA UNIVERSITY HEALTH SCIENCES" + ] + }, + "out": [ { "predicate": "members", - "target": "https://brain-bbqs.org/id/1b1f912c-a054-4bd1-a6b8-748f902e53f4" + "target": "https://brain-bbqs.org/id/00618660-a724-4059-85c1-c6ca3ccc1744" }, { "predicate": "members", - "target": "https://brain-bbqs.org/id/27d7f30b-e152-4999-a63e-8dd4e800f3bc" + "target": "https://brain-bbqs.org/id/0f65886e-44cb-4a8b-88a2-ecb214b0ea99" }, { "predicate": "members", - "target": "https://brain-bbqs.org/id/5835b3d1-bdaf-4f30-a9e7-cf70d1861b61" + "target": "https://brain-bbqs.org/id/3d7564b9-e839-4737-874a-2e3b5319e11a" }, { "predicate": "members", - "target": "https://brain-bbqs.org/id/67f260ea-2946-4086-9111-c926fb4e6df7" + "target": "https://brain-bbqs.org/id/5bb15430-32e5-457f-b6ce-e4f3790687fa" }, { "predicate": "members", - "target": "https://brain-bbqs.org/id/6cedc563-ca67-467e-9c98-48b5b67123de" + "target": "https://brain-bbqs.org/id/e631bc65-b164-4090-b442-3dacddd2707a" }, { "predicate": "members", - "target": "https://brain-bbqs.org/id/7a5a1c11-f5f8-4643-b444-71228b1f298a" - }, + "target": "https://brain-bbqs.org/id/ee077b61-eb2c-4cd9-b587-a46418c45265" + } + ], + "in": [ + { + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/3ba48c59-bb79-44ef-8569-ca644775d73a" + } + ], + "dangling": [], + "degree": 7, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/d17a5c60-e529-48ed-b4af-11976e4eb3fb", + "class": "ResearchOrganization", + "label": "DARTMOUTH COLLEGE", + "facts": { + "name": [ + "DARTMOUTH COLLEGE" + ] + }, + "out": [ { "predicate": "members", - "target": "https://brain-bbqs.org/id/864e9b52-4173-4b92-bd81-d0bc6a7fc3cb" + "target": "https://brain-bbqs.org/id/25f1bccb-0c04-4e0e-8951-ac2620fb969c" }, { "predicate": "members", - "target": "https://brain-bbqs.org/id/924e4ef8-ee41-480e-9d33-9807b471878d" + "target": "https://brain-bbqs.org/id/c9fb9f5b-29a9-4138-9434-894ab7b7a909" + } + ], + "in": [], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/93fa0810-51f4-4e71-badf-e5e8d3e40dc3", + "class": "ResearchOrganization", + "label": "DUKE UNIVERSITY", + "facts": { + "name": [ + "DUKE UNIVERSITY" + ] + }, + "out": [ + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/1962a240-a592-484c-b812-122a5dad2951" }, { "predicate": "members", - "target": "https://brain-bbqs.org/id/a72c6169-713d-49ef-b9c2-4d9d05247473" + "target": "https://brain-bbqs.org/id/1a33a814-fbd1-4acf-bc5d-f0077bc180d1" }, { "predicate": "members", - "target": "https://brain-bbqs.org/id/ace580b9-6f04-457f-aac0-3ac3a7243e3b" + "target": "https://brain-bbqs.org/id/24981995-2cd1-407a-9d2c-0f89f026edeb" }, { "predicate": "members", - "target": "https://brain-bbqs.org/id/b1b421fc-5477-4c2f-8968-ab757344ab2d" + "target": "https://brain-bbqs.org/id/68fe4ee2-5beb-4a6e-ac58-2d31ad350cfd" }, { "predicate": "members", - "target": "https://brain-bbqs.org/id/def6d629-21cc-431c-8cab-0327f97ee138" + "target": "https://brain-bbqs.org/id/b7b55255-04e1-45e6-934e-af38990ff414" }, { "predicate": "members", - "target": "https://brain-bbqs.org/id/e8c0da8f-2dbb-442f-9831-4271dda9dda9" + "target": "https://brain-bbqs.org/id/c3604b73-537c-411b-b963-cd8df608f086" }, { "predicate": "members", - "target": "https://brain-bbqs.org/id/f6fd8ef2-e06f-4f72-bfc9-4464947fc0b9" + "target": "https://brain-bbqs.org/id/fd89f05c-a37e-4d93-80fc-47dfc8aa3931" + } + ], + "in": [ + { + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/8facb614-80ac-4873-8619-b37c2ad0ed62" } ], - "in": [], "dangling": [], - "degree": 17, + "degree": 8, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/92768805-b266-42bc-90a6-adb1029ebde2", - "class": "SoftwareTool", - "label": "Anipose", + "id": "https://brain-bbqs.org/id/98f1fdd4-77a8-4bd5-8703-ed6fb8c4af0e", + "class": "ResearchOrganization", + "label": "Empire AI Consortium", "facts": { - "description": [ - "3D pose estimation from multi-camera views" - ], - "external_url": [ - "https://anipose.readthedocs.io/" - ], - "language": [ - "Python" - ], "name": [ - "Anipose" - ], - "repo_url": [ - "https://anipose.readthedocs.io/" + "Empire AI Consortium" ] }, "out": [], @@ -28272,24 +29519,12 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/bb9dc9ee-cda3-4d2a-a016-1a0aa705bdec", - "class": "SoftwareTool", - "label": "BENTO", + "id": "https://brain-bbqs.org/id/292698fe-d705-45ac-a255-3c699228f21a", + "class": "ResearchOrganization", + "label": "Eunice Kennedy Shriver National Institute of Child Health and Human Development", "facts": { - "description": [ - "Multimodal data synchronization and visualization for neurobehavioral analysis" - ], - "external_url": [ - "https://github.com/annkennedy/bento" - ], - "language": [ - "MATLAB" - ], "name": [ - "BENTO" - ], - "repo_url": [ - "https://github.com/annkennedy/bento" + "Eunice Kennedy Shriver National Institute of Child Health and Human Development" ] }, "out": [], @@ -28302,261 +29537,296 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/38d4f5ae-7854-42cc-ad36-77a89e6205bf", - "class": "SoftwareTool", - "label": "Bonsai", + "id": "https://brain-bbqs.org/id/92f22292-007f-4091-83e9-10df11f14110", + "class": "ResearchOrganization", + "label": "GEORGIA INSTITUTE OF TECHNOLOGY", "facts": { - "description": [ - "Real-time heterogeneous data stream synchronization and processing" - ], - "external_url": [ - "https://bonsai-rx.org/" - ], - "language": [ - ".NET" - ], "name": [ - "Bonsai" - ], - "repo_url": [ - "https://bonsai-rx.org/" + "GEORGIA INSTITUTE OF TECHNOLOGY" ] }, - "out": [], + "out": [ + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/4f18ae48-4099-486d-8e89-1a8a736e59e4" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/709c64f2-d02c-48f9-b286-b9222a106f27" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/732f511e-4b61-412b-b54d-9c8dbd93c273" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/a5644db3-8ade-4026-9139-c1945c0869d6" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/bf6867b2-09d3-4cc3-89ba-b931b646cd42" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/f33c9c03-f685-4166-b0bf-9ce704b5fa78" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/feeae3ca-856c-462b-8b35-0fe35e294242" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 7, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/4009a1f6-c173-495b-9725-bb51571a3cdf", - "class": "SoftwareTool", - "label": "DeepLabCut", + "id": "https://brain-bbqs.org/id/99bc7f7b-2a3d-4e34-99f1-ec08e12133b2", + "class": "ResearchOrganization", + "label": "HARVARD UNIVERSITY", "facts": { - "description": [ - "Markerless pose estimation of user-defined body parts across species" - ], - "external_url": [ - "https://deeplabcut.github.io/DeepLabCut/" - ], - "language": [ - "Python" - ], "name": [ - "DeepLabCut" - ], - "repo_url": [ - "https://deeplabcut.github.io/DeepLabCut/" + "HARVARD UNIVERSITY" ] }, - "out": [], + "out": [ + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/977712f0-0daf-4238-a693-42c96f0874a2" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/c3604b73-537c-411b-b963-cd8df608f086" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/db663fc5-af00-457b-beb7-f9ee831eef71" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 3, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/c7d588c7-1778-4d8c-b7f6-03d8060463fb", - "class": "SoftwareTool", - "label": "DeepPoseKit", + "id": "https://brain-bbqs.org/id/dbdb11c4-5082-4c5f-b50b-0046aaa0f8d9", + "class": "ResearchOrganization", + "label": "ICAHN SCHOOL OF MEDICINE AT MOUNT SINAI", "facts": { - "description": [ - "Animal pose estimation from video" - ], - "external_url": [ - "https://github.com/jgraving/DeepPoseKit" - ], - "language": [ - "Python" - ], "name": [ - "DeepPoseKit" - ], - "repo_url": [ - "https://github.com/jgraving/DeepPoseKit" + "ICAHN SCHOOL OF MEDICINE AT MOUNT SINAI" ] }, - "out": [], + "out": [ + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/1e23d697-bec8-48a1-ae97-96434e7343c2" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/3d87d6b0-c802-4610-813b-86b94e3e76d6" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/4cd9c282-4677-471a-81c0-aa97d94a687e" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/af52d4d6-a0e2-4a87-b747-6ede8ebf212f" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/c3989bae-203d-43b6-8f09-90935634f1d2" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/cf033709-106e-4288-a326-f7bb353ba0a4" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/f34a38e7-364a-4091-8436-a8c52b684cc2" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 7, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/5370de26-7bb9-4adb-8ba9-43d30ce5c78a", - "class": "SoftwareTool", - "label": "DeepSqueak", + "id": "https://brain-bbqs.org/id/117670d4-58c8-49ed-acb8-311c357126ce", + "class": "ResearchOrganization", + "label": "INTERNATIONAL BRAIN LABORATORY", "facts": { - "description": [ - "Ultrasonic vocalization (USV) detection and analysis in rodents" - ], - "external_url": [ - "https://github.com/DrCoffey/DeepSqueak" - ], - "language": [ - "MATLAB" - ], "name": [ - "DeepSqueak" - ], - "repo_url": [ - "https://github.com/DrCoffey/DeepSqueak" + "INTERNATIONAL BRAIN LABORATORY" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/ca41ad35-92a2-4391-95c3-0db49351b9a5" + } ], + "dangling": [], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/2759fdf8-4690-4aea-b5d6-3a44bd3270e4", - "class": "SoftwareTool", - "label": "Dynestyx", + "id": "https://brain-bbqs.org/id/315a0694-ce8d-4010-abca-5438e5f6b560", + "class": "ResearchOrganization", + "label": "JOHNS HOPKINS UNIVERSITY", "facts": { - "description": [ - "Bayesian modeling and inference of dynamical systems from real-world data" - ], - "external_url": [ - "https://basisresearch.github.io/dynestyx" - ], "name": [ - "Dynestyx" + "JOHNS HOPKINS UNIVERSITY" ] }, - "out": [], + "out": [ + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/d2f77d44-3a20-4759-be29-69403ae039ef" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/eff6d625-81ad-4a38-9f8e-93a2ae06c7af" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/d07c77d3-110d-43dd-bfe3-51535e38ae71", - "class": "SoftwareTool", - "label": "fastplotlib", + "id": "https://brain-bbqs.org/id/7924e7d9-5b53-4525-95ef-3f5a6b9112a5", + "class": "ResearchOrganization", + "label": "MASSACHUSETTS INSTITUTE OF TECHNOLOGY", "facts": { - "description": [ - "Open source GPU-accelerated scientific plotting library built on next-gen wgpu & pygfx technologies. Enables fast and interactive visualization of large-scale high-dimensional & multi-modal neural data, integrating into every step of the analysis pipeline — from real-time data acquisition, calcium imaging, multi-electrode electrophysiology recordings, and behavior analysis. Supports human-in-the-loop analysis systems for data processing and model exploration." - ], - "external_url": [ - "https://github.com/fastplotlib/fastplotlib" - ], - "language": [ - "Python" - ], "name": [ - "fastplotlib" - ], - "repo_url": [ - "https://github.com/fastplotlib/fastplotlib" - ], - "software_license": [ - "Open Source" + "MASSACHUSETTS INSTITUTE OF TECHNOLOGY" ] }, - "out": [], + "out": [ + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/0f3bb33c-e7ee-4013-af5d-894d1adfa0ee" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/20d3bb9f-8cbe-45b8-974e-1c84e0d9631f" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/4d8bb1b1-0cd6-4ca6-a5f7-7b0bc3ba537d" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/5f8ac3c4-a0fb-44d6-ae2d-b505816d4141" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/70205506-97d5-4503-bc59-e9a25934e699" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/95406597-a11e-4809-834d-8a6926c32164" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/a7318228-623e-4f94-a7e6-5e3fed968e1a" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/b359432d-39e2-4ab8-bb3b-16afe458820c" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/e03557cc-99aa-4b15-8786-bde9a5253fd1" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/e5bdf58e-a1ff-4f5f-aa6d-667de414e16e" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/f9cc96dd-52b0-41bc-b687-47a1e4df3e2c" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/fe4790d5-bf32-469d-b098-cb4f44f6fa19" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 12, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/0ab38ea2-777f-4cb2-af86-77491c07a3bb", - "class": "SoftwareTool", - "label": "idtracker.ai", + "id": "https://brain-bbqs.org/id/c28b3fe8-8dbf-4037-ab56-fda6d170cfc4", + "class": "ResearchOrganization", + "label": "MCGILL UNIVERSITY", "facts": { - "description": [ - "Multi-animal identity tracking and maintenance across video recordings" - ], - "external_url": [ - "https://idtracker.ai/latest/" - ], - "language": [ - "Python" - ], "name": [ - "idtracker.ai" - ], - "repo_url": [ - "https://idtracker.ai/latest/" + "MCGILL UNIVERSITY" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/8515cd09-418b-43c0-89b2-9076744b17e6" + }, + { + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/c4b8f5ff-4ac3-4c1b-a978-bd7d1c2dbb86" + } ], + "dangling": [], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/e6bf3fa7-714c-43a8-9676-3cef1b1da171", - "class": "SoftwareTool", - "label": "JAABA", + "id": "https://brain-bbqs.org/id/7de07dc9-72c0-4900-be0d-c375d927a6b4", + "class": "ResearchOrganization", + "label": "MICHIGAN STATE UNIVERSITY", "facts": { - "description": [ - "Automated behavior classification from video features" - ], - "external_url": [ - "https://jaaba.sourceforge.net/" - ], - "language": [ - "MATLAB" - ], "name": [ - "JAABA" - ], - "repo_url": [ - "https://jaaba.sourceforge.net/" + "MICHIGAN STATE UNIVERSITY" ] }, - "out": [], + "out": [ + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/1d3b5b5b-7a52-4380-82f4-931b67831917" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/afe5dc6f-8e97-48c9-bb79-5af130f1e62a" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/d0f582a1-20fd-43ca-a9f1-21bf0ee548c1" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 3, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/e611ba01-166e-44ed-8005-979e29dee9ed", - "class": "SoftwareTool", - "label": "LabStreamingLayer", + "id": "https://brain-bbqs.org/id/c93dcda4-c504-4ca5-a8a5-a62aecf9e841", + "class": "ResearchOrganization", + "label": "National Center for Complementary and Integrative Health", "facts": { - "description": [ - "Multi-source data streaming and temporal synchronization" - ], - "external_url": [ - "https://labstreaminglayer.org/" - ], - "language": [ - "C++" - ], "name": [ - "LabStreamingLayer" - ], - "repo_url": [ - "https://labstreaminglayer.org/" + "National Center for Complementary and Integrative Health" ] }, "out": [], @@ -28569,30 +29839,12 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/3ba48c59-bb79-44ef-8569-ca644775d73a", - "class": "SoftwareTool", - "label": "Lightning Pose", + "id": "https://brain-bbqs.org/id/c39b3d7a-4ea4-4711-837c-45cef389b959", + "class": "ResearchOrganization", + "label": "National Eye Institute", "facts": { - "description": [ - "Markerless pose estimation tool for neuroscience, published in Nature Methods (2024). Supports single-view and multi-view, single-animal pose estimation with a GUI for multi-view labeling. Developed by Liam Paninski's lab at Columbia University Zuckerman Institute, Center for Theoretical Neuroscience. 280+ GitHub stars." - ], - "docs_url": [ - "https://lightning-pose.readthedocs.io/" - ], - "external_url": [ - "https://github.com/paninski-lab/lightning-pose" - ], - "language": [ - "Python" - ], "name": [ - "Lightning Pose" - ], - "repo_url": [ - "https://github.com/paninski-lab/lightning-pose" - ], - "software_license": [ - "Open Source" + "National Eye Institute" ] }, "out": [], @@ -28605,18 +29857,12 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/444f664a-b7ee-4571-ad81-33bd93b03cca", - "class": "SoftwareTool", - "label": "Lightning Pose", + "id": "https://brain-bbqs.org/id/f1f7e238-efa6-42a5-b5f2-530e56d6cd35", + "class": "ResearchOrganization", + "label": "National Institute of Biomedical Imaging and Bioengineering", "facts": { - "description": [ - "Markerless pose estimation tool for neuroscience, published in Nature Methods (2024). Supports single-view and multi-view, single-animal pose estimation with a GUI for multi-view labeling. Developed by Liam Paninski's lab at Columbia University Zuckerman Institute." - ], - "external_url": [ - "https://lightning-pose.readthedocs.io/" - ], "name": [ - "Lightning Pose" + "National Institute of Biomedical Imaging and Bioengineering" ] }, "out": [], @@ -28629,84 +29875,88 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/693dd13f-6181-46e2-9d89-956c8fd3c78e", - "class": "SoftwareTool", - "label": "MARS", + "id": "https://brain-bbqs.org/id/28609b98-6f97-4a46-b875-9f5084f1c7cd", + "class": "ResearchOrganization", + "label": "National Institute of Mental Health", "facts": { - "description": [ - "Automated social behavior classification in mouse pairs" - ], - "external_url": [ - "https://github.com/neuroethology/MARS" - ], - "language": [ - "Python" - ], "name": [ - "MARS" - ], - "repo_url": [ - "https://github.com/neuroethology/MARS" + "National Institute of Mental Health" ] }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "out": [ + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/2f334517-3173-4654-987e-dc44e0e94eb2" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/7745a449-07ce-4762-988e-e355a72b0775" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/8b45a6d3-febb-4537-9786-69685e36aa6d" + } + ], + "in": [ + { + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/67d25d9e-afa4-4571-aa3c-3c0d4aee3388" + } ], + "dangling": [], + "degree": 4, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/b2f1e74e-20e6-4a73-a04c-37339768e70f", - "class": "SoftwareTool", - "label": "MoSeq", + "id": "https://brain-bbqs.org/id/69aa906c-2a0c-4524-8958-4e1009f96060", + "class": "ResearchOrganization", + "label": "National Institute of Neurological Disorders and Stroke", "facts": { - "description": [ - "Unsupervised behavioral segmentation into reusable action syllables" - ], - "external_url": [ - "https://dattalab.github.io/moseq2-website/" - ], - "language": [ - "Python" - ], "name": [ - "MoSeq" - ], - "repo_url": [ - "https://dattalab.github.io/moseq2-website/" + "National Institute of Neurological Disorders and Stroke" ] }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "out": [ + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/36ba050d-e4f4-470c-a780-eddef3b4bab8" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/b723b975-9438-4c08-b9b9-404846e31272" + } + ], + "in": [ + { + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/07448ab8-2717-4b6e-83e0-9abf492240e5" + }, + { + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/3fb868da-b941-439e-a81e-927a543defd3" + }, + { + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/9fe36a51-d470-42f8-baa1-0c7aa68a9dea" + }, + { + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/912f67fc-5862-47a2-b6f4-891fcd98f244" + } ], + "dangling": [], + "degree": 6, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/bea2a223-4980-44da-b8da-807ac4301bc6", - "class": "SoftwareTool", - "label": "Open Ephys", + "id": "https://brain-bbqs.org/id/6db7f54b-3093-42cc-8011-007e7c9012f2", + "class": "ResearchOrganization", + "label": "National Institute on Aging", "facts": { - "description": [ - "Electrophysiology data acquisition and real-time processing" - ], - "external_url": [ - "https://open-ephys.org/" - ], - "language": [ - "C++" - ], "name": [ - "Open Ephys" - ], - "repo_url": [ - "https://open-ephys.org/" + "National Institute on Aging" ] }, "out": [], @@ -28719,24 +29969,12 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/d38cd5f0-0429-4fc0-a9e3-06039719e581", - "class": "SoftwareTool", - "label": "OpenFace", + "id": "https://brain-bbqs.org/id/ec41db91-9533-4a3c-8956-8ae3d9030c8c", + "class": "ResearchOrganization", + "label": "National Institute on Alcohol Abuse and Alcoholism", "facts": { - "description": [ - "Facial behavior analysis: landmarks, head pose, gaze, action units" - ], - "external_url": [ - "https://github.com/TadasBaltrusaitis/OpenFace" - ], - "language": [ - "C++" - ], "name": [ - "OpenFace" - ], - "repo_url": [ - "https://github.com/TadasBaltrusaitis/OpenFace" + "National Institute on Alcohol Abuse and Alcoholism" ] }, "out": [], @@ -28749,201 +29987,245 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/529a7b7d-e25c-4d71-b61a-05733ab55f08", - "class": "SoftwareTool", - "label": "OpenPose", + "id": "https://brain-bbqs.org/id/a6ed8610-4f99-43cb-b0fa-ed983bfa2f20", + "class": "ResearchOrganization", + "label": "National Institute on Deafness and Other Communication Disorders", "facts": { - "description": [ - "Real-time multi-person 2D pose estimation (body, hands, face)" - ], - "external_url": [ - "https://github.com/CMU-Perceptual-Computing-Lab/openpose" - ], - "language": [ - "C++" - ], "name": [ - "OpenPose" - ], - "repo_url": [ - "https://github.com/CMU-Perceptual-Computing-Lab/openpose" + "National Institute on Deafness and Other Communication Disorders" ] }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "out": [ + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/4412f5e5-aba7-49fb-876c-618f59f9b226" + } ], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/c6be2ee8-73b8-412e-8331-4eac1f2937de", - "class": "SoftwareTool", - "label": "senselab", - "facts": { - "description": [ - "Python package for processing and analyzing behavioral data — primarily voice and speech, also text and video — through reproducible pipelines: speech-to-text, speaker diarization and verification, speech enhancement, acoustic feature extraction, and forced alignment." - ], - "name": [ - "senselab" - ] - }, - "out": [], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 1, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/c7ddfa55-b28b-4143-a94f-ebddaf38bd77", - "class": "SoftwareTool", - "label": "SimBA", + "id": "https://brain-bbqs.org/id/32f761ce-6857-451c-9eb7-fc5b8b221449", + "class": "ResearchOrganization", + "label": "National Institute on Drug Abuse", "facts": { - "description": [ - "Supervised behavioral classification from pose data" - ], - "external_url": [ - "https://github.com/sgoldenlab/simba" - ], - "language": [ - "Python" - ], "name": [ - "SimBA" - ], - "repo_url": [ - "https://github.com/sgoldenlab/simba" + "National Institute on Drug Abuse" ] }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "out": [ + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/24703152-c43b-4f4f-8d73-65f3ef490ff0" + } + ], + "in": [ + { + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/d3423658-1147-421f-a6f8-f31067133351" + } ], + "dangling": [], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/340ce805-e6f8-454a-bb4b-83ef53e0d444", - "class": "SoftwareTool", - "label": "SLEAP", + "id": "https://brain-bbqs.org/id/208980e9-92b9-447e-a2ca-e83bf61db159", + "class": "ResearchOrganization", + "label": "National Institutes of Health", "facts": { - "description": [ - "Multi-animal pose tracking without markers" - ], "external_url": [ - "https://sleap.ai/" - ], - "language": [ - "Python" + "https://www.nih.gov", + "https://www.nih.gov" ], "name": [ - "SLEAP" - ], - "repo_url": [ - "https://sleap.ai/" + "National Institutes of Health" ] }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "out": [ + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/3cc135af-1424-4cc9-b54b-978d039ad6d1" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/5899fd56-4c11-41a1-8b0a-4e1785820391" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/71d734ad-e355-473d-aaf7-577be85186d5" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/79c7ff27-6bd7-4b92-b22c-9f4f80a507ab" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/83a4df24-ed1c-462a-bf74-36c68150c42c" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/8f429fce-6c38-4707-bd9c-30fd796e9137" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/9eb4af78-4485-4c7b-9179-76d079bde109" + } + ], + "in": [ + { + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/7766280c-d6f3-4c55-8e7e-f9207dbc1d1f" + }, + { + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/1cf7c61c-a403-4eb5-8a84-07a1e2da8fb4" + }, + { + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/7395b261-f13c-4d69-b455-6b58f52b0d5a" + }, + { + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/0cdfab9b-92fe-45c6-afbe-9f22d7eda7dd" + }, + { + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/30ae82dc-0473-443d-96ae-8bbf8b0206cb" + } ], + "dangling": [], + "degree": 12, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/8c8402e7-5b64-4903-957e-8c7f3548512d", - "class": "SoftwareTool", - "label": "SSL (rodent USV detection & segmentation)", + "id": "https://brain-bbqs.org/id/62826284-8258-4f21-af3e-64fc755ef2b2", + "class": "ResearchOrganization", + "label": "National Science Foundation", "facts": { - "description": [ - "Detects and segments rodent ultrasonic vocalizations from multi-channel audio and compares detection methods against user annotation" - ], - "external_url": [ - "https://github.com/tianxiao18/ssl" - ], "name": [ - "SSL (rodent USV detection & segmentation)" + "National Science Foundation" ] }, "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "in": [ + { + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/0f875168-9793-465b-9ab1-bf8f18492778" + }, + { + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/a8990457-e9da-49eb-9a0c-5b2af1a4ca61" + } ], + "dangling": [], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/515ee9e5-9453-4797-8017-f55c6dd7f1f7", - "class": "SoftwareTool", - "label": "Vocalocator", + "id": "https://brain-bbqs.org/id/5b794afd-cf08-4107-81c8-522a29714830", + "class": "ResearchOrganization", + "label": "NEW YORK UNIVERSITY", "facts": { - "description": [ - "Deep neural networks for sound source localization and vocalization attribution in rodents, from multi-channel audio" - ], - "external_url": [ - "https://github.com/neurostatslab/vocalocator" - ], "name": [ - "Vocalocator" + "NEW YORK UNIVERSITY" ] }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" + "out": [ + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/3161638e-fa1b-4af1-a998-a34139b2a0b1" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/93a3260d-e267-451b-9960-06cc9ae3a40c" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/af80d437-679c-42d0-aeed-fc7129b8a7b7" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/be8d825d-140a-4d72-a39a-2534cf2b4145" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/f2372c9c-91ac-449f-8ae8-182327e93a85" + } ], + "in": [ + { + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/12234308-3c6b-4d75-a135-f8fb127d4389" + } + ], + "dangling": [], + "degree": 6, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/16b2b3ec-077a-4101-9a4a-0f85f06b984e", - "class": "SoftwareTool", - "label": "Vocalocator-SSL", + "id": "https://brain-bbqs.org/id/6efc2552-7cd7-4e53-bd2d-41fee6824cf7", + "class": "ResearchOrganization", + "label": "NEW YORK UNIVERSITY SCHOOL OF MEDICINE", "facts": { - "description": [ - "Weakly supervised training and calibration framework that attributes each vocalization to an individual animal, using multi-channel audio aligned with keypoint tracks of freely interacting groups" - ], - "external_url": [ - "https://github.com/Aramist/vocalocator-ssl" - ], "name": [ - "Vocalocator-SSL" + "NEW YORK UNIVERSITY SCHOOL OF MEDICINE" ] }, - "out": [], - "in": [], - "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], - "violations": [] - }, + "out": [ + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/03f8e307-5f04-4d22-9aef-c1bb9d3e6905" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/1a8f0486-7381-4156-824c-b2e9ff0dc817" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/2634f607-be46-4d8d-baae-6ec0d66a5436" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/47485e5b-3455-44a3-a716-70069176b11f" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/6fe1f186-133e-4490-b50b-4e5d7d4c6347" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/7a2ad901-f50d-40bc-a404-b4ef0c33944b" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/831a48e1-025d-499a-bf11-83d05285ed4b" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/c140b518-3ea9-4cad-a8b2-c7b30385589b" + } + ], + "in": [], + "dangling": [], + "degree": 8, + "flags": [], + "violations": [] + }, { - "id": "https://brain-bbqs.org/id/10ceb449-38ab-4e52-9422-39722583f074", - "class": "Species", - "label": "Acoel Flatworm", + "id": "https://brain-bbqs.org/id/d5a4e8e7-26ef-474d-bb33-055d3b151a83", + "class": "ResearchOrganization", + "label": "NIH Office of Behavioral and Social Sciences Research", "facts": { - "common_name": [ - "Acoel Flatworm" - ], "name": [ - "Acoel Flatworm" - ], - "taxonomy_class": [ - "Acoela" + "NIH Office of Behavioral and Social Sciences Research" ] }, "out": [], @@ -28956,185 +30238,170 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/5a248695-86a9-44ac-b923-a3050572afba", - "class": "Species", - "label": "Brown Rat", + "id": "https://brain-bbqs.org/id/9860f60e-6ccf-44b5-b941-45c88e0ffed7", + "class": "ResearchOrganization", + "label": "NIH Office of Research on Women's Health", "facts": { - "aliases": [ - "Norway rat", - "Rattus norvegicus", - "rat", - "rattus norvegicus" - ], - "common_name": [ - "Brown Rat" - ], "name": [ - "Brown Rat" - ], - "taxonomy_class": [ - "Mammalia" + "NIH Office of Research on Women's Health" + ] + }, + "out": [], + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/2548a017-fd14-4934-9762-b30d7071821a", + "class": "ResearchOrganization", + "label": "NIH Office of the Director (Common Fund)", + "facts": { + "name": [ + "NIH Office of the Director (Common Fund)" ] }, "out": [], "in": [ { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/4f2619b1-a6a4-48e5-b21a-0f5455354ea9" + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/9db8fc93-1890-4237-b758-d5f94c5e6306" + }, + { + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/ac01b838-9803-4a39-8adf-6b9ac9883535" + }, + { + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/8b9d5dda-2b99-4e1c-ba27-968f74ef8b77" + }, + { + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/b76af5cd-30c7-4f75-a127-d4e8a669cdd6" + }, + { + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/09e37e7e-a6a7-409a-b532-9f000647f007" } ], "dangling": [], - "degree": 1, + "degree": 5, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/77f3b242-4db9-4080-843c-d868a6d4f465", - "class": "Species", - "label": "Brown-headed Cowbird", + "id": "https://brain-bbqs.org/id/ef820011-b44d-40f5-a4ab-2069fa9805df", + "class": "ResearchOrganization", + "label": "NORTHWESTERN UNIVERSITY AT CHICAGO", "facts": { - "aliases": [ - "Molothrus ater", - "brown-headed cowbird", - "molothrus ater" - ], - "common_name": [ - "Brown-headed Cowbird" - ], "name": [ - "Brown-headed Cowbird" - ], - "taxonomy_class": [ - "Aves" + "NORTHWESTERN UNIVERSITY AT CHICAGO" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/e285ab2b-1a7d-4b2e-9400-b24d6faff6de" + "predicate": "members", + "target": "https://brain-bbqs.org/id/c11ff83b-6ac9-4ebe-992b-f37c931e182b" } ], + "in": [], "dangling": [], "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/7b2f0bde-f010-4315-b856-c217e8ca7788", - "class": "Species", - "label": "Cichlid Fish", + "id": "https://brain-bbqs.org/id/1ec93ddb-bb26-4062-9a18-1214bc458102", + "class": "ResearchOrganization", + "label": "PENNSYLVANIA STATE UNIVERSITY", "facts": { - "aliases": [ - "Cichlidae", - "cichlid fish", - "cichlidae" - ], - "common_name": [ - "Cichlid Fish" - ], "name": [ - "Cichlid Fish" - ], - "taxonomy_class": [ - "Actinopterygii" + "PENNSYLVANIA STATE UNIVERSITY" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/e5bb6e4f-d3cf-44d4-ac1a-59f76724c0d2" + "predicate": "members", + "target": "https://brain-bbqs.org/id/6340c8ee-1d5b-45f0-87ff-c320a38df17d" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/b359432d-39e2-4ab8-bb3b-16afe458820c" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/bef479f9-d7a4-472b-8ff7-eb0b098beb7c", - "class": "Species", - "label": "Common Marmoset", + "id": "https://brain-bbqs.org/id/6a224a59-b37c-40b2-a4ef-f43393d94357", + "class": "ResearchOrganization", + "label": "RICE UNIVERSITY", "facts": { - "aliases": [ - "Callithrix jacchus", - "common marmoset", - "marmoset", - "marmosets" - ], - "common_name": [ - "Common Marmoset" - ], "name": [ - "Common Marmoset" - ], - "taxonomy_class": [ - "Mammalia" + "RICE UNIVERSITY" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/1e2423ff-965b-4485-8557-797c1e1dee38" + "predicate": "members", + "target": "https://brain-bbqs.org/id/09865181-38c6-44d9-aba4-68e373f0286d" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/2fb1cdc9-28b2-4709-adf4-c914a44e042d" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/34318c67-9a08-4465-8859-5ded31edb62e", - "class": "Species", - "label": "Cricket", + "id": "https://brain-bbqs.org/id/db72ef76-b8e2-4d0e-85da-c8d475d70628", + "class": "ResearchOrganization", + "label": "SEATTLE CHILDREN'S HOSPITAL", "facts": { - "common_name": [ - "Cricket" - ], "name": [ - "Cricket" - ], - "taxonomy_class": [ - "Insecta" + "SEATTLE CHILDREN'S HOSPITAL" ] }, - "out": [], + "out": [ + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/32937527-a5e9-4a99-84c0-719435f25f8b" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/f0d2d9d0-b5e5-4f52-a40d-0d5a06229b14" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 2, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/311017ec-9209-4d63-95fb-1967bc8a81b7", - "class": "Species", - "label": "Domestic Ferret", + "id": "https://brain-bbqs.org/id/1a88610e-c3bc-41b8-a97e-36698d0b0c28", + "class": "ResearchOrganization", + "label": "Simons Foundation", "facts": { - "aliases": [ - "Mustela putorius furo", - "domestic ferret", - "ferret", - "ferrets" - ], - "common_name": [ - "Domestic Ferret" - ], "name": [ - "Domestic Ferret" - ], - "taxonomy_class": [ - "Mammalia" + "Simons Foundation" ] }, "out": [], "in": [ { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0" + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/20adc9fb-c389-48a7-85ec-931501f0ce13" } ], "dangling": [], @@ -29143,30 +30410,19 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/ec95cd91-709c-41ac-8bfb-bfdf3e2ea89c", - "class": "Species", - "label": "Domestic Sheep", + "id": "https://brain-bbqs.org/id/00b6e913-54e0-4cb5-bfdb-7c4123de51d6", + "class": "ResearchOrganization", + "label": "Society for Neuroscience", "facts": { - "aliases": [ - "Ovis aries", - "domestic sheep", - "ovis aries" - ], - "common_name": [ - "Domestic Sheep" - ], "name": [ - "Domestic Sheep" - ], - "taxonomy_class": [ - "Mammalia" + "Society for Neuroscience" ] }, "out": [], "in": [ { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/3846417f-c783-484b-9cfc-fbbf8f83fdf5" + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/3533afc4-be44-460c-bada-ab578b028acb" } ], "dangling": [], @@ -29175,65 +30431,52 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/436525a6-acbf-4066-ac75-82845a8db8cc", - "class": "Species", - "label": "Fruit Fly", + "id": "https://brain-bbqs.org/id/c04b3bcd-d1db-4b3c-9dc6-a4c97039cad6", + "class": "ResearchOrganization", + "label": "STATE UNIVERSITY NEW YORK STONY BROOK", "facts": { - "aliases": [ - "Drosophila melanogaster", - "drosophila melanogaster", - "fruit fly" - ], - "common_name": [ - "Fruit Fly" - ], "name": [ - "Fruit Fly" - ], - "taxonomy_class": [ - "Insecta" + "STATE UNIVERSITY NEW YORK STONY BROOK" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608" + "predicate": "members", + "target": "https://brain-bbqs.org/id/223a91b2-1ffb-49e6-9cd7-d97f6f2beece" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/87b79b22-888b-40ac-bee6-32a62f07645f" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/bcdcd220-fa82-47d4-9c1b-7a8da03dadd8" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/c6056429-1e03-4506-8484-5be9acff8170" } ], + "in": [], "dangling": [], - "degree": 1, + "degree": 4, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/d6fbdcc7-30d7-48ba-9c46-b70e227c59cf", - "class": "Species", - "label": "Hofstenia miamia", + "id": "https://brain-bbqs.org/id/0885bc24-79d7-45c1-ad73-fd4301e68ff6", + "class": "ResearchOrganization", + "label": "State University of New York at Stony Brook", "facts": { - "aliases": [ - "Hofstenia miamia", - "hofstenia miamia", - "panther worm" - ], - "common_name": [ - "panther worm" - ], - "description": [ - "Panther worm (acoel); studied in R34DA061984" - ], "name": [ - "Hofstenia miamia" - ], - "taxonomy_class": [ - "Acoela" + "State University of New York at Stony Brook" ] }, "out": [], "in": [ { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/ca25b66c-c03f-4d7e-90e8-93bc12fafeb1" + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/80e226a5-f7e6-49d2-a64a-524940d498a5" } ], "dangling": [], @@ -29242,858 +30485,2496 @@ "violations": [] }, { - "id": "https://brain-bbqs.org/id/9f227f88-53ba-4c7c-91e7-334641e4b759", - "class": "Species", - "label": "House Mouse", + "id": "https://brain-bbqs.org/id/4284d761-dde2-4e72-8cb4-d3724f2d4b32", + "class": "ResearchOrganization", + "label": "UNIV OF MASSACHUSETTS MED SCH WORCESTER", "facts": { - "aliases": [ - "Mus musculus", - "house mouse", - "mice", - "mouse", - "mus musculus" - ], - "common_name": [ - "House Mouse" - ], "name": [ - "House Mouse" - ], - "taxonomy_class": [ - "Mammalia" + "UNIV OF MASSACHUSETTS MED SCH WORCESTER" ] }, - "out": [], - "in": [ - { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/f294b0d9-175a-47c7-854c-d4d750009812" - }, - { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/2db5ee93-296a-446a-a3e6-59fd3d28c4a6" - }, - { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e" - }, - { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/4f2619b1-a6a4-48e5-b21a-0f5455354ea9" - }, - { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/bf3493c0-de28-4731-9baf-c976ccc7c484" - }, + "out": [ { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" + "predicate": "members", + "target": "https://brain-bbqs.org/id/37453416-6149-4fee-b9b9-a427b800ffe7" }, { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/1e1fc06b-fe5c-4ec2-9f64-474f98ae31e8" + "predicate": "members", + "target": "https://brain-bbqs.org/id/fe4790d5-bf32-469d-b098-cb4f44f6fa19" } ], + "in": [], "dangling": [], - "degree": 7, + "degree": 2, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40", - "class": "Species", - "label": "Human", + "id": "https://brain-bbqs.org/id/52fcb5e7-1274-4621-b368-17f269eaec86", + "class": "ResearchOrganization", + "label": "UNIV OF NORTH CAROLINA CHAPEL HILL", "facts": { - "aliases": [ - "Homo sapiens", - "homo sapiens", - "human", - "humans", - "humans (epilepsy patients)", - "humans (pediatric)" - ], - "common_name": [ - "Human" - ], "name": [ - "Human" - ], - "taxonomy_class": [ - "Mammalia" + "UNIV OF NORTH CAROLINA CHAPEL HILL" ] }, - "out": [], - "in": [ - { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" - }, - { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/adc6c1dd-57a9-49bb-a57d-521fd1208a76" - }, - { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" - }, - { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/797fd7cf-49dc-40a2-811d-aeec94460ead" - }, - { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/80e226a5-f7e6-49d2-a64a-524940d498a5" - }, - { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/8095d361-d12f-4015-86e7-67fced46f2e9" - }, - { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/b02aaf9f-0a7e-4759-b1ba-cb100a2d4eed" - }, - { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/3352859e-5677-46dd-89d6-17c898b6f097" - }, - { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/4614269a-0d7f-4390-b4cc-568a09fa6a45" - }, - { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/38289d36-f3a6-43e1-955b-db1d3d400cb2" - }, - { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0" - }, - { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/80db3a04-a9ad-486d-abf1-4b20f8370ff9" - }, + "out": [ { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/22e61529-38ba-465f-b38b-274e24160fb6" + "predicate": "members", + "target": "https://brain-bbqs.org/id/1d3b5b5b-7a52-4380-82f4-931b67831917" } ], + "in": [], "dangling": [], - "degree": 13, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/7f92ea75-530c-40bf-83a4-3e1eba4d4179", - "class": "Species", - "label": "Mongolian Gerbil", + "id": "https://brain-bbqs.org/id/24c105cd-2a0b-4a0e-8e6a-67e7a28f7315", + "class": "ResearchOrganization", + "label": "University College London", "facts": { - "aliases": [ - "Meriones unguiculatus", - "Mongolian gerbil", - "gerbil", - "meriones unguiculatus" - ], - "common_name": [ - "Mongolian Gerbil" - ], "name": [ - "Mongolian Gerbil" - ], - "taxonomy_class": [ - "Mammalia" + "University College London" ] }, - "out": [], - "in": [ - { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/a98fe953-d2ad-4770-8c8c-1759f8500c4a" - }, + "out": [ { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" + "predicate": "members", + "target": "https://brain-bbqs.org/id/1ee83670-fadd-4744-91bd-17ca61944822" } ], + "in": [], "dangling": [], - "degree": 2, + "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/491ac537-b3f6-45b9-93f3-1249fd809ebc", - "class": "Species", - "label": "White-faced Capuchin", + "id": "https://brain-bbqs.org/id/7867bb2b-3001-431a-9a3b-0f5bd5ad64f2", + "class": "ResearchOrganization", + "label": "UNIVERSITY OF ALABAMA AT BIRMINGHAM", "facts": { - "aliases": [ - "Cebus imitator", - "cebus imitator", - "white-faced capuchin" - ], - "common_name": [ - "White-faced Capuchin" - ], "name": [ - "White-faced Capuchin" - ], - "taxonomy_class": [ - "Mammalia" + "UNIVERSITY OF ALABAMA AT BIRMINGHAM" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/1573f2f2-dfe7-476f-ba44-55011c0f5d1b" + "predicate": "members", + "target": "https://brain-bbqs.org/id/3161638e-fa1b-4af1-a998-a34139b2a0b1" } ], + "in": [], "dangling": [], "degree": 1, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/8e40951f-ace0-4470-ab0f-3dd6bc366c8b", - "class": "Species", - "label": "Zebrafish", + "id": "https://brain-bbqs.org/id/8f22c7e2-06f2-4c84-aa53-071dcce8f875", + "class": "ResearchOrganization", + "label": "UNIVERSITY OF CALIFORNIA BERKELEY", "facts": { - "aliases": [ - "Danio rerio", - "danio rerio", - "zebrafish" - ], - "common_name": [ - "Zebrafish" - ], "name": [ - "Zebrafish" - ], - "taxonomy_class": [ - "Actinopterygii" + "UNIVERSITY OF CALIFORNIA BERKELEY" ] }, - "out": [], + "out": [ + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/e058af74-abc7-453f-8aa6-93cd056c50e3" + } + ], "in": [ { - "predicate": "studies_species", - "source": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608" + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/35e3244e-6533-49e7-b63a-3619d2cf18dc" + }, + { + "predicate": "part_of_org", + "source": "https://brain-bbqs.org/id/7117c8b9-6d2f-4737-9490-09934fd89aeb" } ], "dangling": [], - "degree": 1, + "degree": 3, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/8e67d548-47b3-4b48-9a70-e5e22c56f062", - "class": "Standard", - "label": "Psych-DS: A FAIR data standard for behavioral datasets", + "id": "https://brain-bbqs.org/id/32f14ee1-e0b4-4753-869a-f630f1786682", + "class": "ResearchOrganization", + "label": "UNIVERSITY OF CALIFORNIA LOS ANGELES", "facts": { - "award_numbers": [ - "RF1MH132747" - ], - "description": [ - "Summary:\nBehavioral data is central to biomedical research, including both synchronous measures (e.g. brain activation\nand button-presses from a reading task in an fMRI scan), and those performed independently (e.g. a literacy\nquestionnaire.) Compared to neurophysiology and brain imaging data, behavioral data is often relatively small,\nwith file sizes in the megabytes rather than terabytes for both experimental scripts and resulting datasets. The\nkey challenge for behavioral data is not size but" - ], "name": [ - "Psych-DS: A FAIR data standard for behavioral datasets" + "UNIVERSITY OF CALIFORNIA LOS ANGELES" ] }, - "out": [], + "out": [ + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/1a33a814-fbd1-4acf-bc5d-f0077bc180d1" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/5fd6169e-d169-41be-8cd0-e8a691f0b345" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/68fe4ee2-5beb-4a6e-ac58-2d31ad350cfd" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/b050adf2-88b1-42e2-912b-2843d5b96854" + }, + { + "predicate": "members", + "target": "https://brain-bbqs.org/id/e6996650-b858-4ddb-b422-4fd92fdfaac4" + } + ], "in": [], "dangling": [], - "degree": 0, - "flags": [ - "isolated" - ], + "degree": 5, + "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40", - "class": "WorkingGroup", - "label": "WG-Analytics", + "id": "https://brain-bbqs.org/id/d2821755-977a-46a2-a089-169f6e66aeea", + "class": "ResearchOrganization", + "label": "UNIVERSITY OF CALIFORNIA, SAN DIEGO", "facts": { "name": [ - "WG-Analytics" + "UNIVERSITY OF CALIFORNIA, SAN DIEGO" ] }, - "out": [], - "in": [ + "out": [ { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/196ba606-dec6-4863-876e-907559234c80" + "predicate": "members", + "target": "https://brain-bbqs.org/id/7a2ad901-f50d-40bc-a404-b4ef0c33944b" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/98076d7b-270f-4a2a-af91-53d1b7644c90" - }, + "predicate": "members", + "target": "https://brain-bbqs.org/id/c520d01a-3746-4f7d-baff-ad1dab70e1b3" + } + ], + "in": [], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/622f970b-e529-441d-b5f3-739025a38aa9", + "class": "ResearchOrganization", + "label": "UNIVERSITY OF FLORIDA", + "facts": { + "name": [ + "UNIVERSITY OF FLORIDA" + ] + }, + "out": [ { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/60b6dd1c-dbb1-46e3-9a33-abc7aca65a8a" + "predicate": "members", + "target": "https://brain-bbqs.org/id/0f0ad5c2-496b-42a8-91b7-b798742bcdc3" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/3576ac45-d083-4c4c-84c0-04a44227dc2b" + "predicate": "members", + "target": "https://brain-bbqs.org/id/25a4f79c-6020-4074-b501-0114a205175f" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/8fa8009e-d4af-4b39-b0e5-7efed3696a4c" + "predicate": "members", + "target": "https://brain-bbqs.org/id/28aec8d8-5202-4574-9a96-b01ddb53aeb4" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/4626de5c-667e-4f70-be3e-44dffde3887b" + "predicate": "members", + "target": "https://brain-bbqs.org/id/2dd8fea9-363a-43da-8bd1-6ae4674c60b9" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/79d8d638-23c0-490f-8044-dbe06e0f63b5" - }, + "predicate": "members", + "target": "https://brain-bbqs.org/id/8d6214d3-a2d9-40c2-8cf6-f5e0d0e6afa9" + } + ], + "in": [], + "dangling": [], + "degree": 5, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/8f896b71-c64d-4041-9f33-f3477caf8b74", + "class": "ResearchOrganization", + "label": "UNIVERSITY OF MEMPHIS", + "facts": { + "name": [ + "UNIVERSITY OF MEMPHIS" + ] + }, + "out": [ { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/e03557cc-99aa-4b15-8786-bde9a5253fd1" - }, + "predicate": "members", + "target": "https://brain-bbqs.org/id/b050adf2-88b1-42e2-912b-2843d5b96854" + } + ], + "in": [], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/1c181fed-73e8-46be-8d27-198f64e936ea", + "class": "ResearchOrganization", + "label": "UNIVERSITY OF MICHIGAN AT ANN ARBOR", + "facts": { + "name": [ + "UNIVERSITY OF MICHIGAN AT ANN ARBOR" + ] + }, + "out": [ { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/0ded1b71-e572-475b-8457-bf370ed6335f" + "predicate": "members", + "target": "https://brain-bbqs.org/id/22edcc49-fd41-4423-92b6-89e7abba292d" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/6cedc563-ca67-467e-9c98-48b5b67123de" + "predicate": "members", + "target": "https://brain-bbqs.org/id/d3cae382-1e79-42c1-8f37-75cd049d0ff6" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/5cac268b-ef4e-4b85-8a9b-9f968992dfe7" - }, + "predicate": "members", + "target": "https://brain-bbqs.org/id/fa291a57-48b1-4ad1-87da-4a04a01787e8" + } + ], + "in": [], + "dangling": [], + "degree": 3, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/7848212f-5c1c-4170-bdad-44cc3273d0f1", + "class": "ResearchOrganization", + "label": "UNIVERSITY OF MINNESOTA", + "facts": { + "name": [ + "UNIVERSITY OF MINNESOTA" + ] + }, + "out": [ { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/a72c6169-713d-49ef-b9c2-4d9d05247473" - }, + "predicate": "members", + "target": "https://brain-bbqs.org/id/3d7564b9-e839-4737-874a-2e3b5319e11a" + } + ], + "in": [], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/29d3cb38-1cbb-43b7-baa6-f413d0a0bdad", + "class": "ResearchOrganization", + "label": "UNIVERSITY OF PENNSYLVANIA", + "facts": { + "name": [ + "UNIVERSITY OF PENNSYLVANIA" + ] + }, + "out": [ { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/1f6fa922-b662-4325-aac7-cb622ac10ef3" + "predicate": "members", + "target": "https://brain-bbqs.org/id/3516554a-8253-4773-af22-a89b3ccb3267" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/e6996650-b858-4ddb-b422-4fd92fdfaac4" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/41e042c3-81ad-486b-b933-bf77fcefd4f5" + "predicate": "members", + "target": "https://brain-bbqs.org/id/4626de5c-667e-4f70-be3e-44dffde3887b" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/de5929a1-5c9a-4f4f-8d0f-4cc0d040160f" + "predicate": "members", + "target": "https://brain-bbqs.org/id/5b057d86-6fdd-4b5e-b2ab-111360c5b537" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/af80d437-679c-42d0-aeed-fc7129b8a7b7" + "predicate": "members", + "target": "https://brain-bbqs.org/id/623a564c-f5bf-4d95-a233-027850148145" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/709c64f2-d02c-48f9-b286-b9222a106f27" + "predicate": "members", + "target": "https://brain-bbqs.org/id/639e73b5-6a6d-46f1-82a8-b466d7e3bdbb" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/0f8bad99-d648-46e7-97cc-a669746511ee" + "predicate": "members", + "target": "https://brain-bbqs.org/id/8e52b630-7ecc-4336-9f31-d0b6a1c85100" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/d69b71df-b5e8-490c-8df0-5a7883fac0d5" + "predicate": "members", + "target": "https://brain-bbqs.org/id/961fb77d-16c1-4efd-9fc7-ac7bd552c983" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/25f1bccb-0c04-4e0e-8951-ac2620fb969c" + "predicate": "members", + "target": "https://brain-bbqs.org/id/98076d7b-270f-4a2a-af91-53d1b7644c90" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/4543ce04-8f6e-4713-8fa7-2552664e28ae" + "predicate": "members", + "target": "https://brain-bbqs.org/id/9fd2cbaa-449d-4c9d-bcbb-b627f245cbf3" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/40f7a980-ec6a-4278-82f7-b7ea3601ce40" + "predicate": "members", + "target": "https://brain-bbqs.org/id/b2e8b421-674b-4e2d-8b61-f1e4a005c4f4" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/cf033709-106e-4288-a326-f7bb353ba0a4" + "predicate": "members", + "target": "https://brain-bbqs.org/id/dd96356c-60d7-4a65-9be7-7a622de4287d" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/f34a38e7-364a-4091-8436-a8c52b684cc2" + "predicate": "members", + "target": "https://brain-bbqs.org/id/e0179c68-8fe6-48ca-9140-84a567b5f661" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/93a3260d-e267-451b-9960-06cc9ae3a40c" + "predicate": "members", + "target": "https://brain-bbqs.org/id/e3335c53-2c38-444e-aff5-43a4268c97bf" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/bcdcd220-fa82-47d4-9c1b-7a8da03dadd8" + "predicate": "members", + "target": "https://brain-bbqs.org/id/eaa38acf-84a1-44ce-a1c6-eda307583731" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/eaa38acf-84a1-44ce-a1c6-eda307583731" - }, + "predicate": "members", + "target": "https://brain-bbqs.org/id/fedfc5af-eb8e-4ee5-88e7-a18ab2f00b26" + } + ], + "in": [], + "dangling": [], + "degree": 15, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/e46a4832-3f63-49d7-acad-8567ed641589", + "class": "ResearchOrganization", + "label": "UNIVERSITY OF PITTSBURGH AT PITTSBURGH", + "facts": { + "name": [ + "UNIVERSITY OF PITTSBURGH AT PITTSBURGH" + ] + }, + "out": [ { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/2fb1cdc9-28b2-4709-adf4-c914a44e042d" + "predicate": "members", + "target": "https://brain-bbqs.org/id/0a076358-2298-4693-b3cf-d75114552163" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/1962a240-a592-484c-b812-122a5dad2951" + "predicate": "members", + "target": "https://brain-bbqs.org/id/9a233497-f3cd-4888-b5b6-a83630e5f1ee" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/77aecb31-a637-4d08-9a35-e72ea6a46fe5" + "predicate": "members", + "target": "https://brain-bbqs.org/id/dc09061c-41ce-4e6e-bfe9-5e4805b4356c" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/3161638e-fa1b-4af1-a998-a34139b2a0b1" - }, + "predicate": "members", + "target": "https://brain-bbqs.org/id/f4d7cfd7-30aa-4f19-8601-f85f9689884a" + } + ], + "in": [], + "dangling": [], + "degree": 4, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/180457cc-1c85-4ee9-a13c-7fc8023528c3", + "class": "ResearchOrganization", + "label": "UNIVERSITY OF SOUTHERN CALIFORNIA", + "facts": { + "name": [ + "UNIVERSITY OF SOUTHERN CALIFORNIA" + ] + }, + "out": [ { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/6f2586d0-5743-4ab9-83b6-915ffa98736a" - }, + "predicate": "members", + "target": "https://brain-bbqs.org/id/d69b71df-b5e8-490c-8df0-5a7883fac0d5" + } + ], + "in": [], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/dfbfe6e3-bfae-4813-af08-0ded1cc2a3e9", + "class": "ResearchOrganization", + "label": "University of Washington", + "facts": { + "name": [ + "University of Washington" + ] + }, + "out": [ { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/a7318228-623e-4f94-a7e6-5e3fed968e1a" + "predicate": "members", + "target": "https://brain-bbqs.org/id/85a49b85-44ff-4f85-a110-c3860bfe6747" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/9a233497-f3cd-4888-b5b6-a83630e5f1ee" - }, + "predicate": "members", + "target": "https://brain-bbqs.org/id/cbb1fcfa-0a1d-432d-a4bb-a325516b6594" + } + ], + "in": [], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/da6f9584-5487-4fe8-a9ed-462fface8db2", + "class": "ResearchOrganization", + "label": "UTAH STATE HIGHER EDUCATION SYSTEM--UNIVERSITY OF UTAH", + "facts": { + "name": [ + "UTAH STATE HIGHER EDUCATION SYSTEM--UNIVERSITY OF UTAH" + ] + }, + "out": [ { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/f4d7cfd7-30aa-4f19-8601-f85f9689884a" - }, + "predicate": "members", + "target": "https://brain-bbqs.org/id/77aecb31-a637-4d08-9a35-e72ea6a46fe5" + } + ], + "in": [], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/e5044d9f-fe07-4a69-a9c3-7aecc245b941", + "class": "ResearchOrganization", + "label": "YALE UNIVERSITY", + "facts": { + "name": [ + "YALE UNIVERSITY" + ] + }, + "out": [ { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/732f511e-4b61-412b-b54d-9c8dbd93c273" + "predicate": "members", + "target": "https://brain-bbqs.org/id/0da76ce9-654a-4940-a9c6-d0785167ebad" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/13ccc90e-b105-48b2-8590-4804cd2b5f54" + "predicate": "members", + "target": "https://brain-bbqs.org/id/0f0ad5c2-496b-42a8-91b7-b798742bcdc3" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/81d6f976-8ae2-4e38-853a-9e0fe8ac7839" + "predicate": "members", + "target": "https://brain-bbqs.org/id/0fd7e9bf-a1c2-48ba-b235-75cee07f2fc2" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/c140b518-3ea9-4cad-a8b2-c7b30385589b" + "predicate": "members", + "target": "https://brain-bbqs.org/id/1b1f912c-a054-4bd1-a6b8-748f902e53f4" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/32937527-a5e9-4a99-84c0-719435f25f8b" + "predicate": "members", + "target": "https://brain-bbqs.org/id/1cfe15ec-b6a7-4534-b69d-79bb63b341b6" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/f33c9c03-f685-4166-b0bf-9ce704b5fa78" + "predicate": "members", + "target": "https://brain-bbqs.org/id/27d7f30b-e152-4999-a63e-8dd4e800f3bc" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/88203e28-70c5-4730-af2d-93d7f09b4250" + "predicate": "members", + "target": "https://brain-bbqs.org/id/5835b3d1-bdaf-4f30-a9e7-cf70d1861b61" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/9095f7a2-0d1a-4ac7-9cdd-12f28dbe42ea" + "predicate": "members", + "target": "https://brain-bbqs.org/id/67f260ea-2946-4086-9111-c926fb4e6df7" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/bf6867b2-09d3-4cc3-89ba-b931b646cd42" + "predicate": "members", + "target": "https://brain-bbqs.org/id/6cedc563-ca67-467e-9c98-48b5b67123de" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/00618660-a724-4059-85c1-c6ca3ccc1744" + "predicate": "members", + "target": "https://brain-bbqs.org/id/7a5a1c11-f5f8-4643-b444-71228b1f298a" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/c3989bae-203d-43b6-8f09-90935634f1d2" + "predicate": "members", + "target": "https://brain-bbqs.org/id/864e9b52-4173-4b92-bd81-d0bc6a7fc3cb" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/0410e3c0-a5b5-4f3f-a0e0-2dc7e71c2d18" + "predicate": "members", + "target": "https://brain-bbqs.org/id/924e4ef8-ee41-480e-9d33-9807b471878d" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/924e4ef8-ee41-480e-9d33-9807b471878d" + "predicate": "members", + "target": "https://brain-bbqs.org/id/a72c6169-713d-49ef-b9c2-4d9d05247473" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/7db5db3c-9f1f-4e01-a942-e05c340cbd8e" + "predicate": "members", + "target": "https://brain-bbqs.org/id/aa69dcd5-bd16-40ef-909e-3f2985d66c65" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/40d5a0bc-769a-4450-9355-d561ff9494eb" + "predicate": "members", + "target": "https://brain-bbqs.org/id/ace580b9-6f04-457f-aac0-3ac3a7243e3b" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/6119344c-d2da-45d1-8d69-ea22d8859dd3" + "predicate": "members", + "target": "https://brain-bbqs.org/id/b1b421fc-5477-4c2f-8968-ab757344ab2d" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/831a48e1-025d-499a-bf11-83d05285ed4b" + "predicate": "members", + "target": "https://brain-bbqs.org/id/def6d629-21cc-431c-8cab-0327f97ee138" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/82e9264e-8bec-4d1e-ab39-9e42f8f5384d" + "predicate": "members", + "target": "https://brain-bbqs.org/id/e8c0da8f-2dbb-442f-9831-4271dda9dda9" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/ddf3df70-64df-4112-822c-1ebf2bb895e0" + "predicate": "members", + "target": "https://brain-bbqs.org/id/ea2dc7bf-af90-460d-9823-45e9407b6bb8" }, { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/6d29e182-e1cd-43d5-9f95-7cfef6ff9396" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/a6f825d6-cb5c-4136-9208-eee059bf6f49" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/f0d2d9d0-b5e5-4f52-a40d-0d5a06229b14" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/9045540f-6ba2-4b95-bc69-98527f947a27" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/24981995-2cd1-407a-9d2c-0f89f026edeb" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/09865181-38c6-44d9-aba4-68e373f0286d" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/0a39ab50-9241-4b17-b6d4-77d5ac81e519" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/22edcc49-fd41-4423-92b6-89e7abba292d" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/e6fb5750-5310-4d85-8beb-4cc8addbd988" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/afe5dc6f-8e97-48c9-bb79-5af130f1e62a" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/a82b872c-fb47-43ba-9d01-258026913f06" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/4f18ae48-4099-486d-8e89-1a8a736e59e4" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/8c977c24-da2f-4866-b860-b71aa2540bd4" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/538a6b26-2685-4ea8-9f0d-91ae90693108" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/9fb13eb4-a3bc-483a-9969-f3908d13143d" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/5835b3d1-bdaf-4f30-a9e7-cf70d1861b61" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/bab963f7-54f8-4b01-a914-de675535b004" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/be8d825d-140a-4d72-a39a-2534cf2b4145" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/4cd9c282-4677-471a-81c0-aa97d94a687e" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/b050adf2-88b1-42e2-912b-2843d5b96854" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/ab51c79a-9096-4c6b-9724-ae605b7ffae2" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/fa291a57-48b1-4ad1-87da-4a04a01787e8" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/8694fef3-33b8-491f-a806-7d0c8b5a60bf" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/7a5a1c11-f5f8-4643-b444-71228b1f298a" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/2984e917-2448-4596-9648-b52dc92b2c5d" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/ea29a939-e638-4a3c-8d28-1edda890490a" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/4b90a4f4-0010-4b31-8adb-db169e15a70a" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/0b1dab3b-4478-4149-a41a-72cf69d47788" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/f2372c9c-91ac-449f-8ae8-182327e93a85" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/f088160e-1dea-4cb9-b73f-1c30d0e40053" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/dfbc5c5d-f4a9-4b08-8454-321df0c98e18" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/d0f582a1-20fd-43ca-a9f1-21bf0ee548c1" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/783ff194-17e8-46d9-bd1f-57ca4070a90c" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/57f1a4fe-523b-4963-b6e6-a38c7da47500" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/5f18877b-67fd-4779-be9a-d859314e0b4a" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/b2b7ce80-8dbf-4cf8-804c-9daebe9a9fa5" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/2634f607-be46-4d8d-baae-6ec0d66a5436" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/ee077b61-eb2c-4cd9-b587-a46418c45265" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/d303b6df-88e0-4e0d-88f6-46b3d45c1ea4" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/67f260ea-2946-4086-9111-c926fb4e6df7" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/3be55dd2-fe02-418e-a97b-aa223e988663" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/e0d25d6e-4879-436d-980f-e690e3e5a937" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/e729b65b-8a22-4dc9-9d4d-d525f33f778f" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/f1ff44d0-aff1-4a53-91e6-7a6b64aa0af0" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/3d87d6b0-c802-4610-813b-86b94e3e76d6" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/0823bcd5-786e-4d68-91b0-95bdec0b5d37" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/fe4790d5-bf32-469d-b098-cb4f44f6fa19" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/1b3e8304-f2d6-4ed6-aa5c-7d49ca278344" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/e058af74-abc7-453f-8aa6-93cd056c50e3" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/8e52b630-7ecc-4336-9f31-d0b6a1c85100" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/ffac8b9d-1a4c-4b02-ad6d-3cd1fd2d4980" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/397816f1-2188-4817-af29-e7aa82ef1afb" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/5f8ac3c4-a0fb-44d6-ae2d-b505816d4141" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/6450030e-c137-4842-8bae-8d6dd913c50b" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/fedfc5af-eb8e-4ee5-88e7-a18ab2f00b26" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/189027bf-98cc-4173-8571-06759988ff2b" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/7eb2abf1-f38f-4693-afb6-9313f96d2ff4" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/c6056429-1e03-4506-8484-5be9acff8170" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/0da76ce9-654a-4940-a9c6-d0785167ebad" + "predicate": "members", + "target": "https://brain-bbqs.org/id/f6fd8ef2-e06f-4f72-bfc9-4464947fc0b9" } ], + "in": [], "dangling": [], - "degree": 114, + "degree": 20, "flags": [], "violations": [] }, { - "id": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604", - "class": "WorkingGroup", - "label": "WG-Devices", + "id": "https://brain-bbqs.org/id/92768805-b266-42bc-90a6-adb1029ebde2", + "class": "SoftwareTool", + "label": "Anipose", "facts": { + "description": [ + "3D pose estimation from multi-camera views" + ], + "external_url": [ + "https://anipose.readthedocs.io/" + ], + "language": [ + "Python" + ], "name": [ - "WG-Devices" + "Anipose" + ], + "repo_url": [ + "https://anipose.readthedocs.io/" ] }, "out": [], - "in": [ + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/bb9dc9ee-cda3-4d2a-a016-1a0aa705bdec", + "class": "SoftwareTool", + "label": "BENTO", + "facts": { + "description": [ + "Multimodal data synchronization and visualization for neurobehavioral analysis" + ], + "external_url": [ + "https://github.com/annkennedy/bento" + ], + "language": [ + "MATLAB" + ], + "name": [ + "BENTO" + ], + "repo_url": [ + "https://github.com/annkennedy/bento" + ] + }, + "out": [], + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/38d4f5ae-7854-42cc-ad36-77a89e6205bf", + "class": "SoftwareTool", + "label": "Bonsai", + "facts": { + "description": [ + "Real-time heterogeneous data stream synchronization and processing" + ], + "external_url": [ + "https://bonsai-rx.org/" + ], + "language": [ + ".NET" + ], + "name": [ + "Bonsai" + ], + "repo_url": [ + "https://bonsai-rx.org/" + ] + }, + "out": [], + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/4009a1f6-c173-495b-9725-bb51571a3cdf", + "class": "SoftwareTool", + "label": "DeepLabCut", + "facts": { + "description": [ + "Markerless pose estimation of user-defined body parts across species" + ], + "external_url": [ + "https://deeplabcut.github.io/DeepLabCut/" + ], + "language": [ + "Python" + ], + "name": [ + "DeepLabCut" + ], + "repo_url": [ + "https://deeplabcut.github.io/DeepLabCut/" + ] + }, + "out": [], + "in": [ + { + "predicate": "evaluates", + "source": "https://brain-bbqs.org/id/b9f28848-dd76-4bf7-9fd6-a4d1509154eb" + } + ], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/c7d588c7-1778-4d8c-b7f6-03d8060463fb", + "class": "SoftwareTool", + "label": "DeepPoseKit", + "facts": { + "description": [ + "Animal pose estimation from video" + ], + "external_url": [ + "https://github.com/jgraving/DeepPoseKit" + ], + "language": [ + "Python" + ], + "name": [ + "DeepPoseKit" + ], + "repo_url": [ + "https://github.com/jgraving/DeepPoseKit" + ] + }, + "out": [], + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/5370de26-7bb9-4adb-8ba9-43d30ce5c78a", + "class": "SoftwareTool", + "label": "DeepSqueak", + "facts": { + "description": [ + "Ultrasonic vocalization (USV) detection and analysis in rodents" + ], + "external_url": [ + "https://github.com/DrCoffey/DeepSqueak" + ], + "language": [ + "MATLAB" + ], + "name": [ + "DeepSqueak" + ], + "repo_url": [ + "https://github.com/DrCoffey/DeepSqueak" + ] + }, + "out": [], + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/2759fdf8-4690-4aea-b5d6-3a44bd3270e4", + "class": "SoftwareTool", + "label": "Dynestyx", + "facts": { + "description": [ + "Bayesian modeling and inference of dynamical systems from real-world data" + ], + "external_url": [ + "https://basisresearch.github.io/dynestyx" + ], + "name": [ + "Dynestyx" + ] + }, + "out": [], + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/d07c77d3-110d-43dd-bfe3-51535e38ae71", + "class": "SoftwareTool", + "label": "fastplotlib", + "facts": { + "description": [ + "Open source GPU-accelerated scientific plotting library built on next-gen wgpu & pygfx technologies. Enables fast and interactive visualization of large-scale high-dimensional & multi-modal neural data, integrating into every step of the analysis pipeline — from real-time data acquisition, calcium imaging, multi-electrode electrophysiology recordings, and behavior analysis. Supports human-in-the-loop analysis systems for data processing and model exploration." + ], + "external_url": [ + "https://github.com/fastplotlib/fastplotlib" + ], + "language": [ + "Python" + ], + "name": [ + "fastplotlib" + ], + "repo_url": [ + "https://github.com/fastplotlib/fastplotlib" + ], + "software_license": [ + "Open Source" + ] + }, + "out": [], + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/0ab38ea2-777f-4cb2-af86-77491c07a3bb", + "class": "SoftwareTool", + "label": "idtracker.ai", + "facts": { + "description": [ + "Multi-animal identity tracking and maintenance across video recordings" + ], + "external_url": [ + "https://idtracker.ai/latest/" + ], + "language": [ + "Python" + ], + "name": [ + "idtracker.ai" + ], + "repo_url": [ + "https://idtracker.ai/latest/" + ] + }, + "out": [], + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/e6bf3fa7-714c-43a8-9676-3cef1b1da171", + "class": "SoftwareTool", + "label": "JAABA", + "facts": { + "description": [ + "Automated behavior classification from video features" + ], + "external_url": [ + "https://jaaba.sourceforge.net/" + ], + "language": [ + "MATLAB" + ], + "name": [ + "JAABA" + ], + "repo_url": [ + "https://jaaba.sourceforge.net/" + ] + }, + "out": [], + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/e611ba01-166e-44ed-8005-979e29dee9ed", + "class": "SoftwareTool", + "label": "LabStreamingLayer", + "facts": { + "description": [ + "Multi-source data streaming and temporal synchronization" + ], + "external_url": [ + "https://labstreaminglayer.org/" + ], + "language": [ + "C++" + ], + "name": [ + "LabStreamingLayer" + ], + "repo_url": [ + "https://labstreaminglayer.org/" + ] + }, + "out": [], + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/3ba48c59-bb79-44ef-8569-ca644775d73a", + "class": "SoftwareTool", + "label": "Lightning Pose", + "facts": { + "description": [ + "Markerless pose estimation tool for neuroscience, published in Nature Methods (2024). Supports single-view and multi-view, single-animal pose estimation with a GUI for multi-view labeling. Developed by Liam Paninski's lab at Columbia University Zuckerman Institute, Center for Theoretical Neuroscience. 280+ GitHub stars." + ], + "docs_url": [ + "https://lightning-pose.readthedocs.io/" + ], + "external_url": [ + "https://github.com/paninski-lab/lightning-pose" + ], + "language": [ + "Python" + ], + "name": [ + "Lightning Pose" + ], + "repo_url": [ + "https://github.com/paninski-lab/lightning-pose" + ], + "software_license": [ + "Open Source" + ] + }, + "out": [ + { + "predicate": "part_of_org", + "target": "https://brain-bbqs.org/id/9f75488b-59d0-4d50-b7db-869f26066743" + } + ], + "in": [], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/693dd13f-6181-46e2-9d89-956c8fd3c78e", + "class": "SoftwareTool", + "label": "MARS", + "facts": { + "description": [ + "Automated social behavior classification in mouse pairs" + ], + "external_url": [ + "https://github.com/neuroethology/MARS" + ], + "language": [ + "Python" + ], + "name": [ + "MARS" + ], + "repo_url": [ + "https://github.com/neuroethology/MARS" + ] + }, + "out": [], + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/b2f1e74e-20e6-4a73-a04c-37339768e70f", + "class": "SoftwareTool", + "label": "MoSeq", + "facts": { + "description": [ + "Unsupervised behavioral segmentation into reusable action syllables" + ], + "external_url": [ + "https://dattalab.github.io/moseq2-website/" + ], + "language": [ + "Python" + ], + "name": [ + "MoSeq" + ], + "repo_url": [ + "https://dattalab.github.io/moseq2-website/" + ] + }, + "out": [], + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/bea2a223-4980-44da-b8da-807ac4301bc6", + "class": "SoftwareTool", + "label": "Open Ephys", + "facts": { + "description": [ + "Electrophysiology data acquisition and real-time processing" + ], + "external_url": [ + "https://open-ephys.org/" + ], + "language": [ + "C++" + ], + "name": [ + "Open Ephys" + ], + "repo_url": [ + "https://open-ephys.org/" + ] + }, + "out": [], + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/d38cd5f0-0429-4fc0-a9e3-06039719e581", + "class": "SoftwareTool", + "label": "OpenFace", + "facts": { + "description": [ + "Facial behavior analysis: landmarks, head pose, gaze, action units" + ], + "external_url": [ + "https://github.com/TadasBaltrusaitis/OpenFace" + ], + "language": [ + "C++" + ], + "name": [ + "OpenFace" + ], + "repo_url": [ + "https://github.com/TadasBaltrusaitis/OpenFace" + ] + }, + "out": [], + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/529a7b7d-e25c-4d71-b61a-05733ab55f08", + "class": "SoftwareTool", + "label": "OpenPose", + "facts": { + "description": [ + "Real-time multi-person 2D pose estimation (body, hands, face)" + ], + "external_url": [ + "https://github.com/CMU-Perceptual-Computing-Lab/openpose" + ], + "language": [ + "C++" + ], + "name": [ + "OpenPose" + ], + "repo_url": [ + "https://github.com/CMU-Perceptual-Computing-Lab/openpose" + ] + }, + "out": [], + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/c6be2ee8-73b8-412e-8331-4eac1f2937de", + "class": "SoftwareTool", + "label": "senselab", + "facts": { + "description": [ + "Python package for processing and analyzing behavioral data — primarily voice and speech, also text and video — through reproducible pipelines: speech-to-text, speaker diarization and verification, speech enhancement, acoustic feature extraction, and forced alignment." + ], + "name": [ + "senselab" + ] + }, + "out": [], + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/c7ddfa55-b28b-4143-a94f-ebddaf38bd77", + "class": "SoftwareTool", + "label": "SimBA", + "facts": { + "description": [ + "Supervised behavioral classification from pose data" + ], + "external_url": [ + "https://github.com/sgoldenlab/simba" + ], + "language": [ + "Python" + ], + "name": [ + "SimBA" + ], + "repo_url": [ + "https://github.com/sgoldenlab/simba" + ] + }, + "out": [], + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/340ce805-e6f8-454a-bb4b-83ef53e0d444", + "class": "SoftwareTool", + "label": "SLEAP", + "facts": { + "description": [ + "Multi-animal pose tracking without markers" + ], + "external_url": [ + "https://sleap.ai/" + ], + "language": [ + "Python" + ], + "name": [ + "SLEAP" + ], + "repo_url": [ + "https://sleap.ai/" + ] + }, + "out": [], + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/8c8402e7-5b64-4903-957e-8c7f3548512d", + "class": "SoftwareTool", + "label": "SSL (rodent USV detection & segmentation)", + "facts": { + "description": [ + "Detects and segments rodent ultrasonic vocalizations from multi-channel audio and compares detection methods against user annotation" + ], + "external_url": [ + "https://github.com/tianxiao18/ssl" + ], + "name": [ + "SSL (rodent USV detection & segmentation)" + ] + }, + "out": [], + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/515ee9e5-9453-4797-8017-f55c6dd7f1f7", + "class": "SoftwareTool", + "label": "Vocalocator", + "facts": { + "description": [ + "Deep neural networks for sound source localization and vocalization attribution in rodents, from multi-channel audio" + ], + "external_url": [ + "https://github.com/neurostatslab/vocalocator" + ], + "name": [ + "Vocalocator" + ] + }, + "out": [], + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/16b2b3ec-077a-4101-9a4a-0f85f06b984e", + "class": "SoftwareTool", + "label": "Vocalocator-SSL", + "facts": { + "description": [ + "Weakly supervised training and calibration framework that attributes each vocalization to an individual animal, using multi-channel audio aligned with keypoint tracks of freely interacting groups" + ], + "external_url": [ + "https://github.com/Aramist/vocalocator-ssl" + ], + "name": [ + "Vocalocator-SSL" + ] + }, + "out": [], + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/5a248695-86a9-44ac-b923-a3050572afba", + "class": "Species", + "label": "Brown Rat", + "facts": { + "aliases": [ + "Norway rat", + "Rattus norvegicus", + "rat", + "rattus norvegicus" + ], + "common_name": [ + "Brown Rat" + ], + "name": [ + "Brown Rat" + ], + "taxonomy_class": [ + "Mammalia" + ] + }, + "out": [], + "in": [ + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/4f2619b1-a6a4-48e5-b21a-0f5455354ea9" + } + ], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/77f3b242-4db9-4080-843c-d868a6d4f465", + "class": "Species", + "label": "Brown-headed Cowbird", + "facts": { + "aliases": [ + "Molothrus ater", + "brown-headed cowbird", + "molothrus ater" + ], + "common_name": [ + "Brown-headed Cowbird" + ], + "name": [ + "Brown-headed Cowbird" + ], + "taxonomy_class": [ + "Aves" + ] + }, + "out": [], + "in": [ + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/e285ab2b-1a7d-4b2e-9400-b24d6faff6de" + } + ], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/7b2f0bde-f010-4315-b856-c217e8ca7788", + "class": "Species", + "label": "Cichlid Fish", + "facts": { + "aliases": [ + "Cichlidae", + "cichlid fish", + "cichlidae" + ], + "common_name": [ + "Cichlid Fish" + ], + "name": [ + "Cichlid Fish" + ], + "taxonomy_class": [ + "Actinopterygii" + ] + }, + "out": [], + "in": [ + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/e5bb6e4f-d3cf-44d4-ac1a-59f76724c0d2" + } + ], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/bef479f9-d7a4-472b-8ff7-eb0b098beb7c", + "class": "Species", + "label": "Common Marmoset", + "facts": { + "aliases": [ + "Callithrix jacchus", + "common marmoset", + "marmoset", + "marmosets" + ], + "common_name": [ + "Common Marmoset" + ], + "name": [ + "Common Marmoset" + ], + "taxonomy_class": [ + "Mammalia" + ] + }, + "out": [], + "in": [ + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/1e2423ff-965b-4485-8557-797c1e1dee38" + } + ], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/34318c67-9a08-4465-8859-5ded31edb62e", + "class": "Species", + "label": "Cricket", + "facts": { + "common_name": [ + "Cricket" + ], + "name": [ + "Cricket" + ], + "taxonomy_class": [ + "Insecta" + ] + }, + "out": [], + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/311017ec-9209-4d63-95fb-1967bc8a81b7", + "class": "Species", + "label": "Domestic Ferret", + "facts": { + "aliases": [ + "Mustela putorius furo", + "domestic ferret", + "ferret", + "ferrets" + ], + "common_name": [ + "Domestic Ferret" + ], + "name": [ + "Domestic Ferret" + ], + "taxonomy_class": [ + "Mammalia" + ] + }, + "out": [], + "in": [ + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0" + } + ], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/ec95cd91-709c-41ac-8bfb-bfdf3e2ea89c", + "class": "Species", + "label": "Domestic Sheep", + "facts": { + "aliases": [ + "Ovis aries", + "domestic sheep", + "ovis aries" + ], + "common_name": [ + "Domestic Sheep" + ], + "name": [ + "Domestic Sheep" + ], + "taxonomy_class": [ + "Mammalia" + ] + }, + "out": [], + "in": [ + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/3846417f-c783-484b-9cfc-fbbf8f83fdf5" + } + ], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/436525a6-acbf-4066-ac75-82845a8db8cc", + "class": "Species", + "label": "Fruit Fly", + "facts": { + "aliases": [ + "Drosophila melanogaster", + "drosophila melanogaster", + "fruit fly" + ], + "common_name": [ + "Fruit Fly" + ], + "name": [ + "Fruit Fly" + ], + "taxonomy_class": [ + "Insecta" + ] + }, + "out": [], + "in": [ + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608" + } + ], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/d6fbdcc7-30d7-48ba-9c46-b70e227c59cf", + "class": "Species", + "label": "Hofstenia miamia", + "facts": { + "aliases": [ + "Hofstenia miamia", + "acoel flatworm", + "acoel worm", + "hofstenia miamia", + "panther worm" + ], + "common_name": [ + "panther worm" + ], + "description": [ + "Panther worm (acoel); studied in R34DA061984" + ], + "name": [ + "Hofstenia miamia" + ], + "taxonomy_class": [ + "Acoela" + ] + }, + "out": [], + "in": [ + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/ca25b66c-c03f-4d7e-90e8-93bc12fafeb1" + } + ], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/9f227f88-53ba-4c7c-91e7-334641e4b759", + "class": "Species", + "label": "House Mouse", + "facts": { + "aliases": [ + "Mus musculus", + "house mouse", + "mice", + "mouse", + "mus musculus" + ], + "common_name": [ + "House Mouse" + ], + "name": [ + "House Mouse" + ], + "taxonomy_class": [ + "Mammalia" + ] + }, + "out": [], + "in": [ + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e" + }, + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/1e1fc06b-fe5c-4ec2-9f64-474f98ae31e8" + }, + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/4f2619b1-a6a4-48e5-b21a-0f5455354ea9" + }, + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/2db5ee93-296a-446a-a3e6-59fd3d28c4a6" + }, + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/f294b0d9-175a-47c7-854c-d4d750009812" + }, + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7" + }, + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/bf3493c0-de28-4731-9baf-c976ccc7c484" + } + ], + "dangling": [], + "degree": 7, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/63464d21-4ef2-4405-a192-4b60e344ff40", + "class": "Species", + "label": "Human", + "facts": { + "aliases": [ + "Homo sapiens", + "homo sapiens", + "human", + "humans", + "humans (epilepsy patients)", + "humans (pediatric)" + ], + "common_name": [ + "Human" + ], + "name": [ + "Human" + ], + "taxonomy_class": [ + "Mammalia" + ] + }, + "out": [], + "in": [ + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/adc6c1dd-57a9-49bb-a57d-521fd1208a76" + }, + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/22e61529-38ba-465f-b38b-274e24160fb6" + }, + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/797fd7cf-49dc-40a2-811d-aeec94460ead" + }, + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/8095d361-d12f-4015-86e7-67fced46f2e9" + }, + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/80e226a5-f7e6-49d2-a64a-524940d498a5" + }, + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0" + }, + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae" + }, + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/4614269a-0d7f-4390-b4cc-568a09fa6a45" + }, + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/3352859e-5677-46dd-89d6-17c898b6f097" + }, + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/80db3a04-a9ad-486d-abf1-4b20f8370ff9" + }, + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/b02aaf9f-0a7e-4759-b1ba-cb100a2d4eed" + }, + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b" + }, + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/38289d36-f3a6-43e1-955b-db1d3d400cb2" + } + ], + "dangling": [], + "degree": 13, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/7f92ea75-530c-40bf-83a4-3e1eba4d4179", + "class": "Species", + "label": "Mongolian Gerbil", + "facts": { + "aliases": [ + "Meriones unguiculatus", + "Mongolian gerbil", + "gerbil", + "meriones unguiculatus" + ], + "common_name": [ + "Mongolian Gerbil" + ], + "name": [ + "Mongolian Gerbil" + ], + "taxonomy_class": [ + "Mammalia" + ] + }, + "out": [], + "in": [ + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/a98fe953-d2ad-4770-8c8c-1759f8500c4a" + }, + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18" + } + ], + "dangling": [], + "degree": 2, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/491ac537-b3f6-45b9-93f3-1249fd809ebc", + "class": "Species", + "label": "White-faced Capuchin", + "facts": { + "aliases": [ + "Cebus imitator", + "cebus imitator", + "white-faced capuchin" + ], + "common_name": [ + "White-faced Capuchin" + ], + "name": [ + "White-faced Capuchin" + ], + "taxonomy_class": [ + "Mammalia" + ] + }, + "out": [], + "in": [ + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/1573f2f2-dfe7-476f-ba44-55011c0f5d1b" + } + ], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/8e40951f-ace0-4470-ab0f-3dd6bc366c8b", + "class": "Species", + "label": "Zebrafish", + "facts": { + "aliases": [ + "Danio rerio", + "danio rerio", + "zebrafish" + ], + "common_name": [ + "Zebrafish" + ], + "name": [ + "Zebrafish" + ], + "taxonomy_class": [ + "Actinopterygii" + ] + }, + "out": [], + "in": [ + { + "predicate": "studies_species", + "source": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608" + } + ], + "dangling": [], + "degree": 1, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/8e67d548-47b3-4b48-9a70-e5e22c56f062", + "class": "Standard", + "label": "Psych-DS: A FAIR data standard for behavioral datasets", + "facts": { + "award_numbers": [ + "RF1MH132747" + ], + "description": [ + "Summary:\nBehavioral data is central to biomedical research, including both synchronous measures (e.g. brain activation\nand button-presses from a reading task in an fMRI scan), and those performed independently (e.g. a literacy\nquestionnaire.) Compared to neurophysiology and brain imaging data, behavioral data is often relatively small,\nwith file sizes in the megabytes rather than terabytes for both experimental scripts and resulting datasets. The\nkey challenge for behavioral data is not size but" + ], + "name": [ + "Psych-DS: A FAIR data standard for behavioral datasets" + ] + }, + "out": [], + "in": [], + "dangling": [], + "degree": 0, + "flags": [ + "isolated" + ], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/47cf050c-ab07-42fa-b251-d1fecc7ceb40", + "class": "WorkingGroup", + "label": "WG-Analytics", + "facts": { + "name": [ + "WG-Analytics" + ] + }, + "out": [], + "in": [ + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/a82b872c-fb47-43ba-9d01-258026913f06" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/88203e28-70c5-4730-af2d-93d7f09b4250" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/b2b7ce80-8dbf-4cf8-804c-9daebe9a9fa5" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/cf033709-106e-4288-a326-f7bb353ba0a4" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/e729b65b-8a22-4dc9-9d4d-d525f33f778f" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/f1ff44d0-aff1-4a53-91e6-7a6b64aa0af0" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/c6056429-1e03-4506-8484-5be9acff8170" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/732f511e-4b61-412b-b54d-9c8dbd93c273" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/2fb1cdc9-28b2-4709-adf4-c914a44e042d" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/538a6b26-2685-4ea8-9f0d-91ae90693108" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/0a39ab50-9241-4b17-b6d4-77d5ac81e519" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/0ded1b71-e572-475b-8457-bf370ed6335f" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/81d6f976-8ae2-4e38-853a-9e0fe8ac7839" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/eaa38acf-84a1-44ce-a1c6-eda307583731" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/831a48e1-025d-499a-bf11-83d05285ed4b" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/09865181-38c6-44d9-aba4-68e373f0286d" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/ddf3df70-64df-4112-822c-1ebf2bb895e0" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/ab51c79a-9096-4c6b-9724-ae605b7ffae2" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/60b6dd1c-dbb1-46e3-9a33-abc7aca65a8a" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/1f6fa922-b662-4325-aac7-cb622ac10ef3" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/709c64f2-d02c-48f9-b286-b9222a106f27" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/93a3260d-e267-451b-9960-06cc9ae3a40c" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/13ccc90e-b105-48b2-8590-4804cd2b5f54" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/1b3e8304-f2d6-4ed6-aa5c-7d49ca278344" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/de5929a1-5c9a-4f4f-8d0f-4cc0d040160f" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/40d5a0bc-769a-4450-9355-d561ff9494eb" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/4543ce04-8f6e-4713-8fa7-2552664e28ae" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/bab963f7-54f8-4b01-a914-de675535b004" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/40f7a980-ec6a-4278-82f7-b7ea3601ce40" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/ee077b61-eb2c-4cd9-b587-a46418c45265" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/fa291a57-48b1-4ad1-87da-4a04a01787e8" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/98076d7b-270f-4a2a-af91-53d1b7644c90" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/4626de5c-667e-4f70-be3e-44dffde3887b" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/0da76ce9-654a-4940-a9c6-d0785167ebad" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/0b1dab3b-4478-4149-a41a-72cf69d47788" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/1962a240-a592-484c-b812-122a5dad2951" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/fedfc5af-eb8e-4ee5-88e7-a18ab2f00b26" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/e058af74-abc7-453f-8aa6-93cd056c50e3" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/67f260ea-2946-4086-9111-c926fb4e6df7" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/6f2586d0-5743-4ab9-83b6-915ffa98736a" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/7a5a1c11-f5f8-4643-b444-71228b1f298a" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/6cedc563-ca67-467e-9c98-48b5b67123de" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/7db5db3c-9f1f-4e01-a942-e05c340cbd8e" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/9045540f-6ba2-4b95-bc69-98527f947a27" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/9a233497-f3cd-4888-b5b6-a83630e5f1ee" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/924e4ef8-ee41-480e-9d33-9807b471878d" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/4b90a4f4-0010-4b31-8adb-db169e15a70a" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/0f8bad99-d648-46e7-97cc-a669746511ee" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/a72c6169-713d-49ef-b9c2-4d9d05247473" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/f2372c9c-91ac-449f-8ae8-182327e93a85" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/5835b3d1-bdaf-4f30-a9e7-cf70d1861b61" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/4f18ae48-4099-486d-8e89-1a8a736e59e4" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/3576ac45-d083-4c4c-84c0-04a44227dc2b" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/24981995-2cd1-407a-9d2c-0f89f026edeb" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/fe4790d5-bf32-469d-b098-cb4f44f6fa19" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/c3989bae-203d-43b6-8f09-90935634f1d2" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/6450030e-c137-4842-8bae-8d6dd913c50b" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/783ff194-17e8-46d9-bd1f-57ca4070a90c" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/ffac8b9d-1a4c-4b02-ad6d-3cd1fd2d4980" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/f0d2d9d0-b5e5-4f52-a40d-0d5a06229b14" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/dfbc5c5d-f4a9-4b08-8454-321df0c98e18" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/41e042c3-81ad-486b-b933-bf77fcefd4f5" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/be8d825d-140a-4d72-a39a-2534cf2b4145" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/afe5dc6f-8e97-48c9-bb79-5af130f1e62a" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/3d87d6b0-c802-4610-813b-86b94e3e76d6" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/a6f825d6-cb5c-4136-9208-eee059bf6f49" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/f4d7cfd7-30aa-4f19-8601-f85f9689884a" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/0410e3c0-a5b5-4f3f-a0e0-2dc7e71c2d18" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/397816f1-2188-4817-af29-e7aa82ef1afb" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/3161638e-fa1b-4af1-a998-a34139b2a0b1" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/196ba606-dec6-4863-876e-907559234c80" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/8e52b630-7ecc-4336-9f31-d0b6a1c85100" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/b050adf2-88b1-42e2-912b-2843d5b96854" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/4cd9c282-4677-471a-81c0-aa97d94a687e" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/6d29e182-e1cd-43d5-9f95-7cfef6ff9396" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/9fb13eb4-a3bc-483a-9969-f3908d13143d" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/5f18877b-67fd-4779-be9a-d859314e0b4a" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/f33c9c03-f685-4166-b0bf-9ce704b5fa78" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/ea29a939-e638-4a3c-8d28-1edda890490a" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/2634f607-be46-4d8d-baae-6ec0d66a5436" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/32937527-a5e9-4a99-84c0-719435f25f8b" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/af80d437-679c-42d0-aeed-fc7129b8a7b7" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/e6996650-b858-4ddb-b422-4fd92fdfaac4" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/8694fef3-33b8-491f-a806-7d0c8b5a60bf" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/3be55dd2-fe02-418e-a97b-aa223e988663" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/a7318228-623e-4f94-a7e6-5e3fed968e1a" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/bf6867b2-09d3-4cc3-89ba-b931b646cd42" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/d303b6df-88e0-4e0d-88f6-46b3d45c1ea4" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/7eb2abf1-f38f-4693-afb6-9313f96d2ff4" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/25f1bccb-0c04-4e0e-8951-ac2620fb969c" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/2984e917-2448-4596-9648-b52dc92b2c5d" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/e0d25d6e-4879-436d-980f-e690e3e5a937" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/d0f582a1-20fd-43ca-a9f1-21bf0ee548c1" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/0823bcd5-786e-4d68-91b0-95bdec0b5d37" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/5cac268b-ef4e-4b85-8a9b-9f968992dfe7" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/e03557cc-99aa-4b15-8786-bde9a5253fd1" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/e6fb5750-5310-4d85-8beb-4cc8addbd988" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/f34a38e7-364a-4091-8436-a8c52b684cc2" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/8fa8009e-d4af-4b39-b0e5-7efed3696a4c" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/9095f7a2-0d1a-4ac7-9cdd-12f28dbe42ea" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/f088160e-1dea-4cb9-b73f-1c30d0e40053" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/57f1a4fe-523b-4963-b6e6-a38c7da47500" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/189027bf-98cc-4173-8571-06759988ff2b" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/5f8ac3c4-a0fb-44d6-ae2d-b505816d4141" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/82e9264e-8bec-4d1e-ab39-9e42f8f5384d" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/d69b71df-b5e8-490c-8df0-5a7883fac0d5" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/22edcc49-fd41-4423-92b6-89e7abba292d" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/79d8d638-23c0-490f-8044-dbe06e0f63b5" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/00618660-a724-4059-85c1-c6ca3ccc1744" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/8c977c24-da2f-4866-b860-b71aa2540bd4" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/bcdcd220-fa82-47d4-9c1b-7a8da03dadd8" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/c140b518-3ea9-4cad-a8b2-c7b30385589b" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/77aecb31-a637-4d08-9a35-e72ea6a46fe5" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/6119344c-d2da-45d1-8d69-ea22d8859dd3" + } + ], + "dangling": [], + "degree": 114, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/f340cdf9-cdfc-43f4-b18b-4d9fbebac604", + "class": "WorkingGroup", + "label": "WG-Devices", + "facts": { + "name": [ + "WG-Devices" + ] + }, + "out": [], + "in": [ + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/82e9264e-8bec-4d1e-ab39-9e42f8f5384d" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/e729b65b-8a22-4dc9-9d4d-d525f33f778f" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/f1ff44d0-aff1-4a53-91e6-7a6b64aa0af0" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/22edcc49-fd41-4423-92b6-89e7abba292d" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/2fb1cdc9-28b2-4709-adf4-c914a44e042d" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/0a39ab50-9241-4b17-b6d4-77d5ac81e519" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/7ef0ea15-6f36-4bca-8eee-626e9bf76254" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/b1b421fc-5477-4c2f-8968-ab757344ab2d" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/b2b7ce80-8dbf-4cf8-804c-9daebe9a9fa5" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/1b3e8304-f2d6-4ed6-aa5c-7d49ca278344" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/40f7a980-ec6a-4278-82f7-b7ea3601ce40" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/98076d7b-270f-4a2a-af91-53d1b7644c90" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/09865181-38c6-44d9-aba4-68e373f0286d" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/ddf3df70-64df-4112-822c-1ebf2bb895e0" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/ab51c79a-9096-4c6b-9724-ae605b7ffae2" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/b2c565ea-4b4a-4586-9543-e61df6570936" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/709c64f2-d02c-48f9-b286-b9222a106f27" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/de5929a1-5c9a-4f4f-8d0f-4cc0d040160f" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/4543ce04-8f6e-4713-8fa7-2552664e28ae" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/9fd2cbaa-449d-4c9d-bcbb-b627f245cbf3" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/9a233497-f3cd-4888-b5b6-a83630e5f1ee" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/4626de5c-667e-4f70-be3e-44dffde3887b" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/924e4ef8-ee41-480e-9d33-9807b471878d" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/a72c6169-713d-49ef-b9c2-4d9d05247473" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/fedfc5af-eb8e-4ee5-88e7-a18ab2f00b26" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/e058af74-abc7-453f-8aa6-93cd056c50e3" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/6f2586d0-5743-4ab9-83b6-915ffa98736a" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/6cedc563-ca67-467e-9c98-48b5b67123de" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/c3989bae-203d-43b6-8f09-90935634f1d2" + }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/b050adf2-88b1-42e2-912b-2843d5b96854" + "source": "https://brain-bbqs.org/id/783ff194-17e8-46d9-bd1f-57ca4070a90c" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/57f1a4fe-523b-4963-b6e6-a38c7da47500" + "source": "https://brain-bbqs.org/id/7db5db3c-9f1f-4e01-a942-e05c340cbd8e" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/5f18877b-67fd-4779-be9a-d859314e0b4a" + "source": "https://brain-bbqs.org/id/f0d2d9d0-b5e5-4f52-a40d-0d5a06229b14" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/b2b7ce80-8dbf-4cf8-804c-9daebe9a9fa5" + "source": "https://brain-bbqs.org/id/9045540f-6ba2-4b95-bc69-98527f947a27" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/2984e917-2448-4596-9648-b52dc92b2c5d" + "source": "https://brain-bbqs.org/id/3d87d6b0-c802-4610-813b-86b94e3e76d6" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/f1ff44d0-aff1-4a53-91e6-7a6b64aa0af0" + "source": "https://brain-bbqs.org/id/a6f825d6-cb5c-4136-9208-eee059bf6f49" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/02f970e3-bc54-4d97-b033-fe732d43fbb3" + "source": "https://brain-bbqs.org/id/f4d7cfd7-30aa-4f19-8601-f85f9689884a" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/3d87d6b0-c802-4610-813b-86b94e3e76d6" + "source": "https://brain-bbqs.org/id/0410e3c0-a5b5-4f3f-a0e0-2dc7e71c2d18" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/b7b55255-04e1-45e6-934e-af38990ff414" + "source": "https://brain-bbqs.org/id/397816f1-2188-4817-af29-e7aa82ef1afb" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/1b3e8304-f2d6-4ed6-aa5c-7d49ca278344" + "source": "https://brain-bbqs.org/id/02f970e3-bc54-4d97-b033-fe732d43fbb3" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/e058af74-abc7-453f-8aa6-93cd056c50e3" + "source": "https://brain-bbqs.org/id/b050adf2-88b1-42e2-912b-2843d5b96854" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/9fd2cbaa-449d-4c9d-bcbb-b627f245cbf3" + "source": "https://brain-bbqs.org/id/3576ac45-d083-4c4c-84c0-04a44227dc2b" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/397816f1-2188-4817-af29-e7aa82ef1afb" + "source": "https://brain-bbqs.org/id/6d29e182-e1cd-43d5-9f95-7cfef6ff9396" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/fedfc5af-eb8e-4ee5-88e7-a18ab2f00b26" + "source": "https://brain-bbqs.org/id/9fb13eb4-a3bc-483a-9969-f3908d13143d" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/783ff194-17e8-46d9-bd1f-57ca4070a90c" + "source": "https://brain-bbqs.org/id/f33c9c03-f685-4166-b0bf-9ce704b5fa78" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/98076d7b-270f-4a2a-af91-53d1b7644c90" + "source": "https://brain-bbqs.org/id/a3de5020-ea6c-41c1-b397-3e0f6d43e98a" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/3576ac45-d083-4c4c-84c0-04a44227dc2b" + "source": "https://brain-bbqs.org/id/6450030e-c137-4842-8bae-8d6dd913c50b" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/e0d25d6e-4879-436d-980f-e690e3e5a937" + "source": "https://brain-bbqs.org/id/b7b55255-04e1-45e6-934e-af38990ff414" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/e729b65b-8a22-4dc9-9d4d-d525f33f778f" + "source": "https://brain-bbqs.org/id/7eb2abf1-f38f-4693-afb6-9313f96d2ff4" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/a3de5020-ea6c-41c1-b397-3e0f6d43e98a" + "source": "https://brain-bbqs.org/id/2984e917-2448-4596-9648-b52dc92b2c5d" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/8fa8009e-d4af-4b39-b0e5-7efed3696a4c" + "source": "https://brain-bbqs.org/id/e0d25d6e-4879-436d-980f-e690e3e5a937" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/79d8d638-23c0-490f-8044-dbe06e0f63b5" + "source": "https://brain-bbqs.org/id/03f8e307-5f04-4d22-9aef-c1bb9d3e6905" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/e03557cc-99aa-4b15-8786-bde9a5253fd1" + "source": "https://brain-bbqs.org/id/5f18877b-67fd-4779-be9a-d859314e0b4a" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/6cedc563-ca67-467e-9c98-48b5b67123de" + "source": "https://brain-bbqs.org/id/f34a38e7-364a-4091-8436-a8c52b684cc2" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/5cac268b-ef4e-4b85-8a9b-9f968992dfe7" + "source": "https://brain-bbqs.org/id/c96b95c1-3ba5-4da4-9683-d714b853e4d8" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/a72c6169-713d-49ef-b9c2-4d9d05247473" + "source": "https://brain-bbqs.org/id/57f1a4fe-523b-4963-b6e6-a38c7da47500" }, { "predicate": "member_of_group", @@ -30101,71 +32982,96 @@ }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/6450030e-c137-4842-8bae-8d6dd913c50b" + "source": "https://brain-bbqs.org/id/8694fef3-33b8-491f-a806-7d0c8b5a60bf" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/de5929a1-5c9a-4f4f-8d0f-4cc0d040160f" + "source": "https://brain-bbqs.org/id/79d8d638-23c0-490f-8044-dbe06e0f63b5" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/7eb2abf1-f38f-4693-afb6-9313f96d2ff4" + "source": "https://brain-bbqs.org/id/8c977c24-da2f-4866-b860-b71aa2540bd4" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/4543ce04-8f6e-4713-8fa7-2552664e28ae" + "source": "https://brain-bbqs.org/id/bcdcd220-fa82-47d4-9c1b-7a8da03dadd8" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/40f7a980-ec6a-4278-82f7-b7ea3601ce40" + "source": "https://brain-bbqs.org/id/77aecb31-a637-4d08-9a35-e72ea6a46fe5" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/b1b421fc-5477-4c2f-8968-ab757344ab2d" + "source": "https://brain-bbqs.org/id/25f1bccb-0c04-4e0e-8951-ac2620fb969c" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/f34a38e7-364a-4091-8436-a8c52b684cc2" + "source": "https://brain-bbqs.org/id/5cac268b-ef4e-4b85-8a9b-9f968992dfe7" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/4626de5c-667e-4f70-be3e-44dffde3887b" + "source": "https://brain-bbqs.org/id/e03557cc-99aa-4b15-8786-bde9a5253fd1" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/2fb1cdc9-28b2-4709-adf4-c914a44e042d" + "source": "https://brain-bbqs.org/id/e6fb5750-5310-4d85-8beb-4cc8addbd988" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/6f2586d0-5743-4ab9-83b6-915ffa98736a" + "source": "https://brain-bbqs.org/id/8fa8009e-d4af-4b39-b0e5-7efed3696a4c" + } + ], + "dangling": [], + "degree": 66, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3", + "class": "WorkingGroup", + "label": "WG-ELSI", + "facts": { + "name": [ + "WG-ELSI" + ] + }, + "out": [], + "in": [ + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/fedfc5af-eb8e-4ee5-88e7-a18ab2f00b26" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/c96b95c1-3ba5-4da4-9683-d714b853e4d8" + "source": "https://brain-bbqs.org/id/353d2c1b-0f19-47a0-98be-6a721845c0c2" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/709c64f2-d02c-48f9-b286-b9222a106f27" + "source": "https://brain-bbqs.org/id/a5644db3-8ade-4026-9139-c1945c0869d6" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/b2c565ea-4b4a-4586-9543-e61df6570936" + "source": "https://brain-bbqs.org/id/4543ce04-8f6e-4713-8fa7-2552664e28ae" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/25f1bccb-0c04-4e0e-8951-ac2620fb969c" + "source": "https://brain-bbqs.org/id/924e4ef8-ee41-480e-9d33-9807b471878d" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/f33c9c03-f685-4166-b0bf-9ce704b5fa78" + "source": "https://brain-bbqs.org/id/2febecec-70dd-4db0-8bed-2060a1d13b5e" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/bcdcd220-fa82-47d4-9c1b-7a8da03dadd8" + "source": "https://brain-bbqs.org/id/a72c6169-713d-49ef-b9c2-4d9d05247473" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/77aecb31-a637-4d08-9a35-e72ea6a46fe5" + "source": "https://brain-bbqs.org/id/6f2586d0-5743-4ab9-83b6-915ffa98736a" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/e6d4c722-8089-4163-901c-3a77f6a2a90b" }, { "predicate": "member_of_group", @@ -30173,35 +33079,35 @@ }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/0410e3c0-a5b5-4f3f-a0e0-2dc7e71c2d18" + "source": "https://brain-bbqs.org/id/f0d2d9d0-b5e5-4f52-a40d-0d5a06229b14" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/924e4ef8-ee41-480e-9d33-9807b471878d" + "source": "https://brain-bbqs.org/id/178d1833-2f0c-4a20-9f06-c3106f12b21c" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/7db5db3c-9f1f-4e01-a942-e05c340cbd8e" + "source": "https://brain-bbqs.org/id/dfbc5c5d-f4a9-4b08-8454-321df0c98e18" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/03f8e307-5f04-4d22-9aef-c1bb9d3e6905" + "source": "https://brain-bbqs.org/id/d25f9d24-5496-41a5-9a39-b686719d9eb7" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/9a233497-f3cd-4888-b5b6-a83630e5f1ee" + "source": "https://brain-bbqs.org/id/397816f1-2188-4817-af29-e7aa82ef1afb" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/f4d7cfd7-30aa-4f19-8601-f85f9689884a" + "source": "https://brain-bbqs.org/id/1b49aee4-301e-46c9-b22d-209481f68437" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/82e9264e-8bec-4d1e-ab39-9e42f8f5384d" + "source": "https://brain-bbqs.org/id/8e52b630-7ecc-4336-9f31-d0b6a1c85100" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/ddf3df70-64df-4112-822c-1ebf2bb895e0" + "source": "https://brain-bbqs.org/id/3576ac45-d083-4c4c-84c0-04a44227dc2b" }, { "predicate": "member_of_group", @@ -30209,15 +33115,23 @@ }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/9045540f-6ba2-4b95-bc69-98527f947a27" + "source": "https://brain-bbqs.org/id/f33c9c03-f685-4166-b0bf-9ce704b5fa78" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/09865181-38c6-44d9-aba4-68e373f0286d" + "source": "https://brain-bbqs.org/id/6340c8ee-1d5b-45f0-87ff-c320a38df17d" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/22edcc49-fd41-4423-92b6-89e7abba292d" + "source": "https://brain-bbqs.org/id/2984e917-2448-4596-9648-b52dc92b2c5d" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/e0d25d6e-4879-436d-980f-e690e3e5a937" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/d3b32f3b-0a12-4eec-b49e-b9274f934b5a" }, { "predicate": "member_of_group", @@ -30225,60 +33139,47 @@ }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/9fb13eb4-a3bc-483a-9969-f3908d13143d" + "source": "https://brain-bbqs.org/id/f34a38e7-364a-4091-8436-a8c52b684cc2" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/ab51c79a-9096-4c6b-9724-ae605b7ffae2" + "source": "https://brain-bbqs.org/id/20d3bb9f-8cbe-45b8-974e-1c84e0d9631f" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/8694fef3-33b8-491f-a806-7d0c8b5a60bf" + "source": "https://brain-bbqs.org/id/b359432d-39e2-4ab8-bb3b-16afe458820c" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/7ef0ea15-6f36-4bca-8eee-626e9bf76254" + "source": "https://brain-bbqs.org/id/f088160e-1dea-4cb9-b73f-1c30d0e40053" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/a6f825d6-cb5c-4136-9208-eee059bf6f49" + "source": "https://brain-bbqs.org/id/57f1a4fe-523b-4963-b6e6-a38c7da47500" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/f0d2d9d0-b5e5-4f52-a40d-0d5a06229b14" + "source": "https://brain-bbqs.org/id/c302f348-ef46-4a60-801c-55a7783ca421" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/0a39ab50-9241-4b17-b6d4-77d5ac81e519" + "source": "https://brain-bbqs.org/id/d2f77d44-3a20-4759-be29-69403ae039ef" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/8c977c24-da2f-4866-b860-b71aa2540bd4" - } - ], - "dangling": [], - "degree": 66, - "flags": [], - "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/4be84d82-5396-4c3d-907f-8c6e10787cd3", - "class": "WorkingGroup", - "label": "WG-ELSI", - "facts": { - "name": [ - "WG-ELSI" - ] - }, - "out": [], - "in": [ + "source": "https://brain-bbqs.org/id/bcdcd220-fa82-47d4-9c1b-7a8da03dadd8" + }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/353d2c1b-0f19-47a0-98be-6a721845c0c2" + "source": "https://brain-bbqs.org/id/77aecb31-a637-4d08-9a35-e72ea6a46fe5" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/2febecec-70dd-4db0-8bed-2060a1d13b5e" + "source": "https://brain-bbqs.org/id/aa8884d6-2eae-451a-828a-92e4595c273e" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/40a825b2-31fc-4ffe-b686-9b09a1576b33" }, { "predicate": "member_of_group", @@ -30286,39 +33187,43 @@ }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/397816f1-2188-4817-af29-e7aa82ef1afb" + "source": "https://brain-bbqs.org/id/e03557cc-99aa-4b15-8786-bde9a5253fd1" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/fedfc5af-eb8e-4ee5-88e7-a18ab2f00b26" + "source": "https://brain-bbqs.org/id/cf033709-106e-4288-a326-f7bb353ba0a4" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/3576ac45-d083-4c4c-84c0-04a44227dc2b" + "source": "https://brain-bbqs.org/id/54ef6069-cc01-4d5b-9aaa-8ef9e1505001" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/c302f348-ef46-4a60-801c-55a7783ca421" + "source": "https://brain-bbqs.org/id/ec6cb02d-5d60-4e1b-bfa8-e7ce7f857f90" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/a5644db3-8ade-4026-9139-c1945c0869d6" + "source": "https://brain-bbqs.org/id/2fb1cdc9-28b2-4709-adf4-c914a44e042d" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/e03557cc-99aa-4b15-8786-bde9a5253fd1" + "source": "https://brain-bbqs.org/id/af52d4d6-a0e2-4a87-b747-6ede8ebf212f" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/8e52b630-7ecc-4336-9f31-d0b6a1c85100" + "source": "https://brain-bbqs.org/id/c2074402-c96d-40c5-8b3c-ad8a8fcf2031" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/a72c6169-713d-49ef-b9c2-4d9d05247473" + "source": "https://brain-bbqs.org/id/7ef0ea15-6f36-4bca-8eee-626e9bf76254" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/4543ce04-8f6e-4713-8fa7-2552664e28ae" + "source": "https://brain-bbqs.org/id/42fcde10-7fc8-4243-9c6f-845abf7d194c" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/5fd6169e-d169-41be-8cd0-e8a691f0b345" }, { "predicate": "member_of_group", @@ -30327,26 +33232,43 @@ { "predicate": "member_of_group", "source": "https://brain-bbqs.org/id/6a1a2d08-5aec-4450-a9db-8dad62b8f4c4" - }, + } + ], + "dangling": [], + "degree": 49, + "flags": [], + "violations": [] + }, + { + "id": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd", + "class": "WorkingGroup", + "label": "WG-Standards", + "facts": { + "name": [ + "WG-Standards" + ] + }, + "out": [], + "in": [ { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/cf033709-106e-4288-a326-f7bb353ba0a4" + "source": "https://brain-bbqs.org/id/fedfc5af-eb8e-4ee5-88e7-a18ab2f00b26" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/5fd6169e-d169-41be-8cd0-e8a691f0b345" + "source": "https://brain-bbqs.org/id/b0b69ef8-90b3-481a-b095-a01f1ddf4663" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/f34a38e7-364a-4091-8436-a8c52b684cc2" + "source": "https://brain-bbqs.org/id/0f3bb33c-e7ee-4013-af5d-894d1adfa0ee" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/bcdcd220-fa82-47d4-9c1b-7a8da03dadd8" + "source": "https://brain-bbqs.org/id/5ed180e1-004a-49d3-a05f-e8a4da27718f" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/2fb1cdc9-28b2-4709-adf4-c914a44e042d" + "source": "https://brain-bbqs.org/id/924e4ef8-ee41-480e-9d33-9807b471878d" }, { "predicate": "member_of_group", @@ -30354,298 +33276,1850 @@ }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/c2074402-c96d-40c5-8b3c-ad8a8fcf2031" + "source": "https://brain-bbqs.org/id/3576ac45-d083-4c4c-84c0-04a44227dc2b" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/b359432d-39e2-4ab8-bb3b-16afe458820c" + "source": "https://brain-bbqs.org/id/fe4790d5-bf32-469d-b098-cb4f44f6fa19" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/f33c9c03-f685-4166-b0bf-9ce704b5fa78" + "source": "https://brain-bbqs.org/id/c3989bae-203d-43b6-8f09-90935634f1d2" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/397816f1-2188-4817-af29-e7aa82ef1afb" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/6d29e182-e1cd-43d5-9f95-7cfef6ff9396" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/c302f348-ef46-4a60-801c-55a7783ca421" + }, + { + "predicate": "member_of_group", + "source": "https://brain-bbqs.org/id/8694fef3-33b8-491f-a806-7d0c8b5a60bf" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/178d1833-2f0c-4a20-9f06-c3106f12b21c" + "source": "https://brain-bbqs.org/id/3be55dd2-fe02-418e-a97b-aa223e988663" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/77aecb31-a637-4d08-9a35-e72ea6a46fe5" + "source": "https://brain-bbqs.org/id/d303b6df-88e0-4e0d-88f6-46b3d45c1ea4" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/c3989bae-203d-43b6-8f09-90935634f1d2" + "source": "https://brain-bbqs.org/id/2984e917-2448-4596-9648-b52dc92b2c5d" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/924e4ef8-ee41-480e-9d33-9807b471878d" + "source": "https://brain-bbqs.org/id/e0d25d6e-4879-436d-980f-e690e3e5a937" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/d25f9d24-5496-41a5-9a39-b686719d9eb7" + "source": "https://brain-bbqs.org/id/c9fb9f5b-29a9-4138-9434-894ab7b7a909" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/d3b32f3b-0a12-4eec-b49e-b9274f934b5a" + "source": "https://brain-bbqs.org/id/43d7d5a8-8912-4a93-b571-f3c97f41bd9d" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/20d3bb9f-8cbe-45b8-974e-1c84e0d9631f" + "source": "https://brain-bbqs.org/id/5cac268b-ef4e-4b85-8a9b-9f968992dfe7" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/1b49aee4-301e-46c9-b22d-209481f68437" + "source": "https://brain-bbqs.org/id/e03557cc-99aa-4b15-8786-bde9a5253fd1" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/6d29e182-e1cd-43d5-9f95-7cfef6ff9396" + "source": "https://brain-bbqs.org/id/e6fb5750-5310-4d85-8beb-4cc8addbd988" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/42fcde10-7fc8-4243-9c6f-845abf7d194c" + "source": "https://brain-bbqs.org/id/f34a38e7-364a-4091-8436-a8c52b684cc2" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/aa8884d6-2eae-451a-828a-92e4595c273e" + "source": "https://brain-bbqs.org/id/57f1a4fe-523b-4963-b6e6-a38c7da47500" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/e6fb5750-5310-4d85-8beb-4cc8addbd988" + "source": "https://brain-bbqs.org/id/d2f77d44-3a20-4759-be29-69403ae039ef" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/ec6cb02d-5d60-4e1b-bfa8-e7ce7f857f90" + "source": "https://brain-bbqs.org/id/82e9264e-8bec-4d1e-ab39-9e42f8f5384d" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/7ef0ea15-6f36-4bca-8eee-626e9bf76254" + "source": "https://brain-bbqs.org/id/77aecb31-a637-4d08-9a35-e72ea6a46fe5" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/d2f77d44-3a20-4759-be29-69403ae039ef" + "source": "https://brain-bbqs.org/id/25f1bccb-0c04-4e0e-8951-ac2620fb969c" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/54ef6069-cc01-4d5b-9aaa-8ef9e1505001" + "source": "https://brain-bbqs.org/id/40a825b2-31fc-4ffe-b686-9b09a1576b33" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/f0d2d9d0-b5e5-4f52-a40d-0d5a06229b14" + "source": "https://brain-bbqs.org/id/54ef6069-cc01-4d5b-9aaa-8ef9e1505001" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/f088160e-1dea-4cb9-b73f-1c30d0e40053" + "source": "https://brain-bbqs.org/id/2fb1cdc9-28b2-4709-adf4-c914a44e042d" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/40a825b2-31fc-4ffe-b686-9b09a1576b33" + "source": "https://brain-bbqs.org/id/af52d4d6-a0e2-4a87-b747-6ede8ebf212f" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/dfbc5c5d-f4a9-4b08-8454-321df0c98e18" + "source": "https://brain-bbqs.org/id/7ef0ea15-6f36-4bca-8eee-626e9bf76254" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/e6d4c722-8089-4163-901c-3a77f6a2a90b" + "source": "https://brain-bbqs.org/id/831a48e1-025d-499a-bf11-83d05285ed4b" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/57f1a4fe-523b-4963-b6e6-a38c7da47500" + "source": "https://brain-bbqs.org/id/42fcde10-7fc8-4243-9c6f-845abf7d194c" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/af52d4d6-a0e2-4a87-b747-6ede8ebf212f" + "source": "https://brain-bbqs.org/id/13ccc90e-b105-48b2-8590-4804cd2b5f54" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/6340c8ee-1d5b-45f0-87ff-c320a38df17d" + "source": "https://brain-bbqs.org/id/1b3e8304-f2d6-4ed6-aa5c-7d49ca278344" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/e0d25d6e-4879-436d-980f-e690e3e5a937" + "source": "https://brain-bbqs.org/id/40d5a0bc-769a-4450-9355-d561ff9494eb" }, { "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/2984e917-2448-4596-9648-b52dc92b2c5d" + "source": "https://brain-bbqs.org/id/81d6f976-8ae2-4e38-853a-9e0fe8ac7839" } ], "dangling": [], - "degree": 49, + "degree": 39, "flags": [], "violations": [] - }, - { - "id": "https://brain-bbqs.org/id/4737d7d7-4bbe-4b72-b397-5f341a0dd5dd", - "class": "WorkingGroup", - "label": "WG-Standards", - "facts": { - "name": [ - "WG-Standards" + } + ], + "publications": { + "count": 89, + "checks": { + "no_roster_author": 9, + "no_text": 89, + "authors_unchecked": 68, + "no_project": 1, + "roster_unchecked": 11, + "preprint_pair": 10, + "several_projects": 1 + }, + "rows": [ + { + "id": "https://brain-bbqs.org/id/38fab5c5-6eb6-4ba1-980a-78e5c2bf2312", + "projects": [ + { + "id": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18", + "grant_number": "R34DA059513", + "roster": 3 + } + ], + "author_orcids": 2, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "no_roster_author", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/e96847f4-f5a5-4d3c-a358-be3fcc27f390", + "projects": [ + { + "id": "https://brain-bbqs.org/id/1e1fc06b-fe5c-4ec2-9f64-474f98ae31e8", + "grant_number": "R34DA059512", + "roster": 4 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/9b5abbf9-7fe8-489b-9e27-fd2c4f7e5990", + "projects": [ + { + "id": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7", + "grant_number": "R34DA059509", + "roster": 4 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/36f00adf-1d84-4267-85c0-0af7379df8cc", + "projects": [], + "author_orcids": 4, + "investigator_authors": [ + { + "id": "https://brain-bbqs.org/id/1b1f912c-a054-4bd1-a6b8-748f902e53f4", + "on_roster": false + } + ], + "texts": [], + "versions": [], + "checks": [ + "no_project", + "roster_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/a0ce7dc8-e0b9-4b44-85b8-8955d6a36a59", + "projects": [ + { + "id": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae", + "grant_number": "R61MH138713", + "roster": 5 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/39a5e171-49ad-4125-bb84-9feb6e3ef28e", + "projects": [ + { + "id": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae", + "grant_number": "R61MH138713", + "roster": 5 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/8b505d92-14d0-43cd-9cb3-62ae42e26744", + "projects": [ + { + "id": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0", + "grant_number": "R34DA061924", + "roster": 5 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/0c13ec6b-1864-453c-a447-cf938ec53940", + "projects": [ + { + "id": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b", + "grant_number": "R61MH135407", + "roster": 2 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/1c345b47-9c5c-4a88-a8e4-bd8737d97483", + "projects": [ + { + "id": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae", + "grant_number": "R61MH138713", + "roster": 5 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/d956ef6b-0f6d-4bf3-a920-76a3db659efc", + "projects": [ + { + "id": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b", + "grant_number": "R61MH135407", + "roster": 2 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/276aa727-0539-4f2b-9fa0-c0b86a868876", + "projects": [ + { + "id": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152", + "grant_number": "U24DA064429", + "roster": 11 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/c352d902-bd16-447b-b0ca-4b23a59655f9", + "projects": [ + { + "id": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7", + "grant_number": "R34DA059509", + "roster": 4 + } + ], + "author_orcids": 4, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "no_roster_author", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/f162cf66-a805-4425-9e9f-ee40c5c89bb2", + "projects": [ + { + "id": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b", + "grant_number": "R61MH135407", + "roster": 2 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/4308a85a-925b-4012-9d19-ea11860d7bf1", + "projects": [ + { + "id": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608", + "grant_number": "R34DA059500", + "roster": 4 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/5ec5db0e-0458-498c-9ebd-38f78c2d139c", + "projects": [ + { + "id": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b", + "grant_number": "R61MH135407", + "roster": 2 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/3575b5d6-de13-43e9-9391-c5dc106f4dc3", + "projects": [ + { + "id": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7", + "grant_number": "R34DA059509", + "roster": 4 + } + ], + "author_orcids": 2, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "no_roster_author", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/9b2f7713-e1e1-4bd6-a2d3-2bfc9f00cd11", + "projects": [ + { + "id": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae", + "grant_number": "R61MH138713", + "roster": 5 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/7d6d3ede-5075-44de-87e0-829d557a6887", + "projects": [ + { + "id": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b", + "grant_number": "R61MH135407", + "roster": 2 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "preprint_pair", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/e96d4fb7-c4d6-4776-b39c-dfb97dc12f41", + "projects": [ + { + "id": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b", + "grant_number": "R61MH135407", + "roster": 2 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "preprint_pair", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/93b1ea26-0dae-458a-a946-13dca91b5382", + "projects": [ + { + "id": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b", + "grant_number": "R61MH135407", + "roster": 2 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42", + "projects": [ + { + "id": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608", + "grant_number": "R34DA059500", + "roster": 4 + } + ], + "author_orcids": 27, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "roster_unchecked", + "preprint_pair", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180", + "projects": [ + { + "id": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608", + "grant_number": "R34DA059500", + "roster": 4 + } + ], + "author_orcids": 11, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "roster_unchecked", + "preprint_pair", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/933edfb2-8cdf-4a82-a113-102e200d5619", + "projects": [ + { + "id": "https://brain-bbqs.org/id/1573f2f2-dfe7-476f-ba44-55011c0f5d1b", + "grant_number": "R34DA061925", + "roster": 4 + } + ], + "author_orcids": 4, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "no_roster_author", + "preprint_pair", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/eef56f64-7e55-48ea-891a-b5c9b4c85b7c", + "projects": [ + { + "id": "https://brain-bbqs.org/id/1573f2f2-dfe7-476f-ba44-55011c0f5d1b", + "grant_number": "R34DA061925", + "roster": 4 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "preprint_pair", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/bd142774-20d3-461d-a99f-7fdc94c120bd", + "projects": [ + { + "id": "https://brain-bbqs.org/id/35f57798-cd39-4ec1-a147-3b0ccf9d3608", + "grant_number": "R34DA059500", + "roster": 4 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/507c97c9-3940-4476-af59-4736c645c519", + "projects": [ + { + "id": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b", + "grant_number": "R61MH135407", + "roster": 2 + } + ], + "author_orcids": 7, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "roster_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/91a308e7-a52f-4a5e-bce6-699f43554234", + "projects": [ + { + "id": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7", + "grant_number": "R34DA059509", + "roster": 4 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/750a9501-b64d-4947-91e5-b8ed542420a5", + "projects": [ + { + "id": "https://brain-bbqs.org/id/1e1fc06b-fe5c-4ec2-9f64-474f98ae31e8", + "grant_number": "R34DA059512", + "roster": 4 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/2370e3b0-8941-46f8-99b0-a30d467e764e", + "projects": [ + { + "id": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18", + "grant_number": "R34DA059513", + "roster": 3 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/31b0954a-08ab-46b1-a4e3-39a951d09e23", + "projects": [ + { + "id": "https://brain-bbqs.org/id/1e2423ff-965b-4485-8557-797c1e1dee38", + "grant_number": "U01DA063534", + "roster": 8 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/7fd65aca-ff11-4642-ab3d-17489049db10", + "projects": [ + { + "id": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b", + "grant_number": "R61MH135407", + "roster": 2 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/d951e426-557c-44e1-a830-212bbdd1514c", + "projects": [ + { + "id": "https://brain-bbqs.org/id/3352859e-5677-46dd-89d6-17c898b6f097", + "grant_number": "R61MH135109", + "roster": 2 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/4b31df5d-6d5c-49d5-9abd-ecc1cbafe965", + "projects": [ + { + "id": "https://brain-bbqs.org/id/1e1fc06b-fe5c-4ec2-9f64-474f98ae31e8", + "grant_number": "R34DA059512", + "roster": 4 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/820bf47c-7868-47f1-a5a7-b4a900ee16de", + "projects": [ + { + "id": "https://brain-bbqs.org/id/2db5ee93-296a-446a-a3e6-59fd3d28c4a6", + "grant_number": "R34DA059723", + "roster": 2 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/d164ed89-3894-4cbc-a952-84e7161554d7", + "projects": [ + { + "id": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e", + "grant_number": "R34DA059718", + "roster": 3 + } + ], + "author_orcids": 6, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "roster_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/3a906d0f-416c-4fda-bdf9-c9e42ca31ab8", + "projects": [ + { + "id": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b", + "grant_number": "R61MH135407", + "roster": 2 + } + ], + "author_orcids": 3, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "roster_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/93e8de08-1a43-4cbd-b120-7b9306a4a44b", + "projects": [ + { + "id": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7", + "grant_number": "R34DA059509", + "roster": 4 + } + ], + "author_orcids": 2, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "no_roster_author", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/12c95d56-76ab-4519-8bf9-e406bf79736d", + "projects": [ + { + "id": "https://brain-bbqs.org/id/ca25b66c-c03f-4d7e-90e8-93bc12fafeb1", + "grant_number": "R34DA061984", + "roster": 1 + } + ], + "author_orcids": 5, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "roster_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/c34d88e6-5348-4ef1-87ac-3b5d90417a1f", + "projects": [ + { + "id": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7", + "grant_number": "R34DA059509", + "roster": 4 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/9552ba2e-28e2-4237-b865-ec747251a036", + "projects": [ + { + "id": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e", + "grant_number": "R34DA059718", + "roster": 3 + } + ], + "author_orcids": 3, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "roster_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/50808fc1-e0bd-44c6-a772-364f8a35a23e", + "projects": [ + { + "id": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b", + "grant_number": "R61MH135407", + "roster": 2 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "preprint_pair", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/71dda42b-ccf2-4447-b3f1-d25aa8f8b0bb", + "projects": [ + { + "id": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b", + "grant_number": "R61MH135407", + "roster": 2 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "preprint_pair", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/8b727552-b37c-4088-a4ff-63f55dd59281", + "projects": [ + { + "id": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b", + "grant_number": "R61MH135407", + "roster": 2 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/e6a2c1d6-43e9-4dd7-b24d-769b7c8ac4a8", + "projects": [ + { + "id": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae", + "grant_number": "R61MH138713", + "roster": 5 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/6e93a7ef-b7d8-45c7-891f-0b42a690f4ed", + "projects": [ + { + "id": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae", + "grant_number": "R61MH138713", + "roster": 5 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/563136c5-57a1-44da-9364-e1c22ce685f8", + "projects": [ + { + "id": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae", + "grant_number": "R61MH138713", + "roster": 5 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/59585a8a-8f7e-4f02-af19-c40c797d9ddf", + "projects": [ + { + "id": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152", + "grant_number": "U24DA064429", + "roster": 11 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/691a3644-7a61-4b35-9aa2-9753a810792b", + "projects": [ + { + "id": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7", + "grant_number": "R34DA059509", + "roster": 4 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/42fe776f-9741-4820-a9c4-d11b14474575", + "projects": [ + { + "id": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae", + "grant_number": "R61MH138713", + "roster": 5 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/58b76015-dbdd-401e-92e7-4dc15e6183d9", + "projects": [ + { + "id": "https://brain-bbqs.org/id/2db5ee93-296a-446a-a3e6-59fd3d28c4a6", + "grant_number": "R34DA059723", + "roster": 2 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/7cccc8d1-98d9-4ca2-aaf8-cb9c9f836f06", + "projects": [ + { + "id": "https://brain-bbqs.org/id/df28e74c-eeb6-40e2-a5e4-a9220ad7c540", + "grant_number": "R24MH136632", + "roster": 11 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/987e3cf1-5d05-4e16-8849-4b5899ac84dc", + "projects": [ + { + "id": "https://brain-bbqs.org/id/3352859e-5677-46dd-89d6-17c898b6f097", + "grant_number": "R61MH135109", + "roster": 2 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/c7423364-c703-42a4-bde0-cdad1bc6f896", + "projects": [ + { + "id": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b", + "grant_number": "R61MH135407", + "roster": 2 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/c8a72b45-43f3-42d0-8cd6-aedc7f1242c0", + "projects": [ + { + "id": "https://brain-bbqs.org/id/80db3a04-a9ad-486d-abf1-4b20f8370ff9", + "grant_number": "R61MH135106", + "roster": 1 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/a346f802-eb1b-4438-a13c-9ee20e28db4c", + "projects": [ + { + "id": "https://brain-bbqs.org/id/2db5ee93-296a-446a-a3e6-59fd3d28c4a6", + "grant_number": "R34DA059723", + "roster": 2 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/4cbadc61-5660-48d8-9b16-7a8749f0defe", + "projects": [ + { + "id": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7", + "grant_number": "R34DA059509", + "roster": 4 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/eb63ab45-d094-4b5f-99a8-3fe0cb8529eb", + "projects": [ + { + "id": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7", + "grant_number": "R34DA059509", + "roster": 4 + } + ], + "author_orcids": 3, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "no_roster_author", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/03a34599-787d-42ac-83a3-e002bd419d37", + "projects": [ + { + "id": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e", + "grant_number": "R34DA059718", + "roster": 3 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/bcf4ee35-21a5-473e-a2f2-75fa77147072", + "projects": [ + { + "id": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7", + "grant_number": "R34DA059509", + "roster": 4 + } + ], + "author_orcids": 3, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "no_roster_author", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/2fc767cc-6f8c-4f93-8aaf-00d77c675a27", + "projects": [ + { + "id": "https://brain-bbqs.org/id/80db3a04-a9ad-486d-abf1-4b20f8370ff9", + "grant_number": "R61MH135106", + "roster": 1 + } + ], + "author_orcids": 48, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "roster_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/d59fccae-d62c-44f8-9b6d-bf9ab2721553", + "projects": [ + { + "id": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7", + "grant_number": "R34DA059509", + "roster": 4 + } + ], + "author_orcids": 4, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "no_roster_author", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/0efd86da-44c1-4222-9b30-72000b833267", + "projects": [ + { + "id": "https://brain-bbqs.org/id/22e61529-38ba-465f-b38b-274e24160fb6", + "grant_number": "R61MH135405", + "roster": 4 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/f97c2277-9e93-4712-ac91-7f5e04482ba8", + "projects": [ + { + "id": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e", + "grant_number": "R34DA059718", + "roster": 3 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/5935dae3-756d-4c4c-8742-f067e81a8012", + "projects": [ + { + "id": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b", + "grant_number": "R61MH135407", + "roster": 2 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/fd825a1b-0bb9-4d2d-83e0-d901810e15b5", + "projects": [ + { + "id": "https://brain-bbqs.org/id/38289d36-f3a6-43e1-955b-db1d3d400cb2", + "grant_number": "R61MH138705", + "roster": 2 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" ] }, - "out": [], - "in": [ - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/25f1bccb-0c04-4e0e-8951-ac2620fb969c" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/77aecb31-a637-4d08-9a35-e72ea6a46fe5" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/c3989bae-203d-43b6-8f09-90935634f1d2" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/924e4ef8-ee41-480e-9d33-9807b471878d" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/43d7d5a8-8912-4a93-b571-f3c97f41bd9d" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/831a48e1-025d-499a-bf11-83d05285ed4b" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/5ed180e1-004a-49d3-a05f-e8a4da27718f" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/82e9264e-8bec-4d1e-ab39-9e42f8f5384d" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/42fcde10-7fc8-4243-9c6f-845abf7d194c" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/e6fb5750-5310-4d85-8beb-4cc8addbd988" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/40d5a0bc-769a-4450-9355-d561ff9494eb" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/0f3bb33c-e7ee-4013-af5d-894d1adfa0ee" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/8694fef3-33b8-491f-a806-7d0c8b5a60bf" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/6d29e182-e1cd-43d5-9f95-7cfef6ff9396" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/40a825b2-31fc-4ffe-b686-9b09a1576b33" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/b0b69ef8-90b3-481a-b095-a01f1ddf4663" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/57f1a4fe-523b-4963-b6e6-a38c7da47500" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/d303b6df-88e0-4e0d-88f6-46b3d45c1ea4" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/3be55dd2-fe02-418e-a97b-aa223e988663" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/7ef0ea15-6f36-4bca-8eee-626e9bf76254" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/d2f77d44-3a20-4759-be29-69403ae039ef" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/2984e917-2448-4596-9648-b52dc92b2c5d" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/54ef6069-cc01-4d5b-9aaa-8ef9e1505001" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/397816f1-2188-4817-af29-e7aa82ef1afb" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/fedfc5af-eb8e-4ee5-88e7-a18ab2f00b26" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/af52d4d6-a0e2-4a87-b747-6ede8ebf212f" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/3576ac45-d083-4c4c-84c0-04a44227dc2b" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/e0d25d6e-4879-436d-980f-e690e3e5a937" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/e03557cc-99aa-4b15-8786-bde9a5253fd1" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/fe4790d5-bf32-469d-b098-cb4f44f6fa19" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/1b3e8304-f2d6-4ed6-aa5c-7d49ca278344" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/5cac268b-ef4e-4b85-8a9b-9f968992dfe7" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/c9fb9f5b-29a9-4138-9434-894ab7b7a909" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/c302f348-ef46-4a60-801c-55a7783ca421" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/f34a38e7-364a-4091-8436-a8c52b684cc2" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/2fb1cdc9-28b2-4709-adf4-c914a44e042d" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/6f2586d0-5743-4ab9-83b6-915ffa98736a" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/13ccc90e-b105-48b2-8590-4804cd2b5f54" - }, - { - "predicate": "member_of_group", - "source": "https://brain-bbqs.org/id/81d6f976-8ae2-4e38-853a-9e0fe8ac7839" - } - ], - "dangling": [], - "degree": 39, - "flags": [], - "violations": [] - } - ] + { + "id": "https://brain-bbqs.org/id/fa14bcd8-d960-44b1-874c-49e040b64e61", + "projects": [ + { + "id": "https://brain-bbqs.org/id/4f2619b1-a6a4-48e5-b21a-0f5455354ea9", + "grant_number": "R34DA059506", + "roster": 3 + }, + { + "id": "https://brain-bbqs.org/id/1e1fc06b-fe5c-4ec2-9f64-474f98ae31e8", + "grant_number": "R34DA059512", + "roster": 4 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "several_projects", + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/419155ad-faba-4e10-8029-5339960877a1", + "projects": [ + { + "id": "https://brain-bbqs.org/id/4614269a-0d7f-4390-b4cc-568a09fa6a45", + "grant_number": "R61MH135114", + "roster": 4 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/162437eb-ce44-46a5-b994-5741d334c6fb", + "projects": [ + { + "id": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae", + "grant_number": "R61MH138713", + "roster": 5 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/205009f7-ea15-4e13-9b73-292de432b467", + "projects": [ + { + "id": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7", + "grant_number": "R34DA059509", + "roster": 4 + } + ], + "author_orcids": 1, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "no_roster_author", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/4318c6a2-b27a-4d99-b209-f55c57a824eb", + "projects": [ + { + "id": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae", + "grant_number": "R61MH138713", + "roster": 5 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/d3fb7a56-6a64-43c8-9fd6-7087d906d413", + "projects": [ + { + "id": "https://brain-bbqs.org/id/3352859e-5677-46dd-89d6-17c898b6f097", + "grant_number": "R61MH135109", + "roster": 2 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/7d69f10e-ffa5-4d44-b92b-ffb24e71b969", + "projects": [ + { + "id": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e", + "grant_number": "R34DA059718", + "roster": 3 + } + ], + "author_orcids": 5, + "investigator_authors": [ + { + "id": "https://brain-bbqs.org/id/1b1f912c-a054-4bd1-a6b8-748f902e53f4", + "on_roster": false + } + ], + "texts": [], + "versions": [], + "checks": [ + "roster_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/c3f26370-becc-4d39-af05-abeb0433bee9", + "projects": [ + { + "id": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b", + "grant_number": "R61MH135407", + "roster": 2 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/20a8f7ad-ea28-4624-9cae-4c73d8e74549", + "projects": [ + { + "id": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b", + "grant_number": "R61MH135407", + "roster": 2 + } + ], + "author_orcids": 4, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "roster_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/7e6d2d83-a6f6-449d-96cf-c8b0a014e86f", + "projects": [ + { + "id": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae", + "grant_number": "R61MH138713", + "roster": 5 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/51afd359-3797-4082-8f34-f356eaa33848", + "projects": [ + { + "id": "https://brain-bbqs.org/id/80db3a04-a9ad-486d-abf1-4b20f8370ff9", + "grant_number": "R61MH135106", + "roster": 1 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/e0e97a3f-d239-4739-a9d8-6a2af1c6a838", + "projects": [ + { + "id": "https://brain-bbqs.org/id/071aa27a-456a-4eb1-abd2-35d9f0eceaf7", + "grant_number": "R34DA059509", + "roster": 4 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/154b96da-c04a-442c-868f-1586b692dc42", + "projects": [ + { + "id": "https://brain-bbqs.org/id/e5bb6e4f-d3cf-44d4-ac1a-59f76724c0d2", + "grant_number": "R34DA059510", + "roster": 2 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/6a564dd1-f227-40f8-be3c-06bbd09c430c", + "projects": [ + { + "id": "https://brain-bbqs.org/id/1f64a2ba-572e-415a-ac19-68a6e3a0f15e", + "grant_number": "R34DA059718", + "roster": 3 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/d2dadb0b-c44c-4e29-bc95-dce3ad1874ff", + "projects": [ + { + "id": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b", + "grant_number": "R61MH135407", + "roster": 2 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/44b1ac85-feb2-4792-9f46-109cf7876f4a", + "projects": [ + { + "id": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18", + "grant_number": "R34DA059513", + "roster": 3 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/2a2ae141-5d5c-464a-809f-1e3a19a81293", + "projects": [ + { + "id": "https://brain-bbqs.org/id/4a00b65d-6b1b-4385-86c7-9f72c2724152", + "grant_number": "U24DA064429", + "roster": 11 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/579fcaf5-df6d-42f9-a62d-59bd79fe3fae", + "projects": [ + { + "id": "https://brain-bbqs.org/id/d663edcd-08bc-426b-b97d-a45cd47a97c0", + "grant_number": "R34DA061924", + "roster": 5 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/7e3ed91a-e0eb-45d6-aa86-cb785dfba7ba", + "projects": [ + { + "id": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae", + "grant_number": "R61MH138713", + "roster": 5 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/e483d68e-7bc8-4fcb-9a75-3d97825c02c9", + "projects": [ + { + "id": "https://brain-bbqs.org/id/f70949e4-d1f6-4364-a940-741c96057bae", + "grant_number": "R61MH138713", + "roster": 5 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/0e032f88-c50f-4527-9c40-68e9b782173d", + "projects": [ + { + "id": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18", + "grant_number": "R34DA059513", + "roster": 3 + } + ], + "author_orcids": 3, + "investigator_authors": [ + { + "id": "https://brain-bbqs.org/id/be8d825d-140a-4d72-a39a-2534cf2b4145", + "on_roster": true + }, + { + "id": "https://brain-bbqs.org/id/ab51c79a-9096-4c6b-9724-ae605b7ffae2", + "on_roster": false + } + ], + "texts": [], + "versions": [], + "checks": [ + "preprint_pair", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/b75b460e-560d-48d4-af7d-1152d34c1d79", + "projects": [ + { + "id": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18", + "grant_number": "R34DA059513", + "roster": 3 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "preprint_pair", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/a79d14cd-ae0e-4bce-b09f-8d16e6e15f7f", + "projects": [ + { + "id": "https://brain-bbqs.org/id/492fdfe9-53d5-4926-8ef0-933e957fed18", + "grant_number": "R34DA059513", + "roster": 3 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + }, + { + "id": "https://brain-bbqs.org/id/e9749351-6773-473d-8fd0-ec88e5a8ba07", + "projects": [ + { + "id": "https://brain-bbqs.org/id/3a4fb38d-dc54-4d06-a1cf-a5a959d3321b", + "grant_number": "R61MH135407", + "roster": 2 + } + ], + "author_orcids": 0, + "investigator_authors": [], + "texts": [], + "versions": [], + "checks": [ + "authors_unchecked", + "no_text" + ] + } + ] + }, + "duplicates": { + "groups": [ + { + "class": "Publication", + "by": "title", + "value": "braidinputdrivennonlineardynamicalmodelingofneuralbehavioraldata", + "kind": "versions", + "nodes": [ + "https://brain-bbqs.org/id/7d6d3ede-5075-44de-87e0-829d557a6887", + "https://brain-bbqs.org/id/e96d4fb7-c4d6-4776-b39c-dfb97dc12f41" + ] + }, + { + "class": "Publication", + "by": "title", + "value": "cablamahighcontrastbioluminescentca2indicatorderivedfromanengineeredoplophorusgracilirostrisluciferase", + "kind": "versions", + "nodes": [ + "https://brain-bbqs.org/id/5bc0db40-1943-44e6-814a-5e36ce3bf180", + "https://brain-bbqs.org/id/68f78b1a-9b88-447f-9b1b-e68ac7affd42" + ] + }, + { + "class": "Publication", + "by": "title", + "value": "capuchinai10developmentofamachinelearningbasedtouchscreenparadigmtotestcognitioninwildcapuchins", + "kind": "versions", + "nodes": [ + "https://brain-bbqs.org/id/933edfb2-8cdf-4a82-a113-102e200d5619", + "https://brain-bbqs.org/id/eef56f64-7e55-48ea-891a-b5c9b4c85b7c" + ] + }, + { + "class": "Publication", + "by": "title", + "value": "dynamicalmodelingofbehaviorallyrelevantspatiotemporalpatternsinneuralimagingdata", + "kind": "versions", + "nodes": [ + "https://brain-bbqs.org/id/50808fc1-e0bd-44c6-a772-364f8a35a23e", + "https://brain-bbqs.org/id/71dda42b-ccf2-4447-b3f1-d25aa8f8b0bb" + ] + }, + { + "class": "Publication", + "by": "title", + "value": "unsuperviseddiscoveryoffamilyspecificvocalusageinthemongoliangerbil", + "kind": "versions", + "nodes": [ + "https://brain-bbqs.org/id/0e032f88-c50f-4527-9c40-68e9b782173d", + "https://brain-bbqs.org/id/b75b460e-560d-48d4-af7d-1152d34c1d79" + ] + } + ], + "count": 0, + "nodes": 0, + "versions": 5, + "versions_to_check": 0, + "linked_versions": 0, + "advisory": 0 + }, + "revision_links": { + "count": 0, + "links": [] + } } \ No newline at end of file diff --git a/kg/fixtures/clean.ttl b/kg/fixtures/clean.ttl index 7718c0ca..72cd6210 100644 --- a/kg/fixtures/clean.ttl +++ b/kg/fixtures/clean.ttl @@ -1,5 +1,8 @@ -# The same graph as contradictions.ttl, corrected. Every consistency shape should pass (conforms). -# This is the GREEN half of the pair. +# The same graph as contradictions.ttl, corrected. Every validation shape passes (conforms), and +# kg/quality.py duplicates() finds no possible duplicate and no pair left to link: its same-title +# preprints and published papers are linked by revision_of, and the records that share only a URL +# are advisory. revision_links() finds nothing. This is the GREEN half of the pair; kg/ci_check.py +# holds what it must report (GREEN_EXPECTED). @prefix bbqs: . @prefix bid: . @prefix xsd: . @@ -16,12 +19,11 @@ bid:inv-1 a bbqs:Investigator ; bbqs:consortium_role "Principal Investigator (PI)" . # #9 — mechanism matches the grant number -# #7 — the study_species claim resolves, here through a Species alias +# #7 — the study_species claim resolved (here through a Species alias), so only the link is written bid:proj-1 a bbqs:Project ; bbqs:name "Test project" ; bbqs:grant_number "1U01MH135430-01" ; bbqs:mechanism "U01" ; - bbqs:studies_species_name "Mus musculus" ; bbqs:studies_species bid:sp-mouse . bid:sp-mouse a bbqs:Species ; bbqs:name "House Mouse" ; @@ -51,8 +53,8 @@ bid:inv-email-a a bbqs:Investigator ; bbqs:name "Lin Chen" ; bbqs:email "lyc5332@psu.edu" . bid:inv-email-b a bbqs:Investigator ; - bbqs:name "Sam Lee" ; - bbqs:secondary_emails "sam.lee@example.edu" . + bbqs:name "Robin Park" ; + bbqs:secondary_emails "robin.park@example.edu" . # #16 — only one ProjectRole edge for inv-1 + proj-1, so there's nothing to disagree with @@ -111,3 +113,79 @@ bid:role-two a bbqs:ProjectRole ; bbqs:project_role "co_pi" ; bbqs:held_by bid:inv-dup-a ; bbqs:on_project bid:proj-renumbered . + +# #21, #22, #25 — a published paper and its preprint: one title, each its own DOI and PMID, the +# preprint the earlier, two records linked by revision_of (published -> preprint), so duplicates() +# counts them as linked versions +bid:pub-published a bbqs:Publication ; + bbqs:title "Mapping social behavior across five species" ; + bbqs:journal "Nat Methods" ; + bbqs:doi "10.1038/s41592-000-0001-x"^^xsd:anyURI ; + bbqs:pmid "200002" ; + bbqs:year 2026 ; + bbqs:revision_of bid:pub-preprint . +bid:pub-preprint a bbqs:Publication ; + bbqs:title "Mapping social behavior across five species" ; + bbqs:journal "bioRxiv" ; + bbqs:doi "10.1101/2025.01.01.000001"^^xsd:anyURI ; + bbqs:pmid "200001" ; + bbqs:year 2025 . +# the same for a Learning & Memory paper: its 10.1101/ DOI is a journal's, not a preprint's +bid:pub-lm-published a bbqs:Publication ; + bbqs:title "Memory consolidation across sleep in the zebra finch" ; + bbqs:journal "Learn Mem" ; + bbqs:doi "10.1101/lm.054001.124"^^xsd:anyURI ; + bbqs:pmid "300402" ; + bbqs:year 2025 ; + bbqs:revision_of bid:pub-lm-preprint . +bid:pub-lm-preprint a bbqs:Publication ; + bbqs:title "Memory consolidation across sleep in the zebra finch" ; + bbqs:journal "bioRxiv" ; + bbqs:doi "10.1101/2024.05.01.590001"^^xsd:anyURI ; + bbqs:pmid "300401" ; + bbqs:year 2024 . +# a pair a curator linked by hand although PubMed added the preprint after the paper (so the rule +# calls it later and would not link it): a link that exists is resolved, before the order is read, +# as public.kg_link_publication_versions reports it (noop, already linked) +bid:pub-hand-published a bbqs:Publication ; + bbqs:title "A pair a curator linked by hand against the PubMed order" ; + bbqs:journal "Neuron" ; + bbqs:doi "10.1016/j.neuron.2026.300851"^^xsd:anyURI ; + bbqs:pmid "300851" ; + bbqs:year 2026 ; + bbqs:revision_of bid:pub-hand-preprint . +bid:pub-hand-preprint a bbqs:Publication ; + bbqs:title "A pair a curator linked by hand against the PubMed order" ; + bbqs:journal "bioRxiv" ; + bbqs:doi "10.1101/2025.12.01.300852"^^xsd:anyURI ; + bbqs:pmid "300852" ; + bbqs:year 2026 . + +# a URL alone is no identity: two tools on one lab homepage, two calls on one NIH topic page. Each +# pair shares a URL key but not a name, so duplicates() lists it as advisory and counts nothing +bid:sw-dlc a bbqs:SoftwareTool ; + bbqs:name "DeepLabCut" ; + bbqs:external_url "https://www.mackenziemathislab.org/deeplabcut"^^xsd:anyURI . +bid:sw-dlc-live a bbqs:SoftwareTool ; + bbqs:name "DeepLabCut-Live" ; + bbqs:external_url "https://www.mackenziemathislab.org/deeplabcut/"^^xsd:anyURI . +bid:fo-topic-1 a bbqs:FundingOpportunity ; + bbqs:name "A notice listed on a highlighted-topic page" ; + bbqs:fon "NOT-XX-27-005" ; + bbqs:url "https://grants.nih.gov/funding/find-a-fit-for-your-research/highlighted-topics/18"^^xsd:anyURI . +bid:fo-topic-2 a bbqs:FundingOpportunity ; + bbqs:name "Another notice on the same topic page" ; + bbqs:fon "NOT-XX-27-006" ; + bbqs:url "https://grants.nih.gov/funding/find-a-fit-for-your-research/highlighted-topics/18"^^xsd:anyURI . + +# #23 — two funding calls, two FONs and two notice pages +bid:fo-a a bbqs:FundingOpportunity ; + bbqs:name "A funding call" ; + bbqs:fon "RFA-XX-27-001" ; + bbqs:url "https://grants.nih.gov/grants/guide/rfa-files/RFA-XX-27-001.html"^^xsd:anyURI . +bid:fo-b a bbqs:FundingOpportunity ; + bbqs:name "Another funding call" ; + bbqs:fon "RFA-XX-27-002" ; + bbqs:url "https://grants.nih.gov/grants/guide/rfa-files/RFA-XX-27-002.html"^^xsd:anyURI . + +# #24 — proj-1, proj-no-prov and proj-renumbered (above) are three awards with three grant numbers diff --git a/kg/fixtures/contradictions.ttl b/kg/fixtures/contradictions.ttl index 835d5f90..f8169873 100644 --- a/kg/fixtures/contradictions.ttl +++ b/kg/fixtures/contradictions.ttl @@ -1,5 +1,9 @@ -# Deliberately-inconsistent graph. Every consistency shape should fire on exactly one node here. -# This is the RED half of the RED/GREEN pair that proves the shapes actually bite. +# Deliberately-inconsistent graph. Every validation shape fires here (most on exactly one node), +# and kg/quality.py duplicates() finds a folded pair of every identifier it checks and an unlinked +# preprint + published pair (the last block). This is the RED half of the RED/GREEN pair that proves +# the shapes and the duplicate count actually bite. kg/ci_check.py holds, node for node, what each +# shape, duplicates() and revision_links() must report here (RED_EXPECTED): a check that stops +# firing, or fires on another node than the one planted for it, fails the gate. @prefix bbqs: . @prefix bid: . @prefix xsd: . @@ -30,7 +34,7 @@ bid:proj-1 a bbqs:Project ; bbqs:name "Test project" ; bbqs:grant_number "1U01MH135430-01" ; bbqs:mechanism "R61" ; - bbqs:studies_species_name "Freely moving animals" . + bbqs:studies_species_unresolved "Freely moving animals" . # #12 — two verified provenance records disagree on projects.title for proj-1 bid:sc-reporter a bbqs:SourceClass ; bbqs:is_verified true . @@ -48,7 +52,7 @@ bid:role-dangling a bbqs:ProjectRole ; bbqs:project_role "co_pi" ; bbqs:held_by bid:ghost-investigator . -# #14 — two Investigator nodes share one ORCID (merge candidate) +# #14 — two Investigator nodes share one ORCID (merge candidate); the result names the other node bid:inv-dup-a a bbqs:Investigator ; bbqs:name "Alex Kim" ; bbqs:orcid . @@ -122,3 +126,371 @@ bid:role-two a bbqs:ProjectRole ; bbqs:project_role "co_pi" ; bbqs:held_by bid:inv-dup-a , bid:inv-email-a ; bbqs:on_project bid:proj-renumbered . + +# #21 — two Publication nodes with one DOI: one record held twice +bid:pub-doi-a a bbqs:Publication ; + bbqs:title "A paper held twice, by its DOI" ; + bbqs:doi "10.1000/abc.123"^^xsd:anyURI . +bid:pub-doi-b a bbqs:Publication ; + bbqs:title "The same paper, entered again" ; + bbqs:doi "10.1000/abc.123"^^xsd:anyURI . + +# #22 — two Publication nodes with one PMID +bid:pub-pmid-a a bbqs:Publication ; + bbqs:title "A paper held twice, by its PMID" ; + bbqs:pmid "123456" . +bid:pub-pmid-b a bbqs:Publication ; + bbqs:title "Its second record" ; + bbqs:pmid "123456" . + +# #23 — two FundingOpportunity nodes with one FON +bid:fo-a a bbqs:FundingOpportunity ; + bbqs:name "A funding call" ; + bbqs:fon "RFA-XX-27-001" . +bid:fo-b a bbqs:FundingOpportunity ; + bbqs:name "The same call, entered again" ; + bbqs:fon "RFA-XX-27-001" . + +# #24 — two Project nodes with one grant number +bid:proj-a a bbqs:Project ; + bbqs:name "An award" ; + bbqs:grant_number "R34DA000001" . +bid:proj-b a bbqs:Project ; + bbqs:name "The same award, entered again" ; + bbqs:grant_number "R34DA000001" . + +# #25 — a revision_of that points at a Dataset, not at a Publication +bid:pub-rev-a a bbqs:Publication ; + bbqs:title "A paper said to revise a dataset" ; + bbqs:revision_of bid:ds-rev . +bid:ds-rev a bbqs:Dataset ; + bbqs:name "A dataset" . +# #25 — a revision_of from a Dataset (the subject is not a Publication) +bid:ds-rev-subject a bbqs:Dataset ; + bbqs:name "A dataset said to revise a paper" ; + bbqs:revision_of bid:pub-rev-target . +bid:pub-rev-target a bbqs:Publication ; + bbqs:title "A paper a dataset is said to revise" . +# #25 — a Publication that is a revision_of itself +bid:pub-rev-self a bbqs:Publication ; + bbqs:title "A paper said to revise itself" ; + bbqs:revision_of bid:pub-rev-self . +# #25 — two Publications, each a revision_of the other (and, for revision_links(), two titles) +bid:pub-rev-x a bbqs:Publication ; + bbqs:title "One of two papers linked both ways" ; + bbqs:revision_of bid:pub-rev-y . +bid:pub-rev-y a bbqs:Publication ; + bbqs:title "The other of two papers linked both ways" ; + bbqs:revision_of bid:pub-rev-x . + +# duplicates() — one identifier in two spellings is one key (kg/identity_keys.json), so each pair +# below is a possible duplicate although no exact-match shape fires on it. One pair per identifier +# kg/quality.py compares; ci_check.py fails if one of them stops being found. +# orcid: an iD with a lower-case x, and the same iD with X +bid:inv-orcid-x a bbqs:Investigator ; + bbqs:name "Rosa Diaz" ; + bbqs:orcid . +bid:inv-orcid-X a bbqs:Investigator ; + bbqs:name "R. M. Diaz" ; + bbqs:orcid . +# doi: one DOI as a doi.org link in capitals, and bare +bid:pub-doi-c a bbqs:Publication ; + bbqs:title "A paper with its DOI as a link" ; + bbqs:doi "https://doi.org/10.1000/ABC.456"^^xsd:anyURI . +bid:pub-doi-d a bbqs:Publication ; + bbqs:title "A paper with its DOI bare" ; + bbqs:doi "10.1000/abc.456"^^xsd:anyURI . +# pmid: one PMID with a leading zero, and without +bid:pub-pmid-c a bbqs:Publication ; + bbqs:title "A paper with a padded PMID" ; + bbqs:pmid "0123458" . +bid:pub-pmid-d a bbqs:Publication ; + bbqs:title "A paper with its PMID" ; + bbqs:pmid "123458" . +# fon: one FON in lower case with spaces, and as NIH writes it +bid:fo-c a bbqs:FundingOpportunity ; + bbqs:name "A forecast" ; + bbqs:fon "rfa xx 27 003" . +bid:fo-d a bbqs:FundingOpportunity ; + bbqs:name "Its final notice" ; + bbqs:fon "RFA-XX-27-003" . +# grant_number: one award with its application type and budget year, and its core number +bid:proj-award-a a bbqs:Project ; + bbqs:name "A budget year of an award" ; + bbqs:grant_number "1R34DA000002-01" . +bid:proj-award-b a bbqs:Project ; + bbqs:name "The award" ; + bbqs:grant_number "R34DA000002" . +# A URL is a duplicate only with a name match: a landing page can serve several records (a URL +# alone is advisory; the GREEN fixture has two such pairs). So each URL pair here has one name. +# url: one notice page without its scheme and with www. in capitals, and over http with a slash +bid:fo-e a bbqs:FundingOpportunity ; + bbqs:name "A call known by its page" ; + bbqs:url "WWW.grants.nih.gov/grants/guide/rfa-files/RFA-XX-27-004.html"^^xsd:anyURI . +bid:fo-f a bbqs:FundingOpportunity ; + bbqs:name "A call known by its page." ; + bbqs:url "HTTP://grants.nih.gov/grants/guide/rfa-files/RFA-XX-27-004.html/"^^xsd:anyURI . +# external_url: one tool's page over https and over http with www. +bid:sw-a a bbqs:SoftwareTool ; + bbqs:name "Pose tool" ; + bbqs:external_url "https://github.com/bbqs-example/pose"^^xsd:anyURI . +bid:sw-b a bbqs:SoftwareTool ; + bbqs:name "Pose Tool" ; + bbqs:external_url "http://www.github.com/bbqs-example/pose/"^^xsd:anyURI . +# repo_url: one repository with the host in capitals +bid:sw-c a bbqs:SoftwareTool ; + bbqs:name "Tracking library" ; + bbqs:repo_url "https://github.com/bbqs-example/track"^^xsd:anyURI . +bid:sw-d a bbqs:SoftwareTool ; + bbqs:name "Tracking Library" ; + bbqs:repo_url "https://GitHub.com/bbqs-example/track/"^^xsd:anyURI . +# doi, spelled so that the rule cannot read it (a space inside): no key, but the same spelling +# twice, folded as written (trim, lower-case), is still one value +bid:pub-doi-e a bbqs:Publication ; + bbqs:title "A paper whose DOI was mistyped" ; + bbqs:doi "10.1000/Bad DOI"^^xsd:anyURI . +bid:pub-doi-f a bbqs:Publication ; + bbqs:title "Its second record, mistyped the same way" ; + bbqs:doi " 10.1000/bad doi "^^xsd:anyURI . +# doi, by a resolver without its scheme and by www.doi.org +bid:pub-doi-g a bbqs:Publication ; + bbqs:title "A paper with its DOI written as doi.org/..." ; + bbqs:doi "doi.org/10.1000/ABC.789"^^xsd:anyURI . +bid:pub-doi-h a bbqs:Publication ; + bbqs:title "A paper with its DOI written as www.doi.org/..." ; + bbqs:doi "https://www.doi.org/10.1000/abc.789"^^xsd:anyURI . + +# versions — a preprint and its published version: one title, two DOIs and PMIDs, the preprint the +# earlier, and no revision_of between them yet (duplicates() counts the pair to link; the GREEN +# fixture links it) +bid:pub-ver-published a bbqs:Publication ; + bbqs:title "Mapping social behavior across five species" ; + bbqs:journal "Nat Methods" ; + bbqs:doi "10.1038/s41592-000-0001-x"^^xsd:anyURI ; + bbqs:pmid "200002" ; + bbqs:year 2026 . +bid:pub-ver-preprint a bbqs:Publication ; + bbqs:title "Mapping social behavior across five species" ; + bbqs:journal "bioRxiv" ; + bbqs:doi "10.1101/2025.01.01.000001"^^xsd:anyURI ; + bbqs:pmid "200001" ; + bbqs:year 2025 . + +# versions — a Learning & Memory paper and its bioRxiv preprint: both DOIs start 10.1101/, but only +# the bioRxiv one has a preprint's shape, so this is a pair to link (not two preprints) +bid:pub-lm-paper a bbqs:Publication ; + bbqs:title "Memory consolidation across sleep in the zebra finch" ; + bbqs:journal "Learn Mem" ; + bbqs:doi "10.1101/lm.054001.124"^^xsd:anyURI ; + bbqs:pmid "300402" ; + bbqs:year 2025 . +bid:pub-lm-pre a bbqs:Publication ; + bbqs:title "Memory consolidation across sleep in the zebra finch" ; + bbqs:journal "bioRxiv" ; + bbqs:doi "10.1101/2024.05.01.590001"^^xsd:anyURI ; + bbqs:pmid "300401" ; + bbqs:year 2024 . + +# versions — publications are grouped by their title (bbqs:title, by kg/identity_keys.py title_key, +# as the database pairs them), not by the spine's name; and a Greek letter counts: the alpha pair is +# one work, the beta paper another +bid:pub-alpha-paper a bbqs:Publication ; + bbqs:name "Spine name of the alpha paper" ; + bbqs:title "α-synuclein seeds spread along connected circuits" ; + bbqs:journal "Neuron" ; + bbqs:doi "10.1016/j.neuron.2026.300702"^^xsd:anyURI ; + bbqs:pmid "300702" ; + bbqs:year 2026 . +bid:pub-alpha-pre a bbqs:Publication ; + bbqs:name "Spine name of the alpha preprint" ; + bbqs:title "α-synuclein seeds spread along connected circuits" ; + bbqs:journal "bioRxiv" ; + bbqs:doi "10.1101/2025.07.01.300701"^^xsd:anyURI ; + bbqs:pmid "300701" ; + bbqs:year 2025 . +bid:pub-beta-paper a bbqs:Publication ; + bbqs:title "β-synuclein seeds spread along connected circuits" ; + bbqs:journal "Neuron" ; + bbqs:doi "10.1016/j.neuron.2026.300703"^^xsd:anyURI ; + bbqs:pmid "300703" ; + bbqs:year 2026 . + +# version_kind — two published records and one preprint with one title, both papers linked to it: +# still a duplicate to merge (a link never resolves two published records) +bid:pub-vk2-a a bbqs:Publication ; + bbqs:title "Two published records of one paper and its preprint" ; + bbqs:journal "Neuron" ; + bbqs:doi "10.1016/j.neuron.2026.300101"^^xsd:anyURI ; + bbqs:pmid "300101" ; + bbqs:year 2026 ; + bbqs:revision_of bid:pub-vk2-pre . +bid:pub-vk2-b a bbqs:Publication ; + bbqs:title "Two published records of one paper and its preprint" ; + bbqs:journal "Neuron" ; + bbqs:doi "10.1016/j.neuron.2026.300102"^^xsd:anyURI ; + bbqs:pmid "300102" ; + bbqs:year 2026 ; + bbqs:revision_of bid:pub-vk2-pre . +bid:pub-vk2-pre a bbqs:Publication ; + bbqs:title "Two published records of one paper and its preprint" ; + bbqs:journal "bioRxiv" ; + bbqs:doi "10.1101/2025.03.01.300100"^^xsd:anyURI ; + bbqs:pmid "300100" ; + bbqs:year 2025 . + +# version_kind — two published records and one preprint with one title, nothing linked: a duplicate +# to merge first, not a pair to link (the pairing rule skips such a group). The two papers have one +# year and no PMID, so neither is "later" than the other: only the count of papers decides here. +bid:pub-vk3-a a bbqs:Publication ; + bbqs:title "Two published records of another paper and its preprint" ; + bbqs:journal "Cell" ; + bbqs:doi "10.1016/j.cell.2026.300111"^^xsd:anyURI ; + bbqs:year 2026 . +bid:pub-vk3-b a bbqs:Publication ; + bbqs:title "Two published records of another paper and its preprint" ; + bbqs:journal "Cell Rep" ; + bbqs:doi "10.1016/j.celrep.2026.300112"^^xsd:anyURI ; + bbqs:year 2026 . +bid:pub-vk3-pre a bbqs:Publication ; + bbqs:title "Two published records of another paper and its preprint" ; + bbqs:journal "bioRxiv" ; + bbqs:doi "10.1101/2025.03.02.300110"^^xsd:anyURI ; + bbqs:pmid "300110" ; + bbqs:year 2025 . + +# version_kind — a paper and two preprint records, one of which holds the paper's DOI (in another +# spelling): one record twice, whatever links them (the DOI pair is a duplicate on its own, and the +# three-record title group is one too) +bid:pub-vkd-paper a bbqs:Publication ; + bbqs:title "A paper whose DOI one of its preprint records also holds" ; + bbqs:journal "eLife" ; + bbqs:doi "10.7554/eLife.300201"^^xsd:anyURI ; + bbqs:pmid "300202" ; + bbqs:year 2026 ; + bbqs:revision_of bid:pub-vkd-pre1 , bid:pub-vkd-pre2 . +bid:pub-vkd-pre1 a bbqs:Publication ; + bbqs:title "A paper whose DOI one of its preprint records also holds" ; + bbqs:journal "bioRxiv" ; + bbqs:doi "https://doi.org/10.7554/ELIFE.300201"^^xsd:anyURI ; + bbqs:pmid "300200" ; + bbqs:year 2025 . +bid:pub-vkd-pre2 a bbqs:Publication ; + bbqs:title "A paper whose DOI one of its preprint records also holds" ; + bbqs:journal "bioRxiv" ; + bbqs:doi "10.1101/2025.04.01.300199"^^xsd:anyURI ; + bbqs:pmid "300199" ; + bbqs:year 2025 . + +# version_kind — a "preprint" later than the paper (by PubMed id, by its DOI's date and by year): +# another work with the same title, or a record with a wrong value; never a pair to link, and never +# a duplicate to merge either: versions_to_check, for a curator +bid:pub-late-paper a bbqs:Publication ; + bbqs:title "A toolbox for quantifying freely moving behavior" ; + bbqs:journal "J Neurosci" ; + bbqs:doi "10.1523/JNEUROSCI.0001-19.2019"^^xsd:anyURI ; + bbqs:pmid "300301" ; + bbqs:year 2019 . +bid:pub-late-pre a bbqs:Publication ; + bbqs:title "A toolbox for quantifying freely moving behavior" ; + bbqs:journal "bioRxiv" ; + bbqs:doi "10.1101/2025.03.03.300302"^^xsd:anyURI ; + bbqs:pmid "300302" ; + bbqs:year 2025 . + +# chronology, as version_kind() reads it from the export (kg/identity_keys.json: PubMed id first, +# then the posting date in a bioRxiv/medRxiv DOI, then the year). Each pair is one title, one +# published record and one preprint, no link; each is decided by one signal alone. +# The PubMed id alone: one year, no date in the arXiv DOI, the preprint added to PubMed after the +# paper: later (versions_to_check) +bid:pub-pmidlate-paper a bbqs:Publication ; + bbqs:title "Ordering two versions by their PubMed ids alone" ; + bbqs:journal "Neuron" ; + bbqs:doi "10.1016/j.neuron.2026.300801"^^xsd:anyURI ; + bbqs:pmid "300801" ; + bbqs:year 2026 . +bid:pub-pmidlate-pre a bbqs:Publication ; + bbqs:title "Ordering two versions by their PubMed ids alone" ; + bbqs:journal "ArXiv" ; + bbqs:doi "10.48550/arXiv.2601.300802"^^xsd:anyURI ; + bbqs:pmid "300802" ; + bbqs:year 2026 . +# The year would decide wrongly: the preprint's year (2027) is a later version's, after the paper's, +# but PubMed added it first: a pair to link (versions) +bid:pub-drift-paper a bbqs:Publication ; + bbqs:title "A preprint whose year drifted past its paper's" ; + bbqs:journal "Cell" ; + bbqs:doi "10.1016/j.cell.2026.300812"^^xsd:anyURI ; + bbqs:pmid "300812" ; + bbqs:year 2026 . +bid:pub-drift-pre a bbqs:Publication ; + bbqs:title "A preprint whose year drifted past its paper's" ; + bbqs:journal "ArXiv" ; + bbqs:doi "10.48550/arXiv.2501.300811"^^xsd:anyURI ; + bbqs:pmid "300811" ; + bbqs:year 2027 . +# The DOI's date alone: no PubMed ids; the preprint's year (2027) drifted, its DOI says it was posted +# in 2025, before the paper's 2026: a pair to link (versions) +bid:pub-posted-paper a bbqs:Publication ; + bbqs:title "A preprint dated by its bioRxiv DOI, not by its year" ; + bbqs:journal "eLife" ; + bbqs:doi "10.7554/eLife.300822"^^xsd:anyURI ; + bbqs:year 2026 . +bid:pub-posted-pre a bbqs:Publication ; + bbqs:title "A preprint dated by its bioRxiv DOI, not by its year" ; + bbqs:journal "bioRxiv" ; + bbqs:doi "10.1101/2025.08.08.300821"^^xsd:anyURI ; + bbqs:year 2027 . +# The year alone: no PubMed ids, no date in the arXiv DOI, the preprint's year after the paper's: +# later (versions_to_check) +bid:pub-yearlate-paper a bbqs:Publication ; + bbqs:title "A preprint later than its paper by year alone" ; + bbqs:journal "Neuron" ; + bbqs:doi "10.1016/j.neuron.2026.300832"^^xsd:anyURI ; + bbqs:year 2026 . +bid:pub-yearlate-pre a bbqs:Publication ; + bbqs:title "A preprint later than its paper by year alone" ; + bbqs:journal "ArXiv" ; + bbqs:doi "10.48550/arXiv.2701.300831"^^xsd:anyURI ; + bbqs:year 2027 . +# No year at all, the preprint first in PubMed: a pair to link (versions) +bid:pub-noyear-paper a bbqs:Publication ; + bbqs:title "Two versions that carry no year at all" ; + bbqs:journal "Neuron" ; + bbqs:doi "10.1016/j.neuron.300842"^^xsd:anyURI ; + bbqs:pmid "300842" . +bid:pub-noyear-pre a bbqs:Publication ; + bbqs:title "Two versions that carry no year at all" ; + bbqs:journal "bioRxiv" ; + bbqs:doi "10.1101/300841"^^xsd:anyURI ; + bbqs:pmid "300841" . + +# revision_links() — a preprint said to revise its paper: the link points the wrong way (and its +# title group is versions_to_check: a link to correct, never a merge) +bid:pub-wrongway-paper a bbqs:Publication ; + bbqs:title "A version link that points the wrong way" ; + bbqs:journal "Cell" ; + bbqs:doi "10.1016/j.cell.2026.300502"^^xsd:anyURI ; + bbqs:pmid "300502" ; + bbqs:year 2026 . +bid:pub-wrongway-pre a bbqs:Publication ; + bbqs:title "A version link that points the wrong way" ; + bbqs:journal "bioRxiv" ; + bbqs:doi "10.1101/2025.05.01.300501"^^xsd:anyURI ; + bbqs:pmid "300501" ; + bbqs:year 2025 ; + bbqs:revision_of bid:pub-wrongway-paper . + +# revision_links() — a paper said to revise the preprint of another work: the titles differ +bid:pub-other-paper a bbqs:Publication ; + bbqs:title "Song learning in the zebra finch" ; + bbqs:journal "Nature" ; + bbqs:doi "10.1038/s41586-026-300602"^^xsd:anyURI ; + bbqs:pmid "300602" ; + bbqs:year 2026 ; + bbqs:revision_of bid:pub-other-pre . +bid:pub-other-pre a bbqs:Publication ; + bbqs:title "Ultrasonic calls of the house mouse" ; + bbqs:journal "bioRxiv" ; + bbqs:doi "10.1101/2025.06.01.300601"^^xsd:anyURI ; + bbqs:pmid "300601" ; + bbqs:year 2025 . diff --git a/kg/identity_keys.json b/kg/identity_keys.json new file mode 100644 index 00000000..7bf15d38 --- /dev/null +++ b/kg/identity_keys.json @@ -0,0 +1,1054 @@ +{ + "about": "The BBQS identity keys: one normalization rule per key, written once here and implemented identically in SQL (public.kg_*_key and the pairing helpers, created by supabase/migrations/20261117181500_prevent_duplicates.sql, which builds the uq_* indexes on the identity keys), TypeScript (supabase/functions/_shared/identity-keys.ts, what the write paths look up by) and Python (kg/identity_keys.py, what kg/quality.py and the exporter use). Every implementation must return `want` for every vector: kg/ci_check.py checks Python, tests/guards/identity-normalization.test.mjs checks TypeScript, and the migration's self-test block (keys-02, generated from this file) checks Postgres when it is applied. tests/guards/kg-identity-keys.test.mjs keeps the LinkML unique_keys, the SHACL shapes, kg/quality.py and the migration in step with this file; tests/guards/kg-resource-links-parity.test.mjs does the same for resource_link_predicates.", + "conventions": { + "whitespace": "ASCII only: space, \\t, \\n, \\v, \\f, \\r. 'trim' strips these at both ends.", + "case": "ASCII only: A-Z <-> a-z; every other character is left as it is (Postgres COLLATE \"C\").", + "null": "null/None/NULL means the value has no key: it is neither enforced nor matched." + }, + "layers": { + "sql": "the function the database computes the key with; the uq_* expression unique index in `db` is built on it", + "ts": "the function in supabase/functions/_shared/identity-keys.ts", + "py": "the function in kg/identity_keys.py", + "db": "the table, column and unique index that refuse a second row with the same key", + "linkml": "the unique_keys entry in kg/bbqs.linkml.yaml (gen-owl: owl:hasKey)", + "shape": "the SHACL shape in kg/shapes/validation.shapes.ttl that finds two nodes with the same exact value in an export", + "quality": "the identifier kg/quality.py duplicates() folds with this key (its FOLD map)" + }, + "keys": { + "orcid": { + "rule": "the first match of [0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{3}[0-9Xx] anywhere in the value, upper-cased; else null", + "sql": "public.kg_orcid_key", + "ts": "orcidKey", + "py": "orcid_key", + "db": [ + { + "table": "investigators", + "column": "orcid", + "index": "uq_investigators_orcid_key" + } + ], + "linkml": [ + { + "class": "Investigator", + "key": "investigator_orcid", + "slots": [ + "orcid" + ] + } + ], + "shape": "OrcidUniquePerPersonShape", + "quality": "orcid", + "vectors": [ + [ + "0000-0002-1825-0097", + "0000-0002-1825-0097" + ], + [ + "https://orcid.org/0000-0002-1825-009x", + "0000-0002-1825-009X" + ], + [ + " orcid.org/0000-0002-1825-0097 ", + "0000-0002-1825-0097" + ], + [ + "0000000218250097", + null + ], + [ + "n/a", + null + ], + [ + "", + null + ], + [ + null, + null + ] + ] + }, + "doi": { + "rule": "trim; remove one leading resolver (an optional https?://, an optional dx. or www., then doi.org/) or 'doi' with an optional ':' and then whitespace (case-insensitive); lower-case; remove trailing '/'; must then match ^10\\.[0-9.]+/[^whitespace]+$, else null", + "sql": "public.kg_doi_key", + "ts": "doiKey", + "py": "doi_key", + "db": [ + { + "table": "publications", + "column": "doi", + "index": "uq_publications_doi_key" + } + ], + "linkml": [ + { + "class": "Publication", + "key": "publication_doi", + "slots": [ + "doi" + ] + } + ], + "shape": "DoiUniquePerPublicationShape", + "quality": "doi", + "vectors": [ + [ + "10.7554/eLife.89892", + "10.7554/elife.89892" + ], + [ + "https://doi.org/10.7554/ELIFE.89892/", + "10.7554/elife.89892" + ], + [ + "DOI: 10.1101/2023.06.25.546478", + "10.1101/2023.06.25.546478" + ], + [ + "http://dx.doi.org/10.1000/x", + "10.1000/x" + ], + [ + "doi.org/10.1000/ABC.1", + "10.1000/abc.1" + ], + [ + "https://www.doi.org/10.1000/XYZ.2", + "10.1000/xyz.2" + ], + [ + "dx.doi.org/10.1000/x", + "10.1000/x" + ], + [ + "DOI 10.1000/x", + "10.1000/x" + ], + [ + "doi10.1000/x", + "10.1000/x" + ], + [ + "https://doi.org/doi:10.1000/x", + null + ], + [ + "\t10.1000/x\n", + "10.1000/x" + ], + [ + "doi:\u00a010.1000/x", + null + ], + [ + "10.1000/a b", + null + ], + [ + "not a doi", + null + ], + [ + "10.1000/x\n/", + null + ], + [ + "", + null + ], + [ + null, + null + ] + ] + }, + "pmid": { + "rule": "trim; remove one leading 'pmid' with an optional ':' and then whitespace (case-insensitive); must be all [0-9]; remove leading zeros; null if nothing is left", + "sql": "public.kg_pmid_key", + "ts": "pmidKey", + "py": "pmid_key", + "db": [ + { + "table": "publications", + "column": "pmid", + "index": "uq_publications_pmid_key" + } + ], + "linkml": [ + { + "class": "Publication", + "key": "publication_pmid", + "slots": [ + "pmid" + ] + } + ], + "shape": "PmidUniquePerPublicationShape", + "quality": "pmid", + "vectors": [ + [ + "41331138", + "41331138" + ], + [ + " 0041331138", + "41331138" + ], + [ + "PMID: 41331138", + "41331138" + ], + [ + "pmid:41331138", + "41331138" + ], + [ + "PMID 41331138", + "41331138" + ], + [ + "pmid\t0041331138", + "41331138" + ], + [ + "4133 1138", + null + ], + [ + "41", + null + ], + [ + "0", + null + ], + [ + "abc", + null + ], + [ + "", + null + ], + [ + null, + null + ] + ] + }, + "fon": { + "rule": "upper-case; delete every character that is not A-Z or 0-9; null if empty", + "sql": "public.kg_fon_key", + "ts": "fonKey", + "py": "fon_key", + "db": [ + { + "table": "funding_opportunities", + "column": "fon", + "index": "uq_funding_opportunities_fon_key" + } + ], + "linkml": [ + { + "class": "FundingOpportunity", + "key": "funding_fon", + "slots": [ + "fon" + ] + } + ], + "shape": "FonUniquePerCallShape", + "quality": "fon", + "vectors": [ + [ + "RFA-NS-27-002", + "RFANS27002" + ], + [ + "rfa ns 27 002", + "RFANS27002" + ], + [ + "NSF 26-526", + "NSF26526" + ], + [ + "Straße-1", + "STRAE1" + ], + [ + " ", + null + ], + [ + null, + null + ] + ] + }, + "award": { + "rule": "upper-case; the first match of [A-Z][A-Z0-9]{2}[A-Z]{2}[0-9]{6} (the NIH core award) if any; else the upper-cased value with all whitespace removed; null if empty", + "sql": "public.kg_award_key", + "ts": "awardKey", + "py": "award_key", + "db": [ + { + "table": "grants", + "column": "grant_number", + "index": "uq_grants_award_key" + }, + { + "table": "projects", + "column": "grant_number", + "index": "uq_projects_award_key" + } + ], + "linkml": [ + { + "class": "Project", + "key": "project_award", + "slots": [ + "grant_number" + ] + } + ], + "shape": "AwardUniquePerProjectShape", + "quality": "grant_number", + "vectors": [ + [ + "1U01MH143789-01", + "U01MH143789" + ], + [ + "5r34da059506-02", + "R34DA059506" + ], + [ + "RF1MH999999", + "RF1MH999999" + ], + [ + "1UG3NS999999-01A1", + "UG3NS999999" + ], + [ + "NSF 2123456", + "NSF2123456" + ], + [ + "", + null + ], + [ + null, + null + ] + ] + }, + "nih_award_core": { + "rule": "the first match of [A-Z][A-Z0-9]{2}[A-Z]{2}[0-9]{6} in the upper-cased value; else null. What a write path stores as grant_number and sends to create_grant/repoint_grant/nih-grants.", + "ts": "nihAwardCore", + "py": "nih_award_core", + "vectors": [ + [ + "1U01MH143789-01", + "U01MH143789" + ], + [ + "5r34da059506-02", + "R34DA059506" + ], + [ + "1UG3NS999999-01A1", + "UG3NS999999" + ], + [ + "NSF 2123456", + null + ], + [ + null, + null + ] + ] + }, + "name": { + "rule": "Unicode NFKD; each Greek letter written as its name (the table `greek`: α and Α are alpha; NFKD makes the micro sign mu and the ohm sign omega); lower-case; delete every character that is not a-z or 0-9; null if empty", + "sql": "public.kg_name_key", + "ts": "nameKey", + "py": "name_key", + "db": [ + { + "table": "organizations", + "column": "name", + "index": "uq_organizations_name_key" + } + ], + "linkml": [ + { + "class": "ResearchOrganization", + "key": "organization_name", + "slots": [ + "name" + ] + } + ], + "greek": { + "Α": "alpha", + "Β": "beta", + "Γ": "gamma", + "Δ": "delta", + "Ε": "epsilon", + "Ζ": "zeta", + "Η": "eta", + "Θ": "theta", + "Ι": "iota", + "Κ": "kappa", + "Λ": "lambda", + "Μ": "mu", + "Ν": "nu", + "Ξ": "xi", + "Ο": "omicron", + "Π": "pi", + "Ρ": "rho", + "Σ": "sigma", + "Τ": "tau", + "Υ": "upsilon", + "Φ": "phi", + "Χ": "chi", + "Ψ": "psi", + "Ω": "omega", + "α": "alpha", + "β": "beta", + "γ": "gamma", + "δ": "delta", + "ε": "epsilon", + "ζ": "zeta", + "η": "eta", + "θ": "theta", + "ι": "iota", + "κ": "kappa", + "λ": "lambda", + "μ": "mu", + "ν": "nu", + "ξ": "xi", + "ο": "omicron", + "π": "pi", + "ρ": "rho", + "ς": "sigma", + "σ": "sigma", + "τ": "tau", + "υ": "upsilon", + "φ": "phi", + "χ": "chi", + "ψ": "psi", + "ω": "omega" + }, + "vectors": [ + [ + "UNIVERSITY OF CALIFORNIA, SAN DIEGO", + "universityofcaliforniasandiego" + ], + [ + "University of California San Diego", + "universityofcaliforniasandiego" + ], + [ + "CHILDREN'S HOSP OF PHILADELPHIA", + "childrenshospofphiladelphia" + ], + [ + "Université Paris Cité", + "universitepariscite" + ], + [ + "İstanbul Üniversitesi", + "istanbuluniversitesi" + ], + [ + "Straße", + "strae" + ], + [ + "\u212aelvin Lab", + "kelvinlab" + ], + [ + "Bijan Pesaran", + "bijanpesaran" + ], + [ + "Laboratory of α-Synuclein Biology", + "laboratoryofalphasynucleinbiology" + ], + [ + "Σ-Ω Center", + "sigmaomegacenter" + ], + [ + "\u00b5-Lab", + "mulab" + ], + [ + "Λόγος Institute", + "lambdaomicrongammaomicronsigmainstitute" + ], + [ + "北京大学", + null + ], + [ + " ", + null + ], + [ + null, + null + ] + ] + }, + "url": { + "rule": "trim; remove one leading https?:// if there is one, and then one leading www. if there is one (case-insensitive); remove trailing '/'; lower-case; null if empty. Not an identity key: a URL can be a landing page that several records share (a programme or topic page lists many funding calls; a lab's homepage, many tools), so no database index is built on it, and kg/quality.py duplicates() counts a shared URL as a possible duplicate only when the names match too (otherwise it is advisory)", + "ts": "urlKey", + "py": "url_key", + "quality": "url", + "vectors": [ + [ + "https://www.grants.nih.gov/grants/guide/rfa-files/RFA-NS-27-002.html", + "grants.nih.gov/grants/guide/rfa-files/rfa-ns-27-002.html" + ], + [ + "HTTP://grants.nih.gov/grants/guide/rfa-files/RFA-NS-27-002.html/", + "grants.nih.gov/grants/guide/rfa-files/rfa-ns-27-002.html" + ], + [ + "www.example.org/a", + "example.org/a" + ], + [ + "https://example.org/a", + "example.org/a" + ], + [ + "WWW.Example.org/A/", + "example.org/a" + ], + [ + "https://example.org/cafÉ", + "example.org/cafÉ" + ], + [ + "", + null + ], + [ + null, + null + ] + ] + }, + "title": { + "rule": "remove every <...> tag, then the name rule (so Greek letters count: α-synuclein and β-synuclein are two titles). Not a key: it pairs a preprint with its published version.", + "sql": "public.kg_title_key", + "ts": "titleKey", + "py": "title_key", + "vectors": [ + [ + "CaBLAM: a high-contrast bioluminescent Ca2+ indicator", + "cablamahighcontrastbioluminescentca2indicator" + ], + [ + "CaBLAM! a high-contrast bioluminescent Ca[2+] indicator", + "cablamahighcontrastbioluminescentca2indicator" + ], + [ + "Ca²⁺ imaging", + "ca2imaging" + ], + [ + "α-synuclein aggregation in dopaminergic neurons", + "alphasynucleinaggregationindopaminergicneurons" + ], + [ + "β-synuclein aggregation in dopaminergic neurons", + "betasynucleinaggregationindopaminergicneurons" + ], + [ + "\u00b5-opioid receptors and θ/γ coupling", + "muopioidreceptorsandthetagammacoupling" + ], + [ + "μ-opioid receptors and Θ/Γ coupling", + "muopioidreceptorsandthetagammacoupling" + ], + [ + null, + null + ] + ] + }, + "preprint": { + "rule": "the lower-cased journal contains one of the venues, or the DOI key starts with one of the doi_prefixes, or matches one of the doi_patterns: a bioRxiv or medRxiv DOI is 10.1101/, an optional posting date (YYYY.MM.DD.) and at least six digits. The Cold Spring Harbor journals publish under 10.1101/ too (Genome Res 10.1101/gr..., Genes Dev 10.1101/gad..., Learn Mem 10.1101/lm...): those are not preprints", + "sql": "public.kg_is_preprint", + "ts": "isPreprint", + "py": "is_preprint", + "args": [ + "journal", + "doi" + ], + "venues": [ + "biorxiv", + "medrxiv", + "arxiv", + "research square", + "res sq", + "ssrn", + "psyarxiv", + "preprints" + ], + "doi_prefixes": [ + "10.64898/", + "10.48550/", + "10.21203/", + "10.2139/", + "10.31234/", + "10.20944/" + ], + "doi_patterns": [ + "^10\\.1101/([0-9]{4}\\.[0-9]{2}\\.[0-9]{2}\\.)?[0-9]{6,}" + ], + "vectors": [ + [ + [ + "bioRxiv", + "10.64898/2026.06.01.728862" + ], + true + ], + [ + [ + "Nat Methods", + "10.1038/s41592-025-02972-0" + ], + false + ], + [ + [ + "ArXiv", + null + ], + true + ], + [ + [ + "Res Sq", + "10.21203/rs.3.rs-1/v1" + ], + true + ], + [ + [ + null, + "https://doi.org/10.1101/2023.03.11.532197" + ], + true + ], + [ + [ + "Learn Mem", + "10.1101/lm.054001.124" + ], + false + ], + [ + [ + "Genome Res", + "https://doi.org/10.1101/gr.279001.124" + ], + false + ], + [ + [ + null, + "10.1101/gad.350000.122" + ], + false + ], + [ + [ + null, + "10.1101/2024.05.01.590001" + ], + true + ], + [ + [ + null, + "10.1101/087593" + ], + true + ], + [ + [ + null, + "doi:10.1101/2020.03.17.20037572" + ], + true + ], + [ + [ + "Elife", + "10.7554/eLife.89892" + ], + false + ], + [ + [ + null, + null + ], + false + ] + ] + }, + "chronology": { + "rule": "is the preprint later than its published version? First by PubMed id, when both have one and the two differ: their pmid keys compared as numbers (PubMed numbers its records in the order it adds them). Otherwise by the earliest date known of the preprint against the published year: the year of the posting date a dated bioRxiv/medRxiv DOI carries (doi_date: 10.1101/ or 10.64898/, then YYYY.MM.DD.), else the preprint's own year; it is later when that year is after the published year. Otherwise false, as nothing says so. A preprint's own year is no posting date: bioRxiv and PubMed give it the year of its latest version, so it drifts later as new versions are posted (6 of the 15 dated bioRxiv records of the 2026-11-17 export have a year 1 or 2 years after the date in their DOI). So the year only breaks a tie: it never outvotes the PubMed id or the DOI's date. A preprint that is later is no earlier version: public.kg_link_publication_versions skips the pair and says how a curator links it by hand if they find it one work after all, and kg/quality.py lists its group as versions_to_check, never as a duplicate to merge. The database records a year and no date.", + "sql": "public.kg_preprint_is_later", + "ts": "preprintIsLater", + "py": "preprint_is_later", + "args": [ + "preprint_year", + "preprint_pmid", + "preprint_doi", + "published_year", + "published_pmid" + ], + "doi_date": "^10\\.(?:1101|64898)/([0-9]{4})\\.[0-9]{2}\\.[0-9]{2}\\.[0-9]{6,}", + "vectors": [ + [ + [ + 2025, + "41040807", + null, + 2025, + "42131509" + ], + false + ], + [ + [ + 2026, + "90000017", + null, + 2026, + "90000016" + ], + true + ], + [ + [ + 2026, + "90000016", + null, + 2026, + "90000017" + ], + false + ], + [ + [ + 2027, + "37425712", + "10.1101/2023.06.25.546478", + 2026, + "41331138" + ], + false + ], + [ + [ + 2027, + "37425712", + null, + 2026, + "41331138" + ], + false + ], + [ + [ + 2025, + "99999999", + null, + 2026, + "10000000" + ], + true + ], + [ + [ + 2027, + "37425712", + "10.1101/2027.01.01.546478", + 2026, + "41331138" + ], + false + ], + [ + [ + null, + "200002", + null, + null, + "200001" + ], + true + ], + [ + [ + null, + "PMID: 0200001", + null, + 2026, + "200002" + ], + false + ], + [ + [ + 2026, + "123456789012345678901", + null, + null, + "99" + ], + true + ], + [ + [ + 2027, + null, + "10.1101/2025.04.04.640001", + 2026, + null + ], + false + ], + [ + [ + 2025, + null, + "https://doi.org/10.1101/2027.01.05.640002", + 2026, + null + ], + true + ], + [ + [ + 2027, + null, + "10.1101/2026.02.02.640003", + 2026, + null + ], + false + ], + [ + [ + null, + null, + "10.64898/2027.06.01.728862", + 2026, + null + ], + true + ], + [ + [ + null, + null, + "doi:10.1101/2020.03.17.20037572", + 2019, + null + ], + true + ], + [ + [ + 2027, + null, + "10.1101/087593", + 2026, + null + ], + true + ], + [ + [ + 2027, + null, + "10.21203/rs.3.rs-1/v1", + 2026, + null + ], + true + ], + [ + [ + 2026, + "abc", + null, + 2026, + "123" + ], + false + ], + [ + [ + 2027, + "abc", + null, + 2026, + "123" + ], + true + ], + [ + [ + 2027, + "41331138", + null, + 2026, + "0041331138" + ], + true + ], + [ + [ + 2025, + null, + null, + 2026, + null + ], + false + ], + [ + [ + 2026, + null, + null, + 2025, + null + ], + true + ], + [ + [ + null, + null, + "10.1101/2027.01.05.640002", + null, + null + ], + false + ], + [ + [ + null, + null, + null, + null, + null + ], + false + ] + ] + } + }, + "existing": [ + { + "key": "email", + "sql": "lower(btrim(email))", + "db": [ + { + "table": "investigators", + "column": "email", + "index": "investigators_email_unique_ci" + } + ], + "linkml": [ + { + "class": "Investigator", + "key": "investigator_email", + "slots": [ + "email" + ] + } + ], + "shape": "EmailUniquePerPersonShape" + }, + { + "key": "dandiset", + "db": [ + { + "table": "dandisets", + "columns": [ + "instance", + "dandiset_id" + ], + "index": "(instance, dandiset_id) unique, 20260524231145" + } + ], + "linkml": [ + { + "class": "Dandiset", + "key": "dandiset_archive_id", + "slots": [ + "dandi_instance", + "dandiset_id" + ] + } + ] + }, + { + "key": "ror", + "db": [], + "linkml": [ + { + "class": "ResearchOrganization", + "key": "organization_ror", + "slots": [ + "ror_id" + ] + } + ], + "note": "organizations has no ROR column yet; declared so the schema states the rule when one is added." + } + ], + "one_row_per_node": [ + "investigators", + "organizations", + "grants", + "publications", + "software_tools", + "funding_opportunities", + "dandisets", + "species", + "device_models", + "device_manufacturers", + "device_categories", + "jobs", + "announcements" + ], + "resource_link_predicates": [ + "trained_on", + "evaluates", + "was_attributed_to", + "produced", + "revision_of" + ] +} diff --git a/kg/identity_keys.py b/kg/identity_keys.py new file mode 100644 index 00000000..a188981d --- /dev/null +++ b/kg/identity_keys.py @@ -0,0 +1,234 @@ +#!/usr/bin/env python3 +"""The BBQS identity keys: when two records are the same thing, decided by one rule per key. + +Each rule is stated once, in kg/identity_keys.json, with the vectors that pin it down, and is +implemented three times, identically: + + SQL public.kg__key (supabase/migrations/*_prevent_duplicates.sql; the uq_* indexes) + TypeScript supabase/functions/_shared/identity-keys.ts (what the write paths look up by) + Python this module (kg/quality.py duplicates(), publications() and the revision_of + checks; the exporter's ORCID and award forms) + +Two of the rules are not identity keys. url_key folds a URL, which duplicates() compares but no +index enforces: a URL can be a landing page that several records share. title_key, is_preprint and +preprint_is_later are the pairing rule's parts: public.kg_link_publication_versions links a +preprint to its published version by them, and kg/quality.py groups publications by title_key of +their bbqs:title, so the export sees the pairs the database makes. + +Every implementation must return `want` for every vector. kg/ci_check.py runs this module on them +(`check()`), tests/guards/identity-normalization runs the TypeScript, and the migration's self-test +block runs the SQL when it is applied. tests/guards/kg-identity-keys keeps the declarations in step. + +The conventions are what Postgres (COLLATE "C"), JavaScript and Python can all do the same way: + + * whitespace is ASCII only: space, \\t, \\n, \\v, \\f, \\r. "Trim" strips those at both ends; + * case is mapped for A-Z / a-z only, with str.translate, never .lower() or .casefold() + ('ß'.casefold() is 'ss', and İ lower-cases to two characters); + * digits are [0-9], never \\d, which also matches other scripts' digits; + * a regex with IGNORECASE also has re.ASCII (otherwise 'k' matches the Kelvin sign), and a whole + value is tested with fullmatch ('$' also matches before a trailing newline); + * None means no key: the value is neither enforced nor matched, so two missing values never collide. + +Standard library only: run `python kg/identity_keys.py` to check this module against the vectors. +""" +import json +import re +import string +import sys +import unicodedata +from pathlib import Path + +HERE = Path(__file__).resolve().parent +SPEC = HERE / "identity_keys.json" + +_WS = " \t\n\v\f\r" +_LOWER = str.maketrans(string.ascii_uppercase, string.ascii_lowercase) +_UPPER = str.maketrans(string.ascii_lowercase, string.ascii_uppercase) +_ORCID = re.compile(r"[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{3}[0-9Xx]") +# A resolver (scheme optional, then dx. or www. optional, then doi.org/), or "doi", ":" optional. +_DOI_PREFIX = re.compile(r"^((https?://)?((dx|www)\.)?doi\.org/|doi:?[ \t\n\v\f\r]*)", re.I | re.A) +_DOI = re.compile(r"10\.[0-9.]+/[^ \t\n\v\f\r]+") +_PMID_PREFIX = re.compile(r"^pmid:?[ \t\n\v\f\r]*", re.I | re.A) +_DIGITS = re.compile(r"[0-9]+") +_AWARD = re.compile(r"[A-Z][A-Z0-9]{2}[A-Z]{2}[0-9]{6}") +_URL_PREFIX = re.compile(r"^(https?://)?(www\.)?", re.I | re.A) +_TAG = re.compile(r"<[^>]*>") + +# Greek letters by name, so that the name and title rules keep them: alpha-synuclein and +# beta-synuclein are two titles, not one. Every capital (U+0391-U+03A9) and small letter +# (U+03B1-U+03C9) of the basic Greek block, and the final sigma, in alphabet order. NFKD has mapped +# the compatibility forms onto these already: the micro sign to mu, the ohm sign to omega, the +# theta, phi, pi, kappa, rho and beta symbols to their letters, an accented letter to the letter and +# a combining mark. Any other Greek character is deleted with the rest of what is not a-z or 0-9. +_GREEK_NAMES = ("alpha", "beta", "gamma", "delta", "epsilon", "zeta", "eta", "theta", "iota", "kappa", + "lambda", "mu", "nu", "xi", "omicron", "pi", "rho", "sigma", "tau", "upsilon", "phi", "chi", + "psi", "omega") +_CAPITALS = [c for c in range(0x0391, 0x03AA) if c != 0x03A2] # U+03A2 is unassigned +_SMALL = [c for c in range(0x03B1, 0x03CA) if c != 0x03C2] # U+03C2 is the final sigma +GREEK = {chr(c): n for row in (_CAPITALS, _SMALL) for c, n in zip(row, _GREEK_NAMES)} | {chr(0x03C2): "sigma"} +_GREEK = str.maketrans(GREEK) + +# Where a preprint lives: by venue name (lower-cased journal contains one), by DOI prefix, or by +# the shape of a bioRxiv/medRxiv DOI. "res sq" is PubMed's abbreviation for Research Square; +# 10.64898/ is bioRxiv's 2026 DOI prefix. 10.1101/ is not a prefix here: Cold Spring Harbor +# Laboratory Press publishes Genome Res, Genes Dev and Learn Mem under it too (10.1101/gr..., +# 10.1101/gad..., 10.1101/lm...), so a bioRxiv or medRxiv DOI is told by its shape: 10.1101/, an +# optional posting date, and at least six digits. +PREPRINT_VENUES = ("biorxiv", "medrxiv", "arxiv", "research square", "res sq", "ssrn", "psyarxiv", "preprints") +PREPRINT_DOI_PREFIXES = ("10.64898/", "10.48550/", "10.21203/", "10.2139/", "10.31234/", "10.20944/") +PREPRINT_DOI_PATTERNS = (r"^10\.1101/([0-9]{4}\.[0-9]{2}\.[0-9]{2}\.)?[0-9]{6,}",) +_PREPRINT_DOI = [re.compile(p, re.A) for p in PREPRINT_DOI_PATTERNS] +# The posting date a bioRxiv or medRxiv DOI carries (10.1101/ or bioRxiv's 2026 prefix 10.64898/, +# then YYYY.MM.DD.): the date the first version was posted. Its group 1 is the year. +PREPRINT_DOI_DATE = r"^10\.(?:1101|64898)/([0-9]{4})\.[0-9]{2}\.[0-9]{2}\.[0-9]{6,}" +_PREPRINT_DOI_DATE = re.compile(PREPRINT_DOI_DATE, re.A) + + +def _text(v) -> str: + return str(v) + + +def orcid_key(v): + """The first ORCID iD anywhere in the value, upper-cased ('…-009x' -> '…-009X'); else None.""" + m = _ORCID.search(_text(v)) if v is not None else None + return m.group(0).translate(_UPPER) if m else None + + +def doi_key(v): + """A DOI without its resolver ('https://doi.org/', 'doi.org/', 'www.doi.org/', 'dx.doi.org/') or its + 'doi:' / 'doi ', lower-cased, no trailing '/'; None unless it is a DOI.""" + if v is None: + return None + d = _DOI_PREFIX.sub("", _text(v).strip(_WS), count=1).translate(_LOWER).rstrip("/") + return d if _DOI.fullmatch(d) else None + + +def pmid_key(v): + """A PubMed id as digits without leading zeros ('PMID: 0041331138', 'PMID 41331138' -> '41331138'); else None.""" + if v is None: + return None + p = _PMID_PREFIX.sub("", _text(v).strip(_WS), count=1) + return (p.lstrip("0") or None) if _DIGITS.fullmatch(p) else None + + +def fon_key(v): + """A funding opportunity number upper-cased, letters and digits only ('rfa ns 27 002' -> 'RFANS27002').""" + return None if v is None else (re.sub(r"[^A-Z0-9]", "", _text(v).translate(_UPPER)) or None) + + +def nih_award_core(v): + """The NIH core award number in a grant number ('1R34DA059723-01' -> 'R34DA059723'); else None. + What a write path stores as grant_number, and what the exporter links a dandiset's award by.""" + m = _AWARD.search(_text(v).translate(_UPPER)) if v is not None else None + return m.group(0) if m else None + + +def award_key(v): + """A grant's identity: its NIH core when it has one, else the number upper-cased without whitespace.""" + if v is None: + return None + return nih_award_core(v) or (re.sub(r"[ \t\n\v\f\r]", "", _text(v).translate(_UPPER)) or None) + + +def name_key(v): + """A name compared without case, accents, punctuation or spacing: NFKD, each Greek letter by its + name (GREEK), then a-z and 0-9 only. It catches case, punctuation, spacing and accents + ('UNIVERSITY OF CALIFORNIA, SAN DIEGO' = 'University of California San Diego', 'Université' = + 'Universite'); it misses other wording ('State University of New York at Stony Brook' is not + 'STATE UNIVERSITY NEW YORK STONY BROOK'), which is what an organization's ROR id is for.""" + if v is None: + return None + s = unicodedata.normalize("NFKD", _text(v)).translate(_GREEK).translate(_LOWER) + return re.sub(r"[^a-z0-9]", "", s) or None + + +def url_key(v): + """A URL without its scheme, a leading www., or a trailing '/', lower-cased ('www.x.org/a' = + 'https://x.org/a/'). Not an identity key: duplicates() compares it, no database index enforces it.""" + if v is None: + return None + return _URL_PREFIX.sub("", _text(v).strip(_WS), count=1).rstrip("/").translate(_LOWER) or None + + +def title_key(v): + """A title without markup, by the name rule ('Ca2+' = 'Ca[2+]'; 'alpha-synuclein' and + 'beta-synuclein', written in Greek, stay apart). Not a key: it pairs a preprint with its published + version (public.kg_link_publication_versions), and kg/quality.py groups publications by it.""" + return None if v is None else name_key(_TAG.sub("", _text(v))) + + +def is_preprint(journal, doi) -> bool: + """Is a paper with this journal and DOI a preprint? By its venue, its DOI's prefix, or the shape of + a bioRxiv/medRxiv DOI (a Genome Res, Genes Dev or Learn Mem DOI, also 10.1101/, is no preprint).""" + j = _text(journal if journal is not None else "").translate(_LOWER) + d = doi_key(doi) or "" + return (any(x in j for x in PREPRINT_VENUES) or d.startswith(PREPRINT_DOI_PREFIXES) + or any(p.search(d) for p in _PREPRINT_DOI)) + + +def posted_year(doi): + """The year a dated bioRxiv/medRxiv DOI was posted ('10.1101/2023.06.25.546478' -> 2023); else None.""" + m = _PREPRINT_DOI_DATE.search(doi_key(doi) or "") + return int(m.group(1)) if m else None + + +def preprint_is_later(preprint_year, preprint_pmid, preprint_doi, published_year, published_pmid) -> bool: + """Is the preprint later than its published version? First by PubMed id, when both have one and they + differ (their keys, as numbers: PubMed numbers records in the order it adds them). Otherwise by the + preprint's earliest known date against the published year: the posting year in a dated + bioRxiv/medRxiv DOI, else the preprint's own year. Else False, as nothing says so. + + The preprint's own year only breaks a tie. bioRxiv and PubMed give a preprint the year of its + latest version, so that year drifts later as versions are posted: CaBLAM's preprint, posted on + 2023-06-25, has the year 2025. Deciding by it first would refuse real pairs. The pairing rule never + links a preprint that is later: it is another work with the same title, or a record with a wrong + PMID, DOI or year.""" + a, b = pmid_key(preprint_pmid), pmid_key(published_pmid) + if a is not None and b is not None and a != b: + return int(a) > int(b) + first = posted_year(preprint_doi) + if first is None: + first = preprint_year + return first is not None and published_year is not None and first > published_year + + +def load_spec(path=SPEC) -> dict: + return json.loads(Path(path).read_text(encoding="utf-8")) + + +def check(spec: dict | None = None) -> list[str]: + """Every way this module disagrees with kg/identity_keys.json: a vector it gets wrong, a function + the JSON names that is not here, a preprint list or the Greek table that differs. Empty when they + agree. A vector whose input is a list is the function's arguments (preprint, chronology).""" + spec = spec if spec is not None else load_spec() + problems = [] + for name, key in spec["keys"].items(): + fn = globals().get(key.get("py", "")) + if not callable(fn): + problems.append(f"{name}: kg/identity_keys.py has no function {key.get('py')!r}") + continue + for given, want in key["vectors"]: + got = fn(*given) if isinstance(given, list) else fn(given) + if got != want: + problems.append(f"{name}: {key['py']}({given!r}) is {got!r}, the vector says {want!r}") + pre = spec["keys"].get("preprint", {}) + for field, mine in (("venues", PREPRINT_VENUES), ("doi_prefixes", PREPRINT_DOI_PREFIXES), + ("doi_patterns", PREPRINT_DOI_PATTERNS)): + if sorted(pre.get(field, [])) != sorted(mine): + problems.append(f"preprint {field}: kg/identity_keys.py has {sorted(mine)}, the JSON {sorted(pre.get(field, []))}") + date = spec["keys"].get("chronology", {}).get("doi_date") + if date != PREPRINT_DOI_DATE: + problems.append(f"chronology doi_date: kg/identity_keys.py has {PREPRINT_DOI_DATE!r}, the JSON {date!r}") + greek = spec["keys"].get("name", {}).get("greek", {}) + if greek != GREEK: + diff = sorted(set(greek.items()) ^ set(GREEK.items())) + problems.append(f"name greek: kg/identity_keys.py's GREEK and the JSON's table differ: {diff[:6]}") + return problems + + +if __name__ == "__main__": + spec = load_spec(sys.argv[1] if len(sys.argv) > 1 else SPEC) + bad = check(spec) + n = sum(len(k["vectors"]) for k in spec["keys"].values()) + print("\n".join(bad) if bad else f"kg/identity_keys.py agrees with all {n} vectors") + sys.exit(1 if bad else 0) diff --git a/kg/main.py b/kg/main.py index 9c8aa86c..00237148 100644 --- a/kg/main.py +++ b/kg/main.py @@ -2,7 +2,7 @@ """Run the whole BBQS KG pipeline, as one object, with one command: 1. export() -- pull from Supabase into instance Turtle - 2. validate() -- check the export against the SHACL consistency shapes + 2. validate() -- check the export against the SHACL validation shapes 3. reason() -- check the export + OWL TBox for logical contradictions (HermiT) 4. export_explorer_json() -- build the BBQS Explorer JSON from the same graph diff --git a/kg/mcp_server.py b/kg/mcp_server.py new file mode 100644 index 00000000..07c2d41e --- /dev/null +++ b/kg/mcp_server.py @@ -0,0 +1,1611 @@ +#!/usr/bin/env python3 +# /// script +# requires-python = ">=3.10" +# dependencies = ["mcp==2.3.0", "rdflib==7.6.0"] +# /// +"""BBQS knowledge graph over MCP: read-only traversal of the exported graph, held in memory. + +One file, one job. It loads the Turtle the exporter writes (kg/export.py) and answers graph +questions over MCP. There is no database behind it, no edge function, no credential and no write +path: all it can do is read a graph it was handed. + + python kg/mcp_server.py # stdio: Claude Desktop, Claude Code, Cursor, ... + python kg/mcp_server.py --http --port 8000 # streamable HTTP at /mcp, for a hosted endpoint + python kg/mcp_server.py --check # load the graph, print what it holds, exit + uv run kg/mcp_server.py # same, the header above supplies the dependencies + +Where the graph comes from (--source or BBQS_KG_SOURCE, a path or a URL): by default the copy the +site publishes on every deploy and once a day, falling back to the export committed next to this +file. It is re-read every --refresh hours, and describe_graph says which copy is being served and +from when, so a stale answer is visible instead of silent. + +The traversal view. Nodes are the typed resources in the graph; a link is a triple between two of +them. Two things are done so that a hop means something: + * a ProjectRole record (one grant-roster row) becomes ONE `has_role` link from the person to the + project, carrying the role, instead of a node sitting in the middle; + * an outside identifier that two or more nodes carry (the same ORCID iD on an investigator and + in a paper's author list) becomes a node, so that match can be walked. +sparql_query sees the graph exactly as exported, without either. + +How "related" is decided. find_related and find_paths rank by spreading activation, the account in +psychology of how one idea brings up another: activation leaves the starting node along every link, +each node it reaches splits what it received equally among the nodes it is linked to, and amounts +that arrive together add up. Nodes are still listed nearest first, as get_neighbors lists them; the +rule decides the order among nodes equally far away, and gives the number shown. Three steps of +arithmetic with nothing to tune: KG._wave is the rule, KG.paths applies the same division to one +path at a time, and kg/README.md works an example by hand. +""" +import argparse +import bisect +import contextvars +import functools +import heapq +import json +import math +import os +import re +import subprocess +import sys +import threading +import time +import unicodedata +import urllib.error +import urllib.request +from collections import Counter, defaultdict +from dataclasses import dataclass, field +from datetime import date, datetime, timezone +from datetime import time as clock_time +from decimal import ROUND_HALF_UP, Context, Decimal +from email.utils import parsedate_to_datetime +from fractions import Fraction +from pathlib import Path +from typing import Annotated, Any, NamedTuple +from typing import Literal as OneOf + +from rdflib import BNode, Graph, Literal, URIRef +from rdflib.namespace import RDF +from rdflib.plugins.sparql import prepareQuery +from rdflib.plugins.sparql.parserutils import CompValue +from rdflib.util import guess_format + +__version__ = "0.2.0" + +HERE = Path(__file__).resolve().parent +BUNDLED_EXPORT = HERE / "export" / "bbqs.ttl" +SCHEMA_FILE = HERE / "bbqs.owl.ttl" # definitions of classes and properties, if at hand +PUBLISHED_EXPORT = "https://brain-bbqs.org/kg/bbqs.ttl" # written by .github/workflows/publish.yml +# The export committed to main, for a server run without the repository (from its GitHub URL, say). +GITHUB_EXPORT = "https://raw.githubusercontent.com/brain-bbqs/bbqs-app/main/kg/export/bbqs.ttl" +SCHEMA_NS = "https://brain-bbqs.org/schema#" +ID_NS = "https://brain-bbqs.org/id/" +PREFIXES = {"bbqs": SCHEMA_NS, "bid": ID_NS, "rdf": str(RDF), "xsd": "http://www.w3.org/2001/XMLSchema#"} + +# The schema terms this file knows by name. test_mcp_server.py checks each one against +# bbqs.owl.ttl, so a renamed slot fails a test instead of quietly emptying a tool's answers. +LABEL_PREDICATES = ("name", "title", "label", "common_name", "model_name") # as kg/quality.py +IDENTIFIER_PREDICATES = ("grant_number", "reporter_project_num", "fon", "doi", "pmid", "orcid", + "category_key", "aliases") +PROJECT_LABEL = ("Project", "grant_number", "title") # a project is shown as " · " +CAREER_LABEL = "consortium_role" # free text on a person; never a role on a project (issue #283) +# class -> how one of its records becomes a single link. `edge` is this view's own name for the +# link, not a schema term. +FOLDED = { + "ProjectRole": {"edge": "has_role", "from": "held_by", "to": "on_project", + "attrs": {"role": "project_role", "role_source": "role_source"}}, +} +EXTERNAL = "External" # node type for an outside identifier shared by two or more nodes +UNRESOLVED = "Unresolved" # ... and for an id of this graph that links point at but nothing describes + +MIN_ID = 8 # shortest id shown; longer where two ids start alike +MAX_DEPTH = 4 # get_neighbors +HUB_LINKS = 30 # get_neighbors does not walk through a node with more links than this +MAX_HOPS = 8 # find_paths +MAX_SEEDS = 5 # find_related: starting nodes in one question +PATH_STEPS = 50_000 # find_paths stops exploring longer paths after this many steps +SHORTEST_STEPS = 50_000 # ... and listing the shortest ones after this many (a deep page can ask for many) +SPARQL_SECONDS = 10.0 # time budget for one sparql_query +MAX_ROWS = 1000 +FETCH_SECONDS = 10 +MAX_BYTES = 64 * 1024 * 1024 + + +class KGError(ValueError): + """Something the caller can fix: an unknown node, a bad argument, a rejected query. Its text is + sent back as the tool's error, so it says what to do next.""" + + +class _OutOfTime(Exception): + pass + + +_deadline: contextvars.ContextVar = contextvars.ContextVar("sparql_deadline", default=None) + + +class _BudgetedGraph(Graph): + """A Graph whose lookups stop once the running query's time budget is spent. rdflib has no + query timeout, but every join step of its evaluator comes through triples(), which makes it + the one place a runaway query (a cross product, an open-ended property path) can be stopped.""" + + def triples(self, triple): + deadline = _deadline.get() + for found in super().triples(triple): + if deadline is not None and time.monotonic() > deadline: + raise _OutOfTime + yield found + + +# ---- small helpers ------------------------------------------------------------------------------- + +def _local(iri: str) -> str: + return iri.rsplit("#", 1)[-1] if "#" in iri else iri.rstrip("/").rsplit("/", 1)[-1] + + +def _plain(value: Literal): + """A literal as a JSON value: a number as a number, a truth value as one, a date or time as ISO + text, and anything else (text, an ill-typed value, a type JSON has no form for) as its text. + rdflib has already written a truth value as true or false, whatever the file said.""" + v = value.toPython() + if isinstance(v, Literal): # ill-typed, e.g. a sentence in an integer field: keep the text + return str(v) + if isinstance(v, float) and not math.isfinite(v): + return _non_finite(v) # NaN and INF have no JSON form + if isinstance(v, (int, float, str)): + return v + if isinstance(v, Decimal): + return int(v) if v == v.to_integral_value() else float(v) + if isinstance(v, (date, datetime, clock_time)): + return v.isoformat() + return str(value) # e.g. hexBinary or an XML literal: as written, not as Python shows it + + +def _link_shown(link: "Link") -> dict: + """One link as a reply shows it: its type, which way it points, and what its record carries.""" + return {"edge": link.edge, "direction": "out" if link.out else "in", **dict(link.attrs)} + + +def _non_finite(number: float) -> str: + """NaN or an infinity, written the way XSD writes it.""" + return "NaN" if math.isnan(number) else ("INF" if number > 0 else "-INF") + + +def _fold(text) -> str: + """Lower-case, accents removed: 'José' and 'jose' compare equal.""" + decomposed = unicodedata.normalize("NFKD", str(text)) + return "".join(c for c in decomposed if not unicodedata.combining(c)).casefold() + + +def _tokens(text) -> list[str]: + return re.findall(r"[a-z0-9]+", _fold(text)) + + +def _key(text) -> str: + """How a name or identifier is compared when used as a node reference.""" + return " ".join(_fold(text).split()) + + +def _clip(text: str, width: int) -> str: + return text if len(text) <= width else text[: width - 1].rstrip() + "…" + + +def _unwrapped(text: str) -> str: + """What is inside one matching pair of quotes or brackets around `text`, as written: a comma in + it stays, and so does a quote. ["a name"] is read as JSON. Empty when `text` is not so wrapped.""" + if len(text) < 2 or text[0] + text[-1] not in ('""', "''", "[]"): + return "" + if text[0] == "[": + try: + listed = json.loads(text) + except (ValueError, RecursionError): + listed = None + if isinstance(listed, list) and len(listed) == 1 and isinstance(listed[0], str): + return listed[0].strip() + return text[1:-1].strip() + + +def _as_list(value) -> list[str]: + """A list argument, however the client serialised it: a real array, a JSON string + ('["a","b"]') or a comma string ("a, b").""" + if value is None: + return [] + if isinstance(value, str): + text = value.strip() + if text.startswith("["): + try: + value = json.loads(text) + except (ValueError, RecursionError): # not JSON, or bracketed past what it can read + value = text.strip("[]").split(",") + else: + value = text.split(",") + if not isinstance(value, (list, tuple, set)): + value = [value] + return [s for s in (str(v).strip().strip("\"'") for v in value) if s] + + +def _bounded(value, low: int, high: int, name: str) -> int: + """A depth or hop count: out of range is an error, because clamping would change the question.""" + try: + number = int(value) + except (TypeError, ValueError): + raise KGError(f"{name} must be a whole number between {low} and {high}.") from None + if not low <= number <= high: + raise KGError(f"{name} must be between {low} and {high}.") + return number + + +def _page(value, high: int, low: int = 1) -> int: + """A page size or offset: clamped, since every reply says how many there are in all.""" + try: + return min(max(int(value), low), high) + except (TypeError, ValueError): + raise KGError("limit and offset must be whole numbers.") from None + + +def _same(have, want) -> bool: + """A stored value against one asked for: case and accents ignored, and 2025 equal to 2025.0.""" + if isinstance(want, float) and want.is_integer(): + want = int(want) + return _key(have) == _key(want) + + +def _id_forms(value: str): + """An identifier as written, and without the resolver in front of it, so both + 'https://orcid.org/0000-0002-1825-0097' and '0000-0002-1825-0097' find the node.""" + yield value + bare = re.sub(r"^https?://(?:dx\.)?(?:doi\.org|orcid\.org)/", "", value, flags=re.I) + if bare != value: + yield bare + + +def _algebra_names(node) -> set[str]: + """Every operator named anywhere in a parsed SPARQL query.""" + names, stack = set(), [node] + while stack: + current = stack.pop() + if isinstance(current, CompValue): + names.add(current.name) + stack.extend(current.values()) + elif isinstance(current, dict): + stack.extend(current.values()) + elif isinstance(current, (list, tuple, set, frozenset)): + stack.extend(current) + return names + + +_FOUR_DIGITS = Context(prec=4, rounding=ROUND_HALF_UP) + + +def _shown(strength: Fraction): + """A strength as sent: a whole number as it is, anything else to four significant digits, + rounded from the exact fraction (1/64 is 0.01563, as by hand). Ordering never uses this.""" + if strength.denominator == 1: + return int(strength) + return float(_FOUR_DIGITS.divide(Decimal(strength.numerator), Decimal(strength.denominator))) + + +def _iso(moment: datetime) -> str: + return moment.astimezone(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ") + + +def _committed(path: Path) -> str | None: + """When a file was last committed, if git tracks it and it has no local changes. A checkout + stamps every file with the time of the checkout, so the modification time of the committed + export says when the repo was cloned, not how old the data in it is.""" + def git(*args): + return subprocess.run(["git", "-C", str(path.parent), *args, "--", path.name], + capture_output=True, text=True, timeout=5) + try: + status = git("status", "--porcelain") + if status.returncode or status.stdout.strip(): + return None + # Seconds since the epoch (%ct), never a formatted date: git 2.45 and later write a UTC + # commit's strict ISO date (%cI) with a trailing "Z", which Python 3.10 cannot parse, and + # the export then looked as old as the checkout on exactly the machines that run CI. + return _iso(datetime.fromtimestamp(int(git("log", "-1", "--format=%ct").stdout.strip()), tz=timezone.utc)) + except (OSError, subprocess.SubprocessError, ValueError, OverflowError): + return None + + +@functools.lru_cache(maxsize=1) +def _definitions() -> dict: + """What the schema says each class and property means: name -> definition. Empty when the + schema file is not next to this one (the server run from a URL), which costs the descriptions + and nothing else.""" + try: + schema = Graph().parse(str(SCHEMA_FILE), format="turtle") + except Exception: + return {} + meaning = URIRef("http://www.w3.org/2004/02/skos/core#definition") + return {str(s)[len(SCHEMA_NS):]: " ".join(str(o).split()) + for s, o in schema.subject_objects(meaning) if str(s).startswith(SCHEMA_NS)} + + +# ---- the traversal view -------------------------------------------------------------------------- + +@dataclass(frozen=True) +class Link: + """One link, seen from one of its two ends.""" + edge: str + out: bool # True: this node --edge--> other. False: other --edge--> this node. + other: str # IRI of the node at the other end + attrs: tuple = () # ((name, value), ...) carried by a folded record, e.g. the role + + +@dataclass +class Node: + iri: str + type: str + id: str = "" + label: str = "" + props: dict = field(default_factory=dict) # property -> sorted list of values + links: list = field(default_factory=list) # every Link touching this node + names: list = field(default_factory=list) # its names and identifiers, as _key() forms + near: dict = field(default_factory=dict) # neighbour IRI -> the links to it, however many there are + + +class Reached(NamedTuple): + """What the first wave of activation brings to one node (see KG._wave).""" + hops: int # links from the starting node + strength: Fraction # how much arrives; 1 = a direct link + routes: int # how many shortest routes brought it + strongest: Fraction # what the strongest single one of them brought + + +class KG: + """An exported graph, indexed for traversal. Immutable once built: reloading builds a new one.""" + + def __init__(self, graph: Graph, snapshot: dict | None = None): + self.graph = graph + self.snapshot = {**(snapshot or {}), "triples": len(graph)} + self.problem: str | None = None # set by GraphSource when a re-read failed + self.nodes: dict[str, Node] = {} + self.edge_counts: Counter = Counter() # (from type, edge, to type) -> links + self.edge_attrs: dict = defaultdict(lambda: defaultdict(Counter)) + self.unfolded: Counter = Counter() # folded-class records missing an end + self.repeated: Counter = Counter() # ... and with an end or a role given twice + self.multityped = 0 # nodes with more than one rdf:type + self.blank = 0 # triples with a blank node at either end + self.unused = 0 # about folded records, outside their rule + self._build() + + # -- construction -- + + def _build(self): + types: dict[str, set] = defaultdict(set) + for s, o in self.graph.subject_objects(RDF.type): + if isinstance(s, URIRef): + types[str(s)].add(_local(str(o))) + node_type = {iri: sorted(found)[0] for iri, found in types.items()} + for s in self.graph.subjects(): # a subject with facts but no rdf:type + if isinstance(s, URIRef): + node_type.setdefault(str(s), "Untyped") + + props: dict = defaultdict(lambda: defaultdict(list)) + triples = [] # between two nodes + outside: dict = defaultdict(list) # outside IRI -> [(node, predicate)] + for s, p, o in self.graph: + if isinstance(s, BNode) or isinstance(o, BNode): + self.blank += 1 # not a node of this view: counted, not walked + if p == RDF.type or not isinstance(s, URIRef): + continue + subject, predicate = str(s), _local(str(p)) + if isinstance(o, Literal): + props[subject][predicate].append(_plain(o)) + elif isinstance(o, URIRef): + if str(o) in node_type: + triples.append((subject, predicate, str(o))) + else: # an identifier, or a node that was not exported + props[subject][predicate].append(str(o)) + outside[str(o)].append((subject, predicate)) + + folded = {iri for iri, t in node_type.items() if t in FOLDED} + self.multityped = sum(1 for iri, found in types.items() if len(found) > 1 and iri not in folded) # filed under the first + self.unused += sum(len(found) - 1 for iri, found in types.items() if iri in folded) # a record's other types + for iri in folded: # what a record says beyond its two ends and what it carries + rule = FOLDED[node_type[iri]] + self.unused += sum(len(values) for slot, values in props[iri].items() + if slot not in (rule["from"], rule["to"], *rule["attrs"].values())) + for iri, t in node_type.items(): + if iri not in folded: + self.nodes[iri] = Node(iri, t, props={k: sorted(v, key=str) for k, v in props[iri].items()}) + + ends: dict = defaultdict(lambda: defaultdict(list)) + for subject, predicate, obj in triples: + if subject in folded: + ends[subject][predicate].append(obj) + rule = FOLDED[node_type[subject]] + self.unused += predicate not in (rule["from"], rule["to"]) + elif obj not in folded: + self._link(subject, predicate, obj) + else: + self.unused += 1 # a link to a record: records are not nodes here + for iri in sorted(folded): + rule = FOLDED[node_type[iri]] + sources, targets = ends[iri][rule["from"]], ends[iri][rule["to"]] + # One record is one person on one project in one role. A record that gives either end, + # or the role, more than once says two things at once: it is left out and counted. + given = [len(sources) + len(props[iri].get(rule["from"], ())), len(targets) + len(props[iri].get(rule["to"], ()))] + given += [len(props[iri].get(slot, ())) for slot in rule["attrs"].values()] + if max(given) > 1: + self.repeated[node_type[iri]] += 1 + elif sources and targets and sources[0] in self.nodes and targets[0] in self.nodes: + attrs = tuple((name, str(props[iri][slot][0])) for name, slot in rule["attrs"].items() + if props[iri].get(slot)) + self._link(sources[0], rule["edge"], targets[0], attrs) + else: + self.unfolded[node_type[iri]] += 1 + + for iri, references in sorted(outside.items()): + holders = sorted({(node, predicate) for node, predicate in references if node in self.nodes}) + if len({node for node, _ in holders}) >= 2: + missing = iri.startswith(ID_NS) # one of this graph's own ids, with no node behind it + self.nodes[iri] = Node(iri, UNRESOLVED if missing else EXTERNAL, id="" if missing else "ext:" + iri, + label=iri) + for node, predicate in holders: + self._link(node, predicate, iri) + + self._assign_ids() + for node in self.nodes.values(): + if not node.label: + node.label = self._label(node) + if node.type not in (EXTERNAL, UNRESOLVED): # those are reached by walking, or by their id + node.names = sorted({_key(node.label)} | { + _key(form) for predicate in LABEL_PREDICATES + IDENTIFIER_PREDICATES + for value in node.props.get(predicate, ()) for form in _id_forms(str(value))}) + for node in self.nodes.values(): + node.links.sort(key=lambda l: (l.edge, not l.out, _fold(self.nodes[l.other].label), l.other, l.attrs)) + + for node in self.nodes.values(): # a link from a node to itself leads nowhere + near: dict = defaultdict(list) + for link in node.links: + if link.other != node.iri: + near[link.other].append(link) + node.near = {other: tuple(links) for other, links in near.items()} + self.types = sorted({n.type for n in self.nodes.values()}) + self.edges = sorted({edge for _, edge, _ in self.edge_counts}) + self._by_name: dict = defaultdict(list) + self._words: dict = defaultdict(dict) # token -> {iri: (weight, property)} + for node in self.nodes.values(): + for name in node.names: + self._by_name[name].append(node) + for predicate, values in node.props.items(): + weight = 3.0 if predicate in LABEL_PREDICATES + IDENTIFIER_PREDICATES else 1.0 + for value in values: + for token in _tokens(value): + if weight > self._words[token].get(node.iri, (0.0, ""))[0]: + self._words[token][node.iri] = (weight, predicate) + self._vocabulary = sorted(self._words) + + def _link(self, source: str, edge: str, target: str, attrs: tuple = ()): + self.nodes[source].links.append(Link(edge, True, target, attrs)) + self.nodes[target].links.append(Link(edge, False, source, attrs)) + self.edge_counts[(self.nodes[source].type, edge, self.nodes[target].type)] += 1 + for name, value in attrs: + self.edge_attrs[edge][name][value] += 1 + + def _assign_ids(self): + """Short ids, git-style: the first MIN_ID characters of the id, or as many more as it takes + to tell it from every other one. A node outside the id namespace is known by its IRI.""" + tails = sorted(iri[len(ID_NS):] for iri in self.nodes if iri.startswith(ID_NS)) + for i, tail in enumerate(tails): + need = MIN_ID + for other in tails[max(i - 1, 0): i] + tails[i + 1: i + 2]: + same = next((n for n, (a, b) in enumerate(zip(tail, other)) if a != b), min(len(tail), len(other))) + need = max(need, same + 1) + self.nodes[ID_NS + tail].id = tail[:need] + self._tails = sorted((tail.lower(), tail) for tail in tails) # for a prefix, whatever its case + for node in self.nodes.values(): + node.id = node.id or node.iri + self._by_id = {node.id: node for node in self.nodes.values()} + + @staticmethod + def _label(node: Node) -> str: + def first(predicate): + return next((str(v) for v in node.props.get(predicate, ())), None) + + plain = next((v for v in map(first, LABEL_PREDICATES) if v), node.id) + kind, number, title = PROJECT_LABEL + if node.type == kind and first(number): + # resources.name holds the grant number on some projects and the title on others, so + # every project is labelled the same way from the award facts (as kg/quality.py does). + heading = first(title) or plain + return f"{first(number)} · {heading}" if heading != first(number) else heading + return plain + + # -- lookups -- + + def resolve(self, reference) -> Node: + """The node a reference names: an id from another tool, an IRI, or an exact name/identifier.""" + text = str(reference or "").strip().strip("<>") + if not text: + raise KGError("No node given. Pass an id from search_nodes, or an exact name or grant number.") + if text.lower().startswith("ext:") and text[4:] in self.nodes: + return self.nodes[text[4:]] + tail = text[4:] if text.lower().startswith("bid:") else text + for candidate in (text, ID_NS + tail): + if candidate in self.nodes and self.nodes[candidate].type != EXTERNAL: + return self.nodes[candidate] + if tail in self._by_id and self._by_id[tail].type != EXTERNAL: # an id as another tool showed it + return self._by_id[tail] + if re.fullmatch(r"[0-9a-f-]{6,}", tail.lower()): + start = bisect.bisect_left(self._tails, (tail.lower(),)) + found = [t for folded, t in self._tails[start: start + 6] if folded.startswith(tail.lower())] + if len(found) == 1: + return self.nodes[ID_NS + found[0]] + if found: + raise KGError(f"'{reference}' is the start of more than one id: " + f"{self._listing(self.nodes[ID_NS + t] for t in found)}. Pass a longer id.") + named = list({node.iri: node for form in _id_forms(text) + for node in self._by_name.get(_key(form), ())}.values()) + if len(named) == 1: + return named[0] + if named: + raise KGError(f"'{reference}' names {len(named)} nodes: {self._listing(named)}. Pass one of these ids.") + if text in self.nodes: # an outside identifier no node owns, e.g. an author who is not a member + return self.nodes[text] + inner = _unwrapped(text) + if inner: # one name in quotes or brackets: the name inside + try: + return self.resolve(inner) + except KGError as exc: + if not str(exc).startswith("No node matches"): + raise # it names several nodes: say which + raise KGError(f"No node matches '{reference}'. Find it with search_nodes; it takes partial names.") + + def _listing(self, nodes, most: int = 8) -> str: + nodes = sorted(nodes, key=lambda n: (n.type, _fold(n.label), n.id)) + shown = "; ".join(f"{n.id} ({n.type}: {_clip(n.label, 60)})" for n in nodes[:most]) + return shown + (f"; and {len(nodes) - most} more" if len(nodes) > most else "") + + def _pick(self, wanted, known, what: str): + """Validate a list of type or edge names against the ones the graph has; None = no filter.""" + names = _as_list(wanted) + if not names: + if wanted is None or (isinstance(wanted, str) and wanted.strip() in ("", "[]")) or (isinstance(wanted, (list, tuple, set)) and not wanted): + return None + raise KGError(f"{_clip(repr(wanted), 60)} names no {what}. This graph has: {', '.join(known)}.") + by_fold = {k.casefold(): k for k in known} + missing = [n for n in names if n.casefold() not in by_fold] + if missing: + raise KGError(f"Unknown {what} '{missing[0]}'. This graph has: {', '.join(known)}.") + return {by_fold[n.casefold()] for n in names} + + def brief(self, node: Node) -> dict: + return {"id": node.id, "type": node.type, "label": _clip(node.label, 100), "links": len(node.links)} + + def status(self) -> dict: + """Which copy of the graph this is and how old, so staleness shows in the answer.""" + status = dict(self.snapshot) + dated = next((status[k] for k in ("last_modified", "committed", "file_modified") if k in status), None) + if dated: + written = datetime.strptime(dated, "%Y-%m-%dT%H:%M:%SZ").replace(tzinfo=timezone.utc) + status["age_days"] = max((datetime.now(timezone.utc) - written).days, 0) + if self.problem: + status["preferred_source_failed"] = self.problem + return status + + def cite(self) -> dict: + """The short form of status(), carried by every answer so each one says where it came from.""" + status = self.status() + dated = next((status[k] for k in ("last_modified", "committed", "file_modified") if k in status), None) + cited = {"graph": status["source"], **({"dated": dated[:10], "age_days": status["age_days"]} if dated else {})} + return {**cited, "preferred_source_failed": True} if self.problem else cited # describe_graph says why + + def answered(self, reply: dict) -> dict: + """A tool's answer, with the graph it came from under `snapshot` (as in describe_graph).""" + if "snapshot" in reply: + raise RuntimeError("an answer already uses the key 'snapshot'") + return {**reply, "snapshot": self.cite()} + + # -- the tools -- + + def describe(self, type=None, sparql: bool = True) -> dict: + kinds = self._pick(type, self.types, "node type") + if kinds: + if len(kinds) > 1: + raise KGError(f"Name one node type at a time; {', '.join(sorted(kinds))} were given.") + return self._describe_type(next(iter(kinds))) + by_type: dict = defaultdict(list) + for node in self.nodes.values(): + by_type[node.type].append(node) + node_types = [] + for name, group in sorted(by_type.items(), key=lambda kv: (-len(kv[1]), kv[0])): + filled = Counter(p for n in group for p in n.props) + node_types.append({"type": name, "count": len(group), + "unlinked": sum(1 for n in group if not n.links), + "properties": dict(sorted(filled.items(), key=lambda kv: (-kv[1], kv[0])))}) + edge_types = [] + for (source, edge, target), count in sorted(self.edge_counts.items(), key=lambda kv: (-kv[1], kv[0])): + row = {"edge": edge, "from": source, "to": target, "count": count} + if edge in self.edge_attrs: + row["carries"] = {name: dict(values.most_common()) for name, values in self.edge_attrs[edge].items()} + edge_types.append(row) + unlinked = sum(1 for n in self.nodes.values() if not n.links) + notes = [ + f"A missing link means 'not recorded', never 'no'. This graph is still being linked: {unlinked} of " + f"{len(self.nodes)} nodes have no links at all (see 'unlinked' per type), and each property count " + "says how many nodes of that type have the property filled.", + ] + plain = next((e for (_, e, t), _ in self.edge_counts.most_common() + if e not in {r["edge"] for r in FOLDED.values()} and t not in (EXTERNAL, UNRESOLVED)), None) + for kind, rule in FOLDED.items(): + if rule["edge"] not in self.edges: + continue + slots = "".join(f" ; bbqs:{slot} ?{name}" for name, slot in rule["attrs"].items()) + notes.append( + f"{rule['edge']} is the grant roster: one link per person per project, carrying " + f"{' and '.join(rule['attrs'])}. It is the only authority for a role on a project; {CAREER_LABEL} on " + "a person is a free-text career or consortium label and says nothing about any one grant." + + (f" In sparql_query the roster is still records, not links: ?r a bbqs:{kind} ; bbqs:{rule['from']} " + f"?person ; bbqs:{rule['to']} ?project{slots} ." + + (f" Every other link is a triple of the same name, e.g. ?a bbqs:{plain} ?b ." if plain else "") + if sparql else "")) + notes.append( + "find_related and find_paths rank by strength, which comes from spreading activation: activation leaves " + "the starting node along every link, each node it reaches splits what it received equally among the nodes " + "it is linked to, and amounts arriving together add up. A direct link is 1; one node with 5 neighbours in " + "between leaves 0.2; two such routes make 0.4. Nearest first, then strongest: strength compares nodes the " + "same distance away, and being a sum it can pass 1 where many routes arrive. It says how exclusive the " + "nodes in between look in the data as recorded, so where links are still missing a tie can look stronger " + "than it is.") + if EXTERNAL in by_type: + via = sorted({f"{source} -{edge}->" for (source, edge, target) in self.edge_counts if target == EXTERNAL}) + notes.append(f"{EXTERNAL} nodes are outside identifiers (such as ORCID iDs) that two or more nodes carry " + f"({', '.join(via)}), kept as nodes so the match can be walked. An identifier only one " + "node carries is just a property of it.") + if UNRESOLVED in by_type: + notes.append(f"{UNRESOLVED} nodes are ids of this graph that two or more links point at but nothing " + "describes: the node they name is missing from this export.") + if self.unfolded: + notes.append("Roster records left out because one end did not resolve: " + + ", ".join(f"{n} {t}" for t, n in self.unfolded.items()) + ".") + if self.repeated: + slots = sorted({slot for rule in FOLDED.values() for slot in (rule["from"], rule["to"], *rule["attrs"].values())}) + notes.append(f"Roster records left out because they give one of {', '.join(slots)} more than once: " + + ", ".join(f"{n} {t}" for t, n in self.repeated.items()) + ".") + if self.unused: + notes.append(f"Triples about roster records that this view does not use (a link to a record, or what a " + f"record says besides its person, project, role and one type): {self.unused}.") + if self.multityped: + notes.append(f"Nodes with more than one type: {self.multityped}. Each is listed under the first of its " + "types in alphabetical order.") + if self.blank: + notes.append(f"Triples with a blank node at one end: {self.blank}. A blank node is not a node here, so " + "they are not walked.") + return {"graph": "BBQS consortium knowledge graph, public read-only snapshot", "snapshot": self.status(), + "nodes": len(self.nodes), "links": sum(self.edge_counts.values()), "unlinked_nodes": unlinked, + "node_types": node_types, "edge_types": edge_types, "notes": notes} + + def _describe_type(self, type) -> dict: + """One node type in full: what the schema says it and its properties mean, how full each + property is, the values it takes when they are few, and its links.""" + kind = type + group = sorted((n for n in self.nodes.values() if n.type == kind), key=lambda n: (_fold(n.label), n.iri)) + meaning = _definitions() + own = {EXTERNAL: "An outside identifier (such as an ORCID iD) that two or more nodes carry.", + UNRESOLVED: "An id of this graph that links point at but nothing describes."} + properties = [] + for name, filled in sorted(Counter(p for n in group for p in n.props).items(), key=lambda kv: (-kv[1], kv[0])): + row = {"property": name, "filled": filled} + if name in meaning: + row["description"] = meaning[name] + values = Counter(str(v) for n in group for v in n.props.get(name, ())) + if len(values) <= 12 and all(len(v) <= 40 for v in values): + row["values"] = dict(values.most_common()) # few enough to be a vocabulary: list it + else: + row["example"] = _clip(next(str(v) for n in group for v in n.props.get(name, ())), 60) + properties.append(row) + links = Counter((l.edge, l.out, self.nodes[l.other].type) for n in group for l in n.links) + reply = {"type": kind, "count": len(group), "unlinked": sum(1 for n in group if not n.links)} + if kind in meaning or kind in own: + reply["description"] = meaning.get(kind) or own[kind] + return {**reply, "properties": properties, + "links": [{"edge": edge, "direction": "out" if out else "in", "other": other, "count": count} + for (edge, out, other), count in sorted(links.items(), key=lambda kv: (-kv[1], kv[0]))]} + + def search(self, query: str = "", type=None, where: dict | None = None, limit: int = 10, offset: int = 0) -> dict: + limit, offset = _page(limit, 100), _page(offset, 10 ** 6, 0) + kinds = self._pick(type, self.types, "node type") + pool = [n for n in self.nodes.values() if kinds is None or n.type in kinds] + if where: + if not isinstance(where, dict): + raise KGError('where must be an object of property -> value, e.g. {"mechanism": "R61"}.') + for prop, wanted in where.items(): + if not any(prop in n.props for n in pool): + known = sorted({p for n in pool for p in n.props}) + raise KGError(f"No {'/'.join(sorted(kinds)) if kinds else 'node'} has a property '{prop}'. " + f"Properties: {', '.join(known)}.") + pool = [n for n in pool if any(_same(v, wanted) for v in n.props.get(prop, ()))] + terms = list(dict.fromkeys(_tokens(query))) + if not terms: + if kinds is None and not where: + raise KGError("Give a query, a type, or a where filter.") + ranked = [(n, None) for n in sorted(pool, key=lambda n: (_fold(n.label), n.iri))] + else: + ranked = self._rank(terms, {n.iri for n in pool} if (kinds is not None or where) else None) + results = [] + for node, hit in ranked[offset: offset + limit]: + row = self.brief(node) + if hit: + row["match"] = hit + results.append(row) + return {"total": len(ranked), "offset": offset, "results": results} + + def _rank(self, terms: list[str], allowed) -> list: + """Nodes matching the query terms, best first. A term matches a word it equals or begins; + rarer terms and matches in names count for more; a node matching every term outranks one + matching some.""" + scores: Counter = Counter() + matched: Counter = Counter() + where_hit: dict = {} + for term in terms: + found: dict = {} + start = bisect.bisect_left(self._vocabulary, term) + for word in self._vocabulary[start:]: + if not word.startswith(term): + break + if word != term and len(term) < 3: + break + closeness = 1.0 if word == term else 0.5 + for iri, (weight, prop) in self._words[word].items(): + if (allowed is None or iri in allowed) and weight * closeness > found.get(iri, (0.0, ""))[0]: + found[iri] = (weight * closeness, prop) + rarity = math.log(1 + len(self.nodes) / len(found)) if found else 0.0 + for iri, (strength, prop) in found.items(): + scores[iri] += strength * rarity + matched[iri] += 1 + where_hit.setdefault(iri, (term, prop)) + if prop not in LABEL_PREDICATES + IDENTIFIER_PREDICATES: + where_hit[iri] = (term, prop) # prefer showing a match the label does not reveal + phrase = " ".join(terms) + ranked = [] + for iri, score in scores.items(): + node = self.nodes[iri] + score *= (matched[iri] / len(terms)) ** 2 + names = [" ".join(_tokens(name)) for name in node.names] + if phrase in names: + score += 1000 + elif any(name.startswith(phrase) for name in names): + score += 50 + elif any(phrase in name for name in names): + score += 25 + ranked.append((-score, -len(node.links), _fold(node.label), iri)) + ranked.sort() + return [(self.nodes[iri], self._excerpt(self.nodes[iri], *where_hit[iri])) for _, _, _, iri in ranked] + + @staticmethod + def _excerpt(node: Node, term: str, prop: str): + """Where a search matched, when the label does not already show it.""" + if term in _fold(node.label): + return None + for value in node.props.get(prop, ()): + text = str(value) + at = _fold(text).find(term) + if at >= 0: + at = min(at, len(text)) + start, end = max(at - 60, 0), min(at + 90, len(text)) + return {"property": prop, "text": ("…" if start else "") + " ".join(text[start:end].split()) + + ("…" if end < len(text) else "")} + return {"property": prop} + + def node(self, reference, edge_limit: int = 25) -> dict: + edge_limit = _page(edge_limit, 500, 0) + node = self.resolve(reference) + groups: dict = defaultdict(list) + for link in node.links: + groups[(link.edge, link.out)].append(link) + edges = [] + for (edge, out), links in sorted(groups.items(), key=lambda kv: (kv[0][0], not kv[0][1])): + row = {"edge": edge, "direction": "out" if out else "in", "count": len(links), + "nodes": [{**self.brief(self.nodes[l.other]), **dict(l.attrs)} for l in links[:edge_limit]]} + if len(links) > edge_limit: + row["more"] = len(links) - edge_limit + edges.append(row) + return {"id": node.id, "iri": node.iri, "type": node.type, "label": node.label, + "properties": {k: v[0] if len(v) == 1 else v for k, v in sorted(node.props.items())}, + "links": len(node.links), "edges": edges} + + def neighbors(self, reference, edge=None, direction: str = "both", type=None, depth: int = 1, + limit: int = 50, offset: int = 0, through_hubs: bool = False) -> dict: + start = self.resolve(reference) + follow = self._pick(edge, self.edges, "edge") + kinds = self._pick(type, self.types, "node type") + if direction not in ("out", "in", "both"): + raise KGError("direction must be out, in or both.") + depth, limit, offset = _bounded(depth, 1, MAX_DEPTH, "depth"), _page(limit, 200), _page(offset, 10 ** 6, 0) + # A hub is reached like any node but not walked through: two hops from a person would + # otherwise be everyone in the same working group. Naming the edges to follow, or asking + # for it, walks through; the node the walk starts from is always expanded. + stop_at_hubs = follow is None and not through_hubs + seen, reached, frontier, hubs = {start.iri}, [], [start], [] + for hop in range(1, depth + 1): + arrived = [] + for current in frontier: + if stop_at_hubs and current is not start and len(current.links) > HUB_LINKS: + hubs.append(current) + continue + for link in current.links: + if (follow is not None and link.edge not in follow) or link.other in seen \ + or (direction == "out" and not link.out) or (direction == "in" and link.out): + continue + seen.add(link.other) + arrived.append(self.nodes[link.other]) + reached.append((hop, link, current, self.nodes[link.other])) + frontier = arrived + by_type = dict(Counter(r[3].type for r in reached).most_common()) + if kinds is not None: + reached = [r for r in reached if r[3].type in kinds] + reached.sort(key=lambda r: (r[0], r[1].edge, r[3].type, _fold(r[3].label), r[3].iri)) + nodes = [] + for hop, link, via, node in reached[offset: offset + limit]: + step = {"edge": link.edge, "direction": "out" if link.out else "in", **dict(link.attrs)} + if via is not start: + step["from"] = via.id + nodes.append({**self.brief(node), "hops": hop, "via": step}) + reply = {"start": self.brief(start), "depth": depth, "total": len(reached), "offset": offset, + "reached_by_type": by_type, "nodes": nodes} + if hubs: + reply["hubs_not_walked_through"] = [self.brief(hub) for hub in hubs] + return reply + + # -- spreading activation: what find_related and find_paths rank by -- + + def _ways(self, avoid=frozenset()): + """For one question: which neighbours a node passes activation to, as node -> {neighbour: the + links that lead there}. Two nodes are one neighbour to each other however many links record + it. `avoid` names link types that are not travelled; a neighbour reached only by those is + not passed to, and the node splits among the neighbours left.""" + if not avoid: + return lambda iri: self.nodes[iri].near + kept: dict = {} + + def ways(iri: str) -> dict: + if iri not in kept: + kept[iri] = {other: allowed for other, links in self.nodes[iri].near.items() + if (allowed := tuple(link for link in links if link.edge not in avoid))} + return kept[iri] + return ways + + def _wave(self, start: Node, avoid=frozenset(), ways=None) -> dict: + """The first wave of activation spreading from `start`: iri -> Reached, for every node it + gets to. Three rules, each from the published theory of how one concept brings up another: + * it travels one link at a time, so what is nearer is reached sooner; + * a node splits what it received equally among the nodes it is linked to (the fan + effect): a project with 5 neighbours passes 1/5 to each, a working group of 114 + members 1/114; + * amounts that arrive at a node together add up. + The start sends one whole unit to each neighbour, so that a direct link is 1. A node is read + once, when the wave first reaches it, so only the shortest routes count: + strength = the sum, over the shortest routes from `start`, of the product of 1/neighbours + over the nodes in between. It is the same from either end, and it is worked in exact + fractions, so equal things tie exactly and nothing is ordered by rounding. + Without the name: a breadth-first search that carries one number, the chance that a random + walker leaving `start` stands on the node after as many steps as it is links away, times the neighbours of + `start`. Two links out it is the Resource Allocation index of link prediction.""" + ways = ways or self._ways(avoid) + reached = {start.iri: Reached(0, Fraction(1), 1, Fraction(1))} + ring, hops = [start.iri], 0 + while ring: + hops += 1 + arriving: dict = {} # iri -> [strength, routes, strongest] + for iri in ring: + here, out = reached[iri], ways(iri) + share = Fraction(1, 1 if iri == start.iri else len(out)) + amount, best = here.strength * share, here.strongest * share + for other in out: + if other in reached: + continue + entry = arriving.get(other) + if entry is None: + arriving[other] = [amount, here.routes, best] + else: + entry[0] += amount + entry[1] += here.routes + entry[2] = max(entry[2], best) + reached.update((iri, Reached(hops, *entry)) for iri, entry in arriving.items()) + ring = list(arriving) + return reached + + @staticmethod + def _strongest_route(start: str, end: str, wave: dict, ways) -> list: + """The strongest of the shortest routes from `start` to `end`, as [iri, ...], from the wave + of `start`. Of several equally strong it is the one find_paths lists first: the first by + its nodes, read from whichever end has the smaller IRI. So both tools show the same route, + and the same one whichever end the question started from.""" + def passed_on(iri: str) -> Fraction: # by a node on a strongest route to it, to each neighbour + return wave[iri].strongest if iri == start else wave[iri].strongest / len(ways(iri)) + + def came_from(iri: str) -> list: # the nodes a strongest route can reach `iri` from + return sorted(other for other in ways(iri) if other in wave and wave[other].hops == wave[iri].hops - 1 + and passed_on(other) == wave[iri].strongest) + + if end < start: # read from `end`: the first choice at every step + route = [end] + while route[-1] != start: + route.append(came_from(route[-1])[0]) + return route[::-1] + onward: dict = defaultdict(list) # read from `start`: find every strongest route first + seen, todo = {end}, [end] + while todo: + iri = todo.pop() + for other in came_from(iri): + onward[other].append(iri) + if other not in seen: + seen.add(other) + todo.append(other) + route = [start] + while route[-1] != end: + route.append(min(onward[route[-1]])) + return route + + def related(self, references, type=None, limit: int = 5, offset: int = 0, avoid_edges=None, + max_hops: int = 4) -> dict: + seeds = self._seeds(references) + kinds = self._pick(type, self.types, "node type") + avoid = self._pick(avoid_edges, self.edges, "edge") or set() + # Every type at once is many lists, so each is kept shorter than when a few are named. + limit, offset = _page(limit, 25 if kinds and len(kinds) <= 3 else 10), _page(offset, 10 ** 6, 0) + max_hops = _bounded(max_hops, 1, MAX_HOPS, "max_hops") + ways = self._ways(avoid) + waves = [self._wave(seed, ways=ways) for seed in seeds] + started = {seed.iri for seed in seeds} + # Each type is ranked on its own: a working group collects activation from a hundred + # members and a paper from one project, so one list of both mostly ranks them by size. + ranked: dict = {kind: [] for kind in kinds or ()} # a type asked for and not reached is listed, empty + beyond: Counter = Counter() # per type: reached, but farther than max_hops + within = 0 + for iri in waves[0]: + if iri in started or not all(iri in wave for wave in waves[1:]): + continue # with several starting nodes: only what each reaches + node = self.nodes[iri] + # A node is judged by its worst tie: the farthest starting node, and of those the + # weakest. Then by its next worst, and so on. With one starting node that is: nearest + # first, then strongest. + ties = tuple(sorted(((wave[iri].hops, -wave[iri].strength) for wave in waves), reverse=True)) + within += ties[0][0] <= max_hops + if kinds is not None and node.type not in kinds: + continue + rows = ranked.setdefault(node.type, []) + if ties[0][0] > max_hops: + beyond[node.type] += 1 + else: + rows.append((ties, _fold(node.label), iri)) + groups = [] + for rows in ranked.values(): + rows.sort() + for kind, rows in sorted(ranked.items(), key=lambda kv: (not kv[1], kv[1][0][0] if kv[1] else (), kv[0])): + page = rows[offset: offset + limit] + group = {"type": kind, "within": len(rows), + "nodes": [self._related_row(seeds, waves, row[2], ways) for row in page]} + if page and len(rows) > offset + limit and rows[offset + limit][0] == page[-1][0]: + level = page[-1][0] # the list was cut among equals: say how many + group["tied"] = {"hops": level[0][0], "strength": _shown(-level[0][1]), + "count": sum(1 for row in rows if row[0] == level), + "listed": sum(1 for row in page if row[0] == level)} + if beyond[kind]: + group["beyond"] = beyond[kind] + groups.append(group) + reply = {"start": [self.brief(seed) for seed in seeds], "related": groups} + without = f" without {', '.join(sorted(avoid))}" if avoid else "" + if avoid: + reply["avoided"] = sorted(avoid) + alone = [seed for seed, wave in zip(seeds, waves) if len(wave) == 1] + apart = [seed for seed in seeds[1:] if seed.iri not in waves[0]] + if alone: + # A link from a node to itself leads nowhere, so a node with only such links is alone too. + others = "other nodes" if any(seed.links and not seed.near for seed in alone) else "" + reply["note"] = (f"No links{' to ' + others if others else ''}{without} are recorded for " + f"{self._listing(alone)}, so nothing is tied to {'it' if len(alone) == 1 else 'them'}. " + "A missing link means 'not recorded'.") + elif apart: + reply["note"] = (f"No chain of links{without} joins {self._listing(seeds[:1])} and " + f"{self._listing(apart)}, so nothing is tied to all of them.") + elif not within: # one starting node always has a neighbour within one link + reply["note"] = (f"Nothing is within {max_hops} link{'' if max_hops == 1 else 's'}{without} of every one " + "of these nodes.") + return reply + + def _seeds(self, references) -> list: + """The starting nodes of find_related: one reference, or several however the client sent + them. A name may hold a comma, so a string is split only if it is not a node as it stands.""" + if isinstance(references, str): + text = references.strip() + try: + references = [self.resolve(text)] + except KGError as whole: + parts = _as_list(text) # a list in one string: split at the commas + if parts in ([], [text]): + raise + references, failed, named = [], None, None + for part in parts: + try: + references.append(self.resolve(part)) + except KGError as this_part: + failed = failed or this_part + if not str(this_part).startswith("No node matches"): + named = named or this_part # it names nodes, only not one alone + if named and len(parts) == 1: + raise named from None # one name, quoted or bracketed: what it names + if failed and not references and not named: + raise whole from None # no part of it is a node either + if failed: # some of it is: say which part is not + raise KGError(f"Read as {len(parts)} nodes. {named or failed}") from None + elif not isinstance(references, (list, tuple)): + references = [references] + nodes = [r if isinstance(r, Node) else self.resolve(r) for r in references] + seeds = list({node.iri: node for node in nodes}.values()) + if not seeds: + raise KGError("No node given. Pass an id from search_nodes, or an exact name or grant number.") + if len(seeds) > MAX_SEEDS: + raise KGError(f"{len(seeds)} starting nodes given; at most {MAX_SEEDS} at a time.") + return seeds + + def _related_row(self, seeds: list, waves: list, iri: str, ways) -> dict: + node = self.nodes[iri] + if len(seeds) == 1: + return {**self.brief(node), **self._tie(seeds[0], waves[0], iri, ways)} + # Several starting nodes: the row is headed by its worst tie, and `per_start` gives each one. + # The routes are not spelled out here (find_paths gives them for any pair). + per_start = [{"start": seed.id, "hops": wave[iri].hops, "strength": _shown(wave[iri].strength), + **({"routes": wave[iri].routes} if wave[iri].routes > 1 else {})} for seed, wave in zip(seeds, waves)] + worst = max((wave[iri] for wave in waves), key=lambda found: (found.hops, -found.strength)) + return {**self.brief(node), "hops": worst.hops, "strength": _shown(worst.strength), "per_start": per_start} + + def _tie(self, seed: Node, wave: dict, iri: str, ways) -> dict: + """How one starting node reaches one node: how far, how strongly, and mostly by which route.""" + found = wave[iri] + tie = {"hops": found.hops, "strength": _shown(found.strength)} + if found.routes > 1: # `share`: the part of the strength the route shown brings + tie.update(routes=found.routes, share=_shown(found.strongest / found.strength)) + if found.hops == 1: + first, *others = ways(seed.iri)[iri] + tie["link"] = _link_shown(first) + if others: # more than one link joins the two: still one tie + tie["link"]["also"] = [_link_shown(link) for link in others] + return tie + # `splits`: how many neighbours the node divided among, so 1/splits, multiplied along the + # route, is the route's strength. + tie["through"] = [{"id": self.nodes[at].id, "label": _clip(self.nodes[at].label, 40), "splits": len(ways(at))} + for at in self._strongest_route(seed.iri, iri, wave, ways)[1:-1]] + return tie + + def paths(self, source, target, max_hops: int = 6, limit: int = 5, avoid_edges=None, offset: int = 0) -> dict: + a, b = self.resolve(source), self.resolve(target) + max_hops, limit = _bounded(max_hops, 1, MAX_HOPS, "max_hops"), _page(limit, 25) + offset = _page(offset, 10 ** 6, 0) + avoid = self._pick(avoid_edges, self.edges, "edge") or set() + reply = {"source": self.brief(a), "target": self.brief(b), "listed": 0, "paths": []} + if a is b: + return {**reply, "note": "source and target are the same node."} + ways = self._ways(avoid) + # Always searched from the same end, whichever way round the question was asked, so that + # the answer is the same list both ways, cut in the same place. + first, last = sorted((a, b), key=lambda node: node.iri) + wave = self._wave(last, ways=ways) # from the far end: how far each node is from it, how strongly tied + without = f" without {', '.join(sorted(avoid))}" if avoid else "" + if first.iri not in wave: + return {**reply, "note": f"Not connected{without}: no chain of links joins these two nodes."} + tie = wave[first.iri] + reply.update(shortest=tie.hops, routes=tie.routes, strength=_shown(tie.strength)) + if tie.hops > max_hops: + return {**reply, "note": f"The shortest connection{without} is {tie.hops} hops; max_hops is {max_hops}."} + want = offset + limit + 1 # one more than asked for, to know whether there are more + found = self._strongest_shortest(first.iri, last.iri, wave, ways, want) + cut = len(found) < min(want, tie.routes) # the budget ran out before the shortest paths asked for + steps_left, length, searched = [PATH_STEPS], tie.hops, False + # Then the longer ones, a length at a time. Between two nodes that are linked there are + # none: any other way from one to the other is the long way round that link. + while not cut and tie.hops > 1 and len(found) < want and length < max_hops: + searched = True + if steps_left[0] <= 0: + break + length += 1 + level: list = [] + self._walk(first.iri, last.iri, length, wave, ways, [first.iri], level, steps_left) + found.extend(sorted(((self._left(path, ways), path) for path in level), key=lambda one: (-one[0], one[1]))) + page = found[offset: offset + limit] + reply.update(listed=len(page), paths=[self._path(path if first is a else path[::-1], strength, ways) + for strength, path in page]) + if len(found) > offset + limit or (cut and tie.routes > offset + limit): + reply["more"] = True # after a cut, only where more shortest paths are known to exist + if cut or (searched and steps_left[0] <= 0): # gave up: some paths may be missing, or out of order + reply["partial"] = True + return reply + + @staticmethod + def _left(path: list, ways) -> Fraction: + """What is left of one unit after each node between the two ends has split it among its + neighbours. The shortest paths' strengths add up to the strength of the tie (see _wave).""" + left = Fraction(1) + for iri in path[1:-1]: + left /= len(ways(iri)) + return left + + @staticmethod + def _strongest_shortest(first: str, last: str, wave: dict, ways, want: int) -> list: + """The `want` strongest of the shortest paths from `first` to `last`, strongest first, as + (strength, [iri, ...]), without listing them all: there can be thousands. `wave` is the + wave from `last`, which says of every node how far it is from `last` and how strong the + strongest route onward is. So the best a partly built path can still become is known + exactly, and paths are finished in order of strength. Equally strong ones come in the + order of their nodes. It stops after SHORTEST_STEPS paths begun, which only a page far down + a list of a great many paths can reach; the caller then says the answer is partial.""" + heap = [(-wave[first].strongest, (first,), Fraction(1))] + found, budget = [], SHORTEST_STEPS + while heap and len(found) < want and budget > 0: + _, trail, so_far = heapq.heappop(heap) # so_far: what the nodes between `first` and the last one left + here = trail[-1] + if here == last: + found.append((so_far, list(trail))) + continue + passed = so_far if here == first else so_far / len(ways(here)) + for other in ways(here): + if other in wave and wave[other].hops == wave[here].hops - 1: + best = passed if other == last else passed * wave[other].strongest / len(ways(other)) + heapq.heappush(heap, (-best, trail + (other,), passed)) + budget -= 1 + return found + + def _walk(self, current, target, remaining, wave, ways, trail, out, steps_left): + """Every path of exactly `remaining` more links from `current` to `target` that takes no + detour: no node on it is linked to an earlier one except the one just before it. A path + with such a shortcut is a shorter path plus padding, and says nothing the shorter one + does not.""" + if remaining == 0: + out.append(list(trail)) + return + for nxt in ways(current): + if steps_left[0] <= 0: + return + if nxt in trail or nxt not in wave or wave[nxt].hops > remaining - 1 \ + or (nxt == target and remaining != 1) \ + or any(earlier in ways(nxt) for earlier in trail[:-1]): + continue + steps_left[0] -= 1 + trail.append(nxt) + self._walk(nxt, target, remaining - 1, wave, ways, trail, out, steps_left) + trail.pop() + + def _path(self, path: list, strength: Fraction, ways) -> dict: + def show(iri): + return f'{self.nodes[iri].type} "{_clip(self.nodes[iri].label, 70)}"' + + def named(links): + return " + ".join(link.edge + "".join(f" {value}" for name, value in link.attrs if name == "role") + for link in links) + + text = show(path[0]) + for here, nxt in zip(path, path[1:]): + links = ways(here)[nxt] # usually one; all of them are named, each the way it points + forth, back = [link for link in links if link.out], [link for link in links if not link.out] + arrows = ([f"-[{named(forth)}]->"] if forth else []) + ([f"<-[{named(back)}]-"] if back else []) + text += f" {' / '.join(arrows)} " + show(nxt) + return {"hops": len(path) - 1, "strength": _shown(strength), "text": text, + "nodes": [self.nodes[iri].id for iri in path]} + + def sparql(self, query: str, limit: int = 100) -> dict: + limit = _page(limit, MAX_ROWS) + text = re.sub(r"\bbid:([0-9a-fA-F][0-9a-fA-F-]*)", self._full_id, str(query)) + try: + prepared = prepareQuery(text, initNs=PREFIXES) + except Exception as exc: # pyparsing's ParseException and rdflib's own; the message is the useful part + raise KGError("Not accepted. Only SPARQL SELECT and ASK queries run here: " + + " ".join(str(exc).split())[:300]) from exc + algebra = prepared.algebra + if algebra.name not in ("SelectQuery", "AskQuery"): + raise KGError("Read-only: only SELECT and ASK queries run here.") + if algebra.get("datasetClause") or "ServiceGraphPattern" in _algebra_names(algebra): + raise KGError("FROM and SERVICE are not accepted: a query runs against the loaded graph only.") + budget = _deadline.set(time.monotonic() + SPARQL_SECONDS) + try: + result = self.graph.query(prepared) + if result.type == "ASK": + return {"answer": bool(result.askAnswer)} + rows, more = [], False + for row in result: + if len(rows) == limit: + more = True + break + rows.append([self._cell(cell) for cell in row]) + except _OutOfTime: + raise KGError(f"Stopped after {SPARQL_SECONDS:g} seconds. Narrow the query: anchor a variable to a " + "class or a known node, and avoid unbounded * and + paths.") from None + except Exception as exc: + raise KGError("Query failed: " + " ".join(str(exc).split())[:300]) from exc + finally: + _deadline.reset(budget) + reply = {"columns": [str(v) for v in result.vars], "rows": rows} + if more: + reply["more"] = True + return reply + + def _full_id(self, match) -> str: + """`bid:<short id>` in a query, written out as the IRI it stands for.""" + tail = match.group(1) + if ID_NS + tail in self.nodes or len(tail) >= 36: + return match.group(0) + return f"<{self.resolve(match.group(0)).iri}>" + + def _cell(self, term): + if term is None or isinstance(term, Literal): + return None if term is None else _plain(term) + if isinstance(term, BNode): + return f"_:{term}" + iri = str(term) + if iri in self.nodes and iri.startswith(ID_NS): + return "bid:" + self.nodes[iri].id + for prefix, namespace in PREFIXES.items(): + if prefix != "bid" and iri.startswith(namespace) and re.fullmatch(r"\w+", iri[len(namespace):]): + return f"{prefix}:{iri[len(namespace):]}" + return f"<{iri}>" + + +# ---- where the graph comes from ------------------------------------------------------------------ + +class GraphSource: + """Reads the graph, and reads it again when it has changed. Serves one KG at a time; a failed + re-read keeps the one already loaded and records why in `problem`.""" + + def __init__(self, location: str | None = None, refresh_hours: float = 1.0): + self.locations = [location] if location else ( + [PUBLISHED_EXPORT] + ([str(BUNDLED_EXPORT)] if BUNDLED_EXPORT.exists() else [GITHUB_EXPORT])) + self.refresh_seconds = refresh_hours * 3600 if refresh_hours and refresh_hours > 0 else None + self.problem: str | None = None + self._kg: KG | None = None + self._seen: dict = {} # location -> ETag, or (mtime, size): what was last read from it + self._due = 0.0 + self._lock = threading.Lock() + + def current(self) -> KG: + with self._lock: + if self._kg is None or (self.refresh_seconds is not None and time.monotonic() >= self._due): + self._read_all() + self._due = time.monotonic() + (self.refresh_seconds or 0) + self._kg.problem = self.problem + return self._kg + + def _read_all(self): + problems = [] + for location in self.locations: + try: + fresh = self._read(location) + except Exception as exc: # unreachable, an HTTP error, not Turtle: fall through to the next + problems.append(f"{self._shown(location)}: {' '.join(str(exc).split())[:200] or type(exc).__name__}") + continue + if fresh is not None and self._kg is not None and len(fresh.nodes) * 2 < len(self._kg.nodes): + # An export taken while the database was half reachable still parses. Losing most + # of the graph between two reads is treated as a failed read, not as news. + problems.append(f"{self._shown(location)}: holds {len(fresh.nodes)} nodes, under half of the " + f"{len(self._kg.nodes)} being served, so it was not taken") + continue + if fresh is not None: + self._kg = fresh + break + self.problem = "; ".join(problems) or None + if self._kg is None: + raise KGError("No knowledge graph could be loaded. " + (self.problem or "No source is configured.")) + + def _read(self, location: str) -> KG | None: + """The graph at `location`, or None when it has not changed since it was last read.""" + if re.match(r"https?://", location, flags=re.I): + request = urllib.request.Request(location, headers={"User-Agent": f"bbqs-kg-mcp/{__version__}"}) + if isinstance(self._seen.get(location), str): + request.add_header("If-None-Match", self._seen[location]) + try: + with urllib.request.urlopen(request, timeout=FETCH_SECONDS) as response: + data, headers = response.read(MAX_BYTES + 1), response.headers + except urllib.error.HTTPError as exc: + if exc.code == 304: + return None + raise RuntimeError(f"HTTP {exc.code}") from exc + seen, modified = headers.get("ETag"), {} + if headers.get("Last-Modified"): + try: + modified = {"last_modified": _iso(parsedate_to_datetime(headers["Last-Modified"]))} + except (TypeError, ValueError): + pass + else: + path = Path(location).expanduser() + stat = path.stat() + seen = (stat.st_mtime_ns, stat.st_size) + if self._seen.get(location) == seen: + return None + data = path.read_bytes() + committed = _committed(path) + modified = {"committed": committed} if committed else { + "file_modified": _iso(datetime.fromtimestamp(stat.st_mtime, timezone.utc))} + if len(data) > MAX_BYTES: + raise RuntimeError(f"larger than {MAX_BYTES // 2 ** 20} MB") + graph = _BudgetedGraph().parse(data=data, format=guess_format(location.split("?")[0]) or "turtle") + kg = KG(graph, {"source": self._shown(location), **modified, "loaded_at": _iso(datetime.now(timezone.utc))}) + if not kg.nodes: + raise RuntimeError("it holds no nodes") + self._seen[location] = seen + return kg + + @staticmethod + def _shown(location: str) -> str: + """A location as reported to clients: a URL as is, a file by name (not its place on disk).""" + if re.match(r"https?://", location, flags=re.I): + return location + path = Path(location) + return "kg/export/bbqs.ttl (the committed export)" if path.resolve() == BUNDLED_EXPORT else path.name + + +# ---- MCP ---------------------------------------------------------------------------------------- + +INSTRUCTIONS = ( + "Read-only access to the BBQS consortium knowledge graph: projects (NIH awards), investigators and their " + "roles on projects, organizations, working groups, species, publications, datasets, devices, software and " + "funding opportunities. Call describe_graph first: it lists the node types, the link types and how " + "complete each is. Find a starting node with search_nodes. Then get_node gives its record, find_related " + "what is most closely tied to it (or to several nodes at once), find_paths how two nodes are connected, and " + "get_neighbors everything within a few links; use sparql_query for counts and aggregates. The data is a " + "public snapshot of a graph that is still being linked, so a missing link means 'not recorded', not 'no'." +) +NODE = "A node: an id returned by another tool, a full IRI, or an exact name, grant number, ORCID, DOI or PMID." +WITHOUT_SPARQL = "; for a count, search_nodes gives the total" + + +def instructions(sparql: bool = True) -> str: + """INSTRUCTIONS, or without the tool that is not offered.""" + return INSTRUCTIONS if sparql else INSTRUCTIONS.replace("; use sparql_query for counts and aggregates", WITHOUT_SPARQL) + + +def build_server(source: GraphSource, sparql: bool = True): + """The MCP server over `source`. Every tool is a read; nothing here can change the graph.""" + from anyio import to_thread + from mcp.server.mcpserver import MCPServer + from mcp.server.mcpserver.exceptions import ToolError + from mcp.server.mcpserver.tools import Tool + from mcp_types import ToolAnnotations + from pydantic import ConfigDict, Field + from starlette.responses import JSONResponse + + read_only = ToolAnnotations(read_only_hint=True, destructive_hint=False, idempotent_hint=True, + open_world_hint=False) + tools: list = [] + + def tool(fn=None, *, description: str | None = None): + """Register `fn` as a read-only tool. Its answer goes out as compact JSON (indentation is + token cost on every result), and a KGError becomes the tool's error text so the model can + read what went wrong and correct itself, instead of a bare 'Error executing tool'. An + argument the tool does not take is refused, not dropped: a misspelt max_hops would + otherwise answer a different question without a word.""" + if fn is None: + return lambda fn: tool(fn, description=description) + + @functools.wraps(fn) + def answer(*args, **kwargs): + try: + return json.dumps(fn(*args, **kwargs), separators=(",", ":"), ensure_ascii=False, default=str) + except KGError as exc: + raise ToolError(str(exc)) from exc + made = Tool.from_function(answer, description=description, annotations=read_only, structured_output=False) + loose = made.fn_metadata.arg_model + strict = type(loose.__name__, (loose,), {"__module__": loose.__module__, + "model_config": ConfigDict({**loose.model_config, "extra": "forbid"})}) + made.fn_metadata.arg_model = strict + made.parameters = strict.model_json_schema(by_alias=True) + tools.append(made) + return fn + + describe_text = ("The map of the graph. Node types with counts and the properties each carries, link types with " + "their endpoints, how complete the data is, and which snapshot is being served. Call this first; " + "call it again with a type before filtering on that type's properties" + + (" or writing SPARQL about it." if sparql else ".")) + + @tool(description=describe_text) + def describe_graph( + type: Annotated[str | None, Field(description="A node type, for that type in full: what each property " + "means, the values it takes, and its links.")] = None, + ) -> dict: + return source.current().describe(type, sparql=sparql) + + @tool + def search_nodes( + query: Annotated[str, Field(description="Words to look for: a name, grant number, ORCID, DOI, or a " + "topic that appears in abstracts, keywords or descriptions. Partial words " + "match from their start. May be empty when type or where is given.")] = "", + type: Annotated[str | list[str] | None, Field(description="Only these node types, e.g. Project or " + "[\"Investigator\", \"Publication\"].")] = None, + where: Annotated[dict[str, Any] | None, Field(description="Exact property values a node must have, " + "e.g. {\"mechanism\": \"R61\"} or {\"year\": 2025}. " + "Case-insensitive.")] = None, + limit: Annotated[int, Field(description="Results per page, 1-100.")] = 10, + offset: Annotated[int, Field(description="Results to skip, for the next page.")] = 0, + ) -> dict: + """Find nodes by text, or list them by type and exact property values. Returns the ids the other + tools take, best match first, with where the text matched when the label does not show it.""" + kg = source.current() + return kg.answered(kg.search(query, type, where, limit, offset)) + + @tool + def get_node( + node: Annotated[str, Field(description=NODE)], + edge_limit: Annotated[int, Field(description="Neighbours listed per link type; the rest are counted " + "in 'more' (page through them with get_neighbors).")] = 25, + ) -> dict: + """Everything recorded about one node: all its properties, and every link grouped by type and + direction with the nodes at the other end.""" + kg = source.current() + return kg.answered(kg.node(node, edge_limit)) + + @tool + def get_neighbors( + node: Annotated[str, Field(description=NODE)], + edge: Annotated[str | list[str] | None, Field(description="Follow only these link types, e.g. has_role. " + "Default: all.")] = None, + direction: Annotated[OneOf["out", "in", "both"], Field(description="out: links pointing away from the " + "node; in: pointing at it; both (default).")] = "both", + type: Annotated[str | list[str] | None, Field(description="Return only nodes of these types. The walk " + "still passes through every type.")] = None, + depth: Annotated[int, Field(description=f"How many links away to go, 1-{MAX_DEPTH}.")] = 1, + limit: Annotated[int, Field(description="Nodes per page, 1-200.")] = 50, + offset: Annotated[int, Field(description="Nodes to skip, for the next page.")] = 0, + through_hubs: Annotated[bool, Field(description="Also walk through hubs. Naming edge does the same.")] = False, + ) -> dict: + """Walk outward from a node: every node within `depth` links, nearest first, each with the link + that reached it. `type` filters what is returned, not what is walked through, so depth 2 from a + species with type Investigator gives the people on the projects that study it. A hub (a node with + a great many links, such as a working group) is returned but not walked through, and listed in + the reply, so two links from a person is not everyone in the same working group. This tool lists; + it does not rank. For what is most closely tied to a node, use find_related.""" + kg = source.current() + return kg.answered(kg.neighbors(node, edge, direction, type, depth, limit, offset, through_hubs)) + + @tool + def find_related( + nodes: Annotated[str | list[str], Field(description="The starting node, or a list of up to " + f"{MAX_SEEDS} to ask what they have in common. Each is: " + NODE)], + type: Annotated[str | list[str] | None, Field(description="Only these node types, e.g. Investigator " + "for 'which people'. Default: every type, each ranked on " + "its own.")] = None, + limit: Annotated[int, Field(description="Nodes per type, 1-25 (1-10 when no type, or more than three, " + "are named).")] = 5, + offset: Annotated[int, Field(description="Nodes to skip per type, for the next page.")] = 0, + avoid_edges: Annotated[str | list[str] | None, Field(description="Link types not to spread along, e.g. " + "member_of_group to leave working groups out of " + "it.")] = None, + max_hops: Annotated[int, Field(description=f"How many links away to look, 1-{MAX_HOPS}. Nodes farther " + "than that are counted, not listed.")] = 4, + ) -> dict: + """What is most closely tied to a node, or to several nodes at once, ranked the way one idea brings up + another (spreading activation). Activation leaves each starting node along every link; each node it + reaches splits what it received equally among the nodes it is linked to; amounts that arrive together + add up. So a direct link has strength 1, a tie through one node with 5 neighbours 0.2, and two such + routes 0.4. Each node type is ranked on its own, nearest first and then strongest: strength compares + nodes the same distance away, and being a sum it can pass 1 where many routes arrive. With several + starting nodes only what every one of them reaches is returned, each node placed by its worst tie (the + farthest starting node, then the weakest), then by its next worst, and so on; such a row has + `per_start`, its tie to each starting node, in place of link, through, routes and share. Per type, + `within` counts the nodes within max_hops and `beyond` those farther. A row one link away has `link`, holding `also` + for any further links between the same two; a farther one has `through`, the strongest route, each + node on it with `splits`, the neighbours it divided among, and, where there are several routes, + `routes` and `share`, the part of the strength the route shown brings. find_paths lists the routes. + `tied` says a list was cut among equals, whose order (by name) means nothing: `count` of them, `listed` + on this page. `note` explains an empty answer; `avoided` repeats avoid_edges.""" + kg = source.current() + return kg.answered(kg.related(nodes, type, limit, offset, avoid_edges, max_hops)) + + @tool + def find_paths( + source_node: Annotated[str, Field(description=NODE)], + target_node: Annotated[str, Field(description=NODE)], + max_hops: Annotated[int, Field(description=f"Longest chain to consider, 1-{MAX_HOPS}.")] = 6, + limit: Annotated[int, Field(description="Paths to return, 1-25.")] = 5, + avoid_edges: Annotated[str | list[str] | None, Field(description="Link types not to use, e.g. " + "member_of_group to skip 'both are in the same " + "working group'.")] = None, + offset: Annotated[int, Field(description="Paths to skip, for the next page.")] = 0, + ) -> dict: + """How two nodes are connected: the shortest chains of links between them, strongest first, then + longer ones up to max_hops. A chain that goes the long way round a direct link is left out. A path's + strength is what is left of one unit after every node in between has split it equally among the + nodes it is linked to, so a path through a hub (a working group with a hundred members) is weak. + The reply counts the shortest paths (`routes`) and adds up their `strength`: the two figures + find_related shows for the pair. `shortest` is their length and `listed` the number of paths on this + page; each path has its `hops`, `strength`, `text` (each link drawn the way it points) and `nodes`. + `more` means there are further paths, reached with offset; `partial` means the search stopped + early, so some paths may be missing. `note` explains an empty answer.""" + kg = source.current() + return kg.answered(kg.paths(source_node, target_node, max_hops, limit, avoid_edges, offset)) + + if sparql: + @tool + def sparql_query( + query: Annotated[str, Field(description="A SPARQL SELECT or ASK query. Prefixes bbqs: (schema terms) " + "and bid: (node ids) are already declared, and an id from another tool " + "works as bid:<id>.")], + limit: Annotated[int, Field(description=f"Rows to return, 1-{MAX_ROWS}.")] = 100, + ) -> dict: + """Read-only SPARQL over the graph exactly as exported, for counts, aggregates and anything the + other tools cannot express. Classes and properties are the names describe_graph lists, as + bbqs:Project, bbqs:grant_number and so on; describe_graph's notes give the roster pattern. In the + `rows`, a number is a number, a truth value true or false, a date or time ISO text and any other + literal its text (NaN and infinity as NaN, INF, -INF); a node of this graph is bid:<id>, and any + other IRI prefix:name or <iri>. `more` means rows were cut at limit.""" + kg = source.current() + return kg.answered(kg.sparql(query, limit)) + + server = MCPServer("bbqs-kg", title="BBQS knowledge graph", version=__version__, instructions=instructions(sparql), + website_url="https://brain-bbqs.org/", tools=tools) + + @server.custom_route("/health", methods=["GET"]) + async def health(_request): + kg = await to_thread.run_sync(source.current) # may re-read the source: keep it off the event loop + return JSONResponse({"name": "bbqs-kg", "version": __version__, "mcp_endpoint": "/mcp", + "nodes": len(kg.nodes), "snapshot": kg.status()}) + + return server + + +def command_line(argv=None) -> argparse.Namespace: + parser = argparse.ArgumentParser(description="BBQS knowledge graph over MCP: read-only graph traversal.") + parser.add_argument("--source", default=os.environ.get("BBQS_KG_SOURCE"), metavar="PATH_OR_URL", + help="Turtle file or URL to serve (or set BBQS_KG_SOURCE). Default: the copy published " + f"at {PUBLISHED_EXPORT}, else the export committed next to this file, else the one on " + "GitHub.") + parser.add_argument("--refresh", type=float, default=1.0, metavar="HOURS", + help="Re-read the source this often (default 1). 0 reads it once.") + parser.add_argument("--http", action="store_true", help="Serve streamable HTTP at /mcp instead of stdio.") + parser.add_argument("--host", default="127.0.0.1", help="With --http: address to bind (default 127.0.0.1).") + parser.add_argument("--port", type=int, default=int(os.environ.get("PORT") or 8000), + help="With --http: port (default $PORT, else 8000).") + parser.add_argument("--allow-host", action="append", metavar="NAME", + help="With --http: a public host name requests may arrive for, through a tunnel or a proxy " + "(may be repeated, or set BBQS_KG_ALLOWED_HOSTS to a comma-separated list). The Host " + "and Origin check then stays on for it and the local names.") + parser.add_argument("--no-sparql", action="store_true", help="Do not offer the sparql_query tool.") + parser.add_argument("--check", action="store_true", help="Load the graph, print what it holds, and exit.") + args = parser.parse_args(argv) + if args.allow_host is None: + args.allow_host = [name.strip() for name in os.environ.get("BBQS_KG_ALLOWED_HOSTS", "").split(",") if name.strip()] + return args + + +def transport_security(allowed: list): + """Which requests to /mcp the HTTP transport accepts. With no names given, the SDK's own rule: + Host and Origin are checked when it listens on a local address, and not on any other. With + names, they are checked on any address, against those names and the local ones, which is what + keeps a page on another site from calling the server behind a tunnel or a proxy.""" + if not allowed: + return None + from mcp.server.transport_security import TransportSecuritySettings + local = ["127.0.0.1", "localhost", "[::1]"] + return TransportSecuritySettings( + enable_dns_rebinding_protection=True, + allowed_hosts=[*(f"{name}:*" for name in local), *allowed, *(f"{name}:*" for name in allowed)], + allowed_origins=[*(f"http://{name}:*" for name in local), *(f"https://{name}" for name in allowed), + *(f"https://{name}:*" for name in allowed)]) + + +def main(argv=None) -> int: + args = command_line(argv) + source = GraphSource(args.source, args.refresh) + try: + kg = source.current() + except KGError as exc: + print(f"bbqs-kg: {exc}", file=sys.stderr) + return 2 + summary = (f"bbqs-kg {__version__}: {len(kg.nodes)} nodes, {sum(kg.edge_counts.values())} links, " + f"{kg.snapshot['triples']} triples from {kg.snapshot['source']}") + if source.problem: + summary += f"\n not served from the preferred source -- {source.problem}" + if args.check: + print(summary) + for row in kg.describe()["edge_types"]: + print(f" {row['from']} -{row['edge']}-> {row['to']}: {row['count']}") + return 0 + print(summary, file=sys.stderr) # stdout belongs to the protocol in stdio mode + + server = build_server(source, sparql=not args.no_sparql) + if args.http: + server.run("streamable-http", host=args.host, port=args.port, stateless_http=True, json_response=True, + transport_security=transport_security(args.allow_host)) + else: + server.run("stdio") + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/kg/meetings.py b/kg/meetings.py new file mode 100644 index 00000000..5bd053f3 --- /dev/null +++ b/kg/meetings.py @@ -0,0 +1,337 @@ +#!/usr/bin/env python3 +"""Working-group meeting notes -> the records the Graph Inspector's Meetings tab shows. + +The input is the extraction of the BBQS working-group notes: a JSON list of meetings, each with +`date`, `group` (and `wg`, the name the notes used), `title`, `agenda`, `lessons`, `agreements`, +`disagreements`, `decisions`, `actions`, `blockers`, `speakers`, `attendees_listed` and a +`source_note`. The output is one JSON document: the meetings, every point made in them as an item of +its own, who each point is tied to, and the words the notes put in quotation marks. + +How a point is tied to people. The notes name people by first name or nickname, and the ties are: + said the point is attributed to them: a parenthesis of names that closes a clause + ("... (Alex)", "X (Alex) vs Y (Ben)", "(Ana, Ben supportive)"), or a clause that starts + with their name and a colon ("Kim: we need a sandbox") + owns an action is theirs: it starts "Sam: draft the agenda", "Sam and team: ...", or "Sam to + draft the agenda" + relayed they passed the point on for someone else ("(Kim via Alex)") + named the sentence mentions them otherwise, by first name, nickname or a surname only one + speaker has; this is a weaker tie, since it is not always the same as having said it +A name is resolved to a full name from the meeting's own speakers first, then from the speakers of +the same group, then from everyone named anywhere in the notes; a name that matches nobody, or more +than one person at every step, is kept as written and marked unresolved. Each resolution says which +way it was made, so a reader can check it. + +What it is not. The notes are summaries; the extraction says its items are paraphrases except where +quotation marks are used, and some of the source notes were written by Otter.ai or Zoom. Nothing +here is a transcript, and the page says so. + +The notes are internal: they name people and what they argued. Keep the input and the output out of +this repository and off the public site; kg/quality.py embeds the output only in a fragment built +for the artifact viewer (`--internal`). This script refuses either path inside the repository. + + python kg/meetings.py /outside/the/repo/meetings_extracted.json --out /outside/the/repo/meetings.json +""" +from __future__ import annotations + +import argparse +import hashlib +import json +import os +import re +import sys +import unicodedata +from collections import Counter, defaultdict +from pathlib import Path + +KIND = "bbqs-meetings" # the marker tests/guards/inspector-internal-data looks for, written only here +KINDS = (("lessons", "lesson"), ("agreements", "agreement"), ("disagreements", "disagreement"), + ("decisions", "decision"), ("actions", "action"), ("blockers", "blocker")) +KNOWN_FIELDS = {"wg", "group", "date", "title", "agenda", "speakers", "attendees_listed", "source_note", + *(field for field, _kind in KINDS)} + +# Nicknames the notes use for a first name. Only names the notes themselves use belong here. +NICKNAMES = {"Satra": "Satrajit", "Dave": "David", "Yarik": "Yaroslav", "Sul": "Suliman", + "Sully": "Suliman", "Jen": "Jennifer", "Liz": "Lizzy", "Alex": "Alexander", + "Sankar": "Sankaraleengam"} + +CAVEAT = ("These are summaries of the meeting notes, not transcripts. The extraction sorted each " + "meeting into agenda, lessons, agreements, disagreements, decisions and action items, as " + "paraphrases except where quotation marks are used; some source notes are Otter.ai or Zoom " + "AI summaries. Who is named depends on who took the notes.") + +_SEP = re.compile(r"\s*(?:,|;|&|/|\band\b)\s*") +_PAREN = re.compile(r"\(([^()]{1,80})\)") +_CLAUSE_HEAD = re.compile(r"(?:^|[;?]\s*|\s+vs\.?\s+)([^:;?()]{1,60}):\s+\S") +_ACTION_TO = re.compile(r"^([^:;()]{1,60}?)\s+(?:to|will)\s+[a-z]") +_SPEECH = re.compile(r"\s+(?:agreed|agrees|agreeing(?:\s+with\s+\S+)?|proposed|proposes|proposal|asks|asked|" + r"supportive|supports|supported|suggested|suggests|objected|objects|disagreed|disagrees|" + r"warned|noted|raised|questioned)\s*$") +_FILLER = {"team", "group", "lab", "others", "all", "everyone"} +# Words in double quotes (straight or curly), or in single quotes that are not apostrophes: a quote +# opens after a non-letter and closes before one, and may hold apostrophes between letters (we're). +_QUOTED = re.compile(r"\"([^\"]{2,})\"|“([^”]{2,})”|(?<![\w’'])'((?:[^']|(?<=\w)'(?=\w)){2,}?)'(?![\w])") + + +def _fold(text: str) -> str: + """Case- and accent-blind form of a name, for matching only.""" + return unicodedata.normalize("NFKD", text).encode("ascii", "ignore").decode().casefold().strip() + + +def _first(name: str) -> str: + return _fold(name.split()[0]) if name.split() else "" + + +def _family(name: str) -> set[str]: + """The words of a name after the first ("Ana Ruiz Diaz" -> ruiz, diaz).""" + return {_fold(w) for w in re.sub(r"\(.*?\)", "", name).split()[1:]} + + +def _digest(*parts: str, n: int = 10) -> str: + return hashlib.sha1("\x1f".join(parts).encode("utf-8")).hexdigest()[:n] + + +class People: + """Everyone the notes name as a speaker, and the way from a first name back to one of them.""" + + def __init__(self, meetings: list[dict]): + self.everyone = sorted({s.strip() for m in meetings for s in m.get("speakers") or [] if s.strip()}) + self.by_group = defaultdict(set) + for m in meetings: + for s in m.get("speakers") or []: + if s.strip(): + self.by_group[m.get("group") or m.get("wg") or ""].add(s.strip()) + self.first_names = {_first(s) for s in self.everyone} | {_fold(n) for n in NICKNAMES} + firsts = sorted({s.split()[0] for s in self.everyone if s.split()} | set(NICKNAMES), key=len, reverse=True) + lasts = sorted({w for s in self.everyone for w in re.sub(r"\(.*?\)", "", s).split()[1:]}, key=len, reverse=True) + self._mention = re.compile(r"(?<![\w-])(" + "|".join(map(re.escape, firsts)) + r")" + r"(?:\s+(" + "|".join(map(re.escape, lasts)) + r"))?(?![\w-])") if firsts else None + # A surname only one speaker has, and that is nobody's first name, names that speaker. + owners = defaultdict(set) + for s in self.everyone: + for w in re.sub(r"\(.*?\)", "", s).split()[1:]: + owners[w].add(s) + self.surnames = {w: next(iter(who)) for w, who in owners.items() + if len(who) == 1 and _fold(w) not in self.first_names and len(w) > 2} + self._surname = re.compile(r"(?<![\w-])(?:[A-Z]\.\s*)?(" + "|".join(map(re.escape, sorted(self.surnames, key=len, reverse=True))) + + r")(?![\w-])") if self.surnames else None + + @staticmethod + def looks_like_name(token: str) -> bool: + """One to three capitalised words, none an acronym or a number ("NIH", "TF2" are not).""" + words = token.split() + return 0 < len(words) <= 3 and all(w[:1].isupper() and not w.isupper() and not any(c.isdigit() for c in w) + for w in words) + + def is_known(self, token: str) -> bool: + return bool(token.split()) and _fold(token.split()[0]) in self.first_names + + def mentioned(self, text: str) -> list[str]: + """Names a sentence mentions: a speaker's first name or nickname, with the last name when it + follows ("Sam Ortiz to lead"); possessives count ("Sam's email"), but not an eponym, a + possessive followed by a capitalised word ("Sam's Rules"). Then a surname only one speaker + has, alone or after an initial ("Ortiz", "S. Ortiz").""" + out = [] + if self._mention: + for m in self._mention.finditer(text): + if re.match(r"['’]s\s+[A-Z][a-z]", text[m.end():]): + continue + out.append(" ".join(w for w in m.groups() if w)) + if self._surname: + covered = {w for name in out for w in name.split()[1:]} + out += [m.group(1) for m in self._surname.finditer(text) if m.group(1) not in covered] + return out + + def resolve(self, token: str, here: list[str], group: str = "") -> dict: + """One name as the notes wrote it -> {as_written, name or None, basis}.""" + words = token.split() + if len(words) == 1 and token in self.surnames: # a surname only one speaker has + return {"as_written": token, "name": self.surnames[token], "basis": "the only speaker with that surname"} + first = _fold(NICKNAMES.get(words[0], words[0])) + last = _fold(words[-1]) if len(words) > 1 else "" + + def matching(pool): + return sorted(s for s in pool if _first(s) == first and (not last or last in _family(s))) + + local = matching(here) + if len(local) == 1: + return {"as_written": token, "name": local[0], "basis": "a speaker in this meeting"} + if len(local) > 1: + return {"as_written": token, "name": None, + "basis": "more than one speaker in this meeting: " + ", ".join(local)} + in_group = matching(self.by_group.get(group, ())) + if len(in_group) == 1: + return {"as_written": token, "name": in_group[0], + "basis": "not in this meeting's speakers; the only person of that name who speaks in this group"} + everywhere = matching(self.everyone) + if len(everywhere) == 1: + return {"as_written": token, "name": everywhere[0], + "basis": "not in this meeting's speakers; the only person of that name in the notes"} + if everywhere: + return {"as_written": token, "name": None, + "basis": "not in this meeting's speakers, and several people in the notes have that name: " + + ", ".join(everywhere)} + return {"as_written": token, "name": None, "basis": "no speaker in the notes has that name"} + + +def _names_in(text: str, people: People, lenient: bool = False) -> list[tuple[str, str]] | None: + """A run of names ("Alex, Ben", "Ana/Ben", "Kim via Alex", "Ana, Ben supportive") -> + [(token, how)], else None. Every part must look like a name and at least one must be a + speaker's, so "(NIH)", "(open)" or "EMBER:" tie nobody; a name no speaker has is kept, and shows + as unresolved. `lenient` (an owner or speaker prefix) drops acronyms and words like "team" first, + so "Sam and team:" and "Sam/DCAIC:" still name Sam.""" + via = re.split(r"\s+via\s+", text.strip()) + parts = [] + for chunk in via: + tokens = [_SPEECH.sub("", t).strip() for t in _SEP.split(chunk) if t.strip()] + if lenient: + tokens = [t for t in tokens if not t.isupper() and t.casefold() not in _FILLER] + parts.append([t for t in tokens if t]) + if len(parts) > 2 or not all(parts): + return None + tokens = [t for chunk in parts for t in chunk] + if not (all(people.looks_like_name(t) for t in tokens) and any(people.is_known(t) for t in tokens)): + return None + out = [(t, "attributed") for t in parts[0]] + return out + [(t, "relayed") for t in parts[1]] if len(parts) == 2 else out + + +def attributions(text: str, kind: str, people: People, here: list[str], group: str = "") -> list[dict]: + """Who a point is tied to, and how (the module docstring lists the ties). One entry per person, + the strongest tie first.""" + found, spans = [], [] + if kind == "action": + owner = _CLAUSE_HEAD.match(text) or _ACTION_TO.match(text) + names = _names_in(owner.group(1), people, lenient=True) if owner else None + if names: + found += [(t, "owner") for t, _how in names] + spans.append(owner.span(1)) + for head in _CLAUSE_HEAD.finditer(text): # "Kim: ..." at the start of any clause + if any(a <= head.start(1) < b for a, b in spans): + continue + names = _names_in(head.group(1), people, lenient=True) + if names: + found += names + spans.append(head.span(1)) + for paren in _PAREN.finditer(text): + names = _names_in(paren.group(1), people) + if not names: + continue + before, after = text[:paren.start()].rstrip(), text[paren.end():] + apposition = (re.search(r"(?:\b[A-Z]{2,}|\b(?:team|group|lab))$", before) + and not re.match(r"\s*(?:$|[;,)]|vs\b)", after)) + found += [(t, "named") for t, _how in names] if apposition else names # "NIH (Ana, Ben) and ..." lists members + spans.append(paren.span()) + rest = "".join(" " if any(a <= i < b for a, b in spans) else c for i, c in enumerate(text)) + found += [(t, "named") for t in people.mentioned(rest)] + out, seen = [], set() + for token, how in found: + resolved = people.resolve(token, here, group) + key = resolved["name"] or token + if key in seen: + continue + seen.add(key) + out.append({**resolved, "how": how}) + order = {"owner": 0, "attributed": 1, "relayed": 2, "named": 3} + return sorted(out, key=lambda w: order.get(w["how"], 9)) + + +def quotes(text: str) -> list[str]: + return [next(g for g in m.groups() if g) for m in _QUOTED.finditer(text)] + + +def build(meetings: list[dict], source: dict) -> dict: + people = People(meetings) + out_meetings, items = [], [] + tally, spoke, groups_of = defaultdict(Counter), Counter(), defaultdict(set) + unresolved, unknown = Counter(), Counter() + for m in sorted(meetings, key=lambda m: (m.get("date") or "", m.get("group") or "", (m.get("title") or "").strip())): + group = m.get("group") or m.get("wg") or "Unknown group" + title = (m.get("title") or "").strip() + mid = "m" + _digest(m.get("date") or "", group, title, n=8) + speakers = [s.strip() for s in m.get("speakers") or [] if s.strip()] + for key, value in m.items(): + if key not in KNOWN_FIELDS and isinstance(value, list) and value and all(isinstance(v, str) for v in value): + unknown[key] += 1 + for s in speakers: + spoke[s] += 1 + groups_of[s].add(group) + counts = {} + for field, kind in KINDS: + entries = [t.strip() for t in m.get(field) or [] if isinstance(t, str) and t.strip()] + counts[kind] = len(entries) + for n, text in enumerate(entries): + who = attributions(text, kind, people, speakers, group) + for w in who: + if w["name"] is None: + unresolved[w["as_written"]] += 1 + else: + tally[w["name"]][w["how"]] += 1 + # Keyed on where the point sits, not its wording, so a flag survives a corrected note. + items.append({"id": "i" + _digest(mid, kind, str(n + 1)), "meeting": mid, "kind": kind, "n": n + 1, + "text": text, "who": who, "quotes": quotes(text)}) + out_meetings.append({ + "id": mid, "date": m.get("date"), "group": group, "as_named": m.get("wg") or group, + "title": title, "agenda": [a for a in m.get("agenda") or [] if a], + "speakers": speakers, "attendees": [a.strip() for a in m.get("attendees_listed") or [] if isinstance(a, str) and a.strip()], + "note": m.get("source_note") or "", "counts": counts, + }) + ids = Counter(i["id"] for i in items) + dupes = {k for k, v in ids.items() if v > 1} + for item in items: # two meetings with one date, group and title + if item["id"] in dupes: + item["id"] = f"{item['id']}-{item['meeting']}" + names = sorted(set(people.everyone) | set(tally)) + return { + "kind": KIND, "version": 2, "source": source, "caveat": CAVEAT, + "meetings": out_meetings, + "items": items, + "people": [{"name": n, "meetings": spoke[n], "groups": sorted(groups_of[n]), + "attributed": tally[n]["attributed"], "owns": tally[n]["owner"], + "named": tally[n]["named"] + tally[n]["relayed"]} for n in names], + "unresolved": [{"as_written": t, "count": c} for t, c in unresolved.most_common()], + "unread_fields": dict(unknown), + } + + +def refuse_on_ci(parser) -> None: + """These records are internal: they are built by hand, never on a CI runner.""" + if os.environ.get("GITHUB_ACTIONS") == "true" or os.environ.get("CI"): + parser.error("this runs on CI (GITHUB_ACTIONS or CI is set); internal records are built by hand only") + + +def main(argv=None) -> int: + parser = argparse.ArgumentParser(description=__doc__.split("\n\n")[0], + formatter_class=argparse.RawDescriptionHelpFormatter) + parser.add_argument("notes", type=Path, help="the extracted meetings, a JSON list") + parser.add_argument("--out", type=Path, required=True, help="where to write the records (outside the repo)") + parser.add_argument("--describe", default="", help="where the notes came from, shown on the page") + args = parser.parse_args(argv) + refuse_on_ci(parser) + repo = Path(__file__).resolve().parent.parent + for path, what in ((args.notes, "the notes"), (args.out, "--out")): + try: + path.resolve().relative_to(repo) + except ValueError: + continue + parser.error(f"{what} {path} is inside the repository; meeting notes are internal, keep them elsewhere") + raw = args.notes.read_bytes() + meetings = json.loads(raw) + if not isinstance(meetings, list) or not all(isinstance(m, dict) for m in meetings): + parser.error(f"{args.notes} is not a JSON list of meetings") + source = {"file": args.notes.name, "sha256": hashlib.sha256(raw).hexdigest(), "meetings": len(meetings), + "description": args.describe} + doc = build(meetings, source) + args.out.parent.mkdir(parents=True, exist_ok=True) + args.out.write_text(json.dumps(doc, ensure_ascii=False, indent=1), encoding="utf-8") + resolved = sum(1 for i in doc["items"] for w in i["who"] if w["name"]) + total = sum(len(i["who"]) for i in doc["items"]) + print(f"{len(doc['meetings'])} meetings, {len(doc['items'])} items, {total} ties " + f"({resolved} resolved to a full name), {sum(1 for i in doc['items'] if i['quotes'])} items quote someone; " + f"wrote {args.out}") + if doc["unread_fields"]: + print(f"fields of the notes this does not read: {doc['unread_fields']}", file=sys.stderr) + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/kg/quality.py b/kg/quality.py index a44ea3ff..fc142546 100644 --- a/kg/quality.py +++ b/kg/quality.py @@ -6,20 +6,32 @@ structure -- nodes/edges per class, connected components, isolated nodes, dangling IRIs, and the class->predicate->class edge matrix (which links actually exist) competency -- runs kg/competency_questions.yaml; each question is answered / empty / n/a / unmodeled - shapes -- per consistency shape: how many nodes it targets, and whether the data even contains + (or "none" for a question that asks what is missing, when nothing is). A file of + questions proposed but not adopted yet, competency_questions_proposed.yaml, is run too + when there is one, for the Inspector only: the gate (ci_check.py) scores the adopted file + shapes -- per SHACL validation shape: how many nodes it targets, and whether the data even contains the terms it checks (a shape whose inputs are absent passes vacuously) violations -- the SHACL results, keyed by focus node, so each entity card can show its own +and, for the Publications tab, each paper's tie to the grant it came from (publications()). + python kg/quality.py # kg/export/bbqs.ttl, anon python kg/quality.py data.ttl --access full # writes kg/export/quality.json and kg/browser/index.html (self-contained, open it directly) +The artifact build can also carry the working-group meeting records (kg/meetings.py), which are +internal: `--internal` embeds them in the `--fragment` only, written outside the repository, and +never in --html or --json, which the public site and the repo carry. + + python kg/quality.py --fragment /elsewhere/inspector.html --internal /elsewhere/meetings.json + Requires rdflib, pyshacl, PyYAML, click (all in kg/.venv). """ import json import os import re import subprocess +import unicodedata from collections import Counter, defaultdict from datetime import datetime, timezone from pathlib import Path @@ -29,11 +41,74 @@ from rdflib import BNode, Graph, Literal, Namespace, URIRef from rdflib.namespace import RDF, SH +from identity_keys import award_key, doi_key, fon_key, orcid_key, pmid_key, preprint_is_later, title_key, url_key +from identity_keys import is_preprint as preprint_by + HERE = Path(__file__).resolve().parent BBQS = Namespace("https://brain-bbqs.org/schema#") BID = "https://brain-bbqs.org/id/" LABEL_PREDICATES = ("name", "title", "label", "common_name", "model_name") +# The identifiers duplicates() compares, each folded by its rule in kg/identity_keys.py: the rule the +# database's uq_* indexes and the write paths use for the same key, so one decision is made one way +# everywhere. fon, grant_number and url (a funding call's notice page) joined on 2026-11-17. +IDENTIFIERS = ("orcid", "doi", "pmid", "fon", "grant_number", "url", "external_url", "repo_url") +FOLD = { + "orcid": orcid_key, + "doi": doi_key, + "pmid": pmid_key, + "fon": fon_key, + "grant_number": award_key, + "url": url_key, + "external_url": url_key, + "repo_url": url_key, +} +URLS = {"url", "external_url", "repo_url"} +# Where a shared URL is worth a look: these classes' URLs are usually their own page; jobs and +# announcements share programme pages. Even here a URL is no identity (a lab's homepage serves +# several tools, an NIH topic page lists several calls), so a URL group counts as a duplicate only +# when its records have one name as well; otherwise it is "advisory": listed, not counted. +URL_IDENTIFIES = {"SoftwareTool", "MLModel", "Dataset", "Benchmark", "Protocol", "Standard", "Device", + "DeviceManufacturer", "FundingOpportunity", "ResearchOrganization"} +_ASCII_LOWER = str.maketrans("ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz") + + +def folded(by: str, value): + """An identifier as duplicates() compares it: by its kg/identity_keys.py rule, or, when the rule + cannot read it (a DOI with a space inside, 'PMID 123 (corrected)'), as written: trimmed of ASCII + whitespace and ASCII lower-cased. Two equal spellings of an unreadable value are still one value, + as they were before the rules were strict; such a fold never equals a rule's key, since a value + that folds to a valid key is one the rule reads.""" + key = FOLD[by](value) + if key: + return key + return str(value).strip(" \t\n\v\f\r").translate(_ASCII_LOWER) or None + + +def fold_label(text) -> str: + """A name with markup, case, accents, punctuation and spacing folded away, as publications() compares + titles: "Bijan Pesaran" = "Bijan Pesaran", "Ca<sup>2+</sup>" = "Ca[2+]".""" + s = unicodedata.normalize("NFKD", re.sub(r"<[^>]+>", "", str(text or ""))) + s = "".join(c for c in s if not unicodedata.combining(c)) + return re.sub(r"[\W_]+", "", s.casefold()) + + +def first_last(text) -> str: + """A person's first and last name, without middle names or initials: "AVNIEL S GHUMAN" = "Avniel Ghuman".""" + parts = [p for p in re.split(r"[\s,]+", unicodedata.normalize("NFKD", str(text or "")).casefold()) if p] + parts = ["".join(c for c in p if c.isalnum()) for p in parts] + parts = [p for p in parts if p] + return f"{parts[0]} {parts[-1]}" if len(parts) >= 2 else "" + + +def is_preprint(g, node) -> bool: + """A preprint by its venue or its DOI's prefix: kg/identity_keys.py's rule, which + public.kg_is_preprint applies when it pairs a preprint with its published version.""" + journals = [str(o) for o in g.objects(node, BBQS.journal)] or [None] + dois = [str(o) for o in g.objects(node, BBQS.doi)] or [None] + return any(preprint_by(j, d) for j in journals for d in dois) + + ROW_LIMIT = 25 @@ -67,23 +142,53 @@ def local(term) -> str: return s.rsplit("#", 1)[-1] if "#" in s else s.rsplit("/", 1)[-1] +def inside_repo(path: Path) -> bool: + try: + Path(path).resolve().relative_to(HERE.parent) + return True + except ValueError: + return False + + +def bare_orcid(value) -> str: + """An ORCID as its 16-character id, however it was written (IRI, URL or bare): the ORCID key.""" + return orcid_key(value) or str(value).strip() + + +_TRANSLIT = str.maketrans({"ä": "ae", "ö": "oe", "ü": "ue", "Ä": "ae", "Ö": "oe", "Ü": "ue", "ß": "ss"}) + + +def fold_name(name) -> str: + """A person's name for matching only: case, accents, dots, spacing and any (note) ignored, so + "Jürgen Müller" = "Juergen Mueller" and "Ann Lee" = "Ann Lee".""" + text = re.sub(r"\(.*?\)", " ", str(name).translate(_TRANSLIT)) + text = unicodedata.normalize("NFKD", text).encode("ascii", "ignore").decode() + return " ".join(text.replace(".", " ").casefold().split()) + + +# First-name forms the meeting notes use that are not a prefix of the name the graph holds. +NAME_FORMS = {"joe": "joseph", "liz": "elizabeth", "lizzy": "elizabeth"} + + class KGQuality: DEFAULT_DATA = HERE / "export" / "bbqs.ttl" DEFAULT_TBOX = HERE / "bbqs.owl.ttl" DEFAULT_CQS = HERE / "competency_questions.yaml" + DEFAULT_CQS_PROPOSED = HERE / "competency_questions_proposed.yaml" # none today: #441's were adopted DEFAULT_SHAPES_DIR = HERE / "shapes" DEFAULT_JSON = HERE / "export" / "quality.json" DEFAULT_HTML = HERE / "browser" / "index.html" TEMPLATE = HERE / "browser" / "template.html" def __init__(self, data_file=None, access="anon", tbox_file=None, cq_file=None, shape_files=None, - source=None): + source=None, cq_proposed_file=None): self.data_file = Path(data_file) if data_file else self.DEFAULT_DATA self.access = access self.source = source or shown(self.data_file) self.graph = Graph().parse(str(self.data_file), format="turtle") self.tbox = Graph().parse(str(tbox_file or self.DEFAULT_TBOX), format="turtle") self.cq_file = Path(cq_file) if cq_file else self.DEFAULT_CQS + self.cq_proposed_file = Path(cq_proposed_file) if cq_proposed_file else self.DEFAULT_CQS_PROPOSED self.shape_files = [Path(s) for s in shape_files] if shape_files else sorted( self.DEFAULT_SHAPES_DIR.glob("*.ttl")) self.shapes = Graph() @@ -182,15 +287,18 @@ def find(n): # ---- competency questions --------------------------------------------------------------------- - def competency(self) -> list[dict]: - spec = yaml.safe_load(self.cq_file.read_text(encoding="utf-8")) + def competency(self, cq_file=None, question_set="adopted") -> list[dict]: + """Ask every question in a file. A question with `reads: absence` asks what is missing ("which + X has no Y"): no rows means nothing is, so it is "none", not "empty".""" + spec = yaml.safe_load(Path(cq_file or self.cq_file).read_text(encoding="utf-8")) prologue = "".join(f"PREFIX {k}: <{v}>\n" for k, v in spec["prefixes"].items()) results = [] for q in spec["questions"]: terms = sorted(set(re.findall(r"\bbbqs:(\w+)", q["sparql"]))) unmodeled = [t for t in terms if t not in self.tbox_terms] row = {k: q[k] for k in ("id", "area", "question", "access")} - row.update({"sparql": q["sparql"].strip(), "terms": terms, "unmodeled": unmodeled, + row.update({"set": question_set, "reads": q.get("reads", "rows"), + "sparql": q["sparql"].strip(), "terms": terms, "unmodeled": unmodeled, "columns": [], "rows": [], "row_count": 0}) if not unmodeled: res = self.graph.query(prologue + q["sparql"]) @@ -204,12 +312,18 @@ def competency(self) -> list[dict]: row["status"] = "answered" elif q["access"] == "full" and self.access == "anon": row["status"] = "n/a" + elif q.get("reads") == "absence": + row["status"] = "none" else: row["status"] = "empty" results.append(row) return results - # ---- consistency shapes: exercise + violations ------------------------------------------------ + def competency_proposed(self) -> list[dict]: + """Questions proposed but not adopted yet, if there is such a file: shown, not counted by the gate.""" + return self.competency(self.cq_proposed_file, "proposed") if self.cq_proposed_file.exists() else [] + + # ---- SHACL validation shapes: exercise + violations -------------------------------------------- def _present(self, term: str) -> bool: """Is bbqs:<term> in the data -- as a predicate, or (capitalised) as an instantiated class? @@ -243,7 +357,10 @@ def shape_exercise(self) -> list[dict]: for sp in sg.objects(shape, SH.sparql)] terms = paths.union(*queries) missing = sorted(t for t in terms if not self._present(t)) - checking = (any(self._present(t) for t in paths) + # A shape marked bbqs:readsAbsence passes by finding nothing (an unresolved claim, say), so + # an absent input there is the good outcome, not a vacuous check. + absence = (shape, BBQS["readsAbsence"], Literal(True)) in sg + checking = (absence or any(self._present(t) for t in paths) or any(all(self._present(t) for t in q) for q in queries)) out.append({ "shape": local(shape), @@ -287,6 +404,12 @@ def entities(self, degree: Counter, violations: dict) -> list[dict]: if p != RDF.type and isinstance(o, URIRef) and str(o).startswith(BID) and o not in self.types: dangling_out[s].append({"predicate": local(p), "target": str(o)}) + dupes = defaultdict(list) + for d in self.duplicates()["groups"]: + if d["kind"] != "duplicate": + continue + for n in d["nodes"]: + dupes[URIRef(n)].append({"by": d["by"], "value": d["value"], "others": [o for o in d["nodes"] if o != n]}) cards = [] for node, cls in sorted(self.types.items(), key=lambda kv: (kv[1], self.label(kv[0]).lower())): facts, links = defaultdict(list), [] @@ -306,6 +429,8 @@ def entities(self, degree: Counter, violations: dict) -> list[dict]: flags.append("dangling") severities = {v["severity"] for v in violations.get(str(node), [])} flags += [s for s in ("violation", "warning") if s in severities] + if dupes.get(node): + flags.append("duplicate") cards.append({ "id": str(node), "class": cls, @@ -318,9 +443,378 @@ def entities(self, degree: Counter, violations: dict) -> list[dict]: "degree": degree[node], "flags": flags, "violations": violations.get(str(node), []), + **({"duplicates": dupes[node]} if dupes.get(node) else {}), }) return cards + # ---- possible duplicates ----------------------------------------------------------------------- + + def title_keys(self, node) -> set: + """A publication's title as the database pairs it: kg/identity_keys.py title_key of its + bbqs:title (publications.title), or of its label when it has none. Markup, case, accents and + punctuation fold away; a Greek letter is spelled out, so alpha- and beta-synuclein differ.""" + titles = [str(o) for o in self.graph.objects(node, BBQS.title)] or [self.label(node)] + return {k for k in map(title_key, titles) if k} + + def _year(self, node): + for o in sorted(self.graph.objects(node, BBQS.year), key=str): + if re.fullmatch(r"[0-9]{1,4}", str(o)): + return int(str(o)) + return None + + def _pmid(self, node): + values = sorted(str(o) for o in self.graph.objects(node, BBQS.pmid)) + return values[0] if values else None + + def _doi(self, node): + values = sorted(str(o) for o in self.graph.objects(node, BBQS.doi)) + return values[0] if values else None + + def later(self, preprint, paper) -> bool: + """Is this preprint later than this paper (kg/identity_keys.py preprint_is_later: by PubMed id, + else by the posting date in its bioRxiv/medRxiv DOI or else its year, against the paper's + year)? Then it is no earlier version of it, and the pairing rule never links them.""" + return preprint_is_later(self._year(preprint), self._pmid(preprint), self._doi(preprint), + self._year(paper), self._pmid(paper)) + + def version_kind(self, nodes) -> str: + """What publications sharing one title are, by the pairing rule public.kg_link_publication_versions + applies (kg/identity_keys.json: title, preprint, chronology): + + "linked_versions": one published record, the rest preprints, and every revision_of inside + the group runs from that record to a preprint, each preprint linked: resolved. A pair a + curator linked by hand is resolved whatever its order says, as the database reports it + (linked, before the order is tested). + "versions": the same, not all linked yet, and each preprint still to link no later than the + paper (chronology: by PubMed id, else by the date in its DOI, else by year): a pair to + link, which the function links once a project credits both. + "versions_to_check": one published record and its preprints, but a revision_of inside the + group runs from a preprint (or between two preprints, or to the paper itself), or a + preprint still to link is later than the paper. The fault is a link or an order, not a + second record: correct the link, or the record whose PMID, DOI or year is wrong (a + "preprint" later than its paper may be another work with the same title). Never a + merge: a preprint and its paper are two records of one work. + "duplicate": anything else, for a curator to merge. Two records with one DOI or PMID are + one record whatever links them; two published records, or none, are a duplicate to + merge before any version link (the function skips them).""" + nodes, g = set(nodes), self.graph + for by in ("doi", "pmid"): + held = set() + for n in nodes: + keys = {folded(by, o) for o in g.objects(n, BBQS[by])} - {None} + if keys & held: + return "duplicate" + held |= keys + published = [n for n in nodes if not is_preprint(g, n)] + if len(published) != 1: + return "duplicate" + paper = published[0] + links = {(s, o) for s, o in g.subject_objects(BBQS.revision_of) if s in nodes and o in nodes} + if any(s != paper or o == paper for s, o in links): + return "versions_to_check" + unlinked = nodes - {paper} - {o for _s, o in links} + if not unlinked: + return "linked_versions" + if any(self.later(p, paper) for p in unlinked): + return "versions_to_check" + return "versions" + + def revision_links(self) -> dict: + """revision_of links between two publications that the database's type check accepts but the + pairing rule never makes: "reversed", a preprint said to revise a published paper (the newer + revises the older, so the link points from the paper), and "titles_differ", two records whose + title keys differ (two works, not two versions of one). SHACL #25 checks the rest: an end + that is not a Publication, a link to itself, a link both ways.""" + g, out = self.graph, [] + for s, o in sorted(g.subject_objects(BBQS.revision_of), key=lambda so: (str(so[0]), str(so[1]))): + if s == o or self.types.get(s) != "Publication" or self.types.get(o) != "Publication": + continue + problems = [] + if is_preprint(g, s) and not is_preprint(g, o): + problems.append("reversed") + if not self.title_keys(s) & self.title_keys(o): + problems.append("titles_differ") + if problems: + out.append({"subject": str(s), "object": str(o), "problems": problems}) + return {"count": len(out), "links": out} + + def duplicates(self) -> dict: + """Nodes of one class that share a name (folded: case, accents, punctuation, spacing), a + publication's title (title_key, the database's pairing key), or an identifier (ORCID, DOI, + PMID, FON, grant number, URL; each folded by its kg/identity_keys.py rule, the database's, or + as written when the rule cannot read it: folded()). A graph built from a database inherits + its duplicates, and cleaning them gets harder as it grows, so they are counted here and the CI + gate fails when the count rises: a new one is stopped at the next export, not found later. + + A title shared by publications is one of four things (version_kind()): versions already + linked by revision_of (`linked_versions`, resolved, not counted); a preprint and its + published version not linked yet (`versions`, counted apart: linked, never merged); a + preprint and its paper whose link points the wrong way or whose order is wrong + (`versions_to_check`, counted apart: a link or a value to correct, never a merge); or a + duplicate. Two publications with one DOI or one PMID are one record whatever links them. + A shared URL counts only with a shared name: alone it is `advisory` (listed, not counted), + since a homepage or a topic page can serve several records. Role records are skipped: their + labels ("co_pi on <grant>") repeat by design.""" + if getattr(self, "_dupes", None) is not None: + return self._dupes + g = self.graph + groups = defaultdict(set) + for node, cls in self.types.items(): + if cls == "ProjectRole": + continue + if cls == "Publication": + for key in self.title_keys(node): + groups[(cls, "title", key)].add(node) + else: + name = fold_label(self.label(node)) + if name: + groups[(cls, "name", name)].add(node) + if cls == "Investigator" and first_last(self.label(node)): + groups[(cls, "first and last name", first_last(self.label(node)))].add(node) + for by in IDENTIFIERS: + if by in URLS and cls not in URL_IDENTIFIES: + continue + for o in g.objects(node, BBQS[by]): + v = folded(by, o) + if v: + groups[(cls, by, v)].add(node) + out, seen = [], set() + order = {**{by: (1 if by in URLS else 0) for by in IDENTIFIERS}, "title": 2, "name": 2, + "first and last name": 3} + for (cls, by, value), nodes in sorted(groups.items(), key=lambda kv: (order.get(kv[0][1], 9), kv[0])): + if len(nodes) < 2 or frozenset(nodes) in seen: + continue + seen.add(frozenset(nodes)) + if cls == "Publication" and by == "title": + kind = self.version_kind(nodes) + elif by in URLS and len({fold_label(self.label(n)) for n in nodes}) > 1: + kind = "advisory" + else: + kind = "duplicate" + out.append({"class": cls, "by": by, "value": value, "kind": kind, + "nodes": sorted(str(n) for n in nodes)}) + dup = [d for d in out if d["kind"] == "duplicate"] + self._dupes = {"groups": out, "count": len(dup), + "nodes": len({n for d in dup for n in d["nodes"]}), + "versions": sum(1 for d in out if d["kind"] == "versions"), + "versions_to_check": sum(1 for d in out if d["kind"] == "versions_to_check"), + "linked_versions": sum(1 for d in out if d["kind"] == "linked_versions"), + "advisory": sum(1 for d in out if d["kind"] == "advisory")} + return self._dupes + + # ---- publications ------------------------------------------------------------------------------ + + def publications(self) -> dict: + """Each publication's tie to the grant it came from, and what this export holds of its text. + + The tie is a Project's `produced` link, which the exporter writes from project_publications: + the NIH award credited on the paper's PubMed record. The export allows two checks of it: + whether an author is on the project's roster, by ORCID, which can only be asked where the + paper has author ORCIDs and someone on the roster has an ORCID too (otherwise the tie is + "roster_unchecked"), and whether another record has the same title: a preprint and its + published version linked by revision_of ("versions_linked"), such a pair not linked yet + ("preprint_pair"), or a possible duplicate ("same_title"), as duplicates() decides it. Each + row lists the paper's linked versions (`versions`: the one it revises, or is revised by). The + text is not in an anon export: publication_fulltext is admin-only, so `texts` lists only the + text records this export holds (`text_of` links).""" + g, types = self.graph, self.types + pubs = sorted((n for n, c in types.items() if c == "Publication"), key=lambda n: (self.label(n).lower(), str(n))) + produced = defaultdict(set) + for proj, pub in g.subject_objects(BBQS.produced): + if types.get(pub) == "Publication" and types.get(proj) == "Project": + produced[pub].add(proj) + roster = defaultdict(set) + for rec, cls in types.items(): + if cls == "ProjectRole": + proj, person = g.value(rec, BBQS.on_project), g.value(rec, BBQS.held_by) + if proj is not None and person is not None: + roster[proj].add(person) + by_orcid = defaultdict(set) + for person, cls in types.items(): + if cls == "Investigator": + for o in g.objects(person, BBQS.orcid): + by_orcid[bare_orcid(o)].add(person) + texts = defaultdict(list) + for node, pub in g.subject_objects(BBQS.text_of): + if types.get(pub) == "Publication": + texts[pub].append({"id": str(node), **{local(p): str(o) for p, o in g.predicate_objects(node) + if p != RDF.type and isinstance(o, Literal)}}) + + # Same title (markup and punctuation out: "Ca<sup>2+</sup>" = "Ca[2+]"; a Greek letter + # spelled out), by title_key of bbqs:title, as duplicates() and the database group it. + same_title = defaultdict(set) + for n in pubs: + for key in self.title_keys(n): + same_title[key].add(n) + title_kind = {} + for nodes in same_title.values(): + if len(nodes) > 1: + kind = self.version_kind(nodes) + for n in nodes: # a record in a duplicate group under any of its titles stays one + if title_kind.get(n) != "duplicate": + title_kind[n] = kind + versions = defaultdict(list) # revision_of, read from both ends + for newer, older in g.subject_objects(BBQS.revision_of): + if types.get(newer) == "Publication" and types.get(older) == "Publication": + versions[newer].append({"id": str(older), "relation": "revises"}) + versions[older].append({"id": str(newer), "relation": "revised_by"}) + by_label = lambda n: (self.label(n), str(n)) + with_orcid = {p for people in by_orcid.values() for p in people} + rows = [] + for pub in pubs: + projects = sorted(produced[pub], key=by_label) + orcids = sorted({bare_orcid(o) for o in g.objects(pub, BBQS.author_orcids)}) + members = set().union(*(roster[p] for p in projects)) + authors = sorted({p for o in orcids for p in by_orcid.get(o, ())}, key=by_label) + checks = [] + if not projects: + checks.append("no_project") + if len(projects) > 1: + checks.append("several_projects") + if not orcids: + checks.append("authors_unchecked") + elif not members & with_orcid: # nothing on the roster to compare the ORCIDs with + checks.append("roster_unchecked") + elif not any(p in members for p in authors): + checks.append("no_roster_author") + # A preprint and its published version are one work in two records: linked, never merged. + if title_kind.get(pub) == "versions": + checks.append("preprint_pair") + elif title_kind.get(pub) == "versions_to_check": + checks.append("version_to_check") + elif title_kind.get(pub) == "duplicate": + checks.append("same_title") + elif versions[pub]: + checks.append("versions_linked") + if g.value(pub, BBQS.doi) is None and g.value(pub, BBQS.pmid) is None: + checks.append("no_identifier") + if not texts[pub]: + checks.append("no_text") + rows.append({ + "id": str(pub), + "projects": [{"id": str(p), "grant_number": str(g.value(p, BBQS.grant_number) or ""), + "roster": len(roster[p])} for p in projects], + "author_orcids": len(orcids), + "investigator_authors": [{"id": str(p), "on_roster": p in members} for p in authors], + "texts": texts[pub], + "versions": sorted(versions[pub], key=lambda v: (v["relation"], v["id"])), + "checks": checks, + }) + return {"count": len(rows), "checks": dict(Counter(c for r in rows for c in r["checks"])), "rows": rows} + + def match_person(self, name: str, first_name_alone: bool = True) -> tuple[list[str], str | None]: + """The Investigator nodes that are the person named, and how that was decided: the same name, + and the same first and last name (both, so a person the graph holds twice, once with a middle + name, links to both nodes); failing those, the same last name with the first name shortened + ("Alex" for Alexander, "Joe" for Joseph); or, for a first name alone, the one investigator + who has it. More than one node means the graph holds the person twice.""" + if not hasattr(self, "_investigators"): + self._investigators = [(n, fold_name(self.label(n)).split()) for n, c in self.types.items() + if c == "Investigator"] + + def short_for(a, b): + a = NAME_FORMS.get(a, a) + return a == b or (len(a) >= 3 and b.startswith(a)) or (len(b) >= 3 and a.startswith(b)) + + rules = [ + ("same name", lambda w, x: x == w), + ("same first and last name", lambda w, x: len(w) > 1 and len(x) > 1 and (x[0], x[-1]) == (w[0], w[-1])), + ("same last name, and the first name is a short form of it", + lambda w, x: len(w) > 1 and len(x) > 1 and x[-1] == w[-1] and short_for(w[0], x[0])), + ] + w = fold_name(name).split() + if not w: + return [], None + same = {} + for how, rule in rules[:2]: # rule 1 or 2, every node either finds + for n, x in self._investigators: + if rule(w, x): + same.setdefault(n, how) + if same: + first = next(how for how, _rule in rules[:2] if how in same.values()) + return sorted(str(n) for n in same), first + for how, rule in rules[2:]: + hits = [n for n, x in self._investigators if rule(w, x)] + if hits: + return sorted(str(n) for n in hits), how + hits = [n for n, x in self._investigators if first_name_alone and len(w) == 1 and x[:1] == w] + if len(hits) == 1: + return [str(hits[0])], "first name only: the notes give no last name, and one investigator has it" + return [], None + + def link_people(self, internal: dict) -> dict: + """Tie each person the meeting records name to the Investigator nodes that are the same person + (match_person says how).""" + for person in internal.get("people") or []: + person.pop("investigators", None) + person.pop("match", None) + hits, how = self.match_person(person.get("name", "")) + if hits: + person["investigators"], person["match"] = hits, how + return internal + + def link_devices(self, doc: dict) -> dict: + """Tie the device list to the graph. Each award to its Project node by grant number; each + full name in a "who spoke to it" or "speaker" line to Investigator nodes (match_person: a + first name alone is not enough there, and a name the source marks for checking, in + parentheses with VERIFY or "likely", is left out because fold_name drops the parenthesis); + and each maker or model named to the device catalog's DeviceManufacturer or Device node of + the same name. A match says that a name is in the catalog, not that the device is checked.""" + g = self.graph + + def core(grant) -> str: # 1R34DA059716-01 -> R34DA059716 + m = re.search(r"[A-Z]\d{2}[A-Z]{2}\d{6}", str(grant).upper()) + return m.group(0) if m else str(grant).strip().upper() + + projects = defaultdict(set) + for n, c in self.types.items(): + if c == "Project": + for gn in g.objects(n, BBQS.grant_number): + projects[core(gn)].add(str(n)) + for award in doc.get("awards") or []: + award["projects"] = sorted(projects.get(core(award.get("award", "")), ())) + + spoken = {} + for text in {d.get("presenter", "") for d in doc.get("devices") or []} | \ + {e.get("speaker", "") for e in (doc.get("evidence") or []) + (doc.get("discussion") or [])}: + cleaned = re.sub(r"\(.*?\)", " ", text or "") + found = [] + for m in re.finditer(r"\b[A-Z][\w'’.-]+(?:\s+[A-Z][\w'’.-]+){1,2}\b", cleaned): + hits, how = self.match_person(m.group(0), first_name_alone=False) + if hits and all(h not in {x for f in found for x in f["investigators"]} for h in hits): + found.append({"as_written": m.group(0), "investigators": hits, "match": how}) + if found: + spoken[text] = found + doc["speakers"] = spoken + + def names(cls, preds): + index = defaultdict(set) + for n, c in self.types.items(): + if c == cls: + for p in preds: + for v in g.objects(n, BBQS[p]): + if fold_name(v): + index[fold_name(v)].add(str(n)) + return index + + makers, models = names("DeviceManufacturer", ("name", "aliases")), names("Device", ("name", "model_name", "aliases")) + + def catalog(name, index): + f = fold_name(name) + if not f: + return [] + exact = index.get(f) or {n for key, nodes in index.items() if key.startswith(f + " ") for n in nodes} + return sorted(exact) + + for d in doc.get("devices") or []: + ai = d.get("ai_predicted") or {} + d["catalog"] = { + "brand": catalog(d.get("brand_stated", ""), makers), + "ai_manufacturer": catalog(re.split(r"[,(]", ai.get("manufacturer") or "")[0], makers), + "ai_model": catalog(re.split(r"[,;(]", ai.get("model") or "")[0], models), + } + return doc + # ---- report ------------------------------------------------------------------------------------ def report(self) -> dict: @@ -328,6 +822,7 @@ def report(self) -> dict: degree = structure.pop("_degree") violations = self.violations() cqs = self.competency() + proposed = self.competency_proposed() return { "data_file": shown(self.data_file), "access": self.access, @@ -337,19 +832,34 @@ def report(self) -> dict: "structure": structure, "competency": cqs, "competency_summary": dict(Counter(q["status"] for q in cqs)), + "competency_proposed": proposed, + "competency_proposed_summary": dict(Counter(q["status"] for q in proposed)), "shapes": self.shape_exercise(), "violation_count": sum(v["severity"] == "violation" for vs in violations.values() for v in vs), "warning_count": sum(v["severity"] == "warning" for vs in violations.values() for v in vs), "entities": self.entities(degree, violations), + "publications": self.publications(), + "duplicates": self.duplicates(), + "revision_links": self.revision_links(), } @staticmethod - def render_html(report: dict, out_path: Path, standalone: bool = True) -> Path: + def render_html(report: dict, out_path: Path, standalone: bool = True, internal: dict | None = None) -> Path: """Inline the report into browser/template.html. The template is a body fragment (the form - an Artifact publish wants); standalone=True adds the doctype + metas a local file needs.""" + an Artifact publish wants); standalone=True adds the doctype + metas a local file needs. + `internal` (meeting records, kg/meetings.py) fills the second placeholder; without it the + page carries none. Both are filled in one pass over the template, so text inside one payload + is never read as a placeholder.""" template = KGQuality.TEMPLATE.read_text(encoding="utf-8") - payload = json.dumps(report, ensure_ascii=False).replace("</", "<\\/") - html = template.replace("/*__REPORT__*/null", payload) + + def script_json(value) -> str: # JSON as a script literal: no "<" left to open or close a tag + return json.dumps(value, ensure_ascii=False).replace("<", "\\u003c") + + fill = {"REPORT": script_json(report), "INTERNAL": script_json(internal) if internal else "null"} + parts = re.split(r"/\*__(REPORT|INTERNAL)__\*/null", template) + if parts[1::2] != ["REPORT", "INTERNAL"]: + raise ValueError("browser/template.html must hold /*__REPORT__*/null and then /*__INTERNAL__*/null, once each") + html = "".join(fill[part] if i % 2 else part for i, part in enumerate(parts)) if standalone: html = ('<!doctype html>\n<html lang="en">\n<meta charset="utf-8">\n' '<meta name="viewport" content="width=device-width, initial-scale=1">\n' + html) @@ -370,7 +880,25 @@ def summary(report: dict) -> str: for q in report["competency"]: extra = f"unmodeled: {', '.join(q['unmodeled'])}" if q["unmodeled"] else f"{q['row_count']} rows" lines.append(f" {q['id']} {q['status']:<9} {q['question']} [{extra}]") - lines += ["", f"shapes (violations: {report['violation_count']}, warnings: {report.get('warning_count', 0)}):"] + if report.get("competency_proposed"): + lines += ["", f"proposed, not scored: {report['competency_proposed_summary']}"] + for q in report["competency_proposed"]: + extra = f"unmodeled: {', '.join(q['unmodeled'])}" if q["unmodeled"] else f"{q['row_count']} rows" + lines.append(f" {q['id']} {q['status']:<9} {q['question']} [{extra}]") + pubs = report.get("publications") + if pubs: + tied = sum(1 for r in pubs["rows"] if r["projects"]) + lines += ["", f"publications: {pubs['count']}, {tied} tied to a project; checks: " + + ", ".join(f"{k} {v}" for k, v in sorted(pubs["checks"].items()))] + d = report.get("duplicates") or {} + rl = report.get("revision_links") or {} + lines += ["", f"possible duplicates: {d.get('count', 0)} groups ({d.get('nodes', 0)} nodes); " + f"preprint + published pairs: {d.get('versions', 0)} to link, " + f"{d.get('linked_versions', 0)} linked (revision_of), " + f"{d.get('versions_to_check', 0)} to check (a link from the preprint, or a preprint later than its paper); " + f"shared URL only (advisory, not counted): {d.get('advisory', 0)}; " + f"revision_of links to check (reversed, or two titles): {rl.get('count', 0)}"] + lines += ["", f"SHACL validation shapes (violations: {report['violation_count']}, warnings: {report.get('warning_count', 0)}):"] for sh in report["shapes"]: absent = f" (absent: {', '.join(sh['missing_inputs'])})" if sh["missing_inputs"] else "" state = ("exercised" + absent if sh["exercised"] else @@ -391,14 +919,42 @@ def summary(report: dict) -> str: help="Also write the page without doctype/head, for publishing as an Artifact.") @click.option("--source", default=None, help="How the data was produced, shown in the page's build stamp (default: the file path).") -def main(data_file, access, json_path, html_path, fragment_path, source): +@click.option("--internal", "internal_paths", type=click.Path(exists=True, dir_okay=False, path_type=Path), + multiple=True, + help="Internal records for the artifact copy: the meeting notes (kg/meetings.py, the Meetings " + "tab) and the device list (kg/devices.py, the Devices tab). May be given once for each. " + "Embedded in the --fragment only, which must be written outside the repository.") +def main(data_file, access, json_path, html_path, fragment_path, source, internal_paths): """Measure DATA_FILE (default kg/export/bbqs.ttl) and build the entity browser from it.""" - report = KGQuality(data_file, access=access, source=source).report() + internal = None + if internal_paths: + if os.environ.get("GITHUB_ACTIONS") == "true" or os.environ.get("CI"): + raise click.UsageError("--internal runs on CI here (GITHUB_ACTIONS or CI is set); the artifact copy is built by hand only.") + if not fragment_path: + raise click.UsageError("--internal goes into the artifact fragment only: give --fragment as well.") + for path, what in [*((p, "--internal") for p in internal_paths), (fragment_path, "--fragment")]: + if inside_repo(path): + raise click.UsageError(f"{what} {path} is inside the repository. These records are internal: " + "keep them, and any page built with them, outside it.") + kg = KGQuality(data_file, access=access, source=source) + report = kg.report() + if internal_paths: + linkers = {"bbqs-meetings": kg.link_people, "bbqs-devices": kg.link_devices} + internal = {} + for path in internal_paths: + doc = json.loads(path.read_text(encoding="utf-8")) + kind = doc.get("kind") if isinstance(doc, dict) else None + if kind not in linkers: + raise click.UsageError(f"--internal {path} is not meeting records or a device list " + f"(its kind is {kind!r}; kg/meetings.py and kg/devices.py write them).") + if kind in internal: + raise click.UsageError(f"--internal was given two files of kind {kind}.") + internal[kind] = linkers[kind](doc) json_path.parent.mkdir(parents=True, exist_ok=True) json_path.write_text(json.dumps(report, ensure_ascii=False, indent=1), encoding="utf-8") - KGQuality.render_html(report, html_path) + KGQuality.render_html(report, html_path) # never the internal records if fragment_path: - KGQuality.render_html(report, fragment_path, standalone=False) + KGQuality.render_html(report, fragment_path, standalone=False, internal=internal) click.echo(KGQuality.summary(report)) click.echo(f"\nwrote {shown(json_path)} and {shown(html_path)}") diff --git a/kg/quality_baseline.json b/kg/quality_baseline.json index 9937eac5..8159d67c 100644 --- a/kg/quality_baseline.json +++ b/kg/quality_baseline.json @@ -17,24 +17,52 @@ "CQ11", "CQ12", "CQ13", + "CQ14", "CQ15", "CQ16", - "CQ17" + "CQ17", + "CQ18", + "CQ20", + "CQ21", + "CQ22", + "CQ23", + "CQ25", + "CQ26", + "CQ27", + "CQ28", + "CQ29", + "CQ32", + "CQ33", + "CQ34", + "CQ35", + "CQ37", + "CQ38", + "CQ39", + "CQ41", + "CQ42" ], "exercised": [ "AuthorOrcidResolvesShape", + "AwardUniquePerProjectShape", "ConsortiumRoleNotAProjectRoleShape", + "DoiUniquePerPublicationShape", + "FonUniquePerCallShape", "HeldByResolvesShape", "MechanismMatchesGrantNumberShape", "OneClassPerNodeShape", "OneRolePerPersonPerGrantShape", "OrcidUniquePerPersonShape", + "PmidUniquePerPublicationShape", "ProjectIdentifiersAgreeShape", "ProjectIsAnAwardShape", "ProjectRoleTokenShape", "StudiesSpeciesResolvesShape", "UrlFieldsAreUrlsShape" ], - "isolated": 189, - "nodes": 808 + "isolated": 73, + "nodes": 758, + "duplicates": 0, + "versions": 5, + "versions_to_check": 0, + "revision_links": 0 } diff --git a/kg/requirements-mcp.txt b/kg/requirements-mcp.txt new file mode 100644 index 00000000..51355629 --- /dev/null +++ b/kg/requirements-mcp.txt @@ -0,0 +1,5 @@ +# The MCP server (mcp_server.py): the graph library, at the version the harness pins in +# requirements.txt, and the MCP SDK. The same two pins are in the script header of mcp_server.py, +# for `uv run`; test_mcp_server.py fails if the three places disagree. +mcp==2.3.0 +rdflib==7.6.0 diff --git a/kg/roundtrip.py b/kg/roundtrip.py index 9336ef2c..c23ce070 100644 --- a/kg/roundtrip.py +++ b/kg/roundtrip.py @@ -13,6 +13,10 @@ On an anon key this measures the public projection only: RLS-hidden rows and columns are out of reach, and are reported as such rather than counted as carried. + +A link table (LINKS) holds no fact cells, only the link a row stands for, so it is measured as +links: a row is carried when its triple is in the export. Links are counted apart from the cells, +and the overall percentage is of cells alone. """ import json from collections import defaultdict @@ -38,8 +42,13 @@ } TABLES = ["resources", "grants", "projects", "grant_investigators", "investigators_public", "organizations", "publications", "dandisets", "software_tools", "funding_opportunities", "announcements", - "species", "device_models", "device_categories", "device_manufacturers", - "investigator_organizations", "project_publications", "grant_dandisets"] + "public_jobs", "species", "device_models", "device_categories", "device_manufacturers", + "investigator_organizations", "project_publications", "grant_dandisets", "resource_links"] +# table -> the one triple a row of a link table stands for. One line per link table that names its +# two ends by resources.id; the older join tables name them by detail-table ids, and are not here yet. +LINKS = { + "resource_links": lambda r: (BID[r["subject_id"]], BBQS[r["predicate"]], BID[r["object_id"]]), +} def cell_values(v): @@ -70,9 +79,11 @@ def node_values(g: Graph, node) -> set[str]: out.add(str(o)) if str(o).startswith("https://orcid.org/"): out.add(str(o).removeprefix("https://orcid.org/")) - # A cell the exporter turned into a link (working_groups -> member_of_group) is carried - # when the linked node's name equals the value: that is how a rebuild would recover it. - out.update(str(n).strip() for n in g.objects(o, BBQS.name)) + # A cell the exporter turned into a link (working_groups -> member_of_group, study_species + # -> studies_species) is carried when the linked node answers to the value: its name, or + # for a species its common name or an alias, the forms the exporter resolves through. + for p2 in (BBQS.name, BBQS.common_name, BBQS.aliases): + out.update(str(n).strip() for n in g.objects(o, p2)) return out @@ -97,6 +108,12 @@ def table(self, name) -> dict: return {"table": name, "readable": False, "error": str(e)[:120]} if not rows: return {"table": name, "readable": True, "rows": 0, "note": "no rows visible to this key"} + if name in LINKS: + links = [LINKS[name](r) for r in rows] + carried = sum(1 for t in links if t in self.g) + return {"table": name, "readable": True, "rows": len(rows), "links": len(links), "carried": carried, + "pct": round(100 * carried / len(links), 1), + "examples": [str(r)[:120] for r, t in zip(rows, links) if t not in self.g][:2]} cols = defaultdict(lambda: {"cells": 0, "carried": 0, "examples": []}) noded = 0 for r in rows: @@ -129,10 +146,14 @@ def table(self, name) -> dict: def report(self) -> dict: tables = [self.table(t) for t in TABLES] - cells = sum(t.get("cells", 0) for t in tables) - carried = sum(t.get("carried", 0) for t in tables) + cell_tables = [t for t in tables if "links" not in t] + cells = sum(t.get("cells", 0) for t in cell_tables) + carried = sum(t.get("carried", 0) for t in cell_tables) + links = sum(t.get("links", 0) for t in tables) + links_carried = sum(t.get("carried", 0) for t in tables if "links" in t) return {"data_file": self.data_file.name, "cells": cells, "carried": carried, - "pct": round(100 * carried / cells, 1) if cells else None, "tables": tables} + "pct": round(100 * carried / cells, 1) if cells else None, + "links": links, "links_carried": links_carried, "tables": tables} @click.command() @@ -143,7 +164,8 @@ def main(data_file, json_path): """Measure how much of the database DATA_FILE carries, cell by cell.""" rep = RoundTrip(data_file).report() json_path.write_text(json.dumps(rep, indent=1, ensure_ascii=False), encoding="utf-8") - click.echo(f"overall: {rep['carried']:,} of {rep['cells']:,} fact cells carried ({rep['pct']}%)\n") + click.echo(f"overall: {rep['carried']:,} of {rep['cells']:,} fact cells carried ({rep['pct']}%); " + f"{rep['links_carried']:,} of {rep['links']:,} link-table rows carried as links\n") for t in rep["tables"]: if not t.get("readable"): click.echo(f"{t['table']:28} not readable with this key") @@ -151,6 +173,10 @@ def main(data_file, json_path): if not t.get("rows"): click.echo(f"{t['table']:28} 0 rows visible") continue + if "links" in t: + click.echo(f"{t['table']:28} rows {t['rows']:>4} links {t['carried']:>5}/{t['links']:<5} " + f"{str(t['pct']) + '%':>6} carried as links") + continue dropped = [c for c, d in t["columns"].items() if d["pct"] < 100] click.echo(f"{t['table']:28} rows {t['rows']:>4} noded {t['noded']:>4} cells {t['carried']:>5}/{t['cells']:<5} " f"{str(t['pct']) + '%':>6} dropped/partial: {', '.join(dropped) if dropped else '-'}") diff --git a/kg/shapes/consistency.shapes.ttl b/kg/shapes/validation.shapes.ttl similarity index 73% rename from kg/shapes/consistency.shapes.ttl rename to kg/shapes/validation.shapes.ttl index 44deaa86..edfd7ccf 100644 --- a/kg/shapes/consistency.shapes.ttl +++ b/kg/shapes/validation.shapes.ttl @@ -1,4 +1,4 @@ -# BBQS KG consistency shapes — the CONTRADICTION checks, hand-written. +# BBQS KG validation shapes — the hand-written SHACL checks for contradictions and dangling claims. # # These are the shapes LinkML's gen-shacl cannot produce: cross-field and cross-node SPARQL # constraints that catch "one part of the graph disagrees with another". The boilerplate node/ @@ -26,8 +26,9 @@ bbqs:ProjectRoleTokenShape sh:path bbqs:project_role ; sh:minCount 1 ; sh:maxCount 1 ; - sh:in ( "PI" "contact_pi" "co_pi" "mpi" "co-investigator" "trainee" "postdoc" "graduate_student" - "research_staff" "data_manager" "project_manager" "nih_program" "admin" "other" ) ; + sh:in ( "PI" "contact_pi" "co_pi" "mpi" "co-investigator" "collaborator" "trainee" "postdoc" + "graduate_student" "research_staff" "data_manager" "project_manager" "nih_program" "admin" + "other" ) ; sh:message "ProjectRole.project_role must be a canonical token, not free text (#283)." ; ] . @@ -116,21 +117,19 @@ bbqs:MechanismMatchesGrantNumberShape # projects.study_species[] is free text ("Mus musculus", "Humans", "All Species"). Each raw claim # must resolve to a real Species node (by name or common_name); one that does not is a dangling # reference — the graph asserts a subject that isn't in it. +# The exporter writes a study_species claim as a studies_species link when a Species matches it, and +# as studies_species_unresolved text only when none does (link, don't copy). So the check is simply: +# any unresolved claim fires. Finding none is the pass, which bbqs:readsAbsence tells the coverage +# report (kg/quality.py), the way `reads: absence` does for a competency question. bbqs:StudiesSpeciesResolvesShape a sh:NodeShape ; sh:targetClass bbqs:Project ; + bbqs:readsAbsence true ; sh:sparql [ - sh:message "study_species does not resolve to a Species node -- dangling reference (#7)." ; + sh:message "A study_species claim does not resolve to a Species node (#7): add the species, or an alias for this name." ; sh:prefixes bbqs:prefixes ; sh:select """ - SELECT $this ?value WHERE { - $this bbqs:studies_species_name ?value . - FILTER NOT EXISTS { - $this bbqs:studies_species ?sp . - { ?sp bbqs:name ?n } UNION { ?sp bbqs:common_name ?n } UNION { ?sp bbqs:aliases ?n } - FILTER(LCASE(STR(?n)) = LCASE(STR(?value))) - } - } + SELECT $this ?value WHERE { $this bbqs:studies_species_unresolved ?value . } """ ; ] . @@ -160,20 +159,26 @@ bbqs:ConflictingVerifiedProvenanceShape # ── Invariant #14 — one ORCID, one Investigator node ────────────────────────── # An ORCID iD identifies a person, not a row. Two Investigator nodes carrying the same -# bbqs:orcid are the same person recorded twice -- a merge candidate, never two people. -# No targets yet: the anon export doesn't emit `orcid` (full-access export required). +# bbqs:orcid are the same person recorded twice -- a merge candidate, never two people. The +# result names the other node (?value), so it says which two to merge. +# +# #14 and #21-#24 are the export's check of the identity keys (kg/identity_keys.json; the +# unique_keys in bbqs.linkml.yaml; uq_* indexes in the database). They compare exact terms, which +# is what the exporter writes for one key (an ORCID as its orcid.org IRI, upper-case X), and is +# quick; two spellings of one key (a lower-case DOI, a FON without hyphens) are kg/quality.py +# duplicates()' to find: folding in SPARQL cost 13-16 s more on the export. bbqs:OrcidUniquePerPersonShape a sh:NodeShape ; sh:targetClass bbqs:Investigator ; sh:sparql [ - sh:message "Two Investigator nodes share one orcid -- merge candidate, not two people (#14)." ; + sh:message "Has the ORCID iD {?key}, as {?value} does: one person recorded twice -- merge them (#14)." ; sh:prefixes bbqs:prefixes ; sh:select """ - SELECT $this ?other WHERE { + SELECT $this ?value ?key WHERE { $this bbqs:orcid ?o . - ?other bbqs:orcid ?o . - FILTER(?other != $this) - FILTER(STR($this) < STR(?other)) + ?value a bbqs:Investigator ; bbqs:orcid ?o . + FILTER(?value != $this && STR($this) < STR(?value)) + BIND(STR(?o) AS ?key) } """ ; ] . @@ -367,3 +372,104 @@ bbqs:UrlFieldsAreUrlsShape sh:message "website is not a single URL (#10)." ] ; sh:property [ sh:path bbqs:homepage_url ; sh:pattern "^[A-Za-z][A-Za-z0-9+.-]*:[^ ]+$" ; sh:message "homepage_url is not a single URL (#10)." ] . + +# ── Invariant #21 — one DOI, one Publication node ───────────────────────────── +# A DOI names one work in one version. Two Publication nodes with one DOI are one record held +# twice (the database refuses it: uq_publications_doi_key). A preprint and its published version +# have two DOIs, so they never meet here: they are two records, linked by revision_of (#25). +bbqs:DoiUniquePerPublicationShape + a sh:NodeShape ; + sh:targetClass bbqs:Publication ; + sh:sparql [ + sh:message "Has the DOI {?key}, as {?value} does: one work recorded twice -- merge them; a preprint and its published version have two DOIs and are linked with revision_of instead (#21)." ; + sh:prefixes bbqs:prefixes ; + sh:select """ + SELECT $this ?value ?key WHERE { + $this bbqs:doi ?d . + ?value a bbqs:Publication ; bbqs:doi ?d . + FILTER(?value != $this && STR($this) < STR(?value)) + BIND(STR(?d) AS ?key) + } + """ ; + ] . + +# ── Invariant #22 — one PMID, one Publication node ──────────────────────────── +# A PubMed id is one PubMed record (uq_publications_pmid_key in the database). +bbqs:PmidUniquePerPublicationShape + a sh:NodeShape ; + sh:targetClass bbqs:Publication ; + sh:sparql [ + sh:message "Has the PMID {?key}, as {?value} does: one PubMed record, two nodes -- merge them (#22)." ; + sh:prefixes bbqs:prefixes ; + sh:select """ + SELECT $this ?value ?key WHERE { + $this bbqs:pmid ?p . + ?value a bbqs:Publication ; bbqs:pmid ?p . + FILTER(?value != $this && STR($this) < STR(?value)) + BIND(STR(?p) AS ?key) + } + """ ; + ] . + +# ── Invariant #23 — one FON, one FundingOpportunity node ────────────────────── +# A funding opportunity number is one call (uq_funding_opportunities_fon_key). A final notice +# supersedes its forecast in place: the call keeps its node and takes the new FON, never a second. +bbqs:FonUniquePerCallShape + a sh:NodeShape ; + sh:targetClass bbqs:FundingOpportunity ; + sh:sparql [ + sh:message "Has the FON {?key}, as {?value} does: one funding call recorded twice -- merge them (#23)." ; + sh:prefixes bbqs:prefixes ; + sh:select """ + SELECT $this ?value ?key WHERE { + $this bbqs:fon ?f . + ?value a bbqs:FundingOpportunity ; bbqs:fon ?f . + FILTER(?value != $this && STR($this) < STR(?value)) + BIND(STR(?f) AS ?key) + } + """ ; + ] . + +# ── Invariant #24 — one award, one Project node ─────────────────────────────── +# Project = Grant: an NIH award is one project (uq_grants_award_key and uq_projects_award_key, +# by the award's core number in the database). +bbqs:AwardUniquePerProjectShape + a sh:NodeShape ; + sh:targetClass bbqs:Project ; + sh:sparql [ + sh:message "Has the grant number {?key}, as {?value} does: one award recorded twice -- merge them (#24)." ; + sh:prefixes bbqs:prefixes ; + sh:select """ + SELECT $this ?value ?key WHERE { + $this bbqs:grant_number ?g . + ?value a bbqs:Project ; bbqs:grant_number ?g . + FILTER(?value != $this && STR($this) < STR(?value)) + BIND(STR(?g) AS ?key) + } + """ ; + ] . + +# ── Invariant #25 — revision_of links one Publication to another, one way ───── +# A published paper is a revision_of its preprint (PROV: the newer wasRevisionOf the older): two +# records, each with its own PMID, DOI and date, linked instead of merged. The link joins two +# Publication nodes, never a node to itself, and never both ways (the database refuses the +# reverse of a link it holds: resource_links_check_types). The four branches are disjoint on +# purpose (a self link is not also "both ways"), so the RED fixture's case for each one tests it. +# What SPARQL cannot see without folding (a link from a preprint to its paper, a link between two +# titles) kg/quality.py revision_links() checks. +bbqs:RevisionOfLinksTwoPublicationsShape + a sh:NodeShape ; + sh:targetSubjectsOf bbqs:revision_of ; + sh:sparql [ + sh:message "revision_of must point from one Publication to another, in one direction only; this one points at {?value} (#25)." ; + sh:prefixes bbqs:prefixes ; + sh:select """ + SELECT $this ?value WHERE { + $this bbqs:revision_of ?value . + FILTER(?value = $this + || NOT EXISTS { $this a bbqs:Publication } + || NOT EXISTS { ?value a bbqs:Publication } + || (?value != $this && EXISTS { ?value bbqs:revision_of $this })) + } + """ ; + ] . diff --git a/kg/test_exporter.py b/kg/test_exporter.py new file mode 100644 index 00000000..36cbb8a2 --- /dev/null +++ b/kg/test_exporter.py @@ -0,0 +1,531 @@ +#!/usr/bin/env python3 +"""Tests for the exporter (kg/bbqs_kg.py), run against a stand-in for Supabase's REST API. + + python kg/test_exporter.py # needs only kg/requirements.txt (rdflib, PyYAML) + +Nothing leaves the machine: urllib.request.urlopen is replaced by a PostgREST in miniature that +serves the rows each test gives it, and answers for a missing or refused table the way PostgREST +does. What is checked is the graph export() writes: jobs from the public_jobs view and who posted +them from public_job_posters, the link-don't-copy rule for a job's institution, that nothing +private is written whatever a view hands over, and that a view that is missing or refused is +skipped with a note instead of failing the export. The stand-in serves the objects anon reads column +by column (20261117190000) as PostgREST does: select=* or a private column is refused, so the +exporter must name public columns (PUBLIC_COLUMNS). The competency questions about jobs (CQ18, +CQ35, CQ36, CQ37) are then asked of that graph, so a question and the exporter cannot drift apart. +The curated links in resource_links (a published paper's revision_of its preprint among them) are +written only between two nodes and only for a predicate the schema has, an ORCID is written in +its one form whatever case its X has, and kg/roundtrip.py counts those links as links. +""" +import contextlib +import io +import json +import os +import re +import sys +import tempfile +import unittest +import urllib.error +import urllib.parse +from pathlib import Path +from unittest import mock + +import yaml +from rdflib import Literal, URIRef +from rdflib.namespace import RDF, XSD + +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +from bbqs_kg import BBQS, BID, PUBLIC_COLUMNS, BBQSKnowledgeGraph # noqa: E402 +from roundtrip import RoundTrip # noqa: E402 + +# The columns anon may not read, as the migrations that hide them list them (their kg_private_from_anon +# rows): 20261117190000, and 20261118120000, which added projects.metadata (every questionnaire answer). +HIDE_MIGRATIONS = [HERE.parent / "supabase" / "migrations" / name for name in ( + "20261117190000_hide_private_columns_from_anon.sql", "20261118120000_privacy_round_two.sql")] + + +def private_from_anon() -> dict: + """object -> the columns the migrations take from anon, read from their kg_private_from_anon rows.""" + private = {} + for path in HIDE_MIGRATIONS: + sql = path.read_text(encoding="utf8") + block = sql[sql.index("INSERT INTO kg_private_from_anon"):] + block = block[:block.index(";")] + for obj, col in re.findall(r"\(\s*'([a-z_]+)',\s*'([a-z_]+)',\s*'", block): + private.setdefault(obj, set()).add(col) + return private + + +PRIVATE_FROM_ANON = private_from_anon() + + +def uid(n: int) -> str: + return f"00000000-0000-4000-8000-{n:012d}" + + +# Spine rows (resources.id) and the detail rows' own ids. +ORG_A, ORG_B = uid(1), uid(2) # organizations' spine rows +ORG_A_ID, ORG_B_ID, ORG_NOWHERE_ID = uid(11), uid(12), uid(13) # organizations.id (the last has no row) +PAT, OLU = uid(21), uid(22) # investigators' spine rows +PAT_ID, OLU_ID = uid(31), uid(32) # investigators.id +JOB_SPINE_ORG = uid(41) # its spine row names organization A; its jobs row names A too, in other words +JOB_ROW_ORG = uid(42) # no organization on the spine row; the jobs row names organization B +JOB_TEXT = uid(43) # no organization anywhere: the institution is kept as written +JOB_UNKNOWN_ORG = uid(44) # the jobs row names an organization id no organizations row has +JOB_NO_NAME = uid(45) # no organization, and an institution that is only spaces +JOB_BARE = uid(46) # a job with a spine row and no public_jobs row +NOT_A_JOB = uid(51) # a public_jobs row pointing at a spine row that is not a job +AUTH_UID = "a5a5a5a5-0000-4000-8000-0000000000aa" # jobs.posted_by, an auth user id: never in the graph +SECRET_EMAIL, SECRET_NAME = "pat.poster@example.invalid", "Pat Poster (contact)" + +RESOURCES = [ + {"id": ORG_A, "resource_type": "organization", "name": "UNIVERSITY OF A"}, + {"id": ORG_B, "resource_type": "organization", "name": "B INSTITUTE"}, + {"id": PAT, "resource_type": "investigator", "name": "Pat Poster"}, + {"id": OLU, "resource_type": "investigator", "name": "Olu Other"}, + {"id": JOB_SPINE_ORG, "resource_type": "job", "name": "Postdoc in vision", "organization_id": ORG_A_ID}, + {"id": JOB_ROW_ORG, "resource_type": "job", "name": "Data engineer"}, + {"id": JOB_TEXT, "resource_type": "job", "name": "Lab technician"}, + {"id": JOB_UNKNOWN_ORG, "resource_type": "job", "name": "Research scientist"}, + {"id": JOB_NO_NAME, "resource_type": "job", "name": "PhD student"}, + {"id": JOB_BARE, "resource_type": "job", "name": "Intern"}, + {"id": NOT_A_JOB, "resource_type": "announcement", "name": "Retreat"}, +] +ORGANIZATIONS = [{"id": ORG_A_ID, "resource_id": ORG_A, "url": "https://a.example.org"}, + {"id": ORG_B_ID, "resource_id": ORG_B}] +INVESTIGATORS_PUBLIC = [{"id": PAT_ID, "resource_id": PAT, "name": "Pat Poster"}, + {"id": OLU_ID, "resource_id": OLU, "name": "Olu Other"}] + + +def job_row(resource_id, institution, organization_id=None, **more): + """A public_jobs row, carrying the private columns a careless view might leak as well: the + exporter must take only the columns it means to.""" + return {"id": "10000000" + resource_id[8:], "resource_id": resource_id, "title": "(the spine has the name)", + "institution": institution, "organization_id": organization_id, "department": None, "location": None, + "job_type": "postdoc", "description": "(the spine has the description)", "application_url": None, + "expires_at": None, "is_active": True, "created_at": "2026-11-01T00:00:00+00:00", + "updated_at": "2026-11-02T00:00:00+00:00", + "contact_name": SECRET_NAME, "contact_email": SECRET_EMAIL, "posted_by": AUTH_UID, **more} + + +PUBLIC_JOBS = [ + job_row(JOB_SPINE_ORG, "Univ. of A", ORG_A_ID, department="Psychology", location="Boston, MA", + application_url="https://jobs.a.example.org/123", expires_at="2026-12-31T23:59:59+00:00"), + job_row(JOB_ROW_ORG, "B Inst.", ORG_B_ID, job_type="engineer", is_active=False), + job_row(JOB_TEXT, "Lab of Nowhere", job_type="engineer", expires_at="next spring"), + job_row(JOB_UNKNOWN_ORG, "Elsewhere University", ORG_NOWHERE_ID, job_type="research_scientist"), + job_row(JOB_NO_NAME, " ", job_type="phd", is_active=None), + job_row(NOT_A_JOB, "Somewhere", ORG_A_ID, job_type="faculty"), + job_row(uid(99), "Gone", ORG_A_ID, job_type="faculty"), # a resource_id no resources row has +] +PUBLIC_JOB_POSTERS = [ + {"job_resource_id": JOB_SPINE_ORG, "poster_resource_id": PAT}, + {"job_resource_id": JOB_TEXT, "poster_resource_id": ORG_A}, # not a person: no link + {"job_resource_id": NOT_A_JOB, "poster_resource_id": OLU}, # not a job: no link + {"job_resource_id": uid(99), "poster_resource_id": PAT}, # no such node: no link +] +TABLES = {"resources": RESOURCES, "organizations": ORGANIZATIONS, "investigators_public": INVESTIGATORS_PUBLIC, + "public_jobs": PUBLIC_JOBS, "public_job_posters": PUBLIC_JOB_POSTERS} + +# resource_links: each row names two spine rows (resources.id) and a predicate. +MODEL, DATASET, PUBLISHED, PREPRINT, BENCHMARK, SOFTWARE, LEGACY_PROJECT = (uid(n) for n in range(61, 68)) +DELETED = uid(97) # a resources row that is gone (resource_links cascades, but a stale read may not) +LINK_RESOURCES = RESOURCES + [ + {"id": MODEL, "resource_type": "ml_model", "name": "Pose model"}, + {"id": DATASET, "resource_type": "dataset", "name": "Pose dataset"}, + {"id": PUBLISHED, "resource_type": "publication", "name": "Mapping behavior across species"}, + {"id": PREPRINT, "resource_type": "publication", "name": "Mapping behavior across species"}, + {"id": BENCHMARK, "resource_type": "benchmark", "name": "Pose leaderboard"}, + {"id": SOFTWARE, "resource_type": "software", "name": "Pose tracker"}, + {"id": LEGACY_PROJECT, "resource_type": "project", "name": "A legacy project row (never a node)"}, +] +RESOURCE_LINKS = [ + {"subject_id": PUBLISHED, "predicate": "revision_of", "object_id": PREPRINT}, + {"subject_id": MODEL, "predicate": "trained_on", "object_id": DATASET}, + {"subject_id": BENCHMARK, "predicate": "evaluates", "object_id": SOFTWARE}, + {"subject_id": BENCHMARK, "predicate": "uses_software", "object_id": SOFTWARE}, # no such slot + {"subject_id": BENCHMARK, "predicate": "evaluates", "object_id": DELETED}, # no node at that end + {"subject_id": LEGACY_PROJECT, "predicate": "produced", "object_id": DATASET}, # a type the spine skips +] +LOWER_X = "0000-0002-1825-009x" # an ORCID iD whose check character is X, written in lower case +LINK_TABLES = {**TABLES, "resources": LINK_RESOURCES, "resource_links": RESOURCE_LINKS, + "investigators_public": [{**INVESTIGATORS_PUBLIC[0], "orcid": f"https://orcid.org/{LOWER_X}"}, + INVESTIGATORS_PUBLIC[1]], + "publications": [{"id": uid(71), "resource_id": PUBLISHED, "title": "Mapping behavior across species", + "author_orcids": [LOWER_X], "pmid": "200001"}, + {"id": uid(72), "resource_id": PREPRINT, "title": "Mapping behavior across species", + "journal": "bioRxiv", "pmid": "200002"}]} + + +class FakePostgrest: + """GET <url>/rest/v1/<table>?select=... -> the rows given for that table, [] for any other. + A table in `missing` answers as PostgREST does for one that does not exist (`code` 42P01, or + PGRST205 from a newer PostgREST), one in `refused` as for one anon may not read (401, 42501). + An object in `private` is read column by column, as anon reads it once 20261117190000 is + applied: select=*, or a select naming one of its private columns, is refused (401, 42501). + A column in `absent` does not exist in this database: a select naming it is refused the way + PostgREST refuses it (400, 42703, "column <table>.<column> does not exist"), first one first.""" + + def __init__(self, tables, missing=(), refused=(), missing_code="42P01", private=None, absent=None): + self.tables, self.missing, self.refused, self.missing_code = tables, set(missing), set(refused), missing_code + self.private = PRIVATE_FROM_ANON if private is None else private + self.absent = absent or {} + self.asked = [] + self.selects = {} # table -> the select= it was asked for + + def __call__(self, request, timeout=None): + url = urllib.parse.urlparse(request.full_url) + table = url.path.rsplit("/", 1)[-1] + select = urllib.parse.parse_qs(url.query).get("select", ["*"])[0] + self.asked.append(table) + self.selects.setdefault(table, []).append(select) + if table in self.missing: + raise self._error(request.full_url, 404, self.missing_code, f"relation \"public.{table}\" does not exist") + if table in self.refused: + raise self._error(request.full_url, 401, "42501", f"permission denied for view {table}") + if table in self.absent: + gone = [c.strip() for c in select.split(",") if c.strip() in self.absent[table]] + if gone: + raise self._error(request.full_url, 400, "42703", f"column {table}.{gone[0]} does not exist") + if table in self.private: + named = {c.strip() for c in select.split(",")} + if "*" in named or named & self.private[table]: + raise self._error(request.full_url, 401, "42501", f"permission denied for table {table}") + return io.BytesIO(json.dumps(self.tables.get(table, [])).encode()) + + @staticmethod + def _error(url, status, code, message): + body = json.dumps({"code": code, "message": message, "details": None, "hint": None}).encode() + return urllib.error.HTTPError(url, status, message, {"Content-Type": "application/json"}, io.BytesIO(body)) + + +def export(**rest): + """Run export() against the stand-in. Returns (the exporter, its graph, what it printed).""" + fake = FakePostgrest(rest.pop("tables", TABLES), **rest) + kg = BBQSKnowledgeGraph(url="https://stand-in.invalid", key="anon-key") + out, err = io.StringIO(), io.StringIO() + with tempfile.TemporaryDirectory() as folder, mock.patch("urllib.request.urlopen", fake), \ + contextlib.redirect_stdout(out), contextlib.redirect_stderr(err): + written = kg.export(Path(folder) / "bbqs.ttl") + assert written.exists() and written.stat().st_size > 0 + return kg, kg.graph, out.getvalue() + err.getvalue(), fake + + +def objects(graph, subject: str, slot: str) -> set: + return set(graph.objects(BID[subject], BBQS[slot])) + + +class AColumnThisDatabaseLacks(unittest.TestCase): + """A PUBLIC_COLUMNS entry the live database does not have (42703) costs that one column, not the + whole object. On 2026-11-18 investigators_public answered 42703 to the column list, and the export + lost every person's ORCID, roles, working groups, research areas and skills.""" + + # one person with every fact the view carries, so losing the view would show + TABLES = {**TABLES, "investigators_public": [{**INVESTIGATORS_PUBLIC[0], "orcid": "0000-0002-1825-0097", + "role": "Principal Investigator", "research_areas": ["vision"], + "skills": ["python"]}, *INVESTIGATORS_PUBLIC[1:]]} + SLOTS = ("orcid", "consortium_role", "research_areas", "skills") + + @classmethod + def setUpClass(cls): + cls.full = export(tables=cls.TABLES)[1] + + def count(self, graph, slot): + return len(list(graph.triples((None, BBQS[slot], None)))) + + def test_the_object_is_still_exported_without_that_column(self): + kg, g, said, fake = export(tables=self.TABLES, absent={"investigators_public": {"onboarded"}}) + self.assertNotIn("investigators_public", kg.unreadable) + self.assertEqual(kg.missing_columns, {"investigators_public": ["onboarded"]}) + self.assertIn("column onboarded does not exist in this database", said) + asked = [sel.split(",") for sel in fake.selects["investigators_public"]] + # asked for once, refused once, and then neither in the retry nor in any later read of the view + self.assertEqual(sum("onboarded" in sel for sel in asked), 1, asked) + for slot in self.SLOTS: + self.assertGreater(self.count(self.full, slot), 0, slot) + self.assertEqual(self.count(g, slot), self.count(self.full, slot), slot) + + def test_several_missing_columns_are_dropped_one_by_one(self): + kg, g, said, fake = export(tables=self.TABLES, absent={"investigators_public": {"onboarded", "scholar_id"}}) + self.assertEqual(sorted(kg.missing_columns["investigators_public"]), ["onboarded", "scholar_id"]) + self.assertNotIn("investigators_public", kg.unreadable) + self.assertEqual(self.count(g, "orcid"), self.count(self.full, "orcid")) + + def test_any_other_refusal_still_gives_no_rows(self): + kg, g, said, fake = export(tables=self.TABLES, refused={"investigators_public"}) + self.assertEqual(kg.unreadable.get("investigators_public"), "HTTP 401 42501") + self.assertEqual(kg.missing_columns, {}) + + +class JobDetails(unittest.TestCase): + """public_jobs: what the board shows anyone goes onto the Job node.""" + + @classmethod + def setUpClass(cls): + cls.kg, cls.g, cls.said, cls.fake = export() + + def test_the_view_is_read(self): + self.assertIn("public_jobs", self.fake.asked) + self.assertNotIn("jobs", self.fake.asked) # the table itself, contact fields and all: never + + def test_each_row_goes_onto_its_job_node_with_its_types(self): + n = JOB_SPINE_ORG + self.assertEqual(objects(self.g, n, "job_type"), {Literal("postdoc")}) + self.assertEqual(objects(self.g, n, "department"), {Literal("Psychology")}) + self.assertEqual(objects(self.g, n, "location"), {Literal("Boston, MA")}) + self.assertEqual(objects(self.g, n, "application_url"), + {Literal("https://jobs.a.example.org/123", datatype=XSD.anyURI)}) + self.assertEqual(objects(self.g, n, "expires_at"), + {Literal("2026-12-31T23:59:59+00:00", datatype=XSD.dateTime)}) + self.assertEqual(objects(self.g, n, "is_active"), {Literal(True)}) + self.assertEqual(objects(self.g, JOB_ROW_ORG, "is_active"), {Literal(False)}) + self.assertEqual(objects(self.g, JOB_UNKNOWN_ORG, "job_type"), {Literal("research_scientist")}) + + def test_a_value_that_is_not_there_or_not_a_timestamp_is_not_written(self): + self.assertEqual(objects(self.g, JOB_TEXT, "expires_at"), set()) # "next spring" + self.assertEqual(objects(self.g, JOB_NO_NAME, "is_active"), set()) # null + self.assertEqual(objects(self.g, JOB_ROW_ORG, "department"), set()) + self.assertIn("1 expires_at not a timestamp", self.said) + + def test_the_spine_keeps_the_name_and_description_and_they_are_not_copied(self): + self.assertEqual(objects(self.g, JOB_SPINE_ORG, "name"), {Literal("Postdoc in vision")}) + for slot in ("title", "description", "description_text"): + self.assertEqual({o for o in self.g.objects(None, BBQS[slot]) if "(the spine has" in str(o)}, set(), slot) + + def test_a_row_with_no_job_node_writes_nothing(self): + self.assertEqual(set(self.g.predicate_objects(BID[uid(99)])), set()) # no node is made for it + self.assertEqual(objects(self.g, NOT_A_JOB, "job_type"), set()) # an announcement stays one + self.assertEqual(set(self.g.objects(BID[NOT_A_JOB], RDF.type)), {BBQS.Announcement}) + self.assertIn("2 with no Job node (skipped)", self.said) + + def test_a_job_with_no_row_keeps_what_the_spine_says(self): + self.assertEqual({p for p, _ in self.g.predicate_objects(BID[JOB_BARE])}, {RDF.type, BBQS.name}) + + +class TheInstitution(unittest.TestCase): + """Link, don't copy (kg/README.md): the institution is the part_of_org link, and the text as + written only when no organization node resolves for the job.""" + + @classmethod + def setUpClass(cls): + cls.kg, cls.g, cls.said, _ = export() + + def test_an_organization_on_the_spine_row_is_the_link_and_the_text_is_not_kept(self): + self.assertEqual(objects(self.g, JOB_SPINE_ORG, "part_of_org"), {BID[ORG_A]}) + self.assertEqual(objects(self.g, JOB_SPINE_ORG, "job_institution"), set()) # "Univ. of A" is not copied + + def test_an_organization_on_the_job_row_alone_is_the_link_too(self): + self.assertEqual(objects(self.g, JOB_ROW_ORG, "part_of_org"), {BID[ORG_B]}) + self.assertEqual(objects(self.g, JOB_ROW_ORG, "job_institution"), set()) + + def test_with_no_organization_to_link_the_institution_is_kept_as_written(self): + self.assertEqual(objects(self.g, JOB_TEXT, "part_of_org"), set()) + self.assertEqual(objects(self.g, JOB_TEXT, "job_institution"), {Literal("Lab of Nowhere")}) + self.assertEqual(objects(self.g, JOB_UNKNOWN_ORG, "part_of_org"), set()) # an id no organization has + self.assertEqual(objects(self.g, JOB_UNKNOWN_ORG, "job_institution"), {Literal("Elsewhere University")}) + self.assertIn("institution kept as text for 2 jobs", self.said) + + def test_an_institution_that_says_nothing_is_not_written(self): + self.assertEqual(objects(self.g, JOB_NO_NAME, "job_institution"), set()) + + def test_the_order_of_the_rows_does_not_matter(self): + # Two rows on one job, the one with no organization first: the link still wins. + rows = [job_row(JOB_TEXT, "Lab of Nowhere"), job_row(JOB_TEXT, "B Inst.", ORG_B_ID)] + _, g, _, _ = export(tables={**TABLES, "public_jobs": rows}) + self.assertEqual(objects(g, JOB_TEXT, "part_of_org"), {BID[ORG_B]}) + self.assertEqual(objects(g, JOB_TEXT, "job_institution"), set()) + + +class WhoPostedIt(unittest.TestCase): + """public_job_posters: who posted each job, as a link to their Investigator node.""" + + @classmethod + def setUpClass(cls): + cls.kg, cls.g, cls.said, _ = export() + + def test_the_poster_is_a_link_to_the_investigator_node(self): + self.assertEqual(set(self.g.subject_objects(BBQS.posted_by)), {(BID[JOB_SPINE_ORG], BID[PAT])}) + self.assertIn("posted_by links (public_job_posters): 1", self.said) + + def test_a_pair_whose_ends_are_not_a_job_and_a_person_is_not_written(self): + self.assertEqual(objects(self.g, JOB_TEXT, "posted_by"), set()) # the "poster" is an organization + self.assertEqual(objects(self.g, NOT_A_JOB, "posted_by"), set()) + self.assertEqual(set(self.g.predicate_objects(BID[uid(99)])), set()) + + +class NothingPrivate(unittest.TestCase): + """Whatever a view hands over, the contact fields and the auth user id never reach the graph.""" + + @classmethod + def setUpClass(cls): + cls.kg, cls.g, cls.said, _ = export() + + def test_no_contact_slot_and_no_poster_but_the_link(self): + for slot in ("contact_name", "contact_email"): + self.assertEqual(set(self.g.subject_objects(BBQS[slot])), set(), slot) + self.assertTrue(all(isinstance(o, URIRef) and str(o).startswith(str(BID)) + for o in self.g.objects(None, BBQS.posted_by))) + + def test_no_private_value_anywhere(self): + for term in {t for triple in self.g for t in triple}: + for secret in (SECRET_EMAIL, SECRET_NAME, AUTH_UID): + self.assertNotIn(secret, str(term)) + self.assertNotIn(SECRET_EMAIL, self.g.serialize(format="turtle")) + + +class OnlyTheColumnsAnonMayRead(unittest.TestCase): + """20261117190000 takes auth user ids, e-mail addresses and review notes away from anon column by + column, so PostgREST refuses anon select=* on those objects. The exporter names the public columns + (PUBLIC_COLUMNS) instead, and never a private one.""" + + @classmethod + def setUpClass(cls): + cls.kg, cls.g, cls.said, cls.fake = export() + + def test_the_migration_lists_what_it_hides(self): + self.assertTrue({"user_id", "pending_role"} <= PRIVATE_FROM_ANON["investigators_public"]) + self.assertTrue({"last_edited_by", "questionnaire_submitted_by", "metadata"} <= PRIVATE_FROM_ANON["projects"]) + self.assertTrue({"raw", "hidden_reason", "hidden_by"} <= PRIVATE_FROM_ANON["dandisets"]) + + def test_no_object_read_column_by_column_is_refused(self): + self.assertEqual({t: why for t, why in self.kg.unreadable.items() if t in PRIVATE_FROM_ANON}, {}) + + def test_each_is_asked_for_by_name_and_never_for_a_private_column(self): + asked = {t: s for t, s in self.fake.selects.items() if t in PRIVATE_FROM_ANON} + self.assertTrue({"resources", "projects", "investigators_public", "dandisets"} <= set(asked), asked) + for table, selects in asked.items(): + for select in selects: + named = {c.strip() for c in select.split(",")} + self.assertNotIn("*", named, table) + self.assertEqual(named & PRIVATE_FROM_ANON[table], set(), table) + + def test_the_public_column_lists_hold_no_private_column(self): + for table, columns in PUBLIC_COLUMNS.items(): + self.assertIn(table, PRIVATE_FROM_ANON, f"{table} is not read column by column, so it needs no list") + self.assertEqual(set(columns.split(",")) & PRIVATE_FROM_ANON[table], set(), table) + + def test_asking_for_everything_would_lose_them(self): + # The exporter as it was, select=* everywhere: refused on each one, and the graph loses its spine. + with mock.patch.dict("bbqs_kg.PUBLIC_COLUMNS", clear=True): + kg, g, _, _ = export() + for table in ("resources", "investigators_public"): + self.assertEqual(kg.unreadable.get(table), "HTTP 401 42501", table) + self.assertEqual(set(g.subjects(RDF.type, BBQS.Job)), set()) + + +class AViewThatIsNotThere(unittest.TestCase): + """A view whose migration is not applied, or that anon may not read, is skipped with a note.""" + + def check_skipped(self, said, kg, table, reason): + self.assertEqual(kg.unreadable[table], reason) + self.assertIn(f"{table} not readable ({reason})", said) + + def test_public_jobs_missing(self): + kg, g, said, _ = export(missing={"public_jobs"}) + self.check_skipped(said, kg, "public_jobs", "HTTP 404 42P01") + self.assertEqual(set(g.subject_objects(BBQS.job_type)), set()) + self.assertEqual(set(g.subject_objects(BBQS.job_institution)), set()) + # what the spine says stays: every job, its name, and the organization on its spine row + self.assertEqual(len(set(g.subjects(RDF.type, BBQS.Job))), 6) + self.assertEqual(objects(g, JOB_SPINE_ORG, "part_of_org"), {BID[ORG_A]}) + self.assertEqual(set(g.subject_objects(BBQS.posted_by)), {(BID[JOB_SPINE_ORG], BID[PAT])}) + + def test_public_job_posters_missing_as_a_newer_postgrest_says_it(self): + kg, g, said, _ = export(missing={"public_job_posters"}, missing_code="PGRST205") + self.check_skipped(said, kg, "public_job_posters", "HTTP 404 PGRST205") + self.assertEqual(set(g.subject_objects(BBQS.posted_by)), set()) + self.assertEqual(objects(g, JOB_SPINE_ORG, "job_type"), {Literal("postdoc")}) + + def test_both_refused(self): + kg, g, said, _ = export(refused={"public_jobs", "public_job_posters"}) + for table in ("public_jobs", "public_job_posters"): + self.check_skipped(said, kg, table, "HTTP 401 42501") + self.assertEqual(set(g.subject_objects(BBQS.posted_by)) | set(g.subject_objects(BBQS.job_type)), set()) + + +class ResourceLinks(unittest.TestCase): + """resource_links (20261116150000; revision_of from 20261117181500): a curated link between two + nodes, written for a predicate the schema has (RESOURCE_LINK_SLOTS) and only between two nodes.""" + + @classmethod + def setUpClass(cls): + cls.kg, cls.g, cls.said, cls.fake = export(tables=LINK_TABLES) + + def test_revision_of_and_trained_on_rows_become_links(self): + self.assertIn("resource_links", self.fake.asked) + self.assertEqual(objects(self.g, PUBLISHED, "revision_of"), {BID[PREPRINT]}) # the published paper -> its preprint + self.assertEqual(objects(self.g, PREPRINT, "revision_of"), set()) + self.assertEqual(objects(self.g, MODEL, "trained_on"), {BID[DATASET]}) + self.assertEqual(objects(self.g, BENCHMARK, "evaluates"), {BID[SOFTWARE]}) + self.assertIn("resource_links: 3 written, 3 skipped", self.said) + + def test_an_unknown_predicate_is_skipped(self): + self.assertEqual(set(self.g.subject_objects(BBQS.uses_software)), set()) + + def test_a_row_whose_end_is_not_a_node_is_skipped(self): + self.assertNotIn((BID[BENCHMARK], BBQS.evaluates, BID[DELETED]), self.g) # no dangling link + self.assertEqual(set(self.g.predicate_objects(BID[LEGACY_PROJECT])), set()) # nor a node for a skipped type + self.assertEqual(set(self.g.subjects(BBQS.produced, BID[DATASET])), set()) + + def test_a_missing_table_is_noted_and_the_export_completes(self): + kg, g, said, _ = export(tables=LINK_TABLES, missing={"resource_links"}, missing_code="PGRST205") + self.assertEqual(kg.unreadable["resource_links"], "HTTP 404 PGRST205") + self.assertIn("resource_links not readable (HTTP 404 PGRST205)", said) + self.assertIn("resource_links: 0 written, 0 skipped", said) + self.assertEqual(set(g.subject_objects(BBQS.revision_of)) | set(g.subject_objects(BBQS.trained_on)), set()) + self.assertEqual(len(set(g.subjects(RDF.type, BBQS.Job))), 6) # the rest is there + self.assertEqual(objects(g, JOB_SPINE_ORG, "part_of_org"), {BID[ORG_A]}) + + def test_an_orcid_with_a_lower_case_x_is_written_with_x_upper_case(self): + one = URIRef("https://orcid.org/0000-0002-1825-009X") + self.assertEqual(objects(self.g, PAT, "orcid"), {one}) # investigators_public.orcid + self.assertEqual(objects(self.g, PUBLISHED, "author_orcids"), {one}) # publications.author_orcids + + def test_the_round_trip_counts_the_links_as_links(self): + with tempfile.TemporaryDirectory() as folder: + path = Path(folder) / "bbqs.ttl" + self.g.serialize(destination=str(path), format="turtle") + env = {"SUPABASE_URL": "https://stand-in.invalid", "SUPABASE_KEY": "anon-key"} + with mock.patch("urllib.request.urlopen", FakePostgrest(LINK_TABLES)), mock.patch.dict(os.environ, env), \ + contextlib.redirect_stderr(io.StringIO()): + table = RoundTrip(path).table("resource_links") + self.assertEqual((table["rows"], table["links"], table["carried"]), (6, 6, 3)) + self.assertNotIn("cells", table) # links are not fact cells, and add none to the total + + +class TheQuestionsReadWhatTheExporterWrites(unittest.TestCase): + """CQ18, CQ35, CQ36 and CQ37 (competency_questions.yaml), asked of what export() writes.""" + + @classmethod + def setUpClass(cls): + spec = yaml.safe_load((HERE / "competency_questions.yaml").read_text(encoding="utf8")) + cls.prologue = "".join(f"PREFIX {k}: <{v}>\n" for k, v in spec["prefixes"].items()) + cls.questions = {q["id"]: q for q in spec["questions"]} + cls.g = export()[1] + + def rows(self, name): + return sorted(tuple(None if v is None else v.toPython() for v in row) + for row in self.g.query(self.prologue + self.questions[name]["sparql"])) + + def test_the_four_need_only_what_anon_may_read(self): + self.assertEqual({name: self.questions[name]["access"] for name in ("CQ18", "CQ35", "CQ36", "CQ37")}, + dict.fromkeys(("CQ18", "CQ35", "CQ36", "CQ37"), "anon")) + + def test_cq18_names_the_linked_organization_or_else_the_institution_as_written(self): + self.assertEqual(self.rows("CQ18"), [("Data engineer", "B INSTITUTE"), ("Lab technician", "Lab of Nowhere"), + ("Postdoc in vision", "UNIVERSITY OF A"), + ("Research scientist", "Elsewhere University")]) + + def test_cq35_groups_the_jobs_by_institution(self): + self.assertEqual(self.rows("CQ35"), [("B INSTITUTE", 1, "Data engineer"), ("Elsewhere University", 1, "Research scientist"), + ("Lab of Nowhere", 1, "Lab technician"), ("UNIVERSITY OF A", 1, "Postdoc in vision")]) + + def test_cq36_counts_the_kinds(self): + self.assertEqual(self.rows("CQ36"), [("engineer", 2), ("phd", 1), ("postdoc", 1), ("research_scientist", 1)]) + + def test_cq37_names_who_posted_it(self): + self.assertEqual(self.rows("CQ37"), [("Postdoc in vision", "Pat Poster")]) + + +if __name__ == "__main__": + unittest.main(verbosity=1) diff --git a/kg/test_mcp_server.py b/kg/test_mcp_server.py new file mode 100644 index 00000000..db53e08c --- /dev/null +++ b/kg/test_mcp_server.py @@ -0,0 +1,2902 @@ +#!/usr/bin/env python3 +"""Tests for kg/mcp_server.py. + + python kg/test_mcp_server.py # needs kg/requirements.txt and kg/requirements-mcp.txt + +Four layers, each catching what the others cannot: + + the view -- a small hand-built graph whose every answer was worked out by hand: folding the + roster, shared identifiers, references, search, neighbours, relatedness, paths, + SPARQL. + the export -- the committed graph: every competency question the baseline says is answered + comes back through sparql_query, the walking tools agree with SPARQL, and the + ranking is the natural process it is named after, and earns its keep. + the guards -- cross-file invariants: schema terms the server names exist in the TBox, the + pinned dependencies agree, and no tool can change the graph. + the protocol -- the server as a client sees it: a real process, raw JSON-RPC over stdio and + over streamable HTTP. Nothing here is skipped when a dependency is missing. +""" +import asyncio +import http.server +import inspect +import json +import os +import queue +import re +import socket +import subprocess +import sys +import tempfile +import threading +import time +import unittest +import urllib.error +import urllib.request +from collections import Counter +from fractions import Fraction +from pathlib import Path +from unittest import mock + +import yaml +from rdflib import Graph + +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +import bench_mcp_server as bench # noqa: E402 +import mcp_server as m # noqa: E402 + +SERVER = HERE / "mcp_server.py" +EXPORT = HERE / "export" / "bbqs.ttl" + +# ---- the fixture: small enough to check every answer by hand -------------------------------------- +ADA, BOB, CYD, DEE = "11111111", "22222222", "33333333", "44444444" +P1, P2, P3 = "55555555", "66666666", "77777777" +MOUSE, ZEBRA, WGD, WGA, ORG = "88888888", "99999999", "aaaa1111", "bbbb2222", "cccc3333" +PUB1, PUB2, PUB3, DS1, DEV, CAT, MAN = "dddd4444", "eeee5555", "ffff6666", "0000aaaa", "0000bbbb", "0000cccc", "0000dddd" +TWIN1, TWIN2 = "a1b2c3d4-0002", "a1b2c3d4-0004" # ids that start alike, as two seeded rows do +O1 = "https://orcid.org/0000-0001-0000-0001" # Ada's, and on PUB1's author list +O4 = "https://orcid.org/0000-0004-0000-0004" # on PUB2 and PUB3; nobody in the graph owns it + + +def _iri(short: str) -> str: + """The fixture's full id for a short one, as a Turtle name.""" + return f"bid:{short}-4000-8000-000000000001" if "-" in short else f"bid:{short}-0000-4000-8000-000000000001" + + +FIXTURE = f""" +@prefix bbqs: <https://brain-bbqs.org/schema#> . +@prefix bid: <https://brain-bbqs.org/id/> . +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . + +{_iri(ADA)} a bbqs:Investigator ; bbqs:name "Ada Lovelace" ; bbqs:consortium_role "Principal Investigator (PI)" ; + bbqs:orcid <{O1}> ; bbqs:skills "pose estimation" ; bbqs:member_of_group {_iri(WGD)} . +{_iri(BOB)} a bbqs:Investigator ; bbqs:name "Bob Müller" ; bbqs:orcid <https://orcid.org/0000-0002-0000-0002> ; + bbqs:member_of_group {_iri(WGD)}, {_iri(WGA)} . +{_iri(CYD)} a bbqs:Investigator ; bbqs:name "Cyd Charisse" ; bbqs:member_of_group {_iri(WGA)} . +{_iri(DEE)} a bbqs:Investigator ; bbqs:name "Dee Isolated" . +{_iri(TWIN1)} a bbqs:Investigator ; bbqs:name "Sam Twin" . +{_iri(TWIN2)} a bbqs:Investigator ; bbqs:name "Sam Twin" . + +{_iri(P1)} a bbqs:Project ; bbqs:name "R34DA000001" ; bbqs:grant_number "R34DA000001" ; bbqs:mechanism "R34" ; + bbqs:title "Mouse social behavior tracking" ; bbqs:award_amount 100 ; bbqs:studies_human false ; + bbqs:abstract "We record ultrasonic vocalizations during social play." ; + bbqs:keywords "social behavior", "computer vision" ; + bbqs:studies_species {_iri(MOUSE)} ; bbqs:part_of_org {_iri(ORG)} ; bbqs:produced {_iri(PUB1)} ; + bbqs:funded_datasets {_iri(DS1)} . +{_iri(P2)} a bbqs:Project ; bbqs:name "Zebrafish imaging at scale" ; bbqs:grant_number "R61MH000002" ; + bbqs:mechanism "R61" ; bbqs:award_amount 250 ; bbqs:studies_species {_iri(ZEBRA)} ; bbqs:produced {_iri(PUB2)} . +{_iri(P3)} a bbqs:Project ; bbqs:name "U01DA000003" ; bbqs:grant_number "U01DA000003" ; bbqs:mechanism "U01" ; + bbqs:title "Mouse foraging" ; bbqs:studies_species {_iri(MOUSE)} . + +<https://brain-bbqs.org/id/role/r1> a bbqs:ProjectRole ; bbqs:held_by {_iri(ADA)} ; bbqs:on_project {_iri(P1)} ; + bbqs:project_role "contact_pi" ; bbqs:role_source "reporter" . +<https://brain-bbqs.org/id/role/r2> a bbqs:ProjectRole ; bbqs:held_by {_iri(BOB)} ; bbqs:on_project {_iri(P1)} ; + bbqs:project_role "co_pi" ; bbqs:role_source "curator" . +<https://brain-bbqs.org/id/role/r3> a bbqs:ProjectRole ; bbqs:held_by {_iri(BOB)} ; bbqs:on_project {_iri(P2)} ; + bbqs:project_role "contact_pi" ; bbqs:role_source "reporter" . +<https://brain-bbqs.org/id/role/r4> a bbqs:ProjectRole ; bbqs:held_by {_iri(CYD)} ; bbqs:on_project {_iri(P2)} ; + bbqs:project_role "postdoc" ; bbqs:role_source "curator" . +<https://brain-bbqs.org/id/role/r5> a bbqs:ProjectRole ; bbqs:on_project {_iri(P3)} ; + bbqs:project_role "co_pi" ; bbqs:role_source "reporter" . + +{_iri(MOUSE)} a bbqs:Species ; bbqs:name "Mouse" ; bbqs:common_name "House Mouse" ; + bbqs:aliases "Mus musculus", "mice" ; bbqs:taxonomy_class "Mammalia" . +{_iri(ZEBRA)} a bbqs:Species ; bbqs:name "Zebrafish" ; bbqs:common_name "Zebrafish" . +{_iri(WGD)} a bbqs:WorkingGroup ; bbqs:name "WG-Devices" . +{_iri(WGA)} a bbqs:WorkingGroup ; bbqs:name "WG-Analytics" . +{_iri(ORG)} a bbqs:ResearchOrganization ; bbqs:name "UNIVERSITY OF TESTING" ; bbqs:members {_iri(ADA)}, {_iri(TWIN1)} . +{_iri(PUB1)} a bbqs:Publication ; bbqs:name "A paper about mice" ; bbqs:title "A paper about mice" ; + bbqs:doi "10.1000/test.1"^^xsd:anyURI ; bbqs:pmid "111" ; bbqs:year 2025 ; + bbqs:author_orcids <{O1}>, <https://orcid.org/0000-0003-0000-0003> . +{_iri(PUB2)} a bbqs:Publication ; bbqs:name "Fish at scale" ; bbqs:year 2024 ; bbqs:author_orcids <{O4}> . +{_iri(PUB3)} a bbqs:Publication ; bbqs:name "Unattached preprint" ; bbqs:year 2024 ; bbqs:author_orcids <{O4}> . +{_iri(DS1)} a bbqs:Dataset ; bbqs:name "Mouse food sniff" ; bbqs:award_numbers "R34DA000001" . +{_iri(DEV)} a bbqs:Device ; bbqs:name "Scope One" ; bbqs:model_name "Scope One" ; + bbqs:device_category {_iri(CAT)} ; bbqs:manufacturer {_iri(MAN)} . +{_iri(CAT)} a bbqs:DeviceCategory ; bbqs:name "Microscopes" ; bbqs:label "Microscopes" ; bbqs:category_key "microscope" . +{_iri(MAN)} a bbqs:DeviceManufacturer ; bbqs:name "Lens Co" . +""" + + +def fixture_kg() -> m.KG: + return m.KG(m._BudgetedGraph().parse(data=FIXTURE, format="turtle"), {"source": "fixture"}) + + +def ids(rows) -> list[str]: + return [row["id"] for row in rows] + + +def small_kg(turtle: str) -> m.KG: + """A few lines of Turtle as a graph, for a case the fixture does not hold.""" + prefixes = "@prefix bbqs: <https://brain-bbqs.org/schema#> .\n@prefix bid: <https://brain-bbqs.org/id/> .\n" + return m.KG(m._BudgetedGraph().parse(data=prefixes + turtle, format="turtle")) + + +def first_arrivals(kg: m.KG, start: m.Node, avoid=()) -> dict: + """Activation spreading with nothing left out, written without the server's shortcuts: one unit + leaves `start` for each of its neighbours, and from then on every node, every tick, splits all + it holds equally among all its neighbours, the one it came from included. Returns node -> (the + first tick it held anything, how much it held then).""" + def neighbours(iri): + return sorted({link.other for link in kg.nodes[iri].links if link.edge not in avoid and link.other != iri}) + + holding = {start.iri: Fraction(len(neighbours(start.iri)))} # so that one unit goes to each neighbour + arrived = {start.iri: None} + for tick in range(1, len(kg.nodes) + 1): + moved: dict = {} + for iri, amount in holding.items(): + around = neighbours(iri) + for other in around: + moved[other] = moved.get(other, 0) + amount / len(around) + new = {iri: (tick, amount) for iri, amount in moved.items() if iri not in arrived} + if not new: + break + arrived.update(new) + holding = moved + del arrived[start.iri] + return arrived + + +class TheView(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.kg = fixture_kg() + + def err(self, fn, *args, **kwargs) -> str: + with self.assertRaises(m.KGError) as caught: + fn(*args, **kwargs) + return str(caught.exception) + + # -- what counts as a node and a link -- + + def test_counts(self): + d = self.kg.describe() + self.assertEqual((d["nodes"], d["links"], d["unlinked_nodes"]), (23, 23, 2)) + people = next(t for t in d["node_types"] if t["type"] == "Investigator") + self.assertEqual((people["count"], people["unlinked"]), (6, 2)) + self.assertEqual(people["properties"]["name"], 6) + self.assertEqual(people["properties"]["orcid"], 2) # filled on 2 of 6: absence is visible + + def test_one_type_in_full_says_what_its_properties_mean_and_hold(self): + project = self.kg.describe(type="project") + self.assertEqual((project["type"], project["count"], project["unlinked"]), ("Project", 3, 0)) + self.assertIn("grant_number", project["description"]) # the schema's own definition of a Project + by_name = {row["property"]: row for row in project["properties"]} + self.assertEqual(by_name["mechanism"]["values"], {"R34": 1, "R61": 1, "U01": 1}) # few values: a vocabulary + self.assertEqual(by_name["mechanism"]["filled"], 3) + self.assertEqual(by_name["grant_number"]["description"], "NIH grant number; encodes mechanism.") + self.assertEqual(by_name["abstract"]["example"], "We record ultrasonic vocalizations during social play.") + self.assertEqual((by_name["title"]["filled"], by_name["award_amount"]["filled"]), (2, 2)) + self.assertIn({"edge": "has_role", "direction": "in", "other": "Investigator", "count": 4}, project["links"]) + self.assertIn({"edge": "studies_species", "direction": "out", "other": "Species", "count": 3}, project["links"]) + self.assertIn("ORCID", self.kg.describe(type=m.EXTERNAL)["description"]) + self.assertIn("Investigator", self.err(self.kg.describe, type="Person")) + + def test_without_the_schema_file_only_the_descriptions_are_lost(self): + m._definitions.cache_clear() + self.addCleanup(m._definitions.cache_clear) + with mock.patch.object(m, "SCHEMA_FILE", HERE / "no-such-schema.ttl"): + project = self.kg.describe(type="Project") + self.assertNotIn("description", project) + self.assertEqual(len(project["properties"]), 8) + self.assertTrue(all("description" not in row for row in project["properties"])) + + def test_roster_records_become_one_link_carrying_the_role(self): + d = self.kg.describe() + self.assertNotIn("ProjectRole", [t["type"] for t in d["node_types"]]) + roster = next(e for e in d["edge_types"] if e["edge"] == "has_role") + self.assertEqual((roster["from"], roster["to"], roster["count"]), ("Investigator", "Project", 4)) + self.assertEqual(roster["carries"]["role"], {"contact_pi": 2, "co_pi": 1, "postdoc": 1}) + on_p1 = self.kg.neighbors(P1, edge="has_role")["nodes"] + self.assertEqual([(n["id"], n["via"]["role"], n["via"]["role_source"], n["via"]["direction"]) for n in on_p1], + [(ADA, "contact_pi", "reporter", "in"), (BOB, "co_pi", "curator", "in")]) + self.assertIn("No node matches", self.err(self.kg.resolve, "https://brain-bbqs.org/id/role/r1")) + + def test_a_roster_record_missing_an_end_is_reported_not_dropped_silently(self): + self.assertEqual(dict(self.kg.unfolded), {"ProjectRole": 1}) + self.assertTrue(any("1 ProjectRole" in note for note in self.kg.describe()["notes"])) + self.assertEqual(self.kg.neighbors(P3, edge="has_role")["total"], 0) + + def test_an_identifier_two_nodes_carry_becomes_a_node_and_one_alone_stays_a_property(self): + outside = sorted(n.iri for n in self.kg.nodes.values() if n.type == m.EXTERNAL) + self.assertEqual(outside, [O1, O4]) + self.assertEqual(self.kg.node(BOB)["properties"]["orcid"], "https://orcid.org/0000-0002-0000-0002") + self.assertEqual(self.kg.node(ADA)["properties"]["orcid"], O1) # still a fact of the node + shared = self.kg.node("ext:" + O4) + self.assertEqual([(e["edge"], e["direction"], ids(e["nodes"])) for e in shared["edges"]], + [("author_orcids", "in", [PUB2, PUB3])]) + + def test_a_link_to_a_node_missing_from_the_export_is_called_that(self): + people_only = "\n".join(FIXTURE.split("\n\n")[:2]) # six people; their working groups are not described + kg = m.KG(m._BudgetedGraph().parse(data=people_only, format="turtle")) + missing = sorted(n.id for n in kg.nodes.values() if n.type == m.UNRESOLVED) + self.assertEqual(missing, [WGD, WGA]) # each named by two people, so the tie is kept + self.assertEqual(ids(kg.neighbors(WGD)["nodes"]), [ADA, BOB]) + self.assertTrue(any("missing from this export" in note for note in kg.describe()["notes"])) + self.assertNotIn(m.UNRESOLVED, [n.type for n in self.kg.nodes.values()]) # the whole fixture has none + + def test_ids_are_short_and_longer_only_where_two_start_alike(self): + shown = {n.id for n in self.kg.nodes.values() if n.type != m.EXTERNAL} + self.assertEqual(len(shown), 21) + self.assertLessEqual({ADA, P1, WGD}, shown) + self.assertLessEqual({TWIN1, TWIN2}, shown) + self.assertNotIn("a1b2c3d4", shown) + + def test_project_labels_read_the_same_whether_name_holds_the_number_or_the_title(self): + self.assertEqual(self.kg.resolve(P1).label, "R34DA000001 · Mouse social behavior tracking") + self.assertEqual(self.kg.resolve(P2).label, "R61MH000002 · Zebrafish imaging at scale") + + # -- references -- + + def test_a_node_can_be_named_many_ways(self): + ada = self.kg.resolve(ADA).iri + for reference in (ADA, "bid:" + ADA, ada, f"<{ada}>", ada.rsplit("/", 1)[-1], "Ada Lovelace", "ada lovelace", + "0000-0001-0000-0001", O1): + self.assertEqual(self.kg.resolve(reference).iri, ada, reference) + for reference, expected in [("R34DA000001", P1), ("Mus musculus", MOUSE), ("House Mouse", MOUSE), + ("Cyd Charisse", CYD), ("Bob Muller", BOB), ("10.1000/test.1", PUB1), + ("https://doi.org/10.1000/test.1", PUB1), ("microscope", CAT), ("WG-Devices", WGD)]: + self.assertEqual(self.kg.resolve(reference).id, expected, reference) + self.assertEqual(self.kg.resolve("ext:" + O1).type, m.EXTERNAL) + self.assertEqual(self.kg.resolve(O4).type, m.EXTERNAL) # nobody owns it, so the IRI names the link node + + def test_an_unclear_reference_says_what_to_do_next(self): + message = self.err(self.kg.resolve, "Sam Twin") + self.assertIn("names 2 nodes", message) + self.assertIn(TWIN1, message) + self.assertIn(TWIN2, message) + message = self.err(self.kg.resolve, "a1b2c3d4") + self.assertIn("more than one id", message) + self.assertIn("search_nodes", self.err(self.kg.resolve, "nobody at all")) + self.assertIn("No node given", self.err(self.kg.resolve, " ")) + + # -- search -- + + def test_search_ranks_names_first_and_shows_where_other_text_matched(self): + self.assertEqual(self.kg.search("mouse")["results"][0]["id"], MOUSE) # exact name + self.assertEqual(ids(self.kg.search("ada")["results"]), [ADA]) + self.assertEqual(ids(self.kg.search("love")["results"]), [ADA]) # start of a word + self.assertEqual(ids(self.kg.search("muller")["results"]), [BOB]) # accents + self.assertEqual(ids(self.kg.search("mus musculus")["results"])[0], MOUSE) # alias + hit = self.kg.search("vocalizations")["results"][0] + self.assertEqual(hit["id"], P1) + self.assertEqual(hit["match"]["property"], "abstract") + self.assertIn("ultrasonic", hit["match"]["text"]) + by_number = self.kg.search("R34DA000001")["results"] + self.assertEqual(ids(by_number), [P1, DS1]) + self.assertNotIn("match", by_number[0]) # the label already shows it + self.assertEqual(by_number[1]["match"]["property"], "award_numbers") + self.assertEqual(self.kg.search("0000-0001-0000-0001")["results"][0]["id"], ADA) + self.assertEqual(self.kg.search("xyzzy")["total"], 0) + + def test_search_lists_by_type_and_exact_property_values(self): + projects = self.kg.search(type="project") # type names are case-insensitive + self.assertEqual(ids(projects["results"]), [P1, P2, P3]) + self.assertEqual(ids(self.kg.search(where={"mechanism": "r61"})["results"]), [P2]) + self.assertEqual(ids(self.kg.search(type="Publication", where={"year": 2024})["results"]), [PUB2, PUB3]) + self.assertEqual(ids(self.kg.search(type="Project", where={"studies_human": False})["results"]), [P1]) + self.assertEqual(ids(self.kg.search("mouse", type=["Project", "Dataset"])["results"]), [P1, DS1, P3]) + self.assertEqual(ids(self.kg.search("mouse", type="Project, Dataset")["results"]), [P1, DS1, P3]) + page = self.kg.search(type="Investigator", limit=2, offset=2) + self.assertEqual((page["total"], len(page["results"])), (6, 2)) + + def test_search_rejects_what_it_cannot_answer_and_lists_what_it_can(self): + self.assertIn("Give a query", self.err(self.kg.search)) + self.assertIn("Investigator", self.err(self.kg.search, type="Person")) + self.assertIn("mechanism", self.err(self.kg.search, type="Project", where={"nope": 1})) + self.assertIn("whole numbers", self.err(self.kg.search, "x", limit="lots")) + + def test_page_sizes_are_clamped_and_the_reply_still_says_how_many_there_are(self): + everyone = self.kg.search(type="Investigator", limit=10_000) + self.assertEqual((everyone["total"], len(everyone["results"])), (6, 6)) + one = self.kg.search(type="Investigator", limit=0) + self.assertEqual((one["total"], len(one["results"])), (6, 1)) + self.assertEqual(self.kg.neighbors(MOUSE, depth=2, limit=10_000)["total"], 7) + self.assertEqual(self.kg.search(type="Publication", where={"year": 2024.0})["total"], 2) # 2024.0 is 2024 + + # -- one node -- + + def test_get_node_gives_every_fact_and_every_link(self): + p1 = self.kg.node("R34DA000001") + self.assertEqual(p1["properties"]["award_amount"], 100) + self.assertIs(p1["properties"]["studies_human"], False) + self.assertEqual(p1["properties"]["keywords"], ["computer vision", "social behavior"]) + self.assertEqual(p1["links"], 6) + self.assertEqual([(e["edge"], e["direction"], e["count"]) for e in p1["edges"]], + [("funded_datasets", "out", 1), ("has_role", "in", 2), ("part_of_org", "out", 1), + ("produced", "out", 1), ("studies_species", "out", 1)]) + roles = next(e for e in p1["edges"] if e["edge"] == "has_role")["nodes"] + self.assertEqual([(n["id"], n["role"]) for n in roles], [(ADA, "contact_pi"), (BOB, "co_pi")]) + self.assertEqual(self.kg.node(DEE)["edges"], []) + + def test_get_node_counts_what_it_does_not_list(self): + members = self.kg.node("WG-Devices", edge_limit=1)["edges"][0] + self.assertEqual((members["count"], len(members["nodes"]), members["more"]), (2, 1, 1)) + + # -- walking -- + + def test_neighbors_one_hop_both_ways_and_each_way(self): + self.assertEqual(ids(self.kg.neighbors(MOUSE)["nodes"]), [P1, P3]) + out = self.kg.neighbors(P1, direction="out") + self.assertEqual(sorted(ids(out["nodes"])), sorted([DS1, ORG, PUB1, MOUSE])) + self.assertEqual(ids(self.kg.neighbors(P1, direction="in")["nodes"]), [ADA, BOB]) + self.assertEqual(self.kg.neighbors(DEE)["total"], 0) + + def test_neighbors_type_filters_what_is_returned_not_what_is_walked(self): + people = self.kg.neighbors("House Mouse", depth=2, type="Investigator") + self.assertEqual(ids(people["nodes"]), [ADA, BOB]) + self.assertEqual({n["hops"] for n in people["nodes"]}, {2}) + self.assertEqual(people["nodes"][0]["via"], {"edge": "has_role", "direction": "in", "role": "contact_pi", + "role_source": "reporter", "from": P1}) + self.assertEqual(people["reached_by_type"], {"Project": 2, "Investigator": 2, "Dataset": 1, "Publication": 1, + "ResearchOrganization": 1}) + self.assertEqual(people["total"], 2) + + def test_neighbors_follow_only_the_edges_asked_for_and_page(self): + via_roster = self.kg.neighbors(ADA, edge="has_role", depth=3) + self.assertEqual(ids(via_roster["nodes"]), [P1, BOB, P2]) # ada -> p1 -> bob -> p2; cyd is 4 away + self.assertEqual([n["hops"] for n in via_roster["nodes"]], [1, 2, 3]) + everything = self.kg.neighbors(MOUSE, depth=2) + self.assertEqual(everything["total"], 7) + second_page = self.kg.neighbors(MOUSE, depth=2, limit=3, offset=3) + self.assertEqual(ids(second_page["nodes"]), ids(everything["nodes"])[3:6]) + + def test_neighbors_reach_a_hub_but_do_not_walk_through_it(self): + with mock.patch.object(m, "HUB_LINKS", 3): # in this graph only P1 (6 links) and P2 (4) are hubs + walked = self.kg.neighbors(CYD, depth=2) # cyd -> WG-Analytics -> bob; cyd -> p2, and no further + self.assertEqual(sorted(ids(walked["nodes"])), sorted([WGA, P2, BOB])) + self.assertEqual(ids(walked["hubs_not_walked_through"]), [P2]) + through = self.kg.neighbors(CYD, depth=2, through_hubs=True) + self.assertEqual(sorted(ids(through["nodes"])), sorted([WGA, P2, BOB, PUB2, ZEBRA])) + self.assertNotIn("hubs_not_walked_through", through) + named = self.kg.neighbors(CYD, depth=2, edge="has_role") # naming the edge asks for it + self.assertEqual(ids(named["nodes"]), [P2, BOB]) + self.assertEqual(sorted(ids(self.kg.neighbors(P2)["nodes"])), sorted([BOB, CYD, PUB2, ZEBRA])) # a hub's own + self.assertNotIn("hubs_not_walked_through", self.kg.neighbors(CYD, depth=2)) # none at the real threshold + + def test_neighbors_reject_bad_arguments(self): + self.assertIn("has_role", self.err(self.kg.neighbors, ADA, edge="knows")) + self.assertIn("direction", self.err(self.kg.neighbors, ADA, direction="up")) + self.assertIn("depth", self.err(self.kg.neighbors, ADA, depth=m.MAX_DEPTH + 1)) + + # -- what is related: spreading activation -- + + def strengths(self, start, **options) -> dict: + """What the wave from `start` brings to every node it reaches: id -> (hops, strength, routes).""" + wave = self.kg._wave(self.kg.resolve(start), **options) + return {self.kg.nodes[iri].id: (found.hops, str(found.strength), found.routes) + for iri, found in wave.items() if found.hops} + + def rows(self, *args, **options) -> dict: + """find_related, boiled down: type -> [(id, hops, strength)], in the order returned.""" + return {group["type"]: [(n["id"], n["hops"], n["strength"]) for n in group["nodes"]] + for group in self.kg.related(*args, **options)["related"]} + + def test_strength_is_what_the_hand_calculation_gives(self): + # From Ada, who has 4 neighbours. One unit leaves her for each; every node passes on what + # it received divided by its number of neighbours; what arrives together adds up; a node + # is read when it is first reached. + # 1 link away WG-Devices, P1, the university and her ORCID iD: 1 each. + # 2 Bob: 1/2 from WG-Devices (2 neighbours) + 1/6 from P1 (6) = 2/3. + # The paper: 1/6 from P1 + 1/2 from the iD (2 neighbours) = 2/3. + # Sam Twin: 1/3 from the university (3). Mouse and the dataset: 1/6 from P1. + # 3 Bob (4 neighbours) passes 2/3 / 4 = 1/6 to WG-Analytics and to P2; Mouse (2) passes 1/12 to P3. + # 4 Cyd: 1/6 / 2 from WG-Analytics + 1/6 / 4 from P2 (4 neighbours) = 1/8. + # Zebrafish and "Fish at scale": 1/24 from P2. + # 5, 6 the iD two papers share: 1/48; then the unattached preprint: 1/96. + self.assertEqual(self.strengths(ADA), { + WGD: (1, "1", 1), P1: (1, "1", 1), ORG: (1, "1", 1), "ext:" + O1: (1, "1", 1), + BOB: (2, "2/3", 2), PUB1: (2, "2/3", 2), TWIN1: (2, "1/3", 1), MOUSE: (2, "1/6", 1), DS1: (2, "1/6", 1), + WGA: (3, "1/6", 2), P2: (3, "1/6", 2), P3: (3, "1/12", 1), + CYD: (4, "1/8", 4), ZEBRA: (4, "1/24", 2), PUB2: (4, "1/24", 2), + "ext:" + O4: (5, "1/48", 2), PUB3: (6, "1/96", 2)}) + self.assertEqual(self.strengths(DEE), {}) # no links: nothing to spread along + + def test_strength_is_the_same_from_either_end(self): + linked = [node for node in self.kg.nodes.values() if node.links] + for avoid in (set(), {"member_of_group"}): + waves = {node.iri: self.kg._wave(node, avoid) for node in linked} + pairs = [(a, b) for a in waves for b in waves[a] if a != b] + self.assertGreater(len(pairs), 200) + for a, b in pairs: + self.assertEqual(waves[a][b], waves[b][a], (a, b, avoid)) # hops, strength, routes, strongest + + def test_the_code_is_the_process_it_is_named_after(self): + # Spreading with nothing left out (every node, every tick, splits all it holds among all its + # neighbours, backwards too) delivers to each node, the first time anything reaches it, + # exactly the strength, on the tick that is its distance. + for start in (node for node in self.kg.nodes.values() if node.links): + for avoid in ((), ("member_of_group",), ("has_role", "orcid")): + wave = self.kg._wave(start, set(avoid)) + self.assertEqual({iri: (found.hops, found.strength) for iri, found in wave.items() if found.hops}, + first_arrivals(self.kg, start, avoid), (start.id, avoid)) + + def test_two_nodes_are_one_tie_however_many_links_record_it(self): + # A is a member of G and has also asked to join it: two links, one neighbour. G is linked to + # itself as well, which leads nowhere. So G has 6 links and 3 neighbours, and passes on 1/3. + kg = small_kg("""bid:g a bbqs:WorkingGroup ; bbqs:name "G" ; bbqs:part_of bid:g . + bid:a a bbqs:Investigator ; bbqs:name "A" ; bbqs:member_of_group bid:g ; bbqs:requested_groups bid:g . + bid:b a bbqs:Investigator ; bbqs:name "B" ; bbqs:member_of_group bid:g . + bid:c a bbqs:Investigator ; bbqs:name "C" ; bbqs:member_of_group bid:g .""") + group = kg.related("A", type="WorkingGroup")["related"][0]["nodes"][0] + self.assertEqual((group["links"], group["hops"], group["strength"]), (6, 1, 1)) # a direct link is 1, not 2 + self.assertIs(type(group["strength"]), int) + self.assertEqual(group["link"], {"edge": "member_of_group", "direction": "out", + "also": [{"edge": "requested_groups", "direction": "out"}]}) + self.assertNotIn("routes", group) + avoiding = kg.related("A", type="WorkingGroup", avoid_edges="member_of_group")["related"][0]["nodes"][0] + self.assertEqual(avoiding["link"], {"edge": "requested_groups", "direction": "out"}) # not the one avoided + people = kg.related("A", type="Investigator")["related"][0] + self.assertEqual([(n["label"], n["strength"], n["through"]) for n in people["nodes"]], + [(name, 0.3333, [{"id": kg.resolve("G").id, "label": "G", "splits": 3}]) for name in "BC"]) + self.assertEqual(kg.related("G", type="Investigator", limit=2)["related"][0]["tied"], + {"hops": 1, "strength": 1, "count": 3, "listed": 2}) # A is one of three equals + found = kg.paths("A", "B") + self.assertEqual((found["routes"], found["strength"], len(found["paths"])), (1, 0.3333, 1)) + self.assertEqual(found["paths"][0]["text"], 'Investigator "A" -[member_of_group + requested_groups]-> ' + 'WorkingGroup "G" <-[member_of_group]- Investigator "B"') + for start in kg.nodes.values(): + self.assertEqual({iri: (f.hops, f.strength) for iri, f in kg._wave(start).items() if f.hops}, + first_arrivals(kg, start), start.id) + # leaving one of the two links out changes nothing; leaving both out cuts A off + self.assertEqual(kg.paths("A", "B", avoid_edges="requested_groups")["strength"], 0.3333) + self.assertIn("Not connected", kg.paths("A", "B", avoid_edges=["requested_groups", "member_of_group"])["note"]) + + def test_related_ranks_each_type_on_its_own_nearest_first_then_strongest(self): + found = self.kg.related(ADA, max_hops=m.MAX_HOPS) + self.assertEqual(found["start"], [{"id": ADA, "type": "Investigator", "label": "Ada Lovelace", "links": 4}]) + listed = self.rows(ADA, max_hops=m.MAX_HOPS) + # types in the order of their best node: four hold a direct link, then 2/3, then 1/6 at two links + self.assertEqual(list(listed), ["External", "Project", "ResearchOrganization", "WorkingGroup", + "Investigator", "Publication", "Dataset", "Species"]) + self.assertEqual(listed["Investigator"], [(BOB, 2, 0.6667), (TWIN1, 2, 0.3333), (CYD, 4, 0.125)]) + self.assertEqual(listed["Project"], [(P1, 1, 1), (P2, 3, 0.1667), (P3, 3, 0.08333)]) + self.assertEqual(listed["Publication"], [(PUB1, 2, 0.6667), (PUB2, 4, 0.04167), (PUB3, 6, 0.01042)]) + self.assertEqual(listed["WorkingGroup"], [(WGD, 1, 1), (WGA, 3, 0.1667)]) + self.assertEqual(listed["Species"], [(MOUSE, 2, 0.1667), (ZEBRA, 4, 0.04167)]) + self.assertEqual({group["type"]: group["within"] for group in found["related"]}, + {"External": 2, "Project": 3, "ResearchOrganization": 1, "WorkingGroup": 2, + "Investigator": 3, "Publication": 3, "Dataset": 1, "Species": 2}) + self.assertFalse(any("beyond" in group for group in found["related"])) + # never the starting node itself, a node with no links, or one in another piece of the graph + self.assertFalse({n for rows in listed.values() for n, _, _ in rows} & {ADA, DEE, TWIN2, DEV, CAT, MAN}) + self.assertEqual(list(self.rows(ADA, type=["species", "Dataset"])), ["Dataset", "Species"]) + # a type that is asked for and not reached is listed last, empty, rather than left out + self.assertEqual([(g["type"], g["within"]) for g in self.kg.related(ADA, type=["Device", "Species"])["related"]], + [("Species", 2), ("Device", 0)]) + + def test_related_looks_only_so_far_and_counts_what_lies_beyond(self): + near = self.kg.related(ADA, max_hops=2) + self.assertEqual({g["type"]: (g["within"], g.get("beyond", 0)) for g in near["related"]}, + {"External": (1, 1), "Project": (1, 2), "ResearchOrganization": (1, 0), "WorkingGroup": (1, 1), + "Investigator": (2, 1), "Publication": (1, 2), "Dataset": (1, 0), "Species": (1, 1)}) + self.assertEqual(self.rows(ADA, max_hops=2)["Investigator"], [(BOB, 2, 0.6667), (TWIN1, 2, 0.3333)]) + by_default = {g["type"]: (g["within"], g.get("beyond", 0)) for g in self.kg.related(ADA)["related"]} + self.assertEqual((by_default["Publication"], by_default["External"]), ((2, 1), (1, 1))) # four links, unless asked + # a type with nothing near enough is still named, with how many lie beyond + far = self.kg.related(MOUSE, max_hops=1)["related"] + self.assertEqual([(g["type"], g["within"]) for g in far][0], ("Project", 2)) + self.assertIn({"type": "Investigator", "within": 0, "nodes": [], "beyond": 4}, far) + self.assertIn("max_hops", self.err(self.kg.related, ADA, max_hops=0)) + self.assertIn("max_hops", self.err(self.kg.related, ADA, max_hops=m.MAX_HOPS + 1)) + + def test_related_puts_a_nearer_node_before_a_stronger_one_farther_away(self): + # s is in a group of ten, so each fellow member is tied by 1/10, two links away. Through + # her one project there is a chain of nodes with two neighbours each to x (two links, + # 1/2), then q (1/4), which has three neighbours and leads to f and f2, four links away: + # 1/12 each. Stronger than 1/10 would be farther all the same: the nearer ones come first. + members = "".join(f'bid:n{i} a bbqs:Investigator ; bbqs:name "N{i}" ; bbqs:member_of_group bid:g .\n' + for i in range(9)) + kg = small_kg(members + """ + bid:g a bbqs:WorkingGroup ; bbqs:name "G" . + bid:s a bbqs:Investigator ; bbqs:name "S" ; bbqs:member_of_group bid:g ; bbqs:leads bid:p . + bid:p a bbqs:Project ; bbqs:name "P" . bid:q a bbqs:Project ; bbqs:name "Q" . + bid:x a bbqs:Investigator ; bbqs:name "X" ; bbqs:leads bid:p, bid:q . + bid:f a bbqs:Investigator ; bbqs:name "F" ; bbqs:leads bid:q . + bid:e a bbqs:Investigator ; bbqs:name "E" ; bbqs:leads bid:q .""") + + def people(**options): + return kg.related("S", type="Investigator", **options)["related"][0] + + self.assertEqual([(n["label"], n["hops"], n["strength"]) for n in people(limit=25)["nodes"]], + [("X", 2, 0.5)] + [(f"N{i}", 2, 0.1) for i in range(9)] + [("E", 4, 0.08333), ("F", 4, 0.08333)]) + # a list cut among equals says so; one cut between two levels does not + self.assertNotIn("tied", people(limit=1)) # X, then the nine: a real step down + self.assertEqual(people(limit=3)["tied"], {"hops": 2, "strength": 0.1, "count": 9, "listed": 2}) + self.assertEqual(people(limit=3, offset=3)["tied"], {"hops": 2, "strength": 0.1, "count": 9, "listed": 3}) + self.assertNotIn("tied", people(limit=10)) # ends where the nine end + self.assertEqual(people(limit=11)["tied"], {"hops": 4, "strength": 0.08333, "count": 2, "listed": 1}) + self.assertNotIn("tied", people(limit=3, offset=9)) # the last of the nine, then E and F: all listed + self.assertEqual([n["label"] for n in people(limit=3, offset=-5)["nodes"]], ["X", "N0", "N1"]) + + def test_equals_are_listed_by_name_and_that_is_all_their_order_means(self): + kg = small_kg("""bid:p a bbqs:Project ; bbqs:name "P" . + bid:a a bbqs:Investigator ; bbqs:name "Zoe" ; bbqs:leads bid:p . + bid:b a bbqs:Investigator ; bbqs:name "Abe" ; bbqs:leads bid:p .""") + self.assertEqual([n["label"] for n in kg.related("P")["related"][0]["nodes"]], ["Abe", "Zoe"]) # not by id + self.assertLess(WGD, WGA) # in the fixture too, the ids sort the other way + self.assertEqual(ids(self.kg.related(BOB, type="WorkingGroup")["related"][0]["nodes"]), [WGA, WGD]) + + def test_related_shows_the_strongest_route_and_how_much_of_the_strength_it_brings(self): + bob, twin, cyd = self.kg.related(ADA, type="Investigator")["related"][0]["nodes"] + self.assertEqual(bob["through"], [{"id": WGD, "label": "WG-Devices", "splits": 2}]) + self.assertEqual((bob["routes"], bob["share"]), (2, 0.75)) # 1/2 of his 2/3 came through WG-Devices + self.assertEqual(ids(twin["through"]), [ORG]) + self.assertFalse({"routes", "share"} & set(twin)) # one route: nothing to share out + self.assertEqual([(step["id"], step["splits"]) for step in cyd["through"]], [(WGD, 2), (BOB, 4), (WGA, 2)]) + self.assertEqual((cyd["routes"], cyd["share"]), (4, 0.5)) # 1/2 * 1/4 * 1/2 = 1/16 of her 1/8 + project = self.kg.related(ADA, type="Project")["related"][0]["nodes"][0] + self.assertEqual(project["link"], {"edge": "has_role", "direction": "out", "role": "contact_pi", + "role_source": "reporter"}) # a direct link is its own reason + self.assertNotIn("through", project) + self.assertIs(type(project["strength"]), int) # exactly 1, and sent as 1 + seen_from_p1 = self.kg.related(P1, type="Investigator")["related"][0]["nodes"][0] + self.assertEqual((seen_from_p1["id"], seen_from_p1["link"]["direction"]), (ADA, "in")) + + def test_related_to_several_nodes_is_what_every_one_of_them_reaches(self): + # Ada and Cyd. The wave from Cyd (2 neighbours): WG-Analytics and P2 are direct; Bob gets + # 1/2 + 1/4 = 3/4; he passes 3/16 to WG-Devices and to P1; and so on. A node is placed by + # its worst tie: the farthest starting node, then the weakest. + found = self.kg.related([ADA, CYD], max_hops=m.MAX_HOPS) + self.assertEqual(ids(found["start"]), [ADA, CYD]) + listed = self.rows([ADA, CYD], max_hops=m.MAX_HOPS) + self.assertEqual(list(listed), ["Investigator", "Project", "WorkingGroup", "Publication", "Species", + "ResearchOrganization", "Dataset", "External"]) + # Bob is two links from both. Sam Twin is two from Ada (1/3) but five from Cyd (1/96). + self.assertEqual(listed["Investigator"], [(BOB, 2, 0.6667), (TWIN1, 5, 0.01042)]) + # P1 is Ada's own and three links from Cyd (3/16); P2 the other way round (1/6); P3 is far from both (1/64). + self.assertEqual(listed["Project"], [(P1, 3, 0.1875), (P2, 3, 0.1667), (P3, 5, 0.01563)]) + self.assertEqual(listed["WorkingGroup"], [(WGD, 3, 0.1875), (WGA, 3, 0.1667)]) + self.assertEqual(listed["Species"], [(ZEBRA, 4, 0.04167), (MOUSE, 4, 0.03125)]) + bob = found["related"][0]["nodes"][0] + self.assertEqual(bob["per_start"], [{"start": ADA, "hops": 2, "strength": 0.6667, "routes": 2}, + {"start": CYD, "hops": 2, "strength": 0.75, "routes": 2}]) + self.assertFalse({"link", "through", "routes", "share"} & set(bob)) # find_paths has the routes, pair by pair + swapped = self.kg.related([CYD, ADA], max_hops=m.MAX_HOPS) # the order asked in changes only `ties` + self.assertEqual([(g["type"], ids(g["nodes"])) for g in swapped["related"]], + [(g["type"], ids(g["nodes"])) for g in found["related"]]) + self.assertEqual(self.rows([ADA, CYD, MOUSE], type="Investigator", max_hops=m.MAX_HOPS)["Investigator"], + [(BOB, 2, 0.1667), (TWIN1, 5, 0.01042)]) + self.assertEqual(self.rows([ADA, CYD])["Investigator"], [(BOB, 2, 0.6667)]) # Sam Twin is past four links + + def test_with_several_starting_nodes_the_worst_tie_decides_then_the_next_worst(self): + # P2 and P3. From P3 (one link, to Mouse): P1 gets 1/2 and passes 1/12 to each of its other + # five neighbours, Ada and Bob among them, three links away. From P2: Bob is direct; Ada is + # three links away, 1/8 through WG-Devices + 1/24 through P1 = 1/6. + # Bob's ties, worst first: (3 links, 1/12), (1 link, 1) + # Ada's: (3 links, 1/12), (3 links, 1/6) + # The worst ties are the same, so the next decides, and Bob is nearer. (Taking the farthest + # distance and the weakest strength, each over all the ties, cannot tell the two apart.) + found = self.kg.related([P2, P3], type="Investigator", max_hops=m.MAX_HOPS)["related"][0] + self.assertEqual([(n["id"], n["hops"], n["strength"]) for n in found["nodes"]], + [(BOB, 3, 0.08333), (ADA, 3, 0.08333), (TWIN1, 4, 0.01389), (CYD, 5, 0.01563)]) + self.assertEqual(found["nodes"][0]["per_start"], [{"start": P2, "hops": 1, "strength": 1}, + {"start": P3, "hops": 3, "strength": 0.08333}]) + self.assertEqual(found["nodes"][3]["per_start"][0], {"start": P2, "hops": 1, "strength": 1}) # headed by the worse one + # ...and they are not equals: a list cut between them is not a tie + self.assertNotIn("tied", self.kg.related([P2, P3], type="Investigator", limit=1)["related"][0]) + + def test_related_says_when_a_list_was_cut_among_equals(self): + # Mouse is studied by P1 and P3, both direct; P2 is three links away. + first = self.kg.related(MOUSE, type="Project", limit=1)["related"][0] + self.assertEqual((first["within"], ids(first["nodes"])), (3, [P1])) + self.assertEqual(first["tied"], {"hops": 1, "strength": 1, "count": 2, "listed": 1}) + self.assertNotIn("tied", self.kg.related(MOUSE, type="Project", limit=2)["related"][0]) # cut between levels + second = self.kg.related(MOUSE, type="Project", limit=1, offset=1)["related"][0] + self.assertEqual(ids(second["nodes"]), [P3]) + self.assertNotIn("tied", second) # the tie ends on this page + self.assertEqual(ids(self.kg.related(MOUSE, type="Project", limit=10_000)["related"][0]["nodes"]), [P1, P3, P2]) + + def test_related_can_leave_links_out_and_then_a_node_splits_among_the_rest(self): + # Without the working groups Bob is tied to Ada through P1 alone (1/6), and has 2 neighbours + # left to split among instead of 4, so P2 gets 1/6 / 2 = 1/12. + without = self.strengths(ADA, avoid={"member_of_group"}) + self.assertEqual((without[BOB], without[P2], without[CYD]), ((2, "1/6", 1), (3, "1/12", 1), (4, "1/48", 1))) + self.assertFalse({WGD, WGA} & set(without)) + reply = self.kg.related(ADA, type="Project", avoid_edges="member_of_group") + self.assertEqual(reply["avoided"], ["member_of_group"]) + p2 = reply["related"][0]["nodes"][1] + self.assertEqual((p2["id"], p2["strength"]), (P2, 0.08333)) + self.assertEqual([(step["id"], step["splits"]) for step in p2["through"]], [(P1, 6), (BOB, 2)]) + self.assertNotIn("avoided", self.kg.related(ADA, type="Project")) + self.assertEqual(self.kg.related(ADA, avoid_edges=["orcid", "member_of_group"])["avoided"], + ["member_of_group", "orcid"]) + + def test_related_takes_its_starting_nodes_however_they_arrive(self): + one, pair = self.kg.related(ADA), self.kg.related([ADA, CYD]) + for shape in ([ADA], "Ada Lovelace", f'["{ADA}"]', [ADA, "ada lovelace"], (ADA,), '"Ada Lovelace"', + "Ada Lovelace,"): # the same node twice is one node + self.assertEqual(self.kg.related(shape), one, shape) + for shape in (f"{ADA}, {CYD}", f'["{ADA}", "{CYD}"]', ["Ada Lovelace", CYD], f"{ADA},,{CYD}", + f"['{ADA}', '{CYD}']", f"[{ADA}, {CYD}]", f'"{ADA}", "{CYD}"'): + self.assertEqual(self.kg.related(shape), pair, shape) + # a name with a comma in it is one node, not two + kg = small_kg("""bid:u a bbqs:ResearchOrganization ; bbqs:name "University of Testing, West" ; + bbqs:members bid:a . bid:a a bbqs:Investigator ; bbqs:name "A" .""") + self.assertEqual(kg.related("University of Testing, West")["start"][0]["type"], "ResearchOrganization") + + def test_related_says_what_it_cannot_answer(self): + self.assertIn("No node matches 'nobody at all'", self.err(self.kg.related, "nobody at all")) + self.assertIn("No node matches 'nobody, at all'", self.err(self.kg.related, "nobody, at all")) # no part is a node + self.assertIn("No node matches '[abc'", self.err(self.kg.related, "[abc")) + # one part of a list is wrong: the answer is about that part + self.assertEqual(self.err(self.kg.related, "Ada Lovelace, nobody"), + "Read as 2 nodes. No node matches 'nobody'. Find it with search_nodes; it takes partial names.") + unclear = self.err(self.kg.related, "Sam Twin, Ada Lovelace") + self.assertTrue(unclear.startswith("Read as 2 nodes. 'Sam Twin' names 2 nodes"), unclear) + self.assertIn("names 2 nodes", self.err(self.kg.related, "Sam Twin")) + self.assertIn("names 2 nodes", self.err(self.kg.related, [ADA, "Sam Twin"])) + self.assertIn("No node given", self.err(self.kg.related, [])) + self.assertIn("Investigator", self.err(self.kg.related, ADA, type="Person")) + self.assertIn("has_role", self.err(self.kg.related, ADA, avoid_edges="knows")) + self.assertIn(f"at most {m.MAX_SEEDS}", self.err(self.kg.related, [ADA, BOB, CYD, P1, P2, P3])) + self.assertEqual(len(self.kg.related([ADA, BOB, CYD, P1, P2])["start"]), m.MAX_SEEDS) + self.assertEqual(len(self.kg.related([ADA, ADA, BOB, CYD, P1, P2])["start"]), m.MAX_SEEDS) # one node, named twice + # the part that fails is named, the first of them + self.assertIn("No node matches 'nobody'.", self.err(self.kg.related, "nobody, Ada Lovelace, nobody else")) + + def test_an_ambiguous_name_says_what_it_names_however_it_is_written(self): + for spelling in ('"Sam Twin"', "Sam Twin,", '["Sam Twin"]', "[Sam Twin]"): + self.assertTrue(self.err(self.kg.related, spelling).startswith("'Sam Twin' names 2 nodes"), spelling) + for spelling in ("Sam Twin, nobody", "nobody, Sam Twin"): # beside a part that names nothing + self.assertTrue(self.err(self.kg.related, spelling).startswith("Read as 2 nodes. 'Sam Twin' names 2 nodes"), + spelling) + + def test_every_tool_reads_a_name_in_quotes_or_brackets(self): + for spelling in ('"Sam Twin"', '["Sam Twin"]', "[Sam Twin]", "'Sam Twin'"): + for ask in (lambda ref: self.kg.node(ref), lambda ref: self.kg.neighbors(ref), + lambda ref: self.kg.paths(ref, ADA), lambda ref: self.kg.paths(ADA, ref)): + self.assertIn("'Sam Twin' names 2 nodes", self.err(ask, spelling), spelling) + for spelling in ('"Ada Lovelace"', '["Ada Lovelace"]', "[Ada Lovelace]"): + self.assertEqual(self.kg.resolve(spelling).id, ADA, spelling) + self.assertIn("No node matches '[abc'", self.err(self.kg.node, "[abc")) # the name as written + kg = small_kg("""bid:s1 a bbqs:Investigator ; bbqs:name "Smith, J" . bid:s2 a bbqs:Investigator ; bbqs:name "Smith, J" . + bid:k1 a bbqs:Organization ; bbqs:name "Kids" . bid:k2 a bbqs:Organization ; bbqs:name "Kids'" . + bid:b1 a bbqs:Organization ; bbqs:name "Biomark, Inc." . + bid:208980e9-0000-0000-0000-000000000001 a bbqs:Dataset ; bbqs:name "E-notation" .""") + for spelling in ('"Smith, J"', "[Smith, J]", "'Smith, J'", '["Smith, J"]'): # a comma inside is part of the name + self.assertIn("'Smith, J' names 2 nodes", self.err(kg.node, spelling), spelling) + self.assertEqual([kg.resolve(ref).label for ref in ('"Biomark, Inc."', "[Biomark, Inc.]", '"Kids\'"', "[208980e9]")], + ["Biomark, Inc.", "Biomark, Inc.", "Kids'", "E-notation"]) # not "Kids"; not a number + + def test_describe_graph_takes_one_type_or_none(self): + everything = self.kg.describe() + for none in (None, "", " ", "[]", []): + self.assertEqual(self.kg.describe(none)["nodes"], everything["nodes"], repr(none)) + self.assertIn("Name one node type at a time", self.err(self.kg.describe, "Species, Project")) + self.assertIn("Name one node type at a time", self.err(self.kg.describe, ["Species", "Project"])) + self.assertEqual(self.kg.describe("species")["type"], "Species") + self.assertIn("names no node type", self.err(self.kg.describe, "[")) + + def test_an_argument_that_names_nothing_is_a_mistake_not_no_filter(self): + everything = self.kg.related(ADA) + for none in (None, "", " ", "[]", []): + self.assertEqual(self.kg.related(ADA, type=none), everything, repr(none)) + for wrong in ("[", ",", "[[", '""', "[" * 1000): + self.assertIn("names no node type", self.err(self.kg.related, ADA, type=wrong)) + self.assertIn("names no edge", self.err(self.kg.related, ADA, avoid_edges=wrong)) + self.assertIn("names no edge", self.err(self.kg.neighbors, ADA, edge=wrong)) + self.assertIn("names no node type", self.err(self.kg.search, "", type=wrong)) + self.assertLess(len(self.err(self.kg.related, ADA, type="[" * 1000)), 400) # and says so briefly + self.assertIn("No node matches", self.err(self.kg.related, "[" * 1000)) # not a RecursionError + self.assertIn("names no edge", self.err(self.kg.paths, ADA, BOB, avoid_edges="[" * 1000)) + + def test_with_several_starting_nodes_equals_are_equal_on_every_tie(self): + # S1 is linked to X, Y and K; S2 to H; H to X, Y and W; K to W. From the two together, X and Y + # have the same worst tie (2 links from S2, at 1/4) and the same next one (S1, direct); W has + # that worst tie too, but a weaker next one (2 links from S1, at 1/2). Cut after one, X and Y + # are the equals: two of them, one listed. Counting by the worst tie alone would say three. + kg = small_kg(""" + bid:s1 a bbqs:Species ; bbqs:name "S1" ; bbqs:e bid:x, bid:y, bid:k . + bid:s2 a bbqs:Species ; bbqs:name "S2" ; bbqs:e bid:h . + bid:h a bbqs:Project ; bbqs:name "H" ; bbqs:e bid:x, bid:y, bid:w . + bid:k a bbqs:Project ; bbqs:name "K" ; bbqs:e bid:w . + bid:x a bbqs:Investigator ; bbqs:name "X" . bid:y a bbqs:Investigator ; bbqs:name "Y" . + bid:w a bbqs:Investigator ; bbqs:name "W" .""") + group = kg.related(["S1", "S2"], type="Investigator", limit=1)["related"][0] + self.assertEqual(group["tied"], {"hops": 2, "strength": 0.25, "count": 2, "listed": 1}) + self.assertEqual([row["label"] for row in kg.related(["S1", "S2"], type="Investigator")["related"][0]["nodes"]], + ["X", "Y", "W"]) + + def test_the_note_on_nothing_within_reach_says_how_far_and_what_was_left_out(self): + # A leads P and knows Q; P has R. From A and P together, Q and R are each two links from one + # of them: nothing is within one link of both. + kg = small_kg(""" + bid:a a bbqs:Project ; bbqs:name "A" ; bbqs:leads bid:p ; bbqs:knows bid:q . + bid:p a bbqs:Project ; bbqs:name "P" ; bbqs:has bid:r . + bid:q a bbqs:Investigator ; bbqs:name "Q" . bid:r a bbqs:Dataset ; bbqs:name "R" .""") + near = kg.related(["A", "P"], max_hops=1) + self.assertEqual(near["note"], "Nothing is within 1 link of every one of these nodes.") + self.assertEqual({group["type"]: (group["within"], group.get("beyond")) for group in near["related"]}, + {"Investigator": (0, 1), "Dataset": (0, 1)}) + self.assertEqual(kg.related(["A", "P"], avoid_edges=["knows", "has"])["note"], + "Nothing is within 4 links without has, knows of every one of these nodes.") + self.assertNotIn("note", kg.related(["A", "P"], max_hops=2)) + + def test_a_node_linked_only_to_itself_has_no_links_to_other_nodes(self): + kg = small_kg('bid:a a bbqs:Thing ; bbqs:name "A" ; bbqs:e bid:a .') + alone = kg.related("A") + self.assertEqual(alone["start"][0]["links"], 2) # the link, from both ends + self.assertTrue(alone["note"].startswith("No links to other nodes are recorded for a (Thing: A)"), alone["note"]) + + def test_two_nodes_linked_both_ways_show_each_link_the_way_it_points(self): + kg = small_kg(""" + bid:a a bbqs:Publication ; bbqs:name "A" ; bbqs:cites bid:b . + bid:b a bbqs:Publication ; bbqs:name "B" ; bbqs:cites bid:a ; bbqs:corrects bid:a .""") + self.assertEqual(kg.paths("A", "B")["paths"][0]["text"], + 'Publication "A" -[cites]-> / <-[cites + corrects]- Publication "B"') + self.assertEqual(kg.paths("B", "A")["paths"][0]["text"], + 'Publication "B" -[cites + corrects]-> / <-[cites]- Publication "A"') + self.assertEqual(kg.related("A")["related"][0]["nodes"][0]["link"], + {"edge": "cites", "direction": "out", + "also": [{"edge": "cites", "direction": "in"}, {"edge": "corrects", "direction": "in"}]}) + # two roster records for one person on one project: both roles are shown, not one + kg = small_kg(""" + bid:p a bbqs:Investigator ; bbqs:name "P" . bid:j a bbqs:Project ; bbqs:name "J" . + bid:r1 a bbqs:ProjectRole ; bbqs:held_by bid:p ; bbqs:on_project bid:j ; bbqs:project_role "pi" . + bid:r2 a bbqs:ProjectRole ; bbqs:held_by bid:p ; bbqs:on_project bid:j ; bbqs:project_role "co_investigator" .""") + self.assertEqual(kg.related("P")["related"][0]["nodes"][0]["link"], + {"edge": "has_role", "direction": "out", "role": "co_investigator", + "also": [{"edge": "has_role", "direction": "out", "role": "pi"}]}) + self.assertEqual(kg.paths("P", "J")["paths"][0]["text"], + 'Investigator "P" -[has_role co_investigator + has_role pi]-> Project "J"') + + def test_what_the_view_leaves_out_is_counted_and_said(self): + # Shapes the exporter does not write, but a hand-made export could: each is left out of the + # view, and describe_graph says how many, so a walk that misses one is not a silent miss. + kg = small_kg(""" + bid:x a bbqs:Investigator ; bbqs:name "X" . bid:y a bbqs:Investigator ; bbqs:name "Y" . + bid:j a bbqs:Project ; bbqs:name "J" ; bbqs:studies_species [ bbqs:name "zebrafish" ] . + bid:r1 a bbqs:ProjectRole ; bbqs:held_by bid:x, bid:y ; bbqs:on_project bid:j ; bbqs:project_role "pi" . + bid:r2 a bbqs:ProjectRole ; bbqs:held_by bid:x ; bbqs:on_project bid:j ; bbqs:project_role "pi", "co_pi" . + bid:r3 a bbqs:ProjectRole ; bbqs:held_by bid:y ; bbqs:on_project bid:j ; bbqs:project_role "co_pi" . + bid:d a bbqs:Dataset, bbqs:Dandiset ; bbqs:name "D" .""") + self.assertEqual((dict(kg.repeated), dict(kg.unfolded), kg.multityped, kg.blank, kg.unused), + ({"ProjectRole": 2}, {}, 1, 2, 0)) + self.assertEqual([(l.edge, l.other.rsplit("/", 1)[-1], l.attrs) for l in kg.resolve("J").links], + [("has_role", "y", (("role", "co_pi"),))]) # r3 alone is folded + self.assertEqual(kg.resolve("D").type, "Dandiset") + notes = " ".join(kg.describe()["notes"]) + for said in ("give one of held_by, on_project, project_role, role_source more than once: 2 ProjectRole", + "Nodes with more than one type: 1.", "Triples with a blank node at one end: 2."): + self.assertIn(said, notes) + # a record whose role's source is given twice is one of them; a record typed twice is not a + # node, so not counted as one; a link to a record, and what a record says besides its rule, + # are counted as unused + kg = small_kg(""" + bid:x a bbqs:Investigator ; bbqs:name "X" . bid:j a bbqs:Project ; bbqs:name "J" ; bbqs:roster bid:r2 . + bid:r1 a bbqs:ProjectRole ; bbqs:held_by bid:x ; bbqs:on_project bid:j ; bbqs:project_role "pi" ; + bbqs:role_source "reporter", "curator" . + bid:r2 a bbqs:ProjectRole, bbqs:ZRecord ; bbqs:held_by bid:x ; bbqs:on_project bid:j ; bbqs:project_role "co_pi" ; + bbqs:start_date "2025-01-01" ; bbqs:approved_by bid:x .""") + self.assertEqual((dict(kg.repeated), kg.multityped, kg.unused), ({"ProjectRole": 1}, 0, 4)) # r2's ZRecord too + self.assertEqual([link.attrs for link in kg.resolve("J").links if link.edge == "has_role"], [(("role", "co_pi"),)]) + self.assertIn("Triples about roster records that this view does not use", " ".join(kg.describe()["notes"])) + self.assertEqual((dict(self.kg.repeated), self.kg.multityped, self.kg.blank), ({}, 0, 0)) # none in the fixture + + def test_every_id_shown_leads_back_whatever_it_looks_like(self): + kg = small_kg(""" + bid:project-r34da059723 a bbqs:Project ; bbqs:name "P" ; bbqs:e bid:investigator-ann . + bid:investigator-ann a bbqs:Investigator ; bbqs:name "Ann" . + bid:ABCDEF12-0000-0000-0000-000000000001 a bbqs:Dataset ; bbqs:name "Upper" . + bid:abcdef99-0000-0000-0000-000000000002 a bbqs:Dataset ; bbqs:name "Lower" .""") + self.assertEqual(sorted(node.id for node in kg.nodes.values()), ["ABCDEF12", "abcdef99", "investig", "project-"]) + for node in kg.nodes.values(): + self.assertIs(kg.resolve(node.id), node) + self.assertIs(kg.resolve("bid:" + node.id), node) + self.assertEqual((kg.resolve("abcdef12").label, kg.resolve("ABCDEF9").label), ("Upper", "Lower")) # any case + + def test_equals_are_listed_by_name_ignoring_case_and_a_repeated_start_keeps_its_place(self): + kg = small_kg("""bid:p a bbqs:Project ; bbqs:name "P" ; bbqs:e bid:x1, bid:x2, bid:x3 . + bid:x1 a bbqs:Investigator ; bbqs:name "bea" . bid:x2 a bbqs:Investigator ; bbqs:name "Abe" . + bid:x3 a bbqs:Investigator ; bbqs:name "Cy" .""") + self.assertEqual([n["label"] for n in kg.related("P")["related"][0]["nodes"]], ["Abe", "bea", "Cy"]) + self.assertEqual(ids(self.kg.related([ADA, CYD, "Ada Lovelace"])["start"]), [ADA, CYD]) + + def test_related_explains_an_empty_answer(self): + dee = f"{DEE} (Investigator: Dee Isolated)" + near = self.kg.related([ADA, CYD], max_hops=1) # nothing within one link of both, much beyond + self.assertEqual(near["note"], "Nothing is within 1 link of every one of these nodes.") + self.assertTrue(all(group["beyond"] for group in near["related"])) + alone = self.kg.related(DEE) + self.assertEqual(alone["related"], []) + self.assertEqual(alone["note"], f"No links are recorded for {dee}, so nothing is tied to it. " + "A missing link means 'not recorded'.") + self.assertEqual(self.kg.related([ADA, DEE])["note"], alone["note"]) # names the one without links + self.assertEqual(self.kg.related([DEE, TWIN2, ADA])["note"], + f"No links are recorded for {dee}; {TWIN2} (Investigator: Sam Twin), so nothing is tied to " + "them. A missing link means 'not recorded'.") + cut_off = self.kg.related(DEV, avoid_edges=["manufacturer", "device_category"]) + self.assertIn("No links without device_category, manufacturer are recorded for " + DEV, cut_off["note"]) + apart = self.kg.related([ADA, BOB, DEV]) # two pieces of the graph + self.assertEqual(apart["related"], []) + self.assertEqual(apart["note"], f"No chain of links joins {ADA} (Investigator: Ada Lovelace) and {DEV} " + "(Device: Scope One), so nothing is tied to all of them.") + severed = self.kg.related([ADA, ZEBRA], avoid_edges="has_role")["note"] # joined only through the roster + self.assertTrue(severed.startswith("No chain of links without has_role joins " + ADA), severed) + # joined, and nothing else near enough to both + kg = small_kg('bid:a a bbqs:Investigator ; bbqs:name "A" ; bbqs:leads bid:p . bid:p a bbqs:Project ; bbqs:name "P" .') + self.assertEqual(kg.related(["A", "P"]), {"start": [kg.brief(kg.resolve("A")), kg.brief(kg.resolve("P"))], + "related": [], "note": "Nothing is within 4 links of every one of these nodes."}) + self.assertEqual(self.kg.related(DEV, type="Investigator")["related"], + [{"type": "Investigator", "within": 0, "nodes": []}]) # asked for and none: said so + self.assertNotIn("note", self.kg.related(DEV, type="Investigator")) + self.assertNotIn("note", self.kg.related([ADA, CYD])) + + def test_strength_is_rounded_as_by_hand(self): + for exact, sent in ((Fraction(1, 64), 0.01563), (Fraction(5, 64), 0.07813), (Fraction(2, 3), 0.6667), + (Fraction(1, 96), 0.01042), (Fraction(89, 5), 17.8), (Fraction(1, 3), 0.3333), + (Fraction(17, 160), 0.1063)): # 0.10625 exactly; as a float, just under + self.assertEqual(m._shown(exact), sent, exact) # half goes up, as a person rounds + self.assertEqual((m._shown(Fraction(3)), type(m._shown(Fraction(3)))), (3, int)) + self.assertIs(type(m._shown(Fraction(24999, 25000))), float) # not exactly 1: not sent as the whole number 1 + + # -- paths -- + + def test_paths_shortest_first_and_less_connected_first_among_equals(self): + found = self.kg.paths(ADA, CYD) + self.assertEqual((found["listed"], found["shortest"]), (4, 4)) + self.assertEqual([p["nodes"] for p in found["paths"]], + [[ADA, WGD, BOB, WGA, CYD], [ADA, WGD, BOB, P2, CYD], + [ADA, P1, BOB, WGA, CYD], [ADA, P1, BOB, P2, CYD]]) + self.assertEqual(found["paths"][3]["text"], + 'Investigator "Ada Lovelace" -[has_role contact_pi]-> Project "R34DA000001 · Mouse social ' + 'behavior tracking" <-[has_role co_pi]- Investigator "Bob Müller" -[has_role contact_pi]-> ' + 'Project "R61MH000002 · Zebrafish imaging at scale" <-[has_role postdoc]- ' + 'Investigator "Cyd Charisse"') + self.assertNotIn("more", found) + + def test_paths_carry_their_strength_and_the_shortest_add_up_to_the_tie(self): + found = self.kg.paths(ADA, CYD) + # what is left after WG-Devices (2 neighbours), Bob (4) and WG-Analytics (2) have each split it: 1/16; and so on + self.assertEqual([p["strength"] for p in found["paths"]], [0.0625, 0.03125, 0.02083, 0.01042]) + self.assertEqual((found["shortest"], found["routes"], found["strength"]), (4, 4, 0.125)) # 1/16 + 1/32 + 1/48 + 1/96 + cyd = self.kg.related(ADA, type="Investigator")["related"][0]["nodes"][2] + self.assertEqual((cyd["id"], cyd["hops"], cyd["routes"], cyd["strength"]), (CYD, 4, 4, 0.125)) # one figure, two tools + self.assertFalse({"more", "partial"} & set(found)) + direct = self.kg.paths(ADA, P1) + self.assertEqual(([p["strength"] for p in direct["paths"]], direct["routes"], direct["strength"]), ([1], 1, 1)) + self.assertIs(type(direct["strength"]), int) + + def test_paths_can_leave_edges_out(self): + found = self.kg.paths(ADA, CYD, avoid_edges="member_of_group") + self.assertEqual([p["nodes"] for p in found["paths"]], [[ADA, P1, BOB, P2, CYD]]) + # Bob has 2 neighbours left to split among, not 4: 1 / (6 * 2 * 4) + self.assertEqual((found["paths"][0]["strength"], found["routes"], found["strength"]), (0.02083, 1, 0.02083)) + + def test_paths_list_the_longer_ones_strongest_first_too(self): + # Cyd to Sam Twin. Five links through Bob, P1 and the university: 1/(2*4*6*3) by WG-Analytics + # and 1/(4*4*6*3) by P2. Six links through Bob, WG-Devices, Ada and the university: + # 1/(2*4*2*4*3) and 1/(4*4*2*4*3). + found = self.kg.paths(CYD, TWIN1, max_hops=m.MAX_HOPS, limit=25) + self.assertEqual([(p["hops"], p["strength"]) for p in found["paths"]], + [(5, 0.006944), (5, 0.003472), (6, 0.005208), (6, 0.002604)]) + self.assertEqual((found["shortest"], found["routes"], found["strength"]), (5, 2, 0.01042)) # the five-link ones + self.assertFalse({"more", "partial"} & set(found)) + # Sam Twin to WG-Devices: by the university and Ada, 1/(3*4); the longer way by P1 and Bob, 1/(3*6*4). + # Neither end is counted, though WG-Devices has two neighbours of its own. + found = self.kg.paths(TWIN1, WGD) + self.assertEqual([(p["hops"], p["strength"], p["nodes"]) for p in found["paths"]], + [(3, 0.08333, [TWIN1, ORG, ADA, WGD]), (4, 0.01389, [TWIN1, ORG, P1, BOB, WGD])]) + self.assertEqual([(p["hops"], p["strength"]) for p in self.kg.paths(WGD, TWIN1)["paths"]], [(3, 0.08333), (4, 0.01389)]) + + def test_paths_say_whether_there_are_more_and_can_be_paged(self): + # Bob to Sam Twin: one path of three links, one of four. + first = self.kg.paths(BOB, TWIN1, limit=1) + self.assertEqual((first["listed"], first["routes"], first["more"]), (1, 1, True)) # the longer one counts as more + self.assertEqual([p["hops"] for p in self.kg.paths(BOB, TWIN1, max_hops=3)["paths"]], [3]) # not the 4-link one + self.assertNotIn("more", self.kg.paths(BOB, TWIN1, limit=2)) + second = self.kg.paths(BOB, TWIN1, limit=1, offset=1) + self.assertEqual(([p["nodes"] for p in second["paths"]], "more" in second), ([[BOB, WGD, ADA, ORG, TWIN1]], False)) + whole = self.kg.paths(ADA, CYD)["paths"] + pages = [self.kg.paths(ADA, CYD, limit=2, offset=skip) for skip in (0, 2, 4)] + self.assertEqual([page["paths"] for page in pages], [whole[:2], whole[2:], []]) + self.assertEqual([(page["listed"], page.get("more"), page["routes"]) for page in pages], + [(2, True, 4), (2, None, 4), (0, None, 4)]) + self.assertEqual(self.kg.paths(ADA, CYD, limit=2, offset=-3)["paths"], whole[:2]) + + def test_paths_say_when_the_search_among_longer_ones_gave_up(self): + with mock.patch.object(m, "PATH_STEPS", 1): + cut = self.kg.paths(BOB, TWIN1) + self.assertEqual(([p["hops"] for p in cut["paths"]], cut["partial"]), ([3], True)) # the shortest is never lost + self.assertNotIn("more", cut) # not known, so not claimed + self.assertNotIn("partial", self.kg.paths(BOB, TWIN1)) + with mock.patch.object(m, "PATH_STEPS", 0): # two linked nodes: nothing longer to look for + linked = self.kg.paths(ADA, P1, max_hops=m.MAX_HOPS, limit=25) + self.assertEqual((linked["listed"], linked["routes"]), (1, 1)) + self.assertFalse({"more", "partial"} & set(linked)) + + def test_the_strongest_shortest_paths_are_found_without_listing_them_all(self): + # Three layers of six between a and b, every node linked to every node of the next layer: 216 + # shortest paths. A node in layer L, position i, has i dead ends hung on it, so paths differ + # in strength. The first five must be the five strongest of all 216, in order, whether or + # not the search for longer paths has a single step to spend. + lines = ['bid:a a bbqs:Project ; bbqs:name "A" . bid:b a bbqs:Project ; bbqs:name "B" .'] + for layer in range(3): + for i in range(6): + node = f"bid:l{layer}n{i}" + nxt = ", ".join(f"bid:l{layer + 1}n{j}" for j in range(6)) if layer < 2 else "bid:b" + lines.append(f'{node} a bbqs:Investigator ; bbqs:name "L{layer}N{i}" ; bbqs:next {nxt} .') + lines += [f'bid:d{layer}{i}{k} a bbqs:Dataset ; bbqs:name "D{layer}{i}{k}" ; bbqs:of {node} .' + for k in range(i)] + lines.append("bid:a bbqs:next " + ", ".join(f"bid:l0n{i}" for i in range(6)) + " .") + kg = small_kg("\n".join(lines)) + fan = {f"l{layer}n{i}": (7 if layer == 0 else 12) + i for layer in range(3) for i in range(6)} + fan.update({f"l2n{i}": 7 + i for i in range(6)}) + everything = sorted(((Fraction(1, fan[x] * fan[y] * fan[z]), ["a", x, y, z, "b"]) + for x in (f"l0n{i}" for i in range(6)) for y in (f"l1n{i}" for i in range(6)) + for z in (f"l2n{i}" for i in range(6))), key=lambda one: (-one[0], one[1])) + self.assertEqual(len(everything), 216) + for steps in (m.PATH_STEPS, 1): + with mock.patch.object(m, "PATH_STEPS", steps): + there, back = kg.paths("A", "B", limit=5, offset=3), kg.paths("B", "A", limit=5, offset=3) + self.assertEqual((there["routes"], there["more"]), (216, True)) + self.assertEqual(there["strength"], m._shown(sum((one[0] for one in everything), Fraction(0)))) + self.assertEqual([p["strength"] for p in there["paths"]], [m._shown(one[0]) for one in everything[3:8]]) + self.assertEqual([[kg.resolve(n).label.lower() for n in p["nodes"]] for p in there["paths"]], + [nodes for _, nodes in everything[3:8]]) + self.assertEqual([p["nodes"][::-1] for p in back["paths"]], [p["nodes"] for p in there["paths"]]) + self.assertNotIn("partial", there) # the shortest paths never use the step budget + deep = kg.paths("A", "B", limit=5, offset=200) # a page far down the list is still in order + self.assertEqual([[kg.resolve(n).label.lower() for n in p["nodes"]] for p in deep["paths"]], + [nodes for _, nodes in everything[200:205]]) + # Without listing them all: count how often the search asks a node for its neighbours. Listing + # every shortest path, or a bound that is not exact, asks over 600 times; this asks under 216, + # fewer than one time per shortest path. + asked, ways = [0], kg._ways + kg._ways = lambda avoid: (lambda found: (lambda iri: (asked.__setitem__(0, asked[0] + 1), found(iri))[1]))(ways(avoid)) + kg.paths("A", "B", limit=5, offset=3) + del kg._ways + self.assertLess(asked[0], 216) + # A page so deep that finding it would take too long is cut short, and the reply says so. + with mock.patch.object(m, "SHORTEST_STEPS", 5): + cut = kg.paths("A", "B", limit=5, offset=100) + past = kg.paths("A", "B", limit=5, offset=216) # past every shortest path: more is not known + self.assertEqual((cut["partial"], cut["more"], cut["routes"]), (True, True, 216)) + self.assertEqual((past["partial"], "more" in past, past["listed"]), (True, False, 0)) + self.assertEqual(len(kg.paths("A", "B", limit=5, offset=100)["paths"]), 5) + + def test_longer_paths_of_equal_strength_come_in_the_order_of_their_nodes(self): + # A-M-B is the shortest. A-a1-a2-B and A-z1-z2-B are as strong as each other; the one through + # a1 comes first, whatever the names say ("Zulu" is a1, "Alpha" is z1). + kg = small_kg(""" + bid:a a bbqs:Project ; bbqs:name "A" ; bbqs:e bid:m, bid:a1, bid:z1 . + bid:m a bbqs:Investigator ; bbqs:name "M" ; bbqs:e bid:b . + bid:a1 a bbqs:Investigator ; bbqs:name "Zulu" ; bbqs:e bid:a2 . + bid:a2 a bbqs:Investigator ; bbqs:name "Zulu2" ; bbqs:e bid:b . + bid:z1 a bbqs:Investigator ; bbqs:name "Alpha" ; bbqs:e bid:z2 . + bid:z2 a bbqs:Investigator ; bbqs:name "Alpha2" ; bbqs:e bid:b . + bid:b a bbqs:Project ; bbqs:name "B" .""") + found = kg.paths("A", "B")["paths"] + self.assertEqual([[kg.resolve(n).label for n in p["nodes"]] for p in found], + [["A", "M", "B"], ["A", "Zulu", "Zulu2", "B"], ["A", "Alpha", "Alpha2", "B"]]) + self.assertEqual([p["strength"] for p in found], [0.5, 0.25, 0.25]) + + def test_a_long_name_on_a_route_is_clipped(self): + kg = small_kg(""" + bid:a a bbqs:Project ; bbqs:name "A" ; bbqs:e bid:m . + bid:m a bbqs:Investigator ; bbqs:name "A middle node whose name runs on well past forty characters" ; + bbqs:e bid:b . + bid:b a bbqs:Project ; bbqs:name "B" .""") + step = kg.related("A", type="Project")["related"][0]["nodes"][0]["through"][0] + self.assertEqual((len(step["label"]), step["label"][-1]), (40, "…")) + + def test_paths_read_the_same_from_either_end(self): + linked = sorted((node for node in self.kg.nodes.values() if node.links), key=lambda node: node.iri) + joined = 0 + for a in linked: + for b in linked: + if a.iri < b.iri: + there = self.kg.paths(a.id, b.id, max_hops=m.MAX_HOPS, limit=2) + back = self.kg.paths(b.id, a.id, max_hops=m.MAX_HOPS, limit=2) + self.assertEqual((there["source"], there["target"]), (back["target"], back["source"])) + self.assertEqual([(p["strength"], p["nodes"]) for p in there["paths"]], + [(p["strength"], p["nodes"][::-1]) for p in back["paths"]], (a.id, b.id)) + summary = ("listed", "shortest", "routes", "strength", "more", "partial", "note") + self.assertEqual([there.get(k) for k in summary], [back.get(k) for k in summary], (a.id, b.id)) + joined += bool(there["paths"]) + self.assertGreater(joined, 100) + # Two equally strong routes, the same kind of link all along, named so that the first node + # sorts one way from a and the other way from b. Cut at one path, both ends must keep the same one. + kg = small_kg("""bid:a a bbqs:Investigator ; bbqs:name "A" ; bbqs:knows bid:p1, bid:p2 . + bid:b a bbqs:Investigator ; bbqs:name "B" ; bbqs:knows bid:q1, bid:q2 . + bid:p1 a bbqs:Investigator ; bbqs:name "P1" ; bbqs:knows bid:q2 . + bid:p2 a bbqs:Investigator ; bbqs:name "P2" ; bbqs:knows bid:q1 . + bid:q1 a bbqs:Investigator ; bbqs:name "Q1" . bid:q2 a bbqs:Investigator ; bbqs:name "Q2" .""") + there, back = kg.paths("A", "B", limit=1), kg.paths("B", "A", limit=1) + self.assertEqual((there["routes"], there["strength"], there["more"]), (2, 0.5, True)) + self.assertEqual([kg.resolve(n).label for n in there["paths"][0]["nodes"]], ["A", "P1", "Q2", "B"]) + self.assertEqual(back["paths"][0]["nodes"], there["paths"][0]["nodes"][::-1]) + # ...and find_related shows that same route as the strongest, asked from either end + from_a = kg.related("A", max_hops=3)["related"][0]["nodes"][-1] + from_b = kg.related("B", max_hops=3)["related"][0]["nodes"][-1] + self.assertEqual((from_a["label"], [step["label"] for step in from_a["through"]]), ("B", ["P1", "Q2"])) + self.assertEqual((from_b["label"], [step["label"] for step in from_b["through"]]), ("A", ["Q2", "P1"])) + self.assertEqual((from_a["routes"], from_a["share"], from_b["share"]), (2, 0.5, 0.5)) + # Two link kinds, and again two equally strong routes between n4 and n5. + kg = small_kg("".join(f'bid:n{i} a bbqs:Project ; bbqs:name "N{i}" .\n' for i in range(6)) + """ + bid:n0 bbqs:f bid:n2, bid:n4 ; bbqs:e bid:n5 . bid:n1 bbqs:e bid:n3, bid:n4 ; bbqs:f bid:n5 . + bid:n2 bbqs:e bid:n4 . bid:n3 bbqs:e bid:n4 .""") + there, back = kg.paths("N4", "N5", limit=1), kg.paths("N5", "N4", limit=1) + self.assertEqual((there["routes"], there["more"]), (2, True)) + self.assertEqual([kg.resolve(n).label for n in there["paths"][0]["nodes"]], ["N4", "N0", "N5"]) + self.assertEqual(back["paths"][0]["nodes"], there["paths"][0]["nodes"][::-1]) + # Two nodes that cite each other are one tie and one path, the same from both. + kg = small_kg("""bid:a a bbqs:Publication ; bbqs:name "A" ; bbqs:cites bid:b . + bid:b a bbqs:Publication ; bbqs:name "B" ; bbqs:cites bid:a .""") + there, back = kg.paths("A", "B"), kg.paths("B", "A") + self.assertEqual((there["listed"], there["routes"], there["strength"]), (1, 1, 1)) + self.assertEqual((back["listed"], back["paths"][0]["nodes"]), (1, there["paths"][0]["nodes"][::-1])) + + def test_paths_have_no_detours(self): + # ada-org-p1 is a real chain, but ada is on p1 directly: the longer way round adds nothing. + for path in self.kg.paths(ADA, CYD, max_hops=m.MAX_HOPS, limit=25)["paths"]: + self.assertNotIn(ORG, path["nodes"]) + self.assertEqual(path["hops"], 4) + + def test_a_shared_identifier_is_a_path(self): + found = self.kg.paths(ADA, PUB1) + self.assertEqual([p["nodes"] for p in found["paths"]], [[ADA, "ext:" + O1, PUB1], [ADA, P1, PUB1]]) + self.assertEqual(self.kg.paths(PUB2, PUB3)["paths"][0]["nodes"], [PUB2, "ext:" + O4, PUB3]) + + def test_paths_tell_not_connected_from_too_far(self): + self.assertIn("Not connected", self.kg.paths(ADA, DEV)["note"]) + self.assertIn("Not connected", self.kg.paths(ADA, DEE)["note"]) + far = self.kg.paths(MOUSE, ZEBRA, max_hops=3) + self.assertEqual((far["listed"], far["shortest"]), (0, 4)) + self.assertIn("4 hops", far["note"]) + self.assertEqual(self.kg.paths(MOUSE, ZEBRA)["paths"][0]["nodes"], [MOUSE, P1, BOB, P2, ZEBRA]) + self.assertIn("same node", self.kg.paths(ADA, "Ada Lovelace")["note"]) + cut = self.kg.paths(ADA, CYD, avoid_edges=["member_of_group", "has_role"]) + self.assertIn("without has_role, member_of_group", cut["note"]) + + def test_paths_say_when_there_are_more_than_were_returned(self): + some = self.kg.paths(ADA, CYD, limit=2) + self.assertEqual((some["listed"], some["more"]), (2, True)) + + # -- SPARQL -- + + def test_sparql_sees_the_graph_as_exported(self): + roster = self.kg.sparql("""SELECT ?name ?role WHERE { ?p bbqs:grant_number "R34DA000001" . + ?r a bbqs:ProjectRole ; bbqs:on_project ?p ; bbqs:project_role ?role ; bbqs:held_by ?person . + ?person bbqs:name ?name } ORDER BY ?name""") + self.assertEqual(roster, {"columns": ["name", "role"], + "rows": [["Ada Lovelace", "contact_pi"], ["Bob Müller", "co_pi"]]}) + totals = self.kg.sparql("SELECT (SUM(?a) AS ?total) (COUNT(?p) AS ?n) WHERE { ?p bbqs:award_amount ?a }") + self.assertEqual(totals["rows"], [[350, 2]]) + self.assertEqual(self.kg.sparql("ASK { ?p a bbqs:Project }"), {"answer": True}) + self.assertEqual(self.kg.sparql("ASK { ?p a bbqs:Nothing }"), {"answer": False}) + + def test_sparql_speaks_the_same_ids_as_the_other_tools(self): + rows = self.kg.sparql("SELECT ?project ?species ?kind WHERE { ?project bbqs:studies_species ?species . " + "?species a ?kind } ORDER BY ?project")["rows"] + self.assertEqual(rows[0], ["bid:" + P1, "bid:" + MOUSE, "bbqs:Species"]) + by_short_id = self.kg.sparql(f"SELECT ?n WHERE {{ bid:{P1} bbqs:grant_number ?n }}") + self.assertEqual(by_short_id["rows"], [["R34DA000001"]]) + full = self.kg.resolve(P1).iri.rsplit("/", 1)[-1] + self.assertEqual(self.kg.sparql(f"SELECT ?n WHERE {{ bid:{full} bbqs:grant_number ?n }}")["rows"], + [["R34DA000001"]]) + self.assertIn("more than one id", self.err(self.kg.sparql, "SELECT ?p WHERE { bid:a1b2c3d4 ?p ?o }")) + orcids = self.kg.sparql("SELECT ?o WHERE { ?s bbqs:orcid ?o } ORDER BY ?o LIMIT 1")["rows"] + self.assertEqual(orcids, [[f"<{O1}>"]]) + + def test_sparql_caps_rows_and_says_so(self): + capped = self.kg.sparql("SELECT ?s WHERE { ?s a bbqs:Investigator }", limit=2) + self.assertEqual((len(capped["rows"]), capped["more"]), (2, True)) + self.assertNotIn("more", self.kg.sparql("SELECT ?s WHERE { ?s a bbqs:Investigator }", limit=6)) + + def test_sparql_refuses_everything_that_is_not_a_read_of_this_graph(self): + refused = { + "INSERT DATA { <urn:a> <urn:b> <urn:c> }": "Only SPARQL SELECT and ASK", + "DELETE WHERE { ?s ?p ?o }": "Only SPARQL SELECT and ASK", + "LOAD <http://example.org/x.ttl>": "Only SPARQL SELECT and ASK", + "CLEAR ALL": "Only SPARQL SELECT and ASK", + "CONSTRUCT { ?s a bbqs:X } WHERE { ?s a bbqs:Project }": "only SELECT and ASK", + "DESCRIBE ?s WHERE { ?s a bbqs:Project }": "only SELECT and ASK", + "SELECT * WHERE { SERVICE <http://example.org/sparql> { ?s ?p ?o } }": "FROM and SERVICE", + "SELECT ?s WHERE { ?s a bbqs:Project OPTIONAL { SERVICE SILENT <http://x.example/> { ?s ?p ?o } } }": + "FROM and SERVICE", + "SELECT ?s FROM <http://example.org/g.ttl> WHERE { ?s ?p ?o }": "FROM and SERVICE", + "SELECT ?s FROM NAMED <http://example.org/g.ttl> WHERE { GRAPH ?g { ?s ?p ?o } }": "FROM and SERVICE", + "SELECT ?s WHERE { ?s ?p }": "Only SPARQL SELECT and ASK", + } + for query, reason in refused.items(): + self.assertIn(reason, self.err(self.kg.sparql, query), query) + + def test_sparql_stops_a_runaway_query(self): + # Run on a thread with a deadline of its own, so a broken budget fails this test instead + # of hanging the suite: four unjoined patterns over this graph are 118^4 rows. + outcome = {} + + def runaway(): + try: + outcome["rows"] = self.kg.sparql( + "SELECT (COUNT(*) AS ?n) WHERE { ?a ?b ?c . ?d ?e ?f . ?g ?h ?i . ?j ?k ?l }") + except m.KGError as refused: + outcome["refused"] = str(refused) + + with mock.patch.object(m, "SPARQL_SECONDS", 0.3): + worker = threading.Thread(target=runaway, daemon=True) + worker.start() + worker.join(15) + self.assertFalse(worker.is_alive(), "the query was still running 15 s after a 0.3 s budget") + self.assertIn("Stopped after 0.3 seconds", outcome.get("refused", "")) + self.assertEqual(self.kg.sparql("ASK { ?p a bbqs:Project }"), {"answer": True}) # and the budget is released + + # -- arguments as clients actually send them -- + + def test_list_arguments_arrive_in_several_shapes(self): + for shape in (["has_role", "member_of_group"], '["has_role", "member_of_group"]', "has_role, member_of_group", + "has_role,member_of_group"): + self.assertEqual(self.kg.neighbors(ADA, edge=shape)["total"], 2, shape) + self.assertEqual(m._as_list(None), []) + self.assertEqual(m._as_list(""), []) + self.assertEqual(m._as_list("[broken, json"), ["broken", "json"]) + + +class ReadOnly(unittest.TestCase): + """No tool, given anything, changes the graph it serves.""" + + def test_nothing_a_tool_does_changes_a_triple(self): + kg = fixture_kg() + before = sorted(kg.graph) + calls = [ + lambda: kg.describe(), lambda: kg.search("mouse"), + lambda: kg.search(type="Project", where={"mechanism": "R34"}), + lambda: kg.node(P1), lambda: kg.neighbors(ADA, depth=m.MAX_DEPTH), lambda: kg.paths(ADA, CYD, limit=25), + lambda: kg.related([ADA, CYD], limit=25), lambda: kg.related(P1, avoid_edges="has_role"), + lambda: kg.sparql("SELECT * WHERE { ?s ?p ?o }", limit=m.MAX_ROWS), + lambda: kg.sparql("INSERT DATA { <urn:a> <urn:b> <urn:c> }"), + lambda: kg.sparql("DELETE WHERE { ?s ?p ?o }"), lambda: kg.sparql("DROP ALL"), + lambda: kg.sparql("LOAD <http://example.org/x.ttl>"), + lambda: kg.sparql("SELECT * WHERE { SERVICE <http://example.org/> { ?s ?p ?o } }"), + ] + refused = 0 + for call in calls: + try: + call() + except m.KGError: + refused += 1 + self.assertEqual(refused, 5) # the four writes and the outbound SERVICE + self.assertEqual(sorted(kg.graph), before) + self.assertGreater(len(before), 100) # the fixture really was loaded + + def test_the_only_calls_that_write_to_a_graph_are_the_ones_that_load_it(self): + # A text check, so a later change cannot add a write path without this test noticing: the + # rdflib calls that mutate a graph must not appear anywhere but the one load in _read(). + source = SERVER.read_text(encoding="utf8") + parses = re.findall(r"(\w*Graph\(\))?\.parse\(", source) + self.assertEqual(parses, ["Graph()", "_BudgetedGraph()"]) # the schema, the graph: each into a graph of its own + for writer in (r"graph\.update\(", r"graph\.add\(", r"graph\.remove\(", r"graph\.set\(", r"\.serialize\(", + r"\.addN\(", r"open\([^)]*[\"'][wa]b?[\"']", r"\.write_text\(", r"\.write_bytes\("): + self.assertIsNone(re.search(writer, source), writer) + + +class TheExport(unittest.TestCase): + """The committed graph: what the consortium's own questions get back through the server.""" + + @classmethod + def setUpClass(cls): + cls.kg = m.GraphSource(str(EXPORT)).current() + cls.plain = Graph().parse(str(EXPORT), format="turtle") + cls.questions = yaml.safe_load((HERE / "competency_questions.yaml").read_text(encoding="utf8"))["questions"] + cls.baseline = json.loads((HERE / "quality_baseline.json").read_text(encoding="utf8")) + + def test_every_node_of_the_export_is_reachable_by_the_view(self): + typed = {str(s) for s in self.plain.subjects(m.RDF.type, None)} + folded = {str(s) for kind in m.FOLDED for s in self.plain.subjects(m.RDF.type, m.URIRef(m.SCHEMA_NS + kind))} + outside = {n.iri for n in self.kg.nodes.values() if n.type == m.EXTERNAL} + self.assertEqual(set(self.kg.nodes) - outside, typed - folded) + self.assertEqual(len(folded), self.kg.edge_counts[("Investigator", "has_role", "Project")] + + sum(self.kg.unfolded.values())) + self.assertTrue(all(iri.startswith(m.ID_NS) for iri in typed)) + self.assertGreater(len(self.kg.nodes), 500) + + def test_every_link_of_the_export_is_a_link_of_the_view(self): + typed = {str(s) for s in self.plain.subjects(m.RDF.type, None)} + folded = {str(s) for kind in m.FOLDED for s in self.plain.subjects(m.RDF.type, m.URIRef(m.SCHEMA_NS + kind))} + expected = sorted((str(s), m._local(str(p)), str(o)) for s, p, o in self.plain + if p != m.RDF.type and str(o) in typed and str(s) not in folded) + got = sorted((n.iri, l.edge, l.other) for n in self.kg.nodes.values() for l in n.links + if l.out and l.edge not in {r["edge"] for r in m.FOLDED.values()} + and self.kg.nodes[l.other].type != m.EXTERNAL) + self.assertEqual(got, expected) + + def test_every_answered_competency_question_is_answered_through_the_server(self): + asked = 0 + for question in self.questions: + if question["id"] not in self.baseline["answered"]: + continue + asked += 1 + direct = self.plain.query(question["sparql"], initNs=m.PREFIXES) + through = self.kg.sparql(question["sparql"], limit=m.MAX_ROWS) + if question.get("reads") != "absence": # a "which X has no Y" one answers with none missing too + self.assertGreater(len(through["rows"]), 0, question["id"]) + self.assertEqual(through["columns"], [str(v) for v in direct.vars], question["id"]) + same = lambda rows: sorted(json.dumps(row, sort_keys=True, default=str) for row in rows) # noqa: E731 + self.assertEqual(same(through["rows"]), same([self.kg._cell(c) for c in row] for row in direct), + question["id"]) # the same rows, not just as many + self.assertEqual(asked, len(self.baseline["answered"])) + self.assertGreaterEqual(asked, 16) + + def _column(self, sparql: str) -> list: + return sorted(str(row[0]) for row in self.plain.query(sparql, initNs=m.PREFIXES)) + + def test_walking_agrees_with_sparql_on_who_holds_a_role(self): # CQ04 + expected = sorted(f"{row[0]}|{row[1]}" for row in self.plain.query("""SELECT ?name ?role WHERE { + ?project bbqs:grant_number "R34DA059723" . ?pr a bbqs:ProjectRole ; bbqs:on_project ?project ; + bbqs:project_role ?role ; bbqs:held_by ?person . ?person bbqs:name ?name }""", initNs=m.PREFIXES)) + walked = self.kg.neighbors("R34DA059723", edge="has_role", limit=200)["nodes"] + self.assertEqual(sorted(f"{self.kg.resolve(n['id']).props['name'][0]}|{n['via']['role']}" for n in walked), + expected) + self.assertTrue(expected) + + def test_one_call_on_a_project_reaches_its_people_and_its_species(self): # the smoke check of #434 + around = self.kg.neighbors("R34DA059723", limit=200) + self.assertGreaterEqual(around["reached_by_type"].get("Investigator", 0), 1) + self.assertGreaterEqual(around["reached_by_type"].get("Species", 0), 1) + + def test_two_links_from_a_person_is_not_their_whole_working_group(self): + members = self.kg.neighbors("WG-Analytics", edge="member_of_group", direction="in", limit=200) + self.assertGreater(members["total"], m.HUB_LINKS) + someone = next(n["id"] for n in members["nodes"] if n["links"] >= 3) + near = self.kg.neighbors(someone, depth=2, limit=200) + self.assertIn("WG-Analytics", [hub["label"] for hub in near["hubs_not_walked_through"]]) + self.assertLess(near["total"], members["total"] // 2) + self.assertGreater(self.kg.neighbors(someone, depth=2, limit=200, through_hubs=True)["total"], members["total"]) + + def test_walking_agrees_with_sparql_on_working_group_members(self): # CQ08 + expected = self._column('SELECT ?person WHERE { ?wg a bbqs:WorkingGroup ; bbqs:name "WG-Devices" . ' + '?person bbqs:member_of_group ?wg }') + walked = self.kg.neighbors("WG-Devices", edge="member_of_group", direction="in", limit=200) + self.assertEqual(sorted(self.kg.resolve(n["id"]).iri for n in walked["nodes"]), expected) + self.assertEqual(walked["total"], len(expected)) + self.assertGreater(len(expected), 10) + + def test_walking_agrees_with_sparql_two_hops_out(self): # CQ09 + CQ04, chained + expected = self._column('SELECT DISTINCT ?person WHERE { ?species bbqs:common_name "House Mouse" . ' + '?project bbqs:studies_species ?species . ?pr bbqs:on_project ?project ; ' + 'bbqs:held_by ?person }') + walked = self.kg.neighbors("House Mouse", edge=["studies_species", "has_role"], depth=2, type="Investigator", + limit=200) + self.assertEqual(sorted(self.kg.resolve(n["id"]).iri for n in walked["nodes"]), expected) + self.assertTrue(expected) + + def test_on_the_export_too_the_code_is_the_process_it_is_named_after(self): + linked = sorted((node for node in self.kg.nodes.values() if node.links), key=lambda node: node.iri) + for start in linked[::25]: + wave = self.kg._wave(start) + self.assertEqual({iri: (found.hops, found.strength) for iri, found in wave.items() if found.hops}, + first_arrivals(self.kg, start), start.id) + self.assertGreater(len(linked[::25]), 15) + + def test_the_paths_between_two_nodes_account_for_the_whole_of_their_tie(self): + # find_paths lists the shortest paths one at a time and find_related adds them up. The sum + # is redone here from nothing but the ids on each path and those nodes' neighbours. + checked = 0 + for start in ("House Mouse", "WG-Devices", "R34DA059723"): + wave = self.kg._wave(self.kg.resolve(start)) + for group in self.kg.related(start, limit=3, max_hops=m.MAX_HOPS)["related"]: + for row in group["nodes"]: + found = self.kg.paths(start, row["id"], max_hops=row["hops"], limit=25) + self.assertEqual((found["shortest"], found["strength"], found["routes"]), + (row["hops"], row["strength"], row.get("routes", 1)), (start, row["id"])) + if found["routes"] > 25: + self.assertEqual((found["listed"], found["more"]), (25, True)) + continue # more than one page: the first is not the sum + self.assertEqual(found["listed"], found["routes"]) + total = Fraction(0) + for path in found["paths"]: + left = Fraction(1) + for between in path["nodes"][1:-1]: + left /= len(self.kg.resolve(between).near) + self.assertEqual(path["strength"], m._shown(left)) + total += left + self.assertEqual(wave[self.kg.resolve(row["id"]).iri].strength, total) + checked += 1 + self.assertGreater(checked, 40) + + def test_the_route_find_related_shows_is_the_path_find_paths_lists_first(self): + compared = several = 0 + for start in sorted((n for n in self.kg.nodes.values() if n.near), key=lambda n: n.iri)[::25]: + for group in self.kg.related(start.id, limit=4)["related"]: + for row in group["nodes"]: + if row["hops"] == 1: + continue + first = self.kg.paths(start.id, row["id"], max_hops=row["hops"], limit=1)["paths"][0] + self.assertEqual(first["nodes"][1:-1], ids(row["through"]), (start.id, row["id"])) + back = self.kg.related(row["id"], type=start.type, limit=25, max_hops=row["hops"])["related"][0] + seen_back = next((n for n in back["nodes"] if n["id"] == start.id), None) + if seen_back: # the same route, read the other way + self.assertEqual(ids(seen_back["through"]), ids(row["through"])[::-1]) + compared += 1 + several += row.get("routes", 1) > 1 + self.assertGreater(compared, 150) + self.assertGreater(several, 40) + + def test_strength_finds_a_hidden_link_better_than_distance_alone(self): + # A measure of whether the ranking is worth having on the real graph, kept so that a change + # that makes it worse shows. It is not what defends the rule itself: the hand-worked tests do + # that. Hide one real tie, start at one of its ends, and see where the other end lands among + # the nodes of its own type that the start is not already tied to. Scored as the chance of + # being in the first ten when equals fall in any order, which is what a list really shows. + kg = m.GraphSource(str(EXPORT)).current() # a graph of its own: ties are taken out and put back + cases, by_strength, by_distance, pair = 0, 0.0, 0.0, 0 + for node in sorted((n for n in kg.nodes.values() if n.links), key=lambda n: n.iri): + for other_iri in [iri for iri in node.near if node.iri < iri]: + pair += 1 + if pair % 3: + continue # every third tie: the measure, at a third of the cost + other = kg.nodes[other_iri] + links, back = node.near.pop(other_iri), other.near.pop(node.iri) + for start, hidden in ((node, other), (other, node)): + if not start.near: + continue # it was the start's only tie: nothing to go on + cases += 1 + wave = kg._wave(start) + if hidden.iri not in wave: + continue # not found, by either ordering + rivals = [found for iri, found in wave.items() + if found.hops and iri not in start.near and kg.nodes[iri].type == hidden.type] + + def in_first_ten(key): + mine = key(wave[hidden.iri]) + ahead, level = sum(key(r) < mine for r in rivals), sum(key(r) == mine for r in rivals) + return min(max((10 - ahead) / level, 0.0), 1.0) + + by_strength += in_first_ten(lambda found: (found.hops, -found.strength)) + by_distance += in_first_ten(lambda found: found.hops) + node.near[other_iri], other.near[node.iri] = links, back + self.assertGreater(cases, 400) + # 2026-11-05, every third tie: in the first ten 65% of the time by strength, 45% by distance + # alone. Counting routes and ignoring what each brings scores 1.34 times distance; this 1.44. + self.assertGreater(by_strength, 1.38 * by_distance, (by_strength / cases, by_distance / cases)) + self.assertGreater(by_strength / cases, 0.5) + + def test_a_working_group_is_not_cut_off_it_just_passes_on_little(self): + # The fan effect in place of a cut-off: two members of a big working group are tied through it + # by exactly 1/members. The path is found and listed, and it is faint. + group = max((node for node in self.kg.nodes.values() if node.type == "WorkingGroup"), + key=lambda node: (len(node.near), node.iri)) + members = len(group.near) + self.assertGreater(members, m.HUB_LINKS) + a, b = sorted((self.kg.nodes[iri] for iri in group.near), key=lambda n: (len(n.near), n.iri))[:2] + found = self.kg.paths(a.iri, b.iri, max_hops=2, limit=25) + through = [path for path in found["paths"] if path["nodes"] == [a.id, group.id, b.id]] + self.assertEqual([path["strength"] for path in through], [m._shown(Fraction(1, members))]) + self.assertLess(through[0]["strength"], 1 / m.HUB_LINKS) + self.assertEqual(found["shortest"], 2) + self.assertGreaterEqual(found["strength"], through[0]["strength"]) # that path, plus any other + + def test_related_lists_are_capped_paged_and_say_how_many_tie(self): + group = max((node for node in self.kg.nodes.values() if node.type == "WorkingGroup"), + key=lambda node: (len(node.near), node.iri)) + members = sum(1 for iri in group.near if self.kg.nodes[iri].type == "Investigator") + self.assertGreater(members, 60) + + def people(**options): + return self.kg.related(group.iri, type="Investigator", **options)["related"][0] + + asked_for_all = people(limit=10_000) + self.assertEqual(len(asked_for_all["nodes"]), 25) # the most one named type is given at once + self.assertEqual(asked_for_all["tied"], {"hops": 1, "strength": 1, "count": members, "listed": 25}) + self.assertGreater(asked_for_all["within"], members) # people outside the group are reached too + next_page = people(limit=25, offset=25) + self.assertEqual(len(next_page["nodes"]), 25) + self.assertFalse(set(ids(asked_for_all["nodes"])) & set(ids(next_page["nodes"]))) + self.assertEqual(next_page["tied"], {"hops": 1, "strength": 1, "count": members, "listed": 25}) + beyond = people(limit=3, offset=members) + self.assertEqual([n["hops"] for n in beyond["nodes"]], [3, 3, 3]) # past the members: three links away + strengths = [n["strength"] for n in beyond["nodes"]] + self.assertEqual(strengths, sorted(strengths, reverse=True)) + # with no type named, every type comes back, so each list is kept to ten + overview = self.kg.related(group.iri, limit=10_000)["related"] + self.assertEqual(max(len(g["nodes"]) for g in overview), 10) + self.assertGreater(len(overview), 4) + self.assertEqual(len(self.kg.related(group.iri)["related"][0]["nodes"]), 5) # and to five unless asked + + def test_related_replies_stay_a_size_a_client_can_take(self): + # What the tool sends, in bytes, for the questions most likely to be asked. Before distances + # were limited and the routes kept short, five starting nodes came to 78,000. + def sent(*args, **options): + return len(json.dumps(self.kg.related(*args, **options), separators=(",", ":"), ensure_ascii=False)) + + linked = sorted((node for node in self.kg.nodes.values() if node.links), key=lambda node: node.iri) + self.assertLess(max(sent(node.iri) for node in linked[::7]), 20_000) + self.assertLess(sent(["House Mouse", "WG-Devices", "WG-Analytics", "R34DA059723", "Human"]), 20_000) + self.assertLess(max(sent(node.iri, limit=25, max_hops=m.MAX_HOPS) for node in linked[::25]), 60_000) + # Naming types lifts the cap from 10 to 25, but only for up to three of them: naming every + # type came to 72,000 when it lifted the cap for all. Naming every type gets the lists naming + # none does (plus an empty one per type not reached), so it has the same budget. It was 40,000 + # until the export of 2026-11-17 joined the device catalog to the projects: three more types + # within reach of a person, 46,700 for the largest (the cap per list is checked in + # test_what_the_descriptions_say_about_the_ranking_is_what_the_server_does). + every, most = list(self.kg.types), [kind for kind, _ in Counter(n.type for n in self.kg.nodes.values()).most_common(3)] + self.assertLess(max(sent(node.iri, type=every, limit=25, max_hops=m.MAX_HOPS) for node in linked[::25]), 60_000) + self.assertLess(max(sent(node.iri, type=most, limit=25, max_hops=m.MAX_HOPS) for node in linked[::25]), 45_000) + + def test_every_shown_id_leads_back_to_its_node(self): + for node in self.kg.nodes.values(): + self.assertIs(self.kg.resolve(node.id), node) + self.assertIs(self.kg.resolve(node.iri) if node.type != m.EXTERNAL else node, node) + self.assertEqual(len({n.id for n in self.kg.nodes.values()}), len(self.kg.nodes)) + + def test_answers_come_out_in_the_same_order_every_time(self): + again = m.GraphSource(str(EXPORT)).current() + for call in (lambda kg: kg.search("behavior", limit=50), lambda kg: kg.neighbors("WG-Analytics", limit=200), + lambda kg: kg.paths("House Mouse", "WG-Devices", limit=10), lambda kg: kg.describe()["edge_types"], + lambda kg: kg.related(["House Mouse", "WG-Devices"], limit=25), + lambda kg: kg.related("WG-Analytics", limit=25)): + self.assertEqual(json.dumps(call(self.kg)), json.dumps(call(again))) + + def test_the_committed_export_is_dated_by_its_commit_not_by_the_checkout(self): + self.assertIn("kg/export/bbqs.ttl", self.kg.snapshot["source"]) + def git(*args): + return subprocess.run(["git", "-C", str(HERE), *args, "--", "export/bbqs.ttl"], + capture_output=True, text=True) + + tracked, committed = git("status", "--porcelain"), git("log", "-1", "--format=%ct").stdout.strip() + if tracked.returncode == 0 and not tracked.stdout.strip() and committed: + self.assertRegex(self.kg.snapshot["committed"], r"^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\dZ$") + self.assertNotIn("file_modified", self.kg.snapshot) + self.assertEqual(self.kg.status()["age_days"], int((time.time() - int(committed)) // 86400)) + else: # re-exported, untracked, or a clone too shallow to hold its commit: the file's own time + self.assertIn("file_modified", self.kg.snapshot) + + +class TheCommitDate(unittest.TestCase): + """The committed export is dated by its commit on every git and every Python. CI failed on + 2026-11-19 with KeyError 'committed': the runner's git 2.56 prints a UTC commit's strict ISO date + as 2026-11-18T16:34:20Z, Python 3.10 cannot parse the Z, and the server fell back to the + checkout's time, which is not the age of the data.""" + + def with_git(self, script): + """Run _committed against a stand-in `git` on PATH that answers as `script` says.""" + folder = tempfile.TemporaryDirectory() + self.addCleanup(folder.cleanup) + fake = Path(folder.name) / "git" + fake.write_text("#!/bin/sh\n" + script, encoding="utf8") + fake.chmod(0o755) + export = Path(folder.name) / "bbqs.ttl" + export.write_text("", encoding="utf8") + with mock.patch.dict(os.environ, {"PATH": folder.name + os.pathsep + os.environ.get("PATH", "")}): + return m._committed(export) + + # What git 2.45+ prints for a commit made in UTC: %cI ends in Z; %ct is the same number everywhere. + NEW_GIT = 'case "$*" in *format=%cI*) echo 2026-11-18T16:34:20Z;; *format=%ct*) echo 1795019660;; esac\n' + OLD_GIT = 'case "$*" in *format=%cI*) echo 2026-11-18T16:34:20+00:00;; *format=%ct*) echo 1795019660;; esac\n' + + def test_a_utc_commit_is_dated_whatever_git_prints_for_its_iso_date(self): + self.assertEqual(self.with_git(self.NEW_GIT), "2026-11-18T16:34:20Z") + self.assertEqual(self.with_git(self.OLD_GIT), "2026-11-18T16:34:20Z") + + def test_a_file_git_does_not_know_or_that_has_changes_has_no_commit_date(self): + self.assertIsNone(self.with_git('case "$*" in *status*) echo " M bbqs.ttl";; *) echo 1795019660;; esac\n')) + self.assertIsNone(self.with_git('case "$*" in *status*) exit 128;; *) echo 1795019660;; esac\n')) + self.assertIsNone(self.with_git('exit 0\n'), "tracked and clean, but no commit holds it (a shallow clone)") + self.assertIsNone(self.with_git('case "$*" in *status*) ;; *) echo not-a-number;; esac\n')) + + +class TheSource(unittest.TestCase): + """Where the graph comes from: it is re-read when it changes, and a failed read never + replaces a good graph with nothing.""" + + def setUp(self): + self.dir = tempfile.TemporaryDirectory() + self.addCleanup(self.dir.cleanup) + self.file = Path(self.dir.name) / "graph.ttl" + self.file.write_text(FIXTURE, encoding="utf8") + + def test_a_file_is_reread_only_when_it_changed(self): + source = m.GraphSource(str(self.file), refresh_hours=1) + first = source.current() + self.assertEqual(first.snapshot["source"], "graph.ttl") # the name, not the place on disk + self.assertIn("file_modified", first.snapshot) + source._due = 0 + self.assertIs(source.current(), first) # unchanged: same graph object + self.file.write_text(FIXTURE + f'\n{_iri(DEE)} bbqs:skills "juggling" .\n', encoding="utf8") + os.utime(self.file, ns=(time.time_ns() + 10 ** 9,) * 2) + self.assertIs(source.current(), first) # not due yet + source._due = 0 + second = source.current() + self.assertIsNot(second, first) + self.assertEqual(second.node(DEE)["properties"]["skills"], "juggling") + + def test_refresh_zero_reads_once(self): + source = m.GraphSource(str(self.file), refresh_hours=0) + first = source.current() + self.file.write_text(FIXTURE + f'\n{_iri(DEE)} bbqs:skills "juggling" .\n', encoding="utf8") + os.utime(self.file, ns=(time.time_ns() + 10 ** 9,) * 2) + self.assertIs(source.current(), first) + + def test_a_broken_reread_keeps_the_graph_already_loaded_and_says_why(self): + source = m.GraphSource(str(self.file)) + first = source.current() + self.file.write_text("this is not turtle {", encoding="utf8") + os.utime(self.file, ns=(time.time_ns() + 10 ** 9,) * 2) + source._due = 0 + self.assertIs(source.current(), first) + self.assertIn("graph.ttl", first.status()["preferred_source_failed"]) + self.assertIn("graph.ttl", first.describe()["snapshot"]["preferred_source_failed"]) + self.assertIs(first.cite()["preferred_source_failed"], True) # and every answer is flagged + self.file.write_text(FIXTURE, encoding="utf8") + os.utime(self.file, ns=(time.time_ns() + 2 * 10 ** 9,) * 2) + source._due = 0 + healed = source.current() + self.assertNotIn("preferred_source_failed", healed.status()) + self.assertNotIn("preferred_source_failed", healed.cite()) + + def test_a_reread_that_lost_most_of_the_graph_is_not_taken(self): + # What a half-reachable database produces: a file that parses, with most of the graph gone. + source = m.GraphSource(str(self.file)) + first = source.current() + self.file.write_text("\n".join(FIXTURE.split("\n\n")[:2]), encoding="utf8") # the six people, nothing else + os.utime(self.file, ns=(time.time_ns() + 10 ** 9,) * 2) + source._due = 0 + self.assertIs(source.current(), first) + self.assertIn("8 nodes, under half of the 23 being served", first.status()["preferred_source_failed"]) + self.assertEqual(m.GraphSource(str(self.file)).current().describe()["nodes"], 8) # fine as a first read + + def test_nothing_to_load_is_an_error_not_an_empty_graph(self): + for bad in ("@prefix x: <urn:x:> .", "not turtle {"): + self.file.write_text(bad, encoding="utf8") + with self.assertRaises(m.KGError) as caught: + m.GraphSource(str(self.file)).current() + self.assertIn("No knowledge graph could be loaded", str(caught.exception)) + with self.assertRaises(m.KGError): + m.GraphSource(str(Path(self.dir.name) / "missing.ttl")).current() + + def test_default_source_is_the_published_copy_then_the_committed_one(self): + self.assertEqual(m.GraphSource().locations, [m.PUBLISHED_EXPORT, str(m.BUNDLED_EXPORT)]) + self.assertTrue(m.PUBLISHED_EXPORT.startswith("https://brain-bbqs.org/")) # never a vendor host + with mock.patch.object(m, "PUBLISHED_EXPORT", "http://127.0.0.1:9/kg/bbqs.ttl"): # nothing listens there + source = m.GraphSource() + kg = source.current() + self.assertIn("kg/export/bbqs.ttl", kg.snapshot["source"]) + self.assertIn("127.0.0.1:9", kg.status()["preferred_source_failed"]) + + def test_a_url_is_fetched_revalidated_and_survives_an_outage(self): + state = {"body": FIXTURE.encode(), "etag": '"v1"', "status": 200, "conditional": 0, "agent": None} + + class Handler(http.server.BaseHTTPRequestHandler): + def do_GET(self): + state["agent"] = self.headers.get("User-Agent") + if state["status"] != 200: + self.send_error(state["status"]) + elif self.headers.get("If-None-Match") == state["etag"]: + state["conditional"] += 1 + self.send_response(304) + self.end_headers() + else: + self.send_response(200) + self.send_header("ETag", state["etag"]) + self.send_header("Last-Modified", "Wed, 21 Oct 2026 07:28:00 GMT") + self.send_header("Content-Length", str(len(state["body"]))) + self.end_headers() + self.wfile.write(state["body"]) + + def log_message(self, *args): + pass + + httpd = http.server.ThreadingHTTPServer(("127.0.0.1", 0), Handler) + threading.Thread(target=httpd.serve_forever, daemon=True).start() + self.addCleanup(httpd.server_close) + self.addCleanup(httpd.shutdown) + url = f"http://127.0.0.1:{httpd.server_port}/kg/bbqs.ttl" + with mock.patch.dict(os.environ, {"NO_PROXY": "127.0.0.1", "no_proxy": "127.0.0.1"}): + source = m.GraphSource(url) + first = source.current() + self.assertEqual(first.snapshot["source"], url) + self.assertEqual(first.snapshot["last_modified"], "2026-10-21T07:28:00Z") + self.assertGreaterEqual(first.status()["age_days"], 0) # worked out, not left to the reader + self.assertEqual(state["agent"], f"bbqs-kg-mcp/{m.__version__}") # names the tool, nobody else + source._due = 0 + self.assertIs(source.current(), first) # 304: nothing re-parsed + self.assertEqual(state["conditional"], 1) + state["status"] = 503 + source._due = 0 + self.assertIs(source.current(), first) # outage: keep serving + self.assertIn("HTTP 503", first.status()["preferred_source_failed"]) + state.update(status=200, etag='"v2"', body=(FIXTURE + f'\n{_iri(DEE)} bbqs:skills "juggling" .\n').encode()) + source._due = 0 + second = source.current() + self.assertIsNot(second, first) + self.assertNotIn("preferred_source_failed", second.status()) + self.assertEqual(second.node(DEE)["properties"]["skills"], "juggling") + fallback = m.GraphSource() + fallback.locations = [f"http://127.0.0.1:{httpd.server_port}/gone", str(self.file)] + state["status"] = 404 + served = fallback.current() + self.assertEqual(served.snapshot["source"], "graph.ttl") + self.assertIn("HTTP 404", served.status()["preferred_source_failed"]) + state["status"] = 200 + fallback._due = 0 + self.assertEqual(fallback.current().snapshot["source"], fallback.locations[0]) # heals when it is back + + +class OnAPublicUrl(unittest.TestCase): + """What running it as a web service needs: a source when the repository is not there, the port + the host gives, and the public name it is reached by.""" + + def test_without_the_repository_it_reads_the_export_committed_to_main(self): + self.assertEqual(m.GraphSource(None, 0).locations, [m.PUBLISHED_EXPORT, str(m.BUNDLED_EXPORT)]) + with mock.patch.object(m, "BUNDLED_EXPORT", Path("/nowhere/export/bbqs.ttl")): + self.assertEqual(m.GraphSource(None, 0).locations, [m.PUBLISHED_EXPORT, m.GITHUB_EXPORT]) + self.assertEqual(m.GITHUB_EXPORT, "https://raw.githubusercontent.com/brain-bbqs/bbqs-app/main/kg/export/bbqs.ttl") + + def test_the_port_and_the_public_names_come_from_the_host_s_environment(self): + with mock.patch.dict(os.environ, {"PORT": "9123", "BBQS_KG_ALLOWED_HOSTS": "neuromcp.brain-bbqs.org, x.run.app"}): + args = m.command_line(["--http"]) + self.assertEqual((args.port, args.allow_host), (9123, ["neuromcp.brain-bbqs.org", "x.run.app"])) + self.assertEqual(m.command_line(["--allow-host", "a.org"]).allow_host, ["a.org"]) # the flag wins + with mock.patch.dict(os.environ, {"PORT": "", "BBQS_KG_ALLOWED_HOSTS": ""}): + self.assertEqual((m.command_line([]).port, m.command_line([]).allow_host, m.command_line([]).host), + (8000, [], "127.0.0.1")) + self.assertIsNone(m.transport_security([])) # the SDK's own rule + settings = m.transport_security(["neuromcp.brain-bbqs.org"]) + self.assertTrue(settings.enable_dns_rebinding_protection) + self.assertIn("neuromcp.brain-bbqs.org", settings.allowed_hosts) + self.assertIn("127.0.0.1:*", settings.allowed_hosts) + self.assertIn("https://neuromcp.brain-bbqs.org", settings.allowed_origins) + + def test_behind_a_proxy_it_answers_its_public_name_and_no_other(self): + folder = tempfile.TemporaryDirectory() + self.addCleanup(folder.cleanup) + graph = Path(folder.name) / "graph.ttl" + graph.write_text(FIXTURE, encoding="utf8") + with socket.socket() as probe: + probe.bind(("127.0.0.1", 0)) + port = probe.getsockname()[1] + log = tempfile.TemporaryFile() + self.addCleanup(log.close) + process = subprocess.Popen([sys.executable, str(SERVER), "--source", str(graph), "--http", "--no-sparql", + "--allow-host", "kg.example.org"], stdout=log, stderr=log, + env={**os.environ, "PORT": str(port)}) + self.addCleanup(lambda: (process.terminate(), process.wait(timeout=20))) + import http.client + + def ask(host, origin=None): + headers = {"Host": host, "Content-Type": "application/json", "Accept": "application/json, text/event-stream"} + if origin: + headers["Origin"] = origin + for _ in range(300): + try: + connection = http.client.HTTPConnection("127.0.0.1", port, timeout=10) + connection.request("POST", "/mcp", json.dumps(_request(1, "tools/list")), headers) + return connection.getresponse().status + except ConnectionRefusedError: + if process.poll() is not None: + log.seek(0) + raise AssertionError(log.read().decode(errors="replace")[-2000:]) from None + time.sleep(0.2) + raise AssertionError("the server did not start") + + self.assertEqual(ask("kg.example.org"), 200) # its public name + self.assertEqual(ask(f"127.0.0.1:{port}"), 200) # and the local one + self.assertEqual(ask("evil.example"), 421) # not another name + self.assertEqual(ask("kg.example.org", origin="https://evil.example"), 403) # nor a page elsewhere + self.assertEqual(ask("kg.example.org", origin="https://kg.example.org"), 200) + + +class Guards(unittest.TestCase): + """Things that must stay true across files, where no reviewer would think to look.""" + + @classmethod + def setUpClass(cls): + tbox = Graph().parse(str(HERE / "bbqs.owl.ttl"), format="turtle") + cls.schema = {str(s)[len(m.SCHEMA_NS):] for s in tbox.subjects() if str(s).startswith(m.SCHEMA_NS)} + cls.server = m.build_server(m.GraphSource(str(EXPORT))) + cls.tools = asyncio.run(cls.server.list_tools()) + + def test_every_schema_term_the_server_names_is_in_the_schema(self): + named = set(m.LABEL_PREDICATES) | set(m.IDENTIFIER_PREDICATES) | set(m.PROJECT_LABEL) | {m.CAREER_LABEL} + for kind, rule in m.FOLDED.items(): + named |= {kind, rule["from"], rule["to"], *rule["attrs"].values()} + self.assertGreater(len(self.schema), 100) + self.assertEqual(sorted(named - self.schema), []) + + def test_the_views_own_names_do_not_shadow_schema_terms(self): + own = {rule["edge"] for rule in m.FOLDED.values()} | {m.EXTERNAL, m.UNRESOLVED, "Untyped"} + self.assertEqual(sorted(own & self.schema), []) + + def test_every_term_a_description_mentions_exists(self): + # What a model reads: a slot named there that the schema has since renamed would send it + # asking for something that is not in the graph. + texts = [m.INSTRUCTIONS, m.NODE, *m.GraphSource(str(EXPORT)).current().describe()["notes"], + *fixture_kg().describe()["notes"]] + known = set(self.schema) | {rule["edge"] for rule in m.FOLDED.values()} | {name for rule in m.FOLDED.values() + for name in rule["attrs"]} + + def keys(value): # every field name in a reply, however deep + if isinstance(value, dict): + return set(value) | {key for inner in value.values() for key in keys(inner)} + return {key for inner in value for key in keys(inner)} if isinstance(value, list) else set() + kg = fixture_kg() # and the fields replies really carry + known |= set().union(*map(keys, (kg.related(ADA), kg.related([ADA, CYD]), kg.paths(ADA, P3), + kg.neighbors(ADA), kg.describe(), kg.node(ADA)))) + for tool in self.tools: + known |= {tool.name, *tool.input_schema["properties"]} + texts += [tool.description, *(p.get("description", "") for p in tool.input_schema["properties"].values())] + mentioned = {word for text in texts for word in re.findall(r"\b[a-z]+(?:_[a-z0-9]+)+\b", text)} + mentioned |= {word for text in texts for word in re.findall(r"\bbbqs:(\w+)", text)} + mentioned |= {word for text in texts for word in re.findall(r"\b(?:[A-Z][a-z]+){2,}\b", text)} + self.assertGreater(len(mentioned), 12) + self.assertEqual(sorted(mentioned - known), []) + + def test_what_the_descriptions_say_about_the_ranking_is_what_the_server_does(self): + # The rule as told to a client, against the rule as coded. The worked example in the words + # of the find_related description and the describe_graph note is built here and run: S is + # linked to M1 and M2, which have 5 neighbours each; T is on both, U on M1 only. + hung = "".join(f'bid:x{i} a bbqs:Dataset ; bbqs:name "X{i}" . bid:m{1 if i < 2 else 2} bbqs:funded bid:x{i} .\n' + for i in range(5)) # two more neighbours for M1, three for M2 + kg = small_kg(hung + """bid:s a bbqs:Species ; bbqs:name "S" . + bid:t a bbqs:Investigator ; bbqs:name "T" . bid:u a bbqs:Investigator ; bbqs:name "U" . + bid:m1 a bbqs:Project ; bbqs:name "M1" ; bbqs:studies bid:s ; bbqs:staffed_by bid:t, bid:u . + bid:m2 a bbqs:Project ; bbqs:name "M2" ; bbqs:studies bid:s ; bbqs:staffed_by bid:t . + bid:m3 a bbqs:Project ; bbqs:name "M3" ; bbqs:staffed_by bid:u .""") + self.assertEqual([len(kg.resolve(name).near) for name in ("M1", "M2")], [5, 5]) + rows = {n["label"]: (n["hops"], n["strength"]) for group in kg.related("S", max_hops=3)["related"] + for n in group["nodes"]} + self.assertEqual((rows["M1"], rows["U"], rows["T"]), ((1, 1), (2, 0.2), (2, 0.4))) + self.assertEqual([n["label"] for n in kg.related("S", type="Project", max_hops=3)["related"][0]["nodes"]], + ["M1", "M2", "M3"]) # nearest first: M3 is three links away + tools = {tool.name: tool for tool in self.tools} + related, paths = tools["find_related"].description, tools["find_paths"].description + note = next(n for n in kg.describe()["notes"] if n.startswith("find_related and find_paths rank by strength")) + for said in (" ".join(related.split()), note): + for phrase in ("splits what it received equally among the nodes it is linked to", "5 neighbours", "0.2", + "0.4", "can pass 1"): + self.assertIn(phrase, said) + self.assertIn("a direct link has strength 1", " ".join(related.split())) + self.assertIn("A direct link is 1", note) + self.assertIn("nearest first and then strongest", " ".join(related.split())) + self.assertIn("Nearest first, then strongest", note) + self.assertIn("its worst tie (the farthest starting node, then the weakest)", " ".join(related.split())) + self.assertIn("strongest first, then longer ones", " ".join(paths.split())) + self.assertIn("split it equally among the nodes it is linked to", " ".join(paths.split())) + said, told = " ".join(related.split()), " ".join(paths.split()) + for phrase in ("only what every one of them reaches is returned", "`through`, the strongest route", + "then by its next worst, and so on", "`per_start`, its tie to each starting node, in place of", + "`link`, holding `also`", "whose order (by name) means nothing", "`count` of them, `listed` on this page", + "`within` counts the nodes within max_hops and `beyond` those farther", + "`splits`, the neighbours it divided among"): + self.assertIn(phrase, said) + for phrase in ("`more` means there are further paths", "`partial` means the search stopped early", + "`shortest` is their length and `listed` the number of paths on this page"): + self.assertIn(phrase, told) + self.assertIn("how exclusive the nodes in between look", note) + cells = " ".join(tools["sparql_query"].description.split()) # how a cell is written, as the benchmark relies on + self.assertIn("a number is a number, a truth value true or false, a date or time ISO text and any other " + "literal its text (NaN and infinity as NaN, INF, -INF)", cells) + self.assertIn("a node of this graph is bid:<id>, and any other IRI prefix:name or <iri>", cells) + for field in ("`through`", "`share`", "`tied`", "`per_start`", "`link`", "`also`", "`routes`"): + self.assertIn(field, related) + for field in ("`routes`", "`strength`", "`more`", "`partial`"): + self.assertIn(field, paths) + # every field the descriptions name is one a reply carries + with mock.patch.object(m, "PATH_STEPS", 0): # a search that runs out at once + gave_up = fixture_kg().paths(ADA, P3) + replies = (kg.related("S", max_hops=3), kg.related(["S", "U"], max_hops=3), kg.paths("S", "U"), + kg.related("S", type="Dataset", limit=1, max_hops=3), # five datasets equally tied: cut + fixture_kg().paths(ADA, P2, limit=1), gave_up, # ADA to P2: two paths, one shown + kg.related("S", avoid_edges="staffed_by", max_hops=1), # a link type left out + fixture_kg().related(DEE), fixture_kg().paths(ADA, DEE)) # nothing to give: a note + sent = {key for reply in replies for key in re.findall(r'"(\w+)":', json.dumps(reply))} + named = set(re.findall(r"`(\w+)`", related + paths)) + self.assertEqual(named - sent - {"also"}, set()) # `also`: only between nodes linked twice + # ...and every field a reply carries is named, but for the plain ones every reply has + plain = {"id", "type", "label", "links", "start", "related", "nodes", "source", "target", "paths", "edge", + "direction", "role", "role_source", "hops", "strength"} + self.assertEqual(sent - named - plain, set()) + self.assertIn("find_related", tools["get_neighbors"].description) # the lister points to the ranker + for tool in ("find_related", "find_paths", "get_neighbors", "get_node"): + self.assertIn(tool, m.INSTRUCTIONS) + # the numbers in the argument descriptions are the numbers applied + schema = tools["find_related"].input_schema["properties"] + signature = inspect.signature(m.KG.related).parameters + self.assertEqual((schema["limit"]["default"], schema["max_hops"]["default"], schema["offset"]["default"]), + (signature["limit"].default, signature["max_hops"].default, signature["offset"].default)) + self.assertEqual((schema["limit"]["default"], schema["max_hops"]["default"]), (5, 4)) + self.assertIn("1-25 (1-10 when no type, or more than three, are named)", schema["limit"]["description"]) + self.assertIn(f"1-{m.MAX_HOPS}", schema["max_hops"]["description"]) + self.assertIn(f"up to {m.MAX_SEEDS}", schema["nodes"]["description"]) + path_schema = tools["find_paths"].input_schema["properties"] + path_signature = inspect.signature(m.KG.paths).parameters + self.assertEqual({name: path_schema[name]["default"] for name in ("max_hops", "limit", "offset")}, + {name: path_signature[name].default for name in ("max_hops", "limit", "offset")}) + self.assertEqual(tuple(path_schema[name]["default"] for name in ("max_hops", "limit", "offset")), (6, 5, 0)) + self.assertIn("1-25", path_schema["limit"]["description"]) + self.assertIn(f"1-{m.MAX_HOPS}", path_schema["max_hops"]["description"]) + self.assertIn(f"1-{m.MAX_DEPTH}", tools["get_neighbors"].input_schema["properties"]["depth"]["description"]) + # ...and the caps are the ones applied: 25 with up to three types named, 10 with more or none + big = fixture_kg() + many = sorted({n.type for n in big.nodes.values() if n.type != "Investigator"})[:4] + for kinds, cap in ((None, 10), (["Investigator"], 25), (many[:3], 25), (many, 10)): + with mock.patch.object(m, "_page", wraps=m._page) as paged: + big.related(ADA, type=kinds, limit=25) + self.assertEqual(paged.call_args_list[0].args[:2], (25, cap), kinds) + + METHODS = {"describe_graph": "describe", "search_nodes": "search", "get_node": "node", "get_neighbors": "neighbors", + "find_related": "related", "find_paths": "paths", "sparql_query": "sparql"} + + def test_every_default_a_tool_states_is_the_one_its_method_applies(self): + for tool in self.tools: + method = inspect.signature(getattr(m.KG, self.METHODS[tool.name])).parameters + argued = list(tool.input_schema["properties"].items()) + taken = [p for name, p in method.items() if name != "self"][:len(argued)] + self.assertEqual(len(taken), len(argued), tool.name) + for (name, schema), parameter in zip(argued, taken): # passed on in this order + if "default" in schema and parameter.default is not inspect.Parameter.empty: + self.assertEqual(schema["default"], parameter.default, (tool.name, name)) + + def test_every_argument_reaches_the_graph(self): + # Each tool called with its arguments set away from their defaults, against the method it calls, + # on the very graph the server holds. Each argument set is also shown to matter: resetting it + # alone changes the answer. Between them the calls set every argument of every tool. (Naming + # `edge` already walks through hubs, so get_neighbors needs two calls; find_paths two as well, + # because max_hops only shows on a page that reaches past the shortest paths.) + source = m.GraphSource(str(EXPORT), 0) + server, kg = m.build_server(source), source.current() + calls = [ + ("search_nodes", kg.search, {"query": "behavior", "type": ["Investigator", "Publication"], "where": None, + "limit": 2, "offset": 1}), + ("search_nodes", kg.search, {"query": "", "type": None, "where": {"mechanism": "R34"}, "limit": 2, "offset": 1}), + ("get_node", kg.node, {"node": "WG-Analytics", "edge_limit": 3}), + ("get_neighbors", kg.neighbors, {"node": "R34DA059723", "edge": ["has_role", "studies_species"], "direction": "out", + "type": None, "depth": 1, "limit": 50, "offset": 0, "through_hubs": False}), + ("get_neighbors", kg.neighbors, {"node": "00618660", "edge": None, "direction": "both", "type": "Investigator", + "depth": 2, "limit": 2, "offset": 1, "through_hubs": True}), + ("find_related", kg.related, {"nodes": "House Mouse", "type": "Investigator", "limit": 2, "offset": 1, + "avoid_edges": "member_of_group", "max_hops": 3}), + ("find_paths", kg.paths, {"source_node": "R34DA059723", "target_node": "WG-Analytics", "max_hops": 3, "limit": 5, + "avoid_edges": "members", "offset": 0}), + ("find_paths", kg.paths, {"source_node": "R34DA059723", "target_node": "WG-Analytics", "max_hops": 6, "limit": 2, + "avoid_edges": None, "offset": 1}), + ("sparql_query", kg.sparql, {"query": "SELECT ?s WHERE { ?s a bbqs:Investigator } ORDER BY ?s", "limit": 2}), + ("describe_graph", kg.describe, {"type": "Investigator"}), + ] + defaults = {tool.name: {name: p.get("default") for name, p in tool.input_schema["properties"].items()} + for tool in self.tools} + named = ("node", "nodes", "query", "source_node", "target_node") + + def plain(reply): + return json.loads(json.dumps({k: v for k, v in reply.items() if k != "snapshot"}, default=str)) + + exercised = set() + for tool, method, arguments in calls: + self.assertEqual(list(arguments), list(defaults[tool]), tool) # every argument, in the tool's order + result = asyncio.run(server.call_tool(tool, arguments)) + text = "".join(block.text for block in result.content) + self.assertFalse(result.is_error, (tool, text)) + answer = plain(method(*arguments.values())) + self.assertEqual(plain(json.loads(text)), answer, tool) + for name, value in arguments.items(): + if name in named or value == defaults[tool][name]: + continue + try: + without = plain(method(*{**arguments, name: defaults[tool][name]}.values())) + except m.KGError: + without = "refused" # without it the question cannot be asked + self.assertNotEqual(without, answer, (tool, name)) + exercised.add((tool, name)) + self.assertEqual({(tool, name) for tool, values in defaults.items() for name in values if name not in named} + - exercised, set()) + + def test_every_tool_is_declared_read_only(self): + self.assertEqual(sorted(t.name for t in self.tools), + ["describe_graph", "find_paths", "find_related", "get_neighbors", "get_node", "search_nodes", + "sparql_query"]) + for tool in self.tools: + self.assertTrue(tool.annotations.read_only_hint, tool.name) + self.assertFalse(tool.annotations.destructive_hint, tool.name) + self.assertFalse(tool.annotations.open_world_hint, tool.name) + self.assertGreater(len(tool.description), 60, tool.name) + bare = m.build_server(m.GraphSource(str(EXPORT)), sparql=False) + offered = asyncio.run(bare.list_tools()) + self.assertNotIn("sparql_query", [t.name for t in offered]) + # ...and nothing a client reads sends it there + told = [bare.instructions, *(t.description for t in offered), + *m.GraphSource(str(EXPORT)).current().describe(sparql=False)["notes"]] + self.assertEqual([text[:80] for text in told if re.search(r"sparql", text, re.I)], []) + self.assertIn("search_nodes gives the total", bare.instructions) + self.assertEqual(self.server.instructions, m.INSTRUCTIONS) + self.assertIn("writing SPARQL", next(t.description for t in self.tools if t.name == "describe_graph")) + + def test_the_pins_agree_everywhere_they_are_written(self): + header = re.search(r"^# dependencies = (\[.*\])$", SERVER.read_text(encoding="utf8"), re.M) + inline = set(json.loads(header.group(1))) + pins = lambda name: {line.strip() for line in (HERE / name).read_text(encoding="utf8").splitlines() # noqa: E731 + if re.match(r"^[A-Za-z0-9_.-]+==", line.strip())} + self.assertEqual(inline, pins("requirements-mcp.txt")) + self.assertEqual({p for p in inline if p.startswith("rdflib==")}, + {p for p in pins("requirements.txt") if p.startswith("rdflib==")}) + self.assertEqual({p.split("==")[0] for p in inline}, {"mcp", "rdflib"}) + header = re.search(r"^# dependencies = (\[.*\])$", (HERE / "bench_mcp_server.py").read_text(encoding="utf8"), re.M) + self.assertEqual(set(json.loads(header.group(1))), # the benchmark: the server's two, and the YAML reader + inline | {p for p in pins("requirements.txt") if p.startswith("PyYAML==")}) + + +# ---- the protocol, as a client sees it ------------------------------------------------------------ + +def _request(number: int, method: str, params: dict | None = None) -> dict: + return {"jsonrpc": "2.0", "id": number, "method": method, "params": params or {}} + + +INITIALIZE = {"protocolVersion": "2025-06-18", "capabilities": {}, "clientInfo": {"name": "kg-tests", "version": "0"}} + + +class Stdio: + """A raw JSON-RPC client on the server's stdin/stdout: no SDK on this side, so what passes + here is what any MCP client would see.""" + + def __init__(self, *args: str): + self.log = tempfile.TemporaryFile() + self.process = subprocess.Popen([sys.executable, str(SERVER), *args], stdin=subprocess.PIPE, + stdout=subprocess.PIPE, stderr=self.log, text=True, encoding="utf-8") + self.lines: queue.Queue = queue.Queue() + threading.Thread(target=lambda: [self.lines.put(line) for line in self.process.stdout], daemon=True).start() + self.number = 0 + + def send(self, message: dict): + self.process.stdin.write(json.dumps(message) + "\n") + self.process.stdin.flush() + + def ask(self, method: str, params: dict | None = None) -> dict: + self.number += 1 + self.send(_request(self.number, method, params)) + while True: + try: + reply = json.loads(self.lines.get(timeout=60)) + except queue.Empty: + self.log.seek(0) + said = self.log.read().decode(errors="replace")[-2000:] + raise AssertionError(f"no reply to {method}; server said: {said}") + if reply.get("id") == self.number: + return reply + + def call(self, tool: str, **arguments): + result = self.ask("tools/call", {"name": tool, "arguments": arguments})["result"] + text = "".join(block["text"] for block in result["content"] if block["type"] == "text") + return bool(result.get("isError")), text + + def close(self) -> str: + self.process.stdin.close() + self.process.wait(timeout=20) + self.process.stdout.close() + self.log.seek(0) + said = self.log.read().decode(errors="replace") + self.log.close() + return said + + +class OverStdio(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.dir = tempfile.TemporaryDirectory() + cls.fixture = Path(cls.dir.name) / "graph.ttl" + cls.fixture.write_text(FIXTURE, encoding="utf8") + cls.client = Stdio("--source", str(cls.fixture)) + cls.hello = cls.client.ask("initialize", INITIALIZE)["result"] + cls.client.send({"jsonrpc": "2.0", "method": "notifications/initialized"}) + + @classmethod + def tearDownClass(cls): + said = cls.client.close() + cls.dir.cleanup() + assert cls.client.process.returncode == 0, said[-2000:] + assert "23 nodes, 23 links" in said, said[-2000:] # the startup line went to stderr, not the protocol + + def test_it_introduces_itself(self): + self.assertEqual(self.hello["serverInfo"]["name"], "bbqs-kg") + self.assertEqual(self.hello["serverInfo"]["version"], m.__version__) + self.assertIn("describe_graph first", self.hello["instructions"]) + self.assertIn("tools", self.hello["capabilities"]) + + def test_it_lists_seven_read_only_tools_with_schemas(self): + tools = self.client.ask("tools/list")["result"]["tools"] + self.assertEqual(sorted(t["name"] for t in tools), + ["describe_graph", "find_paths", "find_related", "get_neighbors", "get_node", "search_nodes", + "sparql_query"]) + for tool in tools: + self.assertIs(tool["annotations"]["readOnlyHint"], True, tool["name"]) + self.assertEqual(tool["inputSchema"]["type"], "object") + self.assertNotIn("outputSchema", tool) # answers are text; nothing is sent twice + paths = next(t for t in tools if t["name"] == "find_paths")["inputSchema"] + self.assertEqual(sorted(paths["required"]), ["source_node", "target_node"]) + self.assertIn("description", paths["properties"]["avoid_edges"]) + related = next(t for t in tools if t["name"] == "find_related")["inputSchema"] + self.assertEqual(related["required"], ["nodes"]) + self.assertEqual(sorted(related["properties"]), ["avoid_edges", "limit", "max_hops", "nodes", "offset", "type"]) + self.assertIn("offset", paths["properties"]) + + def test_every_tool_answers_in_compact_json(self): + failed, text = self.client.call("describe_graph") + self.assertFalse(failed) + self.assertNotIn("\n", text) + self.assertNotIn('": ', text) + described = json.loads(text) + self.assertEqual((described["nodes"], described["snapshot"]["source"]), (23, "graph.ttl")) + + _, text = self.client.call("search_nodes", query="mouse", limit=1) + self.assertEqual(json.loads(text)["results"][0]["id"], MOUSE) + _, text = self.client.call("get_node", node="R34DA000001") + self.assertEqual(json.loads(text)["properties"]["mechanism"], "R34") + _, text = self.client.call("get_neighbors", node="House Mouse", depth=2, type="Investigator") + self.assertEqual(ids(json.loads(text)["nodes"]), [ADA, BOB]) + _, text = self.client.call("find_paths", source_node="Ada Lovelace", target_node="Fish at scale", + avoid_edges=["member_of_group"]) + self.assertEqual(json.loads(text)["paths"][0]["nodes"], [ADA, P1, BOB, P2, PUB2]) + _, text = self.client.call("find_related", nodes=["Ada Lovelace", "Cyd Charisse"], type="Investigator") + self.assertIn('"hops":2,"strength":0.6667,"per_start":[{"start":"11111111","hops":2,"strength":0.6667,"routes":2},', text) + people = json.loads(text)["related"][0] + self.assertEqual(([(n["id"], n["strength"]) for n in people["nodes"]], people["beyond"]), ([(BOB, 0.6667)], 1)) + _, text = self.client.call("find_related", nodes=["Ada Lovelace", "Cyd Charisse"], type="Investigator", max_hops=5) + self.assertEqual(ids(json.loads(text)["related"][0]["nodes"]), [BOB, TWIN1]) + _, text = self.client.call("find_related", nodes="Ada Lovelace", type="Project", limit=1) + self.assertIn('"hops":1,"strength":1,"link":{"edge":"has_role"', text) # a whole number goes out as one + _, text = self.client.call("find_related", nodes="House Mouse", type="Investigator", limit=1) + self.assertEqual(json.loads(text)["related"][0]["tied"], + {"hops": 2, "strength": 0.1667, "count": 2, "listed": 1}) + _, text = self.client.call("sparql_query", query="SELECT (COUNT(?p) AS ?n) WHERE { ?p a bbqs:Project }") + counted = json.loads(text) + self.assertEqual((counted["columns"], counted["rows"]), (["n"], [[3]])) + _, text = self.client.call("describe_graph", type="Species") + self.assertEqual(json.loads(text)["properties"][0], {"property": "common_name", "filled": 2, "values": + {"House Mouse": 1, "Zebrafish": 1}}) + self.assertIn("Müller", self.client.call("search_nodes", query="muller")[1]) # not \\u-escaped + + def test_every_answer_says_which_graph_it_came_from_and_is_otherwise_untouched(self): + # What the client receives is what the graph layer answered, plus the stamp: nothing renamed, + # dropped or overwritten on the way out. (The stamp was once called `source` and replaced + # find_paths' own `source`, the node the path starts from.) + kg = fixture_kg() + calls = [("search_nodes", {"query": "mouse"}, kg.search("mouse")), + ("get_node", {"node": ADA}, kg.node(ADA)), + ("get_neighbors", {"node": ADA, "depth": 2}, kg.neighbors(ADA, depth=2)), + ("find_paths", {"source_node": ADA, "target_node": CYD}, kg.paths(ADA, CYD)), + ("find_related", {"nodes": ADA}, kg.related(ADA)), + ("find_related", {"nodes": [ADA, CYD], "type": "Project", "avoid_edges": "member_of_group"}, + kg.related([ADA, CYD], type="Project", avoid_edges="member_of_group")), + ("sparql_query", {"query": "SELECT ?s WHERE { ?s a bbqs:Species }"}, + kg.sparql("SELECT ?s WHERE { ?s a bbqs:Species }")), + ("sparql_query", {"query": "ASK { ?s ?p ?o }"}, {"answer": True})] + for tool, arguments, expected in calls: + answer = json.loads(self.client.call(tool, **arguments)[1]) + came_from = answer.pop("snapshot") + self.assertEqual(answer, json.loads(json.dumps(expected)), tool) + self.assertEqual(came_from["graph"], "graph.ttl", tool) + self.assertRegex(came_from["dated"], r"^\d{4}-\d\d-\d\d$", tool) + self.assertEqual(came_from["age_days"], 0, tool) + self.assertNotIn("preferred_source_failed", came_from, tool) + described = json.loads(self.client.call("describe_graph")[1]) + self.assertEqual(described["snapshot"]["source"], "graph.ttl") + described["snapshot"].pop("loaded_at") + expected = kg.describe() + expected["snapshot"] = {k: v for k, v in described["snapshot"].items()} + self.assertEqual(described, json.loads(json.dumps(expected))) + self.assertEqual(json.loads(self.client.call("describe_graph", type="Project")[1]), + json.loads(json.dumps(kg.describe(type="Project")))) + + def test_arguments_arrive_however_the_client_serialised_them(self): + _, as_string = self.client.call("search_nodes", type="Project", where='{"mechanism": "R61"}') + _, as_object = self.client.call("search_nodes", type=["Project"], where={"mechanism": "R61"}) + self.assertEqual(ids(json.loads(as_string)["results"]), [P2]) + self.assertEqual(json.loads(as_string), json.loads(as_object)) + _, comma = self.client.call("get_neighbors", node=ADA, edge="has_role, member_of_group") + self.assertEqual(json.loads(comma)["total"], 2) + _, as_list = self.client.call("find_related", nodes=[ADA, CYD], type=["Investigator"]) + for shape in (f"{ADA}, {CYD}", json.dumps([ADA, CYD]), f"['{ADA}', '{CYD}']"): + _, as_text = self.client.call("find_related", nodes=shape, type="Investigator") + self.assertEqual(json.loads(as_text), json.loads(as_list), shape) + # the next page is asked for over the wire too, in both tools + kg = fixture_kg() + _, paged = self.client.call("find_related", nodes="House Mouse", type="Project", limit=1, offset=1, max_hops=8) + self.assertEqual(ids(json.loads(paged)["related"][0]["nodes"]), [P3]) + self.assertEqual({k: v for k, v in json.loads(paged).items() if k != "snapshot"}, + json.loads(json.dumps(kg.related(MOUSE, type="Project", limit=1, offset=1, max_hops=8)))) + _, paged = self.client.call("find_paths", source_node=ADA, target_node=CYD, limit=2, offset=2) + self.assertEqual([p["nodes"] for p in json.loads(paged)["paths"]], [[ADA, P1, BOB, WGA, CYD], [ADA, P1, BOB, P2, CYD]]) + + def test_an_argument_the_tool_does_not_take_is_refused_not_dropped(self): + for tool in self.client.ask("tools/list")["result"]["tools"]: + self.assertIs(tool["inputSchema"].get("additionalProperties"), False, tool["name"]) + for tool, arguments in (("find_related", {"nodes": ADA, "max_hop": 1}), ("find_paths", {"source_node": ADA, + "target_node": BOB, "depth": 2}), ("get_node", {"node": ADA, "limit": 3})): + failed, text = self.client.call(tool, **arguments) + self.assertTrue(failed, tool) + self.assertIn("Extra inputs are not permitted", text) + self.assertIn(next(name for name in arguments if name not in ("nodes", "source_node", "target_node", "node")), + text) + failed, _ = self.client.call("find_related", nodes=ADA, max_hops=1) # spelt right, it answers + self.assertFalse(failed) + + def test_a_mistake_comes_back_as_an_error_the_model_can_act_on(self): + failed, text = self.client.call("get_node", node="nobody at all") + self.assertTrue(failed) + self.assertIn("No node matches 'nobody at all'", text) + self.assertIn("search_nodes", text) + failed, text = self.client.call("sparql_query", query="DELETE WHERE { ?s ?p ?o }") + self.assertTrue(failed) + self.assertIn("Only SPARQL SELECT and ASK", text) + failed, text = self.client.call("get_neighbors", node=ADA, direction="sideways") + self.assertTrue(failed) + self.assertIn("direction", text) + failed, text = self.client.call("find_paths", source_node=ADA) + self.assertTrue(failed) + self.assertIn("target_node", text) + failed, text = self.client.call("find_related", nodes=[ADA, "nobody at all"]) + self.assertTrue(failed) + self.assertIn("No node matches 'nobody at all'", text) + failed, text = self.client.call("find_related", nodes="Ada Lovelace, Sam Twin") + self.assertTrue(failed) + self.assertIn("Read as 2 nodes. 'Sam Twin' names 2 nodes", text) + failed, text = self.client.call("find_related", nodes=ADA, max_hops=99) + self.assertTrue(failed) + self.assertIn("max_hops must be between 1 and 8", text) + _, text = self.client.call("describe_graph") + self.assertEqual(json.loads(text)["links"], 23) # and it is still serving the same graph + + def test_there_is_nothing_to_call_that_writes(self): + for name in ("add_node", "update_node", "delete_node", "kg_query", "onboard_member"): + reply = self.client.ask("tools/call", {"name": name, "arguments": {}}) + refused = "error" in reply or reply["result"].get("isError") + self.assertTrue(refused, name) + + +class OverHttp(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.dir = tempfile.TemporaryDirectory() + fixture = Path(cls.dir.name) / "graph.ttl" + fixture.write_text(FIXTURE, encoding="utf8") + with socket.socket() as probe: + probe.bind(("127.0.0.1", 0)) + cls.port = probe.getsockname()[1] + cls.log = tempfile.TemporaryFile() + cls.process = subprocess.Popen([sys.executable, str(SERVER), "--source", str(fixture), "--http", "--port", + str(cls.port), "--no-sparql"], stdout=cls.log, stderr=cls.log) + cls.opener = urllib.request.build_opener(urllib.request.ProxyHandler({})) # straight to localhost + deadline = time.monotonic() + 60 + while True: + try: + cls.health = json.load(cls.opener.open(f"http://127.0.0.1:{cls.port}/health", timeout=5)) + break + except (urllib.error.URLError, ConnectionError): + if cls.process.poll() is not None or time.monotonic() > deadline: + cls.log.seek(0) + raise AssertionError("HTTP server did not start: " + cls.log.read().decode(errors="replace")[-2000:]) + time.sleep(0.2) + + @classmethod + def tearDownClass(cls): + cls.process.terminate() + cls.process.wait(timeout=20) + cls.log.close() + cls.dir.cleanup() + + def post(self, message: dict) -> dict: + request = urllib.request.Request( + f"http://127.0.0.1:{self.port}/mcp", data=json.dumps(message).encode(), method="POST", + headers={"Content-Type": "application/json", "Accept": "application/json, text/event-stream"}) + with self.opener.open(request, timeout=30) as response: + self.assertEqual(response.headers.get_content_type(), "application/json") + return json.load(response) + + def test_health_says_what_is_being_served(self): + self.assertEqual((self.health["name"], self.health["nodes"], self.health["mcp_endpoint"]), + ("bbqs-kg", 23, "/mcp")) + self.assertEqual(self.health["snapshot"]["source"], "graph.ttl") + + def test_a_client_can_initialize_list_and_call_over_plain_posts(self): + hello = self.post(_request(1, "initialize", INITIALIZE))["result"] + self.assertEqual(hello["serverInfo"]["name"], "bbqs-kg") + tools = self.post(_request(2, "tools/list"))["result"]["tools"] + self.assertEqual(sorted(t["name"] for t in tools), + ["describe_graph", "find_paths", "find_related", "get_neighbors", "get_node", + "search_nodes"]) # --no-sparql + reply = self.post(_request(3, "tools/call", {"name": "find_paths", "arguments": { + "source_node": "House Mouse", "target_node": "Zebrafish"}}))["result"] + self.assertEqual(json.loads(reply["content"][0]["text"])["paths"][0]["nodes"], [MOUSE, P1, BOB, P2, ZEBRA]) + reply = self.post(_request(4, "tools/call", {"name": "find_related", "arguments": { + "nodes": "House Mouse", "type": "Species"}}))["result"] + self.assertEqual([(n["id"], n["hops"]) for n in json.loads(reply["content"][0]["text"])["related"][0]["nodes"]], + [(ZEBRA, 4)]) + refused = self.post(_request(5, "tools/call", {"name": "sparql_query", "arguments": {"query": "ASK {}"}})) + self.assertTrue("error" in refused or refused["result"].get("isError")) + + +# A whole graph in miniature in which EVERY competency question has an answer, those the committed +# export has no rows for included (a job's kind and poster, a provenance record), so that each +# question's walk through the graph tools is checked against rows. +PREFIXES = """ +@prefix bbqs: <https://brain-bbqs.org/schema#> . +@prefix bid: <https://brain-bbqs.org/id/> . +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . +""" + +# A consortium in miniature, complete enough that every one of the 42 questions has rows. +MINIATURE = PREFIXES + """ +bid:p1 a bbqs:Project ; bbqs:name "R34DA059723" ; bbqs:grant_number "R34DA059723" ; bbqs:mechanism "R34" ; + bbqs:award_amount 100 ; bbqs:title "Mouse project" ; bbqs:studies_species bid:mouse ; bbqs:part_of_org bid:org1 ; + bbqs:produced bid:pub1, bid:ds2, bid:tool1, bid:model1 ; bbqs:funded_datasets bid:ds1 ; + bbqs:uses_device_category bid:cat1 . +bid:p2 a bbqs:Project ; bbqs:name "U01DA000002" ; bbqs:grant_number "U01DA000002" ; bbqs:mechanism "U01" ; + bbqs:award_amount 250 ; bbqs:study_scope "All Species" ; bbqs:studies_species_unresolved "zebra finch" ; + bbqs:funded_datasets bid:ds3 . +bid:p3 a bbqs:Project ; bbqs:name "R34DA000003" ; bbqs:grant_number "R34DA000003" ; bbqs:mechanism "R34" ; + bbqs:award_amount 50 ; bbqs:studies_species bid:rat ; bbqs:produced bid:ds4 . +bid:r1 a bbqs:ProjectRole ; bbqs:held_by bid:ann ; bbqs:on_project bid:p1 ; bbqs:project_role "contact_pi" . +bid:r2 a bbqs:ProjectRole ; bbqs:held_by bid:bo ; bbqs:on_project bid:p1 ; bbqs:project_role "co_pi" . +bid:r3 a bbqs:ProjectRole ; bbqs:held_by bid:ann ; bbqs:on_project bid:p3 ; bbqs:project_role "co_pi" . +bid:ann a bbqs:Investigator ; bbqs:name "Ann A" ; bbqs:orcid <https://orcid.org/0000-0001-0000-0001> ; + bbqs:member_of_group bid:wgd . +bid:bo a bbqs:Investigator ; bbqs:name "Bo B" ; bbqs:member_of_group bid:wgd . +bid:cy a bbqs:Investigator ; bbqs:name "Cy C" ; bbqs:member_of_group bid:wga . +bid:org1 a bbqs:ResearchOrganization ; bbqs:name "TEST UNIVERSITY" ; bbqs:members bid:ann, bid:bo . +bid:org2 a bbqs:ResearchOrganization ; bbqs:name "EMPTY INSTITUTE" . +bid:wgd a bbqs:WorkingGroup ; bbqs:name "WG-Devices" . +bid:wga a bbqs:WorkingGroup ; bbqs:name "WG-Analysis" . +bid:mouse a bbqs:Species ; bbqs:name "Mus musculus" ; bbqs:common_name "House Mouse" ; bbqs:taxonomy_class "Mammalia" . +bid:rat a bbqs:Species ; bbqs:name "Rattus norvegicus" ; bbqs:common_name "Brown Rat" ; bbqs:taxonomy_class "Mammalia" . +bid:pub1 a bbqs:Publication ; bbqs:name "Paper 2025" ; bbqs:title "A paper" . +bid:ds1 a bbqs:Dataset ; bbqs:name "Dataset one" . +bid:ds2 a bbqs:Dataset ; bbqs:name "Dataset two" . +bid:ds3 a bbqs:Dataset ; bbqs:name "Dataset three" . +bid:ds4 a bbqs:Dataset ; bbqs:name "Dataset four" . +bid:cat1 a bbqs:DeviceCategory ; bbqs:name "Microscopes" ; bbqs:label "Microscopes" . +bid:dev1 a bbqs:Device ; bbqs:name "Scope One" ; bbqs:model_name "Scope One" ; bbqs:manufacturer bid:man1 ; + bbqs:device_category bid:cat1 . +bid:dev2 a bbqs:Device ; bbqs:name "Scope Two" ; bbqs:model_name "Scope Two" ; bbqs:manufacturer bid:man1 . +bid:man1 a bbqs:DeviceManufacturer ; bbqs:name "Lens Co" . +bid:tool1 a bbqs:SoftwareTool ; bbqs:name "Tracker" ; bbqs:repo_url "https://github.com/example/tracker"^^xsd:anyURI . +bid:model1 a bbqs:MLModel ; bbqs:name "Pose net" ; bbqs:evaluated_by bid:bench1 . +bid:bench1 a bbqs:Benchmark ; bbqs:name "Pose bench" ; bbqs:evaluates bid:model1 . +bid:fo1 a bbqs:FundingOpportunity ; bbqs:name "Open call" ; bbqs:expiration_date "2027-01-15"^^xsd:date . +bid:fo2 a bbqs:FundingOpportunity ; bbqs:name "Closed call" ; bbqs:expiration_date "2026-01-15"^^xsd:date . +bid:job1 a bbqs:Job ; bbqs:name "Postdoc" ; bbqs:part_of_org bid:org1 ; bbqs:job_type "postdoc" ; + bbqs:posted_by bid:ann . +bid:job2 a bbqs:Job ; bbqs:name "Technician" ; bbqs:job_institution "OTHER COLLEGE" ; bbqs:job_type "staff" ; + bbqs:posted_by bid:bo . +bid:src1 a bbqs:SourceClass ; bbqs:name "RePORTER" ; bbqs:grade 2 . +bid:src2 a bbqs:SourceClass ; bbqs:name "Self-report" ; bbqs:grade 4 . +bid:prov1 a bbqs:ProvenanceRecord ; bbqs:prov_entity_id "p1" ; bbqs:prov_entity_table "grants" ; + bbqs:prov_entity_column "title" ; bbqs:prov_value_text "Mouse project" ; bbqs:prov_source_class bid:src1 . +bid:prov2 a bbqs:ProvenanceRecord ; bbqs:prov_entity_id "p1" ; bbqs:prov_entity_column "mechanism" ; + bbqs:prov_value_text "R34" ; bbqs:prov_source_class bid:src1 . +bid:prov3 a bbqs:ProvenanceRecord ; bbqs:prov_entity_id "ds4" ; bbqs:prov_entity_table "datasets" ; + bbqs:prov_entity_column "name" ; bbqs:prov_value_text "Dataset four" ; bbqs:prov_source_class bid:src2 . +""" +# How many rows each question has on it, worked out by hand from the graph above. For instance CQ23 +# (who is in each group, and on which projects): Ann on two projects and Bo on one in WG-Devices, +# and Cy, on none, in WG-Analysis: 4. CQ31 (benchmarks per model): the one tie is recorded from both +# ends, so 2. CQ40 (values from a source graded below 3): two records from the grade-2 source, with +# and without a table; the third record's source is graded 4: 2. CQ35 (jobs per institution): the +# postdoc at TEST UNIVERSITY, through its organization, and the technician at OTHER COLLEGE, which +# no organization node stands for, so it is named as written: 2. +MINIATURE_ROWS = {"CQ01": 3, "CQ02": 2, "CQ03": 1, "CQ04": 2, "CQ05": 1, "CQ06": 2, "CQ07": 1, "CQ08": 2, "CQ09": 1, + "CQ10": 2, "CQ11": 1, "CQ12": 1, "CQ13": 4, "CQ14": 1, "CQ15": 2, "CQ16": 1, "CQ17": 1, "CQ18": 2, + "CQ19": 1, "CQ20": 1, "CQ21": 2, "CQ22": 2, "CQ23": 4, "CQ24": 1, "CQ25": 2, "CQ26": 2, "CQ27": 1, + "CQ28": 3, "CQ29": 2, "CQ30": 1, "CQ31": 2, "CQ32": 2, "CQ33": 1, "CQ34": 1, "CQ35": 2, "CQ36": 2, + "CQ37": 2, "CQ38": 1, "CQ39": 1, "CQ40": 2, "CQ41": 3, "CQ42": 1} + +# Shapes an export could take and today's does not, each of which once gave a walk the wrong rows +# (found by asking all the questions of several hundred random graphs): +# - ids that links point at and nothing describes: gone1, gone3, gone4, gone5, nobody2, nocat (one +# node points at each, so it is only a value) and gone2, nobody1, nosource (several do, so the +# server also makes a node of it, and it must not be counted twice) +# - a provenance record that names no source (v5), so says nothing of where d2 came from +# - the same two nodes linked twice: a dataset q1 both funded and produced; Ann on q1 in two roles +# - a property given twice (Ann's name, q2's grant number, a job's title, a source's grade), or +# not at all (Cy's name, Bo's role, q3's grant number: it only carries q1's as its name) +# - two things answering to one name: two species called "House Mouse" (and one "house mouse", +# which is not the same text), two groups called WG-Devices, two species called "Mus spretus" +# that one project studies, two jobs called Technician at one institution +# - a project that carries R34DA059723 only as its name (q3), with a person on it; so Bo is on +# two projects of which one has no grant number +# - award amounts with cents: SPARQL adds them as decimals (300.30) and a walk as floats +# (300.29999999999995), so they agree only to 12 significant digits +# - two links between a project and its organization, the one asked for sorting second (q1) +# - one person on two projects that share a grant number (Ann on q2 and q6), a person on a +# project with a paper and no grant number (Bo on q3), and a role written in capitals (MPI) +# - an ORCID iD that is itself described (so a node, not a value), and a device category whose +# address is not one of this graph's ids (bbqs:Microscope) +# - a repository and an institution that are nodes of the graph, not text (tool9, j5) +# - a job tied to its organization and naming an institution too (j6), tied to two (j7), or tied to +# an id nothing describes that two jobs point at (j8, j9): the text is read only with no tie +# - a job posted by a person with two names (j6), and by one with a name and one with none (j7); +# posted by a name (j1), by an id nothing describes (j2), or by one the server made a node of (j3) +# - dates on the first and last day of CQ39's window, on the day either side, and on CQ17's day +AWKWARD = PREFIXES + """ +bid:q1 a bbqs:Project ; bbqs:grant_number "R34DA059723" ; bbqs:title "First" ; bbqs:mechanism "R34" ; + bbqs:award_amount 100.10 ; bbqs:hosted_at bid:o1 ; bbqs:part_of_org bid:o1 ; + bbqs:funded_datasets bid:d1, bid:gone1, bid:gone2 ; bbqs:produced bid:d1 ; bbqs:studies_species bid:m1, bid:m2 . +bid:q2 a bbqs:Project ; bbqs:grant_number "U01DA000002", "U01DA000002-S1" ; bbqs:funded_datasets bid:gone2 ; + bbqs:mechanism "R34" ; + bbqs:produced bid:gone3 ; bbqs:studies_species bid:gone4 ; bbqs:studies_species_unresolved "marmoset" . +bid:q3 a bbqs:Project ; bbqs:name "R34DA059723" ; bbqs:produced bid:net, bid:d2, bid:pub9 . +bid:q6 a bbqs:Project ; bbqs:grant_number "U01DA000002" . +bid:pub9 a bbqs:Publication ; bbqs:name "Q3 paper" . +bid:q4 a bbqs:Project ; bbqs:grant_number "R61DA000005" ; bbqs:studies_species bid:m3, bid:m4 ; + bbqs:mechanism "R34" ; bbqs:award_amount 200.20 . +bid:d1 a bbqs:Dataset ; bbqs:name "D one" . +bid:d2 a bbqs:Dataset ; bbqs:name "D two" . +bid:m1 a bbqs:Species ; bbqs:name "Mus musculus" ; bbqs:common_name "House Mouse" ; bbqs:aliases "Mus musculus", "mouse" . +bid:m2 a bbqs:Species ; bbqs:name "Mus musculus domesticus" ; bbqs:common_name "House Mouse" . +bid:m3 a bbqs:Species ; bbqs:name "Mus spretus" ; bbqs:common_name "house mouse" . +bid:m4 a bbqs:Species ; bbqs:name "Mus spretus" . +bid:ann a bbqs:Investigator ; bbqs:name "Ann A", "A. Ann" ; bbqs:member_of_group bid:w1 . +bid:bo a bbqs:Investigator ; bbqs:name "Bo B" ; bbqs:member_of_group bid:w2 ; + bbqs:orcid <https://orcid.org/0000-0002-0000-0002> . +<https://orcid.org/0000-0002-0000-0002> bbqs:name "Bo's iD" . +bid:cy a bbqs:Investigator ; bbqs:member_of_group bid:w1 . +bid:s1 a bbqs:ProjectRole ; bbqs:held_by bid:ann ; bbqs:on_project bid:q1 ; bbqs:project_role "contact_pi" . +bid:s2 a bbqs:ProjectRole ; bbqs:held_by bid:ann ; bbqs:on_project bid:q1 ; bbqs:project_role "key_personnel" . +bid:s3 a bbqs:ProjectRole ; bbqs:held_by bid:bo ; bbqs:on_project bid:q1 . +bid:s4 a bbqs:ProjectRole ; bbqs:held_by bid:ann ; bbqs:on_project bid:q2 ; bbqs:project_role "co_pi" . +bid:s5 a bbqs:ProjectRole ; bbqs:held_by bid:bo ; bbqs:on_project bid:q3 ; bbqs:project_role "co_pi" . +bid:s6 a bbqs:ProjectRole ; bbqs:held_by bid:ann ; bbqs:on_project bid:q6 ; bbqs:project_role "co_pi" . +bid:s7 a bbqs:ProjectRole ; bbqs:held_by bid:bo ; bbqs:on_project bid:q2 ; bbqs:project_role "MPI" . +bid:di a bbqs:Investigator ; bbqs:name "Di D" . +bid:s8 a bbqs:ProjectRole ; bbqs:held_by bid:di ; bbqs:on_project bid:q3 ; bbqs:project_role "co_pi" . +bid:s9 a bbqs:ProjectRole ; bbqs:held_by bid:di ; bbqs:on_project bid:q4 ; bbqs:project_role "co_pi" . +bid:o1 a bbqs:ResearchOrganization ; bbqs:name "ONE" ; bbqs:members bid:ann, bid:nobody1 . +bid:o2 a bbqs:ResearchOrganization ; bbqs:name "TWO" ; bbqs:members bid:nobody1 . +bid:o3 a bbqs:ResearchOrganization ; bbqs:name "THREE" . +bid:o4 a bbqs:ResearchOrganization ; bbqs:name "FOUR" ; bbqs:members bid:gone5 . +bid:w1 a bbqs:WorkingGroup ; bbqs:name "WG-Devices" . +bid:w2 a bbqs:WorkingGroup ; bbqs:name "WG-Devices" . +bid:w3 a bbqs:WorkingGroup ; bbqs:name "WG-Empty" . +bid:dev a bbqs:Device ; bbqs:model_name "Scope" ; bbqs:manufacturer bid:man ; bbqs:device_category bid:nocat . +bid:dev2 a bbqs:Device ; bbqs:model_name "Scope 2" ; bbqs:manufacturer bid:man ; bbqs:device_category bbqs:Microscope . +bbqs:Microscope a bbqs:DeviceCategory ; bbqs:label "Microscopes" . +bid:man a bbqs:DeviceManufacturer ; bbqs:name "Lens Co" . +bid:net a bbqs:MLModel ; bbqs:name "Pose net" ; bbqs:evaluated_by bid:bench . +bid:bench a bbqs:Benchmark ; bbqs:name "Pose bench" ; bbqs:evaluates bid:net . +bid:j1 a bbqs:Job ; bbqs:name "Postdoc", "Postdoctoral fellow" ; bbqs:job_institution "ONE" ; bbqs:job_type "postdoc" ; + bbqs:posted_by "Lab manager" . +bid:j2 a bbqs:Job ; bbqs:name "Technician" ; bbqs:job_institution "ONE" ; bbqs:job_type "staff" ; + bbqs:posted_by bid:nobody2 . +bid:j3 a bbqs:Job ; bbqs:name "Engineer" ; bbqs:job_type "staff" ; bbqs:posted_by bid:nobody1 . +bid:j4 a bbqs:Job ; bbqs:name "Technician" ; bbqs:job_institution "ONE" . +bid:j5 a bbqs:Job ; bbqs:name "Analyst" ; bbqs:job_institution bid:o1 . +bid:j6 a bbqs:Job ; bbqs:name "Curator" ; bbqs:part_of_org bid:o1 ; bbqs:job_institution "Not read" ; + bbqs:posted_by bid:ann . +bid:j7 a bbqs:Job ; bbqs:name "Fellow" ; bbqs:part_of_org bid:o2, bid:o3 ; bbqs:posted_by bid:bo, bid:cy . +bid:j8 a bbqs:Job ; bbqs:name "Nurse" ; bbqs:part_of_org bid:gone6 ; bbqs:job_institution "EIGHT" . +bid:j9 a bbqs:Job ; bbqs:name "Clerk" ; bbqs:part_of_org bid:gone6 . +bid:tool9 a bbqs:SoftwareTool ; bbqs:name "Kit" ; bbqs:repo_url bid:o3 . +bid:f1 a bbqs:FundingOpportunity ; bbqs:name "First day" ; bbqs:expiration_date "2026-10-14"^^xsd:date . +bid:f2 a bbqs:FundingOpportunity ; bbqs:name "Last day" ; bbqs:expiration_date "2027-04-14"^^xsd:date . +bid:f3 a bbqs:FundingOpportunity ; bbqs:name "Day before" ; bbqs:expiration_date "2026-10-13"^^xsd:date . +bid:f4 a bbqs:FundingOpportunity ; bbqs:name "Day after" ; bbqs:expiration_date "2027-04-15"^^xsd:date . +bid:f5 a bbqs:FundingOpportunity ; bbqs:name "CQ17's day" ; bbqs:expiration_date "2026-09-29"^^xsd:date . +bid:c1 a bbqs:SourceClass ; bbqs:grade 3 . +bid:c2 a bbqs:SourceClass ; bbqs:grade 1, 2 . +bid:v1 a bbqs:ProvenanceRecord ; bbqs:prov_entity_id "q1" ; bbqs:prov_entity_column "title" ; + bbqs:prov_value_text "First", "The first" ; bbqs:prov_source_class bid:nosource . +bid:v2 a bbqs:ProvenanceRecord ; bbqs:prov_entity_id "q1" ; bbqs:prov_entity_column "title" ; + bbqs:prov_value_text "1st" ; bbqs:prov_source_class bid:nosource, bid:c2 . +bid:v3 a bbqs:ProvenanceRecord ; bbqs:prov_entity_id "d1" ; bbqs:prov_entity_table "datasets" ; + bbqs:prov_source_class bid:c1 . +bid:v4 a bbqs:ProvenanceRecord ; bbqs:prov_entity_id "q3" ; bbqs:prov_entity_column "title" ; + bbqs:prov_value_text "Not it" ; bbqs:prov_source_class bid:c2 . +bid:v5 a bbqs:ProvenanceRecord ; bbqs:prov_entity_id "d2" ; bbqs:prov_entity_column "name" ; bbqs:prov_value_text "D two" . +""" +# Rows per question, by hand; a question not named has none. Some of the working: +# CQ04 q1 alone has the grant number (q3 only has it as a name, so Bo's role there does not +# count). Ann's two records on q1, each under her two names; Bo's record has no role: 4. +# CQ03 q1 is part of ONE (and also hosted at it): 1. +# CQ05 Ann on q1, q2 and q6, under two names; Bo on q1, q2 and q3; Di on q3 and q4: 4. +# (Di is on one numbered project only, so not in CQ20.) +# CQ11 q6 names no species: 1 (q3 has no grant number). +# CQ13 the dataset q1 both funded and produced: 2. +# CQ16 Kit, whose repository is a node: 1. +# CQ18 by the text alone: one job under two titles, two called Technician, and one whose text is +# the node o1 rather than "ONE": 5. Through the tie: the curator at ONE (its own text not +# read), the fellow at TWO and at THREE; the nurse and the clerk are tied to an id with no +# name, so name none (and the nurse's text is not read): 3. So 8. +# CQ02 q1 and q4 are R34 with an amount (q2 has none): 100.10 + 200.20 = 300.3. +# CQ07 Bo's iD, a node of its own: 1. CQ21 then has Ann, under her two names, and Di: 3. +# CQ15 the scope whose category nothing describes, and Scope 2, filed under bbqs:Microscope: 2. +# CQ19 v1 gives two values from a source nothing describes: 2. v2 gives one value from that +# source and from one graded twice: 3. v4 is about q3: 0. So 5. +# CQ20 Ann (two names) and Bo are each on several numbered projects; Ann's q2 and q6 share a +# number, which is named once: 3. +# CQ22 Ann's organization, under two names, and Bo's, through q1: 3. +# CQ23 Ann's records give 5 grant numbers (q1 twice, q2's two, q6's), under two names; Bo's give +# 3 (q1, and q2's two; q3 has none): 13. +# CQ24 Ann holds three kinds of role, Bo two (co_pi and MPI): 3. +# CQ25 m1 fits by its name, its common name and an alias, m2 by its common name: q1, 4 times. +# CQ26 three names; "Mus spretus" is two species, both studied by q4, which is one project: 3. +# CQ35 the text "ONE" advertises four titles (j1 under two, and the two Technicians); the text that +# is the node o1, one; the organization ONE, one (the curator: a name written as text is not +# taken for the node); TWO and THREE, one each: 5 rows. +# CQ30 d1 has a sourced record; d2's record names no source: 1. +# CQ32 ONE has Ann and somebody not exported, TWO that somebody, THREE nobody, FOUR somebody +# else not exported: 4 rows. +# CQ37 the poster is read by name, through the link: the curator, posted by Ann under her two +# names, 2; the fellow, by Bo, and by Cy, who has no name, 1. A name in place of a link (j1), +# an id nothing describes (j2) and one the server made a node of (j3) name nobody: 3. +# CQ38 q2's one output was not exported, but it has one; q3 has no grant number; q4 and q6: 2. +# CQ41 q1: three datasets, two of them not exported, each with Ann (contact_pi) under two names: +# 6. q2: one dataset, under two grant numbers, with Ann (co_pi) under two names and Bo (MPI): 6. +# So 12. +AWKWARD_ROWS = {"CQ01": 5, "CQ02": 1, "CQ03": 1, "CQ04": 4, "CQ05": 4, "CQ06": 2, "CQ07": 1, "CQ08": 3, "CQ09": 2, "CQ11": 1, "CQ13": 2, + "CQ15": 2, "CQ16": 1, "CQ17": 4, + "CQ18": 8, "CQ19": 5, "CQ20": 3, "CQ21": 3, "CQ22": 3, "CQ23": 13, "CQ24": 3, "CQ25": 4, "CQ26": 3, + "CQ27": 2, # q2's unresolved "marmoset", once per grant number, beside its (dangling) linked species + "CQ28": 4, "CQ30": 1, "CQ31": 2, "CQ32": 4, "CQ33": 1, "CQ34": 1, "CQ35": 5, "CQ36": 2, "CQ37": 3, "CQ38": 2, + "CQ39": 2, "CQ40": 2, "CQ41": 12, "CQ42": 1} + + +class TheBenchmark(unittest.TestCase): + """bench_mcp_server.py: the competency questions, asked over MCP as SPARQL and without it.""" + + def graph(self, turtle: str) -> str: + folder = tempfile.TemporaryDirectory() + self.addCleanup(folder.cleanup) + path = Path(folder.name) / "graph.ttl" + path.write_text(turtle, encoding="utf8") + return str(path) + + def client(self, source: str) -> bench.Client: + client = bench.Client(source) + self.addCleanup(client.close) + return client + + def ask(self, source: str) -> dict: + return bench.ask_questions(self.client(source), m.GraphSource(source, 0).current(), source, fresh=False) + + @staticmethod + def differing(asked: dict) -> list: + return [(q["id"], q["sparql_agrees"], q["tools_agree"]) for q in asked["questions"] + if not (q["sparql_agrees"] and q["tools_agree"])] + + def test_the_questions_are_the_42_the_kg_is_scored_on(self): + questions, prologue = bench.load_questions() + self.assertEqual([q["id"] for q in questions], [f"CQ{n:02d}" for n in range(1, 43)]) + self.assertEqual([q["set"] for q in questions], ["adopted"] * 42) + self.assertEqual({q["id"] for q in questions if q.get("reads") == "absence"}, + {"CQ21", "CQ27", "CQ30", "CQ33", "CQ38", "CQ42"}) # the "which X has no Y" ones + self.assertEqual(set(bench.WALKS), {q["id"] for q in questions}) # no question without a walk, nor a walk without one + self.assertEqual({q["access"] for q in questions}, {"anon", "full"}) + for q in questions: # each parses, with the prefixes the files give + Graph().query(prologue + q["sparql"]) + # the file is the one quality.py scores + self.assertEqual([path.name for path in bench.QUESTION_FILES.values()], ["competency_questions.yaml"]) + self.assertIn('DEFAULT_CQS = HERE / "competency_questions.yaml"', (HERE / "quality.py").read_text(encoding="utf8")) + + def test_every_question_gets_the_same_rows_three_ways_on_the_export(self): + asked = self.ask(str(EXPORT)) + self.assertEqual(self.differing(asked), []) # as SPARQL, and through the graph tools, as the file itself + self.assertEqual((asked["asked"], asked["adopted"]), (42, 42)) + baseline = json.loads((HERE / "quality_baseline.json").read_text(encoding="utf8")) + adopted = [q for q in asked["questions"] if q["set"] == "adopted"] + # as the KG gate counts: a question with rows, and a "which X has no Y" one that found none missing + absence = {q["id"] for q in bench.load_questions()[0] if q.get("reads") == "absence"} + none_missing = [q["id"] for q in adopted if q["id"] in absence and q["status"] == "none in this export"] + self.assertEqual(sorted([q["id"] for q in adopted if q["rows"]] + none_missing), sorted(baseline["answered"])) + self.assertEqual(asked["answered_adopted"] + len(none_missing), len(baseline["answered"])) + silent = asked["asked"] - asked["answered"] + self.assertEqual((asked["sparql_agree"], asked["tools_agree"], asked["silent_agree"], asked["all_agree"]), + (asked["answered"], asked["answered"], silent, True)) + # every question has one status, and the counts add up + self.assertEqual(asked["need_the_full_export"] + asked["none_in_this_export"] + asked["not_modelled"] + + asked["could_not_be_asked"], silent) + full = {q["id"] for q in bench.load_questions()[0] if q["access"] == "full"} + self.assertLessEqual({q["id"] for q in asked["questions"] if q["status"] == "needs the full export"}, full) + # CQ14 found nothing until the export of 2026-11-17, the first written by an exporter that reads + # project_device_usage + self.assertEqual(next(q["status"] for q in asked["questions"] if q["id"] == "CQ14"), "answered") + + def test_the_readme_says_which_questions_have_no_rows_on_the_committed_export(self): + # kg/README.md ("Benchmark") names the questions with no rows today and why. When a new export + # changes which, this fails: say so there, and rerun `bench_mcp_server.py --update README.md`. + asked = self.ask(str(EXPORT)) + status: dict = {} + for q in asked["questions"]: + status.setdefault(q["status"], []).append(q["id"]) + self.assertEqual(status, { + "answered": [f"CQ{n:02d}" for n in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, + 23, 25, 26, 28, 29, 32, 33, 34, 35, 37, 38, 39, 41)], + "needs the full export": ["CQ19", "CQ30", "CQ40"], + # The export of 2026-11-18 is the first with posted_by (CQ37, public_job_posters) and with + # the calls' expiration dates filled (CQ39). CQ36 still has no rows: the live public_jobs + # view gave anon no rows that day, so no Job node carries a job_type. When an export has + # them, CQ36 moves to "answered": update this then. + "none in this export": ["CQ24", "CQ27", "CQ31", "CQ36", "CQ42"]}) + readme = (HERE / "README.md").read_text(encoding="utf8") + for name in status["needs the full export"] + status["none in this export"] + status.get("not modelled", []): + self.assertIn(name, readme) + self.assertEqual(asked["answered"], asked["answered_adopted"]) # every question is one the KG is scored on + + def test_every_question_can_be_walked_when_it_has_an_answer(self): + # On the public export 10 of the questions return nothing either way, which checks nothing. + # Here all 42 have rows, so every walk through the graph tools is held against real ones. + asked = self.ask(self.graph(MINIATURE)) + self.assertEqual({q["id"]: q["rows"] for q in asked["questions"]}, MINIATURE_ROWS) + self.assertNotIn(0, MINIATURE_ROWS.values()) + self.assertEqual(self.differing(asked), []) + status = {q["id"]: q["status"] for q in asked["questions"]} + self.assertEqual(set(status.values()), {"answered"}) # CQ14 too + self.assertEqual((asked["answered"], asked["answered_adopted"], asked["silent_agree"]), (42, 42, 0)) + # CQ14 has rows here, so it is not among the questions with none, whatever its status + self.assertEqual((asked["not_modelled"], asked["need_the_full_export"], asked["none_in_this_export"]), (0, 0, 0)) + + def test_shapes_an_export_could_take_and_todays_does_not(self): + asked = self.ask(self.graph(AWKWARD)) + self.assertEqual({q["id"]: q["rows"] for q in asked["questions"] if q["rows"]}, AWKWARD_ROWS) + self.assertEqual(self.differing(asked), []) + # the rows themselves, for the walks that have to tell a node from a value + client = self.client(self.graph(AWKWARD)) + self.assertEqual(sorted(bench.WALKS["CQ37"][0](client)), [["Curator", "A. Ann"], ["Curator", "Ann A"], ["Fellow", "Bo B"]]) + self.assertEqual(sorted(bench.WALKS["CQ18"][0](client)), + [["Analyst", "bid:o1"], ["Curator", "ONE"], ["Fellow", "THREE"], ["Fellow", "TWO"], ["Postdoc", "ONE"], + ["Postdoctoral fellow", "ONE"], ["Technician", "ONE"], ["Technician", "ONE"]]) + self.assertEqual(sorted(bench.WALKS["CQ15"][0](client)), [["Lens Co", "Scope", "https://brain-bbqs.org/id/nocat"], + ["Lens Co", "Scope 2", "bbqs:Microscope"]]) + self.assertEqual(bench.WALKS["CQ07"][0](client), [["Bo B", "<https://orcid.org/0000-0002-0000-0002>"]]) + [[mechanism, projects, total]] = bench.WALKS["CQ02"][0](client) + self.assertEqual((mechanism, projects, total), ("R34", 2, 100.1 + 200.2)) # 300.29999999999995 + self.assertEqual(sorted(bench.WALKS["CQ32"][0](client)), [["FOUR", 1], ["ONE", 2], ["THREE", 0], ["TWO", 1]]) + self.assertEqual(bench.WALKS["CQ30"][0](client), [["bid:d2", "D two"]]) + self.assertEqual(sorted(bench.WALKS["CQ19"][0](client), key=str), + sorted([["First", "bid:nosource", None], ["The first", "bid:nosource", None], + ["1st", "bid:nosource", None], ["1st", "bid:c2", 1], ["1st", "bid:c2", 2]], key=str)) + self.assertEqual(bench.WALKS["CQ13"][0](client), [["R34DA059723", "D one"]] * 2) + self.assertEqual(sorted(bench.WALKS["CQ26"][0](client)), [["Mus musculus", 1], ["Mus musculus domesticus", 1], + ["Mus spretus", 1]]) + self.assertEqual(sorted(row[:2] for row in bench.WALKS["CQ35"][0](client)), # the node ONE apart from the text + [["ONE", 1], ["ONE", 4], ["THREE", 1], ["TWO", 1], ["bid:o1", 1]]) + every = "R34DA059723, U01DA000002, U01DA000002-S1" # q2 under two, q6 under one of them + self.assertEqual(sorted(bench.WALKS["CQ20"][0](client)), [["A. Ann", every], ["Ann A", every], ["Bo B", every]]) + + def test_a_graph_with_next_to_nothing_in_it_is_asked_everything_all_the_same(self): + # no species, no R34DA059723, no working group: nothing for a walk to start from + asked = self.ask(self.graph(PREFIXES + 'bid:only a bbqs:Project ; bbqs:name "Alone" .\n')) + self.assertEqual((asked["asked"], asked["answered"], asked["silent_agree"], asked["all_agree"]), (42, 0, 42, True)) + + def test_the_one_thing_a_walk_cannot_see_is_a_roster_record_with_an_end_missing(self): + # Cy is given a role on a project nothing describes. SPARQL reads the half-record, so WG-Analysis + # now has a member with a role (CQ42); the server makes no link of it, and says so in describe_graph. + source = self.graph(MINIATURE + 'bid:r9 a bbqs:ProjectRole ; bbqs:held_by bid:cy ; bbqs:on_project bid:nowhere ; ' + 'bbqs:project_role "co_pi" .\n') + asked = self.ask(source) + self.assertEqual(self.differing(asked), [("CQ42", True, False)]) + self.assertEqual((asked["all_agree"], asked["tools_agree"], asked["silent_agree"]), (False, 41, 0)) + kg = m.GraphSource(source, 0).current() + self.assertEqual(dict(kg.unfolded), {"ProjectRole": 1}) + self.assertTrue(any("1 ProjectRole" in note for note in kg.describe()["notes"])) + + def test_the_reference_is_written_out_by_the_benchmark_not_by_the_server(self): + # The reference is the export queried directly. Its cells are written by the benchmark's own + # rules, so a fault in how the server writes a value would show as a difference. Here the two + # writers are held against each other on every value of the export, and on odd ones. + kg = m.GraphSource(str(EXPORT), 0).current() + ids = {iri: node.id for iri, node in kg.nodes.items() if iri.startswith(m.ID_NS)} + checked = 0 + for s, p, o in kg.graph: + for term in (s, o): + self.assertEqual(bench.reference(term, ids), kg._cell(term), term) + checked += 1 + self.assertGreater(checked, 10_000) + with self.assertLogs("rdflib.term", level="WARNING"): # rdflib says so of the ill-typed one + odd = Graph().parse(data="""@prefix bbqs: <https://brain-bbqs.org/schema#> . + @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . + <https://brain-bbqs.org/id/a> bbqs:v "12.50"^^xsd:decimal, "7"^^xsd:decimal, "0.1"^^xsd:double, true, + "2026-01-02"^^xsd:date, "2026-01-02T03:04:05"^^xsd:dateTime, "a sentence"^^xsd:integer, "en"@en, + <urn:x>, bbqs:Microscope .""", format="turtle") + small = m.KG(odd) + small_ids = {iri: node.id for iri, node in small.nodes.items() if iri.startswith(m.ID_NS)} + for _, _, term in odd: + self.assertEqual(bench.reference(term, small_ids), small._cell(term), term) + self.assertEqual(sorted((bench.reference(term, small_ids) for _, _, term in odd), key=str), + sorted([12.5, 7, 0.1, True, "2026-01-02", "2026-01-02T03:04:05", "a sentence", "en", "<urn:x>", + "bbqs:Microscope"], key=str)) + + def test_the_reference_does_not_lean_on_the_server_to_write_a_value(self): + broken = small_kg('bid:a a bbqs:Thing ; bbqs:name "A" .') + ids = {iri: node.id for iri, node in broken.nodes.items()} + values = Graph().parse(data="""@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . + <urn:s> <urn:p> "12.50"^^xsd:decimal, "2026-01-02"^^xsd:date, "NaN"^^xsd:double, "deadbeef"^^xsd:hexBinary, + "true"^^xsd:boolean, <https://brain-bbqs.org/id/a>, <urn:x> .""", format="turtle") + written = {str(term): bench.reference(term, ids) for _, _, term in values} + with mock.patch.object(m, "_plain", lambda value: "X"), mock.patch.object(m.KG, "_cell", lambda self, term: "X"): + self.assertEqual({str(term): bench.reference(term, ids) for _, _, term in values}, written) # not the server's + nan = next(text for text in written if text.lower() == "nan") + self.assertEqual(written, {"12.50": 12.5, "2026-01-02": "2026-01-02", nan: "NaN", "deadbeef": "deadbeef", "true": True, + m.ID_NS + "a": "bid:a", "urn:x": "<urn:x>"}) # NaN as text: JSON has no number for it + self.assertEqual({str(term): broken._cell(term) for _, _, term in values}, written) # and the server writes the same + + def test_values_written_as_iris_or_blank_nodes_agree_both_ways(self): + source = self.graph(PREFIXES + """ + bid:t1 a bbqs:SoftwareTool ; bbqs:name "T1" ; bbqs:repo_url <urn:isbn:1> . + bid:t2 a bbqs:SoftwareTool ; bbqs:name "T2" ; bbqs:repo_url bbqs:Foo . + bid:t3 a bbqs:SoftwareTool ; bbqs:name "T3" ; bbqs:repo_url <mailto:a@b.org> . + bid:ann a bbqs:Investigator ; bbqs:name "Ann" ; + bbqs:orcid <https://orcid.org/0000-0001-0000-0001>, "https://orcid.org/0000-0001-0000-0001" . + bid:bea a bbqs:Investigator ; bbqs:name "Bea" ; bbqs:orcid <https://orcid.org/0000-0001-0000-0001> . + """) + rows = {q["id"]: q for q in self.ask(source)["questions"]} + for name, count in (("CQ16", 3), ("CQ07", 3)): + self.assertEqual((rows[name]["rows"], rows[name]["sparql_agrees"], rows[name]["tools_agree"]), (count, True, True)) + # a blank node: SPARQL agrees with the file (the labels are made up per reading); a walk + # cannot see it, which is documented, and reported + blank = {q["id"]: q for q in self.ask(self.graph(PREFIXES + 'bid:t4 a bbqs:SoftwareTool ; bbqs:name "T4" ; ' + 'bbqs:repo_url [ bbqs:url "x" ] .\n'))["questions"]} + self.assertEqual((blank["CQ16"]["rows"], blank["CQ16"]["sparql_agrees"], blank["CQ16"]["tools_agree"]), (1, True, False)) + + def test_a_question_the_tools_cannot_walk_in_full_fails_alone(self): + # A working group of 501: more members than get_node lists at once. The questions that need + # every member link say so and fail; the rest are asked as usual. + people = "".join(f'bid:i{n:03d} a bbqs:Investigator ; bbqs:name "I{n:03d}" ; bbqs:member_of_group bid:wgd .\n' + for n in range(501)) + asked = self.ask(self.graph(PREFIXES + 'bid:wgd a bbqs:WorkingGroup ; bbqs:name "WG-Devices" .\n' + people)) + wrong = {q["id"]: q.get("error", "") for q in asked["questions"] if not (q["sparql_agrees"] and q["tools_agree"])} + self.assertEqual(sorted(wrong), ["CQ23", "CQ42"]) # the two that read every member link + for name in wrong: + self.assertIn("more member_of_group links than get_node lists at once (500)", wrong[name]) + rows = {q["id"]: q["rows"] for q in asked["questions"]} + self.assertEqual((rows["CQ08"], rows["CQ21"], rows["CQ23"]), (501, 501, 501)) # paged through, all of them + self.assertFalse(asked["all_agree"]) + + def test_a_question_the_file_itself_cannot_answer_is_said_not_crashed_on(self): + source = self.graph(PREFIXES + 'bid:p a bbqs:Project ; bbqs:grant_number "R01X" ; bbqs:mechanism "R01" ; ' + 'bbqs:award_amount "not yet awarded" .\n') + asked = self.ask(source) + cq02 = next(q for q in asked["questions"] if q["id"] == "CQ02") + self.assertEqual((cq02["status"], cq02["sparql_agrees"], cq02["tools_agree"], asked["could_not_be_asked"]), + ("could not be asked", False, False, 1)) + self.assertIn("the export queried directly", cq02["error"]) + block = bench.markdown({"server": "0", "nodes": 1, "links": 0, "snapshot": {"source": "x"}, "questions": asked}) + self.assertIn("| 1 could not be asked: the export queried directly refused it | **not compared** |", block) + self.assertIn("*(could not be asked)* | — | — | — |", block) # not "0 rows", not "differs": not compared + report = bench.report({"server": "0", "nodes": 1, "links": 0, "snapshot": {"source": "x"}, "questions": asked}) + self.assertIn("; 1 could not be asked: NOT ALL AGREE", report) + self.assertIsNone(cq02["rows"]) # neither "answered" nor "no rows" + self.assertEqual(asked["asked"] - asked["answered"] - asked["could_not_be_asked"], asked["silent_agree"]) + self.assertEqual([q["id"] for q in asked["questions"] if not (q["sparql_agrees"] and q["tools_agree"])], ["CQ02"]) + + def test_with_a_full_export_no_rows_is_none_not_needs_the_full_export(self): + source = self.graph(PREFIXES + 'bid:only a bbqs:Project ; bbqs:name "Alone" .\n') + full = bench.ask_questions(self.client(source), m.GraphSource(source, 0).current(), source, fresh=False, access="full") + anon = self.ask(source) + self.assertEqual((anon["need_the_full_export"], full["need_the_full_export"]), (3, 0)) # the provenance ones + self.assertEqual(full["none_in_this_export"], anon["none_in_this_export"] + 3) + self.assertEqual({q["status"] for q in full["questions"] if q["id"] in ("CQ19", "CQ30", "CQ40")}, {"none in this export"}) + + def test_the_ranking_measure_on_a_graph_worked_by_hand(self): + # S is linked to A01..A11, X and Q; Q to X. Of its 14 ties, the 11 to an A leave nothing to find + # it by (11 cases, all missed). S-X: from S, X is two links away through Q, first after the + # eleven direct people; from X, S is first after Q (2 found). S-Q: each finds the other through + # X (2 found). Q-X: from X, Q is found after S; from Q, X is one of twelve people two links + # away through S, all equal, and comes after ten of them by name (1 found). 5 of 17. + star = "".join(f'bid:a{n:02d} a bbqs:Investigator ; bbqs:name "A{n:02d}" .\n' for n in range(1, 12)) + kg = small_kg(star + 'bid:s a bbqs:Project ; bbqs:name "S" ; bbqs:e ' + + ", ".join(f"bid:a{n:02d}" for n in range(1, 12)) + """, bid:x, bid:q . + bid:q a bbqs:Project ; bbqs:name "Q" ; bbqs:e bid:x . + bid:x a bbqs:Investigator ; bbqs:name "X" .""") + before = {iri: (list(node.links), dict(node.near)) for iri, node in kg.nodes.items()} + measured = bench.measure_ranking(kg=kg) + self.assertEqual({iri: (list(node.links), dict(node.near)) for iri, node in kg.nodes.items()}, before) # put back + self.assertEqual(measured, {"cases": 17, "in_first_ten": dict.fromkeys(bench.WAYS, 29.4), + "starts_checked_against_the_slow_version": 14, "starts_exactly_equal": 14, + "lists_of_people": 14, "lists_of_people_cut_among_equals": 14}) + # the one case that tells "after the start's direct ties" from "the first ten": S looking for X + s, x = kg.resolve("S"), kg.resolve("X") + s.near.pop(x.iri), x.near.pop(s.iri) + self.assertEqual(bench.look_for(kg, s, x), dict.fromkeys(bench.WAYS, True)) + with mock.patch.object(bench, "look_for", lambda kg, start, hidden: { + name: hidden.id in [row["id"] for row in ask(kg, start.id, hidden.type, 0)] for name, ask in bench.WAYS.items()}): + self.assertEqual(bench.look_for(kg, s, x), dict.fromkeys(bench.WAYS, False)) # counting them in, it is not + + def test_the_speed_figures_are_the_median_and_the_95th_percentile(self): + self.assertEqual(bench.spread([float(n) for n in range(20, 0, -1)], [5, 1, 3]), + {"calls": 20, "median_ms": 10.5, "p95_ms": 20.0, "median_bytes": 3, "largest_bytes": 5}) + self.assertEqual(bench.spread([7.0], [9])["p95_ms"], 7.0) + + def test_the_whole_block_and_the_report_say_what_was_measured(self): + results = {"server": "0.0.0", "nodes": 3, "links": 2, "snapshot": {"source": "x.ttl", "dated": "2026-01-01"}, + "ranking": {"cases": 1383, "in_first_ten": {"find_related": 62.4, "find_related, up to 8 links": 64.8, + "get_neighbors": 45.4, "get_neighbors, through hubs": 47.3}, + "starts_checked_against_the_slow_version": 515, "starts_exactly_equal": 514, + "lists_of_people": 421, "lists_of_people_cut_among_equals": 274}, + "speed": {"tools": {name: {"calls": 9, "median_ms": 9.6, "p95_ms": 15.6, "median_bytes": 7643, + "largest_bytes": 12238} for name in ("find_related", "find_paths")}, + "ready_seconds": 1.5, "machine": "Box, Python 3"}} + block = bench.markdown(results).splitlines() + self.assertIn("| Hide a real tie: the hidden end is among the first ten `find_related` lists after the start's direct " + "ties (1,383 cases) | **62%** (65% looking up to 8 links) |", block) + self.assertIn("| The same for `get_neighbors`, which lists by distance alone | 45% (47% walking through hubs) |", block) + self.assertIn("| Strengths equal to a slow second version of the rule, exactly | **514 of 515** starting nodes |", block) + self.assertIn("| A `find_related` call (median; 95th percentile) | 10 ms; 16 ms |", block) + self.assertIn("| A `find_paths` call | 10 ms; 16 ms |", block) + self.assertIn("| A `find_related` reply (median; largest of the 9 timed) | 7.6 kB; 12.2 kB |", block) + report = bench.report(results) + for said in ("RANKING 1383 cases", f"{'find_related':30s} {62.4:5.1f}%", f"{'get_neighbors, through hubs':30s} {47.3:5.1f}%", + "514 of 515 starting nodes", "cut among equals: 274 of 421", "ready 1.5 s after starting", + f"{'find_paths':26s} {9:4d} calls median {9.6:6.1f} ms 95th {15.6:6.1f} ms"): + self.assertIn(said, report) + + def test_run_from_the_command_line_it_rewrites_the_block_and_nothing_else(self): + folder = tempfile.TemporaryDirectory() + self.addCleanup(folder.cleanup) + readme, out, source = Path(folder.name) / "README.md", Path(folder.name) / "out.json", self.graph(MINIATURE) + readme.write_text(f"before\n{bench.START}\nold\n{bench.END}\nafter\n", encoding="utf8") + with mock.patch("sys.stdout"), mock.patch("sys.stderr"): + code = bench.main(["--source", source, "--update", str(readme), "--json", str(out)]) + self.assertEqual(code, 0) + text = readme.read_text(encoding="utf8") + self.assertTrue(text.startswith(f"before\n{bench.START}\n") and text.endswith(f"{bench.END}\nafter\n"), text[:200]) + self.assertNotIn("\nold\n", text) + written = json.loads(out.read_text(encoding="utf8")) + self.assertEqual(sorted(written), ["links", "nodes", "questions", "ranking", "server", "snapshot", "speed"]) + self.assertEqual(written["ranking"]["starts_exactly_equal"], written["ranking"]["starts_checked_against_the_slow_version"]) + self.assertEqual(bench.markdown(written), text[len("before\n"):-len("\nafter\n")]) + with mock.patch.dict(bench.WALKS, {"CQ09": (lambda client: [], "nothing")}), \ + mock.patch("sys.stdout"), mock.patch("sys.stderr"): + self.assertEqual(bench.main(["--source", source, "--only", "questions"]), 1) # a walk that disagrees fails it + with mock.patch("sys.stderr"), self.assertRaises(SystemExit): + bench.main(["--source", source, "--only", "questions", "--update", str(readme)]) # --update needs every part + + def test_a_walk_that_went_wrong_would_be_noticed(self): + with mock.patch.dict(bench.WALKS, {"CQ09": (lambda client: [], "nothing")}): + asked = self.ask(self.graph(MINIATURE)) + wrong = [q["id"] for q in asked["questions"] if not q["tools_agree"]] + self.assertEqual((wrong, asked["all_agree"], asked["tools_agree"]), (["CQ09"], False, asked["answered"] - 1)) + + def test_what_the_client_makes_of_what_the_tools_return(self): + client = self.client(self.graph(AWKWARD)) + # an id nothing describes is a value; when two nodes point at it the server makes a node of it too + self.assertEqual(client.values("o1", "members"), ["https://brain-bbqs.org/id/nobody1"]) + self.assertEqual(sorted(row["type"] for row in client.linked("o1", "members", "out")), ["Investigator", "Unresolved"]) + self.assertEqual(sorted(bench.cell(entry) for entry in client.pointed("o1", "members")), ["bid:ann", "bid:nobody1"]) + self.assertEqual([bench.cell(entry) for entry in client.pointed("j2", "posted_by")], ["https://brain-bbqs.org/id/nobody2"]) + self.assertEqual([bench.cell(entry) for entry in client.pointed("j1", "posted_by")], ["Lab manager"]) + self.assertEqual((client.has("q2", "produced"), client.has("q4", "produced")), (True, False)) + # one entry per link from get_node, one per node from find_related + self.assertEqual([row["role"] for row in client.linked("q1", "has_role", "in") if row["id"] == "ann"], + ["contact_pi", "key_personnel"]) + self.assertEqual(sorted(ids(client.tied("q1", "Investigator", {"has_role"}))), ["ann", "bo"]) + # search_nodes takes "house mouse" for "House Mouse"; a question does not + self.assertEqual(len(client.listed(type="Species", where={"common_name": "House Mouse"})), 3) + self.assertEqual(sorted(ids(client.where("Species", common_name="House Mouse"))), ["m1", "m2"]) + # nothing of the kind is an empty answer; any other refusal stops the run + self.assertEqual((client.all_of("Nonesuch"), client.where("Species", nonesuch="x"), client.tied("q1", "Nonesuch", {"x"})), + ([], [], [])) + with self.assertRaises(SystemExit): + client.listed(type="Species", where={"common_name": "House Mouse"}, query=5) + with self.assertRaises(SystemExit): + client.tied("nobody-of-that-name", "Species", {"x"}) + + def test_how_two_answers_are_compared(self): + same = bench.same + self.assertEqual(same([["b", 2], ["a", 1]]), same([["a", 1], ["b", 2]])) # the order of rows is not part of it + self.assertNotEqual(same([["a"], ["a"]]), same([["a"]])) # how many times a row comes is + self.assertEqual(same([[2.0, None]]), same([[2, None]])) + self.assertNotEqual(same([["2"]]), same([[2]])) + self.assertEqual(same([["<https://orcid.org/0000-0001>"]]), same([["https://orcid.org/0000-0001"]])) + self.assertNotEqual(same([["<not an address>"]]), same([["not an address"]])) + self.assertEqual(same([["n", "b, a"]], {1: ", "}), same([["n", "a, b"]], {1: ", "})) # a joined cell, in any order + self.assertNotEqual(same([["n", "b, a"]]), same([["n", "a, b"]])) # any other cell, as it is + self.assertNotEqual(same([["n", "a, a"]], {1: ", "}), same([["n", "a"]], {1: ", "})) + # which cells are joined is read from the question, so a new one cannot be forgotten + questions, _ = bench.load_questions() + self.assertEqual({q["id"]: bench.joined_cells(q["sparql"]) for q in questions if "GROUP_CONCAT" in q["sparql"]}, + {"CQ20": {1: ", "}, "CQ24": {1: ", "}, "CQ29": {2: ", "}, "CQ35": {2: "; "}}) + self.assertEqual(bench.joined_cells("SELECT ?a (COUNT(?b) AS ?n) (GROUP_CONCAT(?c) AS ?all) { ?a ?b ?c }"), {2: " "}) + self.assertEqual([bench.bid(node) for node in ("abc123", "ext:https://orcid.org/0000-0001", "https://example.org/x", + m.SCHEMA_NS + "Microscope", m.SCHEMA_NS + "two words", "urn:x")], + ["bid:abc123", "<https://orcid.org/0000-0001>", "<https://example.org/x>", "bbqs:Microscope", + f"<{m.SCHEMA_NS}two words>", "<urn:x>"]) # as the server writes each in a cell + self.assertEqual(same([[300.29999999999995]]), same([[300.3]])) # the order a sum was taken in + self.assertEqual(same([[0.6000000000000001]]), same([[0.6]])) + self.assertNotEqual(same([[0.1]]), same([[0.2]])) + self.assertNotEqual(same([[300.3]]), same([[300.30001]])) + self.assertEqual(same([[3.0]]), same([[3]])) + self.assertEqual(same([[1234567890123]]), same([[1234567890123.0]])) # whole or not, to 12 digits + self.assertEqual(same([["_:n1a2b"]]), same([["_:f9e8d"]])) # blank labels are made up per reading + self.assertEqual(same([["<urn:isbn:1>"], ["bbqs:Foo"]]), same([["urn:isbn:1"], [m.SCHEMA_NS + "Foo"]])) + self.assertNotEqual(same([["bid:abc"]]), same([[m.ID_NS + "abc"]])) # a node of this graph stays a node + + def test_the_results_block_is_written_between_its_markers_and_nowhere_else(self): + def row(name, kind, status, rows, **more): + return {"id": name, "set": kind, "question": f"{name}?", "status": status, "rows": rows, "sparql_agrees": True, + "tools_agree": True, "how": "walk", **more} + results = {"server": "0.0.0", "nodes": 3, "links": 2, "snapshot": {"source": "x.ttl", "dated": "2026-01-01"}, + "questions": {"asked": 4, "adopted": 2, "answered": 2, "answered_adopted": 1, "need_the_full_export": 1, + "none_in_this_export": 1, "not_modelled": 0, "sparql_agree": 2, "tools_agree": 2, + "silent_agree": 2, "all_agree": True, "questions": [ + row("CQ01", "adopted", "answered", 4), row("CQ02", "adopted", "needs the full export", 0), + row("CQ03", "proposed", "answered", 7), row("CQ04", "proposed", "none in this export", 0)]}} + block = bench.markdown(results) + self.assertTrue(block.startswith(bench.START) and block.endswith(bench.END)) + self.assertIn("| Competency questions that return rows on this export | **2 of 4**: 1 of the 2 the KG is scored on, " + "1 of the 2 proposed in #441 |", block) + self.assertIn("| The other 2 (1 need the full export, 1 find none in this export): no rows either way | **2 of 2** |", block) + lines = block.splitlines() + at = {name: next(i for i, line in enumerate(lines) if line.startswith(f"| {name} |")) for name in ("CQ02", "CQ03")} + self.assertEqual(lines[at["CQ02"]], "| CQ02 | CQ02? *(needs the full export)* | 0 | none | none | walk |") + self.assertEqual(lines[at["CQ03"]], "| CQ03 | CQ03? | 7 | same | same | walk |") + self.assertIn("Proposed in [#441]", lines[at["CQ03"] - 1]) # the proposed ones under their own heading + self.assertEqual(sum("Proposed in [#441]" in line for line in lines), 1) + # a difference is said, in the summary and in the row + results["questions"].update(tools_agree=1, all_agree=False) + results["questions"]["questions"][2]["tools_agree"] = False + differs = bench.markdown(results) + self.assertIn("same rows again | **1 of 2** |", differs) + self.assertIn("| CQ03 | CQ03? | 7 | same | **differs** | walk |", differs) + self.assertIn("NOT ALL AGREE", bench.report({**results, "questions": {**results["questions"], "questions": [ + {**q, "sparql_ms": 1.0, "tools_ms": 1.0, "tool_calls": 1} for q in results["questions"]["questions"]]}})) + readme = (HERE.parent / "README.md").read_text(encoding="utf8") + self.assertEqual((readme.count(bench.START), readme.count(bench.END)), (1, 1)) # the main README has the block + self.assertLess(readme.index(bench.START), readme.index(bench.END)) + for q in bench.load_questions()[0]: # and it lists the questions as they stand + self.assertEqual(readme.count(f"| {q['id']} | {q['question']}"), 1, q["id"]) + + +class TheCommandLine(unittest.TestCase): + def run_server(self, *args: str): + return subprocess.run([sys.executable, str(SERVER), *args], capture_output=True, text=True, timeout=60) + + def test_check_prints_what_the_graph_holds(self): + done = self.run_server("--check", "--source", str(EXPORT)) + self.assertEqual(done.returncode, 0, done.stderr) + self.assertRegex(done.stdout, r"bbqs-kg [\d.]+: \d+ nodes, \d+ links, \d+ triples from kg/export/bbqs\.ttl") + self.assertIn("Investigator -has_role-> Project", done.stdout) + + def test_a_source_that_cannot_be_read_stops_it_with_the_reason(self): + done = self.run_server("--check", "--source", "definitely-not-here.ttl") + self.assertEqual(done.returncode, 2) + self.assertIn("No knowledge graph could be loaded", done.stderr) + self.assertIn("definitely-not-here.ttl", done.stderr) + self.assertEqual(done.stdout, "") + + def test_answers_do_not_depend_on_how_this_process_happens_to_hash(self): + # Sets and dicts of strings order differently from one process to the next. Nothing a tool + # returns may follow that order: the same question, asked of three processes, reads the same. + asks = ("import json, sys; sys.path.insert(0, sys.argv[1]); import mcp_server as m; " + "kg = m.GraphSource(sys.argv[2], 0).current(); " + "print(json.dumps([kg.related(['House Mouse', 'WG-Devices'], limit=25), kg.related('WG-Analytics'), " + "kg.paths('House Mouse', 'WG-Devices', limit=25), kg.neighbors('R34DA059723', depth=2), " + "kg.search('behavior', limit=50)], sort_keys=True))") + said = set() + for seed in ("0", "1", "4242"): + done = subprocess.run([sys.executable, "-c", asks, str(HERE), str(EXPORT)], capture_output=True, text=True, + timeout=60, env={**os.environ, "PYTHONHASHSEED": seed}) + self.assertEqual(done.returncode, 0, done.stderr) + said.add(done.stdout) + self.assertEqual(len(said), 1) + self.assertGreater(len(said.pop()), 10_000) + + def test_the_source_can_come_from_the_environment(self): + done = subprocess.run([sys.executable, str(SERVER), "--check"], capture_output=True, text=True, timeout=60, + env={**os.environ, "BBQS_KG_SOURCE": str(EXPORT)}) + self.assertEqual(done.returncode, 0, done.stderr) + self.assertNotIn("not served from the preferred source", done.stdout) + + +if __name__ == "__main__": + import faulthandler + faulthandler.dump_traceback_later(900, exit=True) # a loop that never ends fails the run, saying where + unittest.main(verbosity=1) diff --git a/src/components/entity-summary/EntityComments.tsx b/src/components/entity-summary/EntityComments.tsx index 12fbe6fb..e38f2ded 100644 --- a/src/components/entity-summary/EntityComments.tsx +++ b/src/components/entity-summary/EntityComments.tsx @@ -11,7 +11,7 @@ import { recordCurationAudit, showUndoableToast } from "@/lib/curation-audit"; interface Comment { id: string; content: string; - user_id: string; + user_id?: string; // only when signed in created_at: string; profile?: { full_name: string | null; email: string }; } @@ -21,27 +21,31 @@ export function EntityComments({ resourceId }: { resourceId: string }) { const queryClient = useQueryClient(); const [newComment, setNewComment] = useState(""); + // A visitor may not read who wrote a comment (user_id, an auth user id: 20261117190000), so it is + // asked for only when signed in. A visitor could never read the authors' profiles anyway, so the + // comments read the same to them as before: text, date, no author. + const signedIn = !!user; const { data: comments = [], isLoading } = useQuery({ - queryKey: ["entity-comments", resourceId], + queryKey: ["entity-comments", resourceId, signedIn], queryFn: async () => { const { data, error } = await supabase .from("entity_comments") - .select("id, content, user_id, created_at") + .select(signedIn ? "id, content, user_id, created_at" : "id, content, created_at") .eq("resource_id", resourceId) .order("created_at", { ascending: true }); if (error) throw error; + const rows = (data || []) as unknown as { id: string; content: string; user_id?: string; created_at: string }[]; // Fetch profiles for comment authors - const userIds = [...new Set((data || []).map((c) => c.user_id))]; - const { data: profiles } = await supabase - .from("profiles") - .select("id, full_name, email") - .in("id", userIds); + const userIds = [...new Set(rows.map((c) => c.user_id).filter((u): u is string => !!u))]; + const { data: profiles } = userIds.length + ? await supabase.from("profiles").select("id, full_name, email").in("id", userIds) + : { data: [] as { id: string; full_name: string | null; email: string }[] }; const profileMap = new Map(profiles?.map((p) => [p.id, p]) || []); - return (data || []).map((c) => ({ + return rows.map((c) => ({ ...c, - profile: profileMap.get(c.user_id), + profile: c.user_id ? profileMap.get(c.user_id) : undefined, })) as Comment[]; }, enabled: !!resourceId, @@ -82,6 +86,7 @@ export function EntityComments({ resourceId }: { resourceId: string }) { // Snapshot before deletion so revert can restore const { data: prev } = await supabase .from("entity_comments") + // signed-in only: deleting is for the comment's author, so user_id is readable here .select("id, resource_id, user_id, parent_id, content, created_at") .eq("id", commentId) .maybeSingle(); @@ -131,7 +136,8 @@ export function EntityComments({ resourceId }: { resourceId: string }) { <span className="text-xs text-muted-foreground"> {format(new Date(c.created_at), "MMM d, yyyy 'at' h:mm a")} </span> - {user?.id === c.user_id && ( + {/* Both sides must be set: a visitor has neither, and undefined === undefined. */} + {!!user && !!c.user_id && user.id === c.user_id && ( <button onClick={() => deleteComment.mutate(c.id)} className="text-muted-foreground hover:text-destructive transition-colors" diff --git a/src/components/entity-summary/summaries/GenericSummary.tsx b/src/components/entity-summary/summaries/GenericSummary.tsx index 5decd7bf..b1389b4d 100644 --- a/src/components/entity-summary/summaries/GenericSummary.tsx +++ b/src/components/entity-summary/summaries/GenericSummary.tsx @@ -12,7 +12,11 @@ export function GenericSummary({ id, type }: { id: string; type: EntityType }) { const { data, isLoading } = useQuery({ queryKey: ["entity-resource", id], queryFn: async () => { - const { data: res, error } = await supabase.from("resources").select("*").eq("id", id).single(); + // Named columns: a visitor may not read created_by (20261117190000), and select("*") asks for it. + const { data: res, error } = await supabase + .from("resources") + .select("id, name, resource_type, description, external_url, metadata, organization_id, created_at, updated_at") + .eq("id", id).single(); if (error) throw error; return res; }, diff --git a/src/components/entity-summary/summaries/GrantSummary.tsx b/src/components/entity-summary/summaries/GrantSummary.tsx index a8196743..daff2706 100644 --- a/src/components/entity-summary/summaries/GrantSummary.tsx +++ b/src/components/entity-summary/summaries/GrantSummary.tsx @@ -16,6 +16,7 @@ import { ProjectQuestionnaireBody } from "@/components/project-profile/ProjectQu import { useProjectProfileEditor } from "@/components/project-profile/useProjectProfileEditor"; import { Database } from "lucide-react"; import { ProvenanceScope } from "@/components/provenance/ProvenanceScope"; +import { fetchPublicProjectMetadata } from "@/lib/projectPublicMetadata"; function formatBytes(bytes: number | null | undefined): string { if (!bytes) return "—"; @@ -83,11 +84,21 @@ export function GrantSummary({ id }: { id: string }) { : { data: [] }; // Get project metadata - const { data: project } = await supabase - .from("projects") - .select("*") - .eq("grant_number", grant.grant_number) - .maybeSingle(); + // Named columns: a visitor may not read last_edited_by or the questionnaire attribution + // (20261117190000), and select("*") asks for them. Nor metadata (20261118120000): every + // questionnaire answer is for signed-in users, and the Summary and Details tabs show only the + // public keys, from project_metadata_public. The Full profile tab reads the rest, signed in. + const [{ data: projectRow }, publicMetadata] = await Promise.all([ + supabase + .from("projects") + .select("id, grant_number, grant_id, organization_id, resource_id, metadata_completeness, keywords, study_species, study_human, website, onboarding_status, created_at, updated_at") + .eq("grant_number", grant.grant_number) + .maybeSingle(), + fetchPublicProjectMetadata([grant.grant_number]), + ]); + const project = projectRow + ? { ...projectRow, metadata: publicMetadata.get(grant.grant_number) ?? {} } + : null; // Get linked EMBER dandisets (read-only, public) const { data: dsLinks } = await supabase diff --git a/src/components/entity-summary/summaries/InvestigatorSummary.tsx b/src/components/entity-summary/summaries/InvestigatorSummary.tsx index 27851957..844b4293 100644 --- a/src/components/entity-summary/summaries/InvestigatorSummary.tsx +++ b/src/components/entity-summary/summaries/InvestigatorSummary.tsx @@ -1,6 +1,7 @@ import { useState, useCallback } from "react"; import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query"; import { supabase } from "@/integrations/supabase/client"; +import { selectWithOptionalColumns } from "@/lib/optionalColumns"; import { SummaryField } from "../SummaryField"; import { SummaryTabs } from "../SummaryTabs"; import { useEntitySummary } from "@/contexts/EntitySummaryContext"; @@ -14,6 +15,7 @@ import { Skeleton } from "@/components/ui/skeleton"; import { Progress } from "@/components/ui/progress"; import { ExternalLink, FileText, User, Pencil, Check, X, UserCheck, UserPlus, Plus } from "lucide-react"; import { useToast } from "@/hooks/use-toast"; +import { alreadyInKgMessage } from "@/lib/alreadyInKg"; import { ProvenanceScope } from "@/components/provenance/ProvenanceScope"; // Editable inline field @@ -387,11 +389,12 @@ export function InvestigatorSummary({ id }: { id: string }) { const { data, isLoading } = useQuery({ queryKey: ["entity-investigator", id], queryFn: async () => { - const { data: inv, error } = await supabase - .from("investigators_public" as any) - .select("*") - .eq("id", id) - .single() as { data: any; error: any }; + // Named public columns: a visitor may not read user_id or pending_role (20261117190000), and + // select("*") asks for both. Ownership is read from the base table (useInvestigatorOwnership). + // `onboarded` exists only once 20261008120000 is applied: asked for as an optional column. + const { data: inv, error } = await selectWithOptionalColumns<any>("investigators_public", + "id, name, orcid, profile_url, role, working_groups, research_areas, skills, resource_id, scholar_id, created_at, updated_at", + ["onboarded"], (query) => query.eq("id", id).single()); if (error) throw error; // Get organizations @@ -509,8 +512,11 @@ export function InvestigatorSummary({ id }: { id: string }) { queryClient.invalidateQueries({ queryKey: ["investigator-private", id] }); toast({ title: "Updated", description: "Profile field saved." }); }, - onError: () => { - toast({ title: "Error", description: "Failed to save. Try again.", variant: "destructive" }); + // An ORCID iD (uq_investigators_orcid_key, 20261117181500), email or name already on another + // record is said as such; any other error as it came, never a bare "try again". + onError: (err: any, vars) => { + const dup = alreadyInKgMessage(err, { [vars.field]: vars.value }); + toast({ title: dup ? "Not saved" : "Error", description: dup ?? err?.message ?? "Failed to save. Try again.", variant: "destructive" }); }, }); diff --git a/src/components/entity-summary/summaries/ResourceSummary.tsx b/src/components/entity-summary/summaries/ResourceSummary.tsx index 8a357d65..23491abd 100644 --- a/src/components/entity-summary/summaries/ResourceSummary.tsx +++ b/src/components/entity-summary/summaries/ResourceSummary.tsx @@ -25,9 +25,10 @@ export function ResourceSummary({ id }: { id: string }) { queryKey: ["entity-resource", id], queryFn: async () => { // Try resources table first + // Named columns: a visitor may not read created_by (20261117190000), and select("*") asks for it. const { data: resource, error } = await supabase .from("resources") - .select("*") + .select("id, name, resource_type, description, external_url, metadata, organization_id, created_at, updated_at") .eq("id", id) .single(); if (error) throw error; diff --git a/src/components/funding/AddFundingOpportunityDialog.tsx b/src/components/funding/AddFundingOpportunityDialog.tsx index 481db057..6862d8f6 100644 --- a/src/components/funding/AddFundingOpportunityDialog.tsx +++ b/src/components/funding/AddFundingOpportunityDialog.tsx @@ -21,6 +21,7 @@ import { SelectValue, } from "@/components/ui/select"; import { toast } from "@/hooks/use-toast"; +import { alreadyInKgMessage } from "@/lib/alreadyInKg"; interface Props { trigger: React.ReactNode; @@ -79,7 +80,10 @@ export function AddFundingOpportunityDialog({ trigger, onCreated }: Props) { }); setSaving(false); if (error) { - toast({ title: "Failed to add opportunity", description: error.message, variant: "destructive" }); + // A FON already in the KG (uq_funding_opportunities_fon_key, 20261117181500, or the exact + // funding_opportunities_fon_key) is said as such; any other error as it came. + const dup = alreadyInKgMessage(error, { fon }); + toast({ title: dup ? "Already in the KG" : "Failed to add opportunity", description: dup ?? error.message, variant: "destructive" }); return; } toast({ title: "Funding opportunity added" }); diff --git a/src/components/profile/MemberProfileEditor.tsx b/src/components/profile/MemberProfileEditor.tsx index 891d58bf..1e2067d9 100644 --- a/src/components/profile/MemberProfileEditor.tsx +++ b/src/components/profile/MemberProfileEditor.tsx @@ -10,6 +10,7 @@ import { Checkbox } from "@/components/ui/checkbox"; import { Loader2 } from "lucide-react"; import { toast } from "sonner"; import { edgeError } from "@/lib/edgeError"; +import { alreadyInKgMessage, saveOwnProfile } from "@/lib/alreadyInKg"; const WORKING_GROUPS = [ { token: "WG-Analytics", label: "Analytics" }, @@ -85,7 +86,9 @@ export function MemberProfileEditor({ embedded = false }: { embedded?: boolean } const save = async () => { setSaving(true); try { - const { data, error } = await supabase.rpc("member_self_update", { + // An ORCID iD already on another person's record is left out and the rest still saved + // (saveOwnProfile); any other refusal saves nothing and is shown as it is. + const { data, error, orcidNotSaved } = await saveOwnProfile((args) => supabase.rpc("member_self_update", args), { _institution: institution.trim() || null, _orcid: orcid.trim() || null, _research_areas: toList(areas), @@ -93,8 +96,12 @@ export function MemberProfileEditor({ embedded = false }: { embedded?: boolean } _secondary_emails: secondary.trim() ? [secondary.trim().toLowerCase()] : [], _requested_working_groups: [...reqWgs], }); - if (error || (data as any)?.ok === false) throw new Error(await edgeError(error, data)); - toast.success("Profile saved" + ([...reqWgs].sort().join() !== current.slice().sort().join() ? " — working-group changes sent for admin approval" : "")); + if (error || (data as any)?.ok === false) { + throw new Error([orcidNotSaved, alreadyInKgMessage(error) ?? await edgeError(error, data)].filter(Boolean).join(" ")); + } + const wgNote = [...reqWgs].sort().join() !== current.slice().sort().join() ? " — working-group changes sent for admin approval" : ""; + if (orcidNotSaved) toast.warning(`Profile saved, except the ORCID iD${wgNote}. ${orcidNotSaved}`, { duration: 15_000 }); + else toast.success("Profile saved" + wgNote); refetch(); } catch (e: any) { toast.error(e?.message ?? "Could not save"); diff --git a/src/components/project-profile/EmberDandisetsPanel.tsx b/src/components/project-profile/EmberDandisetsPanel.tsx index 82a40317..7aac987b 100644 --- a/src/components/project-profile/EmberDandisetsPanel.tsx +++ b/src/components/project-profile/EmberDandisetsPanel.tsx @@ -23,9 +23,11 @@ export function EmberDandisetsPanel({ grantId, canSync = false }: { grantId: str const { data, isLoading, refetch } = useQuery({ queryKey: ["ember-dandisets", grantId], queryFn: async () => { + // Named columns, never dandisets(*): a visitor may not read raw (EMBER's payload, contributor + // e-mail addresses in it) or the curator's hide decision (20261117190000). const { data, error } = await supabase .from("grant_dandisets") - .select("matched_award, dandiset:dandisets(*)") + .select("matched_award, dandiset:dandisets(id, dandiset_id, name, contact_name, file_count, size_bytes, species, draft_url, neurosift_url)") .eq("grant_id", grantId); if (error) throw error; return data || []; diff --git a/src/components/project-profile/useProjectProfileEditor.ts b/src/components/project-profile/useProjectProfileEditor.ts index 22cf6fa6..9708d681 100644 --- a/src/components/project-profile/useProjectProfileEditor.ts +++ b/src/components/project-profile/useProjectProfileEditor.ts @@ -16,26 +16,40 @@ import { useAuth } from "@/contexts/AuthContext"; import { toast } from "@/hooks/use-toast"; import { useFieldProvenance } from "@/hooks/useFieldProvenance"; import { TOP_LEVEL_FIELDS, COMPLETENESS_FIELDS } from "@/data/questionnaire-fields"; +import { alreadyInKgMessage } from "@/lib/alreadyInKg"; + +/** The project row's columns anyone may read (20261117190000). */ +const PROJECT_COLUMNS = + "id, grant_number, grant_id, organization_id, resource_id, metadata_completeness, keywords, study_species, study_human, website, onboarding_status, created_at, updated_at"; export function useProjectProfileEditor(grantNumber: string | null, canEdit: boolean) { const { user } = useAuth(); const queryClient = useQueryClient(); const [changes, setChanges] = useState<Record<string, any>>({}); const [isCommitting, setIsCommitting] = useState(false); + // Every questionnaire answer (projects.metadata) is for signed-in users only (20261118120000), and + // the profile shows a visitor the sign-in gate anyway. A visitor's row therefore has no metadata. + const signedIn = !!user; const { data, isLoading } = useQuery({ // Same key as the page used, so opening the tab after the page (or the reverse) is a cache hit - // and the two never show different values for the same project. - queryKey: ["project-profile", grantNumber], + // and the two never show different values for the same project. Signing in is part of the key: + // a visitor's row (no answers) must never be the one an editor saves over. + queryKey: ["project-profile", grantNumber, signedIn], enabled: !!grantNumber, queryFn: async () => { const { data: grant, error: gErr } = await supabase .from("grants").select("*").eq("grant_number", grantNumber!).maybeSingle(); if (gErr) throw gErr; if (!grant) return null; + // Named columns: a visitor may not read last_edited_by or the questionnaire attribution + // (20261117190000), and select("*") asks for them; metadata only signed in. + const columns = signedIn ? `${PROJECT_COLUMNS}, metadata` : PROJECT_COLUMNS; const { data: project } = await supabase - .from("projects").select("*").eq("grant_number", grantNumber!).maybeSingle(); - return { grant, project }; + .from("projects") + .select(columns) + .eq("grant_number", grantNumber!).maybeSingle(); + return { grant, project, hasAnswers: signedIn }; }, }); @@ -103,6 +117,9 @@ export function useProjectProfileEditor(grantNumber: string | null, canEdit: boo ...topLevel, }; if (Object.keys(metaChanges).length > 0) { + // The write replaces metadata whole, so it must start from every answer: a row read without + // them (signed out, or before the row was read signed in) would erase the rest. + if (!data.hasAnswers) throw new Error("Sign in again to save: the questionnaire answers were not loaded."); row.metadata = { ...((data.project as any)?.metadata || {}), ...metaChanges }; } const { error } = await (supabase.from("projects" as any) as any) @@ -129,7 +146,10 @@ export function useProjectProfileEditor(grantNumber: string | null, canEdit: boo // showing the value that was just replaced. queryClient.invalidateQueries({ queryKey: ["kg-projects"] }); } catch (e: any) { - toast({ title: "Save failed", description: e.message, variant: "destructive" }); + // The upsert matches the project by its exact grant_number, so a project row holding this award + // under another spelling of its number is refused by uq_projects_award_key (20261117181500): + // said as such. Any other error as it came. + toast({ title: "Save failed", description: alreadyInKgMessage(e, { award: data?.grant?.grant_number }) ?? e.message, variant: "destructive" }); } finally { setIsCommitting(false); } diff --git a/src/hooks/useMarrProjects.ts b/src/hooks/useMarrProjects.ts index 57747d66..b3be829f 100644 --- a/src/hooks/useMarrProjects.ts +++ b/src/hooks/useMarrProjects.ts @@ -6,8 +6,9 @@ * * The transformation logic below is lifted UNCHANGED from the YAML hook, so every consumer * (5 diagrams, Species.tsx, SpeciesSummary) receives the same shape it always did. Only the source - * changed: KG `projects.metadata` for the Marr levels and synergy prose, and the already-cached - * `nih-grants` response for titles, institutions and PI names. + * changed: KG `projects.metadata` for the Marr levels and synergy prose (its public keys, through + * project_metadata_public: these pages are public), and the already-cached `nih-grants` response + * for titles, institutions and PI names. * * WHERE EACH FIELD COMES FROM now that it is the KG: * computational / algorithmic / implementation metadata.marr_l1/l2/l3_* @@ -28,6 +29,7 @@ import { useMemo } from "react"; import { useQuery } from "@tanstack/react-query"; import { supabase } from "@/integrations/supabase/client"; import { coreGrantNumber } from "@/lib/grantNumber"; +import { fetchPublicProjectMetadata } from "@/lib/projectPublicMetadata"; import type { MarrProject } from "@/data/marr-projects"; import type { SynergyNode, SynergyLink } from "@/data/marr-synergies"; @@ -256,11 +258,17 @@ export function useMarrProjects(): MarrProjectsData { queryKey: ["marr-projects-kg"], staleTime: 60 * 60 * 1000, queryFn: async () => { - const { data, error } = await supabase - .from("projects") - .select("grant_number, study_species, keywords, metadata"); + // Not metadata: every questionnaire answer is for signed-in users (20261118120000). These pages + // are public, and read the keys they show from project_metadata_public. + const [{ data, error }, publicMetadata] = await Promise.all([ + supabase.from("projects").select("grant_number, study_species, keywords"), + fetchPublicProjectMetadata(), + ]); if (error) throw error; - return data ?? []; + return (data ?? []).map((p) => ({ + ...p, + metadata: (p.grant_number ? publicMetadata.get(p.grant_number) : undefined) ?? null, + })); }, }); diff --git a/src/hooks/useResources.ts b/src/hooks/useResources.ts index aec9955f..08c73d8f 100644 --- a/src/hooks/useResources.ts +++ b/src/hooks/useResources.ts @@ -41,13 +41,17 @@ const mapDbToResource = (row: any): Resource => { }; }; +// The resources columns a visitor may read. Named, never "*": anon may not read created_by +// (20261117190000), and select("*") asks for it. +const RESOURCE_COLUMNS = "id, name, resource_type, description, external_url, metadata, organization_id, created_at, updated_at"; + export function useResources(category?: string) { return useQuery<Resource[]>({ queryKey: ["resources", category], queryFn: async () => { let query = supabase .from("resources") - .select("*") + .select(RESOURCE_COLUMNS) .in("resource_type", ["software", "ml_model", "dataset", "benchmark", "protocol", "tool"]); if (category) { @@ -62,7 +66,7 @@ export function useResources(category?: string) { const types = typeMap[category] || [category.toLowerCase() as ResourceType]; query = supabase .from("resources") - .select("*") + .select(RESOURCE_COLUMNS) .in("resource_type", types); } diff --git a/src/lib/alreadyInKg.ts b/src/lib/alreadyInKg.ts new file mode 100644 index 00000000..c2e3711d --- /dev/null +++ b/src/lib/alreadyInKg.ts @@ -0,0 +1,122 @@ +// A write the database refused as a duplicate (23505, unique_violation), said as what it is. +// +// WHY (2026-11-17). Migration 20261117181500 makes the database refuse a second record for an +// identity key: an ORCID iD, a DOI or PMID, a funding call's FON, an award number, an organization's +// name (its uq_* indexes, kg/identity_keys.json). Each page that writes one of those columns then +// meets a 23505 where it met none before, and showed it raw ("duplicate key value violates unique +// constraint "uq_investigators_orcid_key""), or not at all. These helpers say which key is already +// in the KG and what to do about it, and leave every other error alone: a caller shows that one as +// it came. +// +// No imports and only erasable TypeScript, so tests/guards/write-paths-get-or-create.test.mjs can +// load this file in Node. + +export interface UniqueViolation { + /** The index or constraint that refused the write, e.g. uq_investigators_orcid_key. */ + constraint: string | null; + /** The key the database compared, from "Key (kg_orcid_key(orcid))=(0000-0002-1825-0097) already exists." */ + key: string | null; +} + +const textOf = (e: unknown): string => { + if (e == null) return ""; + if (typeof e === "string") return e; + const o = e as { message?: unknown; details?: unknown; hint?: unknown }; + return [o.message, o.details, o.hint].filter((x) => typeof x === "string" && x).join(" "); +}; + +/** The refusal, when `e` is a unique violation (a supabase-js error, or an Error that carries + * PostgREST's body); null for every other error. */ +export function uniqueViolation(e: unknown): UniqueViolation | null { + if (!e) return null; + const t = textOf(e); + const coded = typeof e === "object" && (e as { code?: unknown }).code === "23505"; + if (!coded && !/"code"\s*:\s*"23505"/.test(t) && !/duplicate key value violates unique constraint/i.test(t)) return null; + const c = t.match(/unique constraint \\?"([^"\\]+)\\?"/); + const k = t.match(/Key \((.+?)\)=\((.*?)\) already exists/); + return { constraint: c ? c[1] : null, key: k ? k[2] : null }; +} + +export type KeyKind = "orcid" | "doi" | "pmid" | "fon" | "award" | "organization" | "email" | "name" | "node"; + +/** What a refused key is, by the name of the index or constraint that refused it. A URL is none: + * no index refuses a URL another record has (a landing page serves several), so a constraint this + * does not know is said generically. */ +export function keyKind(constraint: string | null): KeyKind | null { + const c = (constraint ?? "").toLowerCase(); + if (c.includes("orcid")) return "orcid"; + if (c.includes("doi")) return "doi"; + if (c.includes("pmid")) return "pmid"; + if (c.includes("resource_id")) return "node"; + if (c.includes("fon")) return "fon"; + if (c.includes("award") || c.includes("grant_number")) return "award"; + if (c.includes("organization")) return "organization"; + if (c.includes("email")) return "email"; + if (c.includes("name")) return "name"; + return null; +} + +/** A sentence for a write the database refused as a duplicate, or null when `e` is not a unique + * violation (then show `e` as it is). `typed` holds what the person typed for each key the write + * carried ({ doi }, { fon }), shown instead of the key the database folded it to. */ +export function alreadyInKgMessage(e: unknown, typed: Partial<Record<KeyKind, string | null | undefined>> = {}): string | null { + const v = uniqueViolation(e); + if (!v) return null; + const kind = keyKind(v.constraint); + const shown = String((kind && typed[kind]) ?? "").trim() || v.key || "this value"; + switch (kind) { + case "orcid": + return `The ORCID iD ${shown} is already on another person's record in the KG, and one ORCID iD is one person, so it was not saved. If that record is you, ask a curator to merge the two records.`; + case "doi": + return `A publication with the DOI ${shown} is already in the KG (DOIs are compared without case or a doi.org prefix), so it was not added again.`; + case "pmid": + return `A publication with the PMID ${shown} is already in the KG, so it was not added again.`; + case "fon": + return `The funding opportunity ${shown} is already in the KG (FONs are compared without case, spaces or dashes), so it was not added again. Edit that one instead.`; + case "award": + return `The award ${shown} is already in the KG under another spelling of its number, so nothing was saved. Ask a curator to correct the number on one of the two records.`; + case "organization": + return `The organization ${shown} is already in the KG (names are compared without case or punctuation), so it was not added again.`; + case "email": + return `The email address ${shown} is already on another person's record in the KG, so it was not saved. Ask a curator to merge the two records.`; + case "name": + return `Another record in the KG already has the name ${shown}, so it was not saved. Ask a curator whether they are one person.`; + case "node": + return "This record's node in the KG belongs to another record, so nothing was saved. Ask a curator."; + default: + return `This is already in the KG (${v.constraint ?? "a unique key"}), so nothing was saved.`; + } +} + +/** member_self_update's arguments (supabase/migrations/20261028130000_working_group_cross_species.sql). */ +export interface OwnProfileArgs { + _institution: string | null; + _orcid: string | null; + _research_areas: string[] | null; + _skills: string[] | null; + _secondary_emails: string[] | null; + _requested_working_groups: string[] | null; +} + +export interface OwnProfileSave { + data: unknown; + error: unknown; + /** Set when the ORCID iD was left out because another person's record holds it. */ + orcidNotSaved: string | null; +} + +/** Save the signed-in member's own profile with member_self_update. The RPC writes every field in one + * UPDATE, so an ORCID iD that is already on another person's record (uq_investigators_orcid_key) + * refuses all of them. Then the save is made again without the ORCID (a null _orcid keeps the stored + * one), and `orcidNotSaved` says why it was left out. Any other error comes back as it came, and + * nothing is retried for it. */ +export async function saveOwnProfile( + call: (args: OwnProfileArgs) => PromiseLike<{ data: unknown; error: unknown }>, + args: OwnProfileArgs, +): Promise<OwnProfileSave> { + const first = await call(args); + const v = uniqueViolation(first.error); + if (!v || keyKind(v.constraint) !== "orcid" || !args._orcid) return { data: first.data, error: first.error, orcidNotSaved: null }; + const again = await call({ ...args, _orcid: null }); + return { data: again.data, error: again.error, orcidNotSaved: alreadyInKgMessage(first.error, { orcid: args._orcid }) }; +} diff --git a/src/lib/optionalColumns.ts b/src/lib/optionalColumns.ts new file mode 100644 index 00000000..e32ced5f --- /dev/null +++ b/src/lib/optionalColumns.ts @@ -0,0 +1,44 @@ +// Columns that exist only once a hand-applied migration has run. +// +// Migrations here are applied by hand in the SQL editor, so the live database can lack a column the +// code already knows. A select that NAMES a missing column is refused whole (PostgREST 400, code +// 42703: "column investigators_public.onboarded does not exist"), where select("*") just returned +// the rows without it. Since 20261117190000 these views must be read by named columns, so a missing +// optional column would take the whole page down. On 2026-11-18 production's investigators_public +// had no `onboarded` (20261008120000 was not applied), and the People page and the person summary +// both named it. +// +// selectWithOptionalColumns asks for the optional columns too, and when the database says one does +// not exist it asks again without that one. The rows then simply lack the field, which every caller +// must already tolerate ("code must degrade gracefully when a migration has not been applied yet"). +// tests/guards/optional-columns holds every reader of a registered column to this helper. +import { supabase } from "@/integrations/supabase/client"; + +/** object -> { column: the migration that adds it }. */ +export const OPTIONAL_COLUMNS: Record<string, Record<string, string>> = { + investigators_public: { onboarded: "20261008120000_people_page_onboarded_members" }, +}; + +type Result<T> = { data: T | null; error: { code?: string; message?: string } | null }; + +/** + * select `required` plus `optional` from `object`; drop an optional column the database lacks and + * retry. `refine` adds the filters and modifiers (eq, single, order ...) to the query. + */ +export async function selectWithOptionalColumns<T = any>( + object: string, + required: string, + optional: readonly string[], + refine: (query: any) => PromiseLike<Result<T>> = (query) => query, +): Promise<Result<T>> { + let extra = [...optional]; + for (;;) { + const res = await refine((supabase.from(object as any) as any).select([required, ...extra].join(", "))); + const gone = res.error?.code === "42703" + ? /column (?:[\w"]+\.)?"?(\w+)"? does not exist/.exec(res.error.message ?? "")?.[1] + : undefined; + if (!gone || !extra.includes(gone)) return res; + console.warn(`${object}: column ${gone} does not exist in this database yet; read without it`); + extra = extra.filter((column) => column !== gone); + } +} diff --git a/src/lib/projectPublicMetadata.ts b/src/lib/projectPublicMetadata.ts new file mode 100644 index 00000000..ef78899d --- /dev/null +++ b/src/lib/projectPublicMetadata.ts @@ -0,0 +1,79 @@ +// The questionnaire answers a visitor may read: the keys of projects.metadata the public pages show, +// from the view project_metadata_public (supabase/migrations/20261118120000_privacy_round_two.sql). +// +// projects.metadata itself holds every answer, free text included, and once that migration is applied +// only signed-in users may read it. A page that shows answers to everyone reads them here, so the same +// code works for a visitor and for a member, before the migration and after it: +// * after it: the view carries exactly PUBLIC_METADATA_KEYS (and, under `devices`, PUBLIC_DEVICE_KEYS); +// * before it (the migration is applied by hand, and is on hold): the view does not exist, the +// column is still readable by everyone, so it is read once and cut down to the same keys. The pages +// show the same content in both states, whichever is deployed first. +// A key a public page starts to show must be added to the view and to these lists; +// tests/guards/anon-private-columns holds the three equal. +import { supabase } from "@/integrations/supabase/client"; + +export type PublicProjectMetadata = Record<string, any>; + +/** The keys of projects.metadata project_metadata_public exposes. */ +export const PUBLIC_METADATA_KEYS = [ + "use_approaches", "marr_l1_ethological_goal", "marr_l2_algorithmic_function", + "marr_l3_implementational_hardware", "cross_project_synergy", "data_analysis_approach", + "target_species_domain", "agentic_action_required", "experimental_approaches", "data_modalities", + "data_type", "analysis_types", "analysis_methods", "software_tools_used", "produce_data_modality", + "produce_data_type", "use_analysis_types", "use_analysis_method", "develope_software_type", "devices", +] as const; + +/** The keys of metadata.devices it exposes. */ +export const PUBLIC_DEVICE_KEYS = [ + "sensor", "data_acquisition_modalities", "behavioral_rigs", "electrophysiology_setup", +] as const; + +/** What the view would return for one project's metadata: the public keys only. */ +export function publicSubset(metadata: unknown): PublicProjectMetadata { + const out: PublicProjectMetadata = {}; + if (!metadata || typeof metadata !== "object" || Array.isArray(metadata)) return out; + const source = metadata as Record<string, unknown>; + for (const key of PUBLIC_METADATA_KEYS) { + if (!(key in source)) continue; + if (key !== "devices") { out[key] = source[key]; continue; } + const devices = source.devices; + if (!devices || typeof devices !== "object" || Array.isArray(devices)) { out.devices = null; continue; } + out.devices = Object.fromEntries( + PUBLIC_DEVICE_KEYS.filter((k) => k in (devices as Record<string, unknown>)) + .map((k) => [k, (devices as Record<string, unknown>)[k]]), + ); + } + return out; +} + +/** The view is missing: 20261118120000 is not applied (PostgREST PGRST205; Postgres 42P01). */ +const viewMissing = (error: { code?: string } | null) => error?.code === "PGRST205" || error?.code === "42P01"; + +/** grant_number -> the public keys of that project's metadata, for the given projects (every project + * when none are given). Empty, not an error, when neither read is allowed. */ +export async function fetchPublicProjectMetadata(grantNumbers?: string[]): Promise<Map<string, PublicProjectMetadata>> { + const out = new Map<string, PublicProjectMetadata>(); + if (grantNumbers && grantNumbers.length === 0) return out; + let query = (supabase.from("project_metadata_public" as any) as any).select("grant_number, metadata"); + if (grantNumbers) query = query.in("grant_number", grantNumbers); + let { data, error } = await query; + if (viewMissing(error)) { + let fallback = (supabase.from("projects") as any) + // before 20261118120000 only: the view does not exist yet, and anon may still read the column + .select("grant_number, metadata"); + if (grantNumbers) fallback = fallback.in("grant_number", grantNumbers); + const before = await fallback; + error = before.error; + data = (before.data ?? []).map((row: { grant_number: string | null; metadata: unknown }) => ({ + grant_number: row.grant_number, metadata: publicSubset(row.metadata), + })); + } + if (error) { + console.warn("public project metadata:", error.message); + return out; + } + for (const row of (data ?? []) as { grant_number: string | null; metadata: PublicProjectMetadata | null }[]) { + if (row.grant_number) out.set(row.grant_number, row.metadata ?? {}); + } + return out; +} diff --git a/src/pages/AdminAccessRequests.tsx b/src/pages/AdminAccessRequests.tsx index 0ace6209..5049cdfc 100644 --- a/src/pages/AdminAccessRequests.tsx +++ b/src/pages/AdminAccessRequests.tsx @@ -12,6 +12,7 @@ import { Loader2, Lock, Mail, Check, X, UserPlus, AlertTriangle, Trash2 } from " import { toast } from "sonner"; import { format } from "date-fns"; import { PageMeta } from "@/components/PageMeta"; +import { alreadyInKgMessage } from "@/lib/alreadyInKg"; import { useSortableTable } from "@/components/admin/useSortableTable"; import { Dialog, @@ -232,7 +233,8 @@ export default function AdminAccessRequests({ embedded = false }: AdminAccessReq return; } } - throw invErr; + // An email already on another record (investigators_email_unique_ci) is said as such. + throw new Error(alreadyInKgMessage(invErr, { email, name }) ?? invErr.message); } } @@ -353,7 +355,7 @@ export default function AdminAccessRequests({ embedded = false }: AdminAccessReq const { error: invErr } = await supabase .from("investigators") .insert({ name: disambiguated, email }); - if (invErr) throw invErr; + if (invErr) throw new Error(alreadyInKgMessage(invErr, { email, name: disambiguated }) ?? invErr.message); const { error } = await supabase .from("access_requests") diff --git a/src/pages/AdminUsers.tsx b/src/pages/AdminUsers.tsx index db5d4ae4..7c941340 100644 --- a/src/pages/AdminUsers.tsx +++ b/src/pages/AdminUsers.tsx @@ -38,6 +38,7 @@ import { AlertDialogTitle, } from "@/components/ui/alert-dialog"; import { PageMeta } from "@/components/PageMeta"; +import { alreadyInKgMessage } from "@/lib/alreadyInKg"; type AssignableRole = "admin" | "curator" | "member"; @@ -307,7 +308,9 @@ export default function AdminUsers({ embedded = false }: AdminUsersProps = {}) { email, pending_role: addRole === "member" ? null : addRole, }); - if (error) throw error; + // An email or name already on another record (investigators_email_unique_ci, + // investigators_name_key) is said as such; any other error as it came. + if (error) throw new Error(alreadyInKgMessage(error, { email, name }) ?? error.message); toast.success( `Invited ${email}. Tier ${TIER_META[addRole].tier} will be applied on their first sign-in.`, ); @@ -392,7 +395,7 @@ export default function AdminUsers({ embedded = false }: AdminUsersProps = {}) { secondary_emails: cleanedSecondaries, }) .eq("id", emailEditTarget.investigator_id); - if (error) throw error; + if (error) throw new Error(alreadyInKgMessage(error, { email: primary, name: trimmedName }) ?? error.message); // Also sync full_name on the linked auth profile, if any. const { data: linkedInv } = await supabase @@ -524,7 +527,9 @@ export default function AdminUsers({ embedded = false }: AdminUsersProps = {}) { onClick: async () => { try { const { error } = await supabase.from("investigators").insert(existing as any); - if (error) throw error; + // Restored as it was: a key another record took in the meantime (its email, ORCID iD or + // node) is said as such. + if (error) throw new Error(alreadyInKgMessage(error) ?? error.message); toast.success("Investigator restored"); queryClient.invalidateQueries({ queryKey: ["admin-users-list-v2"] }); } catch (e: any) { diff --git a/src/pages/Announcements.tsx b/src/pages/Announcements.tsx index cb660ec2..ef72d4ef 100644 --- a/src/pages/Announcements.tsx +++ b/src/pages/Announcements.tsx @@ -39,9 +39,10 @@ const Announcements = () => { const { data: announcements, isLoading } = useQuery({ queryKey: ["announcements"], queryFn: async () => { + // Named columns: a visitor may not read posted_by (20261117190000), and select("*") asks for it. const { data, error } = await (supabase as any) .from("announcements") - .select("*") + .select("id, title, content, link, link_text, is_external_link, organization_id, resource_id, created_at, updated_at") .order("created_at", { ascending: false }); if (error) throw error; return data as any[]; diff --git a/src/pages/FeatureSuggestions.tsx b/src/pages/FeatureSuggestions.tsx index 72538865..199b3bde 100644 --- a/src/pages/FeatureSuggestions.tsx +++ b/src/pages/FeatureSuggestions.tsx @@ -39,12 +39,17 @@ export default function FeatureSuggestions() { const [githubUsername, setGithubUsername] = useState(""); const [search, setSearch] = useState(""); + // Who submitted a suggestion is shown to signed-in members only: a visitor may not read + // submitter_name or github_username (20261117190000), so asking for them as one fails the query. + const signedIn = !!user; const { data: suggestions = [], isLoading } = useQuery<Suggestion[]>({ - queryKey: ["feature-suggestions"], + queryKey: ["feature-suggestions", signedIn], queryFn: async () => { + const columns = "id, title, description, github_issue_number, github_issue_url, status, votes, target_version, created_at, updated_at" + + (signedIn ? ", submitter_name, github_username" : ""); const { data, error } = await supabase .from("feature_suggestions_public" as any) - .select("*") + .select(columns) .order("created_at", { ascending: false }) .limit(200); if (error) throw error; diff --git a/src/pages/PrincipalInvestigators.tsx b/src/pages/PrincipalInvestigators.tsx index ce4d8c5b..abbfe4f3 100644 --- a/src/pages/PrincipalInvestigators.tsx +++ b/src/pages/PrincipalInvestigators.tsx @@ -20,6 +20,7 @@ import { Checkbox } from "@/components/ui/checkbox"; import { Loader2, Users, ExternalLink, Columns3, Filter } from "lucide-react"; import { Card, CardContent } from "@/components/ui/card"; import { supabase } from "@/integrations/supabase/client"; +import { selectWithOptionalColumns } from "@/lib/optionalColumns"; import { normalizePiName, piProfileUrl, institutionUrl } from "@/lib/pi-utils"; import { MARR_PROJECTS } from "@/data/marr-projects"; // Note: PrincipalInvestigators still uses static MARR_PROJECTS as fallback @@ -364,7 +365,11 @@ const ResearchAreasCell = ({ data }: { data: PIRow }) => { /* ── Data fetching ── */ const fetchPIs = async (): Promise<PIRow[]> => { const [invResult, grantsResult, giResult, ioResult, orgResult] = await Promise.all([ - supabase.from("investigators_public" as any).select("*"), + // Named columns, never "*": anon may read only the public columns of this view (20261117190000), + // and select=* asks for user_id and pending_role too, which a visitor is refused. `onboarded` + // exists only once 20261008120000 is applied, so it is asked for as an optional column. + selectWithOptionalColumns("investigators_public", + "id, name, profile_url, working_groups, research_areas, skills, resource_id", ["onboarded"]), supabase.from("grants").select("*"), supabase.from("grant_investigators").select("*"), supabase.from("investigator_organizations").select("investigator_id, organization_id"), @@ -396,8 +401,8 @@ const fetchPIs = async (): Promise<PIRow[]> => { // Include investigators who have grants, working groups, or went through onboarding. The // roster is RePORTER-derived, so onboarded trainees/staff with no grant picked were invisible - // here (Jared Reiling, #232). `onboarded` comes from 20261008120000; until that is - // applied it is undefined and this falls back to grants-or-working-groups. + // here (Jared Reiling, #232). `onboarded` comes from 20261008120000, which production did not + // have on 2026-11-18; a row without it falls back to grants-or-working-groups. if (piGrantLinks.length === 0 && wgs.length === 0 && inv.onboarded !== true) continue; let piAsPi = 0; diff --git a/src/pages/Publications.tsx b/src/pages/Publications.tsx index bb4c1af5..28bf246b 100644 --- a/src/pages/Publications.tsx +++ b/src/pages/Publications.tsx @@ -18,6 +18,7 @@ import { Skeleton } from "@/components/ui/skeleton"; import { Badge } from "@/components/ui/badge"; import { HoverCard, HoverCardTrigger, HoverCardContent } from "@/components/ui/hover-card"; import { toast } from "sonner"; +import { alreadyInKgMessage } from "@/lib/alreadyInKg"; import "ag-grid-community/styles/ag-grid.css"; import "ag-grid-community/styles/ag-theme-alpine.css"; @@ -187,7 +188,9 @@ export default function Publications() { setPubForm(INITIAL_PUB_FORM); toast.success("Publication added successfully!"); }, - onError: (err: any) => toast.error(err.message || "Failed to add publication"), + // A DOI already in the KG (uq_publications_doi_key, 20261117181500) is said as such; any other + // error as it came. + onError: (err: any, vars) => toast.error(alreadyInKgMessage(err, { doi: vars?.doi }) ?? (err.message || "Failed to add publication")), }); const handlePubSubmit = (e: React.FormEvent) => { diff --git a/supabase/functions/_shared/identity-keys.ts b/supabase/functions/_shared/identity-keys.ts new file mode 100644 index 00000000..85047582 --- /dev/null +++ b/supabase/functions/_shared/identity-keys.ts @@ -0,0 +1,147 @@ +// The BBQS identity keys: when two records are the same thing, decided by one rule per key. +// +// Each rule is stated once, in kg/identity_keys.json, with the vectors that pin it down, and is +// implemented three times, identically: +// SQL public.kg_<key>_key (supabase/migrations/*_prevent_duplicates.sql; the uq_* indexes) +// TypeScript this module (what the write paths look up by, through _shared/kg-write.ts) +// Python kg/identity_keys.py (kg/quality.py duplicates(), the exporter) +// tests/guards/identity-normalization runs every vector through this module and holds it to the +// migration's self-test block and to the Python module. +// +// The conventions are the ones Postgres (COLLATE "C"), JavaScript and Python can all do the same way: +// * whitespace is ASCII only: space, \t, \n, \v, \f, \r; "trim" strips those at both ends; +// * case is mapped for A-Z / a-z only, through a character-code map, never toLowerCase() or +// toUpperCase(): 'ß'.toUpperCase() is 'SS', and 'İ'.toLowerCase() is two characters; +// * digits are [0-9]; +// * null means no key: the value is neither enforced nor matched, so two missing values never +// collide. +// +// No imports, no Deno globals and erasable TypeScript only: the Node guards import this file directly. +// +// Two of the rules are not identity keys: urlKey (a URL can be a landing page several records share, +// so no index enforces it) and the pairing rule's parts, titleKey, isPreprint and preprintIsLater, +// by which public.kg_link_publication_versions links a preprint to its published version. + +// Where a preprint lives: by venue (the lower-cased journal contains one), by DOI prefix, or by the +// shape of a bioRxiv/medRxiv DOI. 10.1101/ is no prefix here: Cold Spring Harbor Laboratory Press +// publishes Genome Res, Genes Dev and Learn Mem under it too (10.1101/gr..., /gad..., /lm...). +export const PREPRINT_VENUES = ["biorxiv", "medrxiv", "arxiv", "research square", "res sq", "ssrn", "psyarxiv", "preprints"]; +export const PREPRINT_DOI_PREFIXES = ["10.64898/", "10.48550/", "10.21203/", "10.2139/", "10.31234/", "10.20944/"]; +export const PREPRINT_DOI_PATTERNS = ["^10\\.1101/([0-9]{4}\\.[0-9]{2}\\.[0-9]{2}\\.)?[0-9]{6,}"]; +const PREPRINT_DOI = PREPRINT_DOI_PATTERNS.map((p) => new RegExp(p)); +// The posting date a bioRxiv or medRxiv DOI carries (10.1101/ or bioRxiv's 2026 prefix 10.64898/, +// then YYYY.MM.DD.): when the first version was posted. Its group 1 is the year. +export const PREPRINT_DOI_DATE = "^10\\.(?:1101|64898)/([0-9]{4})\\.[0-9]{2}\\.[0-9]{2}\\.[0-9]{6,}"; +const DOI_DATE = new RegExp(PREPRINT_DOI_DATE); + +// Greek letters by name, so the name and title rules keep them (alpha-synuclein and beta-synuclein +// are two titles): every capital (U+0391-U+03A9) and small letter (U+03B1-U+03C9) of the basic Greek +// block, in alphabet order, and the final sigma (U+03C2). NFKD maps the compatibility forms onto +// these first (the micro sign to mu, the ohm sign to omega, an accented letter to letter + mark). +const GREEK_NAMES = ["alpha", "beta", "gamma", "delta", "epsilon", "zeta", "eta", "theta", "iota", "kappa", + "lambda", "mu", "nu", "xi", "omicron", "pi", "rho", "sigma", "tau", "upsilon", "phi", "chi", "psi", "omega"]; +// The 18th letter, sigma, comes after U+03A2 (unassigned) and U+03C2 (the final sigma). +const letter = (first: number, i: number) => String.fromCharCode(first + i + (i >= 17 ? 1 : 0)); +export const GREEK: Record<string, string> = Object.fromEntries([ + ...GREEK_NAMES.map((n, i) => [letter(0x0391, i), n]), + ...GREEK_NAMES.map((n, i) => [letter(0x03b1, i), n]), + [String.fromCharCode(0x03c2), "sigma"], +]); + +type Text = string | null | undefined; +type Year = number | null | undefined; + +const lower = (s: string) => s.replace(/[A-Z]/g, (c) => String.fromCharCode(c.charCodeAt(0) + 32)); +const upper = (s: string) => s.replace(/[a-z]/g, (c) => String.fromCharCode(c.charCodeAt(0) - 32)); +const trim = (s: string) => s.replace(/^[ \t\n\v\f\r]+|[ \t\n\v\f\r]+$/g, ""); +const greek = (s: string) => Array.from(s, (c) => GREEK[c] ?? c).join(""); + +/** The first ORCID iD anywhere in the value, upper-cased ('...-009x' -> '...-009X'); else null. */ +export function orcidKey(v: Text): string | null { + if (v == null) return null; + const m = String(v).match(/[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{3}[0-9Xx]/); + return m ? upper(m[0]) : null; +} + +/** A DOI without its resolver ('https://doi.org/', 'doi.org/', 'www.doi.org/', 'dx.doi.org/') or its + * 'doi:' / 'doi ', lower-cased, no trailing '/'; null unless it is a DOI. */ +export function doiKey(v: Text): string | null { + if (v == null) return null; + const d = lower(trim(String(v)).replace(/^((https?:\/\/)?((dx|www)\.)?doi\.org\/|doi:?[ \t\n\v\f\r]*)/i, "")).replace(/\/+$/, ""); + return /^10\.[0-9.]+\/[^ \t\n\v\f\r]+$/.test(d) ? d : null; +} + +/** A PubMed id as digits without leading zeros ('PMID: 0041331138', 'PMID 41331138' -> '41331138'); else null. */ +export function pmidKey(v: Text): string | null { + if (v == null) return null; + const p = trim(String(v)).replace(/^pmid:?[ \t\n\v\f\r]*/i, ""); + return /^[0-9]+$/.test(p) ? (p.replace(/^0+/, "") || null) : null; +} + +/** A funding opportunity number, upper-cased, letters and digits only ('rfa ns 27 002' -> 'RFANS27002'). */ +export function fonKey(v: Text): string | null { + return v == null ? null : (upper(String(v)).replace(/[^A-Z0-9]/g, "") || null); +} + +/** The NIH core award number in a grant number ('1R34DA059723-01' -> 'R34DA059723'); else null. + * What a write path stores as grant_number and sends to create_grant, repoint_grant and nih-grants. */ +export function nihAwardCore(v: Text): string | null { + if (v == null) return null; + const m = upper(String(v)).match(/[A-Z][A-Z0-9]{2}[A-Z]{2}[0-9]{6}/); + return m ? m[0] : null; +} + +/** The award key: the NIH core when there is one, else the upper-cased number without whitespace. */ +export function awardKey(v: Text): string | null { + if (v == null) return null; + return nihAwardCore(v) ?? (upper(String(v)).replace(/[ \t\n\v\f\r]/g, "") || null); +} + +/** An organization (or person) name: NFKD, each Greek letter by its name, lower-cased, letters and + * digits only. It catches case, punctuation, spacing and accents; not other wording (an + * organization's ROR id is its identity: "State University of New York at Stony Brook" and "STATE + * UNIVERSITY NEW YORK STONY BROOK" have two name keys). */ +export function nameKey(v: Text): string | null { + return v == null ? null : (lower(greek(String(v).normalize("NFKD"))).replace(/[^a-z0-9]/g, "") || null); +} + +/** A URL without its scheme, 'www.' and trailing '/', lower-cased ('www.x.org/a' = 'https://x.org/a/'). + * Not an identity key: a URL can be a landing page that several records share. */ +export function urlKey(v: Text): string | null { + if (v == null) return null; + return lower(trim(String(v)).replace(/^(https?:\/\/)?(www\.)?/i, "").replace(/\/+$/, "")) || null; +} + +/** A title without markup, folded like a name. Not a key: it pairs a preprint with its published version. */ +export function titleKey(v: Text): string | null { + return v == null ? null : nameKey(String(v).replace(/<[^>]*>/g, "")); +} + +/** Is a publication a preprint, by its venue, its DOI's prefix or the shape of a bioRxiv/medRxiv DOI? */ +export function isPreprint(journal: Text, doi: Text): boolean { + const j = lower(String(journal ?? "")); + const d = doiKey(doi) ?? ""; + return PREPRINT_VENUES.some((x) => j.includes(x)) || PREPRINT_DOI_PREFIXES.some((p) => d.startsWith(p)) + || PREPRINT_DOI.some((p) => p.test(d)); +} + +/** The year a dated bioRxiv/medRxiv DOI was posted ('10.1101/2023.06.25.546478' -> 2023); else null. */ +export function postedYear(doi: Text): number | null { + const m = (doiKey(doi) ?? "").match(DOI_DATE); + return m ? Number(m[1]) : null; +} + +/** Is the preprint later than its published version? First by PubMed id, when both have one and they + * differ (their keys, compared as numbers); otherwise by the preprint's earliest known date against the + * published year: the posting year in a dated bioRxiv/medRxiv DOI, else its own year; else false. + * A preprint's own year drifts later as new versions are posted, so it only breaks a tie. The pairing + * rule never links a later preprint (public.kg_link_publication_versions skips it and says why). */ +export function preprintIsLater( + preprintYear: Year, preprintPmid: Text, preprintDoi: Text, publishedYear: Year, publishedPmid: Text, +): boolean { + const a = pmidKey(preprintPmid); + const b = pmidKey(publishedPmid); + if (a != null && b != null && a !== b) return a.length !== b.length ? a.length > b.length : a > b; // keys have no leading zeros + const first = postedYear(preprintDoi) ?? preprintYear; + return first != null && publishedYear != null && first > publishedYear; +} diff --git a/supabase/functions/_shared/kg-write.ts b/supabase/functions/_shared/kg-write.ts new file mode 100644 index 00000000..0e202da0 --- /dev/null +++ b/supabase/functions/_shared/kg-write.ts @@ -0,0 +1,663 @@ +// Write paths that look before they write: "if you have something in the KG already, you don't want +// to duplicate it" (Tek's review, 2026-11). Every helper here finds an existing record by the same +// identity key the database's uq_* indexes enforce (./identity-keys.ts, kg/identity_keys.json), reuses +// it, and writes only when nothing matches. A 23505 means someone else wrote the record in between: +// the helper reads the table again and reuses that row, so a race never leaves a second record. +// +// Each helper reads its small table once per run (organizations, investigators, publications), into +// the run's KgSession, and folds the keys here rather than with ilike: an ilike pattern treats the +// name's own '%' and '_' as wildcards, and a fold in two languages drifts. +// +// People are written person first, then their node (the spine row in resources), attached only if +// the person still has none. The 10 orphan investigator spine rows of the 11-04 export came from the +// other order: three functions inserted the spine row, then the person insert failed. +// +// Imports only ./identity-keys.ts and uses no Deno globals, so the Node guards can load it +// (tests/guards/write-paths-get-or-create.test.mjs drives these helpers with a fake client). +import { doiKey, nameKey, orcidKey, pmidKey, urlKey, fonKey } from "./identity-keys.ts"; + +/** The part of a supabase-js client these helpers use. */ +export type Db = { from(table: string): any; rpc(fn: string, args?: Record<string, unknown>): any }; + +type Text = string | null | undefined; + +export interface OrgRow { id: string; name: string | null; resource_id?: string | null; created_at?: string | null } +export interface PersonRow { + id: string; name: string | null; email?: string | null; secondary_emails?: string[] | null; orcid?: string | null; + reporter_profile_id?: number | string | null; resource_id?: string | null; created_at?: string | null; +} +export interface PubRow { + id: string; pmid?: string | null; doi?: string | null; title?: string | null; journal?: string | null; + resource_id?: string | null; created_at?: string | null; +} +export interface ResourceRow { + id: string; name: string | null; resource_type: string; external_url?: string | null; + metadata?: { repoUrl?: unknown } | null; repoUrl?: unknown; +} +export interface CallRow { id: string; fon: string | null; url?: string | null; notes?: string | null } + +export interface SpineResult { ok: boolean; resourceId: string | null; created: boolean; error?: string } + +/** What a find-or-create helper did. On failure nothing was written, or only what `error` names. */ +export type Found<T> = + | { ok: true; row: T; created: boolean; matchedBy: string | null; candidates?: number; note?: string; spine?: SpineResult } + | { ok: false; error: string; already_in_kg?: boolean; constraint?: string | null; detail?: string | null; ambiguous?: string[] }; + +// ── Errors ────────────────────────────────────────────────────────────────────────────────────── + +const errText = (e: unknown): string => { + if (e == null) return ""; + if (typeof e === "string") return e; + const o = e as { message?: unknown; details?: unknown; hint?: unknown }; + return [o.message, o.details, o.hint].filter((x) => typeof x === "string" && x).join(" ") || String(e); +}; +const message = (e: unknown) => errText(e) || "unknown error"; + +/** A unique violation (23505): a supabase-js error, or an Error carrying a PostgREST error body. */ +export function isUniqueViolation(e: unknown): boolean { + if (!e) return false; + if (typeof e === "object" && (e as { code?: unknown }).code === "23505") return true; + const t = errText(e); + return /"code"\s*:\s*"23505"/.test(t) || /duplicate key value violates unique constraint/i.test(t); +} + +/** The constraint or index a unique violation names ('unique constraint "uq_..."'), else null. */ +export function violatedConstraint(e: unknown): string | null { + const m = errText(e).match(/unique constraint \\?"([^"\\]+)\\?"/); + return m ? m[1] : null; +} + +/** The violation's detail ('Key (...)=(...) already exists.'), else null. */ +export function violationDetail(e: unknown): string | null { + if (e && typeof e === "object" && typeof (e as { details?: unknown }).details === "string") return (e as { details: string }).details; + const m = errText(e).match(/Key \(.*?\)=\(.*?\) already exists\.?/); + return m ? m[0].replace(/\\"/g, '"') : null; +} + +/** An RPC that is not there yet: PostgREST's PGRST202, Postgres's 42883, or a 404. */ +export function isMissingFunction(e: unknown, status?: number): boolean { + const code = e && typeof e === "object" ? (e as { code?: unknown }).code : undefined; + return code === "PGRST202" || code === "42883" || status === 404 || /PGRST202|Could not find the function/i.test(errText(e)); +} + +/** What a unique violation refused, for a message: '<constraint>: Key (...)=(...) already exists.' */ +export function uniqueViolationText(e: unknown): string { + const constraint = violatedConstraint(e); + const detail = violationDetail(e); + return `${constraint ?? "a unique key"}${detail ? `: ${detail}` : ""}`; +} + +/** A unique violation of the ORCID key (uq_investigators_orcid_key): the one identity key a member's + * own profile carries. */ +export function isOrcidViolation(e: unknown): boolean { + return isUniqueViolation(e) && /orcid/i.test(uniqueViolationText(e)); +} + +/** What the member's own profile save did when its ORCID iD was left out. */ +export interface ProfileSave { result: unknown; saved: string[]; orcidNotSaved: string | null } + +/** member_self_update for update_my_profile. The RPC writes every field in one UPDATE, so an ORCID iD + * another record holds (uq_investigators_orcid_key) refuses them all. Then, and only then (an ORCID + * 23505, an ORCID sent, another field asked), it is called again with a null _orcid, which keeps the + * stored ORCID, and the other fields are saved; `orcidNotSaved` says why the ORCID iD was not. If + * that second call fails too, its error is thrown with the ORCID notice in front, so the member is + * always told the ORCID iD was left out. Any other unique violation is said as such and nothing is + * retried; any other error is thrown as it came. `call` throws on an error, as bbqs-mcp's rpc does. + * (src/lib/alreadyInKg.ts saveOwnProfile is the profile editor's copy of this rule.) */ +export async function saveProfileLeavingOutHeldOrcid( + call: (args: Record<string, unknown>) => Promise<unknown>, args: Record<string, unknown>, asked: string[], +): Promise<ProfileSave> { + try { + return { result: await call(args), saved: asked, orcidNotSaved: null }; + } catch (e) { + if (!isUniqueViolation(e)) throw e; + if (!isOrcidViolation(e) || args._orcid == null) { + throw new Error(`Nothing was saved: the database refused it as a duplicate of another record (${uniqueViolationText(e)}). Ask a curator.`); + } + const notice = `The ORCID iD ${String(args._orcid)} is already on another person's record in the KG (${violatedConstraint(e) ?? "its ORCID key"}), ` + + "so it was not saved: one ORCID iD is one person. If that record is you, ask a curator to merge the two records."; + if (!asked.length) throw new Error(`${notice} Nothing else was asked, so nothing was saved.`); + try { + return { result: await call({ ...args, _orcid: null }), saved: asked, orcidNotSaved: notice }; + } catch (e2) { + throw new Error(`${notice} The other fields (${asked.join(", ")}) were not saved either: ${message(e2)}`); + } + } +} + +function alreadyInKg(e: unknown, what: string): Found<never> { + return { + ok: false, already_in_kg: true, constraint: violatedConstraint(e), detail: violationDetail(e), + error: `${what} is already in the KG (${uniqueViolationText(e)}), but it could not be read back; nothing was written`, + }; +} + +// ── The run's reads ───────────────────────────────────────────────────────────────────────────── + +/** One run's view of the small tables: each is read once, on first use, and kept current as rows are written. */ +export interface KgSession { db: Db; cache: Map<string, unknown[]> } +export const kgSession = (db: Db): KgSession => ({ db, cache: new Map() }); + +const PAGE = 1000; +const ORG_COLUMNS = "id, name, resource_id, created_at"; +const PERSON_COLUMNS = "id, name, email, secondary_emails, orcid, reporter_profile_id, resource_id, created_at"; +const PUB_COLUMNS = "id, pmid, doi, title, journal, resource_id, created_at"; + +/** Every row of a table, in pages (PostgREST caps a response at its max_rows), cached for the run. */ +async function readAll<T>(kg: KgSession, table: string, columns: string, refresh = false): Promise<T[]> { + if (!refresh && kg.cache.has(table)) return kg.cache.get(table) as T[]; + const out: T[] = []; + for (let from = 0, pages = 0; pages < 100; pages++) { + const { data, error, count } = await kg.db.from(table).select(columns, { count: "exact" }) + .order("id").range(from, from + PAGE - 1); + if (error) throw new Error(`could not read ${table}: ${message(error)}`); + const page = (data ?? []) as T[]; + out.push(...page); + from += page.length; + if (page.length === 0 || (typeof count === "number" ? out.length >= count : page.length < PAGE)) break; + } + kg.cache.set(table, out); + return out; +} + +export const loadOrganizations = (kg: KgSession, refresh = false) => readAll<OrgRow>(kg, "organizations", ORG_COLUMNS, refresh); +export const loadPeople = (kg: KgSession, refresh = false) => readAll<PersonRow>(kg, "investigators", PERSON_COLUMNS, refresh); +export const loadPublications = (kg: KgSession, refresh = false) => readAll<PubRow>(kg, "publications", PUB_COLUMNS, refresh); + +// ── Pure matchers (no I/O) ────────────────────────────────────────────────────────────────────── + +const asciiLower = (s: string) => s.replace(/[A-Z]/g, (c) => String.fromCharCode(c.charCodeAt(0) + 32)); +const asciiTrim = (s: string) => s.replace(/^[ \t\n\v\f\r]+|[ \t\n\v\f\r]+$/g, ""); + +/** An email as the write paths compare it: ASCII whitespace trimmed, ASCII letters lower-cased. + * Close to investigators_email_unique_ci, which is lower(btrim(email)), but not the same rule: + * btrim strips spaces only, where this also strips tabs and newlines, and lower() also folds + * non-ASCII capitals under a UTF-8 locale, which this leaves alone. So an address with a tab + * around it is one person here and two to the index: the row is reused, never inserted. + * 'JOSÉ@x.org' next to 'josé@x.org' is two here and one to the index: the insert is refused + * with 23505 and reported as already in the KG, never written twice. */ +export const emailKey = (v: Text): string | null => (v == null ? null : asciiLower(asciiTrim(String(v))) || null); + +const profileKey = (v: unknown): string | null => (v == null ? null : asciiTrim(String(v)) || null); + +/** First and last name, each folded like a name ('Patrick T. McGrath' -> 'patrick mcgrath'); null for one word. */ +export function firstLastKey(name: Text): string | null { + if (name == null) return null; + const parts = String(name).split(/[ \t\n\v\f\r]+/).map((t) => nameKey(t)).filter((t): t is string => !!t); + return parts.length >= 2 ? `${parts[0]} ${parts[parts.length - 1]}` : null; +} + +const byAge = (a: { created_at?: string | null; id: string }, b: { created_at?: string | null; id: string }) => + String(a.created_at ?? "").localeCompare(String(b.created_at ?? "")) || a.id.localeCompare(b.id); + +/** Of several records with one key (a duplicate group), the one to reuse: a KG node first, then the oldest. */ +function pickNode<T extends { id: string; resource_id?: string | null; created_at?: string | null }>(rows: T[]): T | null { + return [...rows].sort((a, b) => Number(!a.resource_id) - Number(!b.resource_id) || byAge(a, b))[0] ?? null; +} + +/** Of several people with one key: the curated record (it has an email), then a node, then the oldest. */ +function pickPerson(rows: PersonRow[]): PersonRow | null { + return [...rows].sort((a, b) => + Number(!emailKey(a.email)) - Number(!emailKey(b.email)) || Number(!a.resource_id) - Number(!b.resource_id) || byAge(a, b))[0] ?? null; +} + +export function matchOrganizations(rows: OrgRow[], name: Text): { row: OrgRow | null; candidates: OrgRow[] } { + const k = nameKey(name); + const candidates = k ? rows.filter((r) => nameKey(r.name) === k) : []; + return { row: pickNode(candidates), candidates }; +} + +export type PersonKey = "orcid" | "reporter_profile_id" | "email" | "name" | "first_last"; +/** The order people are matched in: identifiers first, then the name, then first + last name. */ +export const PERSON_KEYS: PersonKey[] = ["orcid", "reporter_profile_id", "email", "name", "first_last"]; + +export interface PersonQuery { + name?: Text; email?: Text; secondaryEmails?: Text[] | null; orcid?: Text; reporterProfileId?: number | string | null; +} +export interface PersonMatch { + row: PersonRow | null; by: PersonKey | null; candidates: PersonRow[]; ambiguous: boolean; + /** When `ambiguous`: why no record was taken, for the curator who has to decide. */ + reason: string | null; +} + +/** The keys that only guess from a name. The others identify a person. */ +const NAME_GUESSES: ReadonlySet<PersonKey> = new Set(["name", "first_last"]); +const personLabel = (rows: PersonRow[]) => rows.map((r) => `"${r.name}" (id ${r.id})`).join("; "); + +function peopleBy(key: PersonKey, rows: PersonRow[], p: PersonQuery): PersonRow[] { + switch (key) { + case "orcid": { + const k = orcidKey(p.orcid); + return k ? rows.filter((r) => orcidKey(r.orcid) === k) : []; + } + case "reporter_profile_id": { + const k = profileKey(p.reporterProfileId); + return k ? rows.filter((r) => profileKey(r.reporter_profile_id) === k) : []; + } + case "email": { + const want = new Set([p.email, ...(p.secondaryEmails ?? [])].map(emailKey).filter((e): e is string => !!e)); + if (!want.size) return []; + return rows.filter((r) => [r.email, ...(r.secondary_emails ?? [])].some((e) => want.has(emailKey(e) ?? ""))); + } + case "name": { + const k = nameKey(p.name); + return k ? rows.filter((r) => nameKey(r.name) === k) : []; + } + case "first_last": { + const k = firstLastKey(p.name); + return k ? rows.filter((r) => firstLastKey(r.name) === k) : []; + } + } +} + +/** The person a record describes, by the first key in `order` that finds anyone. ORCID, RePORTER + * profile id and email are identities: several records with one of them are one person recorded + * twice, and the curated one is reused. + * + * The name and first + last name are guesses, because namesakes exist (design D3), so a guess is + * `ambiguous` (nothing should be written, and `reason` says why) when: + * - the query carries an email and a record the name finds carries another one: that record is + * somebody else, or a twin only a curator can tell apart. (A record with this person's email was + * found by the email step already; a record with no email, a RePORTER twin, is still reused.) + * - the name key finds records that carry two or more different emails: two people ("Li Na" and + * "Lina"), or a twin only a curator can tell apart. Records with one email between them, or none, + * are one person recorded twice, and the curated one is reused (pickPerson: the one with the + * email, then a node, then the oldest). That is the documented twin pair (20260811120000): a + * curated record and its email-less RePORTER copy whose name differs in case or spacing only; + * - first + last name finds several and not exactly one of them carries an email (nih-grants' rule). */ +export function matchPeople(rows: PersonRow[], p: PersonQuery, order: PersonKey[] = PERSON_KEYS): PersonMatch { + const asked = [p.email, ...(p.secondaryEmails ?? [])].map(emailKey).filter((e): e is string => !!e); + for (const key of order) { + const hits = peopleBy(key, rows, p); + if (!hits.length) continue; + if (!NAME_GUESSES.has(key)) return { row: pickPerson(hits), by: key, candidates: hits, ambiguous: false, reason: null }; + const how = key === "name" ? "name" : "first and last name"; + const elsewhere = asked.length ? hits.filter((r) => { const e = emailKey(r.email); return !!e && !asked.includes(e); }) : []; + if (elsewhere.length) { + return { + row: null, by: key, candidates: hits, ambiguous: true, + reason: `matched only by ${how} to ${personLabel(elsewhere)}, whose email is not this person's: perhaps another person, ` + + "so nothing was written to it. If they are one person, add this person's address to that record or merge them.", + }; + } + if (key === "name") { + const emails = new Set(hits.map((r) => emailKey(r.email)).filter((e): e is string => !!e)); + if (emails.size < 2) return { row: pickPerson(hits), by: key, candidates: hits, ambiguous: false, reason: null }; + return { + row: null, by: key, candidates: hits, ambiguous: true, + reason: `${hits.length} records with ${emails.size} different emails match by name (${personLabel(hits)}); nothing was written. ` + + "If they are one person, merge them; otherwise record the person's ORCID, RePORTER profile id or email.", + }; + } + const withEmail = hits.filter((r) => emailKey(r.email)); + const one = hits.length === 1 ? hits[0] : withEmail.length === 1 ? withEmail[0] : null; + return { + row: one, by: key, candidates: hits, ambiguous: !one, + reason: one ? null : `${hits.length} records match by first and last name (${personLabel(hits)}); nothing was written. ` + + "Merge them, or record the person's ORCID or RePORTER profile id.", + }; + } + return { row: null, by: null, candidates: [], ambiguous: false, reason: null }; +} + +export interface PubMatch { row: PubRow | null; by: "pmid" | "doi" | null; candidates: PubRow[]; note: string | null } + +/** A publication by its PMID key, then its DOI key. When the two keys find different records, the + * PMID's is reused and the disagreement is reported. */ +export function matchPublications(rows: PubRow[], q: { pmid?: Text; doi?: Text }): PubMatch { + const pk = pmidKey(q.pmid); + const dk = doiKey(q.doi); + const byPmid = pk ? rows.filter((r) => pmidKey(r.pmid) === pk) : []; + const byDoi = dk ? rows.filter((r) => doiKey(r.doi) === dk) : []; + if (byPmid.length) { + const row = pickNode(byPmid)!; + const other = byDoi.find((r) => r.id !== row.id); + const note = other + ? `PMID ${pk} and DOI ${dk} are two records (${row.id}, ${other.id}): reused the PMID's; merge them` + : null; + return { row, by: "pmid", candidates: byPmid, note }; + } + if (byDoi.length) { + const row = pickNode(byDoi)!; + const theirs = pmidKey(row.pmid); + const note = pk && theirs && theirs !== pk ? `DOI ${dk} is recorded with PMID ${theirs}, not ${pk}: reused that record` : null; + return { row, by: "doi", candidates: byDoi, note }; + } + return { row: null, by: null, candidates: [], note: null }; +} + +const repoUrlOf = (r: ResourceRow) => (r.repoUrl ?? r.metadata?.repoUrl ?? null) as Text; + +/** A resource the query may describe, and the keys it agrees on. `same` is whether it IS the query's + * record: only the name says so. */ +export interface ResourceHit { row: ResourceRow; by: string[]; same: boolean } + +/** Resources of the same resource_type that agree with the query on its name key (the exact name, + * for a name with no name key), its homepage URL key or its repository URL key (either way round). + * A URL is not an identity for a tool-like resource (design D7): a lab's tools share its homepage, + * a maker's devices share the maker's, and two tools can live in one repository. So a hit by URL + * alone is `same: false`, a hint for a curator, always: a query with a blank name has no name to + * agree on, which makes it no more the URL's record (decideResource refuses a blank name). */ +export function matchResources( + rows: ResourceRow[], q: { type: string; name?: Text; url?: Text; repoUrl?: Text }, +): ResourceHit[] { + const name = q.name == null ? "" : asciiTrim(String(q.name)); + const nk = nameKey(name); + const want = new Set([urlKey(q.url), urlKey(q.repoUrl)].filter((u): u is string => !!u)); + const out: ResourceHit[] = []; + for (const r of rows) { + if (r.resource_type !== q.type) continue; + const by: string[] = []; + if (name && (nk ? nameKey(r.name) === nk : asciiTrim(String(r.name ?? "")) === name)) by.push("name"); + if (want.has(urlKey(r.external_url) ?? "")) by.push("url"); + if (want.has(urlKey(repoUrlOf(r)) ?? "")) by.push("repo_url"); + if (by.length) out.push({ row: r, by, same: by.includes("name") }); + } + return out; +} + +/** What add_resource does with a query: update the one record that is this resource, insert a new + * one, or refuse. */ +export type ResourceDecision = + | { action: "update"; row: ResourceRow; matchedBy: string; note: string | null } + | { action: "insert"; note: string | null } + | { action: "refuse"; error: string }; + +const resourceLabel = (r: ResourceRow) => `"${r.name}" (id ${r.id})`; + +/** add_resource's rule. The record of this resource_type with the same name is updated; two are a + * duplicate to merge first. A record that shares only a homepage or repository URL is never + * updated, and a new record beside it is not written on a guess either: the call is refused, and + * the caller says which it is. `sameAs` (an id, or a name of this type) is "this is that record + * under another name": that record is updated. `distinct` is "this is another resource": it is + * inserted and the URL twin named in the note. Either way nothing is written that only SQL could + * undo (no tool removes a resource). A blank name is refused: it has nothing to be matched by. */ +export function decideResource( + rows: ResourceRow[], q: { type: string; name?: Text; url?: Text; repoUrl?: Text; sameAs?: Text; distinct?: boolean | null }, +): ResourceDecision { + const name = q.name == null ? "" : asciiTrim(String(q.name)); + const refuse = (error: string): ResourceDecision => ({ action: "refuse", error }); + if (!name) return refuse("A resource needs a name: the name was blank, so nothing could be matched or written. Nothing was written."); + const hits = matchResources(rows, q); + let target: { row: ResourceRow; by: string[] } | null = null; + + const sameAs = q.sameAs == null ? "" : asciiTrim(String(q.sameAs)); + if (sameAs && q.distinct === true) { + return refuse(`same_as="${sameAs}" says this is that record, distinct=true says it is another resource: pass one of them. Nothing was written.`); + } + if (sameAs) { + const byId = rows.find((r) => r.id === sameAs) ?? null; + const sk = nameKey(sameAs); + const named = byId || !sk ? [] : rows.filter((r) => r.resource_type === q.type && nameKey(r.name) === sk); + const row = byId ?? (named.length === 1 ? named[0] : null); + if (!row) { + return refuse(named.length > 1 + ? `same_as="${sameAs}" names ${named.length} ${q.type} records (${named.map(resourceLabel).join("; ")}): merge them first, or pass one id. Nothing was written.` + : `same_as="${sameAs}" names no ${q.type} in the KG: pass the id of the record this one is. Nothing was written.`); + } + if (row.resource_type !== q.type) { + return refuse(`same_as="${sameAs}" is the ${row.resource_type} ${resourceLabel(row)}, not a ${q.type}. Nothing was written.`); + } + const named2 = hits.filter((h) => h.same && h.row.id !== row.id); + if (named2.length) { + return refuse(`"${name}" is already in the KG as ${named2.map((h) => resourceLabel(h.row)).join("; ")}, not ${resourceLabel(row)} ` + + "as same_as says: correct same_as, or merge them first. Nothing was written."); + } + target = { row, by: ["same_as"] }; + } else { + const same = hits.filter((h) => h.same); + if (same.length > 1) { + return refuse(`${same.length} ${q.type} records match "${name}": ${same.map((h) => `${h.row.name} (id ${h.row.id}, by ${h.by.join(" and ")})`).join("; ")}. ` + + "Merge them first; nothing was written."); + } + target = same[0] ?? null; + } + + // Records that share only a URL with this one: named, never written. + const urlOnly = hits.filter((h) => !h.same && h.row.id !== target?.row.id); + const twins = urlOnly.map((h) => `the ${q.type} ${resourceLabel(h.row)} has the same ${h.by.map((b) => (b === "url" ? "homepage" : "repository")).join(" and ")} URL`).join("; "); + const why = "a URL can be shared by different things (a lab's tools, a maker's devices), so it does not make them one record"; + const shared = urlOnly.length + ? `${twins[0].toUpperCase()}${twins.slice(1)}. ${urlOnly.length === 1 ? "It was" : "They were"} not changed: ${why}.` + : null; + if (target) return { action: "update", row: target.row, matchedBy: target.by.join("+"), note: shared }; + if (urlOnly.length && q.distinct !== true) { + // Neither guess is written: updating the twin would overwrite another tool (the DeepLabCut / + // DeepLabCut-Live case), and a new record that is the twin under another name could only be + // removed with SQL. The caller knows which it is. + const ids = urlOnly.map((h) => h.row.id); + return refuse(`"${name}" is not in the KG under this name, but ${twins}, and ${why}. Nothing was written. ` + + `If "${name}" is ${urlOnly.length === 1 ? "that record" : "one of them"} under another name, call again with ` + + `same_as="${ids.length === 1 ? ids[0] : "<its id>"}"${ids.length === 1 ? "" : ` (one of ${ids.join(", ")})`}: that record is updated. ` + + `If it is another ${q.type}, call again with distinct=true: it is added as its own record.`); + } + const key = nameKey(name); + const namesakes = key ? rows.filter((r) => r.resource_type !== q.type && nameKey(r.name) === key) : []; + const notes = [ + shared ? `Added as its own record (distinct=true). ${shared}` : null, + namesakes.length ? `Also in the KG under another type: ${namesakes.map((r) => `${r.resource_type} "${r.name}" (id ${r.id})`).join(", ")}. If it is the same thing, retype one and merge them.` : null, + ].filter(Boolean); + return { action: "insert", note: notes.length ? notes.join(" ") : null }; +} + +/** Funding calls with the same FON key, and calls whose notice URL has the same URL key. */ +export function matchFundingCalls(rows: CallRow[], q: { fon?: Text; url?: Text }): { byFon: CallRow[]; byUrl: CallRow[] } { + const fk = fonKey(q.fon); + const uk = urlKey(q.url); + return { + byFon: fk ? rows.filter((r) => fonKey(r.fon) === fk) : [], + byUrl: uk ? rows.filter((r) => urlKey(r.url) === uk) : [], + }; +} + +/** What add_funding_opportunity does with a call: update the one row that is this call, insert a new + * one, or refuse. `notes` are for the curator; `sharing` are the other calls with its URL key. */ +export type CallDecision = + | { action: "update"; row: CallRow; matchedBy: "fon" | "supersedes"; notes: string[]; sharing: CallRow[] } + | { action: "insert"; notes: string[]; sharing: CallRow[] } + | { action: "refuse"; error: string }; + +const callLabel = (r: CallRow) => `${r.fon} (id ${r.id})`; + +/** add_funding_opportunity's rule. A call is its FON key: that row is updated, two are a duplicate to + * merge first. The notice URL is a hint, never an identity: a landing page (an NIH highlighted + * topic, a program page) lists several calls, so another call with the same URL key is named in a + * note and nothing is refused for it. `supersedes` (the forecast's FON) is the one way a final + * notice takes over its forecast's row. */ +export function decideFundingCall(rows: CallRow[], q: { fon: Text; url?: Text; supersedes?: Text }): CallDecision { + const { byFon, byUrl } = matchFundingCalls(rows, q); + const sk = q.supersedes == null ? null : fonKey(q.supersedes); + const superseded = sk ? rows.filter((r) => fonKey(r.fon) === sk && !byFon.includes(r)) : []; + const dup = byFon.length > 1 ? byFon : superseded.length > 1 ? superseded : null; + if (dup) return { action: "refuse", error: `${dup.map(callLabel).join(", ")} are one call recorded ${dup.length} times: merge them first. Nothing was written.` }; + + const target = byFon[0] ?? superseded[0] ?? null; + const notes: string[] = []; + if (byFon[0] && superseded[0]) notes.push(`${callLabel(superseded[0])} is still a separate row for this call (its forecast?): merge it into this one`); + const sharing = byUrl.filter((r) => r.id !== target?.id && r.id !== superseded[0]?.id); + if (sharing.length) { + notes.push(`Its notice URL is also on ${sharing.map(callLabel).join(", ")}. A URL can be a landing page that lists several calls, ` + + "so that is only a hint and nothing was refused for it. " + + (target + ? "If one of them is this same call (its forecast), merge it into this one." + : `If ${String(q.fon).trim()} is the final notice that replaces one of them, that forecast's row should have become this call: merge the two (supersedes="<the forecast's FON>" does it in one step when the final notice is added).`)); + } + if (byFon[0]) return { action: "update", row: byFon[0], matchedBy: "fon", notes, sharing }; + if (superseded[0]) { + return { action: "update", row: superseded[0], matchedBy: "supersedes", notes: [`${superseded[0].fon} is now ${String(q.fon).trim()}; its old FON is kept in notes`, ...notes], sharing }; + } + if (q.supersedes != null) notes.push(`No call with FON ${q.supersedes} is in the KG, so nothing was superseded`); + return { action: "insert", notes, sharing }; +} + +// ── Find or create ────────────────────────────────────────────────────────────────────────────── + +/** An organization by its name key; created (name only, as given) when there is none. */ +export async function findOrCreateOrganization(kg: KgSession, name: Text): Promise<Found<OrgRow>> { + const clean = name == null ? "" : String(name).trim(); + if (!nameKey(clean)) return { ok: false, error: `${JSON.stringify(name)} has no name key (no letters or digits); not written` }; + try { + const all = await loadOrganizations(kg); + const m = matchOrganizations(all, clean); + if (m.row) return { ok: true, row: m.row, created: false, matchedBy: "name", candidates: m.candidates.length }; + const ins = await kg.db.from("organizations").insert({ name: clean }).select(ORG_COLUMNS).single(); + if (!ins.error && ins.data) { + all.push(ins.data as OrgRow); + return { ok: true, row: ins.data as OrgRow, created: true, matchedBy: null }; + } + if (!isUniqueViolation(ins.error)) return { ok: false, error: `organization ${clean}: ${message(ins.error)}` }; + const again = matchOrganizations(await loadOrganizations(kg, true), clean); + if (again.row) { + return { ok: true, row: again.row, created: false, matchedBy: "name", note: `already in the KG (${violatedConstraint(ins.error) ?? "unique key"})` }; + } + return alreadyInKg(ins.error, `organization ${clean}`); + } catch (e) { + return { ok: false, error: message(e) }; + } +} + +/** A person, by PERSON_KEYS (or `order`); created when nobody matches, person first. The insert is + * { name, email, secondary_emails, orcid, reporter_profile_id } as far as they are given, plus `extra`. + * Then the person's spine row is written and attached only if the person still has none; if it + * cannot be attached it is deleted. A 23505 on the person writes no spine row at all. */ +export async function findOrCreateInvestigator( + kg: KgSession, p: PersonQuery & { name: string }, + opts: { extra?: Record<string, unknown>; order?: PersonKey[] } = {}, +): Promise<Found<PersonRow>> { + const name = String(p.name ?? "").trim(); + if (!name) return { ok: false, error: "a person with no name; not written" }; + const order = opts.order ?? PERSON_KEYS; + try { + const all = await loadPeople(kg); + const m = matchPeople(all, p, order); + if (m.row) return { ok: true, row: m.row, created: false, matchedBy: m.by, candidates: m.candidates.length }; + // A name that fits a record with another email, or several records: not this person's to create + // (a second record) or to reuse (another person's). A curator decides; nothing is written. + if (m.ambiguous) return { ok: false, ambiguous: m.candidates.map((r) => r.id), error: `${name}: ${m.reason}` }; + + // 1. The person. + const row: Record<string, unknown> = { name }; + if (emailKey(p.email)) row.email = asciiTrim(String(p.email)); + if (p.secondaryEmails?.length) row.secondary_emails = p.secondaryEmails.filter((e) => emailKey(e)).map((e) => asciiTrim(String(e))); + if (orcidKey(p.orcid)) row.orcid = asciiTrim(String(p.orcid)); + if (profileKey(p.reporterProfileId)) row.reporter_profile_id = p.reporterProfileId; + Object.assign(row, opts.extra ?? {}); + const ins = await kg.db.from("investigators").insert(row).select(PERSON_COLUMNS).single(); + if (ins.error || !ins.data) { + if (!isUniqueViolation(ins.error)) return { ok: false, error: `${name}: ${message(ins.error ?? "the insert returned no row")}` }; + // Someone wrote this person in between. investigators_name_key is exact, so a name with no + // name key (no Latin letters or digits) is looked up exactly. + const fresh = await loadPeople(kg, true); + const m2 = matchPeople(fresh, p, order); + if (m2.ambiguous) { + return { + ok: false, already_in_kg: true, constraint: violatedConstraint(ins.error), detail: violationDetail(ins.error), + ambiguous: m2.candidates.map((r) => r.id), error: `${name}: refused by ${violatedConstraint(ins.error) ?? "a unique key"}, and ${m2.reason}`, + }; + } + const again = m2.row ?? fresh.find((r) => (r.name ?? "").trim() === name) ?? null; + if (again) { + return { ok: true, row: again, created: false, matchedBy: m2.row ? m2.by : "exact name", note: `already in the KG (${violatedConstraint(ins.error) ?? "unique key"})` }; + } + return alreadyInKg(ins.error, name); + } + const person = ins.data as PersonRow; + all.push(person); + + // 2. Then its node. + const spine = await ensureSpineRow(kg, "investigators", person, { name, resource_type: "investigator" }); + return { ok: true, row: person, created: true, matchedBy: null, spine }; + } catch (e) { + return { ok: false, error: message(e) }; + } +} + +/** A publication by its PMID key, then its DOI key; inserted (`row` as given) when neither matches. */ +export async function findOrCreatePublication( + kg: KgSession, row: Record<string, unknown> & { pmid?: Text; doi?: Text; title?: Text }, +): Promise<Found<PubRow>> { + const label = pmidKey(row.pmid) ? `PMID ${pmidKey(row.pmid)}` : `DOI ${doiKey(row.doi)}`; + if (!pmidKey(row.pmid) && !doiKey(row.doi)) { + return { ok: false, error: `"${row.title ?? "untitled"}" has neither a PMID nor a DOI to recognise it by; not written` }; + } + try { + const all = await loadPublications(kg); + const m = matchPublications(all, row); + if (m.row) return { ok: true, row: m.row, created: false, matchedBy: m.by, candidates: m.candidates.length, note: m.note ?? undefined }; + const ins = await kg.db.from("publications").insert(row).select(PUB_COLUMNS).single(); + if (!ins.error && ins.data) { + all.push(ins.data as PubRow); + return { ok: true, row: ins.data as PubRow, created: true, matchedBy: null }; + } + if (!isUniqueViolation(ins.error)) return { ok: false, error: `${label}: ${message(ins.error)}` }; + const again = matchPublications(await loadPublications(kg, true), row); + if (again.row) { + return { ok: true, row: again.row, created: false, matchedBy: again.by, note: `already in the KG (${violatedConstraint(ins.error) ?? "unique key"})` }; + } + return alreadyInKg(ins.error, label); + } catch (e) { + return { ok: false, error: message(e) }; + } +} + +/** Give a detail row (an investigator, a publication) its node, if it has none: insert the spine row, + * then attach it only where resource_id is still NULL. If it was not attached (someone attached one + * first, or the update failed) the new spine row is deleted again, so it can never be an orphan. */ +export async function ensureSpineRow( + kg: KgSession, table: string, row: { id: string; resource_id?: string | null }, + spine: { name: string; resource_type: string; external_url?: string | null; description?: string | null }, +): Promise<SpineResult> { + if (row.resource_id) return { ok: true, resourceId: row.resource_id, created: false }; + try { + const ins = await kg.db.from("resources").insert(spine).select("id").single(); + if (ins.error || !ins.data) return { ok: false, resourceId: null, created: false, error: `no spine row: ${message(ins.error ?? "no row returned")}` }; + const id = String(ins.data.id); + const upd = await kg.db.from(table).update({ resource_id: id }).eq("id", row.id).is("resource_id", null).select("id"); + if (!upd.error && (upd.data ?? []).length === 1) { + row.resource_id = id; + return { ok: true, resourceId: id, created: true }; + } + const del = await kg.db.from("resources").delete().eq("id", id); + const now = await kg.db.from(table).select("resource_id").eq("id", row.id).maybeSingle(); + row.resource_id = (now.data?.resource_id as string | undefined) ?? null; + const why = upd.error ? `could not attach it (${message(upd.error)})` : "another node was attached first"; + return { + ok: !!row.resource_id, resourceId: row.resource_id, created: false, + error: `${why}; ${del.error ? `and the new spine row ${id} could not be deleted (${message(del.error)}): an orphan to remove` : "the new spine row was deleted"}`, + }; + } catch (e) { + return { ok: false, resourceId: null, created: false, error: message(e) }; + } +} + +// ── Versions ──────────────────────────────────────────────────────────────────────────────────── + +export const VERSION_LINKS_UNAVAILABLE = "unavailable: 20261117181500 not applied"; + +export interface VersionLinks { + available: boolean; done: number; noop: number; skipped: number; would_link: number; details: string[]; + error?: string; note?: string; +} + +/** Link each preprint among `publicationIds`' title groups to its published version + * (resource_links revision_of), by the pairing rule public.kg_link_publication_versions() states + * once. Before 20261117181500 is applied the RPC is missing: that is reported, never thrown. */ +export async function linkPublicationVersions(db: Db, publicationIds: string[], basis = "algorithmic"): Promise<VersionLinks> { + const out: VersionLinks = { available: true, done: 0, noop: 0, skipped: 0, would_link: 0, details: [] }; + const ids = [...new Set(publicationIds.filter(Boolean))]; + if (!ids.length) return out; + try { + const res = await db.rpc("kg_link_publication_versions", { _publication_ids: ids, _basis: basis }); + if (res.error) { + if (isMissingFunction(res.error, res.status)) return { ...out, available: false, note: VERSION_LINKS_UNAVAILABLE }; + return { ...out, error: message(res.error) }; + } + for (const r of (res.data ?? []) as Array<{ outcome: string; detail: string }>) { + if (r.outcome === "done" || r.outcome === "noop" || r.outcome === "skipped" || r.outcome === "would_link") out[r.outcome]++; + if (r.outcome !== "noop") out.details.push(`${r.outcome}: ${r.detail}`); + } + return out; + } catch (e) { + return { ...out, error: message(e) }; + } +} diff --git a/supabase/functions/add-project-by-grant/index.ts b/supabase/functions/add-project-by-grant/index.ts index a58d38a8..75c19068 100644 --- a/supabase/functions/add-project-by-grant/index.ts +++ b/supabase/functions/add-project-by-grant/index.ts @@ -11,6 +11,8 @@ import { createClient } from "npm:@supabase/supabase-js@2.39.3"; import { syncReporterPis, type ReporterPi } from "../_shared/grant-sync.ts"; +import { awardKey, nihAwardCore } from "../_shared/identity-keys.ts"; +import { findOrCreateInvestigator, findOrCreateOrganization, isUniqueViolation, kgSession, uniqueViolationText } from "../_shared/kg-write.ts"; const corsHeaders = { "Access-Control-Allow-Origin": "*", @@ -47,11 +49,14 @@ const GRANT_RE = /^[A-Za-z0-9]{6,20}(-\d{1,3})?$/; * * The core is also a valid RePORTER search key (verified against all 31 grants), so normalizing * BEFORE the lookup is safe as well as more consistent. Input that does not match the NIH shape is - * passed through cleaned but otherwise untouched, rather than mangled. */ + * passed through cleaned but otherwise untouched, rather than mangled. + * + * The core is nihAwardCore's (_shared/identity-keys.ts, the rule uq_grants_award_key compares by). + * This function's own [A-Z]\d{2} once missed activity codes whose second character is a letter: + * RF1, UG3, DP2. */ function normalizeGrantNumber(input: string): string { const cleaned = input.trim().toUpperCase().replace(/\s+/g, ""); - const m = cleaned.match(/^\d*([A-Z]\d{2}[A-Z]{2}\d{6})(?:-\d+[A-Z0-9]*)?$/); - return m ? m[1] : cleaned; + return nihAwardCore(cleaned) ?? cleaned; } async function fetchGrantFromReporter(grantNumber: string) { @@ -155,18 +160,18 @@ Deno.serve(async (req) => { const serviceKey = Deno.env.get("SUPABASE_SERVICE_ROLE_KEY")!; const anonKey = Deno.env.get("SUPABASE_ANON_KEY")!; - // Service-role client for token validation, role check, and writes. - const admin = createClient(supabaseUrl, serviceKey); + // Service-role client for token validation and the role check. + const authClient = createClient(supabaseUrl, serviceKey); // Validate the JWT explicitly using the service-role client. - const { data: userRes, error: userErr } = await admin.auth.getUser(token); + const { data: userRes, error: userErr } = await authClient.auth.getUser(token); if (userErr || !userRes?.user) { console.error("[add-project-by-grant] getUser failed:", userErr?.message, "token len:", token.length); return fail(`Your sign-in session is invalid or expired. Please sign in again. (${userErr?.message ?? "no user"})`); } console.log("[add-project-by-grant] authenticated user:", userRes.user.email, userRes.user.id); - const { data: roles } = await admin + const { data: roles } = await authClient .from("user_roles") .select("role") .eq("user_id", userRes.user.id); @@ -177,6 +182,13 @@ Deno.serve(async (req) => { ); } + // The writes: service role, so they name themselves and the curator who asked (Principle X). + // Without x-bbqs-client they read 'unknown' in data_audit_log. Set on this server-side client only. + const admin = createClient(supabaseUrl, serviceKey, { + global: { headers: { "x-bbqs-client": `add-project-by-grant:${userRes.user.email ?? userRes.user.id}` } }, + }); + const kg = kgSession(admin); + // ── Parse + validate body ────────────────────────────────── let body: any; try { body = await req.json(); } catch { return fail("Invalid JSON"); } @@ -187,12 +199,12 @@ Deno.serve(async (req) => { return fail("Invalid grant number format. Example: R34DA059510"); } - // ── 1. Already in our DB? ────────────────────────────────── - const { data: existingProject } = await admin + // ── 1. Already in our DB? By award key: '1R61MH138612' and 'R61MH138612' are one award ── + const { data: projects, error: projErr } = await admin .from("projects") - .select("grant_number, study_species, keywords, website, metadata, grants:grant_id(title,abstract,fiscal_year,award_amount,nih_link)") - .eq("grant_number", grantNumber) - .maybeSingle(); + .select("grant_number, study_species, keywords, website, metadata, grants:grant_id(title,abstract,fiscal_year,award_amount,nih_link)"); + if (projErr) return fail("Could not read the projects to check for this grant", { details: projErr.message }); + const existingProject = (projects ?? []).find((p: { grant_number: string }) => awardKey(p.grant_number) === awardKey(grantNumber)); if (existingProject) { const { populated, missing } = summarizePopulation(existingProject); @@ -219,27 +231,37 @@ Deno.serve(async (req) => { } // ── 3. Seed grant + project rows (light version of nih-grants seeder) ── - const { data: grantRow, error: grantErr } = await admin - .from("grants") - .upsert({ - grant_number: grantNumber, - // The full per-year RePORTER string, kept so shortening grant_number loses nothing. Refreshed - // on every sync because it changes each fiscal year (migration 20260810170000). - reporter_project_num: reporter.grantNumber ?? null, - title: reporter.title, - abstract: reporter.abstract || null, - award_amount: reporter.awardAmount || null, - fiscal_year: reporter.fiscalYear || null, - nih_link: reporter.nihLink, - updated_at: new Date().toISOString(), - }, { onConflict: "grant_number" }) - .select("id, resource_id") + // A grant row may already hold this award without a project (create_grant, or another spelling of + // its number): it is updated by id, never shadowed by a second row. + const fields = { + // The full per-year RePORTER string, kept so shortening grant_number loses nothing. Refreshed + // on every sync because it changes each fiscal year (migration 20260810170000). + reporter_project_num: reporter.grantNumber ?? null, + title: reporter.title, + abstract: reporter.abstract || null, + award_amount: reporter.awardAmount || null, + fiscal_year: reporter.fiscalYear || null, + nih_link: reporter.nihLink, + updated_at: new Date().toISOString(), + }; + const { data: grants, error: grantsErr } = await admin.from("grants").select("id, grant_number"); + if (grantsErr) return fail("Could not read the grants to check for this award", { details: grantsErr.message }); + const known = (grants ?? []).find((g: { grant_number: string }) => awardKey(g.grant_number) === awardKey(grantNumber)); + const { data: grantRow, error: grantErr } = await (known + ? admin.from("grants").update(fields).eq("id", known.id) + : admin.from("grants").insert({ grant_number: grantNumber, ...fields })) + .select("id, grant_number, resource_id") .single(); if (grantErr || !grantRow) { - console.error("Failed to upsert grant:", grantErr); + console.error("Failed to write grant:", grantErr); + // A 23505 is another writer's row for this award (uq_grants_award_key), written after the read. + if (isUniqueViolation(grantErr)) { + return fail(`Grant ${grantNumber} is already in the KG (written in the meantime); add it again to see that record`, { details: uniqueViolationText(grantErr) }); + } return fail("Failed to register grant locally", { details: grantErr?.message }); } + const storedNumber: string = grantRow.grant_number; // Resource hub node for the grant if (!grantRow.resource_id) { @@ -257,40 +279,28 @@ Deno.serve(async (req) => { } } - // Organization (lookup or create) + // Organization (found by name key, created only if missing) and investigators (found by RePORTER + // profile id, name key, or a unique first + last name; a new person before their spine row), the + // same helpers the bulk nih-grants refresh uses. Then defer the grant_investigators link creation + // to the shared syncReporterPis helper so behaviour matches that refresh exactly. + const warnings: string[] = []; let orgId: string | null = null; if (reporter.institution && reporter.institution !== "Unknown") { - const { data: existingOrg } = await admin - .from("organizations").select("id").ilike("name", reporter.institution).maybeSingle(); - if (existingOrg) orgId = existingOrg.id; - else { - const { data: newOrg } = await admin - .from("organizations").insert({ name: reporter.institution }).select("id").single(); - orgId = newOrg?.id || null; - } + const org = await findOrCreateOrganization(kg, reporter.institution); + if (org.ok) orgId = org.row.id; + else warnings.push(`organization not linked: ${org.error}`); } - // Investigators (ensure they exist + are linked to org). Then defer the - // grant_investigators link creation to the shared syncReporterPis helper - // so behaviour matches the bulk nih-grants refresh exactly. const reporterPis: ReporterPi[] = []; for (const pi of reporter.piDetails) { const piName = (pi.fullName || "").trim(); if (!piName) continue; - const { data: existingInv } = await admin - .from("investigators").select("id").ilike("name", piName).maybeSingle(); - - let invId: string; - if (existingInv) invId = existingInv.id; - else { - const { data: invRes } = await admin - .from("resources").insert({ name: piName, resource_type: "investigator" }).select("id").single(); - const { data: newInv } = await admin - .from("investigators").insert({ name: piName, resource_id: invRes?.id || null }) - .select("id").single(); - if (!newInv) continue; - invId = newInv.id; + const person = await findOrCreateInvestigator(kg, { name: piName, reporterProfileId: pi.profileId }); + if (!person.ok) { + warnings.push(`${piName} not linked: ${person.error}`); + continue; } + const invId = person.row.id; if (orgId) { const { data: existingLink } = await admin @@ -309,14 +319,19 @@ Deno.serve(async (req) => { isContactPi: !!pi.isContactPi, }); } - await syncReporterPis(admin, grantRow.id, grantNumber, reporterPis); + await syncReporterPis(admin, grantRow.id, storedNumber, reporterPis); - // Project row - await admin.from("projects").insert({ - grant_number: grantNumber, + // Project row (step 1 found none for this award) + const { error: projectErr } = await admin.from("projects").insert({ + grant_number: storedNumber, grant_id: grantRow.id, last_edited_by: userRes.user.email || "reporter-import", }); + if (projectErr) { + warnings.push(isUniqueViolation(projectErr) + ? `project row not added: one is already in the KG for this award (${uniqueViolationText(projectErr)}), written in the meantime` + : `project row not written: ${projectErr.message}`); + } // Newly created → no questionnaire fields populated yet return ok({ @@ -334,5 +349,7 @@ Deno.serve(async (req) => { populated_fields: [], // none of the questionnaire fields missing_fields: QUESTIONNAIRE_FIELDS, reporter_seeded: ["title", "abstract", "fiscal_year", "award_amount", "principal_investigators", "institution"], + // What could not be matched or written (a PI two records fit, an organization refused): for a curator. + ...(warnings.length ? { warnings } : {}), }); }); diff --git a/supabase/functions/bbqs-mcp/index.ts b/supabase/functions/bbqs-mcp/index.ts index af884af1..f4ed5b83 100644 --- a/supabase/functions/bbqs-mcp/index.ts +++ b/supabase/functions/bbqs-mcp/index.ts @@ -2,6 +2,11 @@ import { McpServer, StreamableHttpTransport } from "npm:mcp-lite@^0.10.0"; import { Hono } from "npm:hono@^4.9.7"; import { searchProjects, listSpecies } from "../_shared/kg.ts"; import { askKG } from "../_shared/rag.ts"; +import { awardKey, fonKey, nihAwardCore } from "../_shared/identity-keys.ts"; +import { + decideFundingCall, decideResource, isUniqueViolation, matchOrganizations, saveProfileLeavingOutHeldOrcid, uniqueViolationText, + type CallRow, type OrgRow, type ResourceRow, +} from "../_shared/kg-write.ts"; // BBQS MCP — one endpoint, three tiers, gated by step-up OAuth. // @@ -113,6 +118,13 @@ async function rest(jwt: string, pathAndQuery: string, init?: RequestInit, clien const rpc = (jwt: string, fn: string, args: unknown, clientTag?: string) => rest(jwt, `rpc/${fn}`, { method: "POST", body: JSON.stringify(args) }, clientTag); +/** A grant number as the KG writes it: the NIH core ('1U01MH143789-01' -> 'U01MH143789'), else as + * typed. The core is what uq_grants_award_key compares, and a valid RePORTER search key. */ +function grantNumberFor(v: unknown): string { + const s = String(v ?? "").trim(); + return nihAwardCore(s) ?? s; +} + /** Another edge function, still as the caller — which is what makes auth.uid() resolve there. */ async function callFunction(jwt: string, name: string, body: unknown) { const res = await fetch(`${SUPABASE_URL}/functions/v1/${name}`, { @@ -207,7 +219,7 @@ async function logCall(jwt: string, meta: RequestMeta, e: CallLog, clientTag?: s } function buildServer(jwt: string, caller: Caller | null, meta: RequestMeta) { - const mcp = new McpServer({ name: "bbqs-mcp", version: "3.4.0" }); + const mcp = new McpServer({ name: "bbqs-mcp", version: "3.7.0" }); // mcp-lite 0.10 builds serverInfo from name and version only and returns that same object in the // initialize result, so the spec's display fields (title, websiteUrl, icons) are set on it here. const serverInfo = (mcp as unknown as { serverInfo?: Record<string, unknown> }).serverInfo; @@ -220,6 +232,28 @@ function buildServer(jwt: string, caller: Caller | null, meta: RequestMeta) { const _clientTag = caller ? `bbqs-mcp:${caller.email}` : "bbqs-mcp"; const restC = (path: string, init?: RequestInit) => rest(jwt, path, init, _clientTag); const rpcC = (fn: string, args: unknown) => rpc(jwt, fn, args, _clientTag); + /** Every row a read returns, page by page (PostgREST caps one response at its max_rows): what a + * write path folds the identity keys over before it writes (_shared/kg-write.ts). */ + const restAllC = async (path: string): Promise<any[]> => { + const out: any[] = []; + for (let offset = 0, pages = 0; pages < 50; pages++) { + const page = await restC(`${path}&order=id&limit=1000&offset=${offset}`); + if (!Array.isArray(page) || !page.length) break; + out.push(...page); + offset += page.length; + } + return out; + }; + /** An RPC whose write a unique index may refuse (the uq_* identity keys, 20261117181500): a 23505 + * is said as what it is, every other error is thrown as it came. */ + const keyedRpcC = async (fn: string, args: unknown, refused: string) => { + try { + return await rpcC(fn, args); + } catch (e) { + if (!isUniqueViolation(e)) throw e; + throw new Error(`${refused} (${uniqueViolationText(e)}), under another spelling or written in the meantime. Nothing was written.`); + } + }; // Register every tool through T: a thrown error becomes a returned isError result carrying the // REAL message. Without it mcp-lite flattens a PostgREST error ("duplicate key", "malformed @@ -306,7 +340,7 @@ function buildServer(jwt: string, caller: Caller | null, meta: RequestMeta) { }); T("update_my_profile", { - description: "[sign-in] Edit your OWN profile: institution, ORCID, research areas, skills, secondary emails. Cannot set your role or mailing-list groups — use request_working_groups for those.", + description: "[sign-in] Edit your OWN profile: institution, ORCID, research areas, skills, secondary emails. Cannot set your role or mailing-list groups — use request_working_groups for those. An ORCID iD that is already on another person's record is not saved (one ORCID iD, one person: a curator merges the two records); the other fields still are, and the result names what was not saved.", parameters: obj({ institution: { type: "string" }, orcid: { type: "string" }, @@ -314,11 +348,21 @@ function buildServer(jwt: string, caller: Caller | null, meta: RequestMeta) { skills: { type: "array", items: { type: "string" } }, secondary_emails: { type: "array", items: { type: "string" } }, }), - handler: async (a: Record<string, unknown>) => text(await rpcC( "member_self_update", { - _institution: a.institution ?? null, _orcid: a.orcid ?? null, - _research_areas: a.research_areas ?? null, _skills: a.skills ?? null, - _secondary_emails: a.secondary_emails ?? null, _requested_working_groups: null, - })), + handler: async (a: Record<string, unknown>) => { + const args = { + _institution: a.institution ?? null, _orcid: a.orcid ?? null, + _research_areas: a.research_areas ?? null, _skills: a.skills ?? null, + _secondary_emails: a.secondary_emails ?? null, _requested_working_groups: null, + }; + // member_self_update writes one row in one statement, so a refusal saves nothing. Of its fields + // only the ORCID is an identity key (uq_investigators_orcid_key): an ORCID iD another record + // holds is left out and the rest saved again, and the result (or the error, if that fails too) + // says so (_shared/kg-write.ts saveProfileLeavingOutHeldOrcid). + const others = ["institution", "research_areas", "skills", "secondary_emails"].filter((k) => a[k] != null); + const r = await saveProfileLeavingOutHeldOrcid((x) => rpcC("member_self_update", x), args, others); + if (!r.orcidNotSaved) return text(r.result); + return text({ ...(r.result && typeof r.result === "object" ? r.result : {}), saved: r.saved, orcid_not_saved: r.orcidNotSaved }); + }, }); T("request_working_groups", { @@ -532,21 +576,33 @@ function buildServer(jwt: string, caller: Caller | null, meta: RequestMeta) { }); T("create_grant", { - description: "[curator] Create an award that is NOT YET on NIH RePORTER — a funder notice — so a new team can be onboarded before the registry catches up. This is the missing primitive: onboard_member links a person to a grant that must already exist, and refresh_grant_from_reporter is a no-op until RePORTER has the award. Inserts the grant (grant_number, title, and fiscal_year if known), optionally its awardee project row (pass institution), and optionally links an ALREADY-EXISTING contact PI to the roster (role_source funder_notice). Idempotent on grant_number; provenance is recorded as funder_notice (G1). It does NOT create people (an unknown contact_pi_email is reported back — use onboard_member) and does NOT touch Google Groups. Sequence for a new team: create_grant → onboard_member(grant_id, …) for each PI/member → sync_member_groups → send_welcome_email → refresh_grant_from_reporter once the award appears on RePORTER (it fills abstract/amount/publications, adds MPIs, and never demotes a role). Do not write SQL for this.", + description: "[curator] Create an award that is NOT YET on NIH RePORTER — a funder notice — so a new team can be onboarded before the registry catches up. This is the missing primitive: onboard_member links a person to a grant that must already exist, and refresh_grant_from_reporter is a no-op until RePORTER has the award. Inserts the grant (grant_number, title, and fiscal_year if known), optionally its awardee project row (pass institution), and optionally links an ALREADY-EXISTING contact PI to the roster (role_source funder_notice). Idempotent on the award: an NIH number is reduced to its core (1U01MH143789-01 -> U01MH143789) and an award already in the KG is reused, however it was spelled; likewise an institution already in the KG. Provenance is recorded as funder_notice (G1). It does NOT create people (an unknown contact_pi_email is reported back — use onboard_member) and does NOT touch Google Groups. Sequence for a new team: create_grant → onboard_member(grant_id, …) for each PI/member → sync_member_groups → send_welcome_email → refresh_grant_from_reporter once the award appears on RePORTER (it fills abstract/amount/publications, adds MPIs, and never demotes a role). Do not write SQL for this.", parameters: obj({ - grant_number: { type: "string", description: "Core project number, e.g. U01MH143789 — a -01 year suffix is stripped and it is upper-cased" }, + grant_number: { type: "string", description: "Award number, e.g. U01MH143789; an NIH number is reduced to its core (prefix digit and -01 year suffix dropped), and matched against the awards already in the KG" }, title: { type: "string", description: "Award title from the funder notice (required; RePORTER cannot supply it yet)" }, fiscal_year: { type: "number", description: "Award fiscal year, if known" }, - institution: { type: "string", description: "Awardee institution; when given, creates the project row. Upper-case matches how RePORTER writes org_name." }, + institution: { type: "string", description: "Awardee institution; when given, creates the project row. An organization already in the KG under another spelling (case, punctuation) is reused." }, study_human: { type: "boolean", description: "Whether the project studies humans, if known" }, contact_pi_email: { type: "string", description: "Contact PI. Linked as contact_pi ONLY if this person already exists in the KG; if not found the grant is still created and the result says so — then use onboard_member with the returned grant_id." }, }, ["grant_number", "title"]), - handler: async (a: { grant_number: string; title: string; fiscal_year?: number; institution?: string; study_human?: boolean; contact_pi_email?: string }) => - text(await rpcC("create_grant", { - _grant_number: a.grant_number, _title: a.title, - _fiscal_year: a.fiscal_year ?? null, _institution: a.institution ?? null, + handler: async (a: { grant_number: string; title: string; fiscal_year?: number; institution?: string; study_human?: boolean; contact_pi_email?: string }) => { + // The RPC looks the award up by exact grant_number and the institution by lower(btrim(name)), + // so hand it the spellings the KG already holds: otherwise a '1U01MH143789-01' or a 'University + // of X' next to 'UNIVERSITY OF X' becomes a second record (uq_grants_award_key and + // uq_organizations_name_key refuse it once 20261117181500 is applied). + const grants = await restAllC("grants?select=id,grant_number") as Array<{ id: string; grant_number: string }>; + const award = grants.find((g) => awardKey(g.grant_number) === awardKey(a.grant_number))?.grant_number ?? grantNumberFor(a.grant_number); + let institution = a.institution?.trim() || null; + if (institution) { + const orgs = await restAllC("organizations?select=id,name") as OrgRow[]; + institution = matchOrganizations(orgs, institution).row?.name ?? institution; + } + return text(await keyedRpcC("create_grant", { + _grant_number: award, _title: a.title, + _fiscal_year: a.fiscal_year ?? null, _institution: institution, _study_human: a.study_human ?? null, _contact_pi_email: a.contact_pi_email ?? null, - })), + }, `Not created: the award ${award}${institution ? ` or the institution ${institution}` : ""} is already in the KG`)); + }, }); T("import_questionnaire_response", { @@ -570,26 +626,40 @@ function buildServer(jwt: string, caller: Caller | null, meta: RequestMeta) { T("refresh_grant_from_reporter", { description: "[curator] Pull the latest NIH RePORTER data for a grant and fill the KG — abstract, award amount, nih_link, reporter_project_num, publications. Use this when a grant is newly on RePORTER or its registry data changed (e.g. a funder-notice grant that was pre-registry). Omit grant_number to refresh every grant. Does not demote roster roles. This is the tool for \"fix the RePORTER data for grant X\" — do not write SQL.", - parameters: obj({ grant_number: { type: "string", description: "e.g. R61MH142354; omit to refresh all" } }), + parameters: obj({ grant_number: { type: "string", description: "e.g. R61MH142354 (any NIH spelling, such as 1R61MH142354-01, is reduced to its core); omit to refresh all" } }), handler: async (a: { grant_number?: string }) => { - const q = a.grant_number ? `?action=refresh&grant=${encodeURIComponent(a.grant_number)}` : "?action=refresh"; + const q = a.grant_number ? `?action=refresh&grant=${encodeURIComponent(grantNumberFor(a.grant_number))}` : "?action=refresh"; return text(await callFunction(jwt, `nih-grants${q}`, {})); }, }); T("repoint_grant", { - description: "[curator] Repoint a grant to a NEW award number after it was renumbered — e.g. an NIH administering-IC transfer that mints a new core number (U24MH136628 -> U24DA064429). Updates the grant + its project rows + nih_link and records provenance; the old number stays in the audit history. THE tool for \"the grant number changed / it moved to a different IC\" — do not write SQL. Refuses if another grant already uses the new number. Follow with refresh_grant_from_reporter for the new number to fill current-year metadata and publications.", + description: "[curator] Repoint a grant to a NEW award number after it was renumbered — e.g. an NIH administering-IC transfer that mints a new core number (U24MH136628 -> U24DA064429). Updates the grant + its project rows + nih_link and records provenance; the old number stays in the audit history. THE tool for \"the grant number changed / it moved to a different IC\" — do not write SQL. Either number may be given in any NIH spelling (1U24MH136628-01): the old one is matched to the grant in the KG, the new one is stored as its core. Refuses if another grant already holds the new award. Follow with refresh_grant_from_reporter for the new number to fill current-year metadata and publications.", parameters: obj({ grant_number: { type: "string", description: "current number in the KG, e.g. U24MH136628" }, new_grant_number: { type: "string", description: "the award's current/correct number, e.g. U24DA064429" }, reporter_project_num: { type: "string", description: "optional full per-year string e.g. 5U24DA064429-03; else left for refresh" }, }, ["grant_number", "new_grant_number"]), - handler: async (a: { grant_number: string; new_grant_number: string; reporter_project_num?: string }) => - text(await rpcC("repoint_grant", { - _grant_number: a.grant_number, - _new_grant_number: a.new_grant_number, + handler: async (a: { grant_number: string; new_grant_number: string; reporter_project_num?: string }) => { + // The RPC compares grant_number exactly, so find the stored spelling by the award key, and refuse + // here a new number another grant already holds under another spelling: the RPC's exact check + // would let that through and make one award two grants. + const grants = await restAllC("grants?select=id,grant_number") as Array<{ id: string; grant_number: string }>; + const current = grants.filter((g) => awardKey(g.grant_number) === awardKey(a.grant_number)); + if (current.length > 1) { + throw new Error(`${current.map((g) => g.grant_number).join(" and ")} are one award recorded twice: merge them before repointing. Nothing was written.`); + } + const target = grantNumberFor(a.new_grant_number); + const taken = grants.find((g) => awardKey(g.grant_number) === awardKey(target) && g.id !== current[0]?.id); + if (taken) { + throw new Error(`Another grant already holds ${target} (as ${taken.grant_number}); repoint would make one award two grants. Nothing was written.`); + } + return text(await keyedRpcC("repoint_grant", { + _grant_number: current[0]?.grant_number ?? a.grant_number, + _new_grant_number: target, _reporter_project_num: a.reporter_project_num ?? null, - })), + }, `Not repointed: another grant or project already holds ${target}`)); + }, }); T("confirm_species_candidate", { @@ -657,12 +727,12 @@ function buildServer(jwt: string, caller: Caller | null, meta: RequestMeta) { }); T("add_funding_opportunity", { - description: "[curator] Add/refresh a funding opportunity (NIH/NSF/etc.). fon + title required. UPSERTS on fon (re-running fills gaps, no duplicate) and appears on the public Funding page. THE tool for \"add this solicitation to funding announcements\" — never fall back to SQL.", + description: "[curator] Add/refresh a funding opportunity (NIH/NSF/etc.). fon + title required. A call already in the KG is matched by its FON (case, spaces and dashes aside) and updated with the fields you pass, so re-running fills gaps and never duplicates; it appears on the public Funding page. The FON is the call's identity; its URL is not, because a landing page can list several calls: a URL another call already has is reported in the result's note, never refused. A final notice that replaces its forecast: pass supersedes=<the forecast's FON> and the forecast's row becomes this call in place, its old FON kept in notes. THE tool for \"add this solicitation to funding announcements\" — never fall back to SQL.", parameters: obj({ fon: { type: "string", description: "Funding Opportunity Number, e.g. 'NSF 26-526' or 'RFA-MH-25-xxx'" }, title: { type: "string" }, activity_code: { type: "string", description: "e.g. R01, R61, GRFP" }, - status: { type: "string", description: "open | forecasted | expired (default open)" }, + status: { type: "string", description: "open | forecasted | expired (default open for a new call; an existing call keeps its status unless one is given)" }, url: { type: "string" }, purpose: { type: "string" }, posted_date: { type: "string", description: "YYYY-MM-DD" }, @@ -673,21 +743,71 @@ function buildServer(jwt: string, caller: Caller | null, meta: RequestMeta) { relevance_tags: { type: "array", items: { type: "string" } }, due_dates: { type: "array", description: "Array of {date:'YYYY-MM-DD', type:'...'} objects", items: { type: "object" } }, notes: { type: "string" }, + supersedes: { type: "string", description: "FON of the forecast this final notice replaces. Its row is updated in place (new FON, old FON kept in notes) instead of a second row being added." }, }, ["fon", "title"]), handler: async (a: Record<string, unknown>) => { - // Send only what the caller provided (plus a status default). With the upsert this means an - // existing row keeps fields you did not mention, instead of being overwritten with nulls. - const body: Record<string, unknown> = { fon: a.fon, title: a.title, status: a.status ?? "open" }; - const scalars = ["activity_code", "url", "purpose", "posted_date", "open_date", "expiration_date", "budget_ceiling", "notes"]; + // Send only what the caller provided, so an existing row keeps the fields you did not mention. + // A new row also gets status 'open' unless one is given; an existing row keeps its status. + const fon = String(a.fon ?? "").trim(); + if (!fonKey(fon)) throw new Error("fon must contain letters or digits, e.g. RFA-MH-25-123"); + const body: Record<string, unknown> = { title: a.title }; + const scalars = ["status", "activity_code", "url", "purpose", "posted_date", "open_date", "expiration_date", "budget_ceiling", "notes"]; for (const k of scalars) if (a[k] != null) body[k] = a[k]; if (a.participating_orgs != null) body.participating_orgs = coerceArray(a.participating_orgs); if (a.relevance_tags != null) body.relevance_tags = coerceArray(a.relevance_tags); if (a.due_dates != null) body.due_dates = coerceArray(a.due_dates, true); - return text(await restC( "funding_opportunities?on_conflict=fon", { - method: "POST", - headers: { Prefer: "return=representation,resolution=merge-duplicates" }, - body: JSON.stringify(body), - })); + + // One call, one row (D5): found by its FON key, the key uq_funding_opportunities_fon_key + // refuses a second row by. A notice URL another call also holds is a hint, never an identity: + // a landing page can list several calls (_shared/kg-write.ts decideFundingCall). + const calls = await restAllC("funding_opportunities?select=id,fon,url,notes") as CallRow[]; + const decision = decideFundingCall(calls, { fon, url: a.url as string | undefined, supersedes: a.supersedes as string | undefined }); + if (decision.action === "refuse") throw new Error(decision.error); + const notes = decision.notes; + const note = notes.length ? { note: notes.join(" ") } : {}; + // What a unique index refused, said as what it is: the FON another call holds, written in the + // meantime or not readable to this account. No index refuses a notice URL another call has + // (20261117181500 builds none: a landing page lists several calls). + const refusedBy = (e: unknown, updating?: CallRow) => { + const subject = updating ? `${updating.fon} (id ${updating.id}) was not updated` : `${fon} was not added`; + return new Error(`${subject}: that FON is already in the KG (${uniqueViolationText(e)}), written in the meantime or not readable ` + + "to this account. Nothing was written; list_funding_opportunities shows it."); + }; + + if (decision.action === "update") { + const row = decision.row; + let patch = body; + if (decision.matchedBy === "supersedes") { + // The final notice takes over its forecast's row, in place: one call, one node. + const kept = String(body.notes ?? row.notes ?? ""); + const stamp = `Supersedes ${row.fon} (${new Date().toISOString().slice(0, 10)})`; + patch = { ...body, fon, notes: kept.includes(String(row.fon)) ? kept : kept.trim() ? `${kept}\n${stamp}` : stamp }; + } + let rows: unknown; + try { + rows = await restC(`funding_opportunities?id=eq.${row.id}`, { + method: "PATCH", headers: { Prefer: "return=representation" }, body: JSON.stringify(patch), + }); + } catch (e) { + if (!isUniqueViolation(e)) throw e; + throw refusedBy(e, row); + } + // RLS filters a forbidden UPDATE to zero rows instead of erroring; say so rather than "updated". + if (!Array.isArray(rows) || !rows.length) { + throw new Error(`${row.fon} is in the KG (id ${row.id}) but RLS did not let this account update it; nothing changed.`); + } + return text({ action: "already_in_kg", matched_by: decision.matchedBy, id: row.id, ...note, rows }); + } + + try { + const rows = await restC("funding_opportunities", { + method: "POST", headers: { Prefer: "return=representation" }, body: JSON.stringify({ status: "open", ...body, fon }), + }); + return text({ action: "inserted", rows, ...note }); + } catch (e) { + if (!isUniqueViolation(e)) throw e; + throw refusedBy(e); + } }, }); @@ -699,9 +819,11 @@ function buildServer(jwt: string, caller: Caller | null, meta: RequestMeta) { }; T("add_resource", { - description: "[curator] Add a tool/library/model/dataset/benchmark/protocol to the public Resources page. name + category required. Matches an existing row by name (case-insensitive) and fills only the fields you pass, so re-running never duplicates. THE tool for \"add X to the resources page\" — never fall back to SQL.", + description: "[curator] Add a tool/library/model/dataset/benchmark/protocol to the public Resources page. name + category required (a blank name is refused). Matches a row of the same type already in the KG by its name (case, spacing and punctuation aside) and fills only the fields you pass on that row (action already_in_kg), so re-running never duplicates; two rows with that name are refused until they are merged. A homepage or repository URL is not an identity (a lab's tools share its homepage): a different-named row with the same URL is never changed. When such a row exists and no row has this name, nothing is written until you say which it is: same_as=<its id> if this is that row under another name (it is updated), distinct=true if this is another resource (it is added, and the other row named in the note). THE tool for \"add X to the resources page\" — never fall back to SQL.", parameters: obj({ name: { type: "string" }, + same_as: { type: "string", description: "Optional: the id of the resource already in the KG that this one IS, when its name there differs (an alias or rename). That row is updated instead of a new one added." }, + distinct: { type: "boolean", description: "Optional: true when this is another resource than the one already in the KG with the same homepage or repository URL (another tool of the same lab). Never overrides a row with this name." }, category: { type: "string", enum: Object.keys(RESOURCE_CATEGORY_TYPE) }, url: { type: "string", description: "Homepage or docs URL (aliases accepted: link, website, homepage, external_url)" }, description: { type: "string", description: "One line: what it does" }, @@ -734,12 +856,22 @@ function buildServer(jwt: string, caller: Caller | null, meta: RequestMeta) { // render as containerized. if (meta.containerized != null) meta.containerized = meta.containerized === true || meta.containerized === "true"; - const name = String(a.name).trim(); - const existing = await restC( - `resources?select=id,metadata,description,external_url&name=ilike.${encodeURIComponent(name.replace(/[%_*]/g, ""))}&limit=1`); - if (Array.isArray(existing) && existing.length) { - const row = existing[0]; - const patch: Record<string, unknown> = { metadata: { ...(row.metadata ?? {}), ...meta } }; + const name = a.name == null ? "" : String(a.name).trim(); + // The same thing already in the KG: the same resource_type and the same name key, or the record + // same_as names (_shared/kg-write.ts decideResource). Never across types: a dataset and the tool + // that made it may share a name. Never by a URL alone: a lab's tools share its homepage, so a + // URL-only hit is written neither way until same_as or distinct says which it is. A blank name + // is refused there, before any match. + const all = await restAllC("resources?select=id,name,resource_type,external_url,metadata->>repoUrl") as ResourceRow[]; + const decision = decideResource(all, { + type: resource_type, name, url: a.url, repoUrl: a.repo_url, sameAs: a.same_as, + distinct: a.distinct === true || a.distinct === "true", + }); + if (decision.action === "refuse") throw new Error(decision.error); + if (decision.action === "update") { + const row = decision.row; + const [current] = await restC(`resources?id=eq.${row.id}&select=metadata`) as Array<{ metadata: Record<string, unknown> | null }>; + const patch: Record<string, unknown> = { metadata: { ...(current?.metadata ?? {}), ...meta } }; if (a.url != null) patch.external_url = a.url; if (a.description != null) patch.description = a.description; const rows = await restC(`resources?id=eq.${row.id}`, { @@ -749,16 +881,19 @@ function buildServer(jwt: string, caller: Caller | null, meta: RequestMeta) { if (!Array.isArray(rows) || !rows.length) { throw new Error(`"${name}" exists (id ${row.id}) but RLS did not let this account update it; nothing changed. Ask an admin to apply the edit.`); } - return text({ action: "updated", rows }); + return text({ action: "already_in_kg", matched_by: decision.matchedBy, id: row.id, + ...(row.name !== name ? { name_in_kg: row.name } : {}), ...(decision.note ? { note: decision.note } : {}), rows }); } if (!("mcpStatus" in meta)) meta.mcpStatus = "not-started"; - return text({ action: "inserted", rows: await restC("resources", { + const rows = await restC("resources", { method: "POST", headers: { Prefer: "return=representation" }, body: JSON.stringify({ name, resource_type, description: a.description ?? null, external_url: a.url ?? null, metadata: meta, }), - }) }); + }); + // A record that shares only a URL (distinct=true), or the same name under another type: named in the note. + return text({ action: "inserted", rows, ...(decision.note ? { note: decision.note } : {}) }); }, }); diff --git a/supabase/functions/import-grant-publications/index.ts b/supabase/functions/import-grant-publications/index.ts index fc5442eb..f53e4986 100644 --- a/supabase/functions/import-grant-publications/index.ts +++ b/supabase/functions/import-grant-publications/index.ts @@ -8,12 +8,21 @@ // the list uses and upserts them into `publications` + `project_publications`, so // both views agree and the pubs become curatable KG nodes. // -// Idempotent: dedupes publications by PMID (then DOI) and links by -// (project_id, publication_id), so it is safe to re-run. Run for one grant -// (POST { "grant_number": "U24MH136628" }) or all consortium grants (no body). +// Idempotent: a paper is recognised by its PMID key, then its DOI key (_shared/kg-write.ts, the keys +// the uq_publications_* indexes refuse a second row by), and links by (project_id, publication_id), +// so it is safe to re-run. Each paper it touches is given its KG node (a spine row) if it has none, +// and a preprint is linked to its published version (resource_links revision_of) by +// public.kg_link_publication_versions(), once 20261117181500 is applied; before that the result says +// version_links "unavailable". Run for one grant (POST { "grant_number": "U24MH136628" }) or all +// consortium grants (no body). import { createClient } from "https://esm.sh/@supabase/supabase-js@2"; import { bearerOf, getCorsHeaders, isServiceRole, requireAdmin } from "../_shared/auth.ts"; +import { awardKey, nihAwardCore } from "../_shared/identity-keys.ts"; +import { + ensureSpineRow, findOrCreatePublication, isUniqueViolation, kgSession, linkPublicationVersions, + VERSION_LINKS_UNAVAILABLE, type KgSession, type VersionLinks, +} from "../_shared/kg-write.ts"; // ─── NIH / iCite / PubMed fetch helpers ──────────────────────── // Mirrors the logic in `nih-grants` so the publications we import are exactly @@ -34,10 +43,10 @@ interface ReporterPub { pubmedLink: string; } -// Match the core_project_num derivation used by nih-grants' list handler so we -// query RePORTER with the same key that produced the count on the list page. +// The NIH core ('1R34DA059506-01' -> 'R34DA059506'), the key RePORTER's core_project_nums takes and +// the one that produced the count on the list page. A number that is not NIH-shaped is sent as stored. function coreProjectNumFor(grantNumber: string): string { - return grantNumber.replace(/^\d+/, "").replace(/-\d+$/, ""); + return nihAwardCore(grantNumber) ?? grantNumber.trim(); } async function fetchReporterPmids(coreProjectNum: string): Promise<any[]> { @@ -147,6 +156,9 @@ async function fetchPublicationsForGrant(grantNumber: string): Promise<ReporterP } // ─── KG upsert ────────────────────────────────────────────────── +// Through _shared/kg-write.ts: a paper already in the KG is reused, never copied; a new one is +// inserted; either way it gets its node, so a preprint and its published version can be linked +// (two records joined by revision_of, never merged into one). interface GrantResult { grant_number: string; @@ -154,37 +166,40 @@ interface GrantResult { reporter_count: number; pubs_created: number; pubs_reused: number; + /** How each reused paper was recognised. */ + pubs_matched: { pmid: number; doi: number }; + spine_rows_created: number; links_created: number; links_existing: number; + /** The revision_of links for this grant's papers, or why there are none. */ + version_links: VersionLinks | string | null; + /** Papers the KG already held under another write, or under two records (a PMID and a DOI). */ + already_in_kg: string[]; skipped?: string; } -// Upsert one publication (dedupe by PMID, then DOI) and return its id. -async function upsertPublication(admin: any, pub: ReporterPub): Promise<{ id: string; created: boolean } | null> { - // 1. Dedupe by PMID. - let existing: { id: string } | null = null; - if (pub.pmid) { - const { data } = await admin.from("publications").select("id").eq("pmid", pub.pmid).maybeSingle(); - if (data) existing = data; - } - // 2. Fall back to DOI (case-insensitive). - if (!existing && pub.doi) { - const { data } = await admin.from("publications").select("id").ilike("doi", pub.doi).maybeSingle(); - if (data) existing = data; - } +const emptyResult = (grantNumber: string, projectId: string | null): GrantResult => ({ + grant_number: grantNumber, + project_id: projectId, + reporter_count: 0, + pubs_created: 0, + pubs_reused: 0, + pubs_matched: { pmid: 0, doi: 0 }, + spine_rows_created: 0, + links_created: 0, + links_existing: 0, + version_links: null, + already_in_kg: [], +}); - if (existing) { - // Refresh only volatile citation metrics; leave curator-editable fields alone. - await admin - .from("publications") - .update({ citations: pub.citations, rcr: pub.rcr }) - .eq("id", existing.id); - return { id: existing.id, created: false }; - } +async function importForProject(kg: KgSession, grantNumber: string, projectId: string): Promise<GrantResult> { + const result = emptyResult(grantNumber, projectId); + const pubs = await fetchPublicationsForGrant(grantNumber); + result.reporter_count = pubs.length; + const papers: string[] = []; - const { data: inserted, error } = await admin - .from("publications") - .insert({ + for (const pub of pubs) { + const found = await findOrCreatePublication(kg, { pmid: pub.pmid || null, doi: pub.doi || null, title: pub.title || "Unknown", @@ -195,56 +210,57 @@ async function upsertPublication(admin: any, pub: ReporterPub): Promise<{ id: st rcr: pub.rcr || null, keywords: pub.keywords.length ? pub.keywords : null, pubmed_link: pub.pubmedLink || null, - }) - .select("id") - .single(); - - if (error || !inserted) { - console.error(`Failed to insert publication PMID=${pub.pmid}:`, error?.message); - return null; - } - return { id: inserted.id, created: true }; -} - -async function importForProject(admin: any, grantNumber: string, projectId: string): Promise<GrantResult> { - const result: GrantResult = { - grant_number: grantNumber, - project_id: projectId, - reporter_count: 0, - pubs_created: 0, - pubs_reused: 0, - links_created: 0, - links_existing: 0, - }; - - const pubs = await fetchPublicationsForGrant(grantNumber); - result.reporter_count = pubs.length; - - for (const pub of pubs) { - const up = await upsertPublication(admin, pub); - if (!up) continue; - if (up.created) result.pubs_created++; - else result.pubs_reused++; + }); + if (!found.ok) { + console.error(`Publication PMID=${pub.pmid} not written: ${found.error}`); + if (found.already_in_kg) result.already_in_kg.push(found.error); + continue; + } + const paper = found.row; + if (found.note) result.already_in_kg.push(`PMID ${pub.pmid}: ${found.note}`); + if (found.created) { + result.pubs_created++; + } else { + result.pubs_reused++; + if (found.matchedBy === "pmid" || found.matchedBy === "doi") result.pubs_matched[found.matchedBy]++; + // Refresh only volatile citation metrics; leave curator-editable fields alone. + await kg.db.from("publications").update({ citations: pub.citations, rcr: pub.rcr }).eq("id", paper.id); + } - // Link to project (idempotent: check-then-insert, constraint-agnostic). - const { data: link } = await admin + // Its node: a paper without one is not in the graph, and cannot be linked to its other version. + const spine = await ensureSpineRow(kg, "publications", paper, { + name: paper.title || pub.title || "Unknown", + resource_type: "publication", + external_url: pub.pubmedLink || null, + }); + if (spine.created) result.spine_rows_created++; + else if (!spine.ok) console.error(`No node for PMID=${pub.pmid}: ${spine.error}`); + papers.push(paper.id); + + // Link to project (idempotent: check-then-insert; a 23505 means another run linked it first). + const { data: link } = await kg.db .from("project_publications") .select("publication_id") .eq("project_id", projectId) - .eq("publication_id", up.id) + .eq("publication_id", paper.id) .maybeSingle(); if (link) { result.links_existing++; } else { - const { error: linkErr } = await admin + const { error: linkErr } = await kg.db .from("project_publications") - .insert({ project_id: projectId, publication_id: up.id }); - if (linkErr) console.error(`Link insert failed (${grantNumber} -> ${up.id}):`, linkErr.message); - else result.links_created++; + .insert({ project_id: projectId, publication_id: paper.id }); + if (!linkErr) result.links_created++; + else if (isUniqueViolation(linkErr)) result.links_existing++; + else console.error(`Link insert failed (${grantNumber} -> ${paper.id}):`, linkErr.message); } } + // Now that each of this grant's papers is a node: link each preprint to its published version. + const versions = await linkPublicationVersions(kg.db, papers); + result.version_links = versions.available ? versions : (versions.note ?? VERSION_LINKS_UNAVAILABLE); + if (versions.error) console.error(`Version links for ${grantNumber}: ${versions.error}`); return result; } @@ -264,10 +280,15 @@ Deno.serve(async (req) => { } try { + // Named on this server-side client (Principle X): without it these service-role writes read + // 'unknown' in data_audit_log. No source-class header: declaring one is a separate decision that + // raises what the importer may overwrite (20260831160000). const admin = createClient( Deno.env.get("SUPABASE_URL")!, Deno.env.get("SUPABASE_SERVICE_ROLE_KEY")!, + { global: { headers: { "x-bbqs-client": "import-grant-publications" } } }, ); + const kg = kgSession(admin); // Optional { grant_number } in the body scopes the import to one grant. let grantNumberFilter: string | null = null; @@ -283,11 +304,13 @@ Deno.serve(async (req) => { } // The `projects` table is the canonical consortium list and gives us the - // project_id that `project_publications` links to. - let query = admin.from("projects").select("id, grant_number"); - if (grantNumberFilter) query = query.eq("grant_number", grantNumberFilter); - const { data: projects, error: projErr } = await query; + // project_id that `project_publications` links to. A grant is found by its award key, so + // '1U24MH136628-01' finds the project stored as U24MH136628. + const { data: allProjects, error: projErr } = await admin.from("projects").select("id, grant_number"); if (projErr) throw new Error(`Failed to read projects: ${projErr.message}`); + const projects = grantNumberFilter + ? (allProjects ?? []).filter((p: { grant_number: string }) => awardKey(p.grant_number) === awardKey(grantNumberFilter)) + : allProjects; if (!projects || projects.length === 0) { return new Response( @@ -304,17 +327,11 @@ Deno.serve(async (req) => { const results: GrantResult[] = []; for (const project of projects) { try { - results.push(await importForProject(admin, project.grant_number, project.id)); + results.push(await importForProject(kg, project.grant_number, project.id)); } catch (err) { console.error(`Import failed for ${project.grant_number}:`, err); results.push({ - grant_number: project.grant_number, - project_id: project.id, - reporter_count: 0, - pubs_created: 0, - pubs_reused: 0, - links_created: 0, - links_existing: 0, + ...emptyResult(project.grant_number, project.id), skipped: err instanceof Error ? err.message : "unknown error", }); } @@ -322,16 +339,21 @@ Deno.serve(async (req) => { await new Promise((r) => setTimeout(r, 150)); } - const totals = results.reduce( - (acc, r) => ({ - reporter_count: acc.reporter_count + r.reporter_count, - pubs_created: acc.pubs_created + r.pubs_created, - pubs_reused: acc.pubs_reused + r.pubs_reused, - links_created: acc.links_created + r.links_created, - links_existing: acc.links_existing + r.links_existing, - }), - { reporter_count: 0, pubs_created: 0, pubs_reused: 0, links_created: 0, links_existing: 0 }, - ); + const sum = (f: (r: GrantResult) => number) => results.reduce((n, r) => n + f(r), 0); + const linked = (k: "done" | "noop" | "skipped") => + sum((r) => (r.version_links && typeof r.version_links === "object" ? r.version_links[k] : 0)); + const unavailable = results.find((r) => typeof r.version_links === "string")?.version_links; + const totals = { + reporter_count: sum((r) => r.reporter_count), + pubs_created: sum((r) => r.pubs_created), + pubs_reused: sum((r) => r.pubs_reused), + pubs_matched: { pmid: sum((r) => r.pubs_matched.pmid), doi: sum((r) => r.pubs_matched.doi) }, + spine_rows_created: sum((r) => r.spine_rows_created), + links_created: sum((r) => r.links_created), + links_existing: sum((r) => r.links_existing), + version_links: unavailable ?? { done: linked("done"), noop: linked("noop"), skipped: linked("skipped") }, + already_in_kg: sum((r) => r.already_in_kg.length), + }; return new Response( JSON.stringify({ success: true, grants: results.length, totals, results }), diff --git a/supabase/functions/nih-grants/index.ts b/supabase/functions/nih-grants/index.ts index 3a9a0ae4..0aa373d5 100644 --- a/supabase/functions/nih-grants/index.ts +++ b/supabase/functions/nih-grants/index.ts @@ -1,6 +1,10 @@ import { createClient } from "npm:@supabase/supabase-js@2.39.3"; import { syncReporterPis, type ReporterPi } from "../_shared/grant-sync.ts"; import { requireCuratorOrService } from "../_shared/auth.ts"; +import { awardKey, nihAwardCore } from "../_shared/identity-keys.ts"; +import { + findOrCreateInvestigator, findOrCreateOrganization, isUniqueViolation, kgSession, uniqueViolationText, type KgSession, +} from "../_shared/kg-write.ts"; const corsHeaders = { "Access-Control-Allow-Origin": "*", @@ -263,31 +267,45 @@ async function reporterTitleSearch(title: string): Promise<any[]> { // ─── Full entity seeding pipeline ─────────────────────────── // Given a grant number and its fetched data, ensures all related // entities exist: organization, resource nodes, investigators, -// grant_investigators links, and project metadata row. - -async function seedGrantEntities(supabase: any, grantNumber: string, projectData: any) { - // 1. Upsert grant row - const { data: grantRow } = await supabase - .from("grants") - .upsert({ - grant_number: grantNumber, - title: projectData.title || "Unknown", - abstract: projectData.abstract || null, - award_amount: projectData.awardAmount || null, - fiscal_year: projectData.fiscalYear || null, - nih_link: projectData.nihLink || null, - reporter_project_num: projectData.reporterProjectNum ?? null, - updated_at: new Date().toISOString(), - }, { onConflict: "grant_number" }) - .select("id, resource_id") - .single(); - - if (!grantRow) { - console.error(`Failed to upsert grant ${grantNumber}`); - return; +// grant_investigators links, and project metadata row. Each is found +// first, by the identity key the database's uq_* indexes refuse a second +// row by (_shared/kg-write.ts), and written only when it is not there. +// Throws when the grant itself cannot be written; returns what it had to +// leave out (a person or organization it could not match or write). + +async function seedGrantEntities(supabase: any, kg: KgSession, grantNumber: string, projectData: any): Promise<string[]> { + const warnings: string[] = []; + // 1. The grant row: the one already holding this award, however its number is spelled (by award + // key, as uq_grants_award_key compares), updated by id. An upsert on the exact grant_number would + // add '1U01DA063534' next to 'U01DA063534'. A new award is stored as its NIH core. + const fields = { + title: projectData.title || "Unknown", + abstract: projectData.abstract || null, + award_amount: projectData.awardAmount || null, + fiscal_year: projectData.fiscalYear || null, + nih_link: projectData.nihLink || null, + reporter_project_num: projectData.reporterProjectNum ?? null, + updated_at: new Date().toISOString(), + }; + const { data: grants, error: readErr } = await supabase.from("grants").select("id, grant_number"); + if (readErr) throw new Error(`could not read grants: ${readErr.message}`); + const same = (grants || []).filter((g: any) => awardKey(g.grant_number) === awardKey(grantNumber)); + if (same.length > 1) { + throw new Error(`${same.map((g: any) => g.grant_number).join(" and ")} are one award recorded twice: merge them; not refreshed`); + } + const write = same.length + ? supabase.from("grants").update(fields).eq("id", same[0].id) + : supabase.from("grants").insert({ grant_number: nihAwardCore(grantNumber) ?? grantNumber, ...fields }); + const { data: grantRow, error: grantErr } = await write.select("id, grant_number, resource_id").single(); + if (grantErr || !grantRow) { + // A 23505 here is another writer's row for this award (uq_grants_award_key), written after the read. + throw new Error(isUniqueViolation(grantErr) + ? `grant ${grantNumber} was not written: it is already in the KG (${uniqueViolationText(grantErr)}), written in the meantime; refresh again to update that row` + : `grant ${grantNumber} was not written: ${grantErr?.message ?? "no row returned"}`); } const grantId = grantRow.id; + const storedNumber: string = grantRow.grant_number; // 2. Ensure grant has a resource node if (!grantRow.resource_id) { @@ -309,95 +327,35 @@ async function seedGrantEntities(supabase: any, grantNumber: string, projectData } } - // 3. Ensure organization exists + // 3. Ensure organization exists ("UNIVERSITY OF CALIFORNIA, SAN DIEGO" is the curated "University + // of California San Diego": found by name key, never added as a second organization). const institutionName = projectData.institution; let orgId: string | null = null; if (institutionName && institutionName !== "Unknown") { - const { data: existingOrg } = await supabase - .from("organizations") - .select("id") - .ilike("name", institutionName) - .maybeSingle(); - - if (existingOrg) { - orgId = existingOrg.id; - } else { - const { data: newOrg } = await supabase - .from("organizations") - .insert({ name: institutionName }) - .select("id") - .single(); - orgId = newOrg?.id || null; - } + const org = await findOrCreateOrganization(kg, institutionName); + if (org.ok) orgId = org.row.id; + else warnings.push(`${storedNumber}: organization not linked: ${org.error}`); } - // 4. Ensure investigators exist and are linked + // 4. Ensure investigators exist and are linked. Found by RePORTER profile id, then by name key + // ("Sima Mofakham", "BIJAN PESARAN"; where a curated record and its email-less RePORTER copy both + // have that key, the curated one, with its email), then by a unique first + last name, so RePORTER + // variants like "Patrick T McGrath" resolve to a curated "Patrick McGrath" row (preserving its + // email). Records with two different emails under one name are two people for a curator to tell + // apart: nothing is linked and a warning says why (matchPeople). A new person is written before + // their spine row, so a failed insert leaves no orphan node. const piDetails: any[] = projectData.piDetails || []; for (const pi of piDetails) { const piName = (pi.fullName || "").trim(); if (!piName) continue; - // Find existing investigator: try exact match first, then fuzzy - // first+last token match so RePORTER variants like "Patrick T McGrath" - // resolve to a curated "Patrick McGrath" row (preserving its email). - const normalized = piName.replace(/\s+/g, " ").trim(); - const tokens = normalized.split(" ").filter(Boolean); - const firstTok = tokens[0]?.toLowerCase() || ""; - const lastTok = tokens[tokens.length - 1]?.toLowerCase() || ""; - - let existingInv: { id: string; resource_id: string | null } | null = null; - const { data: exact } = await supabase - .from("investigators") - .select("id, resource_id") - .ilike("name", normalized) - .maybeSingle(); - existingInv = exact || null; - - if (!existingInv && firstTok && lastTok) { - const { data: candidates } = await supabase - .from("investigators") - .select("id, resource_id, name, email") - .ilike("name", `${firstTok}%${lastTok}`); - const match = (candidates || []).find((c: any) => { - const t = (c.name || "").replace(/\s+/g, " ").trim().toLowerCase().split(" "); - return t[0] === firstTok && t[t.length - 1] === lastTok; - }); - // Prefer the variant that already has an email - const withEmail = (candidates || []).find((c: any) => { - const t = (c.name || "").replace(/\s+/g, " ").trim().toLowerCase().split(" "); - return t[0] === firstTok && t[t.length - 1] === lastTok && c.email; - }); - existingInv = (withEmail || match) ? { id: (withEmail || match).id, resource_id: (withEmail || match).resource_id } : null; - } - - let invId: string; - if (existingInv) { - invId = existingInv.id; - } else { - // Create resource node for investigator - const { data: invResource } = await supabase - .from("resources") - .insert({ - name: piName, - resource_type: "investigator", - }) - .select("id") - .single(); - - const { data: newInv } = await supabase - .from("investigators") - .insert({ - name: piName, - resource_id: invResource?.id || null, - }) - .select("id") - .single(); - - if (!newInv) continue; - invId = newInv.id; - - console.log(`Created investigator: ${piName} (${invId})`); + const person = await findOrCreateInvestigator(kg, { name: piName, reporterProfileId: pi.profileId }); + if (!person.ok) { + warnings.push(`${storedNumber}: ${piName} not linked: ${person.error}`); + continue; } + const invId = person.row.id; + if (person.created) console.log(`Created investigator: ${piName} (${invId})`); // Link investigator to organization if (orgId) { @@ -428,24 +386,34 @@ async function seedGrantEntities(supabase: any, grantNumber: string, projectData name: pi.fullName || "", isContactPi: !!pi.isContactPi, })); - await syncReporterPis(supabase, grantId, grantNumber, reporterPis); - - // 5. Ensure project metadata row exists - const { data: existingProject } = await supabase - .from("projects") - .select("id") - .eq("grant_number", grantNumber) - .maybeSingle(); + await syncReporterPis(supabase, grantId, storedNumber, reporterPis); + + // 5. Ensure project metadata row exists: the one on this grant, or holding this award under another + // spelling of its number (uq_projects_award_key). + const { data: projects, error: projErr } = await supabase.from("projects").select("id, grant_id, grant_number"); + if (projErr) { + warnings.push(`${storedNumber}: projects not read, so no project row was added: ${projErr.message}`); + return warnings; + } + const existingProject = (projects || []).find((p: any) => + p.grant_id === grantId || awardKey(p.grant_number) === awardKey(storedNumber)); if (!existingProject) { - await supabase + const { error } = await supabase .from("projects") .insert({ - grant_number: grantNumber, + grant_number: storedNumber, grant_id: grantId, }); - console.log(`Created project metadata for ${grantNumber}`); + if (error) { + warnings.push(isUniqueViolation(error) + ? `${storedNumber}: project row not added: one is already in the KG for this award (${uniqueViolationText(error)}), written in the meantime` + : `${storedNumber}: project row not written: ${error.message}`); + } else { + console.log(`Created project metadata for ${storedNumber}`); + } } + return warnings; } // ─── Main handler ─────────────────────────────────────────── @@ -626,32 +594,39 @@ Deno.serve(async (req) => { // ACTION: refresh — full pipeline: fetch from NIH APIs, seed all entities. ?grant=<number> // scopes it to one award (targeted, fast) instead of the whole roster. if (action === "refresh") { - const one = url.searchParams.get("grant"); + // ?grant= in any NIH spelling ('1R61MH142354-01') is reduced to its core: the RePORTER search + // key, and the award key seedGrantEntities finds the stored grant row by. + const raw = url.searchParams.get("grant"); + const one = raw ? (nihAwardCore(raw) ?? raw.trim()) : null; const grantNumbers = one ? [one] : await loadGrantNumbers(supabase); console.log(`Refreshing ${grantNumbers.length} grants (full pipeline)...`); + // One run's reads of organizations and investigators, shared by every grant it seeds. + const kg = kgSession(supabase); let updatedCount = 0; const errors: string[] = []; + const warnings: string[] = []; for (const grant of grantNumbers) { try { const projectData = await fetchGrantData(grant); if (projectData) { - await seedGrantEntities(supabase, grant, projectData); + warnings.push(...await seedGrantEntities(supabase, kg, grant, projectData)); updatedCount++; } await new Promise(resolve => setTimeout(resolve, 150)); } catch (err) { + // A grant that could not be written is an error, never counted as updated. const msg = err instanceof Error ? err.message : "unknown"; errors.push(`${grant}: ${msg}`); console.error(`Error seeding ${grant}:`, msg); } } - console.log(`Refresh complete: ${updatedCount} grants fully seeded, ${errors.length} errors`); + console.log(`Refresh complete: ${updatedCount} grants fully seeded, ${errors.length} errors, ${warnings.length} warnings`); return new Response( - JSON.stringify({ success: true, updated: updatedCount, errors: errors.length, errorDetails: errors }), + JSON.stringify({ success: true, updated: updatedCount, errors: errors.length, errorDetails: errors, warnings }), { headers: { ...corsHeaders, "Content-Type": "application/json" } } ); } @@ -671,11 +646,16 @@ Deno.serve(async (req) => { console.log("No grants found, performing initial full seed..."); const results = []; + const kg = kgSession(supabase); for (const grant of GRANT_NUMBERS) { const projectData = await fetchGrantData(grant); if (projectData) { - await seedGrantEntities(supabase, grant, projectData); - results.push(projectData); + try { + await seedGrantEntities(supabase, kg, grant, projectData); + results.push(projectData); + } catch (err) { + console.error(`Error seeding ${grant}:`, err instanceof Error ? err.message : err); + } } await new Promise(resolve => setTimeout(resolve, 150)); } diff --git a/supabase/functions/seed-consortium/index.ts b/supabase/functions/seed-consortium/index.ts index 6c335625..42aab9d5 100644 --- a/supabase/functions/seed-consortium/index.ts +++ b/supabase/functions/seed-consortium/index.ts @@ -1,5 +1,7 @@ import { createClient } from "npm:@supabase/supabase-js@2.39.3"; import { getCorsHeaders, requireAdmin } from "../_shared/auth.ts"; +import { orcidKey } from "../_shared/identity-keys.ts"; +import { emailKey, findOrCreateInvestigator, kgSession, loadPeople, matchPeople, type PersonKey } from "../_shared/kg-write.ts"; interface ConsortiumPerson { name: string; @@ -2004,77 +2006,127 @@ Deno.serve(async (req) => { const supabaseUrl = Deno.env.get("SUPABASE_URL")!; const supabaseServiceKey = Deno.env.get("SUPABASE_SERVICE_ROLE_KEY")!; - const supabase = createClient(supabaseUrl, supabaseServiceKey); + // Service-role writes name themselves and the admin who ran them (Principle X); without the header + // they read 'unknown' in data_audit_log. Set on this server-side client only. + const supabase = createClient(supabaseUrl, supabaseServiceKey, { + global: { headers: { "x-bbqs-client": `seed-consortium:${auth.user?.email ?? auth.user?.id ?? "admin"}` } }, + }); try { let created = 0; let updated = 0; let skipped = 0; const errors: string[] = []; + const notes: string[] = []; + // The curator's worklist: every roster person this run did not write because a name alone + // found them, returned in full (errors are capped; this list is not). + const needsCurator: string[] = []; + + // The people, read once and matched here (_shared/kg-write.ts): by email, primary or secondary + // on either side (an email ilike on the primary column alone missed a member whose form address + // is their second one), then by ORCID, then by name key. A name is a guess (namesakes exist): + // a record it finds that carries another email, or records with the name that carry two + // different emails, are somebody a curator has to tell apart, so nothing is written to them + // (matchPeople's `ambiguous`), and the person goes on the curator's worklist (needsCurator). + // So a name only ever reuses a record that has no email (a RePORTER twin), and the + // sync_member_groups trigger, which skips a record without an email and otherwise keys Google + // Groups on it, is never fired for another person's address by a working_groups write from here. + const kg = kgSession(supabase); + const people = await loadPeople(kg); + const ORDER: PersonKey[] = ["email", "orcid", "name"]; for (const person of CONSORTIUM_PEOPLE) { try { - // Try to find existing investigator by email (primary or secondary) - const allEmails = [person.email, ...person.secondary_emails].map(e => e.toLowerCase()); - - const { data: existing } = await supabase - .from("investigators") - .select("id, email, secondary_emails, orcid, working_groups, role") - .or(allEmails.map(e => `email.ilike.${e}`).join(",")) - .maybeSingle(); + const emails = [person.email, ...person.secondary_emails].map((e) => e.toLowerCase()); + const query = { name: person.name, email: emails[0], secondaryEmails: emails.slice(1), orcid: person.orcid || null }; + // An ORCID goes on a record only if no other record holds it: one ORCID is one person + // (uq_investigators_orcid_key refuses a second once 20261117181500 is applied). + const orcidHeldElsewhere = (id: string | null) => { + const k = orcidKey(person.orcid); + return !!k && people.some((r) => r.id !== id && orcidKey(r.orcid) === k); + }; + const match = matchPeople(people, query, ORDER); + // A name may only reuse a record that has no email. matchPeople already refuses one with + // another email when this person has an email; this also holds for a roster entry without one. + const nameOnly = match.by === "name" && !!match.row; + if (match.ambiguous || (nameOnly && emailKey(match.row!.email))) { + // For a curator: nothing is written to the record(s) found, and no second record is made. + needsCurator.push(`${person.name}: ${match.reason ?? `matched only by name to "${match.row!.name}" (id ${match.row!.id}), ` + + "which has an email this roster entry has none to compare with: nothing was written to it"}`); + continue; + } + const existing = match.row; + // Said once the update is done, as what was done (below). + const byNameOnly = nameOnly + ? `${person.name}: matched by name only, to "${existing!.name}" (id ${existing!.id}), which has no email` + : null; if (existing) { + const { data: current, error: readErr } = await supabase + .from("investigators") + .select("id, secondary_emails, orcid, working_groups, role") + .eq("id", existing.id) + .single(); + if (readErr || !current) { + errors.push(`${person.name}: ${readErr?.message ?? "matched record not readable"}`); + continue; + } + // Update with new data (merge, don't overwrite non-empty) const updates: Record<string, any> = {}; - + if (person.secondary_emails.length > 0) { - const existingSec = existing.secondary_emails || []; + const existingSec = current.secondary_emails || []; const merged = [...new Set([...existingSec, ...person.secondary_emails.map(e => e.toLowerCase())])]; updates.secondary_emails = merged; } - - if (person.orcid && !existing.orcid) { - updates.orcid = person.orcid; + + if (person.orcid && !current.orcid) { + if (orcidHeldElsewhere(current.id)) notes.push(`${person.name}: ORCID ${person.orcid} is on another record; not copied (merge them)`); + else updates.orcid = person.orcid; } - + if (person.working_groups.length > 0) { - const existingWg = existing.working_groups || []; + const existingWg = current.working_groups || []; const merged = [...new Set([...existingWg, ...person.working_groups])]; updates.working_groups = merged; } - - if (person.role && !existing.role) { + + if (person.role && !current.role) { updates.role = person.role; } if (Object.keys(updates).length > 0) { - await supabase.from("investigators").update(updates).eq("id", existing.id); - updated++; + const { error: updateErr } = await supabase.from("investigators").update(updates).eq("id", current.id); + if (updateErr) { + errors.push(`${person.name}: ${updateErr.message}`); + } else { + // Later people in this run are matched against what was just written. + if (updates.orcid) existing.orcid = updates.orcid; + if (updates.secondary_emails) existing.secondary_emails = updates.secondary_emails; + updated++; + if (byNameOnly) { + notes.push(`${byNameOnly}: updated its ${Object.keys(updates).join(", ")}; its email was left for a curator to confirm`); + } + } } else { skipped++; + if (byNameOnly) notes.push(`${byNameOnly}: it already had everything the roster lists, so nothing was written`); } } else { - // Create new investigator with resource node - const { data: resource } = await supabase - .from("resources") - .insert({ name: person.name, resource_type: "investigator" }) - .select("id") - .single(); - - const { error: insertErr } = await supabase.from("investigators").insert({ - name: person.name, - email: person.email.toLowerCase(), - secondary_emails: person.secondary_emails.map(e => e.toLowerCase()), - orcid: person.orcid || null, - working_groups: person.working_groups, - role: person.role || null, - resource_id: resource?.id || null, - }); + // Create the person, then their node (findOrCreateInvestigator writes the person first). + if (person.orcid && orcidHeldElsewhere(null)) notes.push(`${person.name}: ORCID ${person.orcid} is on another record; not copied`); + const made = await findOrCreateInvestigator(kg, { + ...query, orcid: orcidHeldElsewhere(null) ? null : query.orcid, + }, { extra: { working_groups: person.working_groups, role: person.role || null }, order: ORDER }); - if (insertErr) { - errors.push(`${person.name}: ${insertErr.message}`); - } else { + if (!made.ok) { + errors.push(`${person.name}: ${made.error}`); + } else if (made.created) { created++; + } else { + skipped++; + if (made.note) notes.push(`${person.name}: ${made.note}`); } } } catch (err) { @@ -2082,8 +2134,17 @@ Deno.serve(async (req) => { } } + // errorDetails is capped (a failure that repeats for every person, say RLS, would fill it), and + // says how many it leaves out; the curator's worklist and the notes are returned in full. + const SHOWN_ERRORS = 10; return new Response( - JSON.stringify({ success: true, created, updated, skipped, errors: errors.length, errorDetails: errors.slice(0, 10) }), + JSON.stringify({ + success: true, created, updated, skipped, + errors: errors.length, errorDetails: errors.slice(0, SHOWN_ERRORS), + ...(errors.length > SHOWN_ERRORS ? { errorDetailsOmitted: errors.length - SHOWN_ERRORS } : {}), + needsCurator: needsCurator.length, needsCuratorDetails: needsCurator, + notes, + }), { headers: { ...corsHeaders, "Content-Type": "application/json" } } ); } catch (error) { diff --git a/supabase/functions/verify-affiliations/index.ts b/supabase/functions/verify-affiliations/index.ts index ccb1b718..8976d541 100644 --- a/supabase/functions/verify-affiliations/index.ts +++ b/supabase/functions/verify-affiliations/index.ts @@ -1,5 +1,6 @@ import { createClient } from "npm:@supabase/supabase-js@2.39.3"; import { getCorsHeaders, requireAuth } from "../_shared/auth.ts"; +import { findOrCreateOrganization, isUniqueViolation, kgSession } from "../_shared/kg-write.ts"; interface Mismatch { investigator_id: string; @@ -126,7 +127,11 @@ Deno.serve(async (req) => { const supabaseUrl = Deno.env.get("SUPABASE_URL")!; const supabaseServiceKey = Deno.env.get("SUPABASE_SERVICE_ROLE_KEY")!; - const supabase = createClient(supabaseUrl, supabaseServiceKey); + // ?action=fix writes with the service role, so the writes name themselves and the caller + // (Principle X); without the header they read 'unknown' in data_audit_log. Server-side client only. + const supabase = createClient(supabaseUrl, supabaseServiceKey, { + global: { headers: { "x-bbqs-client": `verify-affiliations:${auth.user?.email ?? auth.user?.id ?? "unknown-user"}` } }, + }); try { const url = new URL(req.url); @@ -252,40 +257,31 @@ Deno.serve(async (req) => { // If action is "fix", auto-update mismatched affiliations if (action === "fix") { + const kg = kgSession(supabase); for (const r of results.filter((r) => r.status === "mismatch" && r.nih_org)) { - // Find or create the organization - const { data: existingOrg } = await supabase - .from("organizations") - .select("id") - .ilike("name", r.nih_org) - .maybeSingle(); - - let orgId: string; - if (existingOrg) { - orgId = existingOrg.id; - } else { - const { data: newOrg, error: newOrgErr } = await supabase - .from("organizations") - .insert({ name: r.nih_org }) - .select("id") - .single(); - if (newOrgErr) { - console.error(`Failed to create org ${r.nih_org}:`, newOrgErr); - continue; - } - orgId = newOrg.id; + // The organization first, found by name key ("UNIVERSITY OF X" is the curated "University of + // X"), created only if it is not in the KG; nothing is relinked if it cannot be written. + const org = await findOrCreateOrganization(kg, r.nih_org); + if (!org.ok) { + console.error(`Failed to find or create org ${r.nih_org}:`, org.error); + continue; } + const orgId = org.row.id; - // Remove old org links for this investigator - await supabase + // Link the new organization, then remove the old links, so a failed insert never leaves the + // person with none. + const { error: linkErr } = await supabase .from("investigator_organizations") - .delete() - .eq("investigator_id", r.investigator_id); - - // Insert new link + .insert({ investigator_id: r.investigator_id, organization_id: orgId }); + if (linkErr && !isUniqueViolation(linkErr)) { + console.error(`Failed to link ${r.name} to ${r.nih_org}:`, linkErr); + continue; + } await supabase .from("investigator_organizations") - .insert({ investigator_id: r.investigator_id, organization_id: orgId }); + .delete() + .eq("investigator_id", r.investigator_id) + .neq("organization_id", orgId); r.status = "verified" as any; } diff --git a/supabase/migrations/20261116150000_link_isolated_nodes.sql b/supabase/migrations/20261116150000_link_isolated_nodes.sql new file mode 100644 index 00000000..5123f018 --- /dev/null +++ b/supabase/migrations/20261116150000_link_isolated_nodes.sql @@ -0,0 +1,4236 @@ +-- ════════════════════════════════════════════════════════════════════════════════════════════════ +-- 20261116150000_link_isolated_nodes.sql +-- Link, or remove, the knowledge-graph nodes that have no edge at all. +-- ════════════════════════════════════════════════════════════════════════════════════════════════ +-- +-- WHAT AND WHY +-- The 2026-11-04 export (kg/export, 808 nodes) has 189 isolated nodes. Each was diagnosed, and the +-- diagnosis re-checked. They are rows that should not exist (the EMBER test uploads listed in #506, +-- duplicates that earlier merges left behind, a test account); rows whose link the repo records but +-- no column the exporter reads holds (a person's institution, an announcement's or a call's +-- organization, a dataset's project); links PR #512 already made live that become edges only when +-- #512's exporter half merges; and nodes nothing ties to anything yet. +-- This script makes every fix a database change can make AND the records support (Principle III: +-- decide from the system of record; no evidence, no write). A link the records do not state is an +-- OPTIONAL block, never applied by default. It builds on #517 (the 11-03 hand edits: organizations +-- on announcements and jobs, curator links for 000207/000598) and on #512's migrations (the funder +-- organizations). Every write is audited as 'migration:link_isolated_nodes'. +-- +-- HOW TO APPLY: Supabase SQL editor, project vpexxhfpvghlejljwpvt, as its default role (postgres). +-- Paste the WHOLE file, then Run. +-- 1. As shipped it is a DRY RUN: every block runs, the report is shown, then everything is rolled +-- back. The editor may warn about DELETE/DROP statements; in a dry run nothing is kept. +-- 2. Read the report (the script's last statement, the only result the editor shows): the RESULT +-- row, one row per block (rows = rows written), then each decision. 'skipped' rows name what a +-- curator should look at. If any row says 'error', a real run would change nothing. +-- 3. Apply: in the DRY-RUN SWITCH line just below BEGIN, change 'on' to 'off' (the only edit), and +-- Run the whole file again. It is one transaction: any unexpected error rolls ALL of it back, and +-- the editor then shows the list of errors instead of the report. +-- 4. A second run changes nothing and reports 0 rows. A run takes seconds. +-- LOCKS. The dry run takes the same locks as the real run, for as long. Until the run ends, other +-- writes wait on: resources and source_classes (tools-04 creates resource_links, whose foreign keys +-- point at them), field_provenance (only if people-03 has provenance claims to move), and +-- dandisets (only if D01 has to add 20261105120000's columns or its CHECK). No lock wait lasts +-- more than 5 s (lock_timeout, set right after BEGIN): a block that would wait longer reports an +-- error row (55P03) and the run changes nothing. Run it again when the site is quiet. +-- +-- PRECONDITIONS +-- * PR #512's migrations are live (20261103130000, 20261103140000, 20261106120000): the funder +-- organizations they created are what people-05 and notices-04 link to. +-- * Deploy the new ember-dandiset-sync (16be24c) BEFORE this script, or run the script again after +-- its next nightly run (04:17 UTC; do not run during it): the old sync re-creates a node for every +-- dataset hidden here. The D00 report row says which sync answered last. A dataset a curator had +-- already hidden is re-hidden with the curator's reason, hidden_by and hidden_at kept. +-- * 20261105120000_dandiset_hidden need not be applied: D01 adds its columns, CHECK and +-- set_dandiset_hidden() where they are missing and changes nothing where they exist. +-- +-- VERIFY +-- * RESULT says APPLIED, no row says error, and a second run reports 0 rows. +-- * SELECT table_name, operation, count(*) FROM public.data_audit_log +-- WHERE actor_label = 'migration:link_isolated_nodes' GROUP BY 1, 2 ORDER BY 1, 2; +-- * Re-export the graph (kg/export.py) and run kg/quality.py: isolated nodes 189 -> 72-77. +-- +-- UNDO +-- data_audit_log keeps each changed row under actor_label 'migration:link_isolated_nodes': old_data +-- for every UPDATE and DELETE, new_data for every INSERT. Re-insert a deleted row from old_data (same +-- id, so its node IRI returns), restore updated columns, delete inserted rows by id. To unhide a +-- dataset, re-insert its resources row from old_data and set dandisets.hidden = false and +-- resource_id; set_dandiset_hidden(ARRAY['000…'], false) also works but gives it a new node id. +-- Not restorable from data_audit_log (no audit trigger on these): +-- * knowledge_embeddings rows deleted with their spine rows (the chat search index; embed-knowledge +-- rebuilds them), and the species_aliases rows D09 adds (delete them by alias); +-- * field_provenance re-anchoring: people-03 (and people-10-merge, if uncommented) moves to the +-- keeper ONLY the duplicate's claims whose value is the keeper's current cell, by rewriting their +-- entity_id. Its report row lists the field_provenance ids and the duplicate's old entity_id: to +-- undo, set entity_id back for those ids, with trg_field_provenance_append_only disabled for that +-- UPDATE. Every other claim stays on the deleted duplicate's id, untouched; +-- * the provenance claims this run records are append-only history: they stay after an undo, which +-- records newer ones; +-- * DDL: public.resource_links with its function, triggers and policy (tools-04), and, if D01 had +-- to apply 20261105120000, dandisets.hidden*, its CHECK and set_dandiset_hidden(). Drop by hand. +-- Nothing else is rewritten: curation_audit_log rows about a merged or deleted record keep naming it +-- (no foreign key needs them moved), and a dataset a curator had already hidden keeps its hide record. +-- +-- THE BLOCKS, in run order. n = isolated nodes of the 11-04 export the block fixes when its guards +-- pass (each node counted once, at the first block that links or deletes it). Every block re-reads +-- the live rows and skips, with a report row, whatever is no longer as the export showed it. Deletes +-- and merges run first, so names are free before anything is inserted. +-- n block what it does +-- 14 people-01 delete 14 orphan person spine rows (no person row; the real person is the twin) +-- 1 people-02 delete the 'TestUser Tier2' test record +-- 1 people-03 merge 'Niegil Francis Muttath Joseph' into 'Niegil Francis' (one NYU identity), only +-- if the duplicate holds nothing the keeper lacks and no address but the two proven +-- 1 tools-01 fold the duplicate Lightning Pose row 444f664a into 3ba48c59 +-- 1 notices-03 merge the superseded forecast RFA-NS-26-011 into RFA-NS-27-002 +-- 0 datasets-D01 apply 20261105120000 (dandisets.hidden*) where it is missing +-- 28 datasets-D02 hide the 28 IDP/ARC integration-test uploads (#506) +-- 4 datasets-D03 hide the test uploads 000001, 000003, 000431, 000467 (#506) +-- 1 datasets-D04 hide 000468 'Single Click Science' (synthetic mock data, #444 Exclude) +-- 1 datasets-D05 000472 'Pozu: Missing subjects': hide it if it has 0 files, else link to EMBER +-- 1 datasets-D09 merge species 'Acoel Flatworm' into Hofstenia miamia +-- 15 people-05 11 NIH program staff -> their institute or NIH (+ the NIMH, NINDS, NIDCD, NIDA nodes) +-- 15 people-07 15 members -> the organization their institution names +-- 3 people-08 MacAskill -> University College London; Estes, St. John -> University of +-- Washington. Each organization is created (with its node) only with its first member. +-- people-05/07/08 link a person only if the row's own institution text is empty or +-- starts with a spelling of that organization; any other text skips the person. +-- 8 notices-01 6 announcements' organization copied onto their spine rows (+ BBQS Consortium, SfN) +-- 1 notices-02 event 'BBQS MIT Workshop 2026' -> BBQS Consortium +-- 15 notices-04 13 funding calls -> their issuer, read off the FON (+ NIH OD Common Fund, Simons). +-- Never the superseded forecast: if notices-03 cannot merge it, it stays isolated +-- and flagged as a duplicate rather than linked. +-- 1 tools-02 Lightning Pose -> Columbia (its own description) +-- 0-4 datasets-D06 EMBER collections 000469-000471, 000474 -> R24MH136632, only where the DANDI +-- contact or a contributor is on R24MH136632's roster (the live contacts decide) +-- 1 datasets-D07 000607 'Four-choice reversal digging task' -> R34DA062119 (ARC, Wilbrecht) +-- 0+ datasets-D08 datasets whose own DANDI record names a BBQS award the sync's parser dropped +-- (none known today) +-- 0 tools-04 create public.resource_links (audited, RLS, anon-readable) +-- 0 tools-05 record its 2 evidenced links: 3 nodes once kg/bbqs_kg.py reads the table +-- 0+ tools-06 device_class_crosswalk rows for isolated device categories, each only where all +-- the live evidence for its bucket is the project's own (not a neighbour grant's); +-- a harvester bucket with no live evidence yet is not mapped +-- Read-only, they write nothing: datasets-D00 (which ember sync is live), people-10 (both Walker +-- records), people-01-report and people-11 (orphans left; the 4 name-only people), datasets-D10 +-- (datasets still unlinked, with their DANDI contact), notices-05 (participating-only funders), +-- tools-10 (device-category reach, unmapped buckets, tools still unlinked). +-- OPTIONAL blocks (section 3) are commented out; each starts with the question a curator must +-- answer first. To apply one, uncomment it and run the whole file again (dry run first). They +-- are people-04, people-09 (Jongwoon Kim: NYU Langone, Columbia, or both), people-10-merge, +-- datasets-O1 to O5, notices-06, tools-03 (Psych-DS -> MIT and was_attributed_to its presenter), +-- tools-07, tools-08 (incl. the SuperAnimal models trained_on their sets) and tools-09. +-- +-- EFFECT, simulated on the 11-04 export (tested on a replica of the schema with a synthetic copy of +-- the rows touched). The ranges are wide where live values decide: D05/D06/D08 (5 +-- datasets: the live DANDI records) and, after #512, 3 funders (OBSSR, NICHD, Empire AI: the calls' +-- live participating_orgs). +-- 189 isolated, as exported +-- 188 after a plain re-export (the Sharif stub was deleted live on 11-06) +-- 72-77 with this script and today's exporter (116 nodes fixed) +-- 69-74 once the exporter reads resource_links (tools-11; 3 more) +-- 52-60 once #512's exporter half merges as well (17 more) +-- +-- KNOWN OVERLAP WITH PR #512. notices-04 writes each call's issuer as resources.organization_id, +-- i.e. part_of_org. Once #512's exporter half merges, it also writes funding_org from +-- funding_opportunity_orgs, which includes the issuer, so a call will carry both part_of_org and +-- funding_org to the same organization. #512's exporter should skip a funding_org edge where +-- part_of_org already names that organization. +-- +-- NOT FIXED BY SQL (who) +-- * Anibal Heinsfeld, Chaoyi Zhang, Omid Sharafi, Latane Bullock (a name only) and Jeffrey Walker +-- (same person as Jeffery Walker?): a curator, asking them or their PI (report rows people-10/11). +-- * Jongwoon Kim: a curator answers NYU Langone, Columbia, or both (optional people-09). +-- * Psych-DS: a curator decides whether it is Melissa Kline Struhl's standard at MIT, and whether +-- was_attributed_to may record that (optional tools-03). +-- * DLC Model Zoo, SuperAnimal-Quadruped-80K, SuperAnimal-TopViewMouse-5K: a curator says which +-- node holds the SuperAnimal models and whether they were trained on these sets (optional +-- tools-08); then a developer applies the resource_links exporter patch (tools-11). +-- * NCCIH, NEI, NIA, NIAAA, NIBIB, ORWH, OBSSR, NICHD, Empire AI (named only as participating +-- funders) and Anipose, Bonsai, LabStreamingLayer, MoSeq, Open Ephys, OpenFace, OpenPose, SLEAP +-- (linked live by project_software_tools): a developer merges #512's exporter half. +-- * DLC Leaderboard, DeepLabCut, VCL Benchmark: a developer applies the resource_links exporter +-- patch (tools-11). +-- * Lab datasets with no BBQS award on their DANDI record (D10 lists them, with the contact): +-- the project team adds the award on EMBER-DANDI (the nightly sync links it) or tells a curator. +-- * Device categories: imu, lidar_radar, neural_imaging need only a fresh export with the HEAD +-- exporter; depth_camera, survey_task, ppg need a questionnaire-label mapping (developer, curator). +-- * Tools with no known user or maker (BENTO, Dynestyx, fastplotlib, idtracker.ai, SimBA, CEBRA, +-- DeepPoseKit, senselab, SSL, Vocalocator, Vocalocator-SSL, DLC 3D Pose Protocol, DLC Organization, +-- Animal Pose Leaderboard); MARS, DeepSqueak, JAABA, DLC Benchmarks need a species parse in the +-- exporter: project teams, a curator, a developer. +-- * What keeps making orphans (onboard_member's MERGE and seed-consortium delete or insert only one +-- of the two rows) and new calls, announcements and jobs with no spine row: a developer. +-- * project_device_usage counts every evidence row for a mapped bucket, a neighbour grant's +-- abstract or papers too (tools-06 checks the evidence only before it adds a mapping): a +-- developer limits the view to the project's own evidence (source grant = seed grant). +-- ════════════════════════════════════════════════════════════════════════════════════════════════ + +BEGIN; +-- No lock wait longer than 5 s, in the dry run as in the real run (both take the same locks). A +-- block that waits longer gets 55P03, reports it as an error row, and the run then changes nothing. +SET LOCAL lock_timeout = '5s'; +-- Principle X: a SQL-editor write has no auth.uid(), so the script names itself before any write. +-- Both settings are transaction-local; the runner re-declares them before every block. +SELECT public.set_actor('migration:link_isolated_nodes'); +SELECT public.set_source_class('curator_fill'); + +-- ┌──────────────────────────────── DRY-RUN SWITCH (the one line to edit) ────────────────────────────────┐ +-- 'on' = rehearse: run every block, show the report, then roll everything back (nothing changes). +-- 'off' = apply: the same run, committed. Any other value is treated as 'on'. +SELECT set_config('bbqs.dry_run', 'on', true); +-- └──────────────────────────────────────────────────────────────────────────────────────────────────────┘ + +-- ════════════════════════════════════════════════════════════════════════════════════════════════ +-- 0. SETUP: the report table and the helpers. Temp objects only (schema pg_temp): nothing in this +-- section writes to a real table. Dropped first, so a second run in the same editor session +-- starts from a clean report. +-- ════════════════════════════════════════════════════════════════════════════════════════════════ +-- Every pg_temp.kg_* function an earlier run left in this editor session goes first, whatever its +-- arguments: CREATE OR REPLACE keeps an old overload whose arguments differ, and two overloads make +-- a call ambiguous (42725). An OPTIONAL block is then defined only if it is uncommented THIS time. +DO $drop$ +DECLARE _f text; +BEGIN + FOR _f IN + SELECT format('pg_temp.%I(%s)', p.proname, pg_get_function_identity_arguments(p.oid)) + FROM pg_proc p + WHERE p.pronamespace = pg_my_temp_schema() AND p.proname LIKE 'kg\_%' + LOOP + EXECUTE 'DROP FUNCTION ' || _f; + END LOOP; +END +$drop$; +DROP TABLE IF EXISTS pg_temp.kg_fix_report; +-- One row per decision a block takes, plus one summary row per block and one RESULT row. The block +-- and its position come from the runner (bbqs.block / bbqs.block_ord), so a helper only names the +-- decision. The last statement of this script prints it (pg_temp.kg_report()). +CREATE TEMP TABLE kg_fix_report ( + seq bigserial PRIMARY KEY, + ord int NOT NULL DEFAULT coalesce(nullif(current_setting('bbqs.block_ord', true), '')::int, 0), + block text NOT NULL DEFAULT coalesce(nullif(current_setting('bbqs.block', true), ''), 'setup'), + kind text NOT NULL DEFAULT 'decision' CHECK (kind IN ('result', 'summary', 'decision')), + item text NOT NULL, + target text, + outcome text NOT NULL CHECK (outcome IN ('done', 'noop', 'skipped', 'report', 'error', 'optional')), + n_rows bigint, + detail text +); + +-- Run one block: name it, re-declare the actor (Principle X), run it in its own savepoint, then +-- write its summary row. The row count is read back from the audit trail itself: every data_audit_log +-- row this transaction wrote since the block began (occurred_at = now() is this transaction's start +-- time), plus the two tables that have no audit trigger (knowledge_embeddings, species_aliases), +-- plus the field_provenance claims recorded. An error inside a block is caught here, the block's own +-- writes are rolled back to its savepoint, and an 'error' row is written: the runner then rolls the +-- WHOLE script back (a real run never commits a partial result). +CREATE OR REPLACE FUNCTION pg_temp.kg_run(_ord int, _block text, _title text, _fn text) +RETURNS void LANGUAGE plpgsql AS +$fn$ +DECLARE + _a0 bigint; _p0 bigint; _k0 bigint; _s0 bigint; _q0 bigint; + _k1 bigint; _s1 bigint; _np bigint; _nw bigint; + _writes text; _other text; _outs text; _agg text; + _st text; _msg text; _ctx text; +BEGIN + PERFORM set_config('bbqs.block', _block, true); + PERFORM set_config('bbqs.block_ord', _ord::text, true); + PERFORM public.set_actor('migration:link_isolated_nodes'); + PERFORM public.set_source_class('curator_fill'); + SELECT coalesce(max(id), 0) INTO _a0 FROM public.data_audit_log; + SELECT coalesce(max(id), 0) INTO _p0 FROM public.field_provenance; + SELECT count(*) INTO _k0 FROM public.knowledge_embeddings; + SELECT count(*) INTO _s0 FROM public.species_aliases; + SELECT coalesce(max(seq), 0) INTO _q0 FROM pg_temp.kg_fix_report; + + BEGIN + EXECUTE format('SELECT %s()', _fn); + EXCEPTION WHEN OTHERS THEN + GET STACKED DIAGNOSTICS _st = RETURNED_SQLSTATE, _msg = MESSAGE_TEXT, _ctx = PG_EXCEPTION_CONTEXT; + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES (_title, 'whole block', 'error', + format('%s: %s. This block''s writes were rolled back, and a real run changes nothing while any error stands. Context: %s', + _st, _msg, left(regexp_replace(_ctx, '\s+', ' ', 'g'), 240))); + END; + PERFORM public.set_actor('migration:link_isolated_nodes'); + PERFORM public.set_source_class('curator_fill'); + + SELECT coalesce(string_agg(format('%s %s %s', t.table_name, t.operation, t.n), ', ' + ORDER BY t.table_name, t.operation), 'none'), + coalesce(sum(t.n), 0) + INTO _writes, _nw + FROM (SELECT d.table_name, d.operation, count(*) AS n + FROM public.data_audit_log d + WHERE d.id > _a0 AND d.occurred_at = now() + GROUP BY 1, 2) t; + -- Any audit row of this transaction that does NOT carry the script's label would be a Principle X + -- gap; none is expected (every block re-declares set_actor). + SELECT string_agg(DISTINCT coalesce(d.actor_label, '(null)'), ', ') INTO _other + FROM public.data_audit_log d + WHERE d.id > _a0 AND d.occurred_at = now() + AND d.actor_label IS DISTINCT FROM 'migration:link_isolated_nodes'; + SELECT count(*) INTO _k1 FROM public.knowledge_embeddings; + SELECT count(*) INTO _s1 FROM public.species_aliases; + SELECT count(*) INTO _np FROM public.field_provenance WHERE id > _p0; + + SELECT string_agg(format('%s %s', o.outcome, o.n), ' · ' ORDER BY o.pos), + CASE WHEN bool_or(o.outcome = 'error') THEN 'error' + WHEN bool_or(o.outcome = 'done') THEN 'done' + WHEN bool_or(o.outcome = 'skipped') THEN 'skipped' + WHEN bool_or(o.outcome = 'noop') THEN 'noop' + ELSE 'report' END + INTO _outs, _agg + FROM (SELECT r.outcome, count(*) AS n, + array_position(ARRAY['done', 'noop', 'skipped', 'report', 'error'], r.outcome) AS pos + FROM pg_temp.kg_fix_report r + WHERE r.seq > _q0 AND r.kind = 'decision' + GROUP BY r.outcome) o; + + INSERT INTO pg_temp.kg_fix_report (kind, item, outcome, n_rows, detail) + VALUES ('summary', _title || ' [' || coalesce(_outs, 'no decisions') || ']', coalesce(_agg, 'report'), + _nw + abs(_k1 - _k0) + abs(_s1 - _s0), + format('audited writes: %s; not audited: knowledge_embeddings %s, species_aliases %s; field_provenance claims recorded: %s%s', + _writes, CASE WHEN _k1 > _k0 THEN '+' ELSE '' END || (_k1 - _k0), + CASE WHEN _s1 > _s0 THEN '+' ELSE '' END || (_s1 - _s0), _np, + CASE WHEN _other IS NOT NULL THEN '; WARNING: audit rows labelled ' || _other ELSE '' END)); +END +$fn$; + +-- An OPTIONAL block runs only if its function was defined in this run, i.e. a curator answered its +-- question and the block was uncommented in the OPTIONAL section. Otherwise it is listed, not run. +CREATE OR REPLACE FUNCTION pg_temp.kg_run_optional(_ord int, _block text, _title text, _fn text, _question text) +RETURNS void LANGUAGE plpgsql AS +$fn$ +BEGIN + IF to_regprocedure(_fn || '()') IS NULL THEN + PERFORM set_config('bbqs.block', _block, true); + PERFORM set_config('bbqs.block_ord', _ord::text, true); + INSERT INTO pg_temp.kg_fix_report (kind, item, outcome, n_rows, detail) + VALUES ('summary', _title || ' [OPTIONAL: not run]', 'optional', 0, + 'Commented out in the OPTIONAL section. A curator answers first: ' || _question); + RETURN; + END IF; + PERFORM pg_temp.kg_run(_ord, _block, _title || ' (OPTIONAL, uncommented)', _fn); +END +$fn$; + +-- The RESULT row: what happened, totals, and how to flip the switch. +CREATE OR REPLACE FUNCTION pg_temp.kg_result(_dry boolean) +RETURNS void LANGUAGE plpgsql AS +$fn$ +DECLARE + _sw text := coalesce(current_setting('bbqs.dry_run', true), '(unset)'); + _tot bigint; + _dec text; + _blk int; + _opt int; + _err int; +BEGIN + SELECT coalesce(sum(n_rows), 0), count(*) FILTER (WHERE outcome <> 'optional'), count(*) FILTER (WHERE outcome = 'optional') + INTO _tot, _blk, _opt FROM pg_temp.kg_fix_report WHERE kind = 'summary'; + SELECT string_agg(format('%s %s', o.outcome, o.n), ', ' ORDER BY o.pos), coalesce(sum(o.n) FILTER (WHERE o.outcome = 'error'), 0) + INTO _dec, _err + FROM (SELECT outcome, count(*) AS n, + array_position(ARRAY['done', 'noop', 'skipped', 'report', 'error'], outcome) AS pos + FROM pg_temp.kg_fix_report WHERE kind = 'decision' GROUP BY outcome) o; + PERFORM set_config('bbqs.block', 'RESULT', true); + PERFORM set_config('bbqs.block_ord', '0', true); + INSERT INTO pg_temp.kg_fix_report (kind, item, outcome, n_rows, detail) + VALUES ('result', + CASE WHEN _dry THEN 'DRY RUN: every block ran, then everything was rolled back. NOTHING WAS CHANGED.' + ELSE 'APPLIED: committed as one transaction under migration:link_isolated_nodes.' END, + CASE WHEN _err > 0 THEN 'error' WHEN _dry THEN 'report' ELSE 'done' END, + _tot, + format('%s block(s) ran, %s optional block(s) not run; decisions: %s; rows%s written: %s (summary rows below; rows = audited writes + search-index and alias rows). ', + _blk, _opt, coalesce(_dec, 'none'), CASE WHEN _dry THEN ' that WOULD be' ELSE '' END, _tot) + || CASE WHEN _dry AND _err > 0 THEN format('%s ERROR(S): a real run would change nothing until they are fixed (rows marked error). ', _err) ELSE '' END + || CASE WHEN _dry THEN format('The dry-run switch is %L. To apply: change it to ''off'' in the line SELECT set_config(''bbqs.dry_run'', ''on'', true); near the top, and run the whole script again.', _sw) + ELSE 'Running it again changes nothing (every block reports 0 rows). Next: re-export the graph (see VERIFY in the header).' END); +END +$fn$; + +-- The report the editor shows (the script's last statement): RESULT first, then one summary row per +-- block in run order, then every decision in the order it was taken. +CREATE OR REPLACE FUNCTION pg_temp.kg_report() +RETURNS TABLE (block text, action text, "rows" bigint, detail text) +LANGUAGE sql STABLE AS +$fn$ + SELECT r.block, + CASE WHEN r.kind = 'decision' + THEN r.outcome || ' · ' || r.item || coalesce(' · ' || r.target, '') + ELSE r.item END, + r.n_rows, + r.detail + FROM pg_temp.kg_fix_report r + ORDER BY CASE r.kind WHEN 'result' THEN 0 WHEN 'summary' THEN 1 ELSE 2 END, r.ord, r.seq +$fn$; + +-- ════════════════════════════════════════════════════════════════════════════════════════════════ +-- 1. HELPERS used by several blocks (pg_temp, gone at the end of the session) +-- ════════════════════════════════════════════════════════════════════════════════════════════════ + +-- Whitespace- and case-folded name: the comparison onboard_member uses for RePORTER stubs +-- (20260810130000: lower(regexp_replace(btrim(name), '[[:space:]]+', ' ', 'g'))). +CREATE OR REPLACE FUNCTION pg_temp.kg_norm(_s text) RETURNS text +LANGUAGE sql IMMUTABLE AS +$fn$ SELECT lower(regexp_replace(btrim(coalesce(_s, '')), '[[:space:]]+', ' ', 'g')) $fn$; + +-- The core award of a grant number in any spelling ('1R61MH135114-01' -> 'R61MH135114'), the way +-- the exporter compares them (kg/bbqs_kg.py core_award). NULL for an empty value. +CREATE OR REPLACE FUNCTION pg_temp.kg_core_award(_s text) RETURNS text +LANGUAGE sql IMMUTABLE AS +$fn$ SELECT coalesce(substring(upper(_s) FROM '[A-Z][A-Z0-9]{2}[A-Z]{2}[0-9]{6}'), nullif(upper(btrim(_s)), '')) $fn$; + +-- Does a person row's own institution text agree with the evidence for one organization? +-- _spell is that organization's spellings as a regex alternation (no anchors). The text must START +-- with one of them, as whole words and in any case; and, with every one of them removed, it must +-- not match _reject (another institute, campus or organization it would also be naming). Any other +-- text contradicts the evidence. 'Florida State University' is not a spelling of 'uf|univ(ersity)? +-- of florida'; 'NIH/NIDA' starts with NIH but still names NIDA. +CREATE OR REPLACE FUNCTION pg_temp.kg_inst_ok(_inst text, _spell text, _reject text) RETURNS boolean +LANGUAGE sql IMMUTABLE AS +$fn$ + SELECT coalesce(_inst, '') ~* ('^[^[:alnum:]]*(' || _spell || ')\M') + AND (_reject IS NULL + OR regexp_replace(_inst, '\m(' || _spell || ')\M', ' ', 'gi') !~* _reject) +$fn$; + +-- A jsonb cell value, normalized for comparing two records of one person: NULL for null, for an +-- empty or blank string and for an empty array or object; strings trimmed, also inside arrays, +-- whose blank elements are dropped. Lower-cased only when _fold (a free-text column): in an +-- identifier such as scholar_id or a profile_url's path, letter case is part of the value. +CREATE OR REPLACE FUNCTION pg_temp.kg_jnorm(_v jsonb, _fold boolean) RETURNS jsonb +LANGUAGE sql IMMUTABLE AS +$fn$ + SELECT CASE jsonb_typeof(_v) + WHEN 'string' THEN to_jsonb(nullif(CASE WHEN _fold THEN lower(btrim(_v #>> '{}')) ELSE btrim(_v #>> '{}') END, '')) + WHEN 'array' THEN (SELECT jsonb_agg(x.v ORDER BY x.n) + FROM (SELECT CASE WHEN jsonb_typeof(e.v) = 'string' + THEN to_jsonb(nullif(CASE WHEN _fold THEN lower(btrim(e.v #>> '{}')) ELSE btrim(e.v #>> '{}') END, '')) + ELSE e.v END AS v, e.n + FROM jsonb_array_elements(_v) WITH ORDINALITY AS e(v, n)) x + WHERE x.v IS NOT NULL AND jsonb_typeof(x.v) <> 'null') + WHEN 'object' THEN CASE WHEN _v = '{}'::jsonb THEN NULL ELSE _v END + WHEN 'null' THEN NULL + ELSE _v END +$fn$; + +-- The columns among _cols in which the duplicate record holds something the keeper does not: a +-- non-empty value the keeper lacks or holds differently (an array or object counts as held only +-- when the keeper's contains every element or key of the duplicate's). Letter case counts, except +-- in the columns named in _fold (free text). A merge that went ahead would drop it from the live +-- tables, keeping it only as old_data in data_audit_log. NULL when there is none. A column this +-- database does not have is simply not compared. +CREATE OR REPLACE FUNCTION pg_temp.kg_merge_conflicts(_keep jsonb, _drop jsonb, _cols text[], _fold text[]) RETURNS text +LANGUAGE sql IMMUTABLE AS +$fn$ + SELECT string_agg(c, ', ' ORDER BY c) + FROM unnest(_cols) AS c + WHERE pg_temp.kg_jnorm(_drop -> c, c = ANY (_fold)) IS NOT NULL + AND NOT coalesce(pg_temp.kg_jnorm(_keep -> c, c = ANY (_fold)) @> pg_temp.kg_jnorm(_drop -> c, c = ANY (_fold)), false) +$fn$; + +-- Does a field_provenance claim (entity_column, value_text) state the row's CURRENT cell? The +-- recorders write a cell as its text, an array as jsonb text on INSERT and as 'a, b' on UPDATE, and +-- a jsonb object per key as column.key; any of those forms counts. An empty claim never matches. +CREATE OR REPLACE FUNCTION pg_temp.kg_claim_matches(_row jsonb, _col text, _val text) RETURNS boolean +LANGUAGE sql IMMUTABLE AS +$fn$ + SELECT coalesce(btrim(_val), '') <> '' + AND jsonb_typeof(c.v) IS DISTINCT FROM 'null' + AND c.v IS NOT NULL + AND btrim(_val) IN (btrim(CASE WHEN jsonb_typeof(c.v) = 'string' THEN c.v #>> '{}' ELSE c.v::text END), + btrim(CASE WHEN jsonb_typeof(c.v) = 'array' + THEN coalesce((SELECT string_agg(e, ', ') FROM jsonb_array_elements_text(c.v) AS e), '') + ELSE '' END)) + FROM (SELECT CASE WHEN _row ? _col THEN _row -> _col + WHEN position('.' IN _col) > 0 + THEN _row -> split_part(_col, '.', 1) -> substr(_col, position('.' IN _col) + 1) END AS v) AS c +$fn$; + +-- Rows that reference _id through ANY declared foreign key to _target, except the +-- "schema.table.column" names in _skip. The scan 20261106130000 step 3 uses, read from +-- pg_constraint so a table types.ts does not know about (mcp_usage_log, #512's link tables, ...) +-- is still seen. Returns '' when nothing references the row. +CREATE OR REPLACE FUNCTION pg_temp.kg_fk_refs(_target regclass, _id uuid, _skip text[] DEFAULT '{}') +RETURNS text LANGUAGE plpgsql AS +$fn$ +DECLARE c record; _n bigint; _refs text := ''; +BEGIN + FOR c IN + SELECT format('%I.%I', n.nspname, cl.relname) AS tbl, a.attname AS col, + n.nspname || '.' || cl.relname || '.' || a.attname AS qual + FROM pg_constraint k + JOIN pg_class cl ON cl.oid = k.conrelid + JOIN pg_namespace n ON n.oid = cl.relnamespace + JOIN pg_attribute a ON a.attrelid = k.conrelid AND a.attnum = ANY (k.conkey) + WHERE k.contype = 'f' AND k.confrelid = _target + LOOP + CONTINUE WHEN c.qual = ANY (_skip); + EXECUTE format('SELECT count(*) FROM %s WHERE %I = $1', c.tbl, c.col) INTO _n USING _id; + IF _n > 0 THEN _refs := _refs || format('%s=%s ', c.qual, _n); END IF; + END LOOP; + RETURN btrim(_refs); +END +$fn$; + +-- Link one person (by their resources spine id, = the KG node id) to one organization (by its +-- spine id, or by exact name when _org_rid is NULL). +-- _spell the organization's spellings, a regex alternation without anchors. The person row's +-- own institution text (anon-hidden, so not in the export), when not empty, must START +-- with one of them and, with them removed, must not match _reject (pg_temp.kg_inst_ok). +-- Any other text contradicts the evidence, and the person is skipped for a curator. +-- _create_org only with _org_rid NULL. An organization of that name that has no spine row is +-- given one, and one that does not exist is created with its spine row (#512's +-- 20261103130000 shape) -- but only after the person passed every check, and in the +-- same savepoint as the link: a new organization never exists without its first member +-- (with none, it would itself be a new isolated node). +-- Every guard failure is a 'skipped' report row, never an exception: one bad row must not stop +-- the other links. investigator_organizations is keyed (investigator_id, organization_id), so +-- ON CONFLICT DO NOTHING is the house pattern (20260910120000, 20260831130000, #517 block 11). +CREATE OR REPLACE FUNCTION pg_temp.kg_link_org( + _item text, _rid uuid, _label text, _org_rid uuid, _org_label text, + _spell text, _reject text, _evidence text, _allow_other_orgs boolean DEFAULT false, + _create_org boolean DEFAULT false) +RETURNS void LANGUAGE plpgsql AS +$fn$ +DECLARE + _tgt text := _label || ' -> ' || _org_label; + _inv public.investigators%ROWTYPE; + _org uuid; + _n int; + _have text; + _hid uuid; + _hname text; + _srid uuid; + _made text := ''; +BEGIN + PERFORM public.set_actor('migration:link_isolated_nodes'); + PERFORM public.set_source_class('curator_fill'); + + -- 1. The person: the exported spine row, still an investigator, still named as exported, with + -- exactly one investigators row on it. + IF NOT EXISTS (SELECT 1 FROM public.resources r + WHERE r.id = _rid AND r.resource_type = 'investigator' + AND pg_temp.kg_norm(r.name) = pg_temp.kg_norm(_label)) THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', format('spine row %s is gone, retyped or renamed', _rid)); + RETURN; + END IF; + SELECT count(*) INTO _n FROM public.investigators WHERE resource_id = _rid; + IF _n <> 1 THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', + format('%s investigators rows point at spine %s (expected 1)%s', _n, _rid, + CASE WHEN _n = 0 THEN ' -- it is an orphan; see the people-01-report rows' ELSE '' END)); + RETURN; + END IF; + SELECT * INTO _inv FROM public.investigators WHERE resource_id = _rid; + + -- 2. The row's own institution text must be a spelling of the organization. Empty is accepted: + -- the evidence is then the repo source named below. + IF nullif(btrim(_inv.institution), '') IS NOT NULL + AND NOT pg_temp.kg_inst_ok(_inv.institution, _spell, _reject) THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', + CASE WHEN pg_temp.kg_inst_ok(_inv.institution, _spell, NULL) + THEN format('the row''s institution %L also names %L, another institute, campus or organization, so it contradicts the evidence (%s); a curator decides', + _inv.institution, + btrim(substring(regexp_replace(_inv.institution, '\m(' || _spell || ')\M', ' ', 'gi') FROM ('(?i)' || _reject))), + _evidence) + ELSE format('the row''s institution %L does not start with a spelling of %s%s, so it contradicts the evidence (%s); a curator decides', + _inv.institution, _org_label, + CASE WHEN length(_spell) <= 80 THEN format(' (~* %L)', _spell) ELSE '' END, + _evidence) END); + RETURN; + END IF; + + -- 3. The organization: its spine row named as exported, with an organizations row on it. + IF _org_rid IS NOT NULL THEN + SELECT o.id INTO _org + FROM public.organizations o JOIN public.resources r ON r.id = o.resource_id + WHERE o.resource_id = _org_rid AND r.resource_type = 'organization' + AND pg_temp.kg_norm(r.name) = pg_temp.kg_norm(_org_label) + ORDER BY o.created_at LIMIT 1; + ELSE + SELECT o.id INTO _org + FROM public.organizations o JOIN public.resources r ON r.id = o.resource_id + WHERE pg_temp.kg_norm(o.name) = pg_temp.kg_norm(_org_label) AND r.resource_type = 'organization' + ORDER BY o.created_at LIMIT 1; + END IF; + + -- 4. Still unaffiliated: this is the isolation being fixed. An existing link to the SAME org is + -- a no-op; a link to another org means a curator already decided, so do not add a second. + IF _org IS NOT NULL AND EXISTS (SELECT 1 FROM public.investigator_organizations + WHERE investigator_id = _inv.id AND organization_id = _org) THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'noop', 'link already present'); + RETURN; + END IF; + SELECT string_agg(o.name, '; ' ORDER BY o.name) INTO _have + FROM public.investigator_organizations io JOIN public.organizations o ON o.id = io.organization_id + WHERE io.investigator_id = _inv.id; + IF _have IS NOT NULL AND NOT _allow_other_orgs THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', 'already affiliated with ' || _have || '; not adding a second organization' + || CASE WHEN _org IS NULL AND _create_org + THEN format(' (%s is created only with a first member, so not for this person)', _org_label) ELSE '' END); + RETURN; + END IF; + + -- 5. No organization node of that name yet: only a block that names it by name may create it, + -- and only now, with this person as its first member. + IF _org IS NULL THEN + IF _org_rid IS NOT NULL OR NOT _create_org THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', + format('organization %s (%s) is gone, renamed, or has no organizations row on a spine row', coalesce(_org_rid::text, 'by name'), _org_label)); + RETURN; + END IF; + IF EXISTS (SELECT 1 FROM public.organizations o + WHERE pg_temp.kg_norm(o.name) = pg_temp.kg_norm(_org_label) AND o.resource_id IS NOT NULL) THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', + format('an organization named %L exists, but its spine row is not an organization; nothing created, a curator decides', _org_label)); + RETURN; + END IF; + SELECT o.id, o.name INTO _hid, _hname + FROM public.organizations o + WHERE pg_temp.kg_norm(o.name) = pg_temp.kg_norm(_org_label) AND o.resource_id IS NULL + ORDER BY o.created_at LIMIT 1; + IF _hid IS NULL THEN + _hid := gen_random_uuid(); + _hname := _org_label; + INSERT INTO public.resources (resource_type, name, metadata) + VALUES ('organization', _hname, jsonb_build_object('source_id', _hid, 'source_table', 'organizations')) + RETURNING id INTO _srid; + INSERT INTO public.organizations (id, name, resource_id) VALUES (_hid, _hname, _srid); + _made := format('organizations %s created with spine row %s', _hid, _srid); + ELSE -- exists without a spine row (nih-grants / verify-affiliations insert a name only) + INSERT INTO public.resources (resource_type, name, metadata) + VALUES ('organization', _hname, jsonb_build_object('source_id', _hid, 'source_table', 'organizations')) + RETURNING id INTO _srid; + UPDATE public.organizations SET resource_id = _srid WHERE id = _hid; + _made := format('the existing organizations %s (%L) had no spine row; given %s', _hid, _hname, _srid); + END IF; + _org := _hid; + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES ('create organization', _org_label, 'done', format('%s, with its first member %s', _made, _label)); + END IF; + + INSERT INTO public.investigator_organizations (investigator_id, organization_id) + VALUES (_inv.id, _org) + ON CONFLICT DO NOTHING; + GET DIAGNOSTICS _n = ROW_COUNT; + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, CASE WHEN _n = 1 THEN 'done' ELSE 'noop' END, + format('%s; evidence: %s; row institution: %s%s', + CASE WHEN _n = 1 THEN 'linked' ELSE 'link already present' END, _evidence, + coalesce(quote_literal(nullif(btrim(_inv.institution), '')), '(empty)'), + coalesce('; also affiliated with ' || _have || ' (kept)', ''))); +EXCEPTION WHEN OTHERS THEN + -- the organization this call may have created goes with the failed link (same savepoint) + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'error', SQLSTATE || ': ' || SQLERRM); +END +$fn$; + +-- The organizations.id behind an exported organization node. organizations.id is not in the +-- export, so it is found by the node id (= organizations.resource_id) and the exported name; if +-- the spine row was re-keyed, by the folded name, but only when exactly one organization that has +-- a spine row carries it. NULL when neither finds one (the caller reports and skips). +CREATE OR REPLACE FUNCTION pg_temp.kg_org_of(_org_rid uuid, _org_label text) RETURNS uuid +LANGUAGE plpgsql STABLE AS +$fn$ +DECLARE _ids uuid[]; +BEGIN + SELECT array_agg(o.id ORDER BY o.created_at) INTO _ids + FROM public.organizations o JOIN public.resources r ON r.id = o.resource_id + WHERE o.resource_id = _org_rid AND r.resource_type::text = 'organization' + AND (pg_temp.kg_norm(o.name) = pg_temp.kg_norm(_org_label) + OR pg_temp.kg_norm(r.name) = pg_temp.kg_norm(_org_label)); + IF cardinality(_ids) >= 1 THEN RETURN _ids[1]; END IF; + SELECT array_agg(o.id) INTO _ids + FROM public.organizations o JOIN public.resources r ON r.id = o.resource_id + WHERE pg_temp.kg_norm(o.name) = pg_temp.kg_norm(_org_label) AND r.resource_type::text = 'organization'; + RETURN CASE WHEN cardinality(_ids) = 1 THEN _ids[1] END; +END +$fn$; + +-- Folded person-name tokens: lower-case runs of letters, 2+ characters, as a sorted set. +-- 'Wilbrecht, Linda' (DANDI's "Last, First") and 'Linda Wilbrecht' (investigators.name) give the +-- same set; initials such as 'D' or 'W.' drop out. +CREATE OR REPLACE FUNCTION pg_temp.kg_ds_tokens(_s text) RETURNS text[] +LANGUAGE sql IMMUTABLE AS +$fn$ + SELECT coalesce(array_agg(DISTINCT t ORDER BY t), '{}'::text[]) + FROM regexp_split_to_table(lower(coalesce(_s, '')), '[^[:alpha:]]+') AS t + WHERE length(t) >= 2 +$fn$; + +-- The ORCID iD inside any common spelling (bare, orcid.org/..., https://orcid.org/...), else NULL. +CREATE OR REPLACE FUNCTION pg_temp.kg_ds_orcid(_s text) RETURNS text +LANGUAGE sql IMMUTABLE AS +$fn$ SELECT upper(substring(coalesce(_s, '') from '[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{3}[0-9Xx]')) $fn$; + +-- Who on _grant_id's roster (grant_investigators: the system of record for "who is on this +-- project", Principle III) the dandiset's own DANDI record names, as contact_name or as a Person +-- contributor in raw->'contributor', matched by ORCID or by full name. NULL when nobody matches. +CREATE OR REPLACE FUNCTION pg_temp.kg_ds_roster_match(_grant_id uuid, _contact text, _raw jsonb) +RETURNS text LANGUAGE sql STABLE AS +$fn$ + WITH named AS ( + SELECT _contact AS name, NULL::text AS orcid + UNION ALL + SELECT c ->> 'name', pg_temp.kg_ds_orcid(c ->> 'identifier') + FROM jsonb_array_elements(CASE WHEN jsonb_typeof(_raw -> 'contributor') = 'array' + THEN _raw -> 'contributor' ELSE '[]'::jsonb END) AS c + WHERE coalesce(c ->> 'schemaKey', 'Person') = 'Person' + ), roster AS ( + SELECT DISTINCT i.name, pg_temp.kg_ds_orcid(i.orcid) AS orcid, pg_temp.kg_ds_tokens(i.name) AS toks + FROM public.grant_investigators gi + JOIN public.investigators i ON i.id = gi.investigator_id + WHERE gi.grant_id = _grant_id + ) + SELECT string_agg(DISTINCT r.name || CASE WHEN n.orcid IS NOT NULL AND n.orcid = r.orcid + THEN ' (by ORCID)' ELSE ' (by name)' END, '; ') + FROM roster r + JOIN named n + ON (n.orcid IS NOT NULL AND n.orcid = r.orcid) + OR (cardinality(pg_temp.kg_ds_tokens(n.name)) >= 2 + AND pg_temp.kg_ds_tokens(n.name) <@ r.toks) +$fn$; + +-- set_dandiset_hidden(_hidden => true) for ONE dandiset, minus its auth.uid() gate (the editor has +-- no JWT; the actor is the set_actor label, and hidden_by = auth.uid() stays NULL there). The same +-- writes in the same order as 20261105120000:47-54: hidden / hidden_reason / hidden_by / hidden_at +-- and resource_id = NULL on the mirror row, then DELETE the resources row (audited by +-- trg_audit_resources). Plus the chat-index copy of the spine row, as 20261106130000 step 2 does, +-- because embed-knowledge only ever upserts. A dataset a curator already hid, whose node the old +-- ember sync re-created, is RE-hidden: its hidden_reason, hidden_by and hidden_at are who decided +-- and why (20261105120000:17-18), so they are kept; only resource_id is cleared and the re-created +-- resources row deleted. Every guard failure is a 'skipped' report row, never an exception, and +-- any error rolls back this one dandiset only (the EXCEPTION block's savepoint). +CREATE OR REPLACE FUNCTION pg_temp.kg_ds_hide( + _item text, _dandiset_id text, _export_rid uuid, _name_re text, _reason text, + _allow_linked boolean DEFAULT false) +RETURNS void LANGUAGE plpgsql AS +$fn$ +DECLARE + _d record; + _tgt text := _dandiset_id; + _links text; + _rtype text; + _refs text; + _ke int := 0; + _rehide boolean; +BEGIN + PERFORM public.set_actor('migration:link_isolated_nodes'); + PERFORM public.set_source_class('curator_fill'); + + SELECT d.id, d.name, d.resource_id, d.hidden, d.hidden_reason, d.hidden_by, d.hidden_at, + d.file_count, d.award_numbers INTO _d + FROM public.dandisets d + WHERE d.instance = 'ember' AND d.dandiset_id = _dandiset_id + FOR UPDATE; + IF NOT FOUND THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', 'not in the ember mirror (public.dandisets)'); + RETURN; + END IF; + _tgt := _dandiset_id || ' ' || _d.name; + + -- Same upload as the export named? A renamed dandiset may have become real data. + IF _d.name !~* _name_re THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', format('mirror name is now %L (expected ~* %L); a curator decides', _d.name, _name_re)); + RETURN; + END IF; + + IF _d.hidden AND _d.resource_id IS NULL THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'noop', 'already hidden, no resources row'); + RETURN; + END IF; + _rehide := coalesce(_d.hidden, false); -- hidden, but the old sync gave it a node again + + -- Linked since the export? Hiding drops the node and its funded_datasets edge (the + -- grant_dandisets row itself stays, and an unhide restores both), so it needs a person's yes. + SELECT string_agg(g.grant_number || ' (' || gd.match_source || ')', ', ' ORDER BY g.grant_number) + INTO _links + FROM public.grant_dandisets gd JOIN public.grants g ON g.id = gd.grant_id + WHERE gd.dandiset_id = _d.id; + IF NOT _allow_linked AND (_links IS NOT NULL OR coalesce(cardinality(_d.award_numbers), 0) > 0) THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', + format('%snow linked (grant_dandisets: %s; DANDI awards: %s); not hiding a linked dataset', + CASE WHEN _rehide THEN 'hidden by a curator, but its node was re-created and it is ' ELSE '' END, + coalesce(_links, 'none'), coalesce(array_to_string(_d.award_numbers, ', '), 'none'))); + RETURN; + END IF; + + IF _d.resource_id IS NOT NULL THEN + SELECT r.resource_type::text INTO _rtype FROM public.resources r WHERE r.id = _d.resource_id; + IF _rtype IS DISTINCT FROM 'dataset' AND _rtype IS NOT NULL THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', format('resources row %s is a %s, not a dataset', _d.resource_id, _rtype)); + RETURN; + END IF; + -- Anything else pointing at the spine row (entity_comments = someone's words, a detail table, + -- a newer link table) stops the delete. dandisets.resource_id is cleared below; the + -- knowledge_embeddings copy is deleted below. + _refs := pg_temp.kg_fk_refs('public.resources'::regclass, _d.resource_id, + ARRAY['public.dandisets.resource_id', 'public.knowledge_embeddings.resource_id']); + IF _refs <> '' THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', format('resources row %s is still referenced (%s); not deleting it', _d.resource_id, _refs)); + RETURN; + END IF; + -- The skip above covers THIS mirror row only: another dandiset on the same spine row would lose + -- its node through dandisets_resource_id_fkey ON DELETE SET NULL. + IF EXISTS (SELECT 1 FROM public.dandisets o WHERE o.resource_id = _d.resource_id AND o.id <> _d.id) THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', format('another mirror row shares resources row %s; a curator decides', _d.resource_id)); + RETURN; + END IF; + END IF; + + IF _rehide THEN + -- The hide record is the curator's: who decided and why stay as they are. + UPDATE public.dandisets SET resource_id = NULL WHERE id = _d.id; + ELSE + UPDATE public.dandisets + SET hidden = true, hidden_reason = btrim(_reason), hidden_by = auth.uid(), hidden_at = now(), + resource_id = NULL + WHERE id = _d.id; + END IF; + + IF _d.resource_id IS NOT NULL THEN + DELETE FROM public.knowledge_embeddings + WHERE resource_id = _d.resource_id OR source_id = _d.resource_id::text; + GET DIAGNOSTICS _ke = ROW_COUNT; + DELETE FROM public.resources WHERE id = _d.resource_id; + END IF; + + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'done', + CASE WHEN _rehide + THEN format('re-hidden: hidden since %s by %s for %L, which is kept as recorded; ', + coalesce(_d.hidden_at::text, '(no date)'), coalesce(_d.hidden_by::text, '(no user: the SQL editor)'), + _d.hidden_reason) + ELSE format('hidden (%s); ', _reason) END + || CASE WHEN _d.resource_id IS NULL THEN 'it had no resources row' + ELSE format('%sresources row %s deleted, %s search-index row(s) removed', + CASE WHEN _rehide THEN 'its re-created ' ELSE '' END, _d.resource_id, _ke) END + || CASE WHEN _d.resource_id IS DISTINCT FROM _export_rid + THEN format(' (the 2026-11-04 export node was %s)', _export_rid) ELSE '' END); +EXCEPTION WHEN OTHERS THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'error', SQLSTATE || ': ' || SQLERRM); +END +$fn$; + +-- One curator grant_dandisets row (grant -> dandiset, match_source 'curator'), the route #517 +-- block 10 used for 000207 and 000598 on 2026-11-03. The exporter turns it into +-- (Project) bbqs:funded_datasets (Dataset) via grants.resource_id and dandisets.resource_id +-- (kg/bbqs_kg.py:395-398). ember-dandiset-sync deletes only match_source = 'award_number' rows +-- (index.ts:185-189), so a curator row survives every nightly run. +-- _require 'roster' the dandiset's contact or a Person contributor is on the grant's roster +-- _require 'contact:<regex>' contact_name ~* <regex> AND that person is on the grant's roster +-- _require 'curator' a person said yes (optional blocks only); the roster match is recorded if any +CREATE OR REPLACE FUNCTION pg_temp.kg_ds_link( + _item text, _dandiset_id text, _export_rid uuid, _name_re text, _grant_number text, + _require text, _evidence text) +RETURNS void LANGUAGE plpgsql AS +$fn$ +DECLARE + _d record; + _g record; + _tgt text := _dandiset_id || ' -> ' || _grant_number; + _links text; + _who text; + _gd uuid; +BEGIN + PERFORM public.set_actor('migration:link_isolated_nodes'); + PERFORM public.set_source_class('curator_fill'); + + SELECT d.id, d.name, d.resource_id, coalesce(d.hidden, false) AS hidden, d.file_count, + d.award_numbers, d.contact_name, d.raw + INTO _d + FROM public.dandisets d + WHERE d.instance = 'ember' AND d.dandiset_id = _dandiset_id; + IF NOT FOUND THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', 'not in the ember mirror (public.dandisets)'); + RETURN; + END IF; + _tgt := _dandiset_id || ' ' || _d.name || ' -> ' || _grant_number; + + IF _d.name !~* _name_re THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', format('mirror name is now %L (expected ~* %L); a curator decides', _d.name, _name_re)); + RETURN; + END IF; + IF _d.hidden OR _d.resource_id IS NULL + OR NOT EXISTS (SELECT 1 FROM public.resources r WHERE r.id = _d.resource_id AND r.resource_type = 'dataset') THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', 'hidden, or has no dataset resources row: there is no KG node to link'); + RETURN; + END IF; + + SELECT g.id, g.grant_number, g.resource_id INTO _g FROM public.grants g WHERE g.grant_number = _grant_number; + IF NOT FOUND OR _g.resource_id IS NULL THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', format('grant %s missing or without a spine row (no Project node)', _grant_number)); + RETURN; + END IF; + + IF EXISTS (SELECT 1 FROM public.grant_dandisets WHERE grant_id = _g.id AND dandiset_id = _d.id) THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, _tgt, 'noop', 'link already present'); + RETURN; + END IF; + -- Still unlinked: this is the isolation being fixed. A link to another grant, or an award on the + -- DANDI record, is someone else's (or the archive's) answer; do not add a second project. + SELECT string_agg(g.grant_number || ' (' || gd.match_source || ')', ', ' ORDER BY g.grant_number) + INTO _links + FROM public.grant_dandisets gd JOIN public.grants g ON g.id = gd.grant_id + WHERE gd.dandiset_id = _d.id; + IF _links IS NOT NULL OR coalesce(cardinality(_d.award_numbers), 0) > 0 THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', + format('already linked (grant_dandisets: %s; DANDI awards: %s); not adding %s', + coalesce(_links, 'none'), coalesce(array_to_string(_d.award_numbers, ', '), 'none'), _grant_number)); + RETURN; + END IF; + + IF _require = 'roster' THEN + _who := pg_temp.kg_ds_roster_match(_g.id, _d.contact_name, _d.raw); + IF _who IS NULL THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', + format('DANDI contact %L and the record''s Person contributors are not on %s''s roster; a curator decides (the optional block links it on a yes)', + coalesce(_d.contact_name, '(none)'), _grant_number)); + RETURN; + END IF; + ELSIF _require LIKE 'contact:%' THEN + IF coalesce(_d.contact_name, '') !~* substr(_require, 9) THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', + format('DANDI contact is %L, not ~* %L as the evidence says; a curator decides', + coalesce(_d.contact_name, '(none)'), substr(_require, 9))); + RETURN; + END IF; + _who := pg_temp.kg_ds_roster_match(_g.id, _d.contact_name, NULL); + IF _who IS NULL THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', format('contact %L is not on %s''s roster', _d.contact_name, _grant_number)); + RETURN; + END IF; + ELSIF _require = 'curator' THEN + _who := coalesce(pg_temp.kg_ds_roster_match(_g.id, _d.contact_name, _d.raw), 'nobody on the roster (linked on a curator''s yes)'); + ELSE + RAISE EXCEPTION 'unknown _require %', _require; + END IF; + + INSERT INTO public.grant_dandisets (grant_id, dandiset_id, match_source) + VALUES (_g.id, _d.id, 'curator') + ON CONFLICT (grant_id, dandiset_id) DO NOTHING + RETURNING id INTO _gd; + IF _gd IS NULL THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, _tgt, 'noop', 'link already present'); + RETURN; + END IF; + + -- The AFTER INSERT recorder stamps each cell at curator_fill; this says WHY, which it cannot know + -- (the confirm_species_candidate pattern, 20260822120000:132-136). + PERFORM public.record_field_provenance( + 'grant_dandisets', _gd, 'match_source', 'curator_fill', 'linked_by_curator', + NULL, 'EMBER-DANDI ' || _dandiset_id || ' (dandisets.contact_name, raw.contributor) + grant_investigators', + 'curator', + format('%s DANDI contact: %s. On the %s roster: %s.', _evidence, + coalesce(_d.contact_name, '(none)'), _grant_number, _who)); + + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'done', + format('grant_dandisets row added (curator); roster match: %s%s', _who, + CASE WHEN _d.resource_id IS DISTINCT FROM _export_rid + THEN format(' (node is now %s; the 2026-11-04 export had %s)', _d.resource_id, _export_rid) ELSE '' END)); +EXCEPTION WHEN OTHERS THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'error', SQLSTATE || ': ' || SQLERRM); +END +$fn$; + +-- ── tools helpers ────────────────────────────────────────────────────────────────────────────── +-- Fill one spine row's organization (resources.organization_id; the exporter writes it as +-- part_of_org, kg/bbqs_kg.py:154-155) where it is empty. _rid/_label/_type name the exported node, +-- _org_rid/_org_label the exported organization node (organizations.id is not in the export, so +-- kg_org_of finds it). _evidence_ok is the evidence re-checked against the live data by the caller. +-- Never overwrites: a different organization already set is a curator's choice and is reported. +CREATE OR REPLACE FUNCTION pg_temp.kg_tools_set_org( + _item text, _rid uuid, _label text, _type text, _org_rid uuid, _org_label text, + _evidence_ok boolean, _evidence text) +RETURNS void LANGUAGE plpgsql AS +$fn$ +DECLARE + _tgt text := _label || ' -> ' || _org_label; + _r public.resources%ROWTYPE; + _org uuid; + _have text; +BEGIN + PERFORM public.set_actor('migration:link_isolated_nodes'); + PERFORM public.set_source_class('curator_fill'); + + SELECT * INTO _r FROM public.resources WHERE id = _rid; + IF NOT FOUND OR _r.resource_type::text <> _type + OR pg_temp.kg_norm(_r.name) <> pg_temp.kg_norm(_label) THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', format('spine row %s is gone, retyped or renamed (expected %s %L)', _rid, _type, _label)); + RETURN; + END IF; + _org := pg_temp.kg_org_of(_org_rid, _org_label); + IF _org IS NULL THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', format('organization node %s (%s) has no organizations row on its spine row', _org_rid, _org_label)); + RETURN; + END IF; + IF _r.organization_id = _org THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, _tgt, 'noop', 'organization already set'); + RETURN; + END IF; + IF _r.organization_id IS NOT NULL THEN + SELECT o.name INTO _have FROM public.organizations o WHERE o.id = _r.organization_id; + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', format('already part of %s; not overwriting it', coalesce(_have, _r.organization_id::text))); + RETURN; + END IF; + IF NOT coalesce(_evidence_ok, false) THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', 'the evidence no longer holds in the live data: ' || _evidence); + RETURN; + END IF; + -- An optional line uncommented with its <placeholder> still in place records nothing. + IF _evidence ~ '<[^<>]+>' THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', 'the evidence is still a placeholder: ' || _evidence || '; write where the link is stated, then run again'); + RETURN; + END IF; + + UPDATE public.resources SET organization_id = _org WHERE id = _rid AND organization_id IS NULL; + INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, _tgt, 'done', _evidence); +END +$fn$; + +-- Record one curated link between two spine rows in public.resource_links (block tools-04). Both ends must +-- still be the exported nodes (same resource_type, same folded name); _evidence_ok re-checks the +-- evidence against the live data. Every guard failure is a 'skipped' report row, never an exception. +CREATE OR REPLACE FUNCTION pg_temp.kg_tools_link( + _item text, _s uuid, _s_label text, _s_type text, _pred text, + _o uuid, _o_label text, _o_type text, _basis text, _evidence text, _evidence_ok boolean) +RETURNS void LANGUAGE plpgsql AS +$fn$ +DECLARE + _tgt text := format('%s %s %s', _s_label, _pred, _o_label); + _n int; +BEGIN + PERFORM public.set_actor('migration:link_isolated_nodes'); + PERFORM public.set_source_class('curator_fill'); + + IF to_regclass('public.resource_links') IS NULL THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', 'public.resource_links does not exist (block tools-04 has not run)'); + RETURN; + END IF; + IF NOT EXISTS (SELECT 1 FROM public.resources r + WHERE r.id = _s AND r.resource_type::text = _s_type + AND pg_temp.kg_norm(r.name) = pg_temp.kg_norm(_s_label)) THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', format('subject %s is gone, retyped or renamed (expected %s %L)', _s, _s_type, _s_label)); + RETURN; + END IF; + IF NOT EXISTS (SELECT 1 FROM public.resources r + WHERE r.id = _o AND r.resource_type::text = _o_type + AND pg_temp.kg_norm(r.name) = pg_temp.kg_norm(_o_label)) THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', format('object %s is gone, retyped or renamed (expected %s %L)', _o, _o_type, _o_label)); + RETURN; + END IF; + IF NOT coalesce(_evidence_ok, false) THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', 'the evidence no longer holds in the live data: ' || _evidence); + RETURN; + END IF; + -- An optional line uncommented with its <placeholder> still in place records nothing. + IF _evidence ~ '<[^<>]+>' THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', 'the evidence is still a placeholder: ' || _evidence || '; write where the link is stated, then run again'); + RETURN; + END IF; + + INSERT INTO public.resource_links (subject_id, predicate, object_id, basis, evidence) + VALUES (_s, _pred, _o, _basis, _evidence) + ON CONFLICT (subject_id, predicate, object_id) DO NOTHING; + GET DIAGNOSTICS _n = ROW_COUNT; + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, CASE WHEN _n > 0 THEN 'done' ELSE 'noop' END, + CASE WHEN _n > 0 THEN _evidence ELSE 'link already recorded' END); +END +$fn$; + +-- ════════════════════════════════════════════════════════════════════════════════════════════════ +-- 2. THE BLOCKS, in run order. Each is a pg_temp function; section 4 runs them. A block reports +-- every decision (done / noop / skipped / report / error) and never writes past a failed guard. +-- ════════════════════════════════════════════════════════════════════════════════════════════════ + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [datasets-D00] Pre-flight (read-only): which ember-dandiset-sync is live +-- Pre-flight (report only). Hiding sticks only under the 16be24c ember-dandiset-sync: the old one +-- creates a resources row for every dandiset without one (`if (!resourceId)`), so at its next 04:17 +-- UTC run it would recreate every node hidden here. The new sync's response lists a per-dandiset +-- "resource" key ('kept' / 'hidden' / 'created' / 'empty'); pg_net keeps recent responses for a few +-- hours, so a run shortly after 04:17 can tell which one is deployed. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_datasets_d00() RETURNS void LANGUAGE plpgsql AS +$do$ +DECLARE _new boolean; _old boolean; +BEGIN + SELECT bool_or(r.content LIKE '%"resource":%'), bool_or(r.content NOT LIKE '%"resource":%') + INTO _new, _old + FROM (SELECT content FROM net._http_response + WHERE content LIKE '%"linked_grants"%' ORDER BY created DESC LIMIT 1) r; + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES ('pre-flight: which ember sync is live', 'net._http_response', 'report', + CASE WHEN _new THEN 'the latest ember-dandiset-sync response has per-dandiset "resource": the 16be24c sync is live, hides will stick' + WHEN _old THEN 'the latest ember-dandiset-sync response has NO "resource" key: the OLD sync is live and will recreate the hidden datasets at 04:17 UTC; deploy 16be24c''s ember-dandiset-sync, then re-run D02-D05 if any came back' + ELSE 'no ember-dandiset-sync response retained; cannot tell which sync is deployed (check after the next 04:17 UTC run: SELECT dandiset_id FROM public.dandisets WHERE hidden AND resource_id IS NOT NULL)' END); +EXCEPTION WHEN undefined_table OR undefined_column OR insufficient_privilege THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES ('pre-flight: which ember sync is live', 'net._http_response', 'report', + 'net._http_response not readable here (' || SQLSTATE || '); check after the next 04:17 UTC run: SELECT dandiset_id FROM public.dandisets WHERE hidden AND resource_id IS NOT NULL'); +END +$do$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [people-01] Delete the 14 orphan investigator spine rows +-- Each is a resources row of type investigator that no investigators row points at: left behind +-- when a merge deleted only the investigators row (20260521172144, onboard_member MERGE +-- 20260810130000/20260811120000, 20260826120000 Tim Roberts), or when seed-consortium inserted +-- the spine row and then failed the investigators insert (seed-consortium/index.ts:2058-2075). +-- The real person is the linked twin named on each line. Deleted only if, at run time, the row is +-- still an orphan, still named as exported, still has no part_of_org, nothing references it, and +-- the twin still carries the real investigators row. Otherwise: skipped, with the reason. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_people_01() RETURNS void LANGUAGE plpgsql AS +$do$ +DECLARE + r record; + _refs text; + _inv text; + _ke int; + _fp bigint; + _cal bigint; +BEGIN + PERFORM public.set_actor('migration:link_isolated_nodes'); + PERFORM public.set_source_class('curator_fill'); + FOR r IN + SELECT * FROM (VALUES + ('164c219c-6bc5-4975-8815-2c2e0dd2f8a1'::uuid, 'Bijan Pesaran', '4626de5c-667e-4f70-be3e-44dffde3887b'::uuid, 'Bijan Pesaran'), + ('0401c6a9-2be9-47e3-981a-72481bd46a08'::uuid, 'Cristina Savin', '831a48e1-025d-499a-bf11-83d05285ed4b'::uuid, 'Cristina Savin'), + ('4d4ad015-92f8-485e-9d4c-61dd5c18ac29'::uuid, 'Dayu Lin', 'c140b518-3ea9-4cad-a8b2-c7b30385589b'::uuid, 'Dayu Lin'), + ('83d790af-315f-4f1f-8efc-3718fc0581d3'::uuid, 'Flavia Vitale', '961fb77d-16c1-4efd-9fc7-ac7bd552c983'::uuid, 'Flavia Vitale'), + ('99e94e46-f0af-4d3d-8ffd-ff522c4761db'::uuid, 'Melissa Kline Struhl', '0f3bb33c-e7ee-4013-af5d-894d1adfa0ee'::uuid, 'Melissa Kline Struhl'), + ('081d2ddb-e2c8-4909-84c4-740582fd757c'::uuid, 'Sima Mofakham', 'bcdcd220-fa82-47d4-9c1b-7a8da03dadd8'::uuid, 'Sima Mofakham'), + ('b50fe39f-f6d9-4362-a846-42ff705c73ac'::uuid, 'Sima Mofakham', 'bcdcd220-fa82-47d4-9c1b-7a8da03dadd8'::uuid, 'Sima Mofakham'), + ('335d4d23-a7b3-496d-a721-db2f6a68ce07'::uuid, 'Tim Roberts', '32937527-a5e9-4a99-84c0-719435f25f8b'::uuid, 'Timothy P Roberts'), + ('b369e3dc-bb40-4cd7-ad5a-a329aa9278b8'::uuid, 'Chuck Mikell', 'c6056429-1e03-4506-8484-5be9acff8170'::uuid, 'Charles Mikell'), + ('3cae416f-5424-49c3-b7c4-aedb7c53303f'::uuid, 'Charles B Mikell', 'c6056429-1e03-4506-8484-5be9acff8170'::uuid, 'Charles Mikell'), + ('69f09b42-78f2-40f7-83d4-774738a4c974'::uuid, 'AVNIEL S GHUMAN', 'dc09061c-41ce-4e6e-bfe9-5e4805b4356c'::uuid, 'Avniel Ghuman'), + ('4722e0eb-8daf-4685-8da4-fd7bb284d377'::uuid, 'Satrajit Ghosh', 'e5bdf58e-a1ff-4f5f-aa6d-667de414e16e'::uuid, 'Satrajit Sujit Ghosh'), + ('307a2853-901d-4ce8-9894-a999868db705'::uuid, 'Yvonne Bennett', '7ef0ea15-6f36-4bca-8eee-626e9bf76254'::uuid, 'Yvonne M Bennett'), + ('63711ed4-4044-4b43-94c3-fee4d86d7b13'::uuid, 'Jeff Walker', '7a5a1c11-f5f8-4643-b444-71228b1f298a'::uuid, 'Jeffery Walker') + ) AS v(rid, label, twin, twin_label) + LOOP + IF NOT EXISTS (SELECT 1 FROM public.resources WHERE id = r.rid) THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES ('orphan spine row', r.label || ' ' || r.rid, 'noop', 'already deleted'); + CONTINUE; + END IF; + IF NOT EXISTS (SELECT 1 FROM public.resources x + WHERE x.id = r.rid AND x.resource_type = 'investigator' + AND pg_temp.kg_norm(x.name) = pg_temp.kg_norm(r.label)) THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES ('orphan spine row', r.label || ' ' || r.rid, 'skipped', + 'no longer an investigator spine row named ' || quote_literal(r.label)); + CONTINUE; + END IF; + -- Still an orphan? The export cannot tell an orphan from a person whose exported columns are all + -- empty, so this is the check that decides. + SELECT format('%s (%s)', i.id, i.name) INTO _inv + FROM public.investigators i WHERE i.resource_id = r.rid LIMIT 1; + IF _inv IS NOT NULL THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES ('orphan spine row', r.label || ' ' || r.rid, 'skipped', + 'NOT an orphan: investigators row ' || _inv || ' points at it. Merge it into the twin ' + || r.twin_label || ' (' || r.twin || ') the 20260826120000 way instead of deleting.'); + CONTINUE; + END IF; + IF (SELECT organization_id FROM public.resources WHERE id = r.rid) IS NOT NULL THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES ('orphan spine row', r.label || ' ' || r.rid, 'skipped', + 'resources.organization_id is set (a part_of_org edge), so the node is not isolated'); + CONTINUE; + END IF; + -- Principle III: delete the duplicate node only while the real person record is still there. + IF NOT EXISTS (SELECT 1 FROM public.investigators i WHERE i.resource_id = r.twin) THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES ('orphan spine row', r.label || ' ' || r.rid, 'skipped', + format('the twin %s (%s) no longer carries an investigators row; this spine row may be the person''s only node', r.twin_label, r.twin)); + CONTINUE; + END IF; + -- Nothing may reference it except the chat search index, which embed-knowledge only upserts. + _refs := pg_temp.kg_fk_refs('public.resources'::regclass, r.rid, ARRAY['public.knowledge_embeddings.resource_id']); + IF _refs <> '' THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES ('orphan spine row', r.label || ' ' || r.rid, 'skipped', 'still referenced: ' || _refs); + CONTINUE; + END IF; + BEGIN + DELETE FROM public.knowledge_embeddings WHERE resource_id = r.rid OR source_id::text = r.rid::text; + GET DIAGNOSTICS _ke = ROW_COUNT; + DELETE FROM public.resources WHERE id = r.rid; + -- Logs and claims are history (field_provenance is append-only by trigger): reported, kept. + SELECT count(*) INTO _fp FROM public.field_provenance WHERE entity_table = 'resources' AND entity_id = r.rid; + SELECT count(*) INTO _cal FROM public.curation_audit_log WHERE resource_id = r.rid OR entity_id = r.rid; + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES ('orphan spine row', r.label || ' ' || r.rid, 'done', + format('deleted; the person stays as %s (%s); %s search-index row(s) removed; %s provenance claim(s) and %s curation-log row(s) kept as history', + r.twin_label, r.twin, _ke, _fp, _cal)); + EXCEPTION WHEN OTHERS THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES ('orphan spine row', r.label || ' ' || r.rid, 'error', SQLSTATE || ': ' || SQLERRM); + END; + END LOOP; +END +$do$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [people-02] Delete the 'TestUser Tier2' test record +-- A test account's person record, with no facts and no links. Skipped, with the reason, if it is +-- linked to a login (deleting it would lock that login out: globus-auth admits only people who have +-- an investigators row), holds a grant roster row, or anything else references it. The precedent is +-- #517 block 12 (the 'Jane Doe' test record, deleted 2026-11-03 with the same three checks). +CREATE OR REPLACE FUNCTION pg_temp.kg_b_people_02() RETURNS void LANGUAGE plpgsql AS +$do$ +DECLARE + _rid constant uuid := '1fb20b4f-fd8c-4e40-a4f4-daaa12bd738a'; + _item constant text := 'test record TestUser Tier2'; + _inv public.investigators%ROWTYPE; + _n int; + _refs text; + _login text; + _note text := ''; + _ke int := 0; + _io int := 0; +BEGIN + PERFORM public.set_actor('migration:link_isolated_nodes'); + PERFORM public.set_source_class('curator_fill'); + IF NOT EXISTS (SELECT 1 FROM public.resources WHERE id = _rid) THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, _rid::text, 'noop', 'already deleted'); + RETURN; + END IF; + IF NOT EXISTS (SELECT 1 FROM public.resources WHERE id = _rid AND resource_type = 'investigator' + AND pg_temp.kg_norm(name) = 'testuser tier2') THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, _rid::text, 'skipped', 'spine row renamed or retyped'); + RETURN; + END IF; + SELECT count(*) INTO _n FROM public.investigators WHERE resource_id = _rid; + IF _n > 1 THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, _rid::text, 'skipped', _n || ' investigators rows point at this spine row'); + RETURN; + END IF; + SELECT * INTO _inv FROM public.investigators WHERE resource_id = _rid; + IF _inv.id IS NOT NULL THEN + IF pg_temp.kg_norm(_inv.name) <> 'testuser tier2' THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _rid::text, 'skipped', format('its investigators row is named %L', _inv.name)); + RETURN; + END IF; + SELECT count(*) INTO _n FROM public.grant_investigators WHERE investigator_id = _inv.id; + IF _n > 0 THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _rid::text, 'skipped', format('holds %s grant roster row(s); check before deleting', _n)); + RETURN; + END IF; + IF _inv.user_id IS NOT NULL THEN + SELECT format('login %s <%s>, last sign-in %s, KG roles {%s}, profile row %s', u.id, u.email, + coalesce(u.last_sign_in_at::date::text, 'never'), + coalesce((SELECT string_agg(ur.role::text, ',' ORDER BY ur.role::text) FROM public.user_roles ur WHERE ur.user_id = u.id), ''), + CASE WHEN EXISTS (SELECT 1 FROM public.profiles p WHERE p.id = u.id) THEN 'yes' ELSE 'no' END) + INTO _login FROM auth.users u WHERE u.id = _inv.user_id; + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _rid::text, 'skipped', + 'linked to ' || coalesce(_login, 'auth user ' || _inv.user_id) || + '. Deleting the person row would lock that login out of sign-in. Remove the login in Authentication > Users (its user_roles go with it), then re-run.'); + RETURN; + END IF; + IF nullif(btrim(_inv.email), '') IS NOT NULL + AND EXISTS (SELECT 1 FROM auth.users u WHERE lower(u.email) = lower(btrim(_inv.email))) THEN + _note := _note || ' An unlinked login with the same email exists; it can no longer pass the membership gate.'; + END IF; + IF coalesce(cardinality(_inv.working_groups), 0) > 0 OR nullif(btrim(_inv.role), '') IS NOT NULL THEN + _note := _note || format(' It listed role %L and working groups %s; Google Group memberships are not changed by a delete (run Group Audit).', + _inv.role, coalesce(_inv.working_groups::text, '{}')); + END IF; + _refs := pg_temp.kg_fk_refs('public.investigators'::regclass, _inv.id, + ARRAY['public.investigator_organizations.investigator_id']); + IF _refs <> '' THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, _rid::text, 'skipped', 'person row referenced: ' || _refs); + RETURN; + END IF; + END IF; + _refs := pg_temp.kg_fk_refs('public.resources'::regclass, _rid, + ARRAY['public.knowledge_embeddings.resource_id', 'public.investigators.resource_id']); + IF _refs <> '' THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, _rid::text, 'skipped', 'spine row referenced: ' || _refs); + RETURN; + END IF; + BEGIN + DELETE FROM public.knowledge_embeddings + WHERE resource_id = _rid OR source_id::text IN (_rid::text, coalesce(_inv.id::text, '-')); + GET DIAGNOSTICS _ke = ROW_COUNT; + IF _inv.id IS NOT NULL THEN + DELETE FROM public.investigator_organizations WHERE investigator_id = _inv.id; + GET DIAGNOSTICS _io = ROW_COUNT; + DELETE FROM public.investigators WHERE id = _inv.id; + END IF; + DELETE FROM public.resources WHERE id = _rid; + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _rid::text, 'done', + format('deleted investigators row %s and the spine row; %s org link(s) and %s search-index row(s) removed.%s', + coalesce(_inv.id::text, '(none: it was an orphan)'), _io, _ke, _note)); + EXCEPTION WHEN OTHERS THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, _rid::text, 'error', SQLSTATE || ': ' || SQLERRM); + END; +END +$do$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [people-03] Merge 'Niegil Francis Muttath Joseph' (83e96042) into 'Niegil Francis' (af80d437) +-- One person, two records. 20260811130000:7-8: niegil.francis@nyu.edu and nm4075@nyu.edu are ONE +-- Google identity (member id 114753211097378846591, stored email nm4075@nyu.edu), and :79/:84-85 say +-- the second record is "a duplicate to merge, not an alias". The keeper is the linked record +-- (af80d437: nm4075@nyu.edu per seed-consortium/index.ts:245-246, NYU member, WG-Analytics). The +-- duplicate (83e96042, the name on mit-workshop-seating.ts:83) has no facts and no links. +-- Follows 20260826120000: refuse rather than corrupt, repoint what must follow the person, delete +-- the duplicate BEFORE writing its address onto the keeper (investigators_email_unique_ci), then +-- delete its spine row. Skipped, with the reason, if the duplicate holds: +-- * an address other than those two (globus-auth signs a login whose email is in a member's +-- secondary_emails in as that member, so a stray address would become a way into his account); +-- * a roster row, a login, a role or working groups the keeper lacks; +-- * anything in orcid, scholar_id, profile_url, institution, research_areas, skills, +-- requested_working_groups, pending_role, onboarding_checklist or reporter_profile_id that the +-- keeper does not already hold, letter for letter (case is ignored only in the free-text +-- institution, research_areas and skills): deleting the duplicate would drop it. Nothing is +-- filled in; a curator copies what is right onto the keeper first, then runs this again. +-- History stays as it is: only the duplicate's field_provenance claims whose value IS the keeper's +-- current cell move to the keeper (the others would make field_provenance_current contradict the +-- keeper's cells), and curation_audit_log rows keep naming the duplicate (no foreign key needs them +-- moved). No role or working_groups change, so trg_sync_member_groups does not fire. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_people_03() RETURNS void LANGUAGE plpgsql AS +$do$ +DECLARE + _keep_res constant uuid := 'af80d437-679c-42d0-aeed-fc7129b8a7b7'; + _drop_res constant uuid := '83e96042-a116-4e27-ab65-787db78d29f2'; + _item constant text := 'merge Niegil Francis Muttath Joseph -> Niegil Francis'; + -- the two addresses 20260811130000:7-8 proves are this one person + _known constant text[] := ARRAY['niegil.francis@nyu.edu', 'nm4075@nyu.edu']; + _profile constant text[] := ARRAY['orcid', 'scholar_id', 'profile_url', 'institution', 'research_areas', 'skills', + 'requested_working_groups', 'pending_role', 'onboarding_checklist', 'reporter_profile_id']; + -- compared ignoring letter case (free text); every other column must match letter for letter + _fold constant text[] := ARRAY['institution', 'research_areas', 'skills']; + _keep public.investigators%ROWTYPE; + _drop public.investigators%ROWTYPE; + _n int; _refs text; _addr text[]; _bad text; + _prov_guard boolean := false; + _fp_ids bigint[]; + _io int := 0; _cal int := 0; _ec int := 0; _fp_left int := 0; _ke int := 0; +BEGIN + PERFORM public.set_actor('migration:link_isolated_nodes'); + PERFORM public.set_source_class('curator_fill'); + IF NOT EXISTS (SELECT 1 FROM public.resources WHERE id = _drop_res) THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, _drop_res::text, 'noop', 'duplicate spine row already gone'); + RETURN; + END IF; + -- Keeper: by spine id, still the NYU record the seed and backfills keyed on nm4075@nyu.edu. + SELECT * INTO _keep FROM public.investigators WHERE resource_id = _keep_res; + IF _keep.id IS NULL OR pg_temp.kg_norm(_keep.name) NOT IN ('niegil francis', 'niegil francis muttath joseph') THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, _keep_res::text, 'skipped', 'keeper row not found on its spine row, or renamed'); + RETURN; + END IF; + IF lower(btrim(coalesce(_keep.email, ''))) <> 'nm4075@nyu.edu' THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _keep_res::text, 'skipped', format('keeper primary email is %L, not the stored Google address nm4075@nyu.edu; identity not proven', _keep.email)); + RETURN; + END IF; + + -- Duplicate: exactly one row on its spine row, still the name-only record. + SELECT count(*) INTO _n FROM public.investigators WHERE resource_id = _drop_res; + IF _n <> 1 THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, _drop_res::text, 'skipped', _n || ' investigators rows on the duplicate spine row (expected 1)'); + RETURN; + END IF; + SELECT * INTO _drop FROM public.investigators WHERE resource_id = _drop_res; + IF pg_temp.kg_norm(_drop.name) <> 'niegil francis muttath joseph' OR _drop.id = _keep.id THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, _drop_res::text, 'skipped', format('duplicate row is named %L', _drop.name)); + RETURN; + END IF; + _addr := ARRAY(SELECT DISTINCT lower(btrim(e)) + FROM unnest(array_append(coalesce(_drop.secondary_emails, '{}'::text[]), _drop.email)) AS e + WHERE nullif(btrim(e), '') IS NOT NULL); + SELECT string_agg(e, ', ' ORDER BY e) INTO _bad FROM unnest(_addr) AS e WHERE NOT (e = ANY (_known)); + IF _bad IS NOT NULL THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _drop_res::text, 'skipped', + format('duplicate holds address(es) %s besides niegil.francis@nyu.edu / nm4075@nyu.edu; the evidence proves only those two are this person, and the merge would make the others sign in as him. A curator removes them or decides', _bad)); + RETURN; + END IF; + SELECT count(*) INTO _n FROM public.grant_investigators WHERE investigator_id = _drop.id; + IF _n > 0 THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, _drop_res::text, 'skipped', _n || ' grant roster row(s) on the duplicate; re-decide which record survives'); + RETURN; + END IF; + IF _drop.user_id IS NOT NULL THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _drop_res::text, 'skipped', format('the duplicate is the row linked to login %s%s; moving a login between records is a separate decision', + _drop.user_id, CASE WHEN _keep.user_id IS NOT NULL THEN ' and the keeper is linked to ' || _keep.user_id ELSE '' END)); + RETURN; + END IF; + IF nullif(btrim(_drop.role), '') IS NOT NULL AND _drop.role IS DISTINCT FROM _keep.role THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, _drop_res::text, 'skipped', format('duplicate carries role %L; carrying it would fire trg_sync_member_groups', _drop.role)); + RETURN; + END IF; + IF EXISTS (SELECT 1 FROM unnest(coalesce(_drop.working_groups, '{}'::text[])) AS w + WHERE NOT (w = ANY (coalesce(_keep.working_groups, '{}'::text[])))) THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, _drop_res::text, 'skipped', format('duplicate lists working groups %s the keeper lacks; carrying them would fire trg_sync_member_groups', _drop.working_groups)); + RETURN; + END IF; + _bad := pg_temp.kg_merge_conflicts(to_jsonb(_keep), to_jsonb(_drop), _profile, _fold); + IF _bad IS NOT NULL THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _drop_res::text, 'skipped', + format('the duplicate holds a value the keeper lacks or holds differently in: %s. Merging would drop it from the live rows (data_audit_log would keep it only as old_data); nothing is filled in here. A curator puts what is right on the keeper (or clears it on the duplicate), then runs this again', _bad)); + RETURN; + END IF; + _refs := pg_temp.kg_fk_refs('public.investigators'::regclass, _drop.id, + ARRAY['public.investigator_organizations.investigator_id']); + IF _refs <> '' THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, _drop_res::text, 'skipped', 'duplicate person row referenced: ' || _refs); + RETURN; + END IF; + _refs := pg_temp.kg_fk_refs('public.resources'::regclass, _drop_res, + ARRAY['public.knowledge_embeddings.resource_id', 'public.investigators.resource_id', + 'public.entity_comments.resource_id']); + IF _refs <> '' THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, _drop_res::text, 'skipped', 'duplicate spine row referenced: ' || _refs); + RETURN; + END IF; + + BEGIN + -- 1. Repoint what must follow the person. (investigator_id, organization_id) is the key, so + -- drop links the keeper already has. Comments are someone's words about him: they follow. + DELETE FROM public.investigator_organizations d + WHERE d.investigator_id = _drop.id + AND EXISTS (SELECT 1 FROM public.investigator_organizations k + WHERE k.investigator_id = _keep.id AND k.organization_id = d.organization_id); + UPDATE public.investigator_organizations SET investigator_id = _keep.id WHERE investigator_id = _drop.id; + GET DIAGNOSTICS _io = ROW_COUNT; + UPDATE public.entity_comments SET resource_id = _keep_res WHERE resource_id = _drop_res; + GET DIAGNOSTICS _ec = ROW_COUNT; + -- curation_audit_log is history and no foreign key ties it to either row: its rows keep + -- naming the duplicate (counted for the report, not rewritten). + SELECT count(*) INTO _cal FROM public.curation_audit_log + WHERE investigator_id = _drop.id OR resource_id = _drop_res OR entity_id IN (_drop.id, _drop_res); + + -- 2. The chat index keeps its own copy of the duplicate (embed-knowledge only upserts). + DELETE FROM public.knowledge_embeddings + WHERE resource_id = _drop_res OR source_id::text IN (_drop.id::text, _drop_res::text); + GET DIAGNOSTICS _ke = ROW_COUNT; + + -- 3. Delete the duplicate, THEN record its addresses on the keeper (the unique email index + -- forbids the address on two rows), plus the alias Google reported (20260811130000:7-8). + DELETE FROM public.investigators WHERE id = _drop.id; + UPDATE public.investigators + SET secondary_emails = ARRAY( + SELECT DISTINCT lower(btrim(e)) + FROM unnest(coalesce(secondary_emails, '{}'::text[]) || _addr || ARRAY['niegil.francis@nyu.edu']) AS e + WHERE nullif(btrim(e), '') IS NOT NULL + AND lower(btrim(e)) <> lower(btrim(coalesce(email, '')))), + updated_at = now() + WHERE id = _keep.id; + + -- 4. Provenance follows the person only where it states what the keeper now holds: a claim + -- whose value is the keeper's current cell moves to the keeper (20260826120000 step 2: only + -- entity_id changes, with the append-only guard off for exactly this UPDATE; DDL is + -- transactional, so a failure below rolls the DISABLE back too). Every other claim stays on + -- the deleted duplicate's id as history, like the claims of any deleted row. + SELECT * INTO _keep FROM public.investigators WHERE id = _keep.id; + SELECT array_agg(fp.id ORDER BY fp.id) INTO _fp_ids + FROM public.field_provenance fp + WHERE fp.entity_table = 'investigators' AND fp.entity_id = _drop.id + AND pg_temp.kg_claim_matches(to_jsonb(_keep), fp.entity_column, fp.value_text); + IF cardinality(_fp_ids) > 0 THEN + IF EXISTS (SELECT 1 FROM pg_trigger + WHERE tgrelid = 'public.field_provenance'::regclass + AND tgname = 'trg_field_provenance_append_only' AND NOT tgisinternal AND tgenabled <> 'D') THEN + ALTER TABLE public.field_provenance DISABLE TRIGGER trg_field_provenance_append_only; + _prov_guard := true; + END IF; + UPDATE public.field_provenance SET entity_id = _keep.id WHERE id = ANY (_fp_ids); + IF _prov_guard THEN + ALTER TABLE public.field_provenance ENABLE TRIGGER trg_field_provenance_append_only; + END IF; + END IF; + SELECT count(*) INTO _fp_left FROM public.field_provenance + WHERE entity_table = 'investigators' AND entity_id = _drop.id; + + -- 5. The duplicate's spine row, once nothing references it. + _refs := pg_temp.kg_fk_refs('public.resources'::regclass, _drop_res, '{}'::text[]); + IF _refs <> '' THEN + RAISE EXCEPTION 'duplicate spine row still referenced after the repoint: %', _refs; + END IF; + DELETE FROM public.resources WHERE id = _drop_res; + + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _drop_res::text || ' -> ' || _keep_res::text, 'done', + format('merged: duplicate %s deleted with its spine row; keeper %s secondary_emails now %s; repointed %s org link(s), %s comment(s); ' + || 'moved to the keeper %s provenance claim(s) that state its current cells (field_provenance ids %s: entity_id was %s, not audited; see UNDO); ' + || '%s other claim(s) and %s curation-log row(s) still name the duplicate, as history; %s search-index row(s) removed', + _drop.id, _keep.id, coalesce(_keep.secondary_emails::text, '{}'), + _io, _ec, coalesce(cardinality(_fp_ids), 0), coalesce(array_to_string(_fp_ids, ','), 'none'), _drop.id, + _fp_left, _cal, _ke)); + EXCEPTION WHEN OTHERS THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, _drop_res::text, 'error', SQLSTATE || ': ' || SQLERRM); + END; +END +$do$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [tools-01] Fold the duplicate Lightning Pose spine row 444f664a into 3ba48c59 +-- Two resources rows are named Lightning Pose. 3ba48c59 is the one software_tools points at (docs_url, +-- repo_url, language, license); 444f664a holds only a name, a shorter copy of the same description +-- (the keeper's text up to "Zuckerman Institute") and an external_url equal to 3ba48c59's docs_url. Both are isolated nodes. 444f664a is the older +-- row (in every export since 956f028, 2026-09-21; 3ba48c59 first appears in 5882e1a, 2026-09-23), so +-- it may carry Resources-page display fields in metadata (category, algorithm, ...) that the keeper +-- lacks: those are copied over first, keeper winning every conflict. Then the house merge pattern +-- (20260826120000: repoint, don't lose; 20261106130000: drop the search-index copy, delete the spine +-- row only if no foreign key still points at it). History is left as it is: the duplicate's +-- field_provenance claims and its curation_audit_log rows keep naming 444f664a (no foreign key needs +-- them moved; rewriting them would leave no record of the old value). All writes run in one +-- sub-block: if anything fails, the sub-block rolls back on its own and is reported, and the rest +-- of the script goes on. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_tools_01() RETURNS void LANGUAGE plpgsql AS +$do$ +DECLARE + _keep constant uuid := '3ba48c59-bb79-44ef-8569-ca644775d73a'; + _dup constant uuid := '444f664a-b7ee-4571-ad81-33bd93b03cca'; + _item constant text := 'lightning pose duplicate'; + _tgt constant text := 'Lightning Pose 444f664a -> 3ba48c59'; + _skipkeys constant text[] := ARRAY['source_id', 'source_table', 'field_provenance']; + _k public.resources%ROWTYPE; + _d public.resources%ROWTYPE; + _docs text; _repo text; _refs text; + _copied text; _kept text; + _moved int := 0; _cal int := 0; _ke int := 0; _fp int := 0; + _norm_url text; +BEGIN + PERFORM public.set_actor('migration:link_isolated_nodes'); + PERFORM public.set_source_class('curator_fill'); + + SELECT * INTO _d FROM public.resources WHERE id = _dup; + IF NOT FOUND THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, _tgt, 'noop', 'duplicate already gone'); + RETURN; + END IF; + SELECT * INTO _k FROM public.resources WHERE id = _keep; + IF NOT FOUND OR _k.resource_type::text <> 'software' OR pg_temp.kg_norm(_k.name) <> 'lightning pose' THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', 'the record to keep (3ba48c59) is gone, retyped or renamed; not deleting what may now be the only copy'); + RETURN; + END IF; + IF _d.resource_type::text <> 'software' OR pg_temp.kg_norm(_d.name) <> 'lightning pose' THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', format('444f664a is now %s %L; a curator decides', _d.resource_type, _d.name)); + RETURN; + END IF; + SELECT st.docs_url, st.repo_url INTO _docs, _repo + FROM public.software_tools st WHERE st.resource_id = _keep ORDER BY st.created_at LIMIT 1; + IF NOT FOUND THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', 'no software_tools row points at 3ba48c59 any more; which row is the duplicate is no longer clear'); + RETURN; + END IF; + + -- Still the same tool, decided from the two rows: the duplicate's link is one of the keeper's + -- links (at export: its external_url = the keeper's docs_url), or its description, less the final + -- period, is the start of the keeper's (at export: 264 of its 265 characters). + _norm_url := lower(rtrim(btrim(coalesce(_d.external_url, '')), '/')); + IF NOT ((_norm_url <> '' AND _norm_url IN (lower(rtrim(btrim(coalesce(_docs, '')), '/')), + lower(rtrim(btrim(coalesce(_repo, '')), '/')), + lower(rtrim(btrim(coalesce(_k.external_url, '')), '/')))) + OR (rtrim(btrim(coalesce(_d.description, '')), '.') <> '' + AND position(rtrim(btrim(_d.description), '.') IN coalesce(_k.description, '')) = 1)) THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', format('the rows no longer look like one tool (duplicate url %L, keeper docs %L repo %L)', _d.external_url, _docs, _repo)); + RETURN; + END IF; + IF _d.organization_id IS NOT NULL AND _k.organization_id IS NOT NULL AND _d.organization_id <> _k.organization_id THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', 'the two rows name different organizations; a curator decides'); + RETURN; + END IF; + -- Look before writing: anything else that points at the duplicate stops the merge. Comments and the + -- search index are handled below, so they are not counted here. + _refs := pg_temp.kg_fk_refs('public.resources'::regclass, _dup, + ARRAY['public.entity_comments.resource_id', 'public.knowledge_embeddings.resource_id']); + IF _refs <> '' THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', 'still referenced: ' || _refs); + RETURN; + END IF; + + BEGIN + -- 1. Fill-only-empty metadata and organization onto the keeper. The duplicate's identity keys stay behind. + SELECT string_agg(e.key, ', ' ORDER BY e.key) FILTER (WHERE NOT (coalesce(_k.metadata, '{}'::jsonb) ? e.key)), + string_agg(e.key, ', ' ORDER BY e.key) FILTER (WHERE (coalesce(_k.metadata, '{}'::jsonb) ? e.key) + AND (_k.metadata -> e.key) IS DISTINCT FROM e.value) + INTO _copied, _kept + FROM jsonb_each(CASE WHEN jsonb_typeof(_d.metadata) = 'object' THEN _d.metadata ELSE '{}'::jsonb END) AS e + WHERE e.key <> ALL (_skipkeys); + IF _copied IS NOT NULL OR (_k.organization_id IS NULL AND _d.organization_id IS NOT NULL) THEN + UPDATE public.resources k + SET metadata = (SELECT coalesce(jsonb_object_agg(e.key, e.value), '{}'::jsonb) + FROM jsonb_each(CASE WHEN jsonb_typeof(_d.metadata) = 'object' THEN _d.metadata ELSE '{}'::jsonb END) AS e + WHERE e.key <> ALL (_skipkeys)) + || CASE WHEN jsonb_typeof(k.metadata) = 'object' THEN k.metadata ELSE '{}'::jsonb END, + organization_id = coalesce(k.organization_id, _d.organization_id) + WHERE k.id = _keep; + END IF; + + -- 2. Comments on the duplicate follow the tool (threads keep their parent_id). Audited. + UPDATE public.entity_comments SET resource_id = _keep WHERE resource_id = _dup; + GET DIAGNOSTICS _moved = ROW_COUNT; + -- 3. curation_audit_log rows about the duplicate are history with no foreign key: left as they + -- are, still naming 444f664a (counted for the report). + SELECT count(*) INTO _cal FROM public.curation_audit_log WHERE resource_id = _dup OR entity_id = _dup; + -- 4. The chat index's own copy of the duplicate (embed-knowledge only ever upserts). + DELETE FROM public.knowledge_embeddings WHERE resource_id = _dup OR source_id = _dup::text; + GET DIAGNOSTICS _ke = ROW_COUNT; + -- 5. field_provenance claims about the duplicate's cells stay: append-only history of a deleted + -- row, as for the spine row 20261106130000 deleted. None is moved to the keeper: the keeper's + -- own claims describe its cells. data_audit_log records the DELETE below. + SELECT count(*) INTO _fp FROM public.field_provenance WHERE entity_table = 'resources' AND entity_id = _dup; + + -- 6. Delete, only if nothing points at it now. + _refs := pg_temp.kg_fk_refs('public.resources'::regclass, _dup); + IF _refs <> '' THEN + RAISE EXCEPTION 'still referenced after the repoint: %', _refs; + END IF; + DELETE FROM public.resources WHERE id = _dup; + EXCEPTION WHEN OTHERS THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'error', 'rolled back, nothing changed: ' || SQLERRM); + RETURN; + END; + + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'done', + format('deleted 444f664a; metadata keys copied to 3ba48c59: %s; keeper''s value kept for: %s; comments moved: %s; curation_audit_log rows left as history (still naming 444f664a): %s; search-index rows deleted: %s; field_provenance rows left as history: %s', + coalesce(_copied, 'none'), coalesce(_kept, 'none'), _moved, _cal, _ke, _fp)); +END +$do$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [notices-03] Merge the superseded forecast RFA-NS-26-011 into RFA-NS-27-002 +-- The forecast's own title ends '[forecast — superseded by RFA-NS-27-002]', it is closed, and it +-- points at the same simpler.grants.gov opportunity as RFA-NS-27-002. fon is the upsert key +-- (20260903140000:16-18, bbqs-mcp add_funding_opportunity on_conflict=fon), so posting under the new +-- number made a second row instead of updating this one. It is the only call with no +-- participating_orgs, so #512 will never link it, and CQ17 lists it as still open. +-- RFA-NS-27-002 has no description and no purpose (the export shows none; roundtrip: purpose is +-- set on 12 of 14 rows, every one carried), so the forecast holds the programme's only text: it is +-- copied first, and the old FON is kept in the keeper's notes. Then the forecast's search-index +-- entries, its detail row (funding_opportunity_orgs rows cascade) and its spine row go, the +-- 20261106130000 way: delete the spine row only if no foreign key still points at it. +-- The deleted rows stay recoverable: data_audit_log keeps each one in full (old_data). +CREATE OR REPLACE FUNCTION pg_temp.kg_b_notices_03() RETURNS void LANGUAGE plpgsql AS +$do$ +DECLARE + _old_rid constant uuid := 'e0042c46-59de-40f6-b53d-8e565cc27a45'; + _new_rid constant uuid := '9fe36a51-d470-42f8-baa1-0c7aa68a9dea'; + _old_fon constant text := 'RFA-NS-26-011'; + _new_fon constant text := 'RFA-NS-27-002'; + _item constant text := 'merge superseded forecast'; + _tgt constant text := 'RFA-NS-26-011 -> RFA-NS-27-002'; + _old public.funding_opportunities%ROWTYPE; + _new public.funding_opportunities%ROWTYPE; + _old_res public.resources%ROWTYPE; + _new_res public.resources%ROWTYPE; + _has_old boolean; + _refs text; + _note text; + _done text[] := '{}'; + _n int; + _ke int; +BEGIN + PERFORM public.set_actor('migration:link_isolated_nodes'); + PERFORM public.set_source_class('curator_fill'); + + SELECT * INTO _old_res FROM public.resources WHERE id = _old_rid; + IF NOT FOUND THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'noop', 'forecast spine row already gone (merged earlier)'); + RETURN; + END IF; + IF _old_res.resource_type::text <> 'funding' THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', format('spine row %s is typed %s, not funding; not touched', _old_rid, _old_res.resource_type)); + RETURN; + END IF; + + -- The keeper must exist, both rows, before anything is copied or deleted. + SELECT * INTO _new_res FROM public.resources WHERE id = _new_rid AND resource_type::text = 'funding'; + IF NOT FOUND THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', format('keeper spine row %s is missing; nothing deleted', _new_rid)); + RETURN; + END IF; + SELECT * INTO _new FROM public.funding_opportunities WHERE resource_id = _new_rid AND fon = _new_fon; + IF NOT FOUND THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', 'keeper detail row (fon RFA-NS-27-002 on spine 9fe36a51-...) is missing; nothing deleted'); + RETURN; + END IF; + + SELECT count(*) INTO _n FROM public.funding_opportunities WHERE resource_id = _old_rid; + IF _n > 1 THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', format('%s funding_opportunities rows point at the forecast spine row; a curator decides', _n)); + RETURN; + END IF; + SELECT * INTO _old FROM public.funding_opportunities WHERE resource_id = _old_rid; + _has_old := FOUND; + + -- Same programme, by the records themselves. + IF _has_old THEN + IF _old.fon IS DISTINCT FROM _old_fon THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', format('the forecast spine row''s detail row has fon %L, not %s; not touched', _old.fon, _old_fon)); + RETURN; + END IF; + IF _old.title !~* 'superseded by RFA-NS-27-002' OR _old.url IS DISTINCT FROM _new.url THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', + format('no longer reads as superseded by the keeper (title %L; url %s vs %s); not touched', _old.title, _old.url, _new.url)); + RETURN; + END IF; + IF _old.status = 'open' THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', 'the forecast has been set open again; a curator decides'); + RETURN; + END IF; + ELSIF _old_res.name !~* 'superseded by RFA-NS-27-002' THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', format('spine row has no detail row and its name %L does not say it is superseded; not touched', _old_res.name)); + RETURN; + END IF; + + -- Anything else that still points at the forecast stops the merge. Its own detail row and its + -- search-index entries are removed below; a comment (entity_comments) is never deleted to make room. + _refs := pg_temp.kg_fk_refs('public.resources'::regclass, _old_rid, + ARRAY['public.funding_opportunities.resource_id', 'public.knowledge_embeddings.resource_id']); + IF _has_old THEN + _refs := btrim(_refs || ' ' || pg_temp.kg_fk_refs('public.funding_opportunities'::regclass, _old.id, + ARRAY['public.funding_opportunity_orgs.funding_opportunity_id'])); + END IF; + IF _refs <> '' THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'skipped', 'the forecast is still referenced (' || _refs || '); nothing changed'); + RETURN; + END IF; + + -- 1. Carry over what the keeper lacks: the programme description and purpose, the old FON, and + -- any funder link (none expected: the forecast has no participating_orgs). + IF nullif(btrim(_new_res.description), '') IS NULL + AND nullif(btrim(coalesce(nullif(btrim(_old_res.description), ''), _old.purpose)), '') IS NOT NULL THEN + UPDATE public.resources + SET description = coalesce(nullif(btrim(_old_res.description), ''), _old.purpose), updated_at = now() + WHERE id = _new_rid; + _done := _done || 'resources.description'::text; + END IF; + IF _has_old AND nullif(btrim(_new.purpose), '') IS NULL AND nullif(btrim(_old.purpose), '') IS NOT NULL THEN + UPDATE public.funding_opportunities SET purpose = _old.purpose, updated_at = now() WHERE id = _new.id; + _done := _done || 'purpose'::text; + END IF; + IF strpos(coalesce(_new.notes, ''), _old_fon) = 0 THEN + _note := format('Forecast: %s (posted %s), merged into this record %s.', + _old_fon, coalesce(_old.posted_date::text, 'date unknown'), to_char(current_date, 'YYYY-MM-DD')) + || CASE WHEN nullif(btrim(_old.notes), '') IS NOT NULL THEN ' Forecast notes: ' || btrim(_old.notes) ELSE '' END; + UPDATE public.funding_opportunities + SET notes = CASE WHEN nullif(btrim(notes), '') IS NULL THEN _note ELSE notes || E'\n' || _note END, + updated_at = now() + WHERE id = _new.id; + _done := _done || 'notes (old FON)'::text; + END IF; + IF _has_old AND to_regclass('public.funding_opportunity_orgs') IS NOT NULL THEN + EXECUTE 'INSERT INTO public.funding_opportunity_orgs (funding_opportunity_id, organization_id) + SELECT $1, organization_id FROM public.funding_opportunity_orgs WHERE funding_opportunity_id = $2 + ON CONFLICT DO NOTHING' USING _new.id, _old.id; + GET DIAGNOSTICS _n = ROW_COUNT; + IF _n > 0 THEN _done := _done || format('%s funder link(s)', _n); END IF; + END IF; + + -- 2. The chat search index keeps its own copy (embed-knowledge only upserts, and keys a resources + -- row by its id): remove the forecast's entries before the spine row, which one may reference. + DELETE FROM public.knowledge_embeddings + WHERE resource_id = _old_rid OR source_id = _old_rid::text OR source_id = _old.id::text; + GET DIAGNOSTICS _ke = ROW_COUNT; + + -- 3. The detail row (its funding_opportunity_orgs rows cascade), then the spine row, re-checked. + IF _has_old THEN + DELETE FROM public.funding_opportunities WHERE id = _old.id; + END IF; + _refs := pg_temp.kg_fk_refs('public.resources'::regclass, _old_rid); + IF _refs <> '' THEN + RAISE EXCEPTION 'forecast spine row still referenced (%)', _refs; + END IF; + DELETE FROM public.resources WHERE id = _old_rid; + + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'done', + format('copied onto RFA-NS-27-002: %s; removed %s search-index row(s), the funding_opportunities row and spine row %s', + CASE WHEN cardinality(_done) = 0 THEN 'nothing (the keeper already had it)' ELSE array_to_string(_done, ', ') END, + _ke, _old_rid)); +EXCEPTION WHEN OTHERS THEN + -- Nothing of this block is kept: it rolls back to its own savepoint. + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _tgt, 'error', SQLSTATE || ': ' || SQLERRM || ' (nothing changed)'); +END +$do$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [datasets-D01] Apply 20261105120000 (dandisets.hidden*, CHECK, set_dandiset_hidden) where missing +-- Its live status is unknown. The columns and the CHECK are exactly the migration's +-- (20261105120000:7-15). The ALTER runs only if a column is missing (ALTER TABLE takes an ACCESS +-- EXCLUSIVE lock on dandisets even when every column is there), so a re-run touches nothing. The +-- function is created only when it is absent, so a live (possibly newer) version is never +-- overwritten; it is created verbatim so curators can unhide through the MCP tool later. Without this +-- block the D02-D05 hides cannot run, and ember-dandiset-sync (16be24c) cannot honour them. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_datasets_d01() RETURNS void LANGUAGE plpgsql AS +$blk$ +DECLARE + _missing text; +BEGIN + SELECT string_agg(c, ', ' ORDER BY c) INTO _missing + FROM unnest(ARRAY['hidden', 'hidden_reason', 'hidden_by', 'hidden_at']) AS c + WHERE NOT EXISTS (SELECT 1 FROM pg_attribute a + WHERE a.attrelid = 'public.dandisets'::regclass AND a.attname = c + AND a.attnum > 0 AND NOT a.attisdropped); + IF _missing IS NOT NULL THEN + ALTER TABLE public.dandisets + ADD COLUMN IF NOT EXISTS hidden boolean NOT NULL DEFAULT false, + ADD COLUMN IF NOT EXISTS hidden_reason text, + ADD COLUMN IF NOT EXISTS hidden_by uuid, + ADD COLUMN IF NOT EXISTS hidden_at timestamptz; + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES ('dandiset_hidden DDL', 'dandisets.hidden*', 'done', 'column(s) added (20261105120000:7-11): ' || _missing); + ELSE + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES ('dandiset_hidden DDL', 'dandisets.hidden*', 'noop', 'columns already present'); + END IF; + + IF NOT EXISTS (SELECT 1 FROM pg_constraint + WHERE conrelid = 'public.dandisets'::regclass AND conname = 'dandisets_hidden_has_reason') THEN + ALTER TABLE public.dandisets + ADD CONSTRAINT dandisets_hidden_has_reason CHECK (NOT hidden OR hidden_reason IS NOT NULL); + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES ('dandiset_hidden DDL', 'dandisets_hidden_has_reason', 'done', 'CHECK added (20261105120000:13-15)'); + ELSE + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES ('dandiset_hidden DDL', 'dandisets_hidden_has_reason', 'noop', 'CHECK already present'); + END IF; + + IF to_regprocedure('public.set_dandiset_hidden(text[],boolean,text,text)') IS NULL THEN + -- Verbatim from 20261105120000:19-80. + CREATE FUNCTION public.set_dandiset_hidden( + _dandiset_ids text[], _hidden boolean DEFAULT true, _reason text DEFAULT NULL, _instance text DEFAULT 'ember') + RETURNS jsonb LANGUAGE plpgsql SECURITY DEFINER SET search_path = public AS $fn$ + DECLARE + _d public.dandisets; + _rid uuid; + _missing text[]; + _out jsonb := '[]'::jsonb; + BEGIN + IF auth.uid() IS NULL OR NOT public.is_curator_or_admin(auth.uid()) THEN + RAISE EXCEPTION 'Only admins or curators can hide or unhide dandisets'; + END IF; + IF coalesce(cardinality(_dandiset_ids), 0) = 0 THEN + RAISE EXCEPTION 'No dandiset ids given'; + END IF; + IF _hidden AND nullif(btrim(_reason), '') IS NULL THEN + RAISE EXCEPTION 'A reason is required to hide a dandiset'; + END IF; + + SELECT array_agg(x ORDER BY x) INTO _missing FROM unnest(_dandiset_ids) x + WHERE NOT EXISTS (SELECT 1 FROM public.dandisets d WHERE d.instance = _instance AND d.dandiset_id = x); + IF _missing IS NOT NULL THEN + RAISE EXCEPTION 'Not in the % mirror: %', _instance, array_to_string(_missing, ', '); + END IF; + + FOR _d IN SELECT * FROM public.dandisets + WHERE instance = _instance AND dandiset_id = ANY (_dandiset_ids) + ORDER BY dandiset_id FOR UPDATE LOOP + IF _hidden THEN + UPDATE public.dandisets + SET hidden = true, hidden_reason = btrim(_reason), hidden_by = auth.uid(), hidden_at = now(), + resource_id = NULL + WHERE id = _d.id; + IF _d.resource_id IS NOT NULL THEN + DELETE FROM public.resources WHERE id = _d.resource_id; + END IF; + _out := _out || jsonb_build_object('dandiset_id', _d.dandiset_id, 'name', _d.name, + 'hidden', true, 'resource_removed', _d.resource_id IS NOT NULL); + ELSE + _rid := _d.resource_id; + IF _rid IS NULL THEN + -- Same row ember-dandiset-sync would have created. + INSERT INTO public.resources (name, description, resource_type, external_url, metadata) + VALUES (_d.name, left(coalesce(_d.description, ''), 4000), 'dataset', + coalesce(_d.draft_url, 'https://dandi.emberarchive.org/dandiset/' || _d.dandiset_id), + jsonb_build_object('source', _d.instance, 'dandiset_id', _d.dandiset_id)) + RETURNING id INTO _rid; + END IF; + UPDATE public.dandisets + SET hidden = false, hidden_reason = NULL, hidden_by = NULL, hidden_at = NULL, resource_id = _rid + WHERE id = _d.id; + _out := _out || jsonb_build_object('dandiset_id', _d.dandiset_id, 'name', _d.name, + 'hidden', false, 'resource_id', _rid); + END IF; + END LOOP; + + RETURN jsonb_build_object('ok', true, 'count', jsonb_array_length(_out), 'dandisets', _out); + END; + $fn$; + REVOKE ALL ON FUNCTION public.set_dandiset_hidden(text[], boolean, text, text) FROM PUBLIC, anon; + GRANT EXECUTE ON FUNCTION public.set_dandiset_hidden(text[], boolean, text, text) TO authenticated; + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES ('dandiset_hidden DDL', 'set_dandiset_hidden()', 'done', 'created from 20261105120000:19-80'); + ELSE + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES ('dandiset_hidden DDL', 'set_dandiset_hidden()', 'noop', 'already present; left as is'); + END IF; +END +$blk$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [datasets-D02] Hide the 28 IDP/ARC integration-test uploads (#506) +-- 26 copies of one IDP four-choice digging-task upload (000550-000551, 000559-000563, +-- 000610-000628; R34DA062119's ARC/IDP platform testing its EMBER upload from a developer machine), +-- plus 'arc-idp-test' (000533) and 'aggregate-task-one' (000542). The real dataset, 000607, stays +-- (D07 links it). Each call re-checks the mirror row and skips, with a report row, if the upload +-- was renamed, got linked, or its spine row is referenced by anything but the mirror and the +-- search index. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_datasets_d02() RETURNS void LANGUAGE plpgsql AS +$blk$ +BEGIN + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000550', 'eef427e0-8f77-423f-9c21-db3e1eef5b74', '(idp.*four-choice reversal digging task|four-choice reversal digging task.*\(idp\))', 'IDP/ARC integration test upload (#506)'); -- IDP-ARC — Four-choice reversal digging task + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000551', '82dd5aa5-3e9e-4f8b-ab99-9da5f557580a', '(idp.*four-choice reversal digging task|four-choice reversal digging task.*\(idp\))', 'IDP/ARC integration test upload (#506)'); -- IDP-ARC — Four-choice reversal digging task + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000559', 'fc39570e-25ee-4d25-8606-1da0f0a03d43', '(idp.*four-choice reversal digging task|four-choice reversal digging task.*\(idp\))', 'IDP/ARC integration test upload (#506)'); -- Four-choice reversal digging task (IDP) + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000560', '67eda9ac-ecbc-494f-b34f-671f074344d0', '(idp.*four-choice reversal digging task|four-choice reversal digging task.*\(idp\))', 'IDP/ARC integration test upload (#506)'); -- Four-choice reversal digging task (IDP) + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000561', '95740d4f-1e7f-474d-96ac-cbb99161a800', '(idp.*four-choice reversal digging task|four-choice reversal digging task.*\(idp\))', 'IDP/ARC integration test upload (#506)'); -- Four-choice reversal digging task (IDP) + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000562', '9be4379c-b96a-4a12-b128-b91bf85554ab', '(idp.*four-choice reversal digging task|four-choice reversal digging task.*\(idp\))', 'IDP/ARC integration test upload (#506)'); -- Four-choice reversal digging task (IDP) + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000563', '9923fbb5-0ea9-48d8-8ad9-386af3233e00', '(idp.*four-choice reversal digging task|four-choice reversal digging task.*\(idp\))', 'IDP/ARC integration test upload (#506)'); -- Four-choice reversal digging task (IDP) + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000610', '556563f6-a276-4de9-ac21-57ab8a53acf0', '(idp.*four-choice reversal digging task|four-choice reversal digging task.*\(idp\))', 'IDP/ARC integration test upload (#506)'); -- Four-choice reversal digging task (IDP) + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000611', '404ca8b2-c293-40f2-be94-f3ae24b30af1', '(idp.*four-choice reversal digging task|four-choice reversal digging task.*\(idp\))', 'IDP/ARC integration test upload (#506)'); -- Four-choice reversal digging task (IDP) + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000612', '00b12533-f062-4b07-956e-62cdd5145e49', '(idp.*four-choice reversal digging task|four-choice reversal digging task.*\(idp\))', 'IDP/ARC integration test upload (#506)'); -- Four-choice reversal digging task (IDP) + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000613', '013d5512-b094-4603-8eb5-5a4ed578501d', '(idp.*four-choice reversal digging task|four-choice reversal digging task.*\(idp\))', 'IDP/ARC integration test upload (#506)'); -- Four-choice reversal digging task (IDP) + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000614', '71f322a4-f40f-4dc8-b8d6-2a05c4692c0c', '(idp.*four-choice reversal digging task|four-choice reversal digging task.*\(idp\))', 'IDP/ARC integration test upload (#506)'); -- Four-choice reversal digging task (IDP) + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000615', '9bb42f0a-2bf6-4f88-b621-e2d65d31fa71', '(idp.*four-choice reversal digging task|four-choice reversal digging task.*\(idp\))', 'IDP/ARC integration test upload (#506)'); -- Four-choice reversal digging task (IDP) + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000616', '9d48505e-4e39-425a-ac10-2f1d28ebcbc1', '(idp.*four-choice reversal digging task|four-choice reversal digging task.*\(idp\))', 'IDP/ARC integration test upload (#506)'); -- Four-choice reversal digging task (IDP) + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000617', '29d65027-e638-43f7-b860-9bde457d4830', '(idp.*four-choice reversal digging task|four-choice reversal digging task.*\(idp\))', 'IDP/ARC integration test upload (#506)'); -- Four-choice reversal digging task (IDP) + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000618', 'b1246cb8-0963-4160-bb14-8f313a885dcc', '(idp.*four-choice reversal digging task|four-choice reversal digging task.*\(idp\))', 'IDP/ARC integration test upload (#506)'); -- Four-choice reversal digging task (IDP) + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000619', 'c104aeb5-4e17-4b00-b120-1f8343435b78', '(idp.*four-choice reversal digging task|four-choice reversal digging task.*\(idp\))', 'IDP/ARC integration test upload (#506)'); -- Four-choice reversal digging task (IDP) + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000620', '344938eb-1ef4-4b39-b6e2-a8297f510dbd', '(idp.*four-choice reversal digging task|four-choice reversal digging task.*\(idp\))', 'IDP/ARC integration test upload (#506)'); -- Four-choice reversal digging task (IDP) + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000621', 'e25c35c9-96b7-4410-bd9f-cfc0382fded2', '(idp.*four-choice reversal digging task|four-choice reversal digging task.*\(idp\))', 'IDP/ARC integration test upload (#506)'); -- Four-choice reversal digging task (IDP) + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000622', '9a538af9-78f2-49ab-ac2f-24f6d66f3936', '(idp.*four-choice reversal digging task|four-choice reversal digging task.*\(idp\))', 'IDP/ARC integration test upload (#506)'); -- Four-choice reversal digging task (IDP) + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000623', 'fae4c50f-849c-4ec8-91d6-15da5747305e', '(idp.*four-choice reversal digging task|four-choice reversal digging task.*\(idp\))', 'IDP/ARC integration test upload (#506)'); -- Four-choice reversal digging task (IDP) + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000624', '51314407-e284-4b97-b708-6d4ac938320b', '(idp.*four-choice reversal digging task|four-choice reversal digging task.*\(idp\))', 'IDP/ARC integration test upload (#506)'); -- Four-choice reversal digging task (IDP) + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000625', '7758db83-7d6a-46d9-9cbb-dd78d0e2853a', '(idp.*four-choice reversal digging task|four-choice reversal digging task.*\(idp\))', 'IDP/ARC integration test upload (#506)'); -- Four-choice reversal digging task (IDP) + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000626', 'f85d4385-1c70-4282-a6f2-0bd7f3c91df9', '(idp.*four-choice reversal digging task|four-choice reversal digging task.*\(idp\))', 'IDP/ARC integration test upload (#506)'); -- Four-choice reversal digging task (IDP) + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000627', '5866f05c-c82e-4c6b-9e7a-829799ee866d', '(idp.*four-choice reversal digging task|four-choice reversal digging task.*\(idp\))', 'IDP/ARC integration test upload (#506)'); -- Four-choice reversal digging task (IDP) + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000628', '33aad87e-eca4-4de4-b67c-425bd39ec168', '(idp.*four-choice reversal digging task|four-choice reversal digging task.*\(idp\))', 'IDP/ARC integration test upload (#506)'); -- Four-choice reversal digging task (IDP) + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000533', 'e5d71308-2123-4732-952c-e3e1bfb32108', '^\s*arc-idp-test\s*$', 'IDP/ARC integration test upload (#506)'); -- arc-idp-test + PERFORM pg_temp.kg_ds_hide('hide IDP/ARC test upload', '000542', 'f9d3a756-c9ad-4abb-89ae-c55756d4e662', '^\s*aggregate-task-one\s*$', 'IDP/ARC integration test upload (#506)'); -- aggregate-task-one +END +$blk$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [datasets-D03] Hide the four test uploads 000001, 000003, 000431, 000467 (#506) +-- 'test', 'Test DANDIset (Brock test)', 'TestNeuroConvUpload', 'Test dataset for Pennsieve upload'. +-- #506 also lists 000472 (D05 decides it from file_count) and 000598 (linked; datasets-O1, optional). +CREATE OR REPLACE FUNCTION pg_temp.kg_b_datasets_d03() RETURNS void LANGUAGE plpgsql AS +$blk$ +BEGIN + PERFORM pg_temp.kg_ds_hide('hide test upload', '000001', '0c87346c-ae43-4e45-8708-682c41353bcc', '^\s*test\s*$', 'test or placeholder upload (#506)'); -- test + PERFORM pg_temp.kg_ds_hide('hide test upload', '000003', '38f4034a-316a-4439-a0d7-161992a8aa67', 'test', 'test or placeholder upload (#506)'); -- Test DANDIset (Brock test) + PERFORM pg_temp.kg_ds_hide('hide test upload', '000431', '2b9b6595-65f5-4f03-b4d4-d6725b6bb1c0', 'test\s*neuro\s*conv', 'test or placeholder upload (#506)'); -- TestNeuroConvUpload + PERFORM pg_temp.kg_ds_hide('hide test upload', '000467', '821b1f4e-5bdf-45be-8319-d10a2620fb1a', 'test dataset', 'test or placeholder upload (#506)'); -- Test dataset for Pennsieve upload +END +$blk$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [datasets-D04] Hide 'Single Click Science' (000468): synthetic mock data, #444 Exclude +-- Its own description: "a synthetic dataset for cell morphology containing mock data". #506's list +-- leaves it out; #444's dataset review marks it Exclude. Reversible: set_dandiset_hidden(false). +CREATE OR REPLACE FUNCTION pg_temp.kg_b_datasets_d04() RETURNS void LANGUAGE plpgsql AS +$blk$ +BEGIN + PERFORM pg_temp.kg_ds_hide('hide synthetic mock data', '000468', '00a0773c-3d61-4450-8256-ab7456c87953', 'single click science', 'synthetic mock data, not BBQS data (#444 Exclude)'); -- Single Click Science +END +$blk$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [datasets-D05] 'Pozu: Missing subjects' (000472): hide if it has 0 files, else link it to R24MH136632 +-- Contested. #506 lists it as a placeholder; its own description ("Dedicated collection of reports +-- of video frames missing any subject") and #444 put it with the Pozu collections. The live mirror +-- decides: file_count = 0 -> hide (as #506 asks); file_count > 0 -> link to R24MH136632 under the +-- same evidence rule as the rest of the Pozu group (D06); NULL (never counted) -> skip and report. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_datasets_d05() RETURNS void LANGUAGE plpgsql AS +$do$ +DECLARE _fc integer; _found boolean; +BEGIN + PERFORM public.set_actor('migration:link_isolated_nodes'); + PERFORM public.set_source_class('curator_fill'); + SELECT d.file_count, true INTO _fc, _found + FROM public.dandisets d WHERE d.instance = 'ember' AND d.dandiset_id = '000472'; + IF NOT coalesce(_found, false) THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES ('000472 by file_count', '000472', 'skipped', 'not in the ember mirror'); + ELSIF _fc = 0 THEN + PERFORM pg_temp.kg_ds_hide('000472 empty -> hide', '000472', '241a21ae-2f3c-4fce-b11d-d42980ed7209', + 'missing subjects', 'empty placeholder: 0 files on EMBER-DANDI (#506)'); + ELSIF _fc > 0 THEN + PERFORM pg_temp.kg_ds_link('000472 has files -> EMBER', '000472', '241a21ae-2f3c-4fce-b11d-d42980ed7209', + 'missing subjects', 'R24MH136632', 'roster', + 'Pozu collection on EMBER-DANDI with ' || _fc || ' file(s); #444 lists it with the EMBER (R24MH136632) collections.'); + ELSE + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES ('000472 by file_count', '000472 Pozu: Missing subjects', 'skipped', + 'file_count is NULL (never counted); run ember-dandiset-sync, then re-run this block'); + END IF; +END +$do$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [datasets-D09] Merge species 'Acoel Flatworm' (10ceb449) into Hofstenia miamia (d6fbdcc7) +-- Seeded as species 'Acoel Worm' / common name 'Acoel Flatworm' (spine row 10ceb449-..., species row +-- 88f275de-... in the 2026-09-21 export) from the label seed-all-tables gives R34DA061984. After +-- 20260819120000 put R34DA061984's real species (Hofstenia miamia, "We will study the acoel worm, +-- Hofstenia miamia") on the project, migration:add_hofstenia_species added a second row +-- (d6fbdcc7-...) instead of renaming this one, so the old row is an isolated duplicate. +-- 1. aliases 'acoel worm' / 'acoel flatworm' -> Hofstenia miamia (kind taxon_assumed: a clade-level +-- name read as R34DA061984's acoel is a judgement, 20260820190000:46-47), so the old names still +-- resolve; 2. carry the duplicate's metadata onto the keeper (keys it lacks; arrays unioned, e.g. +-- {"grants": ["R34DA061984"]}, the one species.metadata cell roundtrip.json saw); +-- 3. delete the duplicate's species row, its search-index copy and its spine row, only if no foreign +-- key still points at the spine row (the 20261106130000 step 3 scan). Atomic: any error rolls the +-- whole merge back and leaves a report row. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_datasets_d09() RETURNS void LANGUAGE plpgsql AS +$do$ +DECLARE + _dup_rid constant uuid := '10ceb449-38ab-4e52-9422-39722583f074'; -- KG node 'Acoel Flatworm' + _keep_rid constant uuid := 'd6fbdcc7-30d7-48ba-9c46-b70e227c59cf'; -- KG node 'Hofstenia miamia' + _item constant text := 'merge Acoel Flatworm into Hofstenia miamia'; + _k public.species%ROWTYPE; + _a public.species%ROWTYPE; + _has_a boolean := false; + _rname text; + _rtype text; + _refs text; + _n int; + _meta jsonb; + _key text; + _val jsonb; + _carried text := ''; + _claims text; +BEGIN + PERFORM public.set_actor('migration:link_isolated_nodes'); + PERFORM public.set_source_class('curator_fill'); + + -- The keeper: Hofstenia miamia on its spine row. + SELECT * INTO _k FROM public.species WHERE resource_id = _keep_rid; + IF NOT FOUND OR lower(btrim(_k.name)) <> 'hofstenia miamia' THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _keep_rid::text, 'skipped', 'keeper species row (Hofstenia miamia on d6fbdcc7) not found as expected'); + RETURN; + END IF; + + -- The duplicate: its spine row must still be the acoel species row. + SELECT r.name, r.resource_type::text INTO _rname, _rtype FROM public.resources r WHERE r.id = _dup_rid; + IF NOT FOUND THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _dup_rid::text, 'noop', 'spine row already gone (merged earlier)'); + RETURN; + END IF; + IF _rtype <> 'species' OR _rname !~* 'acoel' THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _dup_rid::text, 'skipped', format('spine row is now %L (%s), not the acoel species row', _rname, _rtype)); + RETURN; + END IF; + SELECT count(*) INTO _n FROM public.species WHERE resource_id = _dup_rid; + IF _n > 1 THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _dup_rid::text, 'skipped', format('%s species rows share the spine row; a curator decides', _n)); + RETURN; + END IF; + SELECT * INTO _a FROM public.species WHERE resource_id = _dup_rid; + _has_a := FOUND; + IF _has_a AND NOT (coalesce(_a.name, '') ~* 'acoel' OR coalesce(_a.common_name, '') ~* 'acoel') THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _dup_rid::text, 'skipped', format('species row on the spine is %L / %L, not the acoel row', _a.name, _a.common_name)); + RETURN; + END IF; + + -- Nothing but the duplicate's own species row and its search-index copy may point at the spine. + _refs := pg_temp.kg_fk_refs('public.resources'::regclass, _dup_rid, + ARRAY['public.species.resource_id', 'public.knowledge_embeddings.resource_id']); + IF _refs <> '' THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _dup_rid::text, 'skipped', format('spine row still referenced (%s); not merging', _refs)); + RETURN; + END IF; + + -- Who still names the old row? These resolve to Hofstenia through the aliases below, so they do + -- not block the merge; they are reported so a curator can tidy the raw values. + SELECT string_agg(DISTINCT p.grant_number || ':' || s, ', ') INTO _claims + FROM public.projects p, unnest(coalesce(p.study_species, '{}'::text[])) AS s + WHERE lower(btrim(s)) IN ('acoel worm', 'acoel flatworm', 'acoel') + OR lower(btrim(s)) = nullif(lower(btrim(coalesce(_a.name, ''))), '') + OR lower(btrim(s)) = nullif(lower(btrim(coalesce(_a.common_name, ''))), ''); + IF _claims IS NOT NULL THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, 'projects.study_species', 'report', 'still name the old row (now resolve via alias): ' || _claims); + END IF; + + -- 1. Aliases. Never overwrite an existing mapping; report one that points elsewhere. + INSERT INTO public.species_aliases (alias, canonical, kind, common_name, note) + SELECT a.alias, 'Hofstenia miamia', 'taxon_assumed', 'panther worm', + format('R34DA061984''s acoel worm: "We will study the acoel worm, Hofstenia miamia". Merged duplicate species row Acoel Worm / Acoel Flatworm (10ceb449) on %s.', + to_char(current_date, 'YYYY-MM-DD')) + FROM (VALUES ('acoel worm'), ('acoel flatworm')) AS a(alias) + ON CONFLICT (alias) DO NOTHING; + SELECT string_agg(alias || ' -> ' || coalesce(canonical, '(none)'), ', ') INTO _claims + FROM public.species_aliases + WHERE alias IN ('acoel worm', 'acoel flatworm') AND canonical IS DISTINCT FROM 'Hofstenia miamia'; + IF _claims IS NOT NULL THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, 'species_aliases', 'report', 'existing alias kept, maps elsewhere: ' || _claims); + END IF; + + -- 2. Carry the duplicate's metadata: keys the keeper lacks are added, arrays are unioned (e.g. + -- grants), and a differing scalar stays as the keeper has it (reported). + IF _has_a THEN + _meta := coalesce(_k.metadata, '{}'::jsonb); + IF jsonb_typeof(_a.metadata) = 'object' THEN + FOR _key, _val IN SELECT * FROM jsonb_each(_a.metadata) LOOP + IF NOT (_meta ? _key) THEN + _meta := _meta || jsonb_build_object(_key, _val); + _carried := _carried || format('metadata.%s added; ', _key); + ELSIF jsonb_typeof(_meta -> _key) = 'array' AND jsonb_typeof(_val) = 'array' THEN + IF NOT ((_meta -> _key) @> _val) THEN + _meta := jsonb_set(_meta, ARRAY[_key], + (SELECT jsonb_agg(DISTINCT e) FROM (SELECT jsonb_array_elements(_meta -> _key) AS e + UNION SELECT jsonb_array_elements(_val)) u)); + _carried := _carried || format('metadata.%s unioned; ', _key); + END IF; + ELSIF (_meta -> _key) IS DISTINCT FROM _val THEN + _carried := _carried || format('metadata.%s differs, keeper''s kept (%s); ', _key, _val); + END IF; + END LOOP; + END IF; + IF _meta IS DISTINCT FROM coalesce(_k.metadata, '{}'::jsonb) THEN + UPDATE public.species SET metadata = _meta WHERE id = _k.id; + END IF; + -- Taxonomy levels are reported, not copied: a generic "acoel worm" row's family or genus need + -- not be Hofstenia's, and these columns are not exported (only common_name and taxonomy_class). + IF (_k.taxonomy_order IS NULL AND _a.taxonomy_order IS NOT NULL) + OR (_k.taxonomy_family IS NULL AND _a.taxonomy_family IS NOT NULL) + OR (_k.taxonomy_genus IS NULL AND _a.taxonomy_genus IS NOT NULL) THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, 'species.taxonomy_*', 'report', + format('the duplicate had order %s / family %s / genus %s where Hofstenia miamia has none; not copied, a curator may fill them', + coalesce(_a.taxonomy_order, '-'), coalesce(_a.taxonomy_family, '-'), coalesce(_a.taxonomy_genus, '-'))); + END IF; + + -- 3a. The duplicate species row (audited by trg_audit_species). No foreign key points at species. + DELETE FROM public.species WHERE id = _a.id; + END IF; + + -- 3b. Its chat-index copies, then its spine row (audited by trg_audit_resources). + DELETE FROM public.knowledge_embeddings + WHERE resource_id = _dup_rid OR source_id IN (_dup_rid::text, coalesce(_a.id::text, '')); + DELETE FROM public.resources WHERE id = _dup_rid; + + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, 'Acoel Flatworm (10ceb449) -> Hofstenia miamia (d6fbdcc7)', 'done', + format('aliases acoel worm / acoel flatworm -> Hofstenia miamia; %sspecies row %s and spine row deleted', + CASE WHEN _carried = '' THEN 'nothing to carry; ' ELSE _carried END, + coalesce(_a.id::text, '(none: orphan spine row)'))); +EXCEPTION WHEN OTHERS THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _dup_rid::text, 'error', SQLSTATE || ': ' || SQLERRM); +END +$do$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [people-05] Affiliate the 11 NIH program staff with their institute (or NIH) +-- They hold no grant by design, so the link that fits is affiliation (an org `members` edge), the +-- way Christina Hatch, Christina Liu and Yuan Luo are already members of National Institutes of +-- Health. The specific institute where the repo names it, else NIH. Each target org is matched by +-- its spine id (= its KG node id) and exported name. The row's own institution text, when set, must +-- start with NIH or with the target institute (its code or its name, as whole words): 'BRAIN' or +-- 'National Institute of Standards and Technology' is not NIH. For an institute target it must not +-- also name another institute ('NIH/NIDA' for an NIMH link). Anything else is skipped for a curator. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_people_05() RETURNS void LANGUAGE plpgsql AS +$do$ +DECLARE + r record; + _nih constant text := 'nih|national institutes? of health'; +BEGIN + PERFORM public.set_actor('migration:link_isolated_nodes'); + PERFORM public.set_source_class('curator_fill'); + FOR r IN + WITH ic(code, name) AS (VALUES -- the NIH institutes and centres, by code and by name + ('nimh', 'national institute of mental health'), + ('ninds', 'national institute of neurological disorders and stroke'), + ('nida', 'national institute on drug abuse'), + ('nidcd', 'national institute on deafness and other communication disorders'), + ('nia', 'national institute on aging'), + ('niaaa', 'national institute on alcohol abuse and alcoholism'), + ('nibib', 'national institute of biomedical imaging and bioengineering'), + ('nichd', '(eunice kennedy shriver )?national institute of child health and human development'), + ('nei', 'national eye institute'), + ('nccih', 'national center for complementary and integrative health'), + ('nhlbi', 'national heart,? lung,? and blood institute'), + ('nigms', 'national institute of general medical sciences'), + ('niehs', 'national institute of environmental health sciences'), + ('nidcr', 'national institute of dental and craniofacial research'), + ('niddk', 'national institute of diabetes and digestive and kidney diseases'), + ('niams', 'national institute of arthritis and musculoskeletal and skin diseases'), + ('nimhd', 'national institute on minority health and health disparities'), + ('ninr', 'national institute of nursing research'), + ('nlm', 'national library of medicine'), + ('nci', 'national cancer institute'), + ('niaid', 'national institute of allergy and infectious diseases'), + ('nhgri', 'national human genome research institute'), + ('ncats', 'national center for advancing translational sciences') + ), staff(rid, label, org_rid, org_label, ic, evidence) AS (VALUES + ('7745a449-07ce-4762-988e-e355a72b0775'::uuid, 'Arina Knowlton', '28609b98-6f97-4a46-b875-9f5084f1c7cd'::uuid, 'National Institute of Mental Health', 'nimh', + 'institution NIH/NIMH at creation, 20260807170000:21'), + ('9eb4af78-4485-4c7b-9179-76d079bde109'::uuid, 'Ashlee Van''t Veer', '208980e9-92b9-447e-a2ca-e83bf61db159'::uuid, 'National Institutes of Health', NULL, + 'consortium label NIH program staff, #517 block 12; no institute in the repo'), + ('79c7ff27-6bd7-4b92-b22c-9f4f80a507ab'::uuid, 'Crystal Lantz', '208980e9-92b9-447e-a2ca-e83bf61db159'::uuid, 'National Institutes of Health', NULL, + 'NIH BRAIN Initiative, NIH Program, mit-workshop-seating.ts:32'), + ('2f334517-3173-4654-987e-dc44e0e94eb2'::uuid, 'Eunyoung Kim', '28609b98-6f97-4a46-b875-9f5084f1c7cd'::uuid, 'National Institute of Mental Health', 'nimh', + 'NIH/NIMH/BRAIN Initiative, 20260807150000:162, seed-consortium/index.ts:407-411, seating:196'), + ('36ba050d-e4f4-470c-a780-eddef3b4bab8'::uuid, 'Farah Bader', '69aa906c-2a0c-4524-8958-4e1009f96060'::uuid, 'National Institute of Neurological Disorders and Stroke', 'ninds', + 'Farah Nikhath Bader, NINDS/BRAIN Initiative, seating:121; SfN 2025 symposium organizer, SFN2025.tsx:186'), + ('5899fd56-4c11-41a1-8b0a-4e1785820391'::uuid, 'Joseph Monaco', '208980e9-92b9-447e-a2ca-e83bf61db159'::uuid, 'National Institutes of Health', NULL, + 'NIH/BRAIN, 20260807150000:158, seed-consortium/index.ts:457-462; no institute named'), + ('b723b975-9438-4c08-b9b9-404846e31272'::uuid, 'Karen David', '69aa906c-2a0c-4524-8958-4e1009f96060'::uuid, 'National Institute of Neurological Disorders and Stroke', 'ninds', + 'Karen Kate David, NIH BRAIN/NINDS, seating:67; form answer NIH, 20260807150000:128'), + ('3cc135af-1424-4cc9-b54b-978d039ad6d1'::uuid, 'Kari Johnson', '208980e9-92b9-447e-a2ca-e83bf61db159'::uuid, 'National Institutes of Health', NULL, + 'NIH, 20260807150000:161, seed-consortium/index.ts:416-421, seating:197'), + ('8b45a6d3-febb-4537-9786-69685e36aa6d'::uuid, 'Lizzy Ankudowich', '28609b98-6f97-4a46-b875-9f5084f1c7cd'::uuid, 'National Institute of Mental Health', 'nimh', + 'NIMH, BBQS Co-Lead, 20260910120000:3, 20260831120000:3, seating:103'), + ('4412f5e5-aba7-49fb-876c-618f59f9b226'::uuid, 'Merav Sabri', 'a6ed8610-4f99-43cb-b0fa-ed983bfa2f20'::uuid, 'National Institute on Deafness and Other Communication Disorders', 'nidcd', + 'NIH/NIDCD, NIH Program, seating:178'), + ('24703152-c43b-4f4f-8d73-65f3ef490ff0'::uuid, 'Ming Zhan', '32f761ce-6857-451c-9eb7-fc5b8b221449'::uuid, 'National Institute on Drug Abuse', 'nida', + 'NIDA/NIH, seating:139; created with a nih.gov address, 20260521171202:16-23') + ) + SELECT s.*, + -- NIH itself, plus: for an NIH-level link any institute, for an institute link that one + _nih || '|' || (SELECT string_agg(i.code || '|' || i.name, '|') FROM ic i WHERE s.ic IS NULL OR i.code = s.ic) AS spell, + CASE WHEN s.ic IS NOT NULL + THEN '\m(' || (SELECT string_agg(i.code || '|' || i.name, '|') FROM ic i WHERE i.code <> s.ic) || ')\M' END AS reject + FROM staff s + LOOP + PERFORM pg_temp.kg_link_org('NIH program staff -> institute', r.rid, r.label, r.org_rid, r.org_label, + r.spell, r.reject, r.evidence); + END LOOP; +END +$do$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [people-07] Affiliate 15 members with the existing organization node their institution names +-- Each has no roster row, no organization link and no working group, so the node is isolated. The +-- institution is in the repo: the person's own onboarding-form answer (as seeded by seed-consortium +-- or backfilled by 20260807150000/160000/170000), the 2026-09-08 workshop seating plan, or the SfN +-- pages. The org is matched by its spine id (= KG node id) and exported name. Each line lists the +-- spellings of that one organization: a row whose own institution text is not one of them ('Florida +-- State University' for the University of Florida, 'SUNY Downstate' for Stony Brook) contradicts +-- the evidence and is skipped, as is a row that already has an organization (kg_link_org). +-- Jongwoon Kim is not here: his sources name NYU Langone and Columbia, a curator's call (people-09). +CREATE OR REPLACE FUNCTION pg_temp.kg_b_people_07() RETURNS void LANGUAGE plpgsql AS +$do$ +DECLARE r record; +BEGIN + PERFORM public.set_actor('migration:link_isolated_nodes'); + PERFORM public.set_source_class('curator_fill'); + FOR r IN + SELECT * FROM (VALUES + ('ea2dc7bf-af90-460d-9823-45e9407b6bb8'::uuid, 'David Ostry', 'e5044d9f-fe07-4a69-a9c3-7aecc245b941'::uuid, 'YALE UNIVERSITY', + 'yale', NULL, + 'form: Yale Child Study Center, 20260807150000:145, seed-consortium/index.ts:550; normalized Yale University, 20260807160000:91'), + ('e631bc65-b164-4090-b442-3dacddd2707a'::uuid, 'Gaurav Patel', '9f75488b-59d0-4d50-b7db-869f26066743'::uuid, 'COLUMBIA UNIVERSITY HEALTH SCIENCES', + 'columbia univ(ersity)?|cumc', NULL, + 'form: Columbia University, 20260807150000:87, seed-consortium/index.ts:1675; cumc.columbia.edu address, normalized Columbia University Irving Medical Center, 20260807160000:33'), + ('37453416-6149-4fee-b9b9-a427b800ffe7'::uuid, 'Meaghan Perdue', '4284d761-dde2-4e72-8cb4-d3724f2d4b32'::uuid, 'UNIV OF MASSACHUSETTS MED SCH WORCESTER', + 'umass|university of massachusetts', '(institute of technology|\mmit\M|\m(amherst|boston|lowell|dartmouth)\M)', + 'form: UMass Chan Medical School, 20260807150000:150, seed-consortium/index.ts:622, 20260807160000:96; seating:68'), + ('639e73b5-6a6d-46f1-82a8-b466d7e3bdbb'::uuid, 'Olha Metenko', '29d3cb38-1cbb-43b7-baa6-f413d0a0bdad'::uuid, 'UNIVERSITY OF PENNSYLVANIA', + 'upenn|u\.? ?penn|university of pennsylvania|penn medicine|perelman', NULL, + 'form: UPenn - Dr. Duncan, 20260807170000:33 (Dominique Duncan is a UPenn member)'), + ('1cfe15ec-b6a7-4534-b69d-79bb63b341b6'::uuid, 'Weikang Shi', 'e5044d9f-fe07-4a69-a9c3-7aecc245b941'::uuid, 'YALE UNIVERSITY', + 'yale', NULL, + 'form: Yale, 20260807150000:143, seed-consortium/index.ts:705; 20260807160000:89; seating:118; SFN2025.tsx:261'), + ('0f65886e-44cb-4a8b-88a2-ecb214b0ea99'::uuid, 'Yangjia Li', '9f75488b-59d0-4d50-b7db-869f26066743'::uuid, 'COLUMBIA UNIVERSITY HEALTH SCIENCES', + 'columbia univ(ersity)?|cumc', NULL, + 'form: Columbia University, 20260807150000:86, seed-consortium/index.ts:1702, 20260807160000:32'), + ('aa69dcd5-bd16-40ef-909e-3f2985d66c65'::uuid, 'Deepa Purushothaman', 'e5044d9f-fe07-4a69-a9c3-7aecc245b941'::uuid, 'YALE UNIVERSITY', + 'yale', NULL, + 'Yale University, Postdoc/Grad, mit-workshop-seating.ts:175'), + ('f9cc96dd-52b0-41bc-b687-47a1e4df3e2c'::uuid, 'Dorota Jarecka', '7924e7d9-5b53-4525-95ef-3f5a6b9112a5'::uuid, 'MASSACHUSETTS INSTITUTE OF TECHNOLOGY', + 'mit|massachusetts institute of technology', NULL, + 'MIT, Infra (EMBER), mit-workshop-seating.ts:140'), + ('aa9445fe-736e-4a1e-b8a4-4b709c4a6603'::uuid, 'Luke Bloy', 'f28a2f16-5259-4e2f-9c8e-a5d11d2b5c5f'::uuid, 'CHILDREN''S HOSP OF PHILADELPHIA', + 'chop|children.?s hosp(ital)? of philadelphia', NULL, + 'CHOP, Research Staff, mit-workshop-seating.ts:51'), + ('eff6d625-81ad-4a38-9f8e-93a2ae06c7af'::uuid, 'Nicole Tregoning', '315a0694-ce8d-4010-abca-5438e5f6b560'::uuid, 'JOHNS HOPKINS UNIVERSITY', + 'johns hopkins|jhu', NULL, + 'Johns Hopkins University, mit-workshop-seating.ts:174; JHU Applied Physics Laboratory with Brock Wester (a JHU member), SFN2025.tsx:319'), + ('c520d01a-3746-4f7d-baff-ad1dab70e1b3'::uuid, 'Terry Jernigan', 'd2821755-977a-46a2-a089-169f6e66aeea'::uuid, 'UNIVERSITY OF CALIFORNIA, SAN DIEGO', + 'ucsd|uc san diego|univ(ersity)? of california,? san diego', NULL, + 'UC San Diego, mit-workshop-seating.ts:160'), + ('25a4f79c-6020-4074-b501-0114a205175f'::uuid, 'Thomas Heeps', '622f970b-e529-441d-b5f3-739025a38aa9'::uuid, 'UNIVERSITY OF FLORIDA', + 'uf|ufl|univ(ersity)? of florida', NULL, + 'University of Florida, Undergraduate, mit-workshop-seating.ts:189'), + ('977712f0-0daf-4238-a693-42c96f0874a2'::uuid, 'Ugne Klibaite', '99bc7f7b-2a3d-4e34-99f1-ec08e12133b2'::uuid, 'HARVARD UNIVERSITY', + 'harvard', NULL, + 'Harvard University, mit-workshop-seating.ts:152'), + ('70205506-97d5-4503-bc59-e9a25934e699'::uuid, 'Varun Thvar', '7924e7d9-5b53-4525-95ef-3f5a6b9112a5'::uuid, 'MASSACHUSETTS INSTITUTE OF TECHNOLOGY', + 'mit|massachusetts institute of technology', NULL, + 'MIT, Visiting Undergrad, mit-workshop-seating.ts:193'), + ('87b79b22-888b-40ac-bee6-32a62f07645f'::uuid, 'Yunsoo Kim', 'c04b3bcd-d1db-4b3c-9dc6-a4c97039cad6'::uuid, 'STATE UNIVERSITY NEW YORK STONY BROOK', + '((suny|state university of new york)( at)? )?(stony ?brook|sbu)', NULL, + 'Stony Brook University Hospital, mit-workshop-seating.ts:190 (Sima Mofakham, same hospital at seating:99, is a member of this node)') + ) AS v(rid, label, org_rid, org_label, spell, reject, evidence) + LOOP + PERFORM pg_temp.kg_link_org('member -> organization', r.rid, r.label, r.org_rid, r.org_label, r.spell, r.reject, r.evidence); + END LOOP; +END +$do$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [people-08] Affiliate 3 members with University College London and University of Washington, creating each with its first member +-- No organization node exists for either. kg_link_org creates the organization only after a person +-- passed every check, together with the link, in #512's 20261103130000 shape (also #517 block 5): a +-- resources row of type organization whose metadata points back at the organizations row, and +-- organizations.resource_id set, because the exporter only nodes an organization that has a spine +-- row (kg/bbqs_kg.py:127-131). So no organization is ever created without a member (it would itself +-- be an isolated node). Names are the curated canonical names of 20260807160000:46,49,101; RePORTER +-- imports match organizations with ilike (nih-grants:319, add-project-by-grant:264), so a later +-- 'UNIVERSITY OF WASHINGTON' import reuses this row. An existing row of the same name is reused, and +-- one without a spine row is given one. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_people_08() RETURNS void LANGUAGE plpgsql AS +$do$ +DECLARE r record; +BEGIN + PERFORM public.set_actor('migration:link_isolated_nodes'); + PERFORM public.set_source_class('curator_fill'); + FOR r IN + SELECT * FROM (VALUES + ('1ee83670-fadd-4744-91bd-17ca61944822'::uuid, 'Andrew MacAskill', 'University College London', + 'ucl|university college london', NULL, + 'form: UCL, 20260807150000:155, seed-consortium/index.ts:490; ucl.ac.uk address, 20260807160000:101'), + ('85a49b85-44ff-4f85-a110-c3860bfe6747'::uuid, 'Annette Estes', 'University of Washington', + 'uw|university of washington', '\m(wisconsin|madison|milwaukee)\M', + 'form: University of Washington, 20260807150000:100, seed-consortium/index.ts:1369; uw.edu address, 20260807160000:46'), + ('cbb1fcfa-0a1d-432d-a4bb-a325516b6594'::uuid, 'Tanya St. John', 'University of Washington', + 'uw|university of washington', '\m(wisconsin|madison|milwaukee)\M', + 'form: University of Washington Autism Center, 20260807150000:103, seed-consortium/index.ts:1323; uw.edu address, 20260807160000:49') + ) AS v(rid, label, org_label, spell, reject, evidence) + LOOP + PERFORM pg_temp.kg_link_org('member -> new organization', r.rid, r.label, NULL, r.org_label, + r.spell, r.reject, r.evidence, false, true); + END LOOP; + -- Say so when an organization was not created because nobody could be linked to it. + INSERT INTO kg_fix_report (item, target, outcome, detail) + SELECT 'create organization', v.org_name, 'skipped', + 'not created: none of its people could be linked (their rows above say why), and an organization with no member would be a new isolated node' + FROM (VALUES ('University College London'), ('University of Washington')) AS v(org_name) + WHERE NOT EXISTS (SELECT 1 FROM public.organizations o JOIN public.resources s ON s.id = o.resource_id + WHERE pg_temp.kg_norm(o.name) = pg_temp.kg_norm(v.org_name) AND s.resource_type = 'organization'); +END +$do$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [people-10] Both Walker records side by side (read-only; the merge itself is optional) +-- people-10-merge input. Both Walker records side by side, for the curator's same-person decision. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_people_10_report() RETURNS void LANGUAGE plpgsql AS +$blk$ +BEGIN + INSERT INTO kg_fix_report (item, target, outcome, detail) + SELECT 'Walker records (curator: same person?)', coalesce(i.name, v.label) || ' ' || v.rid, 'report', + CASE WHEN i.id IS NULL THEN 'no investigators row on this spine row' + ELSE format('email domain=%s; institution=%s; role=%s; working_groups=%s; login=%s; roster=%s; created %s', + coalesce(nullif(split_part(coalesce(i.email, ''), '@', 2), ''), '(none)'), + coalesce(quote_literal(nullif(btrim(i.institution), '')), '(empty)'), + coalesce(quote_literal(nullif(btrim(i.role), '')), '(empty)'), + coalesce(i.working_groups::text, '{}'), + CASE WHEN i.user_id IS NULL THEN 'no' ELSE 'yes' END, + coalesce((SELECT string_agg(g.grant_number || ':' || gi.role, ', ') + FROM public.grant_investigators gi JOIN public.grants g ON g.id = gi.grant_id + WHERE gi.investigator_id = i.id), 'none'), + i.created_at::date) + END + FROM (VALUES + ('7a5a1c11-f5f8-4643-b444-71228b1f298a'::uuid, 'Jeffery Walker'), + ('e1424ffb-1cc6-4d9a-932e-464c967a68f9'::uuid, 'Jeffrey Walker') + ) AS v(rid, label) + LEFT JOIN public.investigators i ON i.resource_id = v.rid; +END +$blk$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [notices-01] Copy announcements' (and jobs') organization onto their spine rows +-- The exporter writes part_of_org only from resources.organization_id (kg/bbqs_kg.py:154-155) and +-- reads neither announcements nor jobs. On 11-03 all 12 announcements and all 6 jobs got their +-- organization on the detail row, but only the 6 jobs and the 6 NIH/NSF announcements were copied +-- onto their spine rows (#517, origin/dev 20261103170000:92-125; its block-8 comment says the other +-- 6 were never synced). This copies the other 6 (5 -> BBQS Consortium, 'SFN Annual Meeting 2025' -> +-- Society for Neuroscience), which also de-isolates those two organization nodes. Jobs are included +-- so the two columns cannot stay apart; expect 0 job rows today. +-- Only an EMPTY spine column is filled. A spine row that already names a different organization is +-- reported for a curator (with the UPDATE that would take the detail value), never overwritten. The +-- decision is taken per spine row, over every detail row that points at it: if they name more than +-- one organization, nothing is written for that spine row and all of them are reported. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_notices_01() RETURNS void LANGUAGE plpgsql AS +$do$ +DECLARE + r record; + _n int; + _item constant text := 'sync spine organization'; +BEGIN + PERFORM public.set_actor('migration:link_isolated_nodes'); + PERFORM public.set_source_class('curator_fill'); + FOR r IN + WITH det AS ( + SELECT 'announcement'::text AS kind, a.id AS det_id, a.title, a.resource_id, a.organization_id AS org_id + FROM public.announcements a WHERE a.resource_id IS NOT NULL AND a.organization_id IS NOT NULL + UNION ALL + SELECT 'job', j.id, j.title, j.resource_id, j.organization_id + FROM public.jobs j WHERE j.resource_id IS NOT NULL AND j.organization_id IS NOT NULL + ) + SELECT d.resource_id, s.resource_type::text AS rtype, s.name AS spine_name, + s.organization_id AS spine_org, so.name AS spine_org_name, + array_agg(DISTINCT d.kind) AS kinds, + count(DISTINCT d.org_id) AS n_orgs, + (array_agg(d.org_id))[1] AS org_id, (array_agg(o.name))[1] AS org_name, + (array_agg(o.resource_id))[1] AS org_rid, + string_agg(format('%s %s %L names %s', d.kind, d.det_id, left(d.title, 60), o.name), '; ' + ORDER BY o.name, d.kind, d.det_id) AS listing + FROM det d + JOIN public.resources s ON s.id = d.resource_id + JOIN public.organizations o ON o.id = d.org_id + LEFT JOIN public.organizations so ON so.id = s.organization_id + GROUP BY d.resource_id, s.resource_type, s.name, s.organization_id, so.name + HAVING bool_or(s.organization_id IS DISTINCT FROM d.org_id) + ORDER BY s.name, d.resource_id + LOOP + BEGIN + IF r.n_orgs > 1 THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, r.spine_name, 'skipped', + format('the detail rows of spine row %s name %s different organizations (%s); nothing written, a curator decides which one it takes', + r.resource_id, r.n_orgs, r.listing)); + ELSIF cardinality(r.kinds) > 1 OR r.rtype <> r.kinds[1] THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, r.spine_name, 'skipped', + format('spine row %s is typed %s, its detail row(s) are %s (%s); not touched', + r.resource_id, r.rtype, array_to_string(r.kinds, ' and '), r.listing)); + ELSIF r.spine_org IS NOT NULL THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, r.spine_name, 'skipped', + format('spine row already names %s, the %s row names %s; a curator decides. To take the %s value: ' + 'UPDATE public.resources SET organization_id = %L, updated_at = now() WHERE id = %L;', + r.spine_org_name, r.kinds[1], r.org_name, r.kinds[1], r.org_id, r.resource_id)); + ELSE + UPDATE public.resources SET organization_id = r.org_id, updated_at = now() + WHERE id = r.resource_id AND organization_id IS NULL; + GET DIAGNOSTICS _n = ROW_COUNT; + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, r.spine_name, CASE WHEN _n = 1 THEN 'done' ELSE 'noop' END, + format('%s spine row -> %s%s', r.kinds[1], r.org_name, + CASE WHEN r.org_rid IS NULL + THEN ' (that organization has no spine row, so the export still writes no edge)' + ELSE '' END)); + END IF; + EXCEPTION WHEN OTHERS THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, r.spine_name, 'error', SQLSTATE || ': ' || SQLERRM); + END; + END LOOP; + + -- The 6 nodes this block is for (export UUIDs, and the organization #517 block 7 recorded on 11-03). + -- Report only what is not as expected afterwards: still unlinked (and why), or linked elsewhere. + FOR r IN + SELECT v.*, s.id AS sid, s.organization_id AS sorg, o.resource_id AS sorg_rid, o.name AS sorg_name, + (SELECT count(*) FROM public.announcements a WHERE a.resource_id = v.rid) AS n_ann, + (SELECT count(*) FROM public.announcements a WHERE a.resource_id = v.rid AND a.organization_id IS NOT NULL) AS n_ann_org, + (SELECT count(DISTINCT a.organization_id) FROM public.announcements a WHERE a.resource_id = v.rid) AS n_ann_orgs + FROM (VALUES + ('46841d0e-4d55-4690-81f0-41c33f424bc8'::uuid, 'Canada Impact+ Research Training Awards (CIRTA)', '766331fd-daea-4a31-86c4-589737e533ea'::uuid, 'BBQS Consortium'), + ('00343fc4-d3b9-4b22-8445-dcef0a11a5e4'::uuid, 'Children''s Speech Recognition Challenge — $120K Prize Pool', '766331fd-daea-4a31-86c4-589737e533ea'::uuid, 'BBQS Consortium'), + ('5b87def1-786b-470f-879c-9089ebde049d'::uuid, 'Consortia-Wide Workshop at MIT', '766331fd-daea-4a31-86c4-589737e533ea'::uuid, 'BBQS Consortium'), + ('1b79d65a-57fd-455c-96e7-acc3b3eb6c01'::uuid, 'In the news: AI is helping scientists eavesdrop on Costa Rica''s monkeys', '766331fd-daea-4a31-86c4-589737e533ea'::uuid, 'BBQS Consortium'), + ('42efe7fa-561b-4a00-af58-78b71f9d4b1a'::uuid, 'New BBQS Website Launch', '766331fd-daea-4a31-86c4-589737e533ea'::uuid, 'BBQS Consortium'), + ('3533afc4-be44-460c-bada-ab578b028acb'::uuid, 'SFN Annual Meeting 2025', '00b6e913-54e0-4cb5-bfdb-7c4123de51d6'::uuid, 'Society for Neuroscience') + ) AS v(rid, label, org_rid, org_label) + LEFT JOIN public.resources s ON s.id = v.rid + LEFT JOIN public.organizations o ON o.id = s.organization_id + LOOP + IF r.sid IS NULL THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, r.label, 'report', format('spine row %s no longer exists', r.rid)); + ELSIF r.sorg IS NULL THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, r.label, CASE WHEN r.n_ann_orgs > 1 THEN 'report' ELSE 'skipped' END, + CASE WHEN r.n_ann = 0 THEN 'no announcements row has resource_id = this node; nothing to copy' + WHEN r.n_ann_org = 0 THEN format('its announcements row has organization_id NULL: the 11-03 link (#517 block 7: %s) is missing live; not guessed here', r.org_label) + WHEN r.n_ann_orgs > 1 THEN format('its %s announcements rows name %s organizations; nothing written (see the row above), a curator decides', r.n_ann, r.n_ann_orgs) + ELSE 'still unlinked; see the rows above' END); + ELSIF r.sorg_rid IS NULL THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, r.label, 'skipped', + format('linked to %s, which has no spine row, so the export writes no edge', r.sorg_name)); + ELSIF r.sorg_rid IS DISTINCT FROM r.org_rid THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, r.label, 'report', + format('linked to %s, not the %s #517 block 7 recorded (still de-isolated)', r.sorg_name, r.org_label)); + END IF; + END LOOP; +END +$do$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [notices-02] Event 'BBQS MIT Workshop 2026' -> BBQS Consortium +-- The only Event is a hand-made spine row (name + description, no events table), so its only +-- possible link today is resources.organization_id, which the exporter writes as part_of_org +-- (kg/bbqs_kg.py:154-155). Its own description reads 'Annual BBQS consortium workshop, MIT, +-- Cambridge MA', and the site calls it the '2nd Annual ... Workshop at MIT' held for 'BBQS +-- consortium members and affiliates' (src/pages/MITWorkshop2026.tsx:102, :180, :223): the +-- consortium is the organizer, MIT the venue (the schema keeps that in Event.venue). Set only +-- where the column is empty. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_notices_02() RETURNS void LANGUAGE plpgsql AS +$do$ +DECLARE + _rid constant uuid := 'eac8b2aa-4353-4d9a-af21-601294a8ef4a'; + _label constant text := 'BBQS MIT Workshop 2026'; + _item constant text := 'event organization'; + _type text; + _name text; + _cur uuid; + _org uuid; + _n int; +BEGIN + PERFORM public.set_actor('migration:link_isolated_nodes'); + PERFORM public.set_source_class('curator_fill'); + SELECT resource_type::text, name, organization_id INTO _type, _name, _cur + FROM public.resources WHERE id = _rid; + IF NOT FOUND THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _label, 'skipped', format('spine row %s no longer exists', _rid)); + RETURN; + END IF; + IF _type <> 'event' OR pg_temp.kg_norm(_name) <> pg_temp.kg_norm(_label) THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _label, 'skipped', format('spine row %s is now %s %L; not touched', _rid, _type, _name)); + RETURN; + END IF; + _org := pg_temp.kg_org_of('766331fd-daea-4a31-86c4-589737e533ea', 'BBQS Consortium'); + IF _org IS NULL THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _label, 'skipped', 'organization BBQS Consortium (spine 766331fd-...) not found with an organizations row on a spine row'); + RETURN; + END IF; + IF _cur IS NOT NULL THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _label, CASE WHEN _cur = _org THEN 'noop' ELSE 'skipped' END, + CASE WHEN _cur = _org THEN 'already BBQS Consortium' + ELSE format('already linked to %s; a curator chose it, left as is', + (SELECT name FROM public.organizations WHERE id = _cur)) END); + RETURN; + END IF; + UPDATE public.resources SET organization_id = _org, updated_at = now() + WHERE id = _rid AND organization_id IS NULL; + GET DIAGNOSTICS _n = ROW_COUNT; + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _label, CASE WHEN _n = 1 THEN 'done' ELSE 'noop' END, 'event -> BBQS Consortium (organizer; MIT is the venue)'); +EXCEPTION WHEN OTHERS THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, _label, 'error', SQLSTATE || ': ' || SQLERRM); +END +$do$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [notices-04] Each funding call's issuer, from its own FON -> resources.organization_id +-- All 14 calls are isolated: the exporter writes literals only for them (kg/bbqs_kg.py:339-350) and +-- no spine row names an organization. FundingOpportunity already inherits part_of_org (Entity slot, +-- kg/bbqs.linkml.yaml:79, :470 'resources.organization_id'), which the exporter writes for every +-- spine row (kg/bbqs_kg.py:154-155), so the issuer goes there with no code change. +-- The issuer is read off the record itself (Principle III): an NIH Funding Opportunity Number names +-- the issuing component in its second field (RFA-NS-... NINDS, RFA-DA-... NIDA, NOT-MH-... NIMH, +-- RFA-RM-... the Common Fund in the NIH Office of the Director; the PRIMED-AI calls' notes give +-- ODPRIMED-AI@od.nih.gov); 'NSF 26-526' is NSF's own solicitation number (nsf.gov url); the Simons +-- call's title says '(Simons Foundation)' and its url is simonsfoundation.org. Every target +-- organization is already a node: #512's 20261103130000 created them, each with its spine row. +-- Only an EMPTY column is filled. The superseded forecast RFA-NS-26-011 is NOT linked: notices-03 +-- merges it away, and if notices-03 skipped the merge it stays isolated on purpose, so the duplicate +-- keeps showing up (isolated, and flagged as a duplicate) until a curator merges it; a report row +-- says so. Whether the issuer is also among the call's own participating_orgs / +-- funding_opportunity_orgs is reported, never required (the FON is the authority). +-- Known overlap with PR #512: once #512's exporter half merges it writes funding_org from +-- funding_opportunity_orgs, which includes the issuer, so a call will carry part_of_org (from here) +-- and funding_org to the same organization. #512's exporter should skip a funding_org edge where +-- part_of_org already names that organization. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_notices_04() RETURNS void LANGUAGE plpgsql AS +$do$ +DECLARE + r record; + _item constant text := 'funding call issuer'; + _type text; + _cur uuid; + _fo public.funding_opportunities%ROWTYPE; + _org uuid; + _n int; + _xref text; + _foo boolean := to_regclass('public.funding_opportunity_orgs') IS NOT NULL; + _hit boolean; + _has_fo boolean; +BEGIN + PERFORM public.set_actor('migration:link_isolated_nodes'); + PERFORM public.set_source_class('curator_fill'); + FOR r IN + SELECT * FROM (VALUES + ('9fe36a51-d470-42f8-baa1-0c7aa68a9dea'::uuid, 'RFA-NS-27-002', 'NINDS', '69aa906c-2a0c-4524-8958-4e1009f96060'::uuid, 'National Institute of Neurological Disorders and Stroke'), + ('3fb868da-b941-439e-a81e-927a543defd3'::uuid, 'RFA-NS-25-018', 'NINDS', '69aa906c-2a0c-4524-8958-4e1009f96060'::uuid, 'National Institute of Neurological Disorders and Stroke'), + ('07448ab8-2717-4b6e-83e0-9abf492240e5'::uuid, 'RFA-NS-25-016', 'NINDS', '69aa906c-2a0c-4524-8958-4e1009f96060'::uuid, 'National Institute of Neurological Disorders and Stroke'), + ('912f67fc-5862-47a2-b6f4-891fcd98f244'::uuid, 'RFA-NS-27-001', 'NINDS', '69aa906c-2a0c-4524-8958-4e1009f96060'::uuid, 'National Institute of Neurological Disorders and Stroke'), + ('8b9d5dda-2b99-4e1c-ba27-968f74ef8b77'::uuid, 'RFA-RM-27-011', 'NIH OD (Common Fund)', '2548a017-fd14-4934-9762-b30d7071821a'::uuid, 'NIH Office of the Director (Common Fund)'), + ('09e37e7e-a6a7-409a-b532-9f000647f007'::uuid, 'RFA-RM-27-012', 'NIH OD (Common Fund)', '2548a017-fd14-4934-9762-b30d7071821a'::uuid, 'NIH Office of the Director (Common Fund)'), + ('ac01b838-9803-4a39-8adf-6b9ac9883535'::uuid, 'RFA-RM-27-013', 'NIH OD (Common Fund)', '2548a017-fd14-4934-9762-b30d7071821a'::uuid, 'NIH Office of the Director (Common Fund)'), + ('9db8fc93-1890-4237-b758-d5f94c5e6306'::uuid, 'RFA-RM-27-014', 'NIH OD (Common Fund)', '2548a017-fd14-4934-9762-b30d7071821a'::uuid, 'NIH Office of the Director (Common Fund)'), + ('b76af5cd-30c7-4f75-a127-d4e8a669cdd6'::uuid, 'RFA-RM-27-015', 'NIH OD (Common Fund)', '2548a017-fd14-4934-9762-b30d7071821a'::uuid, 'NIH Office of the Director (Common Fund)'), + ('67d25d9e-afa4-4571-aa3c-3c0d4aee3388'::uuid, 'NOT-MH-25-155', 'NIMH', '28609b98-6f97-4a46-b875-9f5084f1c7cd'::uuid, 'National Institute of Mental Health'), + ('d3423658-1147-421f-a6f8-f31067133351'::uuid, 'RFA-DA-27-004', 'NIDA', '32f761ce-6857-451c-9eb7-fc5b8b221449'::uuid, 'National Institute on Drug Abuse'), + ('20adc9fb-c389-48a7-85ec-931501f0ce13'::uuid, 'SIMONS-EMPIRE-AI-2026', 'Simons Foundation', '1a88610e-c3bc-41b8-a97e-36698d0b0c28'::uuid, 'Simons Foundation'), + ('a8990457-e9da-49eb-9a0c-5b2af1a4ca61'::uuid, 'NSF 26-526', 'NSF', '62826284-8258-4f21-af3e-64fc755ef2b2'::uuid, 'National Science Foundation') + ) AS v(rid, fon, acronym, org_rid, org_label) + LOOP + BEGIN + SELECT resource_type::text, organization_id INTO _type, _cur FROM public.resources WHERE id = r.rid; + IF NOT FOUND THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, r.fon, 'skipped', format('spine row %s no longer exists', r.rid)); + CONTINUE; + END IF; + SELECT * INTO _fo FROM public.funding_opportunities WHERE resource_id = r.rid AND fon = r.fon; + _has_fo := FOUND; + IF _type <> 'funding' OR NOT _has_fo THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, r.fon, 'skipped', + format('spine row %s is typed %s and %s; not touched', r.rid, _type, + CASE WHEN _has_fo THEN 'has its detail row' ELSE 'no funding_opportunities row with this fon points at it' END)); + CONTINUE; + END IF; + _org := pg_temp.kg_org_of(r.org_rid, r.org_label); + IF _org IS NULL THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, r.fon, 'skipped', + format('organization %s (spine %s) not found with an organizations row on a spine row', r.org_label, r.org_rid)); + CONTINUE; + END IF; + IF _cur IS NOT NULL THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, r.fon, CASE WHEN _cur = _org THEN 'noop' ELSE 'skipped' END, + CASE WHEN _cur = _org THEN 'already ' || r.org_label + ELSE format('already linked to %s; left as is (the FON says %s)', + (SELECT name FROM public.organizations WHERE id = _cur), r.acronym) END); + CONTINUE; + END IF; + + -- Cross-check against the call's own funder list (report only). + _xref := CASE WHEN r.acronym = ANY (coalesce(_fo.participating_orgs, '{}')) THEN 'listed in participating_orgs' + WHEN cardinality(coalesce(_fo.participating_orgs, '{}')) = 0 THEN 'participating_orgs is empty' + ELSE format('NOT in participating_orgs %s', _fo.participating_orgs) END; + IF _foo THEN + EXECUTE 'SELECT EXISTS (SELECT 1 FROM public.funding_opportunity_orgs WHERE funding_opportunity_id = $1 AND organization_id = $2)' + INTO _hit USING _fo.id, _org; + _xref := _xref || CASE WHEN _hit THEN '; in funding_opportunity_orgs' ELSE '; not in funding_opportunity_orgs' END; + END IF; + + UPDATE public.resources SET organization_id = _org, updated_at = now() + WHERE id = r.rid AND organization_id IS NULL; + GET DIAGNOSTICS _n = ROW_COUNT; + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, r.fon, CASE WHEN _n = 1 THEN 'done' ELSE 'noop' END, + format('call -> %s (issuer by FON); %s', r.org_label, _xref)); + EXCEPTION WHEN OTHERS THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, r.fon, 'error', SQLSTATE || ': ' || SQLERRM); + END; + END LOOP; + + -- The superseded forecast: gone once notices-03 merged it; if it is still here, it is left + -- without an issuer on purpose (see above). + INSERT INTO kg_fix_report (item, target, outcome, detail) + SELECT _item, 'RFA-NS-26-011', + CASE WHEN s.id IS NULL OR s.organization_id IS NOT NULL THEN 'noop' ELSE 'skipped' END, + CASE WHEN s.id IS NULL THEN 'gone: merged into RFA-NS-27-002 by notices-03 (or deleted earlier)' + WHEN s.organization_id IS NOT NULL + THEN format('the superseded forecast is still here, and someone linked it to %s; left as is, still a duplicate to merge', + (SELECT o.name FROM public.organizations o WHERE o.id = s.organization_id)) + ELSE 'the superseded forecast is still here (notices-03 did not merge it; see its row): left without an issuer on purpose, so it stays isolated and flagged as a duplicate of RFA-NS-27-002 until a curator merges it' END + FROM (SELECT 1) AS one + LEFT JOIN public.resources s ON s.id = 'e0042c46-59de-40f6-b53d-8e565cc27a45'; + + -- Any other call in the graph that still has no organization (one added after the 11-04 export, + -- say): reported for a curator, never guessed. + FOR r IN + SELECT s.id, s.name, f.fon + FROM public.resources s LEFT JOIN public.funding_opportunities f ON f.resource_id = s.id + WHERE s.resource_type::text = 'funding' AND s.organization_id IS NULL + AND s.id NOT IN ('9fe36a51-d470-42f8-baa1-0c7aa68a9dea', '3fb868da-b941-439e-a81e-927a543defd3', + '07448ab8-2717-4b6e-83e0-9abf492240e5', '912f67fc-5862-47a2-b6f4-891fcd98f244', + '8b9d5dda-2b99-4e1c-ba27-968f74ef8b77', '09e37e7e-a6a7-409a-b532-9f000647f007', + 'ac01b838-9803-4a39-8adf-6b9ac9883535', '9db8fc93-1890-4237-b758-d5f94c5e6306', + 'b76af5cd-30c7-4f75-a127-d4e8a669cdd6', '67d25d9e-afa4-4571-aa3c-3c0d4aee3388', + 'd3423658-1147-421f-a6f8-f31067133351', '20adc9fb-c389-48a7-85ec-931501f0ce13', + 'a8990457-e9da-49eb-9a0c-5b2af1a4ca61', 'e0042c46-59de-40f6-b53d-8e565cc27a45') + LOOP + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, coalesce(r.fon, r.name), 'report', + format('funding spine row %s (not in the 11-04 export) has no organization; a curator sets its issuer', r.id)); + END LOOP; +END +$do$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [tools-02] Lightning Pose (3ba48c59) -> COLUMBIA UNIVERSITY HEALTH SCIENCES +-- The exporter already writes resources.organization_id as part_of_org for every class +-- (kg/bbqs_kg.py:154-155), so filling it links the node on the next export. Only where empty; only +-- where a repo or data statement about the resource itself names the organization. Organizations +-- implied only by a URL host or a GitHub account are block tools-07 (commented out). +-- tools-02. Lightning Pose -> COLUMBIA UNIVERSITY HEALTH SCIENCES. The row's own description: "Developed +-- by Liam Paninski's lab at Columbia University Zuckerman Institute" (both Lightning Pose rows, every +-- export since 2026-09-21). 9f75488b is the only Columbia node; people-07 links 'Columbia University' +-- members to it too. Runs after tools-01, on the surviving row; re-checks the description at run time. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_tools_02() RETURNS void LANGUAGE plpgsql AS +$blk$ +BEGIN + PERFORM pg_temp.kg_tools_set_org( + 'org: Lightning Pose', '3ba48c59-bb79-44ef-8569-ca644775d73a', 'Lightning Pose', 'software', + '9f75488b-59d0-4d50-b7db-869f26066743', 'COLUMBIA UNIVERSITY HEALTH SCIENCES', + (SELECT r.description ILIKE '%Columbia University%' FROM public.resources r + WHERE r.id = '3ba48c59-bb79-44ef-8569-ca644775d73a'), + 'its own description: "Developed by Liam Paninski''s lab at Columbia University Zuckerman Institute"'); +END +$blk$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [datasets-D06] Link the EMBER collections 000469, 000470, 000471, 000474 to R24MH136632 (roster evidence) +-- Pose Zoo / Pozu (bounding boxes, labels, transcoding) and BBQS Snippets: consortium-wide +-- collections on EMBER's archive with no award on their DANDI record, so neither the sync nor the +-- exporter links them. The curator route #517 block 10 used for 000207 and 000598. Principle III: +-- the link is written only when the dandiset's own DANDI record names someone on R24MH136632's +-- roster (contact_name, or a Person contributor by ORCID or name). Otherwise the call skips with +-- the contact's name in the report, and datasets-O2b links it on a curator's yes. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_datasets_d06() RETURNS void LANGUAGE plpgsql AS +$blk$ +BEGIN + PERFORM pg_temp.kg_ds_link('link EMBER collection', '000469', 'b5f65a35-ad99-4779-ab8c-2f211803ca2e', 'bounding box', 'R24MH136632', 'roster', 'EMBER''s own consortium collection on EMBER-DANDI (#444 lists it under R24MH136632 EMBER); no award on the DANDI record.'); -- Pose Zoo: Bounding Box (mirror: Pozu: Bounding Box) + PERFORM pg_temp.kg_ds_link('link EMBER collection', '000470', '0c4561e1-221b-4444-ac15-6c2220beb292', '(pozu|pose zoo).*label', 'R24MH136632', 'roster', 'EMBER''s own consortium collection on EMBER-DANDI (#444 lists it under R24MH136632 EMBER); no award on the DANDI record.'); -- Pozu: Labels + PERFORM pg_temp.kg_ds_link('link EMBER collection', '000471', '1e988b46-bfe4-4e41-843e-b6b0ae88efcb', '(pozu|pose zoo).*transcod', 'R24MH136632', 'roster', 'EMBER''s own consortium collection on EMBER-DANDI (#444 lists it under R24MH136632 EMBER); no award on the DANDI record.'); -- Pozu: Transcoding + PERFORM pg_temp.kg_ds_link('link EMBER collection', '000474', '1cabb668-d89d-4bbb-a9c2-ea79f7a93708', 'bbqs snippets', 'R24MH136632', 'roster', 'EMBER''s own consortium collection on EMBER-DANDI (#444 lists it under R24MH136632 EMBER); no award on the DANDI record.'); -- BBQS Snippets +END +$blk$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [datasets-D07] Link 'Four-choice reversal digging task' (000607) to R34DA062119 +-- The real dataset of the IDP/ARC platform whose 26 test copies D02 hides: "An Aggregate Dandiset +-- for Four-choice reversal digging task in MAABCD". R34DA062119 is the Adversity and Resilience +-- Consortium (keyword 'International Development Project'); #506 calls 000607 the Wilbrecht-lab +-- dataset; the mirror's contact_name is 'Wilbrecht, Linda' (roundtrip.json row order), and Linda +-- Wilbrecht is R34DA062119's contact_pi on the RePORTER roster. Guarded on the live contact_name. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_datasets_d07() RETURNS void LANGUAGE plpgsql AS +$blk$ +BEGIN + PERFORM pg_temp.kg_ds_link('link 000607 to ARC', '000607', '44376171-f0d7-4e91-9c91-6558f6253fe3', '^\s*four-choice reversal digging task(?!.*idp)', 'R34DA062119', 'contact:wilbrecht', + 'Aggregate dataset of R34DA062119''s IDP/ARC four-choice digging task (#506: the real Wilbrecht-lab dataset; its 26 test copies are hidden).'); +END +$blk$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [datasets-D08] Link datasets whose own DANDI record names a BBQS award the sync's parser dropped +-- ember-dandiset-sync keeps an awardNumber only if /\d?([A-Z]\d{2}[A-Z]{2}\d{6})/ matches it after +-- removing whitespace (index.ts:13-20, 113-117), and silently drops 'DA059723', 'R34-DA059723', +-- 'MH-136632' and the like. This pass reads raw->'contributor'[*].awardNumber (the record of +-- record, Principle III), folds it to upper-case letters and digits, and links the dataset to the +-- BBQS grant whose institute code + serial (e.g. DA059723) it contains. Only datasets with a node +-- (resource_id), not hidden, and with no grant_dandisets row yet. match_source 'curator', not +-- 'award_number': the sync deletes its own 'award_number' rows whenever it parses any award on the +-- record (index.ts:183-189), which would erase this link. matched_award records which grant matched. +-- Offline it is unknown whether any row qualifies (roundtrip.json shows raw but not its awards). +CREATE OR REPLACE FUNCTION pg_temp.kg_b_datasets_d08() RETURNS void LANGUAGE plpgsql AS +$do$ +DECLARE + _d record; + _g record; + _txt text; + _gd uuid; + _n int := 0; +BEGIN + PERFORM public.set_actor('migration:link_isolated_nodes'); + PERFORM public.set_source_class('curator_fill'); + FOR _d IN + SELECT d.id, d.dandiset_id, d.name, d.raw, d.award_numbers + FROM public.dandisets d + WHERE d.instance = 'ember' AND NOT coalesce(d.hidden, false) AND d.resource_id IS NOT NULL + AND NOT EXISTS (SELECT 1 FROM public.grant_dandisets gd WHERE gd.dandiset_id = d.id) + ORDER BY d.dandiset_id + LOOP + SELECT string_agg(regexp_replace(upper(c ->> 'awardNumber'), '[^A-Z0-9]', '', 'g'), ' ') + INTO _txt + FROM jsonb_array_elements(CASE WHEN jsonb_typeof(_d.raw -> 'contributor') = 'array' + THEN _d.raw -> 'contributor' ELSE '[]'::jsonb END) AS c + WHERE nullif(btrim(c ->> 'awardNumber'), '') IS NOT NULL; + CONTINUE WHEN _txt IS NULL; + + FOR _g IN + SELECT g.id, g.grant_number + FROM public.grants g + WHERE g.resource_id IS NOT NULL + AND g.grant_number ~ '^[A-Z][0-9A-Z]{2}[A-Z]{2}[0-9]{6}$' + AND position(substring(g.grant_number FROM 4) IN _txt) > 0 + ORDER BY g.grant_number + LOOP + BEGIN + INSERT INTO public.grant_dandisets (grant_id, dandiset_id, match_source, matched_award) + VALUES (_g.id, _d.id, 'curator', _g.grant_number) + ON CONFLICT (grant_id, dandiset_id) DO NOTHING + RETURNING id INTO _gd; + IF _gd IS NOT NULL THEN + PERFORM public.record_field_provenance( + 'grant_dandisets', _gd, 'matched_award', 'curator_fill', 'award_text_on_dandi_record', + NULL, 'EMBER-DANDI ' || _d.dandiset_id || ' raw.contributor[].awardNumber', _g.grant_number, + format('The DANDI record names award text %L, which contains %s (%s); ember-dandiset-sync''s parser drops that spelling.', + _txt, substring(_g.grant_number FROM 4), _g.grant_number)); + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES ('award text on the DANDI record', _d.dandiset_id || ' ' || _d.name || ' -> ' || _g.grant_number, + 'done', format('linked: award text %L names %s', _txt, _g.grant_number)); + _n := _n + 1; + END IF; + EXCEPTION WHEN OTHERS THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES ('award text on the DANDI record', _d.dandiset_id || ' -> ' || _g.grant_number, 'error', SQLSTATE || ': ' || SQLERRM); + END; + END LOOP; + END LOOP; + IF _n = 0 THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES ('award text on the DANDI record', 'all unlinked dandisets', 'noop', + 'no unlinked dataset''s DANDI record names a BBQS award in a spelling the sync dropped'); + END IF; +END +$do$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [tools-04] Create public.resource_links (audited, anon-readable, typed by LinkML slot) +-- Every KG node is a resources row, so one table can carry the links the schema declares but no +-- table stores: MLModel trained_on Dataset, Benchmark evaluates SoftwareTool/MLModel, any Entity +-- was_attributed_to an Agent, Project produced an artifact. predicate is the kg/bbqs.linkml.yaml slot +-- name, which is also the predicate the exporter writes (bbqs:<slot>, as CQ31 queries it): +-- trained_on MLModel.slots (:270), range Dataset (:562) -> ml_model to dataset|benchmark +-- evaluates Benchmark.slots (:255), range Entity (:556) -> benchmark to software|tool|ml_model +-- was_attributed_to Entity.slots (:85), range Agent (:477) -> any node to investigator|organization|device_manufacturer +-- produced Project.slots (:210), range Entity (:512) -> grant to an artifact type +-- (Benchmark is_a Dataset, :251. The Agents are Person and Organization, :91-92: Investigator, +-- ResearchOrganization and DeviceManufacturer mix them in, :103-155.) A CHECK cannot read the +-- other rows, so a trigger enforces each slot's domain and range. Readable by anon (the exporter +-- reads it with the anon key); written by admins and the service role, like #512's link tables. +-- Audited the way 20261106120000 (#512) audits its link tables (trg_audit_<table>, which the +-- provenance event trigger does NOT attach by itself); RLS is enabled because Supabase's default +-- privileges grant a new table to anon and authenticated. Each piece is created only if missing, so a +-- re-run changes nothing. A table of this name with another shape stops the whole run (error row: +-- nothing is applied). The rows become graph edges only once kg/bbqs_kg.py reads the table (tools-11). +CREATE OR REPLACE FUNCTION pg_temp.kg_b_tools_04() RETURNS void LANGUAGE plpgsql AS +$blk$ +DECLARE + _existed boolean := to_regclass('public.resource_links') IS NOT NULL; + _did text[] := '{}'; + _missing text; + _n int; +BEGIN + IF NOT _existed THEN + CREATE TABLE public.resource_links ( + id uuid NOT NULL DEFAULT gen_random_uuid() PRIMARY KEY, + subject_id uuid NOT NULL REFERENCES public.resources(id) ON DELETE CASCADE, + predicate text NOT NULL, + object_id uuid NOT NULL REFERENCES public.resources(id) ON DELETE CASCADE, + basis text NOT NULL REFERENCES public.source_classes(code), + evidence text NOT NULL, + created_at timestamptz NOT NULL DEFAULT now(), + updated_at timestamptz NOT NULL DEFAULT now(), + CONSTRAINT resource_links_predicate_check + CHECK (predicate IN ('trained_on', 'evaluates', 'was_attributed_to', 'produced')), + CONSTRAINT resource_links_not_self CHECK (subject_id <> object_id), + CONSTRAINT resource_links_evidence_check CHECK (btrim(evidence) <> ''), + CONSTRAINT resource_links_unique UNIQUE (subject_id, predicate, object_id) + ); + COMMENT ON TABLE public.resource_links IS + 'Curated links between two resources (KG nodes) that no column holds. predicate = a kg/bbqs.linkml.yaml slot; the exporter writes (subject, bbqs:<predicate>, object). Only evidenced links: evidence cites the record or repo statement.'; + COMMENT ON COLUMN public.resource_links.basis IS + 'Grade of the evidence, in the provenance vocabulary (source_classes.code), e.g. curator_fill for a curator''s reading of the repo or data.'; + COMMENT ON COLUMN public.resource_links.evidence IS + 'Where the link is stated: file:line, record id, or the person who confirmed it.'; + GRANT SELECT ON public.resource_links TO anon, authenticated; + GRANT ALL ON public.resource_links TO service_role; + _did := _did || 'table'::text; + END IF; + + -- A table of this name that some other change created with a different shape would make every + -- statement below misbehave: stop (the runner then rolls the whole script back). + SELECT string_agg(c, ', ') INTO _missing + FROM unnest(ARRAY['id', 'subject_id', 'predicate', 'object_id', 'basis', 'evidence', 'created_at', 'updated_at']) AS c + WHERE NOT EXISTS (SELECT 1 FROM pg_attribute a + WHERE a.attrelid = 'public.resource_links'::regclass AND a.attname = c + AND a.attnum > 0 AND NOT a.attisdropped); + IF _missing IS NOT NULL THEN + RAISE EXCEPTION 'public.resource_links already exists without column(s) %; nothing in this script was applied', _missing; + END IF; + IF NOT EXISTS (SELECT 1 FROM pg_index i + WHERE i.indrelid = 'public.resource_links'::regclass AND i.indisunique + AND (SELECT array_agg(a.attname::text ORDER BY a.attname) FROM pg_attribute a + WHERE a.attrelid = i.indrelid AND a.attnum = ANY (i.indkey)) + = ARRAY['object_id', 'predicate', 'subject_id']) THEN + RAISE EXCEPTION 'public.resource_links already exists without a unique key on (subject_id, predicate, object_id); nothing in this script was applied'; + END IF; + + IF to_regclass('public.resource_links_object_id_idx') IS NULL THEN + CREATE INDEX resource_links_object_id_idx ON public.resource_links (object_id); + _did := _did || 'index'::text; + END IF; + + -- Domain and range per predicate, from the LinkML slots above. + IF to_regprocedure('public.resource_links_check_types()') IS NULL THEN + CREATE FUNCTION public.resource_links_check_types() + RETURNS trigger LANGUAGE plpgsql SECURITY INVOKER SET search_path = public AS + $fn$ + DECLARE _s text; _o text; + BEGIN + SELECT r.resource_type::text INTO _s FROM public.resources r WHERE r.id = NEW.subject_id; + SELECT r.resource_type::text INTO _o FROM public.resources r WHERE r.id = NEW.object_id; + IF NOT coalesce(CASE NEW.predicate + WHEN 'trained_on' THEN _s = 'ml_model' AND _o IN ('dataset', 'benchmark') + WHEN 'evaluates' THEN _s = 'benchmark' AND _o IN ('software', 'tool', 'ml_model') + WHEN 'was_attributed_to' THEN _s IS NOT NULL AND _o IN ('investigator', 'organization', 'device_manufacturer') + WHEN 'produced' THEN _s = 'grant' + AND _o IN ('publication', 'dataset', 'software', 'tool', 'ml_model', 'protocol', 'benchmark') + END, false) THEN + RAISE EXCEPTION 'resource_links: % cannot link a % to a %', + NEW.predicate, coalesce(_s, '(missing row)'), coalesce(_o, '(missing row)') + USING ERRCODE = 'check_violation', + HINT = 'Each predicate is a kg/bbqs.linkml.yaml slot with a fixed domain and range; see the table comment.'; + END IF; + RETURN NEW; + END + $fn$; + _did := _did || 'resource_links_check_types()'::text; + END IF; + IF NOT EXISTS (SELECT 1 FROM pg_trigger WHERE tgrelid = 'public.resource_links'::regclass + AND tgname = 'trg_resource_links_check_types' AND NOT tgisinternal) THEN + CREATE TRIGGER trg_resource_links_check_types BEFORE INSERT OR UPDATE ON public.resource_links + FOR EACH ROW EXECUTE FUNCTION public.resource_links_check_types(); + _did := _did || 'trg_resource_links_check_types'::text; + END IF; + IF NOT EXISTS (SELECT 1 FROM pg_trigger WHERE tgrelid = 'public.resource_links'::regclass + AND tgname = 'update_resource_links_updated_at' AND NOT tgisinternal) THEN + CREATE TRIGGER update_resource_links_updated_at BEFORE UPDATE ON public.resource_links + FOR EACH ROW EXECUTE FUNCTION public.update_updated_at_column(); + _did := _did || 'update_resource_links_updated_at'::text; + END IF; + -- Principle X: the same audit trigger every audited table uses (20260810160000, 20261106120000). + IF NOT EXISTS (SELECT 1 FROM pg_trigger WHERE tgrelid = 'public.resource_links'::regclass + AND tgname = 'trg_audit_resource_links' AND NOT tgisinternal) THEN + CREATE TRIGGER trg_audit_resource_links AFTER INSERT OR UPDATE OR DELETE ON public.resource_links + FOR EACH ROW EXECUTE FUNCTION public.log_data_change(); + _did := _did || 'trg_audit_resource_links'::text; + END IF; + IF NOT (SELECT c.relrowsecurity FROM pg_class c WHERE c.oid = 'public.resource_links'::regclass) THEN + ALTER TABLE public.resource_links ENABLE ROW LEVEL SECURITY; + _did := _did || 'RLS'::text; + END IF; + IF NOT EXISTS (SELECT 1 FROM pg_policy WHERE polrelid = 'public.resource_links'::regclass + AND polname = 'anyone may read resource links') THEN + CREATE POLICY "anyone may read resource links" ON public.resource_links FOR SELECT USING (true); + _did := _did || 'read policy'::text; + END IF; + + -- The provenance guard, now that the table carries a uuid id (20261106120000:29). Returns how many + -- triggers it newly attached anywhere; 0 is fine (the ddl event trigger already did it). + SELECT public.provenance_attach_all() INTO _n; + IF coalesce(_n, 0) > 0 THEN + _did := _did || format('%s provenance trigger(s)', _n); + END IF; + -- Let PostgREST (the exporter's anon read) see the new table now rather than at its next reload. + IF cardinality(_did) > 0 THEN + PERFORM pg_notify('pgrst', 'reload schema'); + END IF; + + INSERT INTO kg_fix_report (item, target, outcome, detail) + SELECT 'resource_links table', 'public.resource_links', + CASE WHEN cardinality(_did) > 0 THEN 'done' ELSE 'noop' END, + format('%s; triggers: %s; policies: %s', + CASE WHEN cardinality(_did) > 0 THEN 'created: ' || array_to_string(_did, ', ') ELSE 'already present' END, + (SELECT string_agg(t.tgname, ', ' ORDER BY t.tgname) FROM pg_trigger t + WHERE t.tgrelid = 'public.resource_links'::regclass AND NOT t.tgisinternal), + (SELECT string_agg(p.polname, ', ' ORDER BY p.polname) FROM pg_policy p + WHERE p.polrelid = 'public.resource_links'::regclass)); +END +$blk$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [tools-05] Record the two evidenced links in resource_links +-- Each call re-checks, against the live rows, that both ends are still the exported nodes and that +-- the evidence still holds. None of these is an edge until the exporter reads resource_links. +-- Links the repo does not state are optional, never applied here: DLC Model Zoo trained_on the two +-- SuperAnimal sets (tools-08: which node holds the SuperAnimal models is a curator's answer) and +-- Psych-DS was_attributed_to Melissa Kline Struhl (tools-03, with Psych-DS's organization). +CREATE OR REPLACE FUNCTION pg_temp.kg_b_tools_05() RETURNS void LANGUAGE plpgsql AS +$blk$ +BEGIN + -- tools-05. DLC Leaderboard evaluates DeepLabCut: "Performance comparison for DLC-based approaches", + -- "Standardized evaluation for DLC variants" (seed-resources/index.ts:32, src/data/resources.ts:221-228). + -- Re-checked: the row still says so. + PERFORM pg_temp.kg_tools_link( + 'link', 'b9f28848-dd76-4bf7-9fd6-a4d1509154eb', 'DLC Leaderboard', 'benchmark', 'evaluates', + '4009a1f6-c173-495b-9725-bb51571a3cdf', 'DeepLabCut', 'software', 'curator_fill', + 'seed-resources/index.ts:32 and src/data/resources.ts:221-228: "Performance comparison for DLC-based approaches", "Standardized evaluation for DLC variants"', + (SELECT r.description ILIKE '%DLC%' OR r.metadata ->> 'mlPipeline' ILIKE '%DLC%' + FROM public.resources r WHERE r.id = 'b9f28848-dd76-4bf7-9fd6-a4d1509154eb')); + + -- tools-05. R34DA059513 produced VCL Benchmark. The benchmark's paper, "Vocal Call Locator Benchmark (VCL) + -- for localizing rodent vocalizations from multi-channel audio" (PMID 39345431, publication a79d14cd), + -- is one of R34DA059513's publications (project_publications; public/bbqs_marr.yaml:204), and the + -- resource is that benchmark ("Vocal Call Locator benchmark: 767,295 rodent sounds ..."). Re-checked + -- at run time from the roster of record: the project_publications row still credits the paper to the + -- grant, and both rows still say Vocal Call Locator. + PERFORM pg_temp.kg_tools_link( + 'link', '492fdfe9-53d5-4926-8ef0-933e957fed18', 'R34DA059513', 'grant', 'produced', + '4921bfdf-7432-48ac-911d-0cb825184ef1', 'VCL Benchmark', 'benchmark', 'curator_fill', + 'project_publications credits PMID 39345431 "Vocal Call Locator Benchmark (VCL) for localizing rodent vocalizations from multi-channel audio" (publication a79d14cd) to R34DA059513; the resource is that benchmark (public/bbqs_marr.yaml:204)', + EXISTS (SELECT 1 FROM public.project_publications pp + JOIN public.projects p ON p.id = pp.project_id + JOIN public.grants g ON g.grant_number = p.grant_number + JOIN public.publications pub ON pub.id = pp.publication_id + WHERE g.resource_id = '492fdfe9-53d5-4926-8ef0-933e957fed18' + AND g.grant_number = 'R34DA059513' + AND pub.resource_id = 'a79d14cd-ae0e-4bce-b09f-8d16e6e15f7f' + AND pub.title ILIKE 'Vocal Call Locator Benchmark%') + AND EXISTS (SELECT 1 FROM public.resources r + WHERE r.id = '4921bfdf-7432-48ac-911d-0cb825184ef1' AND r.description ILIKE '%Vocal Call Locator%')); +END +$blk$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [tools-06] device_class_crosswalk rows for the isolated device categories +-- project_device_usage (20260806214122:46-70) joins grant_methods_evidence.device_class to +-- device_categories ONLY through device_class_crosswalk, and the exporter at HEAD (06522fc, +-- kg/bbqs_kg.py:302-313) writes each of its rows as Project uses_device_category. 15 crosswalk rows +-- reach 13 categories; these reach the isolated ones. A row adds an edge only where live evidence +-- carries that exact bucket, so each report row says how many grants it reaches now. +-- * Harvester buckets (the reuse list in supabase/functions/harvest-grant-methods-multihop/index.ts:274; +-- hint regexes :345-346): miniscope, fiber_photometry, macroscope, MEG. +-- * The old 32-key BBQS taxonomy (src/pages/Devices.tsx:29-64, device-knowledge-seed/index.ts:26-34), +-- mapped onto the live keys. No harvester is told these names, so each is a no-op unless the LLM +-- happened to emit it; they complete the old -> new key map. +-- The evidence must be the project's own. The harvester files evidence from RePORTER's 'similar' +-- neighbours' abstracts and from multi-hop papers under the SEED grant (index.ts:439-445, 592-607; +-- source_grant_number names where it came from), and project_device_usage keeps every row, so a +-- mapping would hand a project a device category found in another grant's text. A row is added only +-- when every live evidence row carrying its bucket comes from its own seed grant (source grant = +-- seed grant, by core award: the project's own abstract or its own papers); otherwise it is skipped +-- and the report lists each seed <- source grant and depth. Live evidence is not visible from the +-- repo or the export, so the report rows say which buckets pass. A harvester bucket with no live +-- evidence yet is skipped too (as MEG always was): nothing would check the first row the harvester +-- files for it, and that row may be a neighbour's. The test runs again on every run, so a neighbour +-- row added later stops a mapping from being added; it does not remove one already made, and once a +-- row exists project_device_usage counts every evidence row for its bucket (tools-10's SELECTs show +-- the reach; see NOT FIXED BY SQL). +-- Guards: the target key must exist (FK, ON UPDATE CASCADE); a bucket a curator already mapped to a +-- different category is left alone; MEG also only if every grant whose evidence says MEG is an OPM-MEG +-- grant by its own title/abstract (meg_opm is "Optically pumped magnetometer arrays", and the 34 +-- keys have no SQUID-MEG category). plethysmography -> ppg is ambiguous (whole-body plethysmography +-- measures breathing) and ships commented out as tools-09. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_tools_06() RETURNS void LANGUAGE plpgsql AS +$do$ +DECLARE + _item constant text := 'device crosswalk'; + m record; + _ev int; _grants text; _other text; _n int; + _bad text; _meg_rows int; _foreign text; +BEGIN + PERFORM public.set_actor('migration:link_isolated_nodes'); + PERFORM public.set_source_class('curator_fill'); + + FOR m IN + SELECT * FROM (VALUES + ('miniscope', 'neural_imaging', 'harvester bucket, harvest-grant-methods-multihop/index.ts:274,345'), + ('fiber_photometry', 'neural_imaging', 'harvester bucket, harvest-grant-methods-multihop/index.ts:274,346'), + ('macroscope', 'neural_imaging', 'harvester bucket, harvest-grant-methods-multihop/index.ts:274,293'), + ('MEG', 'meg_opm', 'harvester bucket, harvest-grant-methods-multihop/index.ts:274'), + ('opm', 'meg_opm', 'old taxonomy key, Devices.tsx:56 "Optically Pumped Magnetometers"'), + ('heart_rate_sensors', 'ecg_hr', 'old taxonomy key, Devices.tsx:35 "Heart Rate Sensors"'), + ('respiration_sensors', 'respiration', 'old taxonomy key, Devices.tsx:41 "Respiration Sensors"'), + ('intranasal_thermistor', 'respiration', 'old taxonomy key, Devices.tsx:46 "Intranasal Thermistor" (breathing)'), + ('skin_temperature', 'temperature', 'old taxonomy key, Devices.tsx:58 "Skin Temperature Sensor"'), + ('cortisol_wearable', 'biofluid', 'old taxonomy key, Devices.tsx:54 "Cortisol Wearable"'), + ('epinephrine_wearable', 'biofluid', 'old taxonomy key, Devices.tsx:55 "Epinephrine Wearable"'), + ('rna_sequencing', 'genomics', 'old taxonomy key, Devices.tsx:34 "RNA Sequencing"'), + ('infrared_cameras', 'infrared_camera', 'old taxonomy key, Devices.tsx:37 "Infrared Cameras"'), + ('smartphone_camera', 'smartphone_camera', 'old taxonomy key, Devices.tsx:57 "Smartphone Camera"') + ) AS v(legacy_key, category_key, why) + LOOP + SELECT count(*), string_agg(DISTINCT e.seed_grant_number, ', ') + INTO _ev, _grants + FROM public.grant_methods_evidence e WHERE m.legacy_key = ANY (e.device_class); + -- Evidence rows carrying the bucket that are NOT the project's own (another grant's abstract + -- or papers): seed <- source grant (depth), the depth counted in hops from the seed. + SELECT string_agg(DISTINCT format('%s <- %s (depth %s)', e.seed_grant_number, + coalesce(e.source_grant_number, '(no source grant)'), e.depth), '; ') + INTO _foreign + FROM public.grant_methods_evidence e + WHERE m.legacy_key = ANY (e.device_class) + AND pg_temp.kg_core_award(e.source_grant_number) IS DISTINCT FROM pg_temp.kg_core_award(e.seed_grant_number); + + IF NOT EXISTS (SELECT 1 FROM public.device_categories c WHERE c.key = m.category_key) THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, m.legacy_key || ' -> ' || m.category_key, 'skipped', 'no device_categories row with that key'); + CONTINUE; + END IF; + IF EXISTS (SELECT 1 FROM public.device_class_crosswalk x + WHERE x.legacy_key = m.legacy_key AND x.category_key = m.category_key) THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, m.legacy_key || ' -> ' || m.category_key, 'noop', + format('mapping already present; live evidence rows with this bucket: %s (grants: %s)%s', _ev, coalesce(_grants, 'none'), + CASE WHEN _foreign IS NOT NULL + THEN '; NOTE: some of it is not the project''s own (seed <- source grant, depth): ' || _foreign ELSE '' END)); + CONTINUE; + END IF; + SELECT string_agg(x.category_key, ', ') INTO _other + FROM public.device_class_crosswalk x WHERE x.legacy_key = m.legacy_key; + IF _other IS NOT NULL THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, m.legacy_key || ' -> ' || m.category_key, 'skipped', + format('a curator already maps %s to %s; not adding a second category', m.legacy_key, _other)); + CONTINUE; + END IF; + IF _foreign IS NOT NULL THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, m.legacy_key || ' -> ' || m.category_key, 'skipped', + format('not added: some evidence for %s is not the project''s own, so the mapping would give a project another grant''s device (seed <- source grant, depth): %s; a curator decides', m.legacy_key, _foreign)); + CONTINUE; + END IF; + + IF _ev = 0 AND m.legacy_key IN ('miniscope', 'fiber_photometry', 'macroscope') THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, m.legacy_key || ' -> ' || m.category_key, 'skipped', + format('no live evidence row carries %s yet, so there is nothing to check: the mapping would link nothing today, and the first row the harvester files for it (a neighbour grant''s as likely as the project''s own) would become an edge unchecked. Run this again once the project''s own evidence exists', m.legacy_key)); + CONTINUE; + END IF; + IF m.legacy_key = 'MEG' THEN + SELECT count(*), string_agg(DISTINCT t.seed_grant_number, ', ') FILTER (WHERE NOT t.opm) + INTO _meg_rows, _bad + FROM (SELECT e.seed_grant_number, + coalesce(concat_ws(' ', g.title, g.abstract) ~* '(\mopm\M|optically[- ]pumped)', false) AS opm + FROM public.grant_methods_evidence e + -- seed numbers may carry the full RePORTER form (1R61MH135114-01): match on the core + -- award, the way the exporter does (kg/bbqs_kg.py core_award). + LEFT JOIN public.grants g + ON g.grant_number = coalesce(substring(upper(e.seed_grant_number) FROM '[A-Z][A-Z0-9]{2}[A-Z]{2}[0-9]{6}'), + e.seed_grant_number) + WHERE 'MEG' = ANY (e.device_class)) t; + IF _meg_rows = 0 THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, 'MEG -> meg_opm', 'skipped', 'no live evidence row carries MEG, so the mapping would link nothing today and could mislabel a SQUID-MEG grant later'); + CONTINUE; + END IF; + IF _bad IS NOT NULL THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, 'MEG -> meg_opm', 'skipped', + format('MEG evidence is on grant(s) whose title/abstract does not say OPM: %s; a curator decides (no SQUID-MEG category exists)', _bad)); + CONTINUE; + END IF; + END IF; + + INSERT INTO public.device_class_crosswalk (legacy_key, category_key) + VALUES (m.legacy_key, m.category_key) + ON CONFLICT (legacy_key, category_key) DO NOTHING; + GET DIAGNOSTICS _n = ROW_COUNT; + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, m.legacy_key || ' -> ' || m.category_key, CASE WHEN _n > 0 THEN 'done' ELSE 'noop' END, + format('%s; %s', m.why, + CASE WHEN _ev = 0 THEN 'no live evidence row carries this bucket yet, so it links nothing today' + ELSE format('live evidence rows with this bucket: %s, all the project''s own (grants: %s)', _ev, _grants) END)); + END LOOP; +END +$do$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [people-01-report] Remaining orphan spine rows, and person rows with no spine row (read-only) +-- people-01-report. Any OTHER investigator spine row with no investigators row: reported, never deleted here. +-- A same-name person row with no spine row should be ATTACHED to it, not have it deleted. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_people_01_report() RETURNS void LANGUAGE plpgsql AS +$blk$ +BEGIN + INSERT INTO kg_fix_report (item, target, outcome, detail) + SELECT 'orphan spine row still present (not deleted)', r.name || ' ' || r.id, 'report', + coalesce( + (SELECT CASE WHEN i.resource_id IS NULL + THEN format('person row %s (%s) has NO spine row: attach this one with UPDATE public.investigators SET resource_id = %L WHERE id = %L', + i.id, i.name, r.id, i.id) + ELSE format('same-name person row %s already has spine %s: this one is a duplicate node; delete it the people-01 way', i.id, i.resource_id) END + FROM public.investigators i + WHERE pg_temp.kg_norm(i.name) = pg_temp.kg_norm(r.name) + ORDER BY (i.resource_id IS NULL) DESC, i.created_at + LIMIT 1), + 'no investigators row with this name: a curator decides') + || format(' (spine row created %s)', r.created_at::date) + FROM public.resources r + WHERE r.resource_type = 'investigator' + AND NOT EXISTS (SELECT 1 FROM public.investigators i WHERE i.resource_id = r.id) + ORDER BY r.name; + + -- people-01-report. The reverse: person rows with no spine row are not nodes at all (onboard_member inserts + -- without resource_id, 20260811120000). Reported only; giving them a node is a separate change. + INSERT INTO kg_fix_report (item, target, outcome, detail) + SELECT 'person row with no spine row (not in the KG)', i.name || ' ' || i.id, 'report', + 'investigators.resource_id is NULL' + FROM public.investigators i + WHERE i.resource_id IS NULL + ORDER BY i.name; +END +$blk$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [people-11] The 4 name-only records: what their own rows hold (read-only; not fixable by SQL) +-- people-11. The four people the repo knows only by name: what their own rows hold, for the curator. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_people_11() RETURNS void LANGUAGE plpgsql AS +$blk$ +BEGIN + INSERT INTO kg_fix_report (item, target, outcome, detail) + SELECT 'name-only person (curator asks them or their PI)', v.label || ' ' || v.rid, 'report', + CASE WHEN i.id IS NULL THEN 'no investigators row on this spine row: an orphan (see people-01-report)' + ELSE format('institution=%s; email domain=%s; role=%s; created %s; access request: %s', + coalesce(quote_literal(nullif(btrim(i.institution), '')), '(empty)'), + coalesce(nullif(split_part(coalesce(i.email, ''), '@', 2), ''), '(none)'), + coalesce(quote_literal(nullif(btrim(i.role), '')), '(empty)'), + i.created_at::date, + coalesce((SELECT format('institution %s, association %s, status %s, filed %s', + coalesce(quote_literal(a.institution), '-'), coalesce(quote_literal(a.association), '-'), + a.status, a.created_at::date) + FROM public.access_requests a + WHERE (nullif(btrim(i.email), '') IS NOT NULL AND lower(btrim(a.email)) = lower(btrim(i.email))) + OR pg_temp.kg_norm(a.full_name) = pg_temp.kg_norm(i.name) + ORDER BY a.created_at DESC LIMIT 1), 'none')) + END + FROM (VALUES + ('58c31e98-4899-43df-a516-2ee6781b289e'::uuid, 'Anibal Heinsfeld'), + ('e7f5f7e5-8074-41a9-b866-bfd7112d37c2'::uuid, 'Chaoyi Zhang'), + ('17b63cd3-e0b6-47c0-97ca-58ef6197e8e4'::uuid, 'Omid Sharafi'), + ('2a03a500-1fba-4367-85bb-25ce04eaba0e'::uuid, 'Latane Bullock') + ) AS v(rid, label) + LEFT JOIN public.investigators i ON i.resource_id = v.rid; +END +$blk$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [datasets-D10] Datasets still unlinked, with their DANDI contact; stale spine names (read-only) +-- One report row per EMBER dandiset that still has a node, is not hidden, and has no project link +-- (no grant_dandisets row, no award on its DANDI record that names a BBQS grant). The contact and +-- the contributors' names are the person to ask (#444 said datasets carry no contributor +-- information; the mirror's contact_name is filled on 50 of 51 rows). The lab datasets 000534, +-- 000532, 000465, 000564, 000479 and the NIA-funded 000466 are expected here: only their labs (an +-- awardNumber on EMBER-DANDI, which the nightly sync links) or a curator can supply the project. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_datasets_d10() RETURNS void LANGUAGE plpgsql AS +$blk$ +BEGIN + INSERT INTO kg_fix_report (item, target, outcome, detail) + SELECT 'still unlinked (curator / lab)', + d.dandiset_id || ' ' || d.name, + 'report', + format('contact %s; %s file(s); DANDI awards %s; contributors: %s', + coalesce(quote_literal(d.contact_name), '(none)'), + coalesce(d.file_count::text, '?'), + coalesce(nullif(array_to_string(d.award_numbers, ', '), ''), 'none'), + coalesce((SELECT string_agg(coalesce(c ->> 'name', '?') + || coalesce(' [' || nullif(c ->> 'awardNumber', '') || ']', ''), '; ') + FROM jsonb_array_elements(CASE WHEN jsonb_typeof(d.raw -> 'contributor') = 'array' + THEN d.raw -> 'contributor' ELSE '[]'::jsonb END) AS c), + '(none)')) + FROM public.dandisets d + WHERE d.instance = 'ember' + AND NOT coalesce(d.hidden, false) + AND d.resource_id IS NOT NULL + AND NOT EXISTS (SELECT 1 FROM public.grant_dandisets gd WHERE gd.dandiset_id = d.id) + AND NOT EXISTS (SELECT 1 FROM public.grants g, unnest(coalesce(d.award_numbers, '{}'::text[])) AS a + WHERE g.grant_number = a) + ORDER BY d.dandiset_id; + + -- The spine name the sync wrote once and never refreshes (index.ts:137-138 'kept'); 000469 still + -- reads 'Pose Zoo: Bounding Box' / 'Testing' while the mirror says 'Pozu: Bounding Box'. Reported, + -- not changed: the label is not part of the isolation fix. + INSERT INTO kg_fix_report (item, target, outcome, detail) + SELECT 'stale spine name', d.dandiset_id, 'report', + format('resources.name %L <> mirror name %L', r.name, d.name) + FROM public.dandisets d JOIN public.resources r ON r.id = d.resource_id + WHERE d.instance = 'ember' AND r.name IS DISTINCT FROM d.name + ORDER BY d.dandiset_id; +END +$blk$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [notices-05] Participating-only funder organizations: edges today, funding_opportunity_orgs rows (read-only) +-- (a) The funder organizations that only participate in calls (never the issuer, so notices-04 cannot use +-- them) and that no person or project names. Today's exporter has no edge for them; PR #512's +-- exporter would write one funding_org edge per funding_opportunity_orgs row. Each line counts +-- both, so the admin sees which will still be isolated after #512 merges (0 link rows). +-- (b) Detail rows with no spine row: the exporter cannot node them at all (kg/bbqs_kg.py:140-147, +-- and every detail loop skips a row without resource_id), so new calls and posts are missing +-- from the graph, not isolated, until an insert trigger mints their resources row (README:21, :706). +CREATE OR REPLACE FUNCTION pg_temp.kg_b_notices_05() RETURNS void LANGUAGE plpgsql AS +$do$ +DECLARE + r record; + _item constant text := 'participating-only funder'; + _foo boolean := to_regclass('public.funding_opportunity_orgs') IS NOT NULL; + _org uuid; + _edges bigint; + _links bigint; +BEGIN + FOR r IN + SELECT * FROM (VALUES + ('c93dcda4-c504-4ca5-a8a5-a62aecf9e841'::uuid, 'National Center for Complementary and Integrative Health'), + ('c39b3d7a-4ea4-4711-837c-45cef389b959'::uuid, 'National Eye Institute'), + ('6db7f54b-3093-42cc-8011-007e7c9012f2'::uuid, 'National Institute on Aging'), + ('ec41db91-9533-4a3c-8956-8ae3d9030c8c'::uuid, 'National Institute on Alcohol Abuse and Alcoholism'), + ('f1f7e238-efa6-42a5-b5f2-530e56d6cd35'::uuid, 'National Institute of Biomedical Imaging and Bioengineering'), + ('a6ed8610-4f99-43cb-b0fa-ed983bfa2f20'::uuid, 'National Institute on Deafness and Other Communication Disorders'), + ('9860f60e-6ccf-44b5-b941-45c88e0ffed7'::uuid, 'NIH Office of Research on Women''s Health'), + ('d5a4e8e7-26ef-474d-bb33-055d3b151a83'::uuid, 'NIH Office of Behavioral and Social Sciences Research'), + ('292698fe-d705-45ac-a255-3c699228f21a'::uuid, 'Eunice Kennedy Shriver National Institute of Child Health and Human Development'), + ('98f1fdd4-77a8-4bd5-8703-ed6fb8c4af0e'::uuid, 'Empire AI Consortium') + ) AS v(rid, label) + LOOP + _org := pg_temp.kg_org_of(r.rid, r.label); + IF _org IS NULL THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, r.label, 'report', format('organization node %s not found (deleted or renamed)', r.rid)); + CONTINUE; + END IF; + -- the edges today's exporter writes for an organization node: part_of_org from any spine row + -- (bbqs_kg.py:154-155) or project (:237), members from investigator_organizations (:377-380) + SELECT (SELECT count(*) FROM public.resources WHERE organization_id = _org) + + (SELECT count(*) FROM public.projects WHERE organization_id = _org) + + (SELECT count(*) FROM public.investigator_organizations WHERE organization_id = _org) + INTO _edges; + _links := NULL; + IF _foo THEN + EXECUTE 'SELECT count(*) FROM public.funding_opportunity_orgs WHERE organization_id = $1' INTO _links USING _org; + END IF; + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, r.label, 'report', + CASE WHEN NOT _foo + THEN format('%s edge(s) the current exporter writes; funding_opportunity_orgs does not exist here (#512''s 20261103130000 not applied)', _edges) + ELSE format('%s edge(s) the current exporter writes; %s funding_opportunity_orgs row(s) for #512''s exporter%s', + _edges, _links, + CASE WHEN _edges = 0 AND _links = 0 + THEN ' -> stays isolated even after #512: no call lists it; a curator decides' ELSE '' END) END); + END LOOP; + + FOR r IN + SELECT 'funding_opportunities' AS tbl, count(*) AS n FROM public.funding_opportunities WHERE resource_id IS NULL + UNION ALL SELECT 'announcements', count(*) FROM public.announcements WHERE resource_id IS NULL + UNION ALL SELECT 'jobs', count(*) FROM public.jobs WHERE resource_id IS NULL + LOOP + IF r.n > 0 THEN + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES (_item, r.tbl, 'report', + format('%s row(s) with resource_id NULL: not in the graph at all (no spine row; needs the insert trigger)', r.n)); + END IF; + END LOOP; +END +$do$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [tools-10] Device-category reach, unmapped buckets, tool nodes still unlinked (read-only) +-- To look again later (read-only): +-- which grants each new mapping reaches, and from how deep in the multihop evidence (0 = the grant's own text): +-- SELECT e.seed_grant_number, x.legacy_key, x.category_key, min(e.depth) AS min_depth, count(*) AS rows +-- FROM public.grant_methods_evidence e CROSS JOIN LATERAL unnest(e.device_class) AS b(bucket) +-- JOIN public.device_class_crosswalk x ON x.legacy_key = b.bucket +-- WHERE x.category_key IN ('meg_opm', 'neural_imaging', 'ecg_hr', 'respiration', 'temperature', 'biofluid', +-- 'genomics', 'infrared_camera', 'smartphone_camera', 'ppg') +-- GROUP BY 1, 2, 3 ORDER BY 3, 1; +-- every bucket still unmapped: +-- SELECT b.bucket, count(DISTINCT e.seed_grant_number) AS grants, min(e.depth) AS min_depth +-- FROM public.grant_methods_evidence e CROSS JOIN LATERAL unnest(e.device_class) AS b(bucket) +-- WHERE NOT EXISTS (SELECT 1 FROM public.device_class_crosswalk x WHERE x.legacy_key = b.bucket) +-- GROUP BY 1 ORDER BY 2 DESC, 1; +CREATE OR REPLACE FUNCTION pg_temp.kg_b_tools_10() RETURNS void LANGUAGE plpgsql AS +$do$ +DECLARE + c record; + _txt text; _n int; + _pst uuid[] := '{}'; _linked uuid[] := '{}'; +BEGIN + -- a. Each isolated device category: which grants project_device_usage now gives it. The view reads + -- the crosswalk inside this transaction, so this is what the next export will write. + FOR c IN + SELECT k.key, k.label + FROM public.device_categories k + WHERE k.key IN ('meg_opm', 'neural_imaging', 'ecg_hr', 'respiration', 'ppg', 'temperature', 'biofluid', + 'genomics', 'infrared_camera', 'smartphone_camera', 'imu', 'lidar_radar', + 'depth_camera', 'survey_task') + ORDER BY k.key + LOOP + SELECT count(DISTINCT u.grant_number), string_agg(DISTINCT u.grant_number, ', ') + INTO _n, _txt + FROM public.project_device_usage u WHERE u.category_key = c.key; + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES ('device category reach', c.key || ' (' || c.label || ')', 'report', + CASE WHEN _n = 0 THEN 'no project reaches it through project_device_usage: stays isolated after the next export' + ELSE format('%s project(s) after the next export: %s', _n, _txt) END); + END LOOP; + + -- b. Live buckets no crosswalk row maps, most-used first: the list a curator maps by hand. + SELECT count(*), string_agg(format('%s (%s grants)', t.bucket, t.grants), ', ' ORDER BY t.grants DESC, t.bucket) + FILTER (WHERE t.rn <= 40) + INTO _n, _txt + FROM (SELECT b.bucket, count(DISTINCT e.seed_grant_number) AS grants, + row_number() OVER (ORDER BY count(DISTINCT e.seed_grant_number) DESC, b.bucket) AS rn + FROM public.grant_methods_evidence e + CROSS JOIN LATERAL unnest(e.device_class) AS b(bucket) + WHERE NOT EXISTS (SELECT 1 FROM public.device_class_crosswalk x WHERE x.legacy_key = b.bucket) + GROUP BY b.bucket) t; + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES ('unmapped buckets', 'grant_methods_evidence.device_class', 'report', + format('%s distinct bucket(s) map to no category; top 40: %s', _n, coalesce(_txt, 'none'))); + + -- c. Tool-side nodes the next export will still leave isolated: no organization that has a node, + -- no resource_links row at either end. #512's project_software_tools links are marked: they + -- become edges only once #512's exporter half merges. Both tables are read only if present. + IF to_regclass('public.project_software_tools') IS NOT NULL THEN + EXECUTE 'SELECT coalesce(array_agg(DISTINCT st.resource_id), ''{}''::uuid[]) + FROM public.software_tools st + JOIN public.project_software_tools p ON p.software_tool_id = st.id' INTO _pst; + END IF; + IF to_regclass('public.resource_links') IS NOT NULL THEN + EXECUTE 'SELECT coalesce(array_agg(DISTINCT x), ''{}''::uuid[]) + FROM public.resource_links l, unnest(ARRAY[l.subject_id, l.object_id]) AS x' INTO _linked; + END IF; + SELECT count(*), string_agg(format('%s %s [%s]%s', r.resource_type, r.name, left(r.id::text, 8), + CASE WHEN r.id = ANY (_pst) THEN ' (#512 uses_software once merged)' ELSE '' END), + '; ' ORDER BY r.resource_type, r.name) + INTO _n, _txt + FROM public.resources r + WHERE r.resource_type::text IN ('software', 'tool', 'ml_model', 'benchmark', 'protocol', 'standard') + AND NOT EXISTS (SELECT 1 FROM public.organizations o + WHERE o.id = r.organization_id AND o.resource_id IS NOT NULL) + AND NOT (r.id = ANY (_linked)); + INSERT INTO kg_fix_report (item, target, outcome, detail) + VALUES ('tools still unlinked', 'software/tool/ml_model/benchmark/protocol/standard', 'report', + format('%s node(s) with no organization and no resource link; species, uses_software and the links only a person can supply are not SQL: %s', + _n, coalesce(_txt, 'none'))); +END +$do$; + +-- ════════════════════════════════════════════════════════════════════════════════════════════════ +-- 3. OPTIONAL BLOCKS: commented out. Each needs a curator's answer to its QUESTION first. +-- To apply one: uncomment it (from its CREATE line to its closing $...$; line), then run the WHOLE +-- script again (dry run first). Every other block then reports noop. Section 4 runs an +-- uncommented optional block in its place, after the blocks above and before the reports. +-- ════════════════════════════════════════════════════════════════════════════════════════════════ + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [people-04] OPTIONAL: Give the merged Niegil record the fuller name on both rows +-- QUESTION FOR A CURATOR: Should the merged record be named 'Niegil Francis Muttath Joseph' on both rows? (publications credit him as 'Francis, Niegil') +-- -- people-04 (OPTIONAL). Give the merged Niegil record the fuller name on BOTH rows, as +-- -- 20260826120000 recommends for a person's own name. resources.name is not synced from +-- -- investigators.name (the Neimat spine kept 'Joseph S Neimat'), so both are written. Runs only after +-- -- people-03 merged the duplicate (investigators_name_key: the duplicate held the name), and renames the +-- -- spine row only while the duplicate spine row is gone. Publications credit him as 'Francis, Niegil' +-- -- (public/bbqs_marr.yaml:205), which is why this is not applied by default. +-- CREATE OR REPLACE FUNCTION pg_temp.kg_o_people_04() RETURNS void LANGUAGE plpgsql AS +-- $blk$ +-- DECLARE _n int; _m int; +-- BEGIN +-- UPDATE public.investigators SET name = 'Niegil Francis Muttath Joseph', updated_at = now() +-- WHERE resource_id = 'af80d437-679c-42d0-aeed-fc7129b8a7b7' AND name = 'Niegil Francis' +-- AND NOT EXISTS (SELECT 1 FROM public.investigators WHERE name = 'Niegil Francis Muttath Joseph'); +-- GET DIAGNOSTICS _n = ROW_COUNT; +-- UPDATE public.resources SET name = 'Niegil Francis Muttath Joseph', updated_at = now() +-- WHERE id = 'af80d437-679c-42d0-aeed-fc7129b8a7b7' AND name = 'Niegil Francis' +-- AND NOT EXISTS (SELECT 1 FROM public.resources WHERE id = '83e96042-a116-4e27-ab65-787db78d29f2'); +-- GET DIAGNOSTICS _m = ROW_COUNT; +-- INSERT INTO kg_fix_report (item, target, outcome, detail) +-- VALUES ('rename the merged Niegil record', 'af80d437-679c-42d0-aeed-fc7129b8a7b7', +-- CASE WHEN _n + _m > 0 THEN 'done' ELSE 'noop' END, +-- format('investigators.name: %s row(s); resources.name: %s row(s) (0 if people-03 did not merge, or already renamed)', _n, _m)); +-- END +-- $blk$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [people-09] OPTIONAL: Jongwoon Kim's affiliation: NEW YORK UNIVERSITY SCHOOL OF MEDICINE, COLUMBIA UNIVERSITY HEALTH SCIENCES, or both +-- QUESTION FOR A CURATOR: Is Jongwoon Kim at NYU Langone, Columbia, or both today? Keep the line(s) that apply. +-- -- people-09 (OPTIONAL). His sources disagree, so no link is applied without a curator: his form +-- -- answer names both, 'NYU, Columbia University' (20260807150000:182, seed-consortium/index.ts:67-73); +-- -- his primary address is nyulangone.org and the normalizer made it NYU Langone Health +-- -- (20260807160000:128); he holds jk4975@columbia.edu as a secondary (seed-consortium/index.ts:70); +-- -- the most recent source, the 2026-09-08 seating plan, seats him at Columbia (mit-workshop-seating.ts:102). +-- -- Keep the NYU line, the Columbia line, or both. Each line accepts only its own organization's +-- -- spellings at the start of his row's institution text, so a row that names only the other one is +-- -- skipped as a contradiction; the Columbia line also accepts his form answer 'NYU, Columbia +-- -- University', which names both. Both lines pass _allow_other_orgs = true: the curator's answer +-- -- is the evidence, so a line adds its organization even when he already has the other one (from +-- -- an earlier run or a curator's link), and 'both' works whichever is linked first. No line +-- -- removes an affiliation: the done row names any other organization he keeps. +-- CREATE OR REPLACE FUNCTION pg_temp.kg_o_people_09() RETURNS void LANGUAGE plpgsql AS +-- $blk$ +-- BEGIN +-- PERFORM pg_temp.kg_link_org('affiliation (curator''s answer)', +-- 'e055175b-7bfb-471e-8e80-d8697b484b9d'::uuid, 'Jongwoon Kim', +-- '6efc2552-7cd7-4e53-bd2d-41fee6824cf7'::uuid, 'NEW YORK UNIVERSITY SCHOOL OF MEDICINE', +-- 'nyu|new york univ(ersity)?', NULL, +-- 'curator-confirmed: NYU Langone (form: NYU, Columbia University, 20260807150000:182; nyulangone.org address, 20260807160000:128)', +-- true); +-- PERFORM pg_temp.kg_link_org('affiliation (curator''s answer)', +-- 'e055175b-7bfb-471e-8e80-d8697b484b9d'::uuid, 'Jongwoon Kim', +-- '9f75488b-59d0-4d50-b7db-869f26066743'::uuid, 'COLUMBIA UNIVERSITY HEALTH SCIENCES', +-- 'columbia univ(ersity)?|cumc|nyu,? (and |& )?columbia univ(ersity)?', NULL, +-- 'curator-confirmed: Columbia (form: NYU, Columbia University, 20260807150000:182; columbia.edu secondary address; seating:102)', +-- true); +-- END +-- $blk$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [people-10-merge] OPTIONAL: Merge 'Jeffrey Walker' (e1424ffb) into 'Jeffery Walker' (7a5a1c11) and take the spelling 'Jeffrey' +-- QUESTION FOR A CURATOR: Are 'Jeffrey Walker' (e1424ffb) and 'Jeffery Walker' (7a5a1c11, Yale) one person? 20260826120000 judged them two people at two institutions; the people-10 report rows show both records. +-- -- Every consortium source knows ONE Walker, at Yale: the seating plan's 'Jeffrey Walker', Yale, +-- -- Research Staff (mit-workshop-seating.ts:120); seed-consortium's 'Jeff Walker', Yale, +-- -- jeffrey.walker@yale.edu (index.ts:685-693); and the WG-Analytics backfill keyed on that address +-- -- (20260807150000:58), which sits on 'Jeffery Walker' (7a5a1c11: postdoc on U01DA063534, YALE +-- -- member). But 20260826120000:274-276 recorded the opposite judgement ("two different +-- -- institutions"), so this merge needs a person's yes. The people-10 report rows print both records. +-- -- On a yes: same steps and guards as people-03, then the keeper takes the spelling both sources +-- -- use, 'Jeffrey', on investigators.name AND resources.name (the spine name is not synced). Skipped +-- -- if the duplicate's institution text names somewhere other than Yale, or it holds any address +-- -- besides jeffrey.walker@yale.edu (the one the evidence ties to this person), a roster row, a +-- -- login, a role/working group the keeper lacks, or a profile value the keeper does not already +-- -- hold (people-03's list). Only claims that state the keeper's cells move to it; curation_audit_log +-- -- stays as it is. +-- CREATE OR REPLACE FUNCTION pg_temp.kg_o_people_10() RETURNS void LANGUAGE plpgsql AS +-- $do$ +-- DECLARE +-- _keep_res constant uuid := '7a5a1c11-f5f8-4643-b444-71228b1f298a'; -- 'Jeffery Walker' +-- _drop_res constant uuid := 'e1424ffb-1cc6-4d9a-932e-464c967a68f9'; -- 'Jeffrey Walker' +-- _item constant text := 'merge Jeffrey Walker -> Jeffery Walker (optional)'; +-- _known constant text[] := ARRAY['jeffrey.walker@yale.edu']; +-- _profile constant text[] := ARRAY['orcid', 'scholar_id', 'profile_url', 'institution', 'research_areas', 'skills', +-- 'requested_working_groups', 'pending_role', 'onboarding_checklist', 'reporter_profile_id']; +-- _fold constant text[] := ARRAY['institution', 'research_areas', 'skills']; +-- _keep public.investigators%ROWTYPE; +-- _drop public.investigators%ROWTYPE; +-- _n int; _refs text; _addr text[]; _bad text; _prov_guard boolean := false; +-- _fp_ids bigint[]; _fp_left int := 0; _cal int := 0; +-- BEGIN +-- PERFORM public.set_actor('migration:link_isolated_nodes'); +-- PERFORM public.set_source_class('curator_fill'); +-- IF NOT EXISTS (SELECT 1 FROM public.resources WHERE id = _drop_res) THEN +-- INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, _drop_res::text, 'noop', 'duplicate spine row already gone'); +-- RETURN; +-- END IF; +-- SELECT * INTO _keep FROM public.investigators WHERE resource_id = _keep_res; +-- IF _keep.id IS NULL OR pg_temp.kg_norm(_keep.name) NOT IN ('jeffery walker', 'jeffrey walker') +-- OR lower(btrim(coalesce(_keep.email, ''))) <> 'jeffrey.walker@yale.edu' THEN +-- INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, _keep_res::text, 'skipped', 'keeper is not the Jeffery Walker row holding jeffrey.walker@yale.edu'); +-- RETURN; +-- END IF; +-- SELECT count(*) INTO _n FROM public.investigators WHERE resource_id = _drop_res; +-- SELECT * INTO _drop FROM public.investigators WHERE resource_id = _drop_res; +-- IF _n <> 1 OR pg_temp.kg_norm(_drop.name) <> 'jeffrey walker' OR _drop.id = _keep.id THEN +-- INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, _drop_res::text, 'skipped', 'duplicate row missing, doubled or renamed'); +-- RETURN; +-- END IF; +-- IF nullif(btrim(_drop.institution), '') IS NOT NULL AND _drop.institution !~* 'yale' THEN +-- INSERT INTO kg_fix_report (item, target, outcome, detail) +-- VALUES (_item, _drop_res::text, 'skipped', format('duplicate''s institution is %L: two people, as 20260826120000 judged; record its org and grant instead', _drop.institution)); +-- RETURN; +-- END IF; +-- _addr := ARRAY(SELECT DISTINCT lower(btrim(e)) FROM unnest(array_append(coalesce(_drop.secondary_emails, '{}'::text[]), _drop.email)) AS e +-- WHERE nullif(btrim(e), '') IS NOT NULL); +-- SELECT string_agg(e, ', ' ORDER BY e) INTO _bad FROM unnest(_addr) AS e WHERE NOT (e = ANY (_known)); +-- SELECT count(*) INTO _n FROM public.grant_investigators WHERE investigator_id = _drop.id; +-- IF _bad IS NOT NULL OR _n > 0 OR _drop.user_id IS NOT NULL +-- OR (nullif(btrim(_drop.role), '') IS NOT NULL AND _drop.role IS DISTINCT FROM _keep.role) +-- OR EXISTS (SELECT 1 FROM unnest(coalesce(_drop.working_groups, '{}'::text[])) AS w +-- WHERE NOT (w = ANY (coalesce(_keep.working_groups, '{}'::text[])))) THEN +-- INSERT INTO kg_fix_report (item, target, outcome, detail) +-- VALUES (_item, _drop_res::text, 'skipped', +-- format('not a clean duplicate: addresses besides jeffrey.walker@yale.edu: %s; %s roster row(s); login %s; role %L; working groups %s', +-- coalesce(_bad, 'none'), _n, coalesce(_drop.user_id::text, 'none'), _drop.role, coalesce(_drop.working_groups::text, '{}'))); +-- RETURN; +-- END IF; +-- _bad := pg_temp.kg_merge_conflicts(to_jsonb(_keep), to_jsonb(_drop), _profile, _fold); +-- IF _bad IS NOT NULL THEN +-- INSERT INTO kg_fix_report (item, target, outcome, detail) +-- VALUES (_item, _drop_res::text, 'skipped', +-- format('the duplicate holds a value the keeper lacks or holds differently in: %s. Merging would drop it from the live rows; nothing is filled in here. A curator puts what is right on the keeper (or clears it on the duplicate), then runs this again', _bad)); +-- RETURN; +-- END IF; +-- _refs := pg_temp.kg_fk_refs('public.investigators'::regclass, _drop.id, ARRAY['public.investigator_organizations.investigator_id']); +-- IF _refs = '' THEN +-- _refs := pg_temp.kg_fk_refs('public.resources'::regclass, _drop_res, +-- ARRAY['public.knowledge_embeddings.resource_id', 'public.investigators.resource_id', 'public.entity_comments.resource_id']); +-- END IF; +-- IF _refs <> '' THEN +-- INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, _drop_res::text, 'skipped', 'duplicate referenced: ' || _refs); +-- RETURN; +-- END IF; +-- BEGIN +-- DELETE FROM public.investigator_organizations d +-- WHERE d.investigator_id = _drop.id +-- AND EXISTS (SELECT 1 FROM public.investigator_organizations k WHERE k.investigator_id = _keep.id AND k.organization_id = d.organization_id); +-- UPDATE public.investigator_organizations SET investigator_id = _keep.id WHERE investigator_id = _drop.id; +-- UPDATE public.entity_comments SET resource_id = _keep_res WHERE resource_id = _drop_res; +-- -- curation_audit_log is history with no foreign key: left as it is (counted). +-- SELECT count(*) INTO _cal FROM public.curation_audit_log +-- WHERE investigator_id = _drop.id OR resource_id = _drop_res OR entity_id IN (_drop.id, _drop_res); +-- DELETE FROM public.knowledge_embeddings WHERE resource_id = _drop_res OR source_id::text IN (_drop.id::text, _drop_res::text); +-- DELETE FROM public.investigators WHERE id = _drop.id; -- frees the name 'Jeffrey Walker' +-- UPDATE public.investigators +-- SET secondary_emails = ARRAY(SELECT DISTINCT lower(btrim(e)) +-- FROM unnest(coalesce(secondary_emails, '{}'::text[]) || _addr) AS e +-- WHERE nullif(btrim(e), '') IS NOT NULL +-- AND lower(btrim(e)) <> lower(btrim(coalesce(email, '')))), +-- updated_at = now() +-- WHERE id = _keep.id; +-- -- Only now is the name free (investigators_name_key): merge -> delete -> rename (20260807190000). +-- UPDATE public.investigators SET name = 'Jeffrey Walker', updated_at = now() +-- WHERE id = _keep.id AND name <> 'Jeffrey Walker' +-- AND NOT EXISTS (SELECT 1 FROM public.investigators x WHERE x.name = 'Jeffrey Walker' AND x.id <> _keep.id); +-- UPDATE public.resources SET name = 'Jeffrey Walker', updated_at = now() +-- WHERE id = _keep_res AND name <> 'Jeffrey Walker' +-- AND EXISTS (SELECT 1 FROM public.investigators WHERE id = _keep.id AND name = 'Jeffrey Walker'); +-- -- Provenance: only the duplicate's claims that state the keeper's current cells move (people-03). +-- SELECT * INTO _keep FROM public.investigators WHERE id = _keep.id; +-- SELECT array_agg(fp.id ORDER BY fp.id) INTO _fp_ids +-- FROM public.field_provenance fp +-- WHERE fp.entity_table = 'investigators' AND fp.entity_id = _drop.id +-- AND pg_temp.kg_claim_matches(to_jsonb(_keep), fp.entity_column, fp.value_text); +-- IF cardinality(_fp_ids) > 0 THEN +-- IF EXISTS (SELECT 1 FROM pg_trigger WHERE tgrelid = 'public.field_provenance'::regclass +-- AND tgname = 'trg_field_provenance_append_only' AND NOT tgisinternal AND tgenabled <> 'D') THEN +-- ALTER TABLE public.field_provenance DISABLE TRIGGER trg_field_provenance_append_only; +-- _prov_guard := true; +-- END IF; +-- UPDATE public.field_provenance SET entity_id = _keep.id WHERE id = ANY (_fp_ids); +-- IF _prov_guard THEN +-- ALTER TABLE public.field_provenance ENABLE TRIGGER trg_field_provenance_append_only; +-- END IF; +-- END IF; +-- SELECT count(*) INTO _fp_left FROM public.field_provenance WHERE entity_table = 'investigators' AND entity_id = _drop.id; +-- _refs := pg_temp.kg_fk_refs('public.resources'::regclass, _drop_res, '{}'::text[]); +-- IF _refs <> '' THEN +-- RAISE EXCEPTION 'duplicate spine row still referenced after the repoint: %', _refs; +-- END IF; +-- DELETE FROM public.resources WHERE id = _drop_res; +-- INSERT INTO kg_fix_report (item, target, outcome, detail) +-- VALUES (_item, _drop_res::text || ' -> ' || _keep_res::text, 'done', +-- format('merged; keeper renamed Jeffrey Walker on both rows; moved to the keeper %s provenance claim(s) that state its current cells (field_provenance ids %s: entity_id was %s, not audited; see UNDO); %s other claim(s) and %s curation-log row(s) still name the duplicate, as history', +-- coalesce(cardinality(_fp_ids), 0), coalesce(array_to_string(_fp_ids, ','), 'none'), _drop.id, _fp_left, _cal)); +-- EXCEPTION WHEN OTHERS THEN +-- INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, _drop_res::text, 'error', SQLSTATE || ': ' || SQLERRM); +-- END; +-- END +-- $do$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [datasets-O1] OPTIONAL: Hide 000598 'EMBER Bees DeepLabCut Training — Workflow Smoke Test' (linked, not isolated) +-- QUESTION FOR A CURATOR: Hide the smoke test #506 lists, although a curator linked it to EMBER on 2026-11-03 (#517 block 10)? It removes a linked node and fixes no isolated one. +-- -- #506 lists it as a test, and its description says "Intended for workflow validation, not as a +-- -- new scientific benchmark". But a curator linked it to R24MH136632 on 2026-11-03 (#517 block 10, +-- -- "the two EMBER datasets, confirmed by a curator"), and it is NOT isolated, so hiding it removes a +-- -- node and its funded_datasets edge and fixes no isolated node. The grant_dandisets row stays, so +-- -- set_dandiset_hidden(ARRAY['000598'], false) restores node and edge. Uncomment on a curator's yes. +-- CREATE OR REPLACE FUNCTION pg_temp.kg_o_datasets_o1() RETURNS void LANGUAGE plpgsql AS +-- $blk$ +-- BEGIN +-- PERFORM pg_temp.kg_ds_hide('hide linked smoke test', '000598', '4f6fe91b-9a18-467b-8a17-46bc3404f22e', 'smoke test', 'workflow smoke test, not a scientific dataset (#506)', true); +-- END +-- $blk$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [datasets-O2a] OPTIONAL: Link the SLEAP re-hosts 000265 and 000398 to R24MH136632 (or hide them) +-- QUESTION FOR A CURATOR: Are 000265 and 000398 (public sleap.ai data re-hosted on EMBER-DANDI) EMBER demos to credit to R24MH136632, or copies to hide (the two commented kg_ds_hide lines inside)? +-- -- 000398 "is an example of how SLEAP training data (flies13 from sleap.ai/datasets.html) can be +-- -- converted and stored on EMBER-DANDI"; 000265 holds "Annotations for testing clip of mice ... from +-- -- sleap.ai/datasets.html". Public SLEAP data re-hosted as an EMBER storage demo, so the honest +-- -- funder of the data is neither EMBER nor a BBQS lab: #444 lists them as 'Related' to the +-- -- SLEAP-using projects (Grover, Sanes, Srivastava), not to EMBER, and the 11-03 curator linked +-- -- 000598 (derived from 000398) but not 000398 itself. A curator chooses: link as EMBER demos +-- -- (below), hide them as throwaway copies (the two commented kg_ds_hide lines), or leave them. +-- CREATE OR REPLACE FUNCTION pg_temp.kg_o_datasets_o2a() RETURNS void LANGUAGE plpgsql AS +-- $blk$ +-- BEGIN +-- PERFORM pg_temp.kg_ds_link('link SLEAP re-host (curator yes)', '000265', '41b331ec-b7ab-400f-9899-6c314e9eea6e', 'sleap annotations', 'R24MH136632', 'curator', +-- 'Curator decision: EMBER-DANDI storage demo of public SLEAP data (sleap.ai/datasets.html).'); +-- PERFORM pg_temp.kg_ds_link('link SLEAP re-host (curator yes)', '000398', '9cac1ce6-16e0-400b-adda-ad5d2a8597a9', 'sleap training data', 'R24MH136632', 'curator', +-- 'Curator decision: EMBER-DANDI storage demo of public SLEAP data (flies13, sleap.ai/datasets.html).'); +-- -- PERFORM pg_temp.kg_ds_hide('hide SLEAP re-host', '000265', '41b331ec-b7ab-400f-9899-6c314e9eea6e', 'sleap annotations', 'copy of public SLEAP example data (sleap.ai)'); +-- -- PERFORM pg_temp.kg_ds_hide('hide SLEAP re-host', '000398', '9cac1ce6-16e0-400b-adda-ad5d2a8597a9', 'sleap training data', 'copy of public SLEAP example data (sleap.ai)'); +-- END +-- $blk$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [datasets-O2b] OPTIONAL: Link whichever EMBER collections D05/D06 skipped for want of roster evidence +-- QUESTION FOR A CURATOR: Does EMBER confirm that each collection datasets-D05/D06 skipped (see their report rows) is its own? Keep only those lines. +-- -- Run only for the dandisets whose D06 report row says 'skipped ... not on R24MH136632's roster', +-- -- after a curator (or EMBER) confirms they are EMBER's. Each call is a no-op if D06 linked it. +-- CREATE OR REPLACE FUNCTION pg_temp.kg_o_datasets_o2b() RETURNS void LANGUAGE plpgsql AS +-- $blk$ +-- BEGIN +-- PERFORM pg_temp.kg_ds_link('link EMBER collection (curator yes)', '000469', 'b5f65a35-ad99-4779-ab8c-2f211803ca2e', 'bounding box', 'R24MH136632', 'curator', 'Curator decision: EMBER''s Pozu collection.'); +-- PERFORM pg_temp.kg_ds_link('link EMBER collection (curator yes)', '000470', '0c4561e1-221b-4444-ac15-6c2220beb292', '(pozu|pose zoo).*label', 'R24MH136632', 'curator', 'Curator decision: EMBER''s Pozu collection.'); +-- PERFORM pg_temp.kg_ds_link('link EMBER collection (curator yes)', '000471', '1e988b46-bfe4-4e41-843e-b6b0ae88efcb', '(pozu|pose zoo).*transcod', 'R24MH136632', 'curator', 'Curator decision: EMBER''s Pozu collection.'); +-- PERFORM pg_temp.kg_ds_link('link EMBER collection (curator yes)', '000474', '1cabb668-d89d-4bbb-a9c2-ea79f7a93708', 'bbqs snippets', 'R24MH136632', 'curator', 'Curator decision: EMBER''s consortium-wide snippet collection.'); +-- PERFORM pg_temp.kg_ds_link('link EMBER collection (curator yes)', '000472', '241a21ae-2f3c-4fce-b11d-d42980ed7209', 'missing subjects', 'R24MH136632', 'curator', 'Curator decision: EMBER''s Pozu collection (has files).'); +-- END +-- $blk$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [datasets-O3] OPTIONAL: Confirm species candidate Cricket for R34DA059512 (append) + alias cricket -> Gryllidae +-- QUESTION FOR A CURATOR: Does R34DA059512 study the cricket (its prey) as a species? On 2026-11-03 the curator set ['Mus musculus'] only. +-- -- confirm_species_candidate('R34DA059512', 'Cricket', _replace => false) without its auth.uid() +-- -- gate (20260822120000:92-141): append to projects.study_species (array_agg DISTINCT, exactly as the +-- -- function does), then record WHY with the abstract quote. Never replaces: Mus musculus stays. +-- -- Optional because a curator decides whether prey counts as a studied species: on 2026-11-03 the +-- -- curator confirmed R34DA059512's Mus musculus and set study_species to ['Mus musculus'] only +-- -- (#517 block 13), skipping this candidate (20260930140000:25-30, confidence 'strong'). Once +-- -- confirmed, the exporter's resolver matches 'Cricket' on the Cricket species row's name, which +-- -- links the isolated Cricket node. The alias keeps project_species from listing it as 'unmapped'. +-- CREATE OR REPLACE FUNCTION pg_temp.kg_o_datasets_o3() RETURNS void LANGUAGE plpgsql AS +-- $do$ +-- DECLARE +-- _item constant text := 'confirm Cricket for R34DA059512 (append)'; +-- _c record; +-- _p record; +-- _new text[]; +-- BEGIN +-- PERFORM public.set_actor('migration:link_isolated_nodes'); +-- PERFORM public.set_source_class('curator_fill'); -- the projects guard refuses an undeclared write over a curated value +-- +-- SELECT * INTO _c FROM public.species_candidates WHERE grant_number = 'R34DA059512' AND candidate = 'Cricket'; +-- IF NOT FOUND THEN +-- INSERT INTO kg_fix_report (item, target, outcome, detail) +-- VALUES (_item, 'R34DA059512', 'skipped', 'no Cricket candidate (20260930140000 not applied?)'); +-- RETURN; +-- END IF; +-- SELECT id, study_species INTO _p FROM public.projects WHERE grant_number = 'R34DA059512'; +-- IF NOT FOUND THEN +-- INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, 'R34DA059512', 'skipped', 'no project row'); +-- RETURN; +-- END IF; +-- IF EXISTS (SELECT 1 FROM unnest(coalesce(_p.study_species, '{}'::text[])) s WHERE lower(btrim(s)) = 'cricket') THEN +-- INSERT INTO kg_fix_report (item, target, outcome, detail) +-- VALUES (_item, 'R34DA059512', 'noop', 'already lists Cricket: ' || array_to_string(_p.study_species, ', ')); +-- RETURN; +-- END IF; +-- IF NOT EXISTS (SELECT 1 FROM public.species +-- WHERE lower(btrim(name)) = 'cricket' OR lower(btrim(common_name)) = 'cricket') THEN +-- INSERT INTO kg_fix_report (item, target, outcome, detail) +-- VALUES (_item, 'R34DA059512', 'skipped', 'no Cricket species row: the claim would dangle (shape #7)'); +-- RETURN; +-- END IF; +-- +-- SELECT array_agg(DISTINCT s) INTO _new +-- FROM unnest(coalesce(_p.study_species, '{}'::text[]) || 'Cricket'::text) AS s; +-- UPDATE public.projects SET study_species = _new WHERE id = _p.id; +-- PERFORM public.record_field_provenance( +-- 'projects', _p.id, 'study_species', 'curator_fill', 'confirmed_species_candidate', +-- NULL, _c.source, array_to_string(_new, ', '), +-- format('Confirmed by %s from the grant abstract: "%s"', public.current_actor_via(), _c.evidence)); +-- +-- INSERT INTO public.species_aliases (alias, canonical, kind, common_name, note) +-- VALUES ('cricket', 'Gryllidae', 'taxon_assumed', 'cricket', +-- 'Prey in R34DA059512''s prey-capture paradigm ("prey (cricket)"); the abstract does not name the species, so family level is a judgement.') +-- ON CONFLICT (alias) DO NOTHING; +-- +-- INSERT INTO kg_fix_report (item, target, outcome, detail) +-- VALUES (_item, 'R34DA059512', 'done', +-- format('study_species %s -> %s; alias cricket -> Gryllidae (taxon_assumed)', +-- array_to_string(coalesce(_p.study_species, '{}'::text[]), ', '), array_to_string(_new, ', '))); +-- EXCEPTION WHEN OTHERS THEN +-- INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, 'R34DA059512', 'error', SQLSTATE || ': ' || SQLERRM); +-- END +-- $do$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [datasets-O4] OPTIONAL: Alias 'drosophila' -> Drosophila melanogaster (Fruit Fly) for JAABA +-- QUESTION FOR A CURATOR: Is a 'drosophila' -> Drosophila melanogaster alias wanted? (Probably a no-op: the Fruit Fly row is named 'Drosophila'.) +-- -- seed-resources gives JAABA the species text 'Drosophila (fruit flies)' (index.ts:14). No exporter +-- -- reads resources.metadata.species yet (the tools group's supports_species change does), so this +-- -- links nothing today. It is also redundant while the Fruit Fly species row's own name is +-- -- 'Drosophila' (2026-09-21 export; roundtrip.json shows 11 of 15 species names differ from the spine +-- -- names), because the resolver keys on species.name too (kg/bbqs_kg.py:177-187); the block then +-- -- writes nothing. 'taxon_assumed': the genus read as D. melanogaster is a judgement. +-- CREATE OR REPLACE FUNCTION pg_temp.kg_o_datasets_o4() RETURNS void LANGUAGE plpgsql AS +-- $do$ +-- DECLARE _item constant text := 'alias drosophila -> Fruit Fly'; +-- BEGIN +-- PERFORM public.set_actor('migration:link_isolated_nodes'); +-- PERFORM public.set_source_class('curator_fill'); +-- IF EXISTS (SELECT 1 FROM public.species_aliases WHERE alias = 'drosophila') THEN +-- INSERT INTO kg_fix_report (item, target, outcome, detail) +-- SELECT _item, 'species_aliases', 'noop', 'alias exists: drosophila -> ' || coalesce(canonical, '(none)') +-- FROM public.species_aliases WHERE alias = 'drosophila'; +-- ELSIF EXISTS (SELECT 1 FROM public.species WHERE lower(btrim(name)) = 'drosophila' OR lower(btrim(common_name)) = 'drosophila') THEN +-- INSERT INTO kg_fix_report (item, target, outcome, detail) +-- VALUES (_item, 'species_aliases', 'noop', 'redundant: a species row is itself named Drosophila, which the resolver already matches'); +-- ELSIF NOT EXISTS (SELECT 1 FROM public.species WHERE lower(btrim(common_name)) = 'fruit fly' OR lower(btrim(name)) = 'fruit fly') THEN +-- INSERT INTO kg_fix_report (item, target, outcome, detail) +-- VALUES (_item, 'species_aliases', 'skipped', 'no Fruit Fly species row to resolve to'); +-- ELSE +-- INSERT INTO public.species_aliases (alias, canonical, kind, common_name, note) +-- VALUES ('drosophila', 'Drosophila melanogaster', 'taxon_assumed', 'fruit fly', +-- 'Genus name used for the laboratory fruit fly, e.g. JAABA''s species text "Drosophila (fruit flies)"; D. melanogaster assumed.') +-- ON CONFLICT (alias) DO NOTHING; +-- INSERT INTO kg_fix_report (item, target, outcome, detail) +-- VALUES (_item, 'species_aliases', 'done', 'alias drosophila -> Drosophila melanogaster (taxon_assumed); takes effect once the exporter reads resources.metadata.species'); +-- END IF; +-- END +-- $do$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [datasets-O5] OPTIONAL: Credit PMID 39500574 (Cum et al. 2024) to R34DA059718 +-- QUESTION FOR A CURATOR: Did R34DA059718 fund PMID 39500574? RePORTER, the system of record, does not credit it, and #444 recorded 'no NIH credit'. +-- -- "A Multiparadigm Approach to Characterize Dominance Behaviors in CD1 and C57BL6 Male Mice" +-- -- (Cum ... Padilla-Coreano, eNeuro 2024). For: public/bbqs_marr.yaml:291 lists it under +-- -- R34DA059718 from an earlier RePORTER pull; its last author is R34DA059718's contact PI; it shares +-- -- three author ORCIDs with 41093749, which R34DA059718 is credited with; first author Meghan Cum is a +-- -- consortium member. Against: the current RePORTER pull (import-grant-publications, the system of +-- -- record for this link, Principle III) no longer returns it for R34DA059718 or any BBQS grant, and +-- -- the #444 review recorded "Cum et al. 2024, no NIH credit". So the lab or a curator must say the +-- -- grant supported it. If it is out of scope instead, it should be deleted, not linked. +-- CREATE OR REPLACE FUNCTION pg_temp.kg_o_datasets_o5() RETURNS void LANGUAGE plpgsql AS +-- $do$ +-- DECLARE +-- _item constant text := 'credit PMID 39500574 to R34DA059718'; +-- _pub record; +-- _pid uuid; +-- _have text; +-- BEGIN +-- PERFORM public.set_actor('migration:link_isolated_nodes'); +-- PERFORM public.set_source_class('curator_fill'); +-- SELECT id, resource_id, authors INTO _pub FROM public.publications WHERE pmid = '39500574'; +-- IF NOT FOUND THEN +-- INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, '39500574', 'skipped', 'publication not found'); +-- RETURN; +-- END IF; +-- IF _pub.resource_id IS DISTINCT FROM '36f00adf-1d84-4267-85c0-0af7379df8cc'::uuid THEN +-- INSERT INTO kg_fix_report (item, target, outcome, detail) +-- VALUES (_item, '39500574', 'report', format('spine row is %s, the 2026-11-04 export had 36f00adf-...', _pub.resource_id)); +-- END IF; +-- SELECT id INTO _pid FROM public.projects WHERE grant_number = 'R34DA059718'; +-- IF _pid IS NULL THEN +-- INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, '39500574', 'skipped', 'no R34DA059718 project row'); +-- RETURN; +-- END IF; +-- SELECT string_agg(p.grant_number, ', ') INTO _have +-- FROM public.project_publications pp JOIN public.projects p ON p.id = pp.project_id +-- WHERE pp.publication_id = _pub.id; +-- IF _have IS NOT NULL THEN +-- INSERT INTO kg_fix_report (item, target, outcome, detail) +-- VALUES (_item, '39500574', CASE WHEN _have ~ 'R34DA059718' THEN 'noop' ELSE 'skipped' END, 'already credited to ' || _have); +-- RETURN; +-- END IF; +-- IF coalesce(_pub.authors, '') !~* 'padilla[- ]?coreano' THEN +-- INSERT INTO kg_fix_report (item, target, outcome, detail) +-- VALUES (_item, '39500574', 'skipped', 'author list no longer names Padilla-Coreano'); +-- RETURN; +-- END IF; +-- -- constraint-agnostic, like import-grant-publications (index.ts:229-245) +-- INSERT INTO public.project_publications (project_id, publication_id) +-- SELECT _pid, _pub.id +-- WHERE NOT EXISTS (SELECT 1 FROM public.project_publications WHERE project_id = _pid AND publication_id = _pub.id); +-- INSERT INTO kg_fix_report (item, target, outcome, detail) +-- VALUES (_item, '39500574 -> R34DA059718', 'done', 'project_publications row added on a curator''s yes'); +-- EXCEPTION WHEN OTHERS THEN +-- INSERT INTO kg_fix_report (item, target, outcome, detail) VALUES (_item, '39500574', 'error', SQLSTATE || ': ' || SQLERRM); +-- END +-- $do$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [notices-06] OPTIONAL: The CIRTA announcement under MCGILL UNIVERSITY instead of BBQS Consortium +-- QUESTION FOR A CURATOR: Should the CIRTA announcement (its own text: 'McGill University is accepting nominations') move from the BBQS Consortium the 11-03 curator chose to McGill? +-- -- Its own text begins 'McGill University is accepting nominations for the Canada Impact+ Research +-- -- Training Awards', and both CIRTA job posts are already McGill's (part_of_org MCGILL UNIVERSITY). +-- -- The 11-03 curator edit put it under BBQS Consortium (#517 block 7: title 'Canada Impact+%'), so +-- -- this needs a curator's yes. It changes no isolated count: both organizations stay linked. +-- -- Moves both columns together (detail row, then spine row), and only from BBQS Consortium. +-- CREATE OR REPLACE FUNCTION pg_temp.kg_o_notices_06() RETURNS void LANGUAGE plpgsql AS +-- $do$ +-- DECLARE +-- _rid constant uuid := '46841d0e-4d55-4690-81f0-41c33f424bc8'; +-- _item constant text := 'CIRTA announcement -> McGill (optional)'; +-- _mcgill uuid := pg_temp.kg_org_of('c28b3fe8-8dbf-4037-ab56-fda6d170cfc4', 'MCGILL UNIVERSITY'); +-- _bbqs uuid := pg_temp.kg_org_of('766331fd-daea-4a31-86c4-589737e533ea', 'BBQS Consortium'); +-- _n int; +-- _m int; +-- BEGIN +-- PERFORM public.set_actor('migration:link_isolated_nodes'); +-- PERFORM public.set_source_class('curator_fill'); +-- IF _mcgill IS NULL OR _bbqs IS NULL THEN +-- INSERT INTO kg_fix_report (item, target, outcome, detail) +-- VALUES (_item, 'Canada Impact+ Research Training Awards (CIRTA)', 'skipped', 'MCGILL UNIVERSITY or BBQS Consortium not found'); +-- RETURN; +-- END IF; +-- UPDATE public.announcements SET organization_id = _mcgill, updated_at = now() +-- WHERE resource_id = _rid AND organization_id = _bbqs; +-- GET DIAGNOSTICS _n = ROW_COUNT; +-- UPDATE public.resources SET organization_id = _mcgill, updated_at = now() +-- WHERE id = _rid AND resource_type::text = 'announcement' AND organization_id = _bbqs; +-- GET DIAGNOSTICS _m = ROW_COUNT; +-- INSERT INTO kg_fix_report (item, target, outcome, detail) +-- VALUES (_item, 'Canada Impact+ Research Training Awards (CIRTA)', CASE WHEN _n + _m > 0 THEN 'done' ELSE 'noop' END, +-- format('moved to MCGILL UNIVERSITY: %s announcements row(s), %s spine row(s)', _n, _m)); +-- EXCEPTION WHEN OTHERS THEN +-- INSERT INTO kg_fix_report (item, target, outcome, detail) +-- VALUES (_item, 'Canada Impact+ Research Training Awards (CIRTA)', 'error', SQLSTATE || ': ' || SQLERRM); +-- END +-- $do$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [tools-03] OPTIONAL: Psych-DS -> MASSACHUSETTS INSTITUTE OF TECHNOLOGY, and Psych-DS was_attributed_to Melissa Kline Struhl +-- QUESTION FOR A CURATOR: Is Psych-DS Melissa Kline Struhl's standard, at MIT, to be recorded both as part of MIT and as attributed to her? The only source is a talk listing; the row's own description names neither, and was_attributed_to is the schema's record-provenance slot, not authorship. +-- -- tools-03 (OPTIONAL). One decision, two writes. The only statement is a talk listing, +-- -- src/pages/SFN2025.tsx:357-369 ('Presentations by Research Theme': "Psych-DS: FAIR data standard — +-- -- Melissa Kline Struhl (MIT)"); the Psych-DS row's own description (8e67d548) names neither MIT nor +-- -- her. She chairs WG-Standards (src/data/working-group-chairs.ts:9). The MIT link is implied by the +-- -- person behind the work, which by tools-07's rule makes it optional, and the attribution uses +-- -- was_attributed_to, which kg/bbqs.linkml.yaml:83-86 and :475-477 keep next to was_generated_by as +-- -- per-node RECORD provenance (the data verdict: do not reuse it for authorship). A yes therefore +-- -- also settles that slot question for this use. Psych-DS is funded outside BBQS (RF1MH132747), so +-- -- this is the standard's home, not a BBQS award. Needs tools-04's table for the second call. +-- CREATE OR REPLACE FUNCTION pg_temp.kg_o_tools_03() RETURNS void LANGUAGE plpgsql AS +-- $blk$ +-- BEGIN +-- -- Psych-DS -> MASSACHUSETTS INSTITUTE OF TECHNOLOGY (resources.organization_id, written as +-- -- part_of_org by today's exporter). Re-checked at run time: her record (0f3bb33c, not the +-- -- double-space stub 99e94e46 people-01 deletes) is still affiliated with that MIT node. +-- PERFORM pg_temp.kg_tools_set_org( +-- 'org: Psych-DS', '8e67d548-47b3-4b48-9a70-e5e22c56f062', +-- 'Psych-DS: A FAIR data standard for behavioral datasets', 'standard', +-- '7924e7d9-5b53-4525-95ef-3f5a6b9112a5', 'MASSACHUSETTS INSTITUTE OF TECHNOLOGY', +-- EXISTS (SELECT 1 FROM public.investigator_organizations io +-- JOIN public.investigators i ON i.id = io.investigator_id +-- WHERE i.resource_id = '0f3bb33c-e7ee-4013-af5d-894d1adfa0ee' +-- AND pg_temp.kg_norm(i.name) = 'melissa kline struhl' +-- AND io.organization_id = pg_temp.kg_org_of('7924e7d9-5b53-4525-95ef-3f5a6b9112a5', +-- 'MASSACHUSETTS INSTITUTE OF TECHNOLOGY')), +-- 'curator-confirmed: Psych-DS is Melissa Kline Struhl''s (MIT) standard; SFN2025.tsx:369 "Psych-DS: FAIR data standard — Melissa Kline Struhl (MIT)"; her record is an MIT member'); +-- -- Psych-DS was_attributed_to Melissa Kline Struhl (resource_links; an edge once the exporter reads +-- -- the table). The object is her linked record 0f3bb33c, never the stub 99e94e46. +-- PERFORM pg_temp.kg_tools_link( +-- 'link', '8e67d548-47b3-4b48-9a70-e5e22c56f062', 'Psych-DS: A FAIR data standard for behavioral datasets', 'standard', +-- 'was_attributed_to', +-- '0f3bb33c-e7ee-4013-af5d-894d1adfa0ee', 'Melissa Kline Struhl', 'investigator', 'curator_fill', +-- 'curator-confirmed: Psych-DS is attributed to Melissa Kline Struhl; SFN2025.tsx:369 "Psych-DS: FAIR data standard — Melissa Kline Struhl (MIT)"; WG-Standards chair (src/data/working-group-chairs.ts:9)', +-- EXISTS (SELECT 1 FROM public.investigators i +-- WHERE i.resource_id = '0f3bb33c-e7ee-4013-af5d-894d1adfa0ee' +-- AND pg_temp.kg_norm(i.name) = 'melissa kline struhl')); +-- END +-- $blk$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [tools-07] OPTIONAL: Organization links the repo does not state (VCL, Vocalocator, Vocalocator-SSL, SSL, senselab, OpenPose) +-- QUESTION FOR A CURATOR: Is each named organization the tool's maintainer (VCL Benchmark -> Simons Foundation or NYU; Vocalocator, Vocalocator-SSL, SSL -> NYU; senselab -> MIT; OpenPose -> CMU)? Keep only the confirmed lines. +-- -- Each needs a person's yes: the organization is implied by a URL host, a GitHub account or the +-- -- people behind a paper, not named in a statement about the resource. Uncomment a line only after +-- -- the project team or a curator confirms it. Same helper and guards as tools-02 (only where empty). +-- +-- -- tools-07. VCL Benchmark -> Simons Foundation. Hosted at vclbenchmark.flatironinstitute.org (export); +-- -- the Flatiron Institute is the Simons Foundation's research division, which no repo file says. +-- -- The benchmark's producing grant, R34DA059513, is at NEW YORK UNIVERSITY (public/bbqs_marr.yaml:189), +-- -- so NYU (5b794afd-cf08-4107-81c8-522a29714830) is the other candidate. tools-05 already links it to its project. +-- CREATE OR REPLACE FUNCTION pg_temp.kg_o_tools_07() RETURNS void LANGUAGE plpgsql AS +-- $blk$ +-- BEGIN +-- PERFORM pg_temp.kg_tools_set_org('org: VCL Benchmark', '4921bfdf-7432-48ac-911d-0cb825184ef1', 'VCL Benchmark', 'benchmark', +-- '1a88610e-c3bc-41b8-a97e-36698d0b0c28', 'Simons Foundation', +-- (SELECT r.external_url ILIKE '%flatironinstitute.org%' FROM public.resources r WHERE r.id = '4921bfdf-7432-48ac-911d-0cb825184ef1'), +-- 'hosted at vclbenchmark.flatironinstitute.org (Flatiron Institute = Simons Foundation); curator-confirmed'); +-- +-- -- tools-07. Vocalocator -> NEW YORK UNIVERSITY. github.com/neurostatslab/vocalocator; no repo file names +-- -- the lab. Its task matches the VCL paper's (R34DA059513, NYU; Alex Williams is co_pi there). +-- PERFORM pg_temp.kg_tools_set_org('org: Vocalocator', '515ee9e5-9453-4797-8017-f55c6dd7f1f7', 'Vocalocator', 'software', +-- '5b794afd-cf08-4107-81c8-522a29714830', 'NEW YORK UNIVERSITY', true, +-- 'curator-confirmed: neurostatslab is the Williams lab (NYU)'); +-- +-- -- tools-07. Vocalocator-SSL -> NEW YORK UNIVERSITY. github.com/Aramist/vocalocator-ssl; Aramis Tanelus is +-- -- an author of R34DA059513's papers (public/bbqs_marr.yaml:197,205) but nothing ties the account to him. +-- PERFORM pg_temp.kg_tools_set_org('org: Vocalocator-SSL', '16b2b3ec-077a-4101-9a4a-0f85f06b984e', 'Vocalocator-SSL', 'software', +-- '5b794afd-cf08-4107-81c8-522a29714830', 'NEW YORK UNIVERSITY', true, +-- 'curator-confirmed: Aramist = Aramis Tanelus (NYU, R34DA059513)'); +-- +-- -- tools-07. SSL (rodent USV detection & segmentation) -> NEW YORK UNIVERSITY. github.com/tianxiao18/ssl: +-- -- no repo or data tie at all; only grouped with the NYU audio tools by the diagnosis. Weakest of the set. +-- PERFORM pg_temp.kg_tools_set_org('org: SSL', '8c8402e7-5b64-4903-957e-8c7f3548512d', 'SSL (rodent USV detection & segmentation)', 'software', +-- '5b794afd-cf08-4107-81c8-522a29714830', 'NEW YORK UNIVERSITY', true, +-- 'curator-confirmed: made by the Sanes/Schneider/Williams teams (NYU)'); +-- +-- -- tools-07. senselab -> MASSACHUSETTS INSTITUTE OF TECHNOLOGY. The row has no URL; senselab is the sensein +-- -- lab's package (Satrajit Ghosh, MIT; contact_pi of U24DA064429 BARD.CC), which no repo file says. +-- PERFORM pg_temp.kg_tools_set_org('org: senselab', 'c6be2ee8-73b8-412e-8331-4eac1f2937de', 'senselab', 'software', +-- '7924e7d9-5b53-4525-95ef-3f5a6b9112a5', 'MASSACHUSETTS INSTITUTE OF TECHNOLOGY', true, +-- 'curator-confirmed: senselab is from the sensein lab (Ghosh, MIT)'); +-- +-- -- tools-07. OpenPose -> CARNEGIE-MELLON UNIVERSITY. Its repo is github.com/CMU-Perceptual-Computing-Lab/openpose +-- -- (export). Outside the listed scope: OpenPose is also linked by #512's uses_software once that merges. +-- PERFORM pg_temp.kg_tools_set_org('org: OpenPose', '529a7b7d-e25c-4d71-b61a-05733ab55f08', 'OpenPose', 'software', +-- 'fb3cf5ef-e850-44d2-887c-0d0ef608f48c', 'CARNEGIE-MELLON UNIVERSITY', +-- (SELECT r.external_url ILIKE '%github.com/CMU-Perceptual-Computing-Lab/%' FROM public.resources r WHERE r.id = '529a7b7d-e25c-4d71-b61a-05733ab55f08'), +-- 'repo github.com/CMU-Perceptual-Computing-Lab/openpose; curator-confirmed'); +-- END +-- $blk$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [tools-08] OPTIONAL: resource_links the repo does not state (SuperAnimal models trained_on their sets; VCL evaluates Vocalocator; leaderboards evaluate DLC Model Zoo and pose tools) +-- QUESTION FOR A CURATOR: Which node holds the SuperAnimal models (DLC Model Zoo, huggingface.co/mwmathis, or DLC Organization, huggingface.co/DeepLabCut), and were they trained on SuperAnimal-Quadruped-80K and SuperAnimal-TopViewMouse-5K? Does each benchmark evaluate the listed tool, and is the Animal Pose Leaderboard (paperswithcode.com) to be repointed or retired first? Keep only the confirmed lines. +-- -- Same helper and guards as tools-05; needs tools-04's table. Uncomment a call only after a curator confirms it. +-- +-- -- tools-08. The SuperAnimal models trained_on their two training sets. The datasets are DeepLabCut's own +-- -- SuperAnimal training sets ("Large-scale training data for quadruped pose models" / "Training data for +-- -- top-view mouse pose estimation", seed-resources/index.ts:27-28, src/data/resources.ts:188-203, hosted at +-- -- huggingface.co/datasets/DeepLabCut/). No repo statement says which node holds the models trained on +-- -- them: DLC Model Zoo (de29b286, "Pre-trained pose estimation for diverse species", huggingface.co/mwmathis, +-- -- seed-resources:23) or DLC Organization (0a91143c, huggingface.co/DeepLabCut, the same account as both +-- -- sets; its keep-or-merge is itself open). tool_device_registry.json:346 names only a pip extra +-- -- ('deeplabcut[gui,modelzoo] for SuperAnimal models'). Keep the pair for the node the curator names: +-- -- the DLC Model Zoo pair runs as written; for DLC Organization, delete that pair and take the inner '-- ' +-- -- off the other one. +-- CREATE OR REPLACE FUNCTION pg_temp.kg_o_tools_08() RETURNS void LANGUAGE plpgsql AS +-- $blk$ +-- BEGIN +-- PERFORM pg_temp.kg_tools_link('link', 'de29b286-d343-4108-90d9-3d11f8adc030', 'DLC Model Zoo', 'ml_model', 'trained_on', +-- '7d9026cf-064c-4070-a81c-858dc1303c4a', 'SuperAnimal-Quadruped-80K', 'dataset', 'curator_fill', +-- 'curator-confirmed: DLC Model Zoo holds the SuperAnimal quadruped models, trained on this set (seed-resources/index.ts:23,27)', +-- (SELECT r.external_url ILIKE '%huggingface.co/datasets/DeepLabCut/SuperAnimal-Quadruped%' +-- FROM public.resources r WHERE r.id = '7d9026cf-064c-4070-a81c-858dc1303c4a')); +-- PERFORM pg_temp.kg_tools_link('link', 'de29b286-d343-4108-90d9-3d11f8adc030', 'DLC Model Zoo', 'ml_model', 'trained_on', +-- 'd49fe87c-2047-4788-8247-2130a5e0d931', 'SuperAnimal-TopViewMouse-5K', 'dataset', 'curator_fill', +-- 'curator-confirmed: DLC Model Zoo holds the SuperAnimal top-view mouse models, trained on this set (seed-resources/index.ts:23,28)', +-- (SELECT r.external_url ILIKE '%huggingface.co/datasets/DeepLabCut/SuperAnimal-TopViewMouse%' +-- FROM public.resources r WHERE r.id = 'd49fe87c-2047-4788-8247-2130a5e0d931')); +-- -- PERFORM pg_temp.kg_tools_link('link', '0a91143c-35e4-4cf1-a1d5-301b6a8651ae', 'DLC Organization', 'ml_model', 'trained_on', +-- -- '7d9026cf-064c-4070-a81c-858dc1303c4a', 'SuperAnimal-Quadruped-80K', 'dataset', 'curator_fill', +-- -- 'curator-confirmed: DLC Organization holds the SuperAnimal quadruped models, trained on this set (seed-resources/index.ts:24,27)', +-- -- (SELECT r.external_url ILIKE '%huggingface.co/datasets/DeepLabCut/SuperAnimal-Quadruped%' +-- -- FROM public.resources r WHERE r.id = '7d9026cf-064c-4070-a81c-858dc1303c4a')); +-- -- PERFORM pg_temp.kg_tools_link('link', '0a91143c-35e4-4cf1-a1d5-301b6a8651ae', 'DLC Organization', 'ml_model', 'trained_on', +-- -- 'd49fe87c-2047-4788-8247-2130a5e0d931', 'SuperAnimal-TopViewMouse-5K', 'dataset', 'curator_fill', +-- -- 'curator-confirmed: DLC Organization holds the SuperAnimal top-view mouse models, trained on this set (seed-resources/index.ts:24,28)', +-- -- (SELECT r.external_url ILIKE '%huggingface.co/datasets/DeepLabCut/SuperAnimal-TopViewMouse%' +-- -- FROM public.resources r WHERE r.id = 'd49fe87c-2047-4788-8247-2130a5e0d931')); +-- +-- -- tools-08. VCL Benchmark evaluates Vocalocator. Both rows describe rodent sound-source localization from +-- -- multi-channel audio, but no repo file or column says the benchmark scores this tool. +-- PERFORM pg_temp.kg_tools_link('link', '4921bfdf-7432-48ac-911d-0cb825184ef1', 'VCL Benchmark', 'benchmark', 'evaluates', +-- '515ee9e5-9453-4797-8017-f55c6dd7f1f7', 'Vocalocator', 'software', 'curator_fill', +-- 'curator-confirmed: the VCL paper (PMID 39345431) benchmarks Vocalocator', true); +-- +-- -- tools-08. DLC Leaderboard evaluates DLC Model Zoo. The row says "DLC-based approaches" / "DLC variants"; +-- -- whether the pre-trained zoo models are among them is not stated. This one would make CQ31 answer. +-- PERFORM pg_temp.kg_tools_link('link', 'b9f28848-dd76-4bf7-9fd6-a4d1509154eb', 'DLC Leaderboard', 'benchmark', 'evaluates', +-- 'de29b286-d343-4108-90d9-3d11f8adc030', 'DLC Model Zoo', 'ml_model', 'curator_fill', +-- 'curator-confirmed: the DLC Leaderboard ranks the model-zoo models', true); +-- +-- -- tools-08. DLC Benchmarks evaluates DLC Model Zoo (the diagnosis's evaluated_by). Not stated anywhere. +-- PERFORM pg_temp.kg_tools_link('link', '858afe90-ab36-4d22-bfde-b4d7630a72ef', 'DLC Benchmarks', 'benchmark', 'evaluates', +-- 'de29b286-d343-4108-90d9-3d11f8adc030', 'DLC Model Zoo', 'ml_model', 'curator_fill', +-- 'curator-confirmed: benchmark.deeplabcut.org scores the model-zoo models', true); +-- +-- -- TO2d-g. Animal Pose Leaderboard evaluates DeepLabCut, SLEAP, DeepPoseKit, Lightning Pose. The row says +-- -- only "Comparative ranking of pose estimation methods" and points at paperswithcode.com, which (to our +-- -- knowledge; not reachable from here) was shut down in July 2025. Decide first whether this node should +-- -- be repointed or retired; do not record what a dead page ranked. Lightning Pose is the surviving 3ba48c59. +-- PERFORM pg_temp.kg_tools_link('link', '83f2b36c-b0c8-4d4e-a1aa-08639a4068ae', 'Animal Pose Leaderboard', 'benchmark', 'evaluates', +-- '4009a1f6-c173-495b-9725-bb51571a3cdf', 'DeepLabCut', 'software', 'curator_fill', 'curator-confirmed: <source that lists DeepLabCut>', true); +-- PERFORM pg_temp.kg_tools_link('link', '83f2b36c-b0c8-4d4e-a1aa-08639a4068ae', 'Animal Pose Leaderboard', 'benchmark', 'evaluates', +-- '340ce805-e6f8-454a-bb4b-83ef53e0d444', 'SLEAP', 'software', 'curator_fill', 'curator-confirmed: <source that lists SLEAP>', true); +-- PERFORM pg_temp.kg_tools_link('link', '83f2b36c-b0c8-4d4e-a1aa-08639a4068ae', 'Animal Pose Leaderboard', 'benchmark', 'evaluates', +-- 'c7d588c7-1778-4d8c-b7f6-03d8060463fb', 'DeepPoseKit', 'software', 'curator_fill', 'curator-confirmed: <source that lists DeepPoseKit>', true); +-- PERFORM pg_temp.kg_tools_link('link', '83f2b36c-b0c8-4d4e-a1aa-08639a4068ae', 'Animal Pose Leaderboard', 'benchmark', 'evaluates', +-- '3ba48c59-bb79-44ef-8569-ca644775d73a', 'Lightning Pose', 'software', 'curator_fill', 'curator-confirmed: <source that lists Lightning Pose>', true); +-- END +-- $blk$; + +-- ──────────────────────────────────────────────────────────────────────────────────────────────── +-- [tools-09] OPTIONAL: device_class_crosswalk plethysmography -> ppg +-- QUESTION FOR A CURATOR: Is every grant's 'plethysmography' evidence a pulse/PPG sensor, not whole-body plethysmography (breathing)? Run the SELECT in its comment first. +-- -- The old taxonomy calls the key "Plethysmography (PPG)" (src/pages/Devices.tsx:45), but in rodent +-- -- work "plethysmography" usually means whole-body plethysmography, which measures breathing +-- -- (respiration), not photoplethysmography. Run the SELECT first; uncomment the INSERT only if every +-- -- grant it lists records a pulse/PPG sensor. +-- -- SELECT e.seed_grant_number, e.depth, e.use_case, e.device_hardware +-- -- FROM public.grant_methods_evidence e WHERE 'plethysmography' = ANY (e.device_class); +-- CREATE OR REPLACE FUNCTION pg_temp.kg_o_tools_09() RETURNS void LANGUAGE plpgsql AS +-- $do$ +-- DECLARE _n int; +-- BEGIN +-- PERFORM public.set_actor('migration:link_isolated_nodes'); +-- PERFORM public.set_source_class('curator_fill'); +-- IF NOT EXISTS (SELECT 1 FROM public.device_categories WHERE key = 'ppg') +-- OR EXISTS (SELECT 1 FROM public.device_class_crosswalk WHERE legacy_key = 'plethysmography' AND category_key <> 'ppg') THEN +-- INSERT INTO kg_fix_report (item, target, outcome, detail) +-- VALUES ('device crosswalk', 'plethysmography -> ppg', 'skipped', 'no ppg category, or plethysmography is already mapped elsewhere'); +-- RETURN; +-- END IF; +-- INSERT INTO public.device_class_crosswalk (legacy_key, category_key) VALUES ('plethysmography', 'ppg') +-- ON CONFLICT (legacy_key, category_key) DO NOTHING; +-- GET DIAGNOSTICS _n = ROW_COUNT; +-- INSERT INTO kg_fix_report (item, target, outcome, detail) +-- VALUES ('device crosswalk', 'plethysmography -> ppg', CASE WHEN _n > 0 THEN 'done' ELSE 'noop' END, +-- 'curator-confirmed: the grants'' plethysmography evidence is PPG'); +-- END +-- $do$; + +-- ════════════════════════════════════════════════════════════════════════════════════════════════ +-- 4. RUN. One DO block runs every block above in order, inside one savepoint: +-- * dry run ('on'): at the end the savepoint is rolled back (every write, the DDL included), and +-- the report rows are put back, so the editor still shows them; +-- * real run ('off'): committed below, unless any block reported an error: then NOTHING is +-- changed and the editor shows the errors. +-- ════════════════════════════════════════════════════════════════════════════════════════════════ +DO $kg$ +DECLARE + kg_dry constant boolean := coalesce(current_setting('bbqs.dry_run', true), 'on') IS DISTINCT FROM 'off'; + kg_keep pg_temp.kg_fix_report[]; + kg_errs int := 0; + kg_list text; +BEGIN + BEGIN + PERFORM pg_temp.kg_run(1, 'datasets-D00', 'Pre-flight (read-only): which ember-dandiset-sync is live', 'pg_temp.kg_b_datasets_d00'); + PERFORM pg_temp.kg_run(2, 'people-01', 'Delete the 14 orphan investigator spine rows', 'pg_temp.kg_b_people_01'); + PERFORM pg_temp.kg_run(3, 'people-02', 'Delete the ''TestUser Tier2'' test record', 'pg_temp.kg_b_people_02'); + PERFORM pg_temp.kg_run(4, 'people-03', 'Merge ''Niegil Francis Muttath Joseph'' (83e96042) into ''Niegil Francis'' (af80d437)', 'pg_temp.kg_b_people_03'); + PERFORM pg_temp.kg_run(5, 'tools-01', 'Fold the duplicate Lightning Pose spine row 444f664a into 3ba48c59', 'pg_temp.kg_b_tools_01'); + PERFORM pg_temp.kg_run(6, 'notices-03', 'Merge the superseded forecast RFA-NS-26-011 into RFA-NS-27-002', 'pg_temp.kg_b_notices_03'); + PERFORM pg_temp.kg_run(7, 'datasets-D01', 'Apply 20261105120000 (dandisets.hidden*, CHECK, set_dandiset_hidden) where missing', 'pg_temp.kg_b_datasets_d01'); + PERFORM pg_temp.kg_run(8, 'datasets-D02', 'Hide the 28 IDP/ARC integration-test uploads (#506)', 'pg_temp.kg_b_datasets_d02'); + PERFORM pg_temp.kg_run(9, 'datasets-D03', 'Hide the four test uploads 000001, 000003, 000431, 000467 (#506)', 'pg_temp.kg_b_datasets_d03'); + PERFORM pg_temp.kg_run(10, 'datasets-D04', 'Hide ''Single Click Science'' (000468): synthetic mock data, #444 Exclude', 'pg_temp.kg_b_datasets_d04'); + PERFORM pg_temp.kg_run(11, 'datasets-D05', '''Pozu: Missing subjects'' (000472): hide if it has 0 files, else link it to R24MH136632', 'pg_temp.kg_b_datasets_d05'); + PERFORM pg_temp.kg_run(12, 'datasets-D09', 'Merge species ''Acoel Flatworm'' (10ceb449) into Hofstenia miamia (d6fbdcc7)', 'pg_temp.kg_b_datasets_d09'); + PERFORM pg_temp.kg_run(13, 'people-05', 'Affiliate the 11 NIH program staff with their institute (or NIH)', 'pg_temp.kg_b_people_05'); + PERFORM pg_temp.kg_run(14, 'people-07', 'Affiliate 15 members with the existing organization node their institution names', 'pg_temp.kg_b_people_07'); + PERFORM pg_temp.kg_run(15, 'people-08', 'Affiliate 3 members with University College London and University of Washington, creating each with its first member', 'pg_temp.kg_b_people_08'); + PERFORM pg_temp.kg_run(16, 'people-10', 'Both Walker records side by side (read-only; the merge itself is optional)', 'pg_temp.kg_b_people_10_report'); + PERFORM pg_temp.kg_run(17, 'notices-01', 'Copy announcements'' (and jobs'') organization onto their spine rows', 'pg_temp.kg_b_notices_01'); + PERFORM pg_temp.kg_run(18, 'notices-02', 'Event ''BBQS MIT Workshop 2026'' -> BBQS Consortium', 'pg_temp.kg_b_notices_02'); + PERFORM pg_temp.kg_run(19, 'notices-04', 'Each funding call''s issuer, from its own FON -> resources.organization_id', 'pg_temp.kg_b_notices_04'); + PERFORM pg_temp.kg_run(20, 'tools-02', 'Lightning Pose (3ba48c59) -> COLUMBIA UNIVERSITY HEALTH SCIENCES', 'pg_temp.kg_b_tools_02'); + PERFORM pg_temp.kg_run(21, 'datasets-D06', 'Link the EMBER collections 000469, 000470, 000471, 000474 to R24MH136632 (roster evidence)', 'pg_temp.kg_b_datasets_d06'); + PERFORM pg_temp.kg_run(22, 'datasets-D07', 'Link ''Four-choice reversal digging task'' (000607) to R34DA062119', 'pg_temp.kg_b_datasets_d07'); + PERFORM pg_temp.kg_run(23, 'datasets-D08', 'Link datasets whose own DANDI record names a BBQS award the sync''s parser dropped', 'pg_temp.kg_b_datasets_d08'); + PERFORM pg_temp.kg_run(24, 'tools-04', 'Create public.resource_links (audited, anon-readable, typed by LinkML slot)', 'pg_temp.kg_b_tools_04'); + PERFORM pg_temp.kg_run(25, 'tools-05', 'Record the two evidenced links in resource_links', 'pg_temp.kg_b_tools_05'); + PERFORM pg_temp.kg_run(26, 'tools-06', 'device_class_crosswalk rows for the isolated device categories', 'pg_temp.kg_b_tools_06'); + -- optional blocks: run only if uncommented in section 3 + PERFORM pg_temp.kg_run_optional(27, 'people-04', 'Give the merged Niegil record the fuller name on both rows', 'pg_temp.kg_o_people_04', + 'Should the merged record be named ''Niegil Francis Muttath Joseph'' on both rows? (publications credit him as ''Francis, Niegil'')'); + PERFORM pg_temp.kg_run_optional(28, 'people-09', 'Jongwoon Kim''s affiliation: NEW YORK UNIVERSITY SCHOOL OF MEDICINE, COLUMBIA UNIVERSITY HEALTH SCIENCES, or both', 'pg_temp.kg_o_people_09', + 'Is Jongwoon Kim at NYU Langone, Columbia, or both today? Keep the line(s) that apply.'); + PERFORM pg_temp.kg_run_optional(29, 'people-10-merge', 'Merge ''Jeffrey Walker'' (e1424ffb) into ''Jeffery Walker'' (7a5a1c11) and take the spelling ''Jeffrey''', 'pg_temp.kg_o_people_10', + 'Are ''Jeffrey Walker'' (e1424ffb) and ''Jeffery Walker'' (7a5a1c11, Yale) one person? 20260826120000 judged them two people at two institutions; the people-10 report rows show both records.'); + PERFORM pg_temp.kg_run_optional(30, 'datasets-O1', 'Hide 000598 ''EMBER Bees DeepLabCut Training — Workflow Smoke Test'' (linked, not isolated)', 'pg_temp.kg_o_datasets_o1', + 'Hide the smoke test #506 lists, although a curator linked it to EMBER on 2026-11-03 (#517 block 10)? It removes a linked node and fixes no isolated one.'); + PERFORM pg_temp.kg_run_optional(31, 'datasets-O2a', 'Link the SLEAP re-hosts 000265 and 000398 to R24MH136632 (or hide them)', 'pg_temp.kg_o_datasets_o2a', + 'Are 000265 and 000398 (public sleap.ai data re-hosted on EMBER-DANDI) EMBER demos to credit to R24MH136632, or copies to hide (the two commented kg_ds_hide lines inside)?'); + PERFORM pg_temp.kg_run_optional(32, 'datasets-O2b', 'Link whichever EMBER collections D05/D06 skipped for want of roster evidence', 'pg_temp.kg_o_datasets_o2b', + 'Does EMBER confirm that each collection datasets-D05/D06 skipped (see their report rows) is its own? Keep only those lines.'); + PERFORM pg_temp.kg_run_optional(33, 'datasets-O3', 'Confirm species candidate Cricket for R34DA059512 (append) + alias cricket -> Gryllidae', 'pg_temp.kg_o_datasets_o3', + 'Does R34DA059512 study the cricket (its prey) as a species? On 2026-11-03 the curator set [''Mus musculus''] only.'); + PERFORM pg_temp.kg_run_optional(34, 'datasets-O4', 'Alias ''drosophila'' -> Drosophila melanogaster (Fruit Fly) for JAABA', 'pg_temp.kg_o_datasets_o4', + 'Is a ''drosophila'' -> Drosophila melanogaster alias wanted? (Probably a no-op: the Fruit Fly row is named ''Drosophila''.)'); + PERFORM pg_temp.kg_run_optional(35, 'datasets-O5', 'Credit PMID 39500574 (Cum et al. 2024) to R34DA059718', 'pg_temp.kg_o_datasets_o5', + 'Did R34DA059718 fund PMID 39500574? RePORTER, the system of record, does not credit it, and #444 recorded ''no NIH credit''.'); + PERFORM pg_temp.kg_run_optional(36, 'notices-06', 'The CIRTA announcement under MCGILL UNIVERSITY instead of BBQS Consortium', 'pg_temp.kg_o_notices_06', + 'Should the CIRTA announcement (its own text: ''McGill University is accepting nominations'') move from the BBQS Consortium the 11-03 curator chose to McGill?'); + PERFORM pg_temp.kg_run_optional(37, 'tools-03', 'Psych-DS -> MASSACHUSETTS INSTITUTE OF TECHNOLOGY, and Psych-DS was_attributed_to Melissa Kline Struhl', 'pg_temp.kg_o_tools_03', + 'Is Psych-DS Melissa Kline Struhl''s standard, at MIT, to be recorded both as part of MIT and as attributed to her? The only source is a talk listing; the row''s own description names neither, and was_attributed_to is the schema''s record-provenance slot, not authorship.'); + PERFORM pg_temp.kg_run_optional(38, 'tools-07', 'Organization links the repo does not state (VCL, Vocalocator, Vocalocator-SSL, SSL, senselab, OpenPose)', 'pg_temp.kg_o_tools_07', + 'Is each named organization the tool''s maintainer (VCL Benchmark -> Simons Foundation or NYU; Vocalocator, Vocalocator-SSL, SSL -> NYU; senselab -> MIT; OpenPose -> CMU)? Keep only the confirmed lines.'); + PERFORM pg_temp.kg_run_optional(39, 'tools-08', 'resource_links the repo does not state (SuperAnimal models trained_on their sets; VCL evaluates Vocalocator; leaderboards evaluate DLC Model Zoo and pose tools)', 'pg_temp.kg_o_tools_08', + 'Which node holds the SuperAnimal models (DLC Model Zoo, huggingface.co/mwmathis, or DLC Organization, huggingface.co/DeepLabCut), and were they trained on SuperAnimal-Quadruped-80K and SuperAnimal-TopViewMouse-5K? Does each benchmark evaluate the listed tool, and is the Animal Pose Leaderboard (paperswithcode.com) to be repointed or retired first? Keep only the confirmed lines.'); + PERFORM pg_temp.kg_run_optional(40, 'tools-09', 'device_class_crosswalk plethysmography -> ppg', 'pg_temp.kg_o_tools_09', + 'Is every grant''s ''plethysmography'' evidence a pulse/PPG sensor, not whole-body plethysmography (breathing)? Run the SELECT in its comment first.'); + -- read-only reports, last, so they describe the end state + PERFORM pg_temp.kg_run(41, 'people-01-report', 'Remaining orphan spine rows, and person rows with no spine row (read-only)', 'pg_temp.kg_b_people_01_report'); + PERFORM pg_temp.kg_run(42, 'people-11', 'The 4 name-only records: what their own rows hold (read-only; not fixable by SQL)', 'pg_temp.kg_b_people_11'); + PERFORM pg_temp.kg_run(43, 'datasets-D10', 'Datasets still unlinked, with their DANDI contact; stale spine names (read-only)', 'pg_temp.kg_b_datasets_d10'); + PERFORM pg_temp.kg_run(44, 'notices-05', 'Participating-only funder organizations: edges today, funding_opportunity_orgs rows (read-only)', 'pg_temp.kg_b_notices_05'); + PERFORM pg_temp.kg_run(45, 'tools-10', 'Device-category reach, unmapped buckets, tool nodes still unlinked (read-only)', 'pg_temp.kg_b_tools_10'); + + SELECT count(*) INTO kg_errs FROM pg_temp.kg_fix_report WHERE kind = 'decision' AND outcome = 'error'; + IF kg_dry OR kg_errs > 0 THEN + SELECT array_agg(r ORDER BY r.seq) INTO kg_keep FROM pg_temp.kg_fix_report r; + RAISE EXCEPTION USING ERRCODE = 'KG000', MESSAGE = 'link_isolated_nodes: rolling the run back'; + END IF; + EXCEPTION WHEN SQLSTATE 'KG000' THEN + -- Every write above is undone at this point; only the report survives (it was copied first). + INSERT INTO pg_temp.kg_fix_report SELECT * FROM unnest(kg_keep); + END; + PERFORM public.set_actor('migration:link_isolated_nodes'); + IF NOT kg_dry AND kg_errs > 0 THEN + SELECT string_agg(format('[%s] %s · %s · %s', r.block, r.item, coalesce(r.target, ''), r.detail), E'\n' ORDER BY r.seq) + INTO kg_list FROM pg_temp.kg_fix_report r WHERE r.kind = 'decision' AND r.outcome = 'error'; + RAISE EXCEPTION E'link_isolated_nodes: NOTHING WAS CHANGED, % error(s):\n%', kg_errs, kg_list + USING HINT = 'Set the dry-run switch back to ''on'' and run again to see the whole report; fix the cause, or comment out that block''s line in section 4.'; + END IF; + PERFORM pg_temp.kg_result(kg_dry); +END +$kg$; + +COMMIT; + +-- The report (the editor shows only this last result): RESULT, then one summary row per block +-- (rows = rows written), then every decision. In a dry run it shows what WOULD be written. +SELECT * FROM pg_temp.kg_report(); diff --git a/supabase/migrations/20261117160000_funding_call_expiration_dates.sql b/supabase/migrations/20261117160000_funding_call_expiration_dates.sql new file mode 100644 index 00000000..bc634acd --- /dev/null +++ b/supabase/migrations/20261117160000_funding_call_expiration_dates.sql @@ -0,0 +1,85 @@ +-- ════════════════════════════════════════════════════════════════════════════════════════════════ +-- 20261117160000_funding_call_expiration_dates.sql +-- Fill the expiration date of the funding calls that have none, from each call's own notice. +-- ════════════════════════════════════════════════════════════════════════════════════════════════ +-- +-- WHY. Seven of the 13 calls in the 2026-11-17 export have no expiration_date: the five PRIMED-AI +-- RFAs (RFA-RM-27-011 to -015), NSF 26-526 (GRFP) and the Simons Empire AI RFA. Two things follow: +-- * CQ39 ("Which funding opportunities expire between 2026-10-14 and 2027-04-14?") finds none. +-- * close-expired-funding-daily (07:15 UTC, 20260508185044) closes a call only once its +-- expiration_date has passed, so it can never close these: the Funding page still lists the +-- PRIMED-AI calls and the GRFP as open, although their deadlines passed in October 2026. +-- +-- WHAT. One UPDATE, and only where expiration_date is still empty: a date already set is never +-- overwritten, and a second run changes nothing. The dates, as each call's notice gives them +-- (CHECK THEM against the notice before applying; the notices were read through a web search, +-- because this script was written where grants.nih.gov and simpler.grants.gov are not reachable): +-- RFA-RM-27-011 2026-10-10 Expiration Date (applications due 2026-10-09) +-- RFA-RM-27-012 2026-10-20 Expiration Date (applications due 2026-10-19) +-- RFA-RM-27-013 2026-10-20 Expiration Date (applications due 2026-10-19) +-- RFA-RM-27-014 2026-10-03 Expiration Date (applications due 2026-10-02) +-- NSF 26-526 2026-10-23 the last of the solicitation's deadlines by field (2026-10-19 to -23) +-- SIMONS-EMPIRE-AI-2026 2026-12-01 the application deadline, noon ET (the foundation calls this +-- cycle, announced 2026-09-01, its "2027 Request for Applications") +-- RFA-RM-27-015 is left out: listings give its application due date (2026-10-02), but no +-- expiration date was found. Add it by hand from the notice: the Key Dates section's +-- "Expiration Date". +-- Sources: each row's own external_url (simpler.grants.gov/opportunity/..., nsf.gov/.../nsf26-526, +-- simonsfoundation.org/grant/utilizing-the-full-power-of-empire-ai-request-for-applications/). +-- +-- EFFECT. CQ39 then returns RFA-RM-27-012, RFA-RM-27-013, NSF 26-526 and SIMONS-EMPIRE-AI-2026. +-- At the next 07:15 UTC run, close-expired-funding-daily marks the five calls whose date has passed +-- as closed (the script itself does not touch status); the Simons call stays open until 2026-12-01. +-- +-- HOW TO APPLY: Supabase SQL editor, project vpexxhfpvghlejljwpvt. Paste the WHOLE file, Run. It is +-- one transaction; the last statement lists the seven calls with their date and whether this run +-- set it. Every change is audited under 'migration:funding_call_expiration_dates' (Principle X). +-- UNDO: data_audit_log keeps old_data for each UPDATE; set expiration_date back to NULL for those ids. +-- ════════════════════════════════════════════════════════════════════════════════════════════════ + +-- Temp tables of an earlier run in this editor session go first, so the script can run again. +DROP TABLE IF EXISTS pg_temp.kg_call_dates, pg_temp.kg_call_dates_set; + +BEGIN; +SELECT public.set_actor('migration:funding_call_expiration_dates'); +SELECT public.set_source_class('curator_fill'); + +CREATE TEMP TABLE kg_call_dates (fon text PRIMARY KEY, expires date NOT NULL, basis text NOT NULL); +INSERT INTO kg_call_dates (fon, expires, basis) VALUES + ('RFA-RM-27-011', DATE '2026-10-10', 'the notice''s Expiration Date (applications due 2026-10-09)'), + ('RFA-RM-27-012', DATE '2026-10-20', 'the notice''s Expiration Date (applications due 2026-10-19)'), + ('RFA-RM-27-013', DATE '2026-10-20', 'the notice''s Expiration Date (applications due 2026-10-19)'), + ('RFA-RM-27-014', DATE '2026-10-03', 'the notice''s Expiration Date (applications due 2026-10-02)'), + ('NSF 26-526', DATE '2026-10-23', 'the last of the solicitation''s deadlines by field (2026-10-19 to 2026-10-23)'), + ('SIMONS-EMPIRE-AI-2026', DATE '2026-12-01', 'the application deadline, 12 p.m. ET'); + +CREATE TEMP TABLE kg_call_dates_set (fon text PRIMARY KEY); +WITH done AS ( + UPDATE public.funding_opportunities AS f + SET expiration_date = d.expires + FROM kg_call_dates AS d + WHERE f.fon = d.fon + AND f.expiration_date IS NULL + RETURNING f.fon +) +INSERT INTO kg_call_dates_set SELECT fon FROM done; + +COMMIT; + +-- The report (the editor shows only this last result). +SELECT d.fon, + f.expiration_date, + f.status, + CASE WHEN f.id IS NULL THEN 'skipped: no call with this FON' + WHEN s.fon IS NOT NULL THEN 'set by this run: ' || d.basis + WHEN f.expiration_date = d.expires THEN 'already this date (nothing changed)' + ELSE format('left as it was: the call already has %s (this script would have set %s)', f.expiration_date, d.expires) + END AS outcome + FROM kg_call_dates AS d + LEFT JOIN public.funding_opportunities AS f ON f.fon = d.fon + LEFT JOIN kg_call_dates_set AS s ON s.fon = d.fon +UNION ALL +SELECT f.fon, f.expiration_date, f.status, 'not in this script: add its Expiration Date by hand from the notice' + FROM public.funding_opportunities AS f + WHERE f.fon = 'RFA-RM-27-015' + ORDER BY 2 NULLS LAST, 1; diff --git a/supabase/migrations/20261117170000_public_job_posters.sql b/supabase/migrations/20261117170000_public_job_posters.sql new file mode 100644 index 00000000..5f4c6624 --- /dev/null +++ b/supabase/migrations/20261117170000_public_job_posters.sql @@ -0,0 +1,79 @@ +-- public_job_posters: who posted each job, as a link between two spine rows. +-- +-- Why. A job's poster is public now (2026-11-17), so the knowledge graph can answer CQ37 ("Who +-- posted each job?") from the anon export. public_jobs deliberately has no posted_by: it is an auth +-- user id, hidden from anon with the contact fields by 20260515233153, and it stays hidden. This view +-- gives the poster as their investigator SPINE row (resources.id), which the anon export already +-- has as a node, and nothing else: no auth user id, no email, no contact field. A job is listed only +-- when both ends exist: the job has a 'job' spine row, and its posted_by is the user_id of an +-- investigator with an 'investigator' spine row. +-- +-- Apply by hand: paste the whole file into the SQL editor for vpexxhfpvghlejljwpvt and run it once. +-- Running it again changes nothing. The last statement reports how many jobs got a poster link. +-- Undo: DROP VIEW IF EXISTS public.public_job_posters; -- nothing depends on it; the exporter then +-- writes no posted_by and says so. + +SELECT public.set_actor('migration:public_job_posters'); + +-- CREATE OR REPLACE VIEW cannot change the columns of an existing view (42P16). So a +-- public_job_posters with other columns is dropped first, without CASCADE: if anything depends on +-- it, the script stops and changes nothing. Something else of that name also stops it. +DO $guard$ +DECLARE + _kind "char"; + _cols text; +BEGIN + SELECT c.relkind, + string_agg(a.attname || ' ' || format_type(a.atttypid, a.atttypmod), ', ' ORDER BY a.attnum) + INTO _kind, _cols + FROM pg_class c + JOIN pg_namespace n ON n.oid = c.relnamespace AND n.nspname = 'public' + LEFT JOIN pg_attribute a ON a.attrelid = c.oid AND a.attnum > 0 AND NOT a.attisdropped + WHERE c.relname = 'public_job_posters' + GROUP BY c.relkind; + IF _kind IS NULL THEN + RETURN; + ELSIF _kind <> 'v' THEN + RAISE EXCEPTION 'public.public_job_posters exists and is not a view (relkind %): not touched', _kind; + ELSIF _cols IS DISTINCT FROM 'job_resource_id uuid, poster_resource_id uuid' THEN + DROP VIEW public.public_job_posters; + RAISE NOTICE 'public.public_job_posters had columns (%): dropped, recreated below', _cols; + END IF; +END +$guard$; + +-- Owner rights (security_invoker = false), as investigators_public: anon cannot read jobs or +-- investigators, and reads only these two columns. +CREATE OR REPLACE VIEW public.public_job_posters +WITH (security_invoker = false) AS +SELECT DISTINCT j.resource_id AS job_resource_id, + i.resource_id AS poster_resource_id + FROM public.jobs j + JOIN public.resources jr ON jr.id = j.resource_id AND jr.resource_type = 'job' + JOIN public.investigators i ON i.user_id = j.posted_by + JOIN public.resources ir ON ir.id = i.resource_id AND ir.resource_type = 'investigator'; + +COMMENT ON VIEW public.public_job_posters IS + 'Who posted each job: the job''s spine row -> the poster''s investigator spine row (jobs.posted_by = ' + 'investigators.user_id). Public (20261117170000); exposes no auth user id, email or contact field.'; + +-- Read only. Supabase's default privileges give anon and authenticated every privilege on a new view. +REVOKE ALL ON public.public_job_posters FROM PUBLIC, anon, authenticated; +GRANT SELECT ON public.public_job_posters TO anon, authenticated; + +-- ── Report (read-only) ────────────────────────────────────────────────────────────────────────── +-- with_a_poster_link is what the export can write. The next three say why a job has none (a job can +-- have more than one reason): poster_not_linked means a poster is recorded but is no investigator +-- with a spine row (or the job's spine row is not typed 'job'). with_more_than_one_poster counts jobs +-- whose poster's user id is on two investigator rows: a duplicate person to merge. +SELECT count(*) AS jobs, + count(*) FILTER (WHERE p.job_resource_id IS NOT NULL) AS with_a_poster_link, + count(*) FILTER (WHERE j.resource_id IS NULL) AS no_spine_row, + count(*) FILTER (WHERE j.posted_by IS NULL) AS no_poster_recorded, + count(*) FILTER (WHERE j.resource_id IS NOT NULL AND j.posted_by IS NOT NULL + AND p.job_resource_id IS NULL) AS poster_not_linked, + count(*) FILTER (WHERE p.posters > 1) AS with_more_than_one_poster + FROM public.jobs j + LEFT JOIN (SELECT job_resource_id, count(*) AS posters + FROM public.public_job_posters GROUP BY job_resource_id) p + ON p.job_resource_id = j.resource_id; diff --git a/supabase/migrations/20261117174500_revoke_writes_through_views.sql b/supabase/migrations/20261117174500_revoke_writes_through_views.sql new file mode 100644 index 00000000..6a7265cf --- /dev/null +++ b/supabase/migrations/20261117174500_revoke_writes_through_views.sql @@ -0,0 +1,83 @@ +-- ════════════════════════════════════════════════════════════════════════════════════════════════ +-- 20261117174500_revoke_writes_through_views.sql +-- SECURITY: visitors could write through the public views. Take every write privilege on every view +-- in schema public away from anon and authenticated; reading is unchanged. +-- ════════════════════════════════════════════════════════════════════════════════════════════════ +-- +-- WHY. Supabase's default privileges grant ALL on every new table AND view in public to anon and +-- authenticated. For a table that is harmless, because row-level security decides what each caller +-- may touch. A view is different: a simple view is automatically updatable, and one that runs with +-- its owner's rights (security_invoker unset or false, as investigators_public, public_jobs, +-- feature_suggestions_public and investigator_directory do on purpose, to show a sanitized subset +-- of a hidden table) passes an UPDATE, INSERT or DELETE straight through to the base table as the +-- owner, which row-level security does not stop. On a replica of this schema (2026-11-17): +-- SET ROLE anon; UPDATE public.public_jobs SET title = '...' WHERE id = ...; -- UPDATE 1 +-- SET ROLE anon; UPDATE public.feature_suggestions_public SET title = '...' WHERE id = ...; -- UPDATE 1 +-- and the rows in jobs and feature_suggestions changed. authenticated held the same rights on +-- investigators_public and investigator_directory, i.e. any signed-in user could rewrite another +-- person's public profile fields. +-- +-- WHAT. For every view in schema public: REVOKE INSERT, UPDATE, DELETE, TRUNCATE, TRIGGER, +-- REFERENCES from anon, authenticated and PUBLIC. SELECT stays exactly as granted, so every page +-- that reads a view keeps working. Nothing in src/ or supabase/functions writes through a view +-- (checked 2026-11-17); edge functions run as service_role, which this does not touch. Views created +-- later must revoke the same rights themselves: tests/guards/view-write-privileges holds every +-- migration after this one to that. +-- +-- CHECK FIRST (read-only; shows which views visitors could write through today): +-- SELECT table_name, grantee, string_agg(privilege_type, ', ' ORDER BY privilege_type) AS privileges +-- FROM information_schema.role_table_grants +-- WHERE table_schema = 'public' AND grantee IN ('anon', 'authenticated', 'PUBLIC') +-- AND privilege_type IN ('INSERT', 'UPDATE', 'DELETE', 'TRUNCATE') +-- AND table_name IN (SELECT table_name FROM information_schema.views WHERE table_schema = 'public') +-- GROUP BY 1, 2 ORDER BY 1, 2; +-- +-- HOW TO APPLY: Supabase SQL editor, project vpexxhfpvghlejljwpvt, as its default role (postgres). +-- Paste the WHOLE file, Run. One transaction; a second run changes nothing. The last statement lists +-- each view with what anon and authenticated may still do (SELECT only, where they could before). +-- UNDO (do not, unless a client is found that must write through a view): GRANT the privilege back on +-- that one view, e.g. GRANT UPDATE ON public.<view> TO authenticated. +-- ════════════════════════════════════════════════════════════════════════════════════════════════ + +DROP TABLE IF EXISTS pg_temp.kg_view_writes_before; + +BEGIN; +SELECT public.set_actor('migration:revoke_writes_through_views'); + +CREATE TEMP TABLE kg_view_writes_before AS +SELECT g.table_name::text AS view_name, g.grantee::text AS grantee, + string_agg(g.privilege_type::text, ', ' ORDER BY g.privilege_type::text) AS could_write + FROM information_schema.role_table_grants g + WHERE g.table_schema = 'public' AND g.grantee IN ('anon', 'authenticated', 'PUBLIC') + AND g.privilege_type IN ('INSERT', 'UPDATE', 'DELETE', 'TRUNCATE', 'TRIGGER', 'REFERENCES') + AND g.table_name IN (SELECT v.table_name FROM information_schema.views v WHERE v.table_schema = 'public') + GROUP BY 1, 2; + +DO $revoke$ +DECLARE _v regclass; +BEGIN + FOR _v IN + SELECT c.oid::regclass + FROM pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace + WHERE n.nspname = 'public' AND c.relkind = 'v' + LOOP + EXECUTE format('REVOKE INSERT, UPDATE, DELETE, TRUNCATE, TRIGGER, REFERENCES ON %s FROM anon, authenticated, PUBLIC', _v); + END LOOP; +END +$revoke$; + +COMMIT; + +-- The report (the editor shows only this last result): per view, what anon and authenticated could +-- write before this run, and what they may do now. +SELECT v.table_name AS view_name, + coalesce((SELECT string_agg(b.grantee || ': ' || b.could_write, '; ' ORDER BY b.grantee) + FROM pg_temp.kg_view_writes_before b WHERE b.view_name = v.table_name), 'none') AS could_write_before, + coalesce((SELECT string_agg(DISTINCT g.grantee || ' ' || g.privilege_type, ', ') + FROM information_schema.role_table_grants g + WHERE g.table_schema = 'public' AND g.table_name = v.table_name + AND g.grantee IN ('anon', 'authenticated', 'PUBLIC')), 'nothing') AS may_now, + v.is_updatable AS updatable_view + FROM information_schema.views v + WHERE v.table_schema = 'public' + ORDER BY (SELECT count(*) FROM pg_temp.kg_view_writes_before b WHERE b.view_name = v.table_name) DESC, v.table_name; diff --git a/supabase/migrations/20261117181500_prevent_duplicates.sql b/supabase/migrations/20261117181500_prevent_duplicates.sql new file mode 100644 index 00000000..6e5e79d2 --- /dev/null +++ b/supabase/migrations/20261117181500_prevent_duplicates.sql @@ -0,0 +1,1676 @@ +-- ================================================================================================ +-- 20261117181500_prevent_duplicates.sql +-- Refuse a duplicate when it is written: one rule per identity key, a unique index on each key, +-- one detail row per KG node, and each preprint LINKED to its published version, never merged. +-- ================================================================================================ +-- +-- WHAT AND WHY +-- "If you have something in the KG already, you don't want to duplicate it; cleaning is a +-- difficult and tedious task as the KG grows; link, don't copy; make a decision and stick to it" +-- (Tek, reviewing the KG). Until now a duplicate was only DETECTED (kg/quality.py duplicates(), a +-- CI gate against kg/quality_baseline.json) and CLEANED by hand (20261116150000 merged the 14 +-- groups of the 2026-11-04 export). Nothing PREVENTED the next one: the database had unique keys +-- on funding_opportunities.fon, dandisets (instance, dandiset_id) and investigators' e-mail only. +-- This script makes the database refuse it: +-- * keys-01, keys-02. One SQL function per identity key, public.kg_<key>_key(text), and the +-- pairing rule's three parts. The same rule is written in TypeScript +-- (supabase/functions/_shared/identity-keys.ts, the write paths) and Python +-- (kg/identity_keys.py, the export gate); kg/identity_keys.json states each rule once, with +-- the vectors that hold the three implementations equal. keys-02 runs the 109 SQL vectors HERE, +-- on this database, before any index is built on a function: a mismatch is an error row, and +-- the run changes nothing. +-- * index-01 to index-07. A unique index on each key. A value with no key (empty, or not an +-- ORCID iD, DOI or PMID at all) is never enforced. An index is created only if the live rows +-- already satisfy it. Where they do not, it is SKIPPED and every group of rows that share a key +-- is listed with what references each row: a curator merges each group (or corrects a value +-- that is wrong on one of its rows), then runs this script again, which creates what it skipped +-- and changes nothing else. A URL is no key: a notice URL can be a landing page (an NIH +-- highlighted-topic page) that lists several calls, so two calls may share one. +-- * nodes-01. One detail row per KG node: a unique index on resource_id in each of the 13 node +-- tables. Two rows that point at one spine row are folded into one node by the exporter, +-- silently; now the database refuses the second row (catalogue invariant #2). +-- * links-01, links-02, versions-01, versions-02. A preprint and its published paper are two +-- records of one work. They are LINKED, never merged (a merge loses the preprint's own PMID, +-- DOI and date): resource_links (published, 'revision_of', preprint), the LinkML slot +-- revision_of (prov:wasRevisionOf: the newer revises the older). The pairing rule is stated +-- once, in public.kg_link_publication_versions(): it never links a "preprint" that is later +-- than the paper (kg_preprint_is_later: by PubMed id, else by the posting date in a bioRxiv +-- or medRxiv DOI, and only then by year, since a preprint's year drifts later as new versions +-- are posted), and it tells a bioRxiv or medRxiv DOI by its shape, not by the 10.1101/ prefix +-- Cold Spring Harbor's journals share. A pair it refuses as later, a curator can still link by +-- hand (the skipped row says how); the rule then reports it as linked. +-- versions-01 uses it to link the 5 pairs of the 2026-11-17 export that a curator read, and +-- only them; import-grant-publications uses it for the papers it imports. +-- * orphans-01 (read-only) lists what still keeps a person or an organization from being one node. +-- Nothing is rewritten: a key is computed from the stored value, so curated spellings (eLife's +-- DOI case, RePORTER's capitals) stay as they are. Every write is audited as +-- 'migration:prevent_duplicates' (Principle X). The rules and their vectors: kg/identity_keys.json; +-- the model: kg/README.md, "Modelling rule: link, don't copy". It came with issue #521, whose own +-- subject (classifying funding calls) it does not touch; it makes the rule notices-03 applied +-- there (a final notice supersedes its forecast in place, one row per call) the standing one. +-- +-- THE KEYS. Whitespace and case are ASCII only (COLLATE "C"), names are compared after Unicode +-- NFKD; kg/identity_keys.json states each rule. Every index is partial: WHERE <key> IS NOT NULL. +-- index table and key +-- uq_investigators_orcid_key investigators (kg_orcid_key(orcid)) 0000-0002-1825-009X +-- uq_publications_doi_key publications (kg_doi_key(doi)) 10.7554/elife.89892 +-- uq_publications_pmid_key publications (kg_pmid_key(pmid)) 41331138 (no zeros) +-- uq_organizations_name_key organizations (kg_name_key(name)) universityofcaliforniasandiego +-- uq_grants_award_key grants (kg_award_key(grant_number)) R34DA059513 (the NIH core) +-- uq_projects_award_key projects (kg_award_key(grant_number)) R34DA059513 +-- uq_funding_opportunities_fon_key funding_opportunities (kg_fon_key(fon)) RFANS27002 +-- uq_<table>_resource_id <table> (resource_id), for investigators, organizations, +-- grants, publications, software_tools, funding_opportunities, +-- dandisets, species, device_models, device_manufacturers, +-- device_categories, jobs and announcements +-- The exact keys stay as they are (funding_opportunities_fon_key, grants_grant_number_key, +-- investigators_name_key, investigators_email_unique_ci). No key on a person's name (namesakes +-- exist), none on a URL (a landing page can serve many records: kg/quality.py compares URLs as a +-- signal only), and none on tool-like resources (no one rule fits every type; add_resource matches +-- per type and the export gate checks). A curated value may stay non-canonical: the key folds it. +-- The organization name key folds case, punctuation, spacing and accents (Greek letters by name), +-- never wording: 'STATE UNIVERSITY NEW YORK STONY BROOK' and 'State University of New York at +-- Stony Brook', two nodes of one institution in the 2026-11-17 export, are two keys, so index-04 +-- does not see them. They are a known duplicate for a curator to merge; ROR is the identity that +-- would see it (organizations has no ROR column yet). +-- +-- HOW TO APPLY: Supabase SQL editor, project vpexxhfpvghlejljwpvt, as its default role (postgres). +-- Copy it with: Get-Content "<checkout>\supabase\migrations\20261117181500_prevent_duplicates.sql" -Raw | Set-Clipboard +-- (the file is ASCII only, so no code page can garble it), paste the WHOLE file, then Run. +-- 1. As shipped it is a DRY RUN: every block runs, the report is shown, then everything is rolled +-- back. The editor may warn about DROP statements; in a dry run nothing is kept. +-- 2. Read the report (the script's last statement, the only result the editor shows): the RESULT +-- row, one row per block (rows = rows written), then each decision. A 'skipped' row under +-- index-0x or nodes-01 is a group of rows that share a key; its index is not created until a +-- curator merges the group. If any row says 'error', a real run would change nothing. +-- 3. Apply: in the DRY-RUN SWITCH line just below BEGIN, change 'on' to 'off' (the only edit), and +-- Run the whole file again. It is one transaction: an unexpected error rolls ALL of it back, +-- and the editor then shows the list of errors instead of the report. +-- 4. A second run changes nothing and reports 0 rows. After a curator has merged a skipped group, +-- run the script again (dry run first): it creates the indexes it skipped. +-- LOCKS. The dry run takes the same locks as the real run, for as long (seconds). Writes wait on +-- each table an index is being built on (SHARE: investigators, publications, organizations, +-- grants, projects, funding_opportunities and the 13 node tables, only while an index is still +-- missing). While its CHECK is replaced (the first run only), every read and write waits on +-- resource_links (ACCESS EXCLUSIVE). No wait lasts more than 5 s (lock_timeout, set right after +-- BEGIN): a block that would wait longer reports an error row (55P03), and the run changes +-- nothing. Run it again when the site is quiet. A second run takes no lock beyond plain reads. +-- +-- PRECONDITIONS +-- * 20261116150000_link_isolated_nodes.sql is applied (production has it): its block tools-04 +-- created public.resource_links. Without it, links-01 to versions-02 report 'skipped' and +-- change nothing, while the keys and indexes are still created; run this script again after it. +-- * The site and the edge functions are deployed BEFORE this script, in this order. Each step +-- works with or without this script applied, so nothing breaks in between: +-- 1. the site: dev merged to main (publish.yml deploys main to GitHub Pages); +-- 2. the six edge functions that import _shared/kg-write.ts (and, through it, +-- _shared/identity-keys.ts), none of them deployed since b7c6044 wrote those modules: +-- add-project-by-grant, bbqs-mcp, import-grant-publications, nih-grants, seed-consortium, +-- verify-affiliations, each with +-- supabase functions deploy <name> --project-ref vpexxhfpvghlejljwpvt +-- (no other function imports either module); +-- 3. ../bbqs-agent checked (below); then this script, dry run first. +-- * Every write path that meets these indexes. Once an index exists, a write that would give a +-- second row the same key fails with 23505 (unique_violation) naming the index; nothing is +-- merged silently. The writers in this repository look up by these keys first, and say a +-- 23505 as what it is ("already in the KG", which record, what to do) instead of the raw +-- Postgres text: +-- - the six edge functions above: bbqs-mcp's add_resource, add_funding_opportunity, +-- create_grant, repoint_grant and refresh_grant_from_reporter, nih-grants, +-- add-project-by-grant, import-grant-publications, seed-consortium, verify-affiliations; +-- - public.member_self_update(): the function itself refuses its WHOLE statement on +-- uq_investigators_orcid_key when the ORCID iD sent is on another record (an email-less +-- twin). Its two callers here save the other fields again without the ORCID (a null +-- _orcid keeps the stored one) and say the ORCID iD was left out, and why: the profile +-- editor, src/components/profile/MemberProfileEditor.tsx (saveOwnProfile in +-- src/lib/alreadyInKg.ts), and the MCP tool update_my_profile (saveProfileLeavingOutHeldOrcid +-- in _shared/kg-write.ts). Any other caller sees the 23505; +-- - the site's other writers of a keyed column, each through src/lib/alreadyInKg.ts: +-- InvestigatorSummary's inline edit (an ORCID iD, email or name another record holds), +-- src/pages/Publications.tsx (a paper added by hand: a DOI or PMID another row holds in +-- another spelling, uq_publications_doi_key, uq_publications_pmid_key), +-- AddFundingOpportunityDialog.tsx (a FON spelled another way than an existing call's, +-- uq_funding_opportunities_fon_key; it has no supersede path: a final notice that reuses +-- its forecast's FON is a curator's merge, bbqs-mcp supersedes), useProjectProfileEditor +-- (an upsert onto a project whose award is spelled another way, uq_projects_award_key), +-- and AdminUsers and AdminAccessRequests (an email or name already on another record); +-- tests/guards/write-paths-get-or-create holds every src write of a keyed column to it; +-- - the RPCs public.create_grant() and public.repoint_grant(), from any caller besides the +-- MCP (create_grant strips only a '-NN' suffix and matches its institution with +-- lower(btrim)): a per-year or leading-digit number of an existing award +-- (uq_grants_award_key, uq_projects_award_key), an institution spelled another way +-- (uq_organizations_name_key); +-- - ../bbqs-agent, the chat agent, which shares this database: check it for direct writes +-- to the keyed columns (investigators.orcid, publications.doi and pmid, organizations.name, +-- grants.grant_number, projects.grant_number, funding_opportunities.fon, and resource_id on +-- the 13 node tables) BEFORE the real run. It is not in this repository, so it was not. +-- * The server encoding is UTF8 (it is on Supabase): kg_name_key uses normalize(..., NFKD). +-- +-- VERIFY +-- * RESULT says APPLIED, no row says error, and a second run reports 0 rows. +-- * SELECT indexrelid::regclass AS index, pg_get_indexdef(indexrelid) FROM pg_index +-- WHERE indexrelid::regclass::text LIKE 'uq\_%' ORDER BY 1; -- the 7 keys and 13 resource_id +-- indexes, next to the older uq_investigators_reporter_profile_id +-- * SELECT count(*) FROM public.resource_links WHERE predicate = 'revision_of'; -- 5 +-- * SELECT table_name, operation, count(*) FROM public.data_audit_log +-- WHERE actor_label = 'migration:prevent_duplicates' GROUP BY 1, 2; -- resource_links INSERT 5 +-- * Re-export the graph (kg/export.py) and run kg/quality.py: the 5 preprint/published pairs are +-- "linked_versions", no longer "versions" (pairs to link). +-- +-- UNDO (as one transaction, after SELECT public.set_actor('migration:undo_prevent_duplicates');) +-- * DROP INDEX each uq_* index this script created (the report's done rows name them); +-- * DELETE FROM public.resource_links WHERE predicate = 'revision_of'; (their rows are in +-- data_audit_log, new_data, under actor_label 'migration:prevent_duplicates'); +-- * restore resource_links_predicate_check and resource_links_check_types() as 20261116150000 +-- tools-04 created them (that block's text: 4 predicates, produced accepting a publication); +-- * DROP FUNCTION public.kg_link_publication_versions(uuid[], text, boolean, boolean), then the +-- nine public.kg_* functions (only after their indexes are gone). +-- Not restorable from data_audit_log: the DDL above (no audit trigger records it). +-- +-- THE BLOCKS, in run order. Every block re-reads the live catalog and rows, and reports each +-- decision (done / noop / skipped / report / error). +-- keys-01 create the 9 functions (6 identity keys; the pairing rule's kg_title_key, +-- kg_is_preprint and kg_preprint_is_later) where missing. One that exists with +-- another definition is an ERROR, never replaced: CREATE OR REPLACE changes an +-- indexed function without a word, and every index on it would keep the old keys. +-- keys-02 the self-test: this database computes kg/identity_keys.json's 109 SQL vectors +-- index-01..07 one unique index per key (table above); a colliding group skips its index only +-- nodes-01 uq_<table>_resource_id on the 13 node tables (one decision per table) +-- links-01 resource_links accepts revision_of (a publication to a publication, never both +-- ways); produced no longer accepts a publication (a project's papers are +-- project_publications rows: one fact, one store). If a produced -> publication link +-- exists, produced keeps accepting a publication and the link is listed. +-- links-02 create public.kg_link_publication_versions() (service_role only), the pairing rule. +-- An earlier draft's three-argument pairing function, or its four-argument, +-- year-first kg_preprint_is_later, is an error row: drop it, then run again +-- versions-01 link the 5 pairs of the 2026-11-17 export with it (basis curator_fill), and only +-- them: another pair the rule finds in their title groups is listed, not linked: +-- 42131509 -> 41040807 BRAID R61MH135407 +-- 41331138 -> 37425712 CaBLAM R34DA059500 +-- 42516064 -> 41292955 CapuchinAI R34DA061925 +-- 41321375 -> 41040797 Dynamical Modeling R61MH135407 +-- 39680425 -> 39282260 gerbil vocal usage R34DA059513 +-- Read-only, they write nothing: versions-02 (any other pair the rule finds, and how to link it), +-- orphans-01 (investigator spine rows no person points at, people with no node, name drift, +-- orphan spine rows per type). +-- +-- EFFECT, as the 2026-11-17 export shows the data (tested on a replica of the schema holding a +-- synthetic copy of the exported rows, with 20261116150000 applied): no key collides, so all 7 key +-- indexes and the 13 resource_id indexes are created, and the 5 pairs are linked: 5 rows written. +-- Rows the export does not show (people with no node, hidden datasets, publications with no node) +-- can still collide here; each such group is listed, and only its index waits. Not seen by any +-- index: the Stony Brook pair of organization nodes above (other wording), to merge by hand. +-- +-- NOT DONE HERE (who) +-- * Orphan investigator spine rows (a person deleted, the spine row left; or the spine row written +-- and the person insert failed): no database rule this round. The write paths now insert the +-- person first (kg-write.ts), and orphans-01 lists what is left (a developer, then a curator). +-- * A key on a person's name, and on tool-like resources (see above). +-- ================================================================================================ + +BEGIN; +-- No lock wait longer than 5 s, in the dry run as in the real run (both take the same locks). A +-- block that waits longer gets 55P03, reports it as an error row, and the run then changes nothing. +SET LOCAL lock_timeout = '5s'; +-- Principle X: a SQL-editor write has no auth.uid(), so the script names itself before any write. +-- Both settings are transaction-local; the runner re-declares them before every block. +SELECT public.set_actor('migration:prevent_duplicates'); +SELECT public.set_source_class('curator_fill'); + +-- +------------------------------ DRY-RUN SWITCH (the one line to edit) ------------------------------+ +-- 'on' = rehearse: run every block, show the report, then roll everything back (nothing changes). +-- 'off' = apply: the same run, committed. Any other value is treated as 'on'. +SELECT set_config('bbqs.dry_run', 'on', true); +-- +----------------------------------------------------------------------------------------------------+ + +-- ================================================================================================ +-- 0. SETUP: the report table and the runner. Temp objects only (schema pg_temp): nothing in this +-- section writes to a real table. Dropped first, so a second run in the same editor session +-- starts from a clean report. +-- ================================================================================================ +-- Every pg_temp.kg_* function an earlier run left in this editor session goes first, whatever its +-- arguments: CREATE OR REPLACE keeps an old overload whose arguments differ, and two overloads make +-- a call ambiguous (42725). +DO $drop$ +DECLARE _f text; +BEGIN + FOR _f IN + SELECT format('pg_temp.%I(%s)', p.proname, pg_get_function_identity_arguments(p.oid)) + FROM pg_proc p + WHERE p.pronamespace = pg_my_temp_schema() AND p.proname LIKE 'kg\_%' + LOOP + EXECUTE 'DROP FUNCTION ' || _f; + END LOOP; +END +$drop$; +DROP TABLE IF EXISTS pg_temp.kg_fix_report; +-- One row per decision a block takes, plus one summary row per block and one RESULT row. The block +-- and its position come from the runner (bbqs.block / bbqs.block_ord), so a helper only names the +-- decision. The last statement of this script prints it (pg_temp.kg_report()). +CREATE TEMP TABLE kg_fix_report ( + seq bigserial PRIMARY KEY, + ord int NOT NULL DEFAULT coalesce(nullif(current_setting('bbqs.block_ord', true), '')::int, 0), + block text NOT NULL DEFAULT coalesce(nullif(current_setting('bbqs.block', true), ''), 'setup'), + kind text NOT NULL DEFAULT 'decision' CHECK (kind IN ('result', 'summary', 'decision')), + item text NOT NULL, + target text, + outcome text NOT NULL CHECK (outcome IN ('done', 'noop', 'skipped', 'report', 'error')), + n_rows bigint, + detail text +); + +-- Run one block: name it, re-declare the actor (Principle X), run it in its own savepoint, then +-- write its summary row. The row count is read back from the audit trail itself: every +-- data_audit_log row this transaction wrote since the block began (occurred_at = now() is this +-- transaction's start time). DDL (a function, an index, a constraint) writes no audit row: a +-- block's done rows name what it created. An error inside a block is caught here, the block's own +-- writes are rolled back to its savepoint, and an 'error' row is written: the runner then rolls the +-- WHOLE script back (a real run never commits a partial result). +CREATE OR REPLACE FUNCTION pg_temp.kg_run(_ord int, _block text, _title text, _fn text) +RETURNS void LANGUAGE plpgsql AS +$fn$ +DECLARE + _a0 bigint; _p0 bigint; _q0 bigint; _np bigint; _nw bigint; + _writes text; _other text; _outs text; _agg text; + _st text; _msg text; _ctx text; +BEGIN + PERFORM set_config('bbqs.block', _block, true); + PERFORM set_config('bbqs.block_ord', _ord::text, true); + PERFORM public.set_actor('migration:prevent_duplicates'); + PERFORM public.set_source_class('curator_fill'); + SELECT coalesce(max(id), 0) INTO _a0 FROM public.data_audit_log; + SELECT coalesce(max(id), 0) INTO _p0 FROM public.field_provenance; + SELECT coalesce(max(seq), 0) INTO _q0 FROM pg_temp.kg_fix_report; + + BEGIN + EXECUTE format('SELECT %s()', _fn); + EXCEPTION WHEN OTHERS THEN + GET STACKED DIAGNOSTICS _st = RETURNED_SQLSTATE, _msg = MESSAGE_TEXT, _ctx = PG_EXCEPTION_CONTEXT; + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES (_title, 'whole block', 'error', + format('%s: %s. This block''s writes were rolled back, and a real run changes nothing while any error stands. Context: %s', + _st, _msg, left(regexp_replace(_ctx, '\s+', ' ', 'g'), 240))); + END; + PERFORM public.set_actor('migration:prevent_duplicates'); + PERFORM public.set_source_class('curator_fill'); + + SELECT coalesce(string_agg(format('%s %s %s', t.table_name, t.operation, t.n), ', ' + ORDER BY t.table_name, t.operation), 'none'), + coalesce(sum(t.n), 0) + INTO _writes, _nw + FROM (SELECT d.table_name, d.operation, count(*) AS n + FROM public.data_audit_log d + WHERE d.id > _a0 AND d.occurred_at = now() + GROUP BY 1, 2) t; + -- Any audit row of this transaction that does NOT carry the script's label would be a Principle X + -- gap; none is expected (every block re-declares set_actor). + SELECT string_agg(DISTINCT coalesce(d.actor_label, '(null)'), ', ') INTO _other + FROM public.data_audit_log d + WHERE d.id > _a0 AND d.occurred_at = now() + AND d.actor_label IS DISTINCT FROM 'migration:prevent_duplicates'; + SELECT count(*) INTO _np FROM public.field_provenance WHERE id > _p0; + + SELECT string_agg(format('%s %s', o.outcome, o.n), ', ' ORDER BY o.pos), + CASE WHEN bool_or(o.outcome = 'error') THEN 'error' + WHEN bool_or(o.outcome = 'done') THEN 'done' + WHEN bool_or(o.outcome = 'skipped') THEN 'skipped' + WHEN bool_or(o.outcome = 'noop') THEN 'noop' + ELSE 'report' END + INTO _outs, _agg + FROM (SELECT r.outcome, count(*) AS n, + array_position(ARRAY['done', 'noop', 'skipped', 'report', 'error'], r.outcome) AS pos + FROM pg_temp.kg_fix_report r + WHERE r.seq > _q0 AND r.kind = 'decision' + GROUP BY r.outcome) o; + + INSERT INTO pg_temp.kg_fix_report (kind, item, outcome, n_rows, detail) + VALUES ('summary', _title || ' [' || coalesce(_outs, 'no decisions') || ']', coalesce(_agg, 'report'), _nw, + format('audited writes: %s; field_provenance claims recorded: %s%s', _writes, _np, + CASE WHEN _other IS NOT NULL THEN '; WARNING: audit rows labelled ' || _other ELSE '' END)); +END +$fn$; + +-- The RESULT row: what happened, totals, what is left to a curator, and how to flip the switch. +CREATE OR REPLACE FUNCTION pg_temp.kg_result(_dry boolean) +RETURNS void LANGUAGE plpgsql AS +$fn$ +DECLARE + _sw text := coalesce(current_setting('bbqs.dry_run', true), '(unset)'); + _tot bigint; + _dec text; + _blk int; + _err int; + _skip text; +BEGIN + SELECT coalesce(sum(n_rows), 0), count(*) INTO _tot, _blk FROM pg_temp.kg_fix_report WHERE kind = 'summary'; + SELECT string_agg(format('%s %s', o.outcome, o.n), ', ' ORDER BY o.pos), coalesce(sum(o.n) FILTER (WHERE o.outcome = 'error'), 0) + INTO _dec, _err + FROM (SELECT outcome, count(*) AS n, + array_position(ARRAY['done', 'noop', 'skipped', 'report', 'error'], outcome) AS pos + FROM pg_temp.kg_fix_report WHERE kind = 'decision' GROUP BY outcome) o; + -- The unique indexes a colliding group kept from being created (each group is one skipped row). + SELECT string_agg(DISTINCT split_part(target, ':', 1), ', ') INTO _skip + FROM pg_temp.kg_fix_report + WHERE kind = 'decision' AND outcome = 'skipped' AND item = 'unique key' AND target LIKE '%:%'; + PERFORM set_config('bbqs.block', 'RESULT', true); + PERFORM set_config('bbqs.block_ord', '0', true); + INSERT INTO pg_temp.kg_fix_report (kind, item, outcome, n_rows, detail) + VALUES ('result', + CASE WHEN _dry THEN 'DRY RUN: every block ran, then everything was rolled back. NOTHING WAS CHANGED.' + ELSE 'APPLIED: committed as one transaction under migration:prevent_duplicates.' END, + CASE WHEN _err > 0 THEN 'error' WHEN _dry THEN 'report' ELSE 'done' END, + _tot, + format('%s block(s) ran; decisions: %s; rows%s written: %s (summary rows below; DDL writes no row, the done rows name it). ', + _blk, coalesce(_dec, 'none'), CASE WHEN _dry THEN ' that WOULD be' ELSE '' END, _tot) + || CASE WHEN _skip IS NOT NULL + THEN format('NOT CREATED, rows share a key: %s. A curator resolves each group as its skipped row says (merges one record held twice, corrects a wrong value, or gives a preprint on its paper''s node a spine row of its own and links the two, never merging them), then runs this script again. ', _skip) + ELSE '' END + || CASE WHEN _dry AND _err > 0 THEN format('%s ERROR(S): a real run would change nothing until they are fixed (rows marked error). ', _err) ELSE '' END + || CASE WHEN _dry THEN format('The dry-run switch is %L. To apply: change it to ''off'' in the line SELECT set_config(''bbqs.dry_run'', ''on'', true); near the top, and run the whole script again.', _sw) + ELSE 'Running it again changes nothing (every block reports 0 rows). Next: re-export the graph (see VERIFY in the header).' END); +END +$fn$; + +-- The report the editor shows (the script's last statement): RESULT first, then one summary row per +-- block in run order, then every decision in the order it was taken. +CREATE OR REPLACE FUNCTION pg_temp.kg_report() +RETURNS TABLE (block text, action text, "rows" bigint, detail text) +LANGUAGE sql STABLE AS +$fn$ + SELECT r.block, + CASE WHEN r.kind = 'decision' + THEN r.outcome || ' | ' || r.item || coalesce(' | ' || r.target, '') + ELSE r.item END, + r.n_rows, + r.detail + FROM pg_temp.kg_fix_report r + ORDER BY CASE r.kind WHEN 'result' THEN 0 WHEN 'summary' THEN 1 ELSE 2 END, r.ord, r.seq +$fn$; + +-- ================================================================================================ +-- 1. DEFINITIONS AND HELPERS (pg_temp, gone at the end of the session). The public objects this +-- script creates are written out here, once, as the statements that create them. +-- ================================================================================================ + +-- A function body as written between its $fn$ quotes, from one of the statements below. +CREATE OR REPLACE FUNCTION pg_temp.kg_fn_body(_ddl text) RETURNS text +LANGUAGE sql IMMUTABLE AS +$q$ SELECT substring(_ddl FROM '\$fn\$(.*)\$fn\$') $q$; + +-- Source text with every run of whitespace folded to one space: compares a function body that +-- another file created with other indentation and line ends. +CREATE OR REPLACE FUNCTION pg_temp.kg_norm_src(_s text) RETURNS text +LANGUAGE sql IMMUTABLE AS +$q$ SELECT btrim(regexp_replace(coalesce(_s, ''), '\s+', ' ', 'g')) $q$; + +-- THE IDENTITY KEYS, as kg/identity_keys.json states each rule (TypeScript: _shared/identity-keys.ts, +-- Python: kg/identity_keys.py; the vectors in keys-02 hold them equal). Every function is IMMUTABLE +-- PARALLEL SAFE with search_path pg_catalog (STRICT, but for kg_is_preprint and +-- kg_preprint_is_later, which read a NULL argument), and folds case and whitespace in ASCII only +-- (COLLATE "C"), whatever the database's collation: an index on it is the same on every server. +-- In creation order: kg_title_key calls kg_name_key, kg_is_preprint kg_doi_key, and +-- kg_preprint_is_later kg_pmid_key. kg_name_key spells each Greek letter out (the table `greek` of +-- kg/identity_keys.json: alpha-synuclein and beta-synuclein are two titles), after NFKD has mapped +-- the micro sign to mu and the ohm sign to omega. No REVOKE: every role that writes these tables +-- evaluates them when the index is maintained. +CREATE OR REPLACE FUNCTION pg_temp.kg_key_ddl() +RETURNS TABLE (ord int, sig text, about text, ddl text) +LANGUAGE sql IMMUTABLE AS +$q$ +SELECT * FROM (VALUES +(1, 'public.kg_orcid_key(text)', + 'Identity key (kg/identity_keys.json, key orcid); uq_* indexes use it: never replace it without a REINDEX. 20261117181500_prevent_duplicates.', +$ddl$CREATE OR REPLACE FUNCTION public.kg_orcid_key(_v text) RETURNS text +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE SET search_path = pg_catalog AS +$fn$ SELECT upper(substring(_v COLLATE "C" FROM '[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{3}[0-9Xx]')) $fn$;$ddl$), +(2, 'public.kg_doi_key(text)', + 'Identity key (kg/identity_keys.json, key doi); uq_* indexes use it: never replace it without a REINDEX. 20261117181500_prevent_duplicates.', +$ddl$CREATE OR REPLACE FUNCTION public.kg_doi_key(_v text) RETURNS text +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE SET search_path = pg_catalog AS +$fn$ SELECT CASE WHEN d ~ '^10\.[0-9.]+/[^[:space:]]+$' THEN d END + FROM (SELECT regexp_replace(lower(regexp_replace(regexp_replace(_v COLLATE "C", '^[[:space:]]+|[[:space:]]+$', '', 'g'), + '^((https?://)?((dx|www)\.)?doi\.org/|doi:?[[:space:]]*)', '', 'i')), '/+$', '') AS d) x $fn$;$ddl$), +(3, 'public.kg_pmid_key(text)', + 'Identity key (kg/identity_keys.json, key pmid); uq_* indexes use it: never replace it without a REINDEX. 20261117181500_prevent_duplicates.', +$ddl$CREATE OR REPLACE FUNCTION public.kg_pmid_key(_v text) RETURNS text +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE SET search_path = pg_catalog AS +$fn$ SELECT CASE WHEN p ~ '^[0-9]+$' THEN nullif(ltrim(p, '0'), '') END + FROM (SELECT regexp_replace(regexp_replace(_v COLLATE "C", '^[[:space:]]+|[[:space:]]+$', '', 'g'), + '^pmid:?[[:space:]]*', '', 'i') AS p) x $fn$;$ddl$), +(4, 'public.kg_fon_key(text)', + 'Identity key (kg/identity_keys.json, key fon); uq_* indexes use it: never replace it without a REINDEX. 20261117181500_prevent_duplicates.', +$ddl$CREATE OR REPLACE FUNCTION public.kg_fon_key(_v text) RETURNS text +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE SET search_path = pg_catalog AS +$fn$ SELECT nullif(regexp_replace(upper(_v COLLATE "C"), '[^A-Z0-9]', '', 'g'), '') $fn$;$ddl$), +(5, 'public.kg_award_key(text)', + 'Identity key (kg/identity_keys.json, key award); uq_* indexes use it: never replace it without a REINDEX. 20261117181500_prevent_duplicates.', +$ddl$CREATE OR REPLACE FUNCTION public.kg_award_key(_v text) RETURNS text +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE SET search_path = pg_catalog AS +$fn$ SELECT coalesce(substring(upper(_v COLLATE "C") FROM '[A-Z][A-Z0-9]{2}[A-Z]{2}[0-9]{6}'), + nullif(regexp_replace(upper(_v COLLATE "C"), '[[:space:]]', '', 'g'), '')) $fn$;$ddl$), +(6, 'public.kg_name_key(text)', + 'Identity key (kg/identity_keys.json, key name); uq_* indexes use it: never replace it without a REINDEX. 20261117181500_prevent_duplicates.', +$ddl$CREATE OR REPLACE FUNCTION public.kg_name_key(_v text) RETURNS text +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE SET search_path = pg_catalog AS +$fn$ SELECT nullif(regexp_replace(lower(string_agg(coalesce(g.latin, c.ch), '' ORDER BY c.i) COLLATE "C"), '[^a-z0-9]', '', 'g'), '') + FROM regexp_split_to_table(normalize(_v, NFKD), '') WITH ORDINALITY AS c(ch, i) + LEFT JOIN (VALUES (E'\u0391', 'alpha'), (E'\u0392', 'beta'), (E'\u0393', 'gamma'), (E'\u0394', 'delta'), + (E'\u0395', 'epsilon'), (E'\u0396', 'zeta'), (E'\u0397', 'eta'), (E'\u0398', 'theta'), + (E'\u0399', 'iota'), (E'\u039a', 'kappa'), (E'\u039b', 'lambda'), (E'\u039c', 'mu'), + (E'\u039d', 'nu'), (E'\u039e', 'xi'), (E'\u039f', 'omicron'), (E'\u03a0', 'pi'), + (E'\u03a1', 'rho'), (E'\u03a3', 'sigma'), (E'\u03a4', 'tau'), (E'\u03a5', 'upsilon'), + (E'\u03a6', 'phi'), (E'\u03a7', 'chi'), (E'\u03a8', 'psi'), (E'\u03a9', 'omega'), + (E'\u03b1', 'alpha'), (E'\u03b2', 'beta'), (E'\u03b3', 'gamma'), (E'\u03b4', 'delta'), + (E'\u03b5', 'epsilon'), (E'\u03b6', 'zeta'), (E'\u03b7', 'eta'), (E'\u03b8', 'theta'), + (E'\u03b9', 'iota'), (E'\u03ba', 'kappa'), (E'\u03bb', 'lambda'), (E'\u03bc', 'mu'), + (E'\u03bd', 'nu'), (E'\u03be', 'xi'), (E'\u03bf', 'omicron'), (E'\u03c0', 'pi'), + (E'\u03c1', 'rho'), (E'\u03c2', 'sigma'), (E'\u03c3', 'sigma'), (E'\u03c4', 'tau'), + (E'\u03c5', 'upsilon'), (E'\u03c6', 'phi'), (E'\u03c7', 'chi'), (E'\u03c8', 'psi'), + (E'\u03c9', 'omega')) AS g(gr, latin) ON g.gr = c.ch $fn$;$ddl$), +(7, 'public.kg_title_key(text)', + 'Pairing rule (kg/identity_keys.json, key title), not an identity key: public.kg_link_publication_versions() pairs a preprint with its published version by it. Change it only with its TypeScript and Python copies. 20261117181500_prevent_duplicates.', +$ddl$CREATE OR REPLACE FUNCTION public.kg_title_key(_v text) RETURNS text +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE SET search_path = pg_catalog AS +$fn$ SELECT public.kg_name_key(regexp_replace(_v, '<[^>]*>', '', 'g')) $fn$;$ddl$), +(8, 'public.kg_is_preprint(text,text)', + 'Pairing rule (kg/identity_keys.json, key preprint): is a record a preprint, by its venue, its DOI prefix, or the shape of a bioRxiv/medRxiv DOI (10.1101/ alone is no preprint: Genome Res, Genes Dev and Learn Mem publish under it)? public.kg_link_publication_versions() uses it. Change it only with its TypeScript and Python copies. 20261117181500_prevent_duplicates.', +$ddl$CREATE OR REPLACE FUNCTION public.kg_is_preprint(_journal text, _doi text) RETURNS boolean +LANGUAGE sql IMMUTABLE PARALLEL SAFE SET search_path = pg_catalog AS +$fn$ SELECT coalesce(lower(_journal COLLATE "C") ~ '(biorxiv|medrxiv|arxiv|research square|res sq|ssrn|psyarxiv|preprints)', false) + OR coalesce(public.kg_doi_key(_doi) COLLATE "C" ~ '^10\.(64898|48550|21203|2139|31234|20944)/', false) + OR coalesce(public.kg_doi_key(_doi) COLLATE "C" ~ '^10\.1101/([0-9]{4}\.[0-9]{2}\.[0-9]{2}\.)?[0-9]{6,}', false) $fn$;$ddl$), +(9, 'public.kg_preprint_is_later(integer,text,text,integer,text)', + 'Pairing rule (kg/identity_keys.json, key chronology): is the preprint later than its published version? First by PubMed id when both have one and they differ; else by the posting year in a dated bioRxiv/medRxiv DOI, or else the preprint''s own year, against the published year (a preprint''s own year drifts later as versions are posted, so it only breaks a tie). public.kg_link_publication_versions() never links such a pair. Change it only with its TypeScript and Python copies. 20261117181500_prevent_duplicates.', +$ddl$CREATE OR REPLACE FUNCTION public.kg_preprint_is_later(_preprint_year integer, _preprint_pmid text, _preprint_doi text, _published_year integer, _published_pmid text) RETURNS boolean +LANGUAGE sql IMMUTABLE PARALLEL SAFE SET search_path = pg_catalog AS +$fn$ SELECT CASE WHEN a IS NOT NULL AND b IS NOT NULL AND a <> b THEN a > b + ELSE coalesce(coalesce(d, _preprint_year) > _published_year, false) END + FROM (SELECT public.kg_pmid_key(_preprint_pmid)::numeric AS a, public.kg_pmid_key(_published_pmid)::numeric AS b, + substring(public.kg_doi_key(_preprint_doi) COLLATE "C" FROM '^10\.(?:1101|64898)/([0-9]{4})\.[0-9]{2}\.[0-9]{2}\.[0-9]{6,}')::integer AS d) x $fn$;$ddl$) +) AS d(ord, sig, about, ddl) +$q$; + +-- resource_links' type check (20261116150000 tools-04), with revision_of. The four rules it had are +-- kept as they were, except that produced no longer accepts a publication: a project's papers are +-- project_publications rows (the RePORTER credit), and one fact has one store. revision_of links a +-- publication to a publication, the later version to the earlier one, never both ways. +CREATE OR REPLACE FUNCTION pg_temp.kg_links_check_ddl() RETURNS text +LANGUAGE sql IMMUTABLE AS +$q$ SELECT $ddl$CREATE OR REPLACE FUNCTION public.resource_links_check_types() +RETURNS trigger LANGUAGE plpgsql SECURITY INVOKER SET search_path = public AS +$fn$ +DECLARE _s text; _o text; +BEGIN + SELECT r.resource_type::text INTO _s FROM public.resources r WHERE r.id = NEW.subject_id; + SELECT r.resource_type::text INTO _o FROM public.resources r WHERE r.id = NEW.object_id; + IF NOT coalesce(CASE NEW.predicate + WHEN 'trained_on' THEN _s = 'ml_model' AND _o IN ('dataset', 'benchmark') + WHEN 'evaluates' THEN _s = 'benchmark' AND _o IN ('software', 'tool', 'ml_model') + WHEN 'was_attributed_to' THEN _s IS NOT NULL AND _o IN ('investigator', 'organization', 'device_manufacturer') + WHEN 'produced' THEN _s = 'grant' + AND _o IN ('dataset', 'software', 'tool', 'ml_model', 'protocol', 'benchmark') + WHEN 'revision_of' THEN _s = 'publication' AND _o = 'publication' + END, false) THEN + RAISE EXCEPTION 'resource_links: % cannot link a % to a %', + NEW.predicate, coalesce(_s, '(missing row)'), coalesce(_o, '(missing row)') + USING ERRCODE = 'check_violation', + HINT = CASE WHEN NEW.predicate = 'produced' AND _o = 'publication' + THEN 'A project''s papers are project_publications rows (the RePORTER credit), not resource_links: one fact, one store.' + ELSE 'Each predicate is a kg/bbqs.linkml.yaml slot with a fixed domain and range; see the table comment.' END; + END IF; + IF NEW.predicate = 'revision_of' AND EXISTS ( + SELECT 1 FROM public.resource_links l + WHERE l.predicate = 'revision_of' AND l.subject_id = NEW.object_id AND l.object_id = NEW.subject_id + AND l.id IS DISTINCT FROM NEW.id) THEN + RAISE EXCEPTION 'resource_links: % revision_of % would make each a revision of the other', NEW.subject_id, NEW.object_id + USING ERRCODE = 'check_violation', + HINT = 'revision_of points from the later version (the published paper) to the earlier one (its preprint), never both ways.'; + END IF; + RETURN NEW; +END +$fn$;$ddl$ $q$; + +-- The type check as tools-04 created it, by fingerprint (its whitespace-folded body), so links-01 +-- replaces it only if it is still that version: a body some later migration wrote is left alone. +CREATE OR REPLACE FUNCTION pg_temp.kg_links_check_tools04_md5() RETURNS text +LANGUAGE sql IMMUTABLE AS +$q$ SELECT '404296bd8ce7a2dae8a094c2125df72a'::text $q$; + +-- THE PAIRING RULE, stated once. Two publications are versions of one work when both are KG nodes +-- (a spine row typed publication), their title keys are equal and at least 20 characters long, +-- exactly one of the two is a preprint (kg_is_preprint), exactly one record of that title group is +-- not a preprint (two published records sharing a title are a duplicate to merge first), the +-- preprint is not later than the published record (kg_preprint_is_later: by PubMed id, else by the +-- posting date in a bioRxiv/medRxiv DOI or else the year, which drifts later as versions are posted +-- and so only breaks a tie; a later "preprint" is another work with the same title, or a record +-- with a wrong PMID, DOI or year), and a project credits both (project_publications: RePORTER's +-- credit is the record, Principle III). A pair already linked (by this rule, or by a curator by +-- hand) is reported as linked (noop) before the order and the credit are tested. Each pair +-- becomes resource_links (published, 'revision_of', preprint). _both_listed links only a pair whose +-- two records are both in _publication_ids, and returns the other pairs of their title groups as +-- would_link. SECURITY INVOKER, for service_role only: import-grant-publications calls it for the +-- papers it wrote, this script for the 5 known pairs (_both_listed). It names itself when its +-- caller did not (Principle X). +CREATE OR REPLACE FUNCTION pg_temp.kg_versions_ddl() RETURNS text +LANGUAGE sql IMMUTABLE AS +$q$ SELECT $ddl$CREATE OR REPLACE FUNCTION public.kg_link_publication_versions( + _publication_ids uuid[] DEFAULT NULL, _basis text DEFAULT 'algorithmic', _dry boolean DEFAULT false, + _both_listed boolean DEFAULT false) +RETURNS TABLE (subject_id uuid, object_id uuid, outcome text, detail text) +LANGUAGE plpgsql SECURITY INVOKER SET search_path = public AS +$fn$ +#variable_conflict use_column +DECLARE + r record; + _n int; +BEGIN + IF NOT EXISTS (SELECT 1 FROM public.source_classes sc WHERE sc.code = _basis) THEN + RAISE EXCEPTION 'kg_link_publication_versions: % is not a source class (public.source_classes.code)', _basis + USING ERRCODE = 'invalid_parameter_value'; + END IF; + -- Principle X: a caller that did not name itself (no x-bbqs-client header, no set_actor) is named here. + IF public.current_actor_via() = 'unknown' THEN + PERFORM public.set_actor('kg_link_publication_versions'); + END IF; + IF public.current_source_class() = 'unknown' THEN + PERFORM public.set_source_class(_basis); + END IF; + FOR r IN + WITH pub AS ( + SELECT p.id, p.resource_id, p.journal, p.doi, p.year, p.pmid, + coalesce('PMID ' || nullif(btrim(p.pmid), ''), 'DOI ' || nullif(btrim(p.doi), ''), 'publication ' || p.id::text) AS lab, + public.kg_title_key(p.title) AS tk, + public.kg_is_preprint(p.journal, p.doi) AS pre + FROM public.publications p + JOIN public.resources s ON s.id = p.resource_id AND s.resource_type::text = 'publication'), + grp AS ( + SELECT g.tk, count(*) FILTER (WHERE NOT g.pre) AS n_published + FROM pub g + WHERE length(g.tk) >= 20 + GROUP BY g.tk + HAVING bool_or(g.pre) AND bool_or(NOT g.pre) + AND (_publication_ids IS NULL OR bool_or(g.id = ANY (_publication_ids)))) + SELECT n.resource_id AS s, v.resource_id AS o, n.lab AS nlab, v.lab AS vlab, + coalesce(nullif(btrim(v.journal), ''), nullif(btrim(v.doi), ''), 'preprint') AS venue, + g.n_published, + public.kg_preprint_is_later(v.year, v.pmid, v.doi, n.year, n.pmid) AS later, + coalesce(v.year::text, 'no year') + || CASE WHEN nullif(btrim(v.pmid), '') IS NOT NULL AND nullif(btrim(v.doi), '') IS NOT NULL + THEN ', DOI ' || btrim(v.doi) ELSE '' END AS vwhen, + coalesce(n.year::text, 'no year') AS nyear, + (_publication_ids IS NULL OR NOT _both_listed + OR (n.id = ANY (_publication_ids) AND v.id = ANY (_publication_ids))) AS listed, + (SELECT string_agg(DISTINCT pr.grant_number, ', ' ORDER BY pr.grant_number) + FROM public.project_publications a + JOIN public.project_publications b ON b.project_id = a.project_id + JOIN public.projects pr ON pr.id = a.project_id + WHERE a.publication_id = n.id AND b.publication_id = v.id) AS shared, + EXISTS (SELECT 1 FROM public.resource_links l + WHERE l.predicate = 'revision_of' AND l.subject_id = n.resource_id AND l.object_id = v.resource_id) AS linked, + EXISTS (SELECT 1 FROM public.resource_links l + WHERE l.predicate = 'revision_of' AND l.subject_id = v.resource_id AND l.object_id = n.resource_id) AS reverse + FROM grp g + JOIN pub n ON n.tk = g.tk AND NOT n.pre + JOIN pub v ON v.tk = g.tk AND v.pre + ORDER BY n.lab, v.lab, n.id, v.id + LOOP + subject_id := r.s; + object_id := r.o; + IF r.n_published > 1 THEN + outcome := 'skipped'; + detail := format('%s and preprint %s share their title with %s other record(s) that are not preprints: a duplicate to merge before any version link', + r.nlab, r.vlab, r.n_published - 1); + ELSIF r.s = r.o THEN + outcome := 'skipped'; + detail := format('%s and preprint %s are two records on one node (both rows point at spine row %s): give the preprint its own spine row (a resources row typed publication, and its publications row pointed at it), then run public.kg_link_publication_versions again to link the two. Never merge them: each keeps its own PMID, DOI and date', + r.nlab, r.vlab, r.s); + ELSIF r.linked THEN + outcome := 'noop'; + detail := format('%s revision_of preprint %s: already linked', r.nlab, r.vlab); + ELSIF r.reverse THEN + outcome := 'skipped'; + detail := format('preprint %s is recorded as a revision of %s (the reverse link): a curator decides which version is the later one', r.vlab, r.nlab); + ELSIF r.later THEN + outcome := 'skipped'; + detail := format('preprint %s (%s) is later than %s (%s): two versions are ordered by PubMed id, else by the date in a bioRxiv/medRxiv DOI, else by year (kg_preprint_is_later), and a preprint comes before its paper. So this is another work with the same title, or one of the two records has a wrong PMID, DOI or year. Not linked. A curator who finds them one work corrects the wrong value and runs this again, or links the two by hand in the SQL editor: SELECT public.set_actor(''curator:<name>''); INSERT INTO public.resource_links (subject_id, predicate, object_id, basis, evidence) VALUES (%L, ''revision_of'', %L, ''curator_fill'', ''<why they are one work>''); (this rule then reports them as linked)', + r.vlab, r.vwhen, r.nlab, r.nyear, r.s, r.o); + ELSIF r.shared IS NULL THEN + outcome := 'skipped'; + detail := format('%s and preprint %s share their title, but no project credits both (project_publications): not linked', r.nlab, r.vlab); + ELSIF _dry OR NOT r.listed THEN + outcome := 'would_link'; + detail := format('%s revision_of preprint %s (%s): same title, both credited to %s%s', r.nlab, r.vlab, r.venue, r.shared, + CASE WHEN r.listed THEN '' ELSE ' (not linked by this call: it links only a pair whose two records are both listed)' END); + ELSE + INSERT INTO public.resource_links (subject_id, predicate, object_id, basis, evidence) + VALUES (r.s, 'revision_of', r.o, _basis, + format('%s revises preprint %s (%s): same title, both credited to %s (project_publications)', r.nlab, r.vlab, r.venue, r.shared)) + ON CONFLICT (subject_id, predicate, object_id) DO NOTHING; + GET DIAGNOSTICS _n = ROW_COUNT; + outcome := CASE WHEN _n > 0 THEN 'done' ELSE 'noop' END; + detail := format('%s revision_of preprint %s (%s): same title, both credited to %s', r.nlab, r.vlab, r.venue, r.shared); + END IF; + RETURN NEXT; + END LOOP; +END +$fn$;$ddl$ $q$; + +-- Is a partial-index predicate the one this script writes (or none, which enforces the key on +-- every row)? Compared without parentheses and spaces, which pg_get_expr adds or drops. +CREATE OR REPLACE FUNCTION pg_temp.kg_same_pred(_have text, _want text) RETURNS boolean +LANGUAGE sql IMMUTABLE AS +$q$ SELECT coalesce(_have, '') = '' + OR regexp_replace(_have, '[()[:space:]]', '', 'g') = regexp_replace(_want, '[()[:space:]]', '', 'g') $q$; + +-- One row of a colliding group, for a curator: id, label, the raw value, when it was created, its +-- node, and how many rows reference it through each foreign key (what a merge must repoint). +CREATE OR REPLACE FUNCTION pg_temp.kg_row_text(_table text, _id uuid, _col text, _label text) +RETURNS text LANGUAGE plpgsql AS +$fn$ +DECLARE + _rel regclass := to_regclass(format('public.%I', _table)); + _has text[]; + _l text; + _v text; + _c text; + _r text; + _refs text[] := '{}'; + _k bigint; + fk record; +BEGIN + SELECT array_agg(a.attname::text) INTO _has + FROM pg_attribute a WHERE a.attrelid = _rel AND a.attnum > 0 AND NOT a.attisdropped; + EXECUTE format('SELECT %s, %I::text, %s, %s FROM public.%I WHERE id = $1', + CASE WHEN _label = ANY (_has) THEN format('%I::text', _label) ELSE 'NULL::text' END, + _col, + CASE WHEN 'created_at' = ANY (_has) THEN 'created_at::date::text' ELSE 'NULL::text' END, + CASE WHEN 'resource_id' = ANY (_has) THEN 'resource_id::text' ELSE 'NULL::text' END, + _table) + INTO _l, _v, _c, _r USING _id; + FOR fk IN + SELECT c.conrelid::regclass AS rel, a.attname AS col, ra.attname AS refcol + FROM pg_constraint c + JOIN pg_attribute a ON a.attrelid = c.conrelid AND a.attnum = c.conkey[1] + JOIN pg_attribute ra ON ra.attrelid = c.confrelid AND ra.attnum = c.confkey[1] + WHERE c.contype = 'f' AND c.confrelid = _rel AND cardinality(c.conkey) = 1 + ORDER BY c.conrelid::regclass::text, a.attname + LOOP + EXECUTE format('SELECT count(*) FROM %s WHERE %I = (SELECT %I FROM public.%I WHERE id = $1)', fk.rel, fk.col, fk.refcol, _table) + INTO _k USING _id; + IF _k > 0 THEN + _refs := _refs || format('%s.%s %s', fk.rel, fk.col, _k); + END IF; + END LOOP; + RETURN format('%s %s (%s %s, created %s, node %s; referenced by %s)', + _id, coalesce(quote_literal(_l), '(no label)'), _col, coalesce(quote_literal(_v), 'NULL'), + coalesce(_c, '?'), coalesce(_r, 'none'), coalesce(nullif(array_to_string(_refs, ', '), ''), 'nothing')); +END +$fn$; + +-- What a curator does with a group of rows that share a key. Publications on one node (nodes-01) +-- that share no DOI or PMID key are usually a preprint and its paper: two records, so one gets its +-- own spine row and the two are linked (revision_of), never merged. Any other group is one record +-- held twice (merged), or holds a wrong value (corrected). +CREATE OR REPLACE FUNCTION pg_temp.kg_group_advice(_table text, _expr text, _ids uuid[]) RETURNS text +LANGUAGE plpgsql STABLE AS +$fn$ +BEGIN + IF _table = 'publications' AND _expr = 'resource_id' AND NOT EXISTS ( + SELECT 1 FROM public.publications a JOIN public.publications b ON a.id < b.id + WHERE a.id = ANY (_ids) AND b.id = ANY (_ids) + AND (public.kg_doi_key(a.doi) = public.kg_doi_key(b.doi) OR public.kg_pmid_key(a.pmid) = public.kg_pmid_key(b.pmid))) THEN + RETURN 'These publication rows share no DOI or PMID key, so they are two records on one node, often a preprint and its published version: give each but one its own spine row (a resources row typed publication, and its publications row pointed at it), then link the versions with public.kg_link_publication_versions. Never merge a preprint into its paper: each keeps its own PMID, DOI and date. If two of them are one paper entered twice, merge those two (keep one, repoint what references the other, delete it).'; + END IF; + RETURN 'If they are one record, merge them into one row (keep one, repoint what references the others, delete the rest); if one of them holds a wrong value (another person''s ORCID iD, a DOI typed on the wrong paper), correct it.'; +END +$fn$; + +-- Create one unique index on a key, if the live rows already satisfy it (blocks index-01 to +-- index-07 and nodes-01). _expr is the key: public.kg_<key>_key(<column>), or a bare column. Every +-- outcome is a report row, never an exception: +-- * no such table or column here (a migration not applied yet): skipped; +-- * an index of that name exists: noop if it is a valid unique index of this table on exactly +-- this key, else an error (rename or drop it first); +-- * a valid unique index on exactly this key under another name: noop, naming it; +-- * rows share a key: one skipped row per group, listing every row and what references it, and +-- the index is not created; nothing else is blocked; +-- * else CREATE UNIQUE INDEX (done). The table is locked SHARE (as CREATE INDEX locks it) BEFORE +-- the check, so no write can slip a duplicate in between the check and the build. +CREATE OR REPLACE FUNCTION pg_temp.kg_unique_key(_index text, _table text, _expr text, _label text) +RETURNS void LANGUAGE plpgsql AS +$fn$ +DECLARE + _rel regclass := to_regclass(format('public.%I', _table)); + _col text := CASE WHEN _expr ~ '^[a-z_]+$' THEN _expr ELSE substring(_expr FROM '\(([a-z_]+)\)$') END; + _keyfn text := substring(_expr FROM '^(public\.[a-z_]+)\('); + _key text := regexp_replace(_expr, '\mpublic\.', '', 'g'); + _have record; + _g record; + _n int := 0; + _rows text; + _crt text; +BEGIN + IF _rel IS NULL THEN + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('unique key', _index, 'skipped', format('public.%I does not exist in this database: nothing to index', _table)); + RETURN; + END IF; + IF _col IS NULL + OR NOT EXISTS (SELECT 1 FROM pg_attribute a WHERE a.attrelid = _rel AND a.attname = _col AND a.attnum > 0 AND NOT a.attisdropped) + OR NOT EXISTS (SELECT 1 FROM pg_attribute a WHERE a.attrelid = _rel AND a.attname = 'id' AND a.attnum > 0 AND NOT a.attisdropped) THEN + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('unique key', _index, 'skipped', + format('public.%I has no column %s (or no id) here: the migration that adds it is not applied yet; nothing to index', _table, coalesce(_col, _expr))); + RETURN; + END IF; + IF _keyfn IS NOT NULL AND to_regprocedure(_keyfn || '(text)') IS NULL THEN + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('unique key', _index, 'skipped', format('%s(text) does not exist (see keys-01): the index cannot be built on it', _keyfn)); + RETURN; + END IF; + + -- An index (or any relation) of this name already exists: it must be this key's unique index. + SELECT c.relkind, i.indrelid, i.indisunique, i.indisvalid, i.indnatts, + regexp_replace(pg_get_indexdef(c.oid, 1, true), '\mpublic\.', '', 'g') AS k1, + regexp_replace(coalesce(pg_get_expr(i.indpred, i.indrelid, true), ''), '\mpublic\.', '', 'g') AS p1, + CASE WHEN c.relkind = 'i' THEN pg_get_indexdef(c.oid) END AS def + INTO _have + FROM pg_class c LEFT JOIN pg_index i ON i.indexrelid = c.oid + WHERE c.relnamespace = 'public'::regnamespace AND c.relname = _index; + IF FOUND THEN + IF _have.relkind = 'i' AND _have.indrelid = _rel AND _have.indisunique AND _have.indisvalid AND _have.indnatts = 1 + AND _have.k1 = _key AND pg_temp.kg_same_pred(_have.p1, _key || ' IS NOT NULL') THEN + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('unique key', _index, 'noop', 'already enforced: ' || _have.def); + ELSE + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('unique key', _index, 'error', + format('public.%I exists but is not a valid unique index of public.%I on %s: %s. Rename or drop it (an index an interrupted CREATE INDEX CONCURRENTLY left is invalid), then run this script again.', + _index, _table, _key, coalesce(_have.def, 'a relation of kind ' || _have.relkind::text))); + END IF; + RETURN; + END IF; + + -- The same key, already enforced under another name. + SELECT c.relname, pg_get_indexdef(c.oid) AS def INTO _have + FROM pg_index i JOIN pg_class c ON c.oid = i.indexrelid + WHERE i.indrelid = _rel AND i.indisunique AND i.indisvalid AND i.indnatts = 1 + AND regexp_replace(pg_get_indexdef(i.indexrelid, 1, true), '\mpublic\.', '', 'g') = _key + AND pg_temp.kg_same_pred(regexp_replace(coalesce(pg_get_expr(i.indpred, i.indrelid, true), ''), '\mpublic\.', '', 'g'), + _key || ' IS NOT NULL') + ORDER BY c.relname + LIMIT 1; + IF FOUND THEN + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('unique key', _index, 'noop', format('already enforced by %s: %s', _have.relname, _have.def)); + RETURN; + END IF; + + IF NOT pg_has_role((SELECT c.relowner FROM pg_class c WHERE c.oid = _rel), 'USAGE') THEN + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('unique key', _index, 'skipped', + format('only the owner of public.%I (%s) can index it: run this script as that role', _table, + (SELECT c.relowner::regrole::text FROM pg_class c WHERE c.oid = _rel))); + RETURN; + END IF; + + -- Writes to the table wait from here to the end of the run. + EXECUTE format('LOCK TABLE public.%I IN SHARE MODE', _table); + _crt := CASE WHEN EXISTS (SELECT 1 FROM pg_attribute a WHERE a.attrelid = _rel AND a.attname = 'created_at' AND NOT a.attisdropped) + THEN 't.created_at' ELSE 'NULL::timestamptz' END; + FOR _g IN EXECUTE format( + 'SELECT x.k, count(*) AS n, array_agg(x.id ORDER BY x.c NULLS LAST, x.id) AS ids + FROM (SELECT t.id, %s AS c, (%s)::text AS k FROM public.%I t) x + WHERE x.k IS NOT NULL + GROUP BY x.k HAVING count(*) > 1 + ORDER BY x.k', _crt, _expr, _table) + LOOP + _n := _n + 1; + SELECT string_agg(pg_temp.kg_row_text(_table, r.id, _col, _label), '; ' ORDER BY r.ord) INTO _rows + FROM unnest(_g.ids) WITH ORDINALITY AS r(id, ord) + WHERE r.ord <= 20; + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('unique key', format('%s: %s', _index, _g.k), 'skipped', + format('%s rows share this key, so %s is not created: %s%s. %s Then run this script again; nothing else waits on it.', + _g.n, _index, _rows, CASE WHEN _g.n > 20 THEN format('; and %s more', _g.n - 20) ELSE '' END, + pg_temp.kg_group_advice(_table, _expr, _g.ids))); + END LOOP; + IF _n > 0 THEN + RETURN; + END IF; + + EXECUTE format('CREATE UNIQUE INDEX %I ON public.%I (%s) WHERE %s IS NOT NULL', _index, _table, _expr, _expr); + EXECUTE format('COMMENT ON INDEX public.%I IS %L', _index, + CASE WHEN _keyfn IS NULL + THEN 'One detail row per KG node (spine row): 20261117181500_prevent_duplicates, nodes-01.' + ELSE format('Identity key %s (kg/identity_keys.json): a second row with the same key is refused (23505). 20261117181500_prevent_duplicates.', _key) END); + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('unique key', _index, 'done', 'created: ' || pg_get_indexdef(to_regclass(format('public.%I', _index)))); +END +$fn$; + +-- Does resource_links accept revision_of here: the table, a CHECK that allows it, and a type check +-- that has a rule for it? links-02, versions-01 and versions-02 act only then. +CREATE OR REPLACE FUNCTION pg_temp.kg_revision_of_accepted() RETURNS boolean +LANGUAGE sql STABLE AS +$q$ + SELECT to_regclass('public.resource_links') IS NOT NULL + AND EXISTS (SELECT 1 FROM pg_constraint c + WHERE c.conrelid = to_regclass('public.resource_links') AND c.conname = 'resource_links_predicate_check' + AND pg_get_constraintdef(c.oid) LIKE '%''revision\_of''%') + AND EXISTS (SELECT 1 FROM pg_proc p + WHERE p.oid = to_regprocedure('public.resource_links_check_types()') AND p.prosrc LIKE '%''revision\_of''%') +$q$; + +-- The 5 preprint/published pairs of the 2026-11-17 export (kg/export/quality.json, duplicates +-- groups of kind "versions"): the published record's PMID, its preprint's, and the grant that +-- credits both. +CREATE OR REPLACE FUNCTION pg_temp.kg_known_versions() +RETURNS TABLE (ord int, label text, published_pmid text, preprint_pmid text, grant_number text) +LANGUAGE sql IMMUTABLE AS +$q$ +SELECT * FROM (VALUES + (1, 'BRAID', '42131509', '41040807', 'R61MH135407'), + (2, 'CaBLAM', '41331138', '37425712', 'R34DA059500'), + (3, 'CapuchinAI', '42516064', '41292955', 'R34DA061925'), + (4, 'Dynamical Modeling', '41321375', '41040797', 'R61MH135407'), + (5, 'gerbil vocal usage', '39680425', '39282260', 'R34DA059513') +) AS v(ord, label, published_pmid, preprint_pmid, grant_number) +$q$; + +-- Why the pairing rule did not pair two publication rows (versions-01 asks only for the 5 known pairs). +CREATE OR REPLACE FUNCTION pg_temp.kg_why_not_paired(_a uuid, _b uuid) RETURNS text +LANGUAGE plpgsql STABLE AS +$fn$ +DECLARE a record; b record; _w text[] := '{}'; +BEGIN + SELECT p.id, p.pmid, p.year, p.title, p.journal, p.doi, p.resource_id, s.resource_type::text AS rtype, + public.kg_title_key(p.title) AS tk, public.kg_is_preprint(p.journal, p.doi) AS pre + INTO a FROM public.publications p LEFT JOIN public.resources s ON s.id = p.resource_id WHERE p.id = _a; + SELECT p.id, p.pmid, p.year, p.title, p.journal, p.doi, p.resource_id, s.resource_type::text AS rtype, + public.kg_title_key(p.title) AS tk, public.kg_is_preprint(p.journal, p.doi) AS pre + INTO b FROM public.publications p LEFT JOIN public.resources s ON s.id = p.resource_id WHERE p.id = _b; + IF a.rtype IS DISTINCT FROM 'publication' THEN + _w := _w || format('PMID %s is no publication node (spine row %s, type %s)', a.pmid, coalesce(a.resource_id::text, 'none'), coalesce(a.rtype, 'none')); + END IF; + IF b.rtype IS DISTINCT FROM 'publication' THEN + _w := _w || format('PMID %s is no publication node (spine row %s, type %s)', b.pmid, coalesce(b.resource_id::text, 'none'), coalesce(b.rtype, 'none')); + END IF; + IF a.pre THEN + _w := _w || format('PMID %s reads as a preprint (journal %L, DOI %L)', a.pmid, a.journal, a.doi); + END IF; + IF NOT b.pre THEN + _w := _w || format('PMID %s does not read as a preprint (journal %L, DOI %L)', b.pmid, b.journal, b.doi); + END IF; + IF public.kg_preprint_is_later(b.year, b.pmid, b.doi, a.year, a.pmid) THEN + _w := _w || format('preprint PMID %s (%s, DOI %s) is later than PMID %s (%s), by PubMed id, else by the date in its DOI or its year', + b.pmid, coalesce(b.year::text, 'no year'), coalesce(b.doi, 'none'), a.pmid, coalesce(a.year::text, 'no year')); + END IF; + IF a.tk IS DISTINCT FROM b.tk THEN + _w := _w || format('their titles differ (%L / %L)', a.title, b.title); + ELSIF length(coalesce(a.tk, '')) < 20 THEN + _w := _w || format('the title key %L is shorter than 20 characters', a.tk); + END IF; + IF NOT EXISTS (SELECT 1 FROM public.project_publications x JOIN public.project_publications y ON y.project_id = x.project_id + WHERE x.publication_id = _a AND y.publication_id = _b) THEN + _w := _w || 'no project credits both (project_publications)'::text; + END IF; + RETURN coalesce(nullif(array_to_string(_w, '; '), ''), 'no reason found: compare the two rows by hand'); +END +$fn$; + +-- ================================================================================================ +-- 2. THE BLOCKS, in run order. Each is a pg_temp function; section 3 runs them. A block reports +-- every decision (done / noop / skipped / report / error) and never writes past a failed guard. +-- ================================================================================================ + +-- ------------------------------------------------------------------------------------------------ +-- [keys-01] Create the identity-key functions where missing +-- A function of that name and arguments that exists with another body, volatility, strictness, +-- parallel safety, search_path or return type is an ERROR (the run then changes nothing): this +-- script never replaces one, because Postgres lets CREATE OR REPLACE change a function an index is +-- built on without re-indexing, and the index would keep keys the new body no longer computes. A +-- developer reconciles it in a migration of its own (drop it, or replace it and REINDEX). +CREATE OR REPLACE FUNCTION pg_temp.kg_b_keys_01() RETURNS void LANGUAGE plpgsql AS +$blk$ +DECLARE + d record; + p record; + _oid regprocedure; + _body text; + _diff text[]; +BEGIN + FOR d IN SELECT * FROM pg_temp.kg_key_ddl() ORDER BY 1 LOOP + _body := pg_temp.kg_fn_body(d.ddl); + _oid := to_regprocedure(d.sig); + IF _oid IS NULL THEN + EXECUTE d.ddl; + EXECUTE format('COMMENT ON FUNCTION %s IS %L', d.sig, d.about); + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('key function', d.sig, 'done', 'created: ' || pg_temp.kg_norm_src(_body)); + CONTINUE; + END IF; + SELECT pr.prosrc, pr.provolatile, pr.proisstrict, pr.proparallel, pr.proconfig, + pr.prorettype::regtype::text AS ret, l.lanname + INTO p FROM pg_proc pr JOIN pg_language l ON l.oid = pr.prolang WHERE pr.oid = _oid; + _diff := '{}'; + -- Line ends aside (a paste may carry CRLF), the body must be this file's, character for character. + IF replace(p.prosrc, E'\r', '') IS DISTINCT FROM replace(_body, E'\r', '') THEN + _diff := _diff || format('its body is %L', pg_temp.kg_norm_src(p.prosrc)); + END IF; + IF p.lanname <> 'sql' THEN _diff := _diff || format('it is LANGUAGE %s', p.lanname); END IF; + IF p.provolatile <> 'i' THEN _diff := _diff || 'it is not IMMUTABLE'::text; END IF; + IF p.proisstrict IS DISTINCT FROM (d.ddl ~ '\mSTRICT\M') THEN + _diff := _diff || CASE WHEN p.proisstrict THEN 'it is STRICT' ELSE 'it is not STRICT' END; + END IF; + IF p.proparallel <> 's' THEN _diff := _diff || 'it is not PARALLEL SAFE'::text; END IF; + IF p.proconfig IS DISTINCT FROM ARRAY['search_path=pg_catalog'] THEN + _diff := _diff || format('its settings are %s, not search_path=pg_catalog', coalesce(array_to_string(p.proconfig, ', '), 'none')); + END IF; + IF p.ret <> substring(d.ddl FROM 'RETURNS ([a-z]+)') THEN _diff := _diff || format('it returns %s', p.ret); END IF; + IF cardinality(_diff) > 0 THEN + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('key function', d.sig, 'error', + format('%s exists, but not as kg/identity_keys.json''s rule: %s. This script never replaces an identity-key function (an index built on it would keep the old keys). A developer reconciles it in a migration of its own: drop it if nothing uses it, or replace it and REINDEX every index on it.', + d.sig, array_to_string(_diff, '; '))); + ELSIF obj_description(_oid, 'pg_proc') IS DISTINCT FROM d.about THEN + EXECUTE format('COMMENT ON FUNCTION %s IS %L', d.sig, d.about); + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('key function', d.sig, 'done', 'already present with this body; its comment set'); + ELSE + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('key function', d.sig, 'noop', 'already present with this body'); + END IF; + END LOOP; +END +$blk$; + +-- ------------------------------------------------------------------------------------------------ +-- [keys-02] Self-test: this database computes the 109 SQL vectors of kg/identity_keys.json +-- The two blocks between markers are generated from kg/identity_keys.json: identity-vectors (one +-- row per line: kind, input, second input, want) and chronology-vectors (preprint year, preprint +-- pmid, preprint doi, published year, published pmid, want: kg_preprint_is_later). ASCII only, every other +-- character an E'' escape. The same vectors hold the TypeScript (tests/guards/identity-normalization) +-- and Python (kg/ci_check.py) copies, and tests/guards/kg-identity-keys checks that these blocks are +-- the JSON's. A mismatch is an error row: this server would compute other keys than the write paths +-- and the export gate. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_keys_02() RETURNS void LANGUAGE plpgsql AS +$blk$ +DECLARE + r record; + c record; + _n int := 0; + _bad int := 0; +BEGIN + FOR r IN + SELECT v.kind, v.a, v.b, v.want, g.got + FROM (VALUES +-- identity-vectors:begin (generated from kg/identity_keys.json: kind, input, second input, want) + ('orcid', '0000-0002-1825-0097', NULL, '0000-0002-1825-0097'), + ('orcid', 'https://orcid.org/0000-0002-1825-009x', NULL, '0000-0002-1825-009X'), + ('orcid', ' orcid.org/0000-0002-1825-0097 ', NULL, '0000-0002-1825-0097'), + ('orcid', '0000000218250097', NULL, NULL), + ('orcid', 'n/a', NULL, NULL), + ('orcid', '', NULL, NULL), + ('orcid', NULL, NULL, NULL), + ('doi', '10.7554/eLife.89892', NULL, '10.7554/elife.89892'), + ('doi', 'https://doi.org/10.7554/ELIFE.89892/', NULL, '10.7554/elife.89892'), + ('doi', 'DOI: 10.1101/2023.06.25.546478', NULL, '10.1101/2023.06.25.546478'), + ('doi', 'http://dx.doi.org/10.1000/x', NULL, '10.1000/x'), + ('doi', 'doi.org/10.1000/ABC.1', NULL, '10.1000/abc.1'), + ('doi', 'https://www.doi.org/10.1000/XYZ.2', NULL, '10.1000/xyz.2'), + ('doi', 'dx.doi.org/10.1000/x', NULL, '10.1000/x'), + ('doi', 'DOI 10.1000/x', NULL, '10.1000/x'), + ('doi', 'doi10.1000/x', NULL, '10.1000/x'), + ('doi', 'https://doi.org/doi:10.1000/x', NULL, NULL), + ('doi', E'\t10.1000/x\n', NULL, '10.1000/x'), + ('doi', E'doi:\u00a010.1000/x', NULL, NULL), + ('doi', '10.1000/a b', NULL, NULL), + ('doi', 'not a doi', NULL, NULL), + ('doi', E'10.1000/x\n/', NULL, NULL), + ('doi', '', NULL, NULL), + ('doi', NULL, NULL, NULL), + ('pmid', '41331138', NULL, '41331138'), + ('pmid', ' 0041331138', NULL, '41331138'), + ('pmid', 'PMID: 41331138', NULL, '41331138'), + ('pmid', 'pmid:41331138', NULL, '41331138'), + ('pmid', 'PMID 41331138', NULL, '41331138'), + ('pmid', E'pmid\t0041331138', NULL, '41331138'), + ('pmid', '4133 1138', NULL, NULL), + ('pmid', E'\uff14\uff11', NULL, NULL), + ('pmid', '0', NULL, NULL), + ('pmid', 'abc', NULL, NULL), + ('pmid', '', NULL, NULL), + ('pmid', NULL, NULL, NULL), + ('fon', 'RFA-NS-27-002', NULL, 'RFANS27002'), + ('fon', 'rfa ns 27 002', NULL, 'RFANS27002'), + ('fon', 'NSF 26-526', NULL, 'NSF26526'), + ('fon', E'Stra\u00dfe-1', NULL, 'STRAE1'), + ('fon', ' ', NULL, NULL), + ('fon', NULL, NULL, NULL), + ('award', '1U01MH143789-01', NULL, 'U01MH143789'), + ('award', '5r34da059506-02', NULL, 'R34DA059506'), + ('award', 'RF1MH999999', NULL, 'RF1MH999999'), + ('award', '1UG3NS999999-01A1', NULL, 'UG3NS999999'), + ('award', 'NSF 2123456', NULL, 'NSF2123456'), + ('award', '', NULL, NULL), + ('award', NULL, NULL, NULL), + ('name', 'UNIVERSITY OF CALIFORNIA, SAN DIEGO', NULL, 'universityofcaliforniasandiego'), + ('name', 'University of California San Diego', NULL, 'universityofcaliforniasandiego'), + ('name', 'CHILDREN''S HOSP OF PHILADELPHIA', NULL, 'childrenshospofphiladelphia'), + ('name', E'Universit\u00e9 Paris Cit\u00e9', NULL, 'universitepariscite'), + ('name', E'\u0130stanbul \u00dcniversitesi', NULL, 'istanbuluniversitesi'), + ('name', E'Stra\u00dfe', NULL, 'strae'), + ('name', E'\u212aelvin Lab', NULL, 'kelvinlab'), + ('name', 'Bijan Pesaran', NULL, 'bijanpesaran'), + ('name', E'Laboratory of \u03b1-Synuclein Biology', NULL, 'laboratoryofalphasynucleinbiology'), + ('name', E'\u03a3-\u03a9 Center', NULL, 'sigmaomegacenter'), + ('name', E'\u00b5-Lab', NULL, 'mulab'), + ('name', E'\u039b\u03cc\u03b3\u03bf\u03c2 Institute', NULL, 'lambdaomicrongammaomicronsigmainstitute'), + ('name', E'\u5317\u4eac\u5927\u5b66', NULL, NULL), + ('name', ' ', NULL, NULL), + ('name', NULL, NULL, NULL), + ('title', 'CaBLAM: a high-contrast bioluminescent Ca<sup>2+</sup> indicator', NULL, 'cablamahighcontrastbioluminescentca2indicator'), + ('title', 'CaBLAM! a high-contrast bioluminescent Ca[2+] indicator', NULL, 'cablamahighcontrastbioluminescentca2indicator'), + ('title', E'Ca\u00b2\u207a imaging', NULL, 'ca2imaging'), + ('title', E'\u03b1-synuclein aggregation in dopaminergic neurons', NULL, 'alphasynucleinaggregationindopaminergicneurons'), + ('title', E'\u03b2-synuclein aggregation in dopaminergic neurons', NULL, 'betasynucleinaggregationindopaminergicneurons'), + ('title', E'\u00b5-opioid receptors and \u03b8/\u03b3 coupling', NULL, 'muopioidreceptorsandthetagammacoupling'), + ('title', E'\u03bc-opioid receptors and \u0398/\u0393 coupling', NULL, 'muopioidreceptorsandthetagammacoupling'), + ('title', NULL, NULL, NULL), + ('preprint', 'bioRxiv', '10.64898/2026.06.01.728862', 'true'), + ('preprint', 'Nat Methods', '10.1038/s41592-025-02972-0', 'false'), + ('preprint', 'ArXiv', NULL, 'true'), + ('preprint', 'Res Sq', '10.21203/rs.3.rs-1/v1', 'true'), + ('preprint', NULL, 'https://doi.org/10.1101/2023.03.11.532197', 'true'), + ('preprint', 'Learn Mem', '10.1101/lm.054001.124', 'false'), + ('preprint', 'Genome Res', 'https://doi.org/10.1101/gr.279001.124', 'false'), + ('preprint', NULL, '10.1101/gad.350000.122', 'false'), + ('preprint', NULL, '10.1101/2024.05.01.590001', 'true'), + ('preprint', NULL, '10.1101/087593', 'true'), + ('preprint', NULL, 'doi:10.1101/2020.03.17.20037572', 'true'), + ('preprint', 'Elife', '10.7554/eLife.89892', 'false'), + ('preprint', NULL, NULL, 'false') +-- identity-vectors:end + ) AS v(kind, a, b, want) + CROSS JOIN LATERAL ( + SELECT CASE v.kind + WHEN 'orcid' THEN public.kg_orcid_key(v.a) + WHEN 'doi' THEN public.kg_doi_key(v.a) + WHEN 'pmid' THEN public.kg_pmid_key(v.a) + WHEN 'fon' THEN public.kg_fon_key(v.a) + WHEN 'award' THEN public.kg_award_key(v.a) + WHEN 'name' THEN public.kg_name_key(v.a) + WHEN 'title' THEN public.kg_title_key(v.a) + WHEN 'preprint' THEN public.kg_is_preprint(v.a, v.b)::text + END AS got) g + LOOP + _n := _n + 1; + IF r.got IS DISTINCT FROM r.want THEN + _bad := _bad + 1; + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('identity vector', + format('%s(%s%s)', r.kind, quote_nullable(r.a), CASE WHEN r.kind = 'preprint' THEN ', ' || quote_nullable(r.b) ELSE '' END), + 'error', + format('this database computes %s, kg/identity_keys.json wants %s: its key would differ from the write paths'' and the export gate''s. Check the function in keys-01 and this server''s Postgres version; nothing is changed until they agree.', + quote_nullable(r.got), quote_nullable(r.want))); + END IF; + END LOOP; + FOR c IN + SELECT v.py, v.pp, v.pd, v.uy, v.up, v.want, public.kg_preprint_is_later(v.py, v.pp, v.pd, v.uy, v.up) AS got + FROM (VALUES +-- chronology-vectors:begin (generated from kg/identity_keys.json: preprint year, preprint pmid, preprint doi, published year, published pmid, want) + (2025, '41040807', NULL, 2025, '42131509', false), + (2026, '90000017', NULL, 2026, '90000016', true), + (2026, '90000016', NULL, 2026, '90000017', false), + (2027, '37425712', '10.1101/2023.06.25.546478', 2026, '41331138', false), + (2027, '37425712', NULL, 2026, '41331138', false), + (2025, '99999999', NULL, 2026, '10000000', true), + (2027, '37425712', '10.1101/2027.01.01.546478', 2026, '41331138', false), + (NULL, '200002', NULL, NULL, '200001', true), + (NULL, 'PMID: 0200001', NULL, 2026, '200002', false), + (2026, '123456789012345678901', NULL, NULL, '99', true), + (2027, NULL, '10.1101/2025.04.04.640001', 2026, NULL, false), + (2025, NULL, 'https://doi.org/10.1101/2027.01.05.640002', 2026, NULL, true), + (2027, NULL, '10.1101/2026.02.02.640003', 2026, NULL, false), + (NULL, NULL, '10.64898/2027.06.01.728862', 2026, NULL, true), + (NULL, NULL, 'doi:10.1101/2020.03.17.20037572', 2019, NULL, true), + (2027, NULL, '10.1101/087593', 2026, NULL, true), + (2027, NULL, '10.21203/rs.3.rs-1/v1', 2026, NULL, true), + (2026, 'abc', NULL, 2026, '123', false), + (2027, 'abc', NULL, 2026, '123', true), + (2027, '41331138', NULL, 2026, '0041331138', true), + (2025, NULL, NULL, 2026, NULL, false), + (2026, NULL, NULL, 2025, NULL, true), + (NULL, NULL, '10.1101/2027.01.05.640002', NULL, NULL, false), + (NULL, NULL, NULL, NULL, NULL, false) +-- chronology-vectors:end + ) AS v(py, pp, pd, uy, up, want) + LOOP + _n := _n + 1; + IF c.got IS DISTINCT FROM c.want THEN + _bad := _bad + 1; + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('identity vector', + format('chronology(%s, %s, %s, %s, %s)', quote_nullable(c.py), quote_nullable(c.pp), quote_nullable(c.pd), quote_nullable(c.uy), quote_nullable(c.up)), + 'error', + format('this database computes %s, kg/identity_keys.json wants %s: it would pair preprints and papers otherwise than the export gate. Check kg_preprint_is_later in keys-01; nothing is changed until they agree.', + quote_nullable(c.got), quote_nullable(c.want))); + END IF; + END LOOP; + IF _bad = 0 THEN + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('identity vectors', 'kg/identity_keys.json', 'report', + format('%s of %s vectors agree (orcid, doi, pmid, fon, award, name, title, preprint, chronology): this database computes the same keys as kg/identity_keys.py and _shared/identity-keys.ts.', _n, _n)); + END IF; +END +$blk$; + +-- ------------------------------------------------------------------------------------------------ +-- [index-01 .. index-07] One unique index per identity key (pg_temp.kg_unique_key, section 1). +-- No index on a funding call's URL: a notice URL can be a landing page that lists several calls. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_index_01() RETURNS void LANGUAGE plpgsql AS +$blk$ BEGIN + PERFORM pg_temp.kg_unique_key('uq_investigators_orcid_key', 'investigators', 'public.kg_orcid_key(orcid)', 'name'); +END $blk$; +CREATE OR REPLACE FUNCTION pg_temp.kg_b_index_02() RETURNS void LANGUAGE plpgsql AS +$blk$ BEGIN + PERFORM pg_temp.kg_unique_key('uq_publications_doi_key', 'publications', 'public.kg_doi_key(doi)', 'title'); +END $blk$; +CREATE OR REPLACE FUNCTION pg_temp.kg_b_index_03() RETURNS void LANGUAGE plpgsql AS +$blk$ BEGIN + PERFORM pg_temp.kg_unique_key('uq_publications_pmid_key', 'publications', 'public.kg_pmid_key(pmid)', 'title'); +END $blk$; +CREATE OR REPLACE FUNCTION pg_temp.kg_b_index_04() RETURNS void LANGUAGE plpgsql AS +$blk$ BEGIN + PERFORM pg_temp.kg_unique_key('uq_organizations_name_key', 'organizations', 'public.kg_name_key(name)', 'name'); +END $blk$; +CREATE OR REPLACE FUNCTION pg_temp.kg_b_index_05() RETURNS void LANGUAGE plpgsql AS +$blk$ BEGIN + PERFORM pg_temp.kg_unique_key('uq_grants_award_key', 'grants', 'public.kg_award_key(grant_number)', 'title'); +END $blk$; +CREATE OR REPLACE FUNCTION pg_temp.kg_b_index_06() RETURNS void LANGUAGE plpgsql AS +$blk$ BEGIN + PERFORM pg_temp.kg_unique_key('uq_projects_award_key', 'projects', 'public.kg_award_key(grant_number)', 'grant_number'); +END $blk$; +CREATE OR REPLACE FUNCTION pg_temp.kg_b_index_07() RETURNS void LANGUAGE plpgsql AS +$blk$ BEGIN + PERFORM pg_temp.kg_unique_key('uq_funding_opportunities_fon_key', 'funding_opportunities', 'public.kg_fon_key(fon)', 'title'); +END $blk$; + +-- ------------------------------------------------------------------------------------------------ +-- [nodes-01] One detail row per KG node: uq_<table>_resource_id on the 13 node tables +-- (kg/identity_keys.json one_row_per_node). One decision per table. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_nodes_01() RETURNS void LANGUAGE plpgsql AS +$blk$ +DECLARE t record; +BEGIN + FOR t IN + SELECT * FROM (VALUES + (1, 'investigators', 'name'), (2, 'organizations', 'name'), (3, 'grants', 'grant_number'), + (4, 'publications', 'title'), (5, 'software_tools', 'name'), (6, 'funding_opportunities', 'fon'), + (7, 'dandisets', 'dandiset_id'), (8, 'species', 'name'), (9, 'device_models', 'model_name'), + (10, 'device_manufacturers', 'name'), (11, 'device_categories', 'key'), (12, 'jobs', 'title'), + (13, 'announcements', 'title') + ) AS v(n, tbl, lab) + ORDER BY 1 + LOOP + PERFORM pg_temp.kg_unique_key('uq_' || t.tbl || '_resource_id', t.tbl, 'resource_id', t.lab); + END LOOP; +END +$blk$; + +-- ------------------------------------------------------------------------------------------------ +-- [links-01] resource_links accepts revision_of; produced no longer accepts a publication +-- The CHECK gets the five predicates, and resource_links_check_types() the rule for revision_of +-- (section 1). Each is changed only while it is still as 20261116150000 tools-04 created it (or +-- as this script did): if a later migration has changed resource_links, nothing here is changed and +-- the block says so (a developer reconciles the two), and the version blocks after it skip. +-- A produced -> publication link that exists keeps produced accepting a publication, and is listed. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_links_01() RETURNS void LANGUAGE plpgsql AS +$blk$ +DECLARE + _t regclass := to_regclass('public.resource_links'); + _want text[] := ARRAY['evaluates', 'produced', 'revision_of', 'trained_on', 'was_attributed_to']; + _fn regprocedure := to_regprocedure('public.resource_links_check_types()'); + _ddl text := pg_temp.kg_links_check_ddl(); + _mark text := $m$AND _o IN ('dataset', 'software', 'tool',$m$; + _keep text; + _target text; + _con text; + _have text[]; + _live text; + _cstate text; + _fstate text; + _missing text; + _npub int; + _pubs text; + _comment text := 'Curated links between two resources (KG nodes) that no column holds. predicate = a kg/bbqs.linkml.yaml slot; the exporter writes (subject, bbqs:<predicate>, object). Only evidenced links: evidence cites the record or repo statement. revision_of (20261117181500) links a published paper to its preprint, the later version to the earlier one (prov:wasRevisionOf), never both ways; public.kg_link_publication_versions() records them. A project''s papers are project_publications rows, not produced links.'; +BEGIN + IF _t IS NULL THEN + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('resource_links', 'public.resource_links', 'skipped', + '20261116150000_link_isolated_nodes.sql (its block tools-04) is not applied here: there is no resource_links table, so no version link can be recorded. links-02, versions-01 and versions-02 skip; the keys and indexes above do not need it. Apply 20261116150000, then run this script again.'); + RETURN; + END IF; + SELECT string_agg(c, ', ') INTO _missing + FROM unnest(ARRAY['id', 'subject_id', 'predicate', 'object_id', 'basis', 'evidence']) AS c + WHERE NOT EXISTS (SELECT 1 FROM pg_attribute a WHERE a.attrelid = _t AND a.attname = c AND a.attnum > 0 AND NOT a.attisdropped); + IF _missing IS NOT NULL THEN + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('resource_links', 'public.resource_links', 'skipped', + format('public.resource_links has no column(s) %s here: it is not the table 20261116150000 created. Nothing is changed; the version blocks skip.', _missing)); + RETURN; + END IF; + + -- What is there: the CHECK's predicates, and which version of the type check. + SELECT pg_get_constraintdef(c.oid) INTO _con + FROM pg_constraint c WHERE c.conrelid = _t AND c.conname = 'resource_links_predicate_check' AND c.contype = 'c'; + _have := ARRAY(SELECT DISTINCT m[1] FROM regexp_matches(coalesce(_con, ''), '''([a-z_]+)''', 'g') AS m ORDER BY 1); + _cstate := CASE WHEN _have = _want THEN 'current' + WHEN _have <@ _want THEN 'older' + WHEN 'revision_of' = ANY (_have) THEN 'later' + ELSE 'unknown' END; + IF _cstate = 'older' THEN + -- Every read and write of resource_links waits from here (ALTER TABLE takes this lock anyway), + -- so the produced -> publication count below cannot change before the new rules are in place. + LOCK TABLE public.resource_links IN ACCESS EXCLUSIVE MODE; + END IF; + SELECT count(*), string_agg(format('%s produced %s %L (%s)', l.subject_id, l.object_id, o.name, l.id), '; ' ORDER BY l.created_at, l.id) + INTO _npub, _pubs + FROM public.resource_links l JOIN public.resources o ON o.id = l.object_id + WHERE l.predicate = 'produced' AND o.resource_type::text = 'publication'; + _keep := replace(_ddl, _mark, $m$AND _o IN ('publication', 'dataset', 'software', 'tool',$m$); + IF _keep = _ddl THEN + RAISE EXCEPTION 'links-01: the produced rule was not found in the type check text (edit of this script?)'; + END IF; + _target := CASE WHEN _npub > 0 THEN _keep ELSE _ddl END; + SELECT p.prosrc INTO _live FROM pg_proc p WHERE p.oid = _fn; + _fstate := CASE WHEN _fn IS NULL THEN 'missing' + WHEN replace(_live, E'\r', '') = replace(pg_temp.kg_fn_body(_target), E'\r', '') THEN 'current' + WHEN replace(_live, E'\r', '') IN (replace(pg_temp.kg_fn_body(_ddl), E'\r', ''), replace(pg_temp.kg_fn_body(_keep), E'\r', '')) THEN 'ours' + WHEN md5(pg_temp.kg_norm_src(_live)) = pg_temp.kg_links_check_tools04_md5() THEN 'tools-04' + WHEN _live LIKE '%''revision\_of''%' THEN 'later' + ELSE 'unknown' END; + + IF _cstate IN ('later', 'unknown') OR _fstate IN ('later', 'unknown') THEN + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('resource_links', 'public.resource_links', CASE WHEN pg_temp.kg_revision_of_accepted() THEN 'noop' ELSE 'skipped' END, + format('another migration has changed resource_links since 20261116150000 (its CHECK allows %s; resource_links_check_types() is %s), so this block leaves both as they are. revision_of is %s.', + coalesce(nullif(array_to_string(_have, ', '), ''), 'anything (no CHECK)'), + CASE _fstate WHEN 'later' THEN 'a later version that handles revision_of' WHEN 'unknown' THEN 'a version this script does not know' ELSE 'as tools-04 or this script wrote it' END, + CASE WHEN pg_temp.kg_revision_of_accepted() THEN 'accepted: the version blocks run' + ELSE 'not accepted: the version blocks skip until a developer reconciles that migration with this one' END)); + RETURN; + END IF; + + IF _cstate = 'older' THEN + ALTER TABLE public.resource_links DROP CONSTRAINT IF EXISTS resource_links_predicate_check; + ALTER TABLE public.resource_links ADD CONSTRAINT resource_links_predicate_check + CHECK (predicate IN ('trained_on', 'evaluates', 'was_attributed_to', 'produced', 'revision_of')); + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('resource_links', 'resource_links_predicate_check', 'done', + format('was %s; now %s', coalesce(_con, 'missing'), + pg_get_constraintdef((SELECT c.oid FROM pg_constraint c WHERE c.conrelid = _t AND c.conname = 'resource_links_predicate_check')))); + ELSE + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('resource_links', 'resource_links_predicate_check', 'noop', 'already allows ' || array_to_string(_have, ', ')); + END IF; + + IF _fstate = 'current' THEN + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('resource_links', 'resource_links_check_types()', 'noop', + CASE WHEN _npub > 0 THEN 'already this script''s, with produced still accepting a publication (below)' + ELSE 'already this script''s: revision_of publication -> publication, never both ways; produced accepts no publication' END); + ELSE + EXECUTE _target; + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('resource_links', 'resource_links_check_types()', 'done', + format('%s: revision_of links a publication to a publication, never both ways; %s', + CASE _fstate WHEN 'missing' THEN 'created' WHEN 'tools-04' THEN 'replaced the 20261116150000 tools-04 version' ELSE 'replaced this script''s other variant' END, + CASE WHEN _npub > 0 THEN 'produced still accepts a publication while the link(s) listed below exist' + ELSE 'produced no longer accepts a publication (one fact, one store: project_publications)' END)); + END IF; + IF NOT EXISTS (SELECT 1 FROM pg_trigger WHERE tgrelid = _t AND tgname = 'trg_resource_links_check_types' AND NOT tgisinternal) THEN + CREATE TRIGGER trg_resource_links_check_types BEFORE INSERT OR UPDATE ON public.resource_links + FOR EACH ROW EXECUTE FUNCTION public.resource_links_check_types(); + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('resource_links', 'trg_resource_links_check_types', 'done', 'the type-check trigger was missing: created'); + END IF; + IF _npub > 0 THEN + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('resource_links', 'produced -> publication', 'skipped', + format('%s link(s) say a project produced a paper: %s. A project''s papers are project_publications rows (the RePORTER credit): add each to project_publications if RePORTER credits it, delete the link, then run this script again, which then stops produced accepting a publication.', _npub, _pubs)); + END IF; + IF obj_description(_t, 'pg_class') IS DISTINCT FROM _comment THEN + EXECUTE format('COMMENT ON TABLE public.resource_links IS %L', _comment); + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('resource_links', 'table comment', 'done', 'now names revision_of and kg_link_publication_versions()'); + END IF; +END +$blk$; + +-- ------------------------------------------------------------------------------------------------ +-- [links-02] Create public.kg_link_publication_versions(), the pairing rule (section 1) +-- Created only where resource_links accepts revision_of (otherwise the publications importer +-- reports version links as unavailable, which is the graceful state). One that exists with another +-- body is left as it is (a later migration may have improved it): this script never downgrades it. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_links_02() RETURNS void LANGUAGE plpgsql AS +$blk$ +DECLARE + _sig text := 'public.kg_link_publication_versions(uuid[],text,boolean,boolean)'; + _fn regprocedure := to_regprocedure('public.kg_link_publication_versions(uuid[],text,boolean,boolean)'); + _ddl text := pg_temp.kg_versions_ddl(); + _live text; + _did text[] := '{}'; + _about text := 'The preprint/published pairing rule, stated once (20261117181500_prevent_duplicates): two publications are versions of one work when both are KG nodes, their kg_title_key values are equal and at least 20 characters, exactly one is a preprint (kg_is_preprint), exactly one record of the title group is not a preprint, the preprint is not later than the published record (kg_preprint_is_later), and a project credits both (project_publications). Records resource_links (published, revision_of, preprint). _publication_ids (publications.id) limits it to their title groups; _dry returns would_link without writing; _both_listed links only a pair whose two records are both listed (the other pairs come back as would_link). Outcomes: done, noop, skipped, would_link. service_role only.'; +BEGIN + IF NOT pg_temp.kg_revision_of_accepted() THEN + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('pairing rule', _sig, 'skipped', + 'not created: resource_links does not accept revision_of here (see links-01). import-grant-publications reports version links as unavailable until it exists.'); + RETURN; + END IF; + -- The draft of this script that went under review (commit b7c6044) had a three-argument version, + -- without the order rule. Two overloads would make the importer's call ambiguous (PostgREST + -- PGRST203), so one left behind is an error: a developer drops it, then runs this script again. + IF to_regprocedure('public.kg_link_publication_versions(uuid[],text,boolean)') IS NOT NULL THEN + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('pairing rule', 'public.kg_link_publication_versions(uuid[],text,boolean)', 'error', + 'a three-argument kg_link_publication_versions (a draft of this script) exists here: run DROP FUNCTION public.kg_link_publication_versions(uuid[], text, boolean); first. Beside the four-argument one it would make the importer''s call ambiguous (PGRST203), and it links a preprint later than its paper.'); + RETURN; + END IF; + -- A later draft (kg/mcp-server at 65b5b7a) ordered two versions by year first, through a + -- four-argument kg_preprint_is_later. Where it ran, its kg_link_publication_versions calls that + -- function, and this block would leave it as it is (another body): the year-first order, which + -- refuses real pairs, would stay in use. So it is an error: a developer drops both, then runs this + -- script again (nothing else uses them; resource_links rows are kept). + IF to_regprocedure('public.kg_preprint_is_later(integer,text,integer,text)') IS NOT NULL THEN + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('pairing rule', 'public.kg_preprint_is_later(integer,text,integer,text)', 'error', + 'a four-argument kg_preprint_is_later (an earlier draft of this script, which ordered two versions by year first) exists here: run DROP FUNCTION IF EXISTS public.kg_link_publication_versions(uuid[], text, boolean, boolean); DROP FUNCTION public.kg_preprint_is_later(integer, text, integer, text); first (no resource_links row is lost), then run this script again. Left in place, the pairing rule would keep its year-first order, and a preprint''s year drifts later as new versions are posted.'); + RETURN; + END IF; + IF _fn IS NULL THEN + EXECUTE _ddl; + _fn := to_regprocedure(_sig); + EXECUTE format('COMMENT ON FUNCTION %s IS %L', _sig, _about); + _did := _did || 'created'::text; + ELSE + SELECT p.prosrc INTO _live FROM pg_proc p WHERE p.oid = _fn; + IF replace(_live, E'\r', '') IS DISTINCT FROM replace(pg_temp.kg_fn_body(_ddl), E'\r', '') THEN + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('pairing rule', _sig, 'skipped', + 'exists with another body (a later migration?), so it is left as it is, with its privileges: this script never downgrades it. versions-01 and versions-02 use it as it is; compare it with this file if that is not expected.'); + RETURN; + END IF; + IF obj_description(_fn, 'pg_proc') IS DISTINCT FROM _about THEN + EXECUTE format('COMMENT ON FUNCTION %s IS %L', _sig, _about); + _did := _did || 'comment'::text; + END IF; + END IF; + -- Supabase grants EXECUTE on every new function to anon and authenticated (default privileges): + -- writing version links is the importer's and a curator's job, through the service role. + IF has_function_privilege('anon', _fn, 'EXECUTE') OR has_function_privilege('authenticated', _fn, 'EXECUTE') + OR NOT has_function_privilege('service_role', _fn, 'EXECUTE') THEN + REVOKE ALL ON FUNCTION public.kg_link_publication_versions(uuid[], text, boolean, boolean) FROM PUBLIC, anon, authenticated; + GRANT EXECUTE ON FUNCTION public.kg_link_publication_versions(uuid[], text, boolean, boolean) TO service_role; + _did := _did || 'EXECUTE for service_role only'::text; + END IF; + IF cardinality(_did) > 0 THEN + PERFORM pg_notify('pgrst', 'reload schema'); -- PostgREST sees the RPC now (sent at COMMIT only) + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('pairing rule', _sig, 'done', array_to_string(_did, ', ') || '; anon and authenticated may not call it'); + ELSE + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('pairing rule', _sig, 'noop', 'already present with this body; EXECUTE for service_role only'); + END IF; +END +$blk$; + +-- ------------------------------------------------------------------------------------------------ +-- [versions-01] Link the 5 preprint/published pairs of the 2026-11-17 export +-- Each of the 10 PMIDs must name exactly one publication row (by its key), else its pair is +-- skipped. Then ONE call of the pairing rule decides, for the title groups of those rows, with +-- _both_listed: it links a pair only when both its records are among the 10 (basis curator_fill: a +-- curator read these 5 pairs, and only these). One decision is written per expected pair. Any other +-- pair the rule finds in those title groups is listed as would_link and NOT linked: nobody read it, +-- so curator_fill would be a false claim (versions-02 says how to link it). +CREATE OR REPLACE FUNCTION pg_temp.kg_b_versions_01() RETURNS void LANGUAGE plpgsql AS +$blk$ +DECLARE + e record; + r record; + _ids uuid[] := '{}'; + _seen text[] := '{}'; + _lab text; +BEGIN + IF to_regprocedure('public.kg_link_publication_versions(uuid[],text,boolean,boolean)') IS NULL OR NOT pg_temp.kg_revision_of_accepted() THEN + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + SELECT 'version link', format('%s: PMID %s revision_of preprint PMID %s (%s)', k.label, k.published_pmid, k.preprint_pmid, k.grant_number), + 'skipped', 'resource_links does not accept revision_of here, or kg_link_publication_versions() is missing (see links-01, links-02): nothing is linked' + FROM pg_temp.kg_known_versions() k ORDER BY k.ord; + RETURN; + END IF; + FOR e IN + SELECT k.*, + ARRAY(SELECT p.id FROM public.publications p WHERE public.kg_pmid_key(p.pmid) = k.published_pmid ORDER BY p.id) AS a, + ARRAY(SELECT p.id FROM public.publications p WHERE public.kg_pmid_key(p.pmid) = k.preprint_pmid ORDER BY p.id) AS b + FROM pg_temp.kg_known_versions() k ORDER BY k.ord + LOOP + IF cardinality(e.a) = 1 AND cardinality(e.b) = 1 THEN + _ids := _ids || e.a || e.b; + ELSE + _seen := _seen || e.label; + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('version link', format('%s: PMID %s revision_of preprint PMID %s (%s)', e.label, e.published_pmid, e.preprint_pmid, e.grant_number), 'skipped', + format('PMID %s names %s publication row(s) and PMID %s names %s; each must be exactly one. A missing paper is imported by import-grant-publications; two rows are a duplicate to merge (see index-03). Then run this script again.', + e.published_pmid, cardinality(e.a), e.preprint_pmid, cardinality(e.b))); + END IF; + END LOOP; + IF cardinality(_ids) = 0 THEN + RETURN; + END IF; + + FOR r IN SELECT * FROM public.kg_link_publication_versions(_ids, 'curator_fill', false, true) LOOP + SELECT format('%s: PMID %s revision_of preprint PMID %s (%s)', k.label, k.published_pmid, k.preprint_pmid, k.grant_number) + INTO _lab + FROM pg_temp.kg_known_versions() k + JOIN public.publications pa ON public.kg_pmid_key(pa.pmid) = k.published_pmid AND pa.resource_id = r.subject_id + JOIN public.publications pb ON public.kg_pmid_key(pb.pmid) = k.preprint_pmid AND pb.resource_id = r.object_id + ORDER BY k.ord LIMIT 1; + IF _lab IS NOT NULL THEN + _seen := _seen || split_part(_lab, ':', 1); + END IF; + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('version link', coalesce(_lab, format('not one of the 5 pairs, in their title groups: %s revision_of %s', r.subject_id, r.object_id)), + CASE WHEN _lab IS NOT NULL AND r.outcome IN ('done', 'noop', 'skipped') THEN r.outcome ELSE 'report' END, + r.detail || CASE WHEN _lab IS NULL AND r.outcome = 'would_link' + THEN '. Not linked here: this block links the 5 pairs a curator read (curator_fill) and no other; versions-02 says how to link this one' + ELSE '' END); + END LOOP; + + FOR e IN + SELECT k.*, + (SELECT min(p.id::text)::uuid FROM public.publications p WHERE public.kg_pmid_key(p.pmid) = k.published_pmid) AS a, + (SELECT min(p.id::text)::uuid FROM public.publications p WHERE public.kg_pmid_key(p.pmid) = k.preprint_pmid) AS b + FROM pg_temp.kg_known_versions() k + WHERE NOT k.label = ANY (_seen) + ORDER BY k.ord + LOOP + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('version link', format('%s: PMID %s revision_of preprint PMID %s (%s)', e.label, e.published_pmid, e.preprint_pmid, e.grant_number), 'skipped', + 'the pairing rule does not pair them: ' || pg_temp.kg_why_not_paired(e.a, e.b) || '. Nothing is linked; a curator checks the two records.'); + END LOOP; +END +$blk$; + +-- ------------------------------------------------------------------------------------------------ +-- [versions-02] Any other pair the rule finds (read-only: a dry call of the pairing rule) +-- 'would_link' is a pair not linked yet: import-grant-publications links it (basis 'algorithmic') +-- if it imports that project's papers again, or a curator who has read the two records links it +-- (basis 'curator_fill', named with set_actor); 'skipped' is a near-pair and why it is not one. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_versions_02() RETURNS void LANGUAGE plpgsql AS +$blk$ +DECLARE + r record; + _noop int := 0; + _other int := 0; +BEGIN + IF to_regprocedure('public.kg_link_publication_versions(uuid[],text,boolean,boolean)') IS NULL OR NOT pg_temp.kg_revision_of_accepted() THEN + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('other pairs', 'kg_link_publication_versions(NULL, ''algorithmic'', true)', 'skipped', + 'resource_links does not accept revision_of here, or the function is missing: nothing to look for'); + RETURN; + END IF; + FOR r IN SELECT * FROM public.kg_link_publication_versions(NULL, 'algorithmic', true) LOOP + IF r.outcome = 'noop' THEN + _noop := _noop + 1; + CONTINUE; + END IF; + _other := _other + 1; + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('other pair (' || r.outcome || ')', format('%s revision_of %s', r.subject_id, r.object_id), 'report', + r.detail || CASE WHEN r.outcome = 'would_link' + THEN format('. Not linked yet. import-grant-publications links it if it imports that project''s papers again (it runs only when invoked: 20260831140000 leaves its weekly schedule commented out). Or a curator who has read the two records links it in the SQL editor, named: SELECT public.set_actor(''curator:<name>''); SELECT * FROM public.kg_link_publication_versions(ARRAY(SELECT id FROM public.publications WHERE resource_id IN (%L, %L)), ''curator_fill'', false, true);', + r.subject_id, r.object_id) + ELSE '' END); + END LOOP; + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('other pairs', 'every publication', 'report', + format('%s pair(s) linked; %s other pair(s) or near-pair(s) listed above', _noop, _other)); +END +$blk$; + +-- ------------------------------------------------------------------------------------------------ +-- [orphans-01] What still keeps a person or an organization from being one node (read-only) +-- No database rule prevents an orphan investigator spine row this round (a person deleted and the +-- spine row left; or the spine row written and the person insert failed): the write paths now +-- insert the person first, and this block lists what is left on every run. +CREATE OR REPLACE FUNCTION pg_temp.kg_b_orphans_01() RETURNS void LANGUAGE plpgsql AS +$blk$ +DECLARE + _n bigint; + _list text; + t record; +BEGIN + SELECT count(*), string_agg(format('%s %L', x.id, x.name), '; ' ORDER BY x.name) FILTER (WHERE x.rn <= 50) + INTO _n, _list + FROM (SELECT r.id, r.name, row_number() OVER (ORDER BY r.name, r.id) AS rn + FROM public.resources r + WHERE r.resource_type::text = 'investigator' + AND NOT EXISTS (SELECT 1 FROM public.investigators i WHERE i.resource_id = r.id)) x; + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('orphan spine rows', 'investigator', 'report', + CASE WHEN _n = 0 THEN 'none: every investigator node has its person row' + ELSE format('%s investigator node(s) that no person row points at (20261116150000 people-01 deleted 14 such): %s%s. The real person is usually a twin (double spaces, RePORTER capitals): a curator merges by hand.', + _n, _list, CASE WHEN _n > 50 THEN '; ...' ELSE '' END) END); + + SELECT count(*), string_agg(format('%L', x.name), ', ' ORDER BY x.name) FILTER (WHERE x.rn <= 50) + INTO _n, _list + FROM (SELECT i.name, row_number() OVER (ORDER BY i.name) AS rn FROM public.investigators i WHERE i.resource_id IS NULL) x; + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('people with no node', 'investigators.resource_id IS NULL', 'report', + CASE WHEN _n = 0 THEN 'none' + ELSE format('%s person row(s) with no spine row, so not in the KG (an onboarding visibility decision, not a duplicate): %s%s', _n, _list, CASE WHEN _n > 50 THEN ', ...' ELSE '' END) END); + + SELECT count(*), string_agg(format('%L (node %L)', x.pname, x.rname), '; ' ORDER BY x.pname) FILTER (WHERE x.rn <= 50) + INTO _n, _list + FROM (SELECT i.name AS pname, r.name AS rname, row_number() OVER (ORDER BY i.name) AS rn + FROM public.investigators i JOIN public.resources r ON r.id = i.resource_id + WHERE public.kg_name_key(i.name) IS DISTINCT FROM public.kg_name_key(r.name)) x; + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('name drift', 'person vs spine row', 'report', + CASE WHEN _n = 0 THEN 'none: every person is named as its node is (by name key)' + ELSE format('%s person(s) named otherwise than their node: %s%s', _n, _list, CASE WHEN _n > 50 THEN '; ...' ELSE '' END) END); + + FOR t IN + SELECT * FROM (VALUES (1, 'publication', 'publications'), (2, 'organization', 'organizations'), + (3, 'grant', 'grants'), (4, 'funding', 'funding_opportunities')) AS v(n, rtype, tbl) + ORDER BY 1 + LOOP + EXECUTE format( + 'SELECT count(*), string_agg(format(''%%s %%L'', x.id, x.name), ''; '' ORDER BY x.name) FILTER (WHERE x.rn <= 20) + FROM (SELECT r.id, r.name, row_number() OVER (ORDER BY r.name, r.id) AS rn + FROM public.resources r + WHERE r.resource_type::text = %L + AND NOT EXISTS (SELECT 1 FROM public.%I d WHERE d.resource_id = r.id) + %s) x', + t.rtype, t.tbl, + CASE WHEN t.rtype = 'grant' THEN 'AND NOT EXISTS (SELECT 1 FROM public.projects pj WHERE pj.resource_id = r.id)' ELSE '' END) + INTO _n, _list; + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('orphan spine rows', t.rtype, 'report', + CASE WHEN _n = 0 THEN format('none: every %s node has its %s row', t.rtype, t.tbl) + ELSE format('%s %s node(s) with no %s row: %s%s', _n, t.rtype, t.tbl, _list, CASE WHEN _n > 20 THEN '; ...' ELSE '' END) END); + END LOOP; + + SELECT count(*), string_agg(format('%L (node %L)', x.oname, x.rname), '; ' ORDER BY x.oname) FILTER (WHERE x.rn <= 50) + INTO _n, _list + FROM (SELECT o.name AS oname, r.name AS rname, row_number() OVER (ORDER BY o.name) AS rn + FROM public.organizations o JOIN public.resources r ON r.id = o.resource_id + WHERE public.kg_name_key(o.name) IS DISTINCT FROM public.kg_name_key(r.name)) x; + INSERT INTO pg_temp.kg_fix_report (item, target, outcome, detail) + VALUES ('name drift', 'organization vs spine row', 'report', + CASE WHEN _n = 0 THEN 'none: every organization is named as its node is (by name key)' + ELSE format('%s organization(s) named otherwise than their node: %s%s', _n, _list, CASE WHEN _n > 50 THEN '; ...' ELSE '' END) END); +END +$blk$; + +-- ================================================================================================ +-- 3. RUN. One DO block runs every block above in order, inside one savepoint: +-- * dry run ('on'): at the end the savepoint is rolled back (every write, the DDL included), and +-- the report rows are put back, so the editor still shows them; +-- * real run ('off'): committed below, unless any block reported an error: then NOTHING is +-- changed and the editor shows the errors. +-- ================================================================================================ +DO $kg$ +DECLARE + kg_dry constant boolean := coalesce(current_setting('bbqs.dry_run', true), 'on') IS DISTINCT FROM 'off'; + kg_keep pg_temp.kg_fix_report[]; + kg_errs int := 0; + kg_list text; +BEGIN + BEGIN + PERFORM pg_temp.kg_run(1, 'keys-01', 'Create the identity-key functions public.kg_*_key, kg_title_key, kg_is_preprint and kg_preprint_is_later where missing', 'pg_temp.kg_b_keys_01'); + PERFORM pg_temp.kg_run(2, 'keys-02', 'Self-test: this database computes the 109 SQL vectors of kg/identity_keys.json', 'pg_temp.kg_b_keys_02'); + PERFORM pg_temp.kg_run(3, 'index-01', 'One person per ORCID iD: uq_investigators_orcid_key', 'pg_temp.kg_b_index_01'); + PERFORM pg_temp.kg_run(4, 'index-02', 'One publication per DOI: uq_publications_doi_key', 'pg_temp.kg_b_index_02'); + PERFORM pg_temp.kg_run(5, 'index-03', 'One publication per PMID: uq_publications_pmid_key', 'pg_temp.kg_b_index_03'); + PERFORM pg_temp.kg_run(6, 'index-04', 'One organization per name key: uq_organizations_name_key', 'pg_temp.kg_b_index_04'); + PERFORM pg_temp.kg_run(7, 'index-05', 'One grant per award: uq_grants_award_key', 'pg_temp.kg_b_index_05'); + PERFORM pg_temp.kg_run(8, 'index-06', 'One project per award: uq_projects_award_key', 'pg_temp.kg_b_index_06'); + PERFORM pg_temp.kg_run(9, 'index-07', 'One funding call per FON key: uq_funding_opportunities_fon_key', 'pg_temp.kg_b_index_07'); + PERFORM pg_temp.kg_run(10, 'nodes-01', 'One detail row per KG node: uq_<table>_resource_id on the 13 node tables', 'pg_temp.kg_b_nodes_01'); + PERFORM pg_temp.kg_run(11, 'links-01', 'resource_links accepts revision_of (publication -> publication); produced no longer accepts a publication', 'pg_temp.kg_b_links_01'); + PERFORM pg_temp.kg_run(12, 'links-02', 'Create public.kg_link_publication_versions(), the pairing rule (service_role only)', 'pg_temp.kg_b_links_02'); + PERFORM pg_temp.kg_run(13, 'versions-01', 'Link the 5 preprint/published pairs of the 2026-11-17 export (revision_of), and only them', 'pg_temp.kg_b_versions_01'); + -- read-only reports, last, so they describe the end state + PERFORM pg_temp.kg_run(14, 'versions-02', 'Any other pair the rule finds (read-only; how to link each)', 'pg_temp.kg_b_versions_02'); + PERFORM pg_temp.kg_run(15, 'orphans-01', 'Orphan spine rows, people with no node, name drift (read-only)', 'pg_temp.kg_b_orphans_01'); + + SELECT count(*) INTO kg_errs FROM pg_temp.kg_fix_report WHERE kind = 'decision' AND outcome = 'error'; + IF kg_dry OR kg_errs > 0 THEN + SELECT array_agg(r ORDER BY r.seq) INTO kg_keep FROM pg_temp.kg_fix_report r; + RAISE EXCEPTION USING ERRCODE = 'KG000', MESSAGE = 'prevent_duplicates: rolling the run back'; + END IF; + EXCEPTION WHEN SQLSTATE 'KG000' THEN + -- Every write above is undone at this point (the DDL too); only the report survives (copied first). + INSERT INTO pg_temp.kg_fix_report SELECT * FROM unnest(kg_keep); + END; + PERFORM public.set_actor('migration:prevent_duplicates'); + IF NOT kg_dry AND kg_errs > 0 THEN + SELECT string_agg(format('[%s] %s | %s | %s', r.block, r.item, coalesce(r.target, ''), r.detail), E'\n' ORDER BY r.seq) + INTO kg_list FROM pg_temp.kg_fix_report r WHERE r.kind = 'decision' AND r.outcome = 'error'; + RAISE EXCEPTION E'prevent_duplicates: NOTHING WAS CHANGED, % error(s):\n%', kg_errs, kg_list + USING HINT = 'Set the dry-run switch back to ''on'' and run again to see the whole report; fix the cause, or comment out that block''s line in section 3.'; + END IF; + PERFORM pg_temp.kg_result(kg_dry); +END +$kg$; + +COMMIT; + +-- The report (the editor shows only this last result): RESULT, then one summary row per block +-- (rows = rows written), then every decision. In a dry run it shows what WOULD be written. +SELECT * FROM pg_temp.kg_report(); diff --git a/supabase/migrations/20261117190000_hide_private_columns_from_anon.sql b/supabase/migrations/20261117190000_hide_private_columns_from_anon.sql new file mode 100644 index 00000000..bbb70c3b --- /dev/null +++ b/supabase/migrations/20261117190000_hide_private_columns_from_anon.sql @@ -0,0 +1,483 @@ +-- ════════════════════════════════════════════════════════════════════════════════════════════════ +-- 20261117190000_hide_private_columns_from_anon.sql +-- SECURITY: anonymous visitors could read e-mail addresses, auth user ids, pending role requests and +-- curators' review notes. Take those columns away from anon. Every public column stays readable, and +-- signed-in users keep exactly what they had. +-- ════════════════════════════════════════════════════════════════════════════════════════════════ +-- +-- WHY. Anyone holding the site's public key acts as anon. Supabase's default privileges grant anon +-- SELECT on every table and view; row-level security decides which ROWS a table shows, and a view +-- with its owner's rights (investigators_public, feature_suggestions_public) shows every row of its +-- base table. Nothing decided which COLUMNS anon may see. An audit of every table and view anon can +-- read (2026-11-17, on a replica of this schema with a planted value per column) found, under +-- SET ROLE anon: +-- investigators_public user_id (the auth login id, the key that turns every other user id +-- into a name) and pending_role (who has asked to be curator or admin) +-- projects last_edited_by (e-mail addresses: import_questionnaire_response writes +-- the respondent's, add-project-by-grant the editor's) and, inside +-- metadata, questionnaire_submitted_by (the respondent's e-mail), +-- questionnaire_submitted_at and questionnaire_response_id +-- project_questionnaire_status the same three. 20260811140000 meant it for signed-in curators +-- (GRANT ... TO authenticated); Supabase's default grant gave anon too +-- resources.created_by, announcements.posted_by, entity_comments.user_id, +-- harvester_relations.approved_by, harvester_settings.updated_by, dandisets.hidden_by: auth user ids +-- dandisets hidden_reason and hidden_at (a curator's decision on a test upload), +-- raw (EMBER's whole metadata payload, contributor e-mail addresses in it) +-- feature_suggestions_public submitter_name and github_username. 20260515233153 built this view to +-- hide the submitter; 20260813185734 put both back. +-- +-- WHAT. +-- 1. Column grants. On each object above, anon loses table-level SELECT and is granted SELECT on +-- every column it could read before except the private ones. authenticated and service_role are +-- not touched. A column added to one of these objects LATER is not readable by anon until a +-- migration grants it: GRANT SELECT (<column>) ON public.<object> TO anon. +-- 2. project_questionnaire_status: anon loses SELECT. Signed-in curators read it as before. +-- 3. The questionnaire attribution leaves the public metadata blob. Three columns on projects hold +-- it (questionnaire_submitted_by, questionnaire_submitted_at, questionnaire_response_id), and anon +-- cannot read them. A trigger moves the three keys out of metadata on every insert and update, so +-- no writer can put them back: not import_questionnaire_response, which still writes them into +-- metadata, not a hand-written import like 20260810140000, not a profile page saving a stale copy. +-- The first recorded submission wins, as the import function always had it. +-- project_questionnaire_status reads the columns. +-- +-- READERS (checked 2026-11-17). PostgREST runs select=* as SELECT *, which needs every column, so +-- each anon read of these objects that named no columns now names them, in the same change: +-- PrincipalInvestigators, InvestigatorSummary, GrantSummary, ResourceSummary, GenericSummary, +-- useResources, useProjectProfileEditor, Announcements, EmberDandisetsPanel, FeatureSuggestions and +-- EntityComments (submitter and user_id only for signed-in viewers), kg/bbqs_kg.py and kg/roundtrip.py +-- (PUBLIC_COLUMNS), e2e/data.spec.ts. None of them shows a private column to a visitor. The edge +-- functions read these objects as service_role or name public columns (_shared/kg.ts). The new lists +-- work before this is applied as well as after. tests/guards/anon-private-columns holds src/ and kg/ +-- to it: no select=* on these objects, and no private column in an anon read. +-- +-- CHECK FIRST (read-only; which private columns anon can read today, and how many projects carry the +-- attribution in metadata): +-- SELECT v.obj AS object, a.attname AS private_column, +-- has_column_privilege('anon', c.oid, a.attnum, 'SELECT') AS anon_can_read +-- FROM (VALUES ('investigators_public', '{user_id,pending_role}'::text[]), +-- ('feature_suggestions_public', '{submitter_name,github_username}'), +-- ('project_questionnaire_status', '{submitted_by,submitted_at,response_id,owner_email}'), +-- ('projects', '{last_edited_by}'), ('resources', '{created_by}'), +-- ('announcements', '{posted_by}'), ('entity_comments', '{user_id}'), +-- ('dandisets', '{raw,hidden_reason,hidden_by,hidden_at}'), +-- ('harvester_relations', '{approved_by}'), ('harvester_settings', '{updated_by}')) v(obj, cols) +-- JOIN pg_class c ON c.relname = v.obj AND c.relnamespace = 'public'::regnamespace +-- JOIN pg_attribute a ON a.attrelid = c.oid AND a.attname = ANY (v.cols) AND NOT a.attisdropped +-- UNION ALL +-- SELECT 'projects', 'metadata: questionnaire_submitted_by/_at/_response_id on ' || count(*) || ' rows', +-- has_column_privilege('anon', 'public.projects', 'metadata', 'SELECT') +-- FROM public.projects +-- WHERE metadata ?| ARRAY['questionnaire_submitted_by', 'questionnaire_submitted_at', 'questionnaire_response_id'] +-- ORDER BY 1, 2; +-- +-- HOW TO APPLY: Supabase SQL editor, project vpexxhfpvghlejljwpvt, as its default role (postgres). +-- Paste the WHOLE file, Run: one transaction, and a second run changes nothing. It refuses to commit +-- if anon could still read a private column, if anon would lose a public one, or if signed-in users' +-- access would change. The last statement reports, per object, what anon could read before and what +-- it may read now. +-- UNDO one column, if a public reader turns out to need it: GRANT SELECT (<column>) ON public.<object> +-- TO anon. Everything: GRANT SELECT ON public.<object> TO anon for each object, and the same for +-- project_questionnaire_status. The attribution stays in its columns either way. +-- ════════════════════════════════════════════════════════════════════════════════════════════════ + +SELECT public.set_actor('migration:hide_private_columns_from_anon'); + +-- ── 0. Preconditions: stop, changing nothing, on a schema this was not written for ────────────── +DO $guard$ +DECLARE + _bad text; + _have text[]; + _want text[] := ARRAY['grant_id', 'grant_number', 'grant_title', 'project_id', 'fields_filled', + 'fields_total', 'pct', 'missing_fields', 'status', 'submitted_by', 'submitted_at', + 'response_id', 'submitter_standing', 'owner_name', 'owner_email', 'form_url', + 'responses_url', 'answers']; +BEGIN + IF to_regclass('public.projects') IS NULL OR to_regclass('public.grants') IS NULL THEN + RAISE EXCEPTION 'public.projects or public.grants is missing: this is not the KG database'; + END IF; + + -- A second run finds the attribution columns made by the first; anything else of that name stops it. + SELECT string_agg(a.attname || ' ' || format_type(a.atttypid, a.atttypmod), ', ') + INTO _bad + FROM pg_attribute a + JOIN (VALUES ('questionnaire_submitted_by', 'text'), + ('questionnaire_submitted_at', 'timestamp with time zone'), + ('questionnaire_response_id', 'text')) w(name, type) ON w.name = a.attname + WHERE a.attrelid = 'public.projects'::regclass AND NOT a.attisdropped + AND format_type(a.atttypid, a.atttypmod) <> w.type; + IF _bad IS NOT NULL THEN + RAISE EXCEPTION 'public.projects already has %, not the text / timestamptz / text made here: nothing changed', _bad; + END IF; + + -- project_questionnaire_status is redefined in section 3. Postgres lets a redefinition only APPEND + -- columns (42P16), so the live list must be a prefix of the new one. The live view may lack the last + -- two, responses_url and answers (types.ts has neither); they are appended then. + IF to_regclass('public.project_questionnaire_status') IS NULL THEN + RAISE EXCEPTION 'public.project_questionnaire_status is missing: apply 20260811140000 first'; + END IF; + SELECT array_agg(a.attname::text ORDER BY a.attnum) INTO _have + FROM pg_attribute a + WHERE a.attrelid = 'public.project_questionnaire_status'::regclass AND a.attnum > 0 AND NOT a.attisdropped; + IF cardinality(_have) > cardinality(_want) OR _have <> _want[1:cardinality(_have)] THEN + RAISE EXCEPTION 'public.project_questionnaire_status has the columns (%), which (%) does not extend: nothing changed', + array_to_string(_have, ', '), array_to_string(_want, ', '); + END IF; +END +$guard$; + +-- ── 1. What is private, and what anon and signed-in users may read before this run ────────────── +-- The one list of private columns. Sections 4 and 5 and the report read it, and +-- tests/guards/anon-private-columns.test.mjs reads it from this file. +DROP TABLE IF EXISTS pg_temp.kg_private_from_anon; +CREATE TEMP TABLE kg_private_from_anon (object_name text, column_name text, holds text); +INSERT INTO kg_private_from_anon (object_name, column_name, holds) VALUES + ('investigators_public', 'user_id', 'auth user id'), + ('investigators_public', 'pending_role', 'a role request awaiting review'), + ('feature_suggestions_public', 'submitter_name', 'the submitter''s name'), + ('feature_suggestions_public', 'github_username', 'the submitter''s GitHub login'), + ('projects', 'last_edited_by', 'e-mail address, auth user id or actor label'), + ('projects', 'questionnaire_submitted_by', 'the respondent''s e-mail address'), + ('projects', 'questionnaire_submitted_at', 'when the questionnaire was submitted'), + ('projects', 'questionnaire_response_id', 'the Google Forms response id'), + ('resources', 'created_by', 'auth user id'), + ('announcements', 'posted_by', 'auth user id'), + ('entity_comments', 'user_id', 'auth user id'), + ('dandisets', 'raw', 'EMBER''s metadata payload, contributor e-mail addresses included'), + ('dandisets', 'hidden_reason', 'a curator''s note on why a dataset is hidden'), + ('dandisets', 'hidden_by', 'auth user id'), + ('dandisets', 'hidden_at', 'when a curator hid it'), + ('harvester_relations', 'approved_by', 'auth user id'), + ('harvester_settings', 'updated_by', 'auth user id'); + +DROP TABLE IF EXISTS pg_temp.kg_read_before; +CREATE TEMP TABLE kg_read_before AS +SELECT c.relname::text AS object_name, a.attnum, a.attname::text AS column_name, + has_column_privilege('anon', c.oid, a.attnum, 'SELECT') AS anon_could, + has_column_privilege('authenticated', c.oid, a.attnum, 'SELECT') AS authenticated_could + FROM pg_class c + JOIN pg_namespace n ON n.oid = c.relnamespace AND n.nspname = 'public' + JOIN pg_attribute a ON a.attrelid = c.oid AND a.attnum > 0 AND NOT a.attisdropped + WHERE c.relname IN (SELECT object_name FROM pg_temp.kg_private_from_anon + UNION SELECT 'project_questionnaire_status'); + +DROP TABLE IF EXISTS pg_temp.kg_attribution_before; +CREATE TEMP TABLE kg_attribution_before AS +SELECT count(*) AS projects + FROM public.projects + WHERE metadata ?| ARRAY['questionnaire_submitted_by', 'questionnaire_submitted_at', 'questionnaire_response_id']; + +-- ── 2. The questionnaire attribution moves out of metadata, into columns anon cannot read ─────── +ALTER TABLE public.projects + ADD COLUMN IF NOT EXISTS questionnaire_submitted_by text, + ADD COLUMN IF NOT EXISTS questionnaire_submitted_at timestamptz, + ADD COLUMN IF NOT EXISTS questionnaire_response_id text; + +COMMENT ON COLUMN public.projects.questionnaire_submitted_by IS + 'E-mail of whoever submitted the Data Questionnaire this project''s answers came from. Not readable by anon (20261117190000); project_questionnaire_status judges it against the grant roster.'; +COMMENT ON COLUMN public.projects.questionnaire_submitted_at IS + 'When that questionnaire response was submitted. Not readable by anon (20261117190000).'; +COMMENT ON COLUMN public.projects.questionnaire_response_id IS + 'The Google Forms responseId of that response. Not readable by anon (20261117190000).'; + +CREATE OR REPLACE FUNCTION public.keep_questionnaire_attribution_private() +RETURNS trigger +LANGUAGE plpgsql +SET search_path = public +AS $fn$ +DECLARE + _at text; +BEGIN + IF NEW.metadata IS NULL OR jsonb_typeof(NEW.metadata) <> 'object' + OR NOT (NEW.metadata ?| ARRAY['questionnaire_submitted_by', 'questionnaire_submitted_at', 'questionnaire_response_id']) THEN + RETURN NEW; + END IF; + -- The first recorded submission wins: a column that already holds a value keeps it. + IF nullif(btrim(coalesce(NEW.questionnaire_submitted_by, '')), '') IS NULL THEN + NEW.questionnaire_submitted_by := nullif(btrim(coalesce(NEW.metadata ->> 'questionnaire_submitted_by', '')), ''); + END IF; + IF nullif(btrim(coalesce(NEW.questionnaire_response_id, '')), '') IS NULL THEN + NEW.questionnaire_response_id := nullif(btrim(coalesce(NEW.metadata ->> 'questionnaire_response_id', '')), ''); + END IF; + IF NEW.questionnaire_submitted_at IS NULL THEN + _at := nullif(btrim(coalesce(NEW.metadata ->> 'questionnaire_submitted_at', '')), ''); + IF _at IS NOT NULL THEN + BEGIN + NEW.questionnaire_submitted_at := _at::timestamptz; + EXCEPTION WHEN data_exception THEN + RAISE WARNING 'projects %: questionnaire_submitted_at "%" is not a timestamp; not kept', NEW.id, _at; + END; + END IF; + END IF; + NEW.metadata := NEW.metadata - 'questionnaire_submitted_by' - 'questionnaire_submitted_at' + - 'questionnaire_response_id'; + RETURN NEW; +END +$fn$; + +COMMENT ON FUNCTION public.keep_questionnaire_attribution_private() IS + 'BEFORE INSERT OR UPDATE OF metadata on projects: moves questionnaire_submitted_by/_at/_response_id out of the public metadata blob into the projects columns of those names, which anon cannot read (20261117190000). A column already holding a value keeps it.'; + +-- trg_aa_ sorts first, so the provenance guard and the audit log see the row as it is stored. +CREATE OR REPLACE TRIGGER trg_aa_keep_questionnaire_attribution_private + BEFORE INSERT OR UPDATE OF metadata ON public.projects + FOR EACH ROW EXECUTE FUNCTION public.keep_questionnaire_attribution_private(); + +-- Move what is there now. The trigger does the moving; this touches each such row once. The values +-- came from the questionnaire, so their new cells are recorded at that source. +SELECT public.set_source_class('questionnaire'); +UPDATE public.projects + SET metadata = metadata + WHERE metadata ?| ARRAY['questionnaire_submitted_by', 'questionnaire_submitted_at', 'questionnaire_response_id']; +SELECT public.set_source_class(''); + +-- ── 3. project_questionnaire_status reads the columns, and only signed-in users may read it ───── +-- The link to the form's responses tab is for the admins who can open it, so anon loses it too. Its +-- definition is 20260811140000's, repeated so the view below can rely on it. +CREATE OR REPLACE FUNCTION public.questionnaire_responses_url() +RETURNS text LANGUAGE sql IMMUTABLE AS $fn$ + SELECT 'https://docs.google.com/forms/d/1oQ9R8uEt8IbgY3h5-mSZ821F2dbUQ7efXkeLN8tl-u4/edit#responses' +$fn$; +REVOKE ALL ON FUNCTION public.questionnaire_responses_url() FROM PUBLIC, anon; +GRANT EXECUTE ON FUNCTION public.questionnaire_responses_url() TO authenticated, service_role; + +-- 20260811140000's definition, with the three attribution reads moved from metadata to the columns. +CREATE OR REPLACE VIEW public.project_questionnaire_status +WITH (security_invoker = true) +AS +WITH base AS ( + SELECT g.id AS grant_id, + g.grant_number, + g.title AS grant_title, + p.id AS project_id, + coalesce(p.metadata, '{}'::jsonb) AS metadata, + p.study_species, + p.questionnaire_submitted_by AS q_submitted_by, + p.questionnaire_submitted_at AS q_submitted_at, + p.questionnaire_response_id AS q_response_id + FROM public.grants g + LEFT JOIN public.projects p ON p.grant_id = g.id +), +counted AS ( + SELECT b.*, + (SELECT count(*) FROM unnest(public.questionnaire_fields()) f + WHERE CASE + WHEN f = 'species' + THEN coalesce(array_length(b.study_species, 1), 0) > 0 + ELSE public.jsonb_is_answered(b.metadata -> f) + END + ) AS fields_filled + FROM base b +) +SELECT c.grant_id, + c.grant_number, + c.grant_title, + c.project_id, + c.fields_filled, + array_length(public.questionnaire_fields(), 1) AS fields_total, + round(100.0 * c.fields_filled / array_length(public.questionnaire_fields(), 1))::int AS pct, + (SELECT array_agg(f ORDER BY f) FROM unnest(public.questionnaire_fields()) f + WHERE CASE + WHEN f = 'species' THEN coalesce(array_length(c.study_species, 1), 0) = 0 + ELSE NOT public.jsonb_is_answered(c.metadata -> f) + END) AS missing_fields, + CASE + WHEN c.fields_filled = 0 THEN 'not_started' + WHEN c.fields_filled < array_length(public.questionnaire_fields(), 1) THEN 'partial' + ELSE 'complete' + END AS status, + c.q_submitted_by AS submitted_by, + c.q_submitted_at AS submitted_at, + c.q_response_id AS response_id, + -- WHO submitted, judged against THIS grant's roster. Three distinct outcomes, never collapsed. + CASE + WHEN c.q_submitted_by IS NULL THEN 'unknown' + WHEN EXISTS ( + SELECT 1 FROM public.grant_investigators gi + JOIN public.investigators i ON i.id = gi.investigator_id + WHERE gi.grant_id = c.grant_id + AND lower(gi.role) IN ('pi', 'contact_pi', 'co_pi', 'mpi') + AND (lower(btrim(i.email)) = lower(c.q_submitted_by) + OR EXISTS (SELECT 1 FROM unnest(coalesce(i.secondary_emails, '{}')) s + WHERE lower(btrim(s)) = lower(c.q_submitted_by))) + ) THEN 'pi' + WHEN EXISTS ( + SELECT 1 FROM public.grant_investigators gi + JOIN public.investigators i ON i.id = gi.investigator_id + WHERE gi.grant_id = c.grant_id + AND (lower(btrim(i.email)) = lower(c.q_submitted_by) + OR EXISTS (SELECT 1 FROM unnest(coalesce(i.secondary_emails, '{}')) s + WHERE lower(btrim(s)) = lower(c.q_submitted_by))) + ) THEN 'project_member' + ELSE 'not_on_roster' + END AS submitter_standing, + -- Who OWNS it: the questionnaire is contact-PI-owned (migration 20260807140000). + (SELECT i.name FROM public.grant_investigators gi + JOIN public.investigators i ON i.id = gi.investigator_id + WHERE gi.grant_id = c.grant_id AND lower(gi.role) = 'contact_pi' + ORDER BY i.name LIMIT 1) AS owner_name, + (SELECT i.email FROM public.grant_investigators gi + JOIN public.investigators i ON i.id = gi.investigator_id + WHERE gi.grant_id = c.grant_id AND lower(gi.role) = 'contact_pi' + ORDER BY i.name LIMIT 1) AS owner_email, + public.questionnaire_form_url() AS form_url, + public.questionnaire_responses_url() AS responses_url, + -- The answers themselves. The attribution keys are no longer in metadata; stripping them stays + -- so a row written before the trigger existed cannot show them here either. + (c.metadata - 'questionnaire_submitted_by' - 'questionnaire_submitted_at' + - 'questionnaire_response_id') AS answers + FROM counted c; + +COMMENT ON VIEW public.project_questionnaire_status IS + 'Live Data Questionnaire status per grant: fields filled/total and pct computed from the ten canonical fields (NOT the stale metadata_completeness column), the blank field names, and who submitted it (projects.questionnaire_submitted_by) judged against that grant''s roster (pi / project_member / not_on_roster / unknown). security_invoker so projects/grants RLS applies. Signed-in users only (20261117190000).'; + +REVOKE ALL ON public.project_questionnaire_status FROM PUBLIC, anon, authenticated; +GRANT SELECT ON public.project_questionnaire_status TO authenticated; + +-- ── 4. Column grants: anon keeps every column it could read except the private ones ───────────── +DO $hide$ +DECLARE + _o record; + _rel regclass; + _all text; + _keep text; +BEGIN + FOR _o IN SELECT object_name, array_agg(column_name) AS private + FROM pg_temp.kg_private_from_anon + GROUP BY object_name ORDER BY object_name LOOP + _rel := to_regclass(format('public.%I', _o.object_name)); + IF _rel IS NULL THEN + RAISE NOTICE '%: not in this database, nothing to hide', _o.object_name; + CONTINUE; + END IF; + -- Computed before this object's REVOKE, so "could read" means could read before this run. + SELECT string_agg(quote_ident(a.attname), ', ' ORDER BY a.attnum), + string_agg(quote_ident(a.attname), ', ' ORDER BY a.attnum) + FILTER (WHERE NOT (a.attname::text = ANY (_o.private)) + AND has_column_privilege('anon', _rel, a.attnum, 'SELECT')) + INTO _all, _keep + FROM pg_attribute a + WHERE a.attrelid = _rel AND a.attnum > 0 AND NOT a.attisdropped; + -- PUBLIC too: anon holds whatever PUBLIC holds. + EXECUTE format('REVOKE SELECT ON public.%I FROM anon, PUBLIC', _o.object_name); + EXECUTE format('REVOKE SELECT (%s) ON public.%I FROM anon, PUBLIC', _all, _o.object_name); + IF _keep IS NOT NULL THEN + EXECUTE format('GRANT SELECT (%s) ON public.%I TO anon', _keep, _o.object_name); + END IF; + END LOOP; +END +$hide$; + +-- ── 5. Postconditions: refuse to commit a result that hides too little, or too much ───────────── +DO $check$ +DECLARE + _bad text; +BEGIN + SELECT string_agg(p.object_name || '.' || p.column_name, ', ' ORDER BY p.object_name, p.column_name) + INTO _bad + FROM pg_temp.kg_private_from_anon p + JOIN pg_attribute a ON a.attrelid = to_regclass(format('public.%I', p.object_name)) + AND a.attname = p.column_name AND NOT a.attisdropped + WHERE has_column_privilege('anon', a.attrelid, a.attnum, 'SELECT'); + IF _bad IS NOT NULL THEN + RAISE EXCEPTION 'anon could still read %: nothing committed', _bad; + END IF; + + IF has_any_column_privilege('anon', 'public.project_questionnaire_status', 'SELECT') THEN + RAISE EXCEPTION 'anon could still read project_questionnaire_status: nothing committed'; + END IF; + + -- Every other column: anon reads it now exactly when it could before, so nothing public was lost + -- and nothing was opened. + SELECT string_agg(b.object_name || '.' || b.column_name + || CASE WHEN b.anon_could THEN ' (lost)' ELSE ' (opened)' END, ', ') + INTO _bad + FROM pg_temp.kg_read_before b + WHERE b.object_name <> 'project_questionnaire_status' + AND NOT EXISTS (SELECT 1 FROM pg_temp.kg_private_from_anon p + WHERE p.object_name = b.object_name AND p.column_name = b.column_name) + AND b.anon_could IS DISTINCT FROM + has_column_privilege('anon', to_regclass(format('public.%I', b.object_name)), b.column_name, 'SELECT'); + IF _bad IS NOT NULL THEN + RAISE EXCEPTION 'anon would change on a public column: %; nothing committed', _bad; + END IF; + + -- Signed-in users: exactly what they had, plus the three new columns (the attribution they could + -- already read inside metadata). + SELECT string_agg(b.object_name || '.' || b.column_name, ', ') + INTO _bad + FROM pg_temp.kg_read_before b + WHERE b.authenticated_could IS DISTINCT FROM + has_column_privilege('authenticated', to_regclass(format('public.%I', b.object_name)), b.column_name, 'SELECT'); + IF _bad IS NOT NULL THEN + RAISE EXCEPTION 'signed-in users would change on %; nothing committed', _bad; + END IF; + IF NOT (has_column_privilege('authenticated', 'public.projects', 'questionnaire_submitted_by', 'SELECT') + AND has_column_privilege('authenticated', 'public.projects', 'questionnaire_submitted_at', 'SELECT') + AND has_column_privilege('authenticated', 'public.projects', 'questionnaire_response_id', 'SELECT')) THEN + RAISE EXCEPTION 'signed-in users could not read the attribution columns: nothing committed'; + END IF; + + IF EXISTS (SELECT 1 FROM public.projects + WHERE metadata ?| ARRAY['questionnaire_submitted_by', 'questionnaire_submitted_at', 'questionnaire_response_id']) THEN + RAISE EXCEPTION 'a project still carries the questionnaire attribution in metadata: nothing committed'; + END IF; +END +$check$; + +NOTIFY pgrst, 'reload schema'; + +-- ── Report (the editor shows only this last result) ───────────────────────────────────────────── +-- Per object: how many columns anon could read before this run and may read now, which ones this run +-- took from it (a second run says "none"), every column anon may not read now, and whether signed-in +-- users read the same. The last row: projects whose metadata held the attribution, before and now. +WITH now_cols AS ( + SELECT c.relname::text AS object_name, a.attnum, a.attname::text AS column_name, + has_column_privilege('anon', c.oid, a.attnum, 'SELECT') AS anon_can, + has_column_privilege('authenticated', c.oid, a.attnum, 'SELECT') AS authenticated_can + FROM pg_class c + JOIN pg_namespace n ON n.oid = c.relnamespace AND n.nspname = 'public' + JOIN pg_attribute a ON a.attrelid = c.oid AND a.attnum > 0 AND NOT a.attisdropped + WHERE c.relname IN (SELECT DISTINCT object_name FROM pg_temp.kg_read_before) +), +per AS ( + SELECT o.object_name, + (SELECT count(*) FILTER (WHERE b.anon_could) FROM pg_temp.kg_read_before b WHERE b.object_name = o.object_name) AS could, + (SELECT count(*) FROM pg_temp.kg_read_before b WHERE b.object_name = o.object_name) AS cols_before, + (SELECT count(*) FILTER (WHERE n.anon_can) FROM now_cols n WHERE n.object_name = o.object_name) AS may, + (SELECT count(*) FROM now_cols n WHERE n.object_name = o.object_name) AS cols_now, + (SELECT string_agg(b.column_name, ', ' ORDER BY b.attnum) + FROM pg_temp.kg_read_before b + JOIN now_cols n ON n.object_name = b.object_name AND n.column_name = b.column_name + WHERE b.object_name = o.object_name AND b.anon_could AND NOT n.anon_can) AS taken, + (SELECT string_agg(n.column_name, ', ' ORDER BY n.attnum) + FROM now_cols n WHERE n.object_name = o.object_name AND NOT n.anon_can) AS refused, + EXISTS (SELECT 1 FROM pg_temp.kg_read_before b + JOIN now_cols n ON n.object_name = b.object_name AND n.column_name = b.column_name + WHERE b.object_name = o.object_name AND b.authenticated_could IS DISTINCT FROM n.authenticated_can) AS signed_in_changed, + (SELECT string_agg(n.column_name, ', ' ORDER BY n.attnum) + FROM now_cols n + WHERE n.object_name = o.object_name AND n.authenticated_can + AND NOT EXISTS (SELECT 1 FROM pg_temp.kg_read_before b + WHERE b.object_name = n.object_name AND b.column_name = n.column_name)) AS signed_in_new + FROM (SELECT DISTINCT object_name FROM pg_temp.kg_read_before) o +) +SELECT object_name AS object, + could || ' of ' || cols_before || ' columns' AS anon_could_read, + may || ' of ' || cols_now || ' columns' AS anon_may_read_now, + CASE WHEN taken IS NULL THEN 'none' + WHEN may = 0 AND could = cols_before THEN 'every column' + ELSE taken END AS taken_from_anon_by_this_run, + CASE WHEN refused IS NULL THEN 'none' WHEN may = 0 THEN 'every column' ELSE refused END AS anon_may_not_read, + CASE WHEN signed_in_changed THEN 'CHANGED' + ELSE 'unchanged' || coalesce(' (+ new: ' || signed_in_new || ')', '') END AS signed_in_users + FROM per +UNION ALL +SELECT 'projects.metadata: questionnaire_submitted_by/_at/_response_id', + 'on ' || (SELECT projects FROM pg_temp.kg_attribution_before) || ' project(s)', + 'on ' || (SELECT count(*) FROM public.projects + WHERE metadata ?| ARRAY['questionnaire_submitted_by', 'questionnaire_submitted_at', 'questionnaire_response_id']) || ' project(s)', + CASE WHEN (SELECT projects FROM pg_temp.kg_attribution_before) > 0 + THEN 'moved to projects.questionnaire_submitted_by / _at / _response_id' ELSE 'none' END, + 'the keys, on every write (trg_aa_keep_questionnaire_attribution_private)', + (SELECT count(*) FROM public.projects WHERE questionnaire_submitted_by IS NOT NULL) || ' project(s) with a submitter on record' + ORDER BY 1; diff --git a/supabase/migrations/20261118100000_hotfix_anon_function_grants.sql b/supabase/migrations/20261118100000_hotfix_anon_function_grants.sql new file mode 100644 index 00000000..da5590f2 --- /dev/null +++ b/supabase/migrations/20261118100000_hotfix_anon_function_grants.sql @@ -0,0 +1,100 @@ +-- ════════════════════════════════════════════════════════════════════════════════════════════════ +-- 20261118100000_hotfix_anon_function_grants.sql +-- SECURITY HOTFIX: an anonymous visitor could add an e-mail address to any member's record, and the +-- sign-in then treats that address as the member. Stop anonymous callers running that function and +-- the few like it. Nothing else changes. +-- ════════════════════════════════════════════════════════════════════════════════════════════════ +-- +-- WHY. PostgreSQL lets everyone (PUBLIC) execute a new function, and Supabase's default privileges +-- grant EXECUTE to anon as well. A migration that says GRANT EXECUTE ... TO authenticated, +-- service_role adds to that; it takes nothing away. So every function in schema public that never +-- says REVOKE is callable through the API with the site's public key. +-- * record_investigator_alias(primary_email, alias) is SECURITY DEFINER and gates on +-- "auth.uid() IS NOT NULL AND not admin/curator". An anonymous caller has no auth.uid(), exactly +-- like the service role the gate means to let through, so the gate passes and the alias is +-- appended to that member's secondary_emails. globus-auth resolves a signing-in address found in +-- secondary_emails to that member's primary address and signs the caller in as that member +-- (supabase/functions/globus-auth/index.ts, "Resolved secondary email"). On a replica of this +-- schema, 2026-11-18: SET ROLE anon; SELECT public.record_investigator_alias(<member's +-- address>, <another address>); -> {"ok": true, ...}, and the row changed. +-- * check_onboard_conflicts(email, name) has the same gate and returns the member records a name +-- collides with, e-mail addresses included: it gives an anonymous caller the address the call +-- above needs. +-- * provenance_attach_all / _attach_guard / _attach_recorder / _detach_out_of_scope create and +-- drop triggers, and provenance_backfill_all / _backfill_unknown write provenance claims, with no +-- check of the caller at all. Only migrations call them. +-- +-- WHAT. For exactly those eight function names (every overload found): REVOKE EXECUTE FROM PUBLIC +-- and anon. The two that signed-in curators and the service role really call get an explicit GRANT +-- back to authenticated and service_role, so nothing they do changes: +-- record_investigator_alias <- group-audit (service role) +-- check_onboard_conflicts <- OnboardMemberDialog (curators; the function checks the role) +-- The six provenance maintenance functions are granted to service_role only (migrations run as the +-- owner, which always may). No function body, table, row or policy is touched. No site page and no +-- edge function calls any of these as an anonymous visitor (checked on main, dev and this branch). +-- The complete review of what anon and signed-in users may execute is +-- 20261118120000_privacy_round_two; this hotfix is the part that cannot wait for it. +-- +-- CHECK WHETHER IT WAS USED (read-only; run it before or after, the audit trail is not changed): +-- SELECT d.occurred_at, i.name, d.actor_role, d.actor_label, d.actor_id, +-- d.changed_fields -> 'secondary_emails' AS secondary_emails_change +-- FROM public.data_audit_log d +-- LEFT JOIN public.investigators i ON i.id::text = d.record_id +-- WHERE d.table_name = 'investigators' AND d.changed_fields ? 'secondary_emails' +-- ORDER BY d.occurred_at DESC; +-- Every row is one change to someone's alias list. Expected: actor_role service_role (group-audit), +-- or a curator/admin, or a migration label. A row with actor_role 'anon' is the hole being used: +-- remove that address from the member's secondary_emails and tell the member. +-- +-- HOW TO APPLY: Supabase SQL editor, project vpexxhfpvghlejljwpvt, as its default role (postgres). +-- Paste the WHOLE file, Run. One transaction; a second run changes nothing. The last statement lists +-- each function with whether anon could run it before and can now (must be false for all). +-- UNDO (do not): GRANT EXECUTE ON FUNCTION public.<name>(<args>) TO anon. +-- ════════════════════════════════════════════════════════════════════════════════════════════════ + +DROP TABLE IF EXISTS pg_temp.kg_hotfix_fn; + +BEGIN; +SELECT public.set_actor('migration:hotfix_anon_function_grants'); + +CREATE TEMP TABLE kg_hotfix_fn AS +SELECT p.oid, p.oid::regprocedure::text AS fn, w.keep_authenticated, + has_function_privilege('anon', p.oid, 'EXECUTE') AS anon_before, + has_function_privilege('authenticated', p.oid, 'EXECUTE') AS authenticated_before + FROM (VALUES ('record_investigator_alias', true), ('check_onboard_conflicts', true), + ('provenance_attach_all', false), ('provenance_attach_guard', false), + ('provenance_attach_recorder', false), ('provenance_detach_out_of_scope', false), + ('provenance_backfill_all', false), ('provenance_backfill_unknown', false) + ) AS w(fn_name, keep_authenticated) + JOIN pg_proc p ON p.proname = w.fn_name AND p.pronamespace = 'public'::regnamespace; + +DO $hotfix$ +DECLARE r record; +BEGIN + FOR r IN SELECT * FROM pg_temp.kg_hotfix_fn LOOP + EXECUTE format('REVOKE EXECUTE ON FUNCTION %s FROM PUBLIC, anon', r.fn); + EXECUTE format('GRANT EXECUTE ON FUNCTION %s TO service_role', r.fn); + IF r.keep_authenticated THEN + EXECUTE format('GRANT EXECUTE ON FUNCTION %s TO authenticated', r.fn); + END IF; + END LOOP; +END +$hotfix$; + +COMMIT; + +-- The report (the editor shows only this last result). anon_can_run_now must be false in every row. +SELECT h.fn AS function, + h.anon_before AS anon_could_run, + has_function_privilege('anon', h.oid, 'EXECUTE') AS anon_can_run_now, + h.authenticated_before AS signed_in_could_run, + has_function_privilege('authenticated', h.oid, 'EXECUTE') AS signed_in_can_run_now, + has_function_privilege('service_role', h.oid, 'EXECUTE') AS service_role_can_run_now + FROM pg_temp.kg_hotfix_fn h +UNION ALL +SELECT w.fn_name || ' (no function of this name in this database)', NULL, NULL, NULL, NULL, NULL + FROM (VALUES ('record_investigator_alias'), ('check_onboard_conflicts'), ('provenance_attach_all'), + ('provenance_attach_guard'), ('provenance_attach_recorder'), ('provenance_detach_out_of_scope'), + ('provenance_backfill_all'), ('provenance_backfill_unknown')) AS w(fn_name) + WHERE NOT EXISTS (SELECT 1 FROM pg_proc p WHERE p.proname = w.fn_name AND p.pronamespace = 'public'::regnamespace) + ORDER BY 1; diff --git a/supabase/migrations/20261118120000_privacy_round_two.sql b/supabase/migrations/20261118120000_privacy_round_two.sql new file mode 100644 index 00000000..e3bc7609 --- /dev/null +++ b/supabase/migrations/20261118120000_privacy_round_two.sql @@ -0,0 +1,884 @@ +-- ================================================================================================ +-- 20261118120000_privacy_round_two.sql +-- SECURITY: anonymous visitors could run 100 of the 107 functions in schema public, among them one +-- that let anyone sign in as a member, one that gave out any member's e-mail address by name, and +-- the provenance maintenance functions that create and drop triggers. Every function now says who +-- may run it. Anon also loses the questionnaire answers no public page shows, and signed-in members +-- lose each other's login ids and pending role requests. +-- ================================================================================================ +-- +-- WHY. PostgreSQL grants EXECUTE on every new function to PUBLIC, and Supabase's default privileges +-- grant it to anon and authenticated by name as well, so nothing decided who may call a function. +-- A SECURITY DEFINER function runs as its owner, past row-level security. An audit of every function +-- in public on a replica of this schema (2026-11-18, every migration applied), under SET ROLE anon: +-- record_investigator_alias(primary, alias) appended any address to a member's secondary_emails +-- (refused only where a verified provenance claim holds that cell, which a record written with +-- no declared source class lacks). Its gate reads "a NULL auth.uid() is the service role", and +-- anon has no uid either. globus-auth (an edge function: read, not run here) lets in an address +-- found among secondary_emails (email_is_consortium_member), resolves it to that member's +-- primary address and signs that in. So anyone could add their own address to an admin's record +-- and sign in as that admin. +-- check_onboard_conflicts(email, name) the same gate. Given a member's name it returned their +-- e-mail address ('name_conflict'), and given an address, every member address with the same +-- mailbox name ('near_miss_email'). +-- provenance_attach_guard / _recorder / _all, provenance_detach_out_of_scope: SECURITY DEFINER and +-- no check, so anon could create and drop triggers on public tables. provenance_backfill_all / +-- _unknown wrote backfill claims. record_field_provenance(13 arguments) wrote any provenance +-- claim at any grade; a claim at a verified grade makes enforce_field_provenance refuse later +-- machine updates of that cell. +-- increment_vote_count / decrement_vote_count moved any suggestion's vote count, no check, with +-- every trigger switched off (session_replication_role = replica), so nothing was audited. +-- Every other function either refuses anon itself (a has_role check inside) or reveals nothing, +-- but no visitor needs it: admin RPCs, RLS helpers, trigger functions, vocabularies. +-- And two columns: +-- projects.metadata every questionnaire answer, free text included (help_needed, reuse_challenges, +-- additional_info, primary_storage_details, ...), readable by anon. The public pages show 20 keys. +-- investigators_public.user_id, .pending_role every member's login id and pending role request, +-- readable by every signed-in member (20261117190000 took them from anon only). +-- +-- WHAT. +-- 1. Functions. kg_function_access (section 1) gives every function in public one of three tiers: +-- anon a visitor needs it: anon, authenticated and service_role may run it +-- authenticated signed-in users, RLS policies or triggers on tables they write need it +-- service only the owner (migrations, triggers, SECURITY DEFINER callers) and the +-- service role (edge functions) run it +-- For every overload of each name: REVOKE ALL FROM PUBLIC, anon, authenticated, then GRANT +-- EXECUTE to the tier's roles. An anon-tier function is granted to the three roles by name and +-- keeps PUBLIC. Before taking EXECUTE from a role, the run asks the live catalog what makes that +-- role run the function: an RLS policy (any schema) that applies to it, a view it can read, an +-- index, default, generated column, CHECK or trigger WHEN on a table it can write, an invoker +-- function it keeps (or an invoker trigger on a table it writes) that calls it, an operator, +-- cast or aggregate. If anything does, the role keeps EXECUTE and the report names the object, +-- so an object that exists only in production is never broken. A function this list does not +-- name is left as it is and reported 'not reviewed'. +-- 2. The nine admin-only policies that named PUBLIC (system_alerts 2, lovable_invoices 4, +-- publication_figure, publication_fulltext, publication_fulltext_body) now name authenticated. +-- Each is has_role(auth.uid(), 'admin'), false for anon on every row, so anon sees and writes +-- what it did: nothing. Only anon's need to run has_role goes, and with it has_role leaves anon. +-- A policy is re-scoped only if it names PUBLIC alone and each of its expressions is one of +-- those has_role / is_curator_or_admin(auth.uid()) forms. +-- 3. project_metadata_public (project_id, grant_number, metadata): metadata holds only the 20 keys +-- the public pages show. The view has its owner's rights, so anon reads it without reading +-- projects.metadata; it shows every project (projects' one read policy is USING (true)); no one +-- may write through it. anon loses SELECT on projects.metadata. Signed-in users keep it: members' +-- and curators' access is unchanged. +-- Why a view and not a STORED generated column: on the replica, a generated column made +-- record_field_provenance record every public key twice on each insert (metadata.<key> and +-- metadata_public.<key>), so provenance_excluded_columns would have had to change too; +-- jsonb_build_object is not IMMUTABLE, so the column needs a custom function that every writer +-- of projects must be allowed to run; and a change to that function would leave every stored +-- row stale until rewritten. The view touches no write path, and a change to its key list is +-- one CREATE OR REPLACE VIEW, live for every row at once. +-- 4. investigators_public: authenticated loses user_id and pending_role, column by column (as anon +-- did in 20261117190000), and keeps every other column. The person, curators and admins read +-- both from public.investigators under its RLS. +-- +-- WHAT THE AUDIT RESTS ON (each checked on the replica with the literal error): +-- * EXECUTE is not checked when a trigger fires. With EXECUTE revoked from PUBLIC, GoTrue's role +-- inserting into auth.users still ran handle_new_user, auto_link_investigator and +-- grant_default_member_role, and anon's access request still ran log_data_change and +-- notify_new_access_request. So every trigger function is 'service'. +-- * It IS checked, for the role that evaluates it, in an index expression ("permission denied for +-- function kg_fon_key" on a curator's insert into funding_opportunities), in a function an +-- invoker trigger calls ("... normalize_grant_role" on a roster insert), in an RLS policy ("... +-- has_role" for anon reading system_alerts) and in a view ("... kg_award_key" for anon reading a +-- view column it computes). So kg_*_key, normalize_grant_role, canonical_working_group and +-- onboarding_required_open stay with signed-in users, who write those tables. +-- +-- KEPT FOR ANON, and why: +-- email_is_consortium_member src/pages/RequestAccess.tsx asks it before sign-in, to tell a +-- would-be requester they are already registered. IT IS AN ORACLE: it tells anyone whether an +-- address, primary or secondary, is a member's. Least-revealing alternative (not done here: it +-- changes what the form tells a member, so it is the owner's call): the form stops asking; +-- upsert_access_request decides on the server, files nothing for a member's address (so no +-- admin re-approves a member), and every submission gets the same answer: "Request received. +-- If this address is already registered, you need no request: sign in with Globus using it." +-- Then this function is 'service' (globus-auth calls it with the service role). +-- upsert_access_request the same form's submission, before sign-in. Writes access_requests. +-- Through was_created it tells anyone whether an address already has a pending request, and +-- it lets anyone replace the name, institution, role, message and Globus subject on another +-- address's pending request. Alternative: return nothing to anon (no caller reads the result) +-- and fill only the fields a pending request has left empty. +-- questionnaire_grant_options scripts/forms/sync-project-dropdowns.gs runs with the anon key. +-- Grant numbers, titles and PI names, all on the public Projects page. +-- search_knowledge_embeddings the public search and ask tools (bbqs-mcp, bbqs-api, discovery-chat, +-- through _shared/kg.ts and _shared/rag.ts) call it with the anon key when there is no user. +-- It runs as its caller, so knowledge_embeddings' RLS decides what it returns. +-- log_mcp_usage bbqs-mcp logs an anonymous MCP call under the anon key; it holds no service-role +-- key, by design. One mcp_usage_log row per call; reveals nothing; anyone can add rows. +-- provenance_is_gradable_column, provenance_table_priority, provenance_excluded_columns, +-- provenance_external_identifier_columns, provenance_excluded_tables constant lists that the +-- views provenance_coverage, provenance_worklist and provenance_guardable_tables call. anon may +-- read those views, and a view's functions run as its reader. No visitor page reads them +-- (DataProvenance shows them signed in only): revoking anon's SELECT on the three views would +-- let these five go to 'authenticated'. +-- +-- NO CALLER IN THIS REPOSITORY (src, supabase/functions, kg, scripts, e2e, triggers, policies, views, +-- other functions, cron jobs): increment_vote_count, decrement_vote_count, get_investigator_attention +-- (docs name CognitiveLayer.tsx and CohortHeatmap.tsx, which are gone), ir_drain_queue, +-- ir_upsert_profiles (and ir_is_authorized, which only they call), kg_read_sql, user_owns_resource, +-- provenance_tracked_columns, ai_authored_metadata_keys. ../bbqs-agent may call some of them; one it +-- calls with the anon key fails after this with 42501 "permission denied for function ...". +-- +-- READERS of the two columns (checked 2026-11-18). projects.metadata, under anon: GrantSummary (the +-- Summary and Details tabs), GrantMarrSection, useMarrProjects (the Species page and its diagrams) +-- read the 20 keys; they now read project_metadata_public through src/lib/projectPublicMetadata.ts, +-- and show no details, not an error, before this is applied. useProjectProfileEditor reads metadata +-- only signed in (the profile is members only) and refuses to save answers it has not read in full. +-- kg/bbqs_kg.py asked for metadata and writes nothing from it: PUBLIC_COLUMNS no longer names it. +-- _shared/kg.ts, the MCP server (kg/mcp_server.py reads the export) and e2e never read it. +-- investigators_public.user_id / .pending_role: no reader, signed in or not, in src, the edge +-- functions or kg; ownership and pending roles are read from public.investigators. +-- tests/guards/anon-private-columns holds src, kg and later migrations to both lists, and +-- tests/guards/function-execute-grants holds every later migration to say who may run what it creates. +-- +-- CHECK FIRST (read-only: what anon and signed-in users can run and read today): +-- SELECT 'function' AS kind, p.oid::regprocedure::text AS object, +-- CASE WHEN p.prosecdef THEN 'security definer' ELSE 'invoker' END AS runs_as, +-- has_function_privilege('anon', p.oid, 'EXECUTE')::text AS anon, +-- has_function_privilege('authenticated', p.oid, 'EXECUTE')::text AS signed_in +-- FROM pg_proc p WHERE p.pronamespace = 'public'::regnamespace +-- UNION ALL +-- SELECT 'column', v.obj || '.' || v.col, '', +-- has_column_privilege('anon', ('public.' || v.obj)::regclass, v.col, 'SELECT')::text, +-- has_column_privilege('authenticated', ('public.' || v.obj)::regclass, v.col, 'SELECT')::text +-- FROM (VALUES ('projects', 'metadata'), ('investigators_public', 'user_id'), +-- ('investigators_public', 'pending_role')) v(obj, col) +-- UNION ALL +-- SELECT 'policy', pol.polname || ' on ' || pol.polrelid::regclass::text, 'TO PUBLIC', +-- coalesce(pg_get_expr(pol.polqual, pol.polrelid), ''), coalesce(pg_get_expr(pol.polwithcheck, pol.polrelid), '') +-- FROM pg_policy pol +-- WHERE 0 = ANY (pol.polroles) +-- AND EXISTS (SELECT 1 FROM pg_depend d WHERE d.classid = 'pg_policy'::regclass AND d.objid = pol.oid +-- AND d.refobjid = 'public.has_role(uuid, public.app_role)'::regprocedure) +-- ORDER BY 1, 4 DESC, 2; +-- +-- HOW TO APPLY: Supabase SQL editor, project vpexxhfpvghlejljwpvt, as its default role (postgres), +-- after 20261117190000. Deploy the site first (the new readers work before and after this), so no +-- visitor page asks for projects.metadata once anon may not read it. +-- Copy it with: Get-Content "<checkout>\supabase\migrations\20261118120000_privacy_round_two.sql" -Raw | Set-Clipboard +-- (the file is ASCII only, so no code page can garble it), paste the WHOLE file, then Run. +-- 1. As shipped it is a DRY RUN: every change is made, the report is shown, then everything is +-- rolled back. +-- 2. Read the report (the last statement, the only result the editor shows): the RESULT row, then +-- one row per function, policy and object, with what anon and signed-in users could do before +-- and may do now. 'kept' rows are a role keeping EXECUTE because a live object needs it; read +-- them. 'not reviewed' rows are functions this file does not name (production only): decide +-- their tier in a later migration. Any 'error' row means a real run would change nothing. +-- 3. Apply: in the DRY-RUN SWITCH line just below BEGIN, change 'on' to 'off' (the only edit), and +-- Run the whole file again. It is one transaction: it refuses to commit if anon could still run +-- or read what it should not, if anon or signed-in users would lose anything else, or if a +-- function would be denied to a role that a live object needs it for. +-- 4. A second run changes nothing: every row says 'unchanged'. +-- LOCKS. ALTER POLICY takes an exclusive lock on system_alerts, lovable_invoices, publication_figure, +-- publication_fulltext and publication_fulltext_body for a moment (first run only). No wait lasts +-- more than 5 s (lock_timeout): the run then fails and changes nothing; run it again. +-- UNDO one function: GRANT EXECUTE ON FUNCTION public.<name>(<arguments>) TO anon (or authenticated). +-- A policy: ALTER POLICY "<name>" ON public.<table> TO public. The columns: GRANT SELECT (metadata) ON +-- public.projects TO anon; GRANT SELECT (user_id, pending_role) ON public.investigators_public TO +-- authenticated. The view can stay; DROP VIEW public.project_metadata_public removes it. +-- ================================================================================================ + +BEGIN; +-- Principle X: a SQL-editor write has no auth.uid(), so the script names itself before anything else. +SELECT public.set_actor('migration:privacy_round_two'); +-- No lock wait longer than 5 s, in the dry run as in the real run (both take the same locks). +SET LOCAL lock_timeout = '5s'; + +-- +------------------------------ DRY-RUN SWITCH (the one line to edit) ------------------------------+ +-- 'on' = rehearse: make every change, show the report, then roll everything back (nothing changes). +-- 'off' = apply: the same run, committed. Any other value is treated as 'on'. +SELECT set_config('bbqs.dry_run', 'on', true); +-- +----------------------------------------------------------------------------------------------------+ + +-- == 0. Preconditions: stop, changing nothing, on a schema this was not written for --------------------- +DO $guard$ +DECLARE + _have text[]; +BEGIN + IF to_regclass('public.projects') IS NULL OR to_regclass('public.investigators_public') IS NULL + OR to_regtype('public.app_role') IS NULL THEN + RAISE EXCEPTION 'public.projects, public.investigators_public or public.app_role is missing: this is not the KG database'; + END IF; + -- 20261117190000 first: anon reads projects and investigators_public column by column, and the + -- questionnaire attribution has left metadata for its own columns. + IF NOT EXISTS (SELECT 1 FROM pg_attribute WHERE attrelid = 'public.projects'::regclass + AND attname = 'questionnaire_submitted_by' AND NOT attisdropped) + OR has_table_privilege('anon', 'public.projects', 'SELECT') + OR has_table_privilege('anon', 'public.investigators_public', 'SELECT') THEN + RAISE EXCEPTION 'apply 20261117190000_hide_private_columns_from_anon.sql first: nothing changed'; + END IF; + -- A second run finds the view made by the first. CREATE OR REPLACE VIEW only appends columns (42P16). + IF to_regclass('public.project_metadata_public') IS NOT NULL THEN + SELECT array_agg(a.attname::text ORDER BY a.attnum) INTO _have + FROM pg_attribute a + WHERE a.attrelid = 'public.project_metadata_public'::regclass AND a.attnum > 0 AND NOT a.attisdropped; + IF _have[1:3] IS DISTINCT FROM ARRAY['project_id', 'grant_number', 'metadata'] THEN + RAISE EXCEPTION 'public.project_metadata_public exists with the columns (%), not (project_id, grant_number, metadata): nothing changed', + array_to_string(_have, ', '); + END IF; + END IF; +END +$guard$; + +-- == 1. The decisions ------------------------------------------------------------------------------------- +-- Every function in public, by name (every overload of a name gets its tier): what it does or reveals, +-- and who calls it. tests/guards/function-execute-grants reads this list from this file. +DROP TABLE IF EXISTS pg_temp.kg_function_access; +CREATE TEMP TABLE kg_function_access (fn_name text PRIMARY KEY, tier text NOT NULL + CHECK (tier IN ('anon', 'authenticated', 'service')), does text NOT NULL, callers text NOT NULL); +INSERT INTO kg_function_access (fn_name, tier, does, callers) VALUES + -- anon: a visitor needs it (see KEPT FOR ANON in the header) + ('email_is_consortium_member', 'anon', 'whether an address is a member''s, primary or secondary. AN ORACLE, kept for the request-access form', 'src/pages/RequestAccess.tsx before sign-in; globus-auth (service role); check_onboard_conflicts'), + ('upsert_access_request', 'anon', 'files or enriches the pending access request of an address; was_created says whether one existed', 'src/pages/RequestAccess.tsx before sign-in'), + ('questionnaire_grant_options', 'anon', 'grant numbers, titles and PI names, as on the public Projects page', 'scripts/forms/sync-project-dropdowns.gs (anon key)'), + ('search_knowledge_embeddings', 'anon', 'runs as its caller: the knowledge_embeddings rows its RLS shows, nearest first', '_shared/kg.ts, _shared/rag.ts (bbqs-mcp, bbqs-api, discovery-chat) under the anon key or a user'), + ('log_mcp_usage', 'anon', 'writes one mcp_usage_log row naming the caller; reveals nothing', 'bbqs-mcp logCall, under the caller''s JWT or the anon key'), + ('provenance_is_gradable_column', 'anon', 'a constant rule: whether a column is graded', 'views provenance_coverage, provenance_worklist (anon may read them); enforce_field_provenance'), + ('provenance_table_priority', 'anon', 'a constant table ranking', 'view provenance_worklist'), + ('provenance_excluded_columns', 'anon', 'a constant list', 'provenance_is_gradable_column; record_field_provenance; provenance_backfill_unknown'), + ('provenance_external_identifier_columns', 'anon', 'a constant list', 'provenance_is_gradable_column'), + ('provenance_excluded_tables', 'anon', 'a constant list', 'view provenance_guardable_tables; provenance_detach_out_of_scope'), + -- authenticated: signed-in users, or what runs on their behalf + ('admin_get_last_logins', 'authenticated', 'every account''s last sign-in; curators and admins only', 'src/pages/AdminUsers.tsx'), + ('admin_lookup_user', 'authenticated', 'an account''s e-mail, roles and investigator; admins only', 'bbqs-mcp whois, list_admins, revoke_role'), + ('ai_authored_metadata_keys', 'authenticated', 'a constant list', 'none found'), + ('approve_working_groups', 'authenticated', 'writes investigators.working_groups; curators and admins only', 'AdminUsers.tsx, ResolveStageDialog.tsx, WorkingGroupRequestsPanel.tsx'), + ('canonical_working_group', 'authenticated', 'a working-group spelling to its token', 'trigger normalize_working_groups (runs as the writer of investigators); approve_working_groups; member_self_update'), + ('check_onboard_conflicts', 'authenticated', 'given an address and a name, the member records they collide with, e-mail addresses included. Its gate let anon through', 'src/components/admin/OnboardMemberDialog.tsx (curators)'), + ('confirm_species_candidate', 'authenticated', 'writes projects.study_species; curators and admins only', 'bbqs-mcp confirm_species_candidate'), + ('create_grant', 'authenticated', 'writes grants, projects, organizations and a roster; curators and admins only', 'bbqs-mcp create_grant'), + ('dismiss_group_audit_entry', 'authenticated', 'writes group_audit_dismissals; curators and admins only', 'src/components/admin/GroupAuditDialog.tsx'), + ('get_investigator_attention', 'authenticated', 'click and pageview counts per investigator; admins only', 'none found'), + ('has_role', 'authenticated', 'whether a login id holds a role', 'RLS policies (to authenticated after section 2); trigger guard_investigator_client_write (as the writer); SECURITY DEFINER functions'), + ('import_questionnaire_response', 'authenticated', 'writes projects.metadata; curators and admins only', 'bbqs-mcp import_questionnaire_response'), + ('ir_drain_queue', 'authenticated', 'deletes from internal_research.interactional_queue; admins or the service role', 'none found'), + ('ir_is_authorized', 'authenticated', 'whether the caller is an admin or the service role', 'ir_drain_queue, ir_upsert_profiles'), + ('ir_upsert_profiles', 'authenticated', 'writes internal_research.interactional_profiles; admins or the service role', 'none found'), + ('is_curator_or_admin', 'authenticated', 'whether a login id is a curator or admin', 'RLS policies; triggers guard_investigator_client_write, guard_roster_client_write (as the writer); device-knowledge-seed (service role)'), + ('jsonb_is_answered', 'authenticated', 'whether a questionnaire value is filled', 'view project_questionnaire_status (signed in); import_questionnaire_response'), + ('kg_award_key', 'authenticated', 'an award number''s identity key', 'indexes uq_grants_award_key, uq_projects_award_key (run as whoever writes grants and projects)'), + ('kg_doi_key', 'authenticated', 'a DOI''s identity key', 'index uq_publications_doi_key (src/pages/Publications.tsx); kg_is_preprint'), + ('kg_fon_key', 'authenticated', 'a funding notice''s identity key', 'index uq_funding_opportunities_fon_key (AddFundingOpportunityDialog.tsx)'), + ('kg_is_preprint', 'authenticated', 'whether a journal and DOI are a preprint''s', 'kg_link_publication_versions'), + ('kg_name_key', 'authenticated', 'an organization name''s identity key', 'index uq_organizations_name_key; kg_title_key'), + ('kg_orcid_key', 'authenticated', 'an ORCID iD''s identity key', 'index uq_investigators_orcid_key (members'' own profile saves)'), + ('kg_pmid_key', 'authenticated', 'a PubMed id''s identity key', 'index uq_publications_pmid_key; kg_preprint_is_later'), + ('kg_preprint_is_later', 'authenticated', 'whether a preprint is later than a paper', 'kg_link_publication_versions'), + ('kg_read_sql', 'authenticated', 'one read-only query, run as its caller', 'none found'), + ('kg_title_key', 'authenticated', 'a title''s identity key', 'kg_link_publication_versions'), + ('link_investigator_grant', 'authenticated', 'writes grant_investigators; curators and admins only', 'src/components/admin/ResolveGrantLinkDialog.tsx'), + ('mcp_usage_stats', 'authenticated', 'MCP usage figures; curators and admins only', 'src/components/admin/McpUsagePanel.tsx'), + ('member_self_update', 'authenticated', 'writes the caller''s own investigators row', 'MemberProfileEditor.tsx; bbqs-mcp update_my_profile'), + ('normalize_grant_role', 'authenticated', 'a role label to its canonical token', 'trigger trg_normalize_grant_role (runs as the writer of grant_investigators)'), + ('offboard_member', 'authenticated', 'writes rosters and investigators; curators and admins only', 'OffboardMemberDialog.tsx; bbqs-mcp offboard_member'), + ('onboard_member', 'authenticated', 'writes investigators and rosters; curators and admins only', 'OnboardMemberDialog.tsx; bbqs-mcp onboard_member; create_grant'), + ('onboarding_required_open', 'authenticated', 'counts open onboarding steps', 'trigger stamp_onboarding_completed (runs as the writer of investigators)'), + ('onboarding_status_rank', 'authenticated', 'orders onboarding statuses', 'onboard_member'), + ('provenance_activity', 'authenticated', 'runs as its caller: the field_provenance rows its RLS shows (staff only)', 'src/pages/DataProvenance.tsx (signed in only)'), + ('provenance_mark_verified', 'authenticated', 'writes a verified provenance claim; curators and admins only', 'ProvenanceChip.tsx, ProvenanceGrades.tsx'), + ('provenance_tracked_columns', 'authenticated', 'a constant list', 'none found'), + ('questionnaire_fields', 'authenticated', 'a constant list', 'view project_questionnaire_status (signed in)'), + ('questionnaire_form_url', 'authenticated', 'the Data Questionnaire''s respondent link', 'view project_questionnaire_status (signed in)'), + ('questionnaire_metadata_keys', 'authenticated', 'a constant list', 'import_questionnaire_response'), + ('questionnaire_responses_url', 'authenticated', 'the form''s responses tab', 'view project_questionnaire_status (signed in)'), + ('record_onboarding_reminder', 'authenticated', 'writes investigators'' reminder fields; curators and admins only', 'src/components/admin/OnboardingPipelinePanel.tsx'), + ('repoint_grant', 'authenticated', 'writes grants, projects and resources; curators and admins only', 'bbqs-mcp repoint_grant'), + ('revert_curation_change', 'authenticated', 'reverts one audited change, if user_can_revert_audit allows', 'src/lib/curation-audit.ts'), + ('role_label_from_token', 'authenticated', 'a role token to its label', 'onboard_member'), + ('role_owns_questionnaire', 'authenticated', 'whether a role owns the questionnaire', 'onboard_member'), + ('set_dandiset_hidden', 'authenticated', 'hides or shows datasets; curators and admins only', 'bbqs-mcp set_dandiset_hidden'), + ('set_onboarding_step', 'authenticated', 'writes investigators.onboarding_checklist; curators and admins only', 'OnboardMemberDialog.tsx, ResolveStageDialog.tsx; bbqs-mcp; import_questionnaire_response'), + ('suggest_grants_for_investigator', 'authenticated', 'grant suggestions for an investigator; curators and admins only', 'src/components/admin/ResolveGrantLinkDialog.tsx'), + ('undismiss_group_audit_entry', 'authenticated', 'deletes group_audit_dismissals; curators and admins only', 'src/components/admin/GroupAuditDialog.tsx'), + ('user_can_edit_grant_roster', 'authenticated', 'whether a login id may edit a roster', 'RLS policies on grant_investigators'), + ('user_can_edit_project', 'authenticated', 'whether a login id may edit a project', 'src/hooks/useCanEditProject.ts (signed in only); RLS policy on edit_history; user_can_edit_grant_roster; user_can_revert_audit'), + ('user_can_revert_audit', 'authenticated', 'whether a login id may revert an audit row', 'revert_curation_change'), + ('user_owns_investigator', 'authenticated', 'whether a login id owns an investigator record', 'RLS policies on investigators, investigator_organizations'), + ('user_owns_resource', 'authenticated', 'whether a login id created a resource', 'none found'), + ('user_shares_grant_with_investigator', 'authenticated', 'whether two people share a grant', 'RLS policies on investigators, investigator_organizations'), + ('working_group_tokens', 'authenticated', 'a constant list', 'member_self_update'), + -- service: the owner and the service role only + ('auto_link_investigator', 'service', 'trigger on auth.users', 'trigger'), + ('check_publication_fulltext_sha', 'service', 'trigger', 'trigger'), + ('cron_invoke', 'service', 'calls an edge function with the vault''s service key', 'pg_cron jobs (run as postgres)'), + ('current_actor_via', 'service', 'the transaction''s actor label', 'log_data_change, enforce_field_provenance, record_field_provenance (SECURITY DEFINER); kg_link_publication_versions; default of field_provenance.recorded_by'), + ('current_source_class', 'service', 'the transaction''s source class', 'enforce_field_provenance, record_field_provenance; kg_link_publication_versions'), + ('decrement_vote_count', 'service', 'moves a suggestion''s vote count with every trigger off; no check', 'none found'), + ('enforce_feature_votes_immutable', 'service', 'trigger', 'trigger'), + ('enforce_field_provenance', 'service', 'trigger', 'trigger'), + ('field_provenance_is_append_only', 'service', 'trigger', 'trigger'), + ('grant_default_member_role', 'service', 'trigger on auth.users', 'trigger'), + ('guard_investigator_client_write', 'service', 'trigger', 'trigger'), + ('guard_roster_client_write', 'service', 'trigger', 'trigger'), + ('guard_secondary_emails', 'service', 'trigger', 'trigger'), + ('handle_new_user', 'service', 'trigger on auth.users', 'trigger'), + ('increment_vote_count', 'service', 'moves a suggestion''s vote count with every trigger off; no check', 'none found'), + ('keep_questionnaire_attribution_private', 'service', 'trigger', 'trigger'), + ('kg_link_publication_versions', 'service', 'links preprints to their papers', '_shared/kg-write.ts (import-grant-publications, service role)'), + ('log_data_change', 'service', 'trigger', 'trigger'), + ('normalize_grant_role_trg', 'service', 'trigger', 'trigger'), + ('normalize_working_groups', 'service', 'trigger', 'trigger'), + ('notify_new_access_request', 'service', 'trigger', 'trigger'), + ('provenance_attach_all', 'service', 'DDL: attaches the provenance triggers; no check', 'migrations'), + ('provenance_attach_guard', 'service', 'DDL: creates a trigger on a table; no check', 'provenance_attach_all, provenance_guard_new_tables'), + ('provenance_attach_recorder', 'service', 'DDL: creates a trigger on a table; no check', 'provenance_attach_all, provenance_guard_new_tables'), + ('provenance_backfill_all', 'service', 'writes backfill provenance claims; no check', 'migrations'), + ('provenance_backfill_unknown', 'service', 'writes backfill provenance claims; no check', 'provenance_backfill_all'), + ('provenance_detach_out_of_scope', 'service', 'DDL: drops provenance triggers; no check', 'migrations'), + ('provenance_guard_new_tables', 'service', 'event trigger', 'event trigger'), + ('record_field_provenance', 'service', 'the trigger, and the 13-argument writer: any claim at any grade, no check', 'triggers; confirm_species_candidate, provenance_mark_verified (SECURITY DEFINER)'), + ('record_investigator_alias', 'service', 'appends an alias to a member''s secondary_emails. Its gate let anon through, and globus-auth signs an alias in as the member', 'group-audit (service role)'), + ('resource_links_check_types', 'service', 'trigger', 'trigger'), + ('set_actor', 'service', 'sets the transaction''s actor label', 'migrations; repoint_grant, import_questionnaire_response (SECURITY DEFINER); kg_link_publication_versions'), + ('set_source_class', 'service', 'sets the transaction''s source class', 'migrations; create_grant, repoint_grant, import_questionnaire_response, enforce_field_provenance; kg_link_publication_versions'), + ('source_class_was_declared', 'service', 'whether the transaction declared a source class', 'record_field_provenance'), + ('stamp_onboarding_completed', 'service', 'trigger', 'trigger'), + ('stamp_onboarding_started', 'service', 'trigger', 'trigger'), + ('sync_member_groups', 'service', 'trigger', 'trigger'), + ('sync_slack_channels', 'service', 'trigger; its migration (20260807220000) never applied, so it exists nowhere yet', 'trigger'), + ('update_updated_at_column', 'service', 'trigger', 'trigger'); + +-- What anon must never run, whatever a live object says it needs: a write, DDL or a member's data. +-- A dependency that keeps one of these for anon stops the run (an 'error' row) for a human to look at. +DROP TABLE IF EXISTS pg_temp.kg_never_anon; +CREATE TEMP TABLE kg_never_anon (fn_name text PRIMARY KEY); +INSERT INTO kg_never_anon VALUES + ('record_investigator_alias'), ('check_onboard_conflicts'), ('record_field_provenance'), + ('provenance_attach_all'), ('provenance_attach_guard'), ('provenance_attach_recorder'), + ('provenance_backfill_all'), ('provenance_backfill_unknown'), ('provenance_detach_out_of_scope'), + ('increment_vote_count'), ('decrement_vote_count'); + +-- Columns anon may not read, added to 20261117190000's list. tests/guards/anon-private-columns and +-- kg/test_exporter.py read these rows from this file. +DROP TABLE IF EXISTS pg_temp.kg_private_from_anon; +CREATE TEMP TABLE kg_private_from_anon (object_name text, column_name text, holds text); +INSERT INTO kg_private_from_anon (object_name, column_name, holds) VALUES + ('projects', 'metadata', 'every questionnaire answer, free text included (anon reads project_metadata_public)'); + +-- Columns signed-in users may not read either. tests/guards/anon-private-columns reads these rows. +DROP TABLE IF EXISTS pg_temp.kg_private_from_authenticated; +CREATE TEMP TABLE kg_private_from_authenticated (object_name text, column_name text, holds text); +INSERT INTO kg_private_from_authenticated (object_name, column_name, holds) VALUES + ('investigators_public', 'user_id', 'auth user id (the person, curators and admins read it from investigators)'), + ('investigators_public', 'pending_role', 'a role request awaiting review (the same)'); + +-- == 2. Before: what each role may do now ------------------------------------------------------------------ +DROP TABLE IF EXISTS pg_temp.kg_fn_before; +CREATE TEMP TABLE kg_fn_before AS +SELECT p.oid AS fn_oid, p.proname::text AS fn_name, p.prosecdef AS definer, p.prokind::text AS kind, + has_function_privilege('anon', p.oid, 'EXECUTE') AS anon_could, + has_function_privilege('authenticated', p.oid, 'EXECUTE') AS authenticated_could, + has_function_privilege('service_role', p.oid, 'EXECUTE') AS service_could + FROM pg_proc p + WHERE p.pronamespace = 'public'::regnamespace; + +DROP TABLE IF EXISTS pg_temp.kg_col_before; +CREATE TEMP TABLE kg_col_before AS +SELECT c.relname::text AS object_name, a.attnum, a.attname::text AS column_name, + has_column_privilege('anon', c.oid, a.attnum, 'SELECT') AS anon_could, + has_column_privilege('authenticated', c.oid, a.attnum, 'SELECT') AS authenticated_could + FROM pg_class c + JOIN pg_attribute a ON a.attrelid = c.oid AND a.attnum > 0 AND NOT a.attisdropped + WHERE c.relnamespace = 'public'::regnamespace + AND c.relname IN ('projects', 'investigators_public', 'project_metadata_public'); + +DROP TABLE IF EXISTS pg_temp.kg_pol_before; +CREATE TEMP TABLE kg_pol_before AS +SELECT pol.oid AS pol_oid, pol.polrelid::regclass::text AS table_name, pol.polname::text AS policy_name, + (SELECT string_agg(x.role_name, ', ' ORDER BY x.role_name) + FROM (SELECT CASE WHEN r = 0 THEN 'PUBLIC' ELSE r::regrole::text END AS role_name + FROM unnest(pol.polroles) r) x) AS roles_before + FROM pg_policy pol; + +-- The plan, one row per reviewed function (filled in section 4). +DROP TABLE IF EXISTS pg_temp.kg_plan; +CREATE TEMP TABLE kg_plan (fn_oid oid PRIMARY KEY, fn_name text, tier text, anon_may boolean, + authenticated_may boolean, anon_kept_for text, authenticated_kept_for text); + +DROP TABLE IF EXISTS pg_temp.kg_report; +CREATE TEMP TABLE kg_report (seq serial, section text, object text, anon_before text, anon_now text, + signed_in_before text, signed_in_now text, outcome text, detail text); + +-- == 3. Helpers (temporary: they go with the session) ------------------------------------------------------ +-- Every pg_temp.kg_* function an earlier run left in this editor session goes first: CREATE OR REPLACE +-- keeps an old overload whose arguments differ. +DO $drop$ +DECLARE _f text; +BEGIN + FOR _f IN SELECT format('pg_temp.%I(%s)', p.proname, pg_get_function_identity_arguments(p.oid)) + FROM pg_proc p WHERE p.pronamespace = pg_my_temp_schema() AND p.proname LIKE 'kg\_%' + LOOP + EXECUTE 'DROP FUNCTION ' || _f; + END LOOP; +END +$drop$; + +-- A function's signature with every name schema-qualified, whatever the session's search_path. +CREATE FUNCTION pg_temp.kg_sig(_fn oid) RETURNS text LANGUAGE sql STABLE SET search_path = pg_catalog +AS $fn$ SELECT _fn::regprocedure::text $fn$; + +-- Can the role write some row of the table? A privilege, and no row-level security or a permissive +-- INSERT/UPDATE policy that applies to it. +CREATE FUNCTION pg_temp.kg_can_write(_role oid, _rel oid) RETURNS boolean LANGUAGE sql STABLE +AS $fn$ + SELECT (has_any_column_privilege(_role, _rel, 'INSERT') OR has_any_column_privilege(_role, _rel, 'UPDATE')) + AND (NOT c.relrowsecurity + OR EXISTS (SELECT 1 FROM pg_policy p + WHERE p.polrelid = _rel AND p.polpermissive AND p.polcmd IN ('a', 'w', '*') + AND (0 = ANY (p.polroles) OR _role = ANY (p.polroles)))) + FROM pg_class c WHERE c.oid = _rel +$fn$; + +-- Will the role be able to run the function after this run? The plan for a reviewed one, the live +-- privilege for any other. +CREATE FUNCTION pg_temp.kg_will_execute(_fn oid, _role text) RETURNS boolean LANGUAGE sql STABLE +AS $fn$ + SELECT coalesce((SELECT CASE _role WHEN 'anon' THEN p.anon_may ELSE p.authenticated_may END + FROM pg_temp.kg_plan p WHERE p.fn_oid = _fn), + has_function_privilege(_role, _fn, 'EXECUTE')) +$fn$; + +-- What in the live database makes the role run the function, or NULL. The rules this checks are in the +-- header (WHAT THE AUDIT RESTS ON); a trigger function's own EXECUTE is never checked, so a trigger is +-- not a reason, but what an invoker trigger function calls is. +CREATE FUNCTION pg_temp.kg_needs(_fn oid, _role text) RETURNS text LANGUAGE plpgsql STABLE +AS $fn$ +DECLARE + _r oid := to_regrole(_role); + _name text := (SELECT proname FROM pg_proc WHERE oid = _fn); + _hit text; +BEGIN + -- a row-level security policy, in any schema, that applies to the role and calls it + SELECT format('policy %s on %s', pol.polname, pol.polrelid::regclass) INTO _hit + FROM pg_depend d + JOIN pg_policy pol ON d.classid = 'pg_policy'::regclass AND d.objid = pol.oid + WHERE d.refclassid = 'pg_proc'::regclass AND d.refobjid = _fn + AND (0 = ANY (pol.polroles) OR _r = ANY (pol.polroles)) + ORDER BY 1 LIMIT 1; + IF _hit IS NOT NULL THEN RETURN _hit; END IF; + + -- a view the role can read that calls it, itself or through the views it reads + WITH RECURSIVE v(rel) AS ( + SELECT rw.ev_class + FROM pg_depend d JOIN pg_rewrite rw ON d.classid = 'pg_rewrite'::regclass AND d.objid = rw.oid + WHERE d.refclassid = 'pg_proc'::regclass AND d.refobjid = _fn + UNION + SELECT rw.ev_class + FROM v + JOIN pg_depend d ON d.classid = 'pg_rewrite'::regclass AND d.refclassid = 'pg_class'::regclass AND d.refobjid = v.rel + JOIN pg_rewrite rw ON rw.oid = d.objid + WHERE rw.ev_class <> v.rel + ) + SELECT format('view %s', c.oid::regclass) INTO _hit + FROM v JOIN pg_class c ON c.oid = v.rel + WHERE c.relkind = 'v' AND has_any_column_privilege(_r, c.oid, 'SELECT') + ORDER BY 1 LIMIT 1; + IF _hit IS NOT NULL THEN RETURN _hit; END IF; + + -- an expression on a table the role can write: index, default or generated value, CHECK, trigger WHEN, rule + SELECT x.what INTO _hit FROM ( + SELECT format('index %s on %s', i.indexrelid::regclass, i.indrelid::regclass) AS what, i.indrelid AS rel + FROM pg_depend d JOIN pg_index i ON d.classid = 'pg_class'::regclass AND d.objid = i.indexrelid + WHERE d.refclassid = 'pg_proc'::regclass AND d.refobjid = _fn + UNION ALL + SELECT format('%s of %s.%s', CASE WHEN a.attgenerated = 's' THEN 'generated value' ELSE 'default' END, + ad.adrelid::regclass, a.attname), ad.adrelid + FROM pg_depend d JOIN pg_attrdef ad ON d.classid = 'pg_attrdef'::regclass AND d.objid = ad.oid + JOIN pg_attribute a ON a.attrelid = ad.adrelid AND a.attnum = ad.adnum + WHERE d.refclassid = 'pg_proc'::regclass AND d.refobjid = _fn + UNION ALL + SELECT format('constraint %s on %s', con.conname, con.conrelid::regclass), con.conrelid + FROM pg_depend d JOIN pg_constraint con ON d.classid = 'pg_constraint'::regclass AND d.objid = con.oid + WHERE d.refclassid = 'pg_proc'::regclass AND d.refobjid = _fn AND con.conrelid <> 0 + UNION ALL + SELECT format('trigger %s on %s (its WHEN)', t.tgname, t.tgrelid::regclass), t.tgrelid + FROM pg_depend d JOIN pg_trigger t ON d.classid = 'pg_trigger'::regclass AND d.objid = t.oid + WHERE d.refclassid = 'pg_proc'::regclass AND d.refobjid = _fn AND t.tgfoid <> _fn + UNION ALL + SELECT format('rule %s on %s', rw.rulename, rw.ev_class::regclass), rw.ev_class + FROM pg_depend d JOIN pg_rewrite rw ON d.classid = 'pg_rewrite'::regclass AND d.objid = rw.oid + JOIN pg_class c ON c.oid = rw.ev_class + WHERE d.refclassid = 'pg_proc'::regclass AND d.refobjid = _fn AND c.relkind IN ('r', 'p') + ) x + WHERE pg_temp.kg_can_write(_r, x.rel) + ORDER BY 1 LIMIT 1; + IF _hit IS NOT NULL THEN RETURN _hit; END IF; + + -- a domain's CHECK, an operator, a cast or an aggregate: whoever uses it runs the function + SELECT x.what INTO _hit FROM ( + SELECT format('constraint %s on domain %s', con.conname, con.contypid::regtype) AS what + FROM pg_depend d JOIN pg_constraint con ON d.classid = 'pg_constraint'::regclass AND d.objid = con.oid + WHERE d.refclassid = 'pg_proc'::regclass AND d.refobjid = _fn AND con.contypid <> 0 + UNION ALL SELECT format('operator %s', o.oid::regoperator) FROM pg_operator o WHERE o.oprcode = _fn + UNION ALL SELECT format('cast %s to %s', format_type(k.castsource, NULL), format_type(k.casttarget, NULL)) + FROM pg_cast k WHERE k.castfunc = _fn + UNION ALL SELECT format('aggregate %s', g.aggfnoid::regprocedure) FROM pg_aggregate g + WHERE _fn IN (g.aggtransfn, g.aggfinalfn, g.aggcombinefn, g.aggmtransfn, g.aggminvtransfn, g.aggmfinalfn) + ) x ORDER BY 1 LIMIT 1; + IF _hit IS NOT NULL THEN RETURN _hit; END IF; + + -- an invoker function whose body calls it, and that the role runs: one it may still execute, or a + -- trigger function on a table it can write + SELECT format('%s calls it as its caller', g.oid::regprocedure) INTO _hit + FROM pg_proc g + WHERE NOT g.prosecdef AND g.oid <> _fn + AND g.pronamespace NOT IN ('pg_catalog'::regnamespace, 'information_schema'::regnamespace) + AND g.pronamespace <> pg_my_temp_schema() + AND (g.prosrc ~ ('(^|[^[:alnum:]_.])(public\.)?' || _name || '[[:space:]]*\(') + OR EXISTS (SELECT 1 FROM pg_depend d WHERE d.classid = 'pg_proc'::regclass AND d.objid = g.oid + AND d.refclassid = 'pg_proc'::regclass AND d.refobjid = _fn)) + AND ((g.prorettype NOT IN ('trigger'::regtype, 'event_trigger'::regtype) + AND pg_temp.kg_will_execute(g.oid, _role)) + OR EXISTS (SELECT 1 FROM pg_trigger t + WHERE t.tgfoid = g.oid AND NOT t.tgisinternal AND pg_temp.kg_can_write(_r, t.tgrelid))) + ORDER BY 1 LIMIT 1; + RETURN _hit; +END +$fn$; + +-- == 4. The run: every change, the checks, the report; rolled back as a whole in a dry run --------------- +DO $kg$ +DECLARE + _dry boolean := coalesce(current_setting('bbqs.dry_run', true), 'on') <> 'off'; + _keep pg_temp.kg_report[]; + _errs int := 0; + _list text; + _r record; + _why text; + _changed int; + _grantees text; + _rel regclass; + _all text; + _keepcols text; + _q text; + _w text; + _ok text := '^\(*(public\.)?(has_role\(auth\.uid\(\), ''(admin|curator|member)''::(public\.)?app_role\)' + || '|is_curator_or_admin\(auth\.uid\(\)\))\)*$'; +BEGIN + BEGIN + -- 4a. The admin-only policies that named PUBLIC name authenticated: never true for anon. + FOR _r IN + SELECT pol.oid, pol.polname, pol.polrelid::regclass AS tbl, + pg_get_expr(pol.polqual, pol.polrelid) AS q, pg_get_expr(pol.polwithcheck, pol.polrelid) AS w + FROM pg_policy pol + WHERE pol.polroles = ARRAY[0::oid] + AND (pol.polqual IS NOT NULL OR pol.polwithcheck IS NOT NULL) + ORDER BY 3, 2 + LOOP + _q := coalesce(_r.q, ''); + _w := coalesce(_r.w, ''); + CONTINUE WHEN NOT ((_q = '' OR _q ~ _ok) AND (_w = '' OR _w ~ _ok)); + BEGIN + EXECUTE format('ALTER POLICY %I ON %s TO authenticated', _r.polname, _r.tbl); + INSERT INTO pg_temp.kg_report (section, object, anon_before, anon_now, signed_in_before, signed_in_now, outcome, detail) + VALUES ('2 policy', format('%s on %s', _r.polname, _r.tbl), 'evaluated (never true)', 'not evaluated', + 'evaluated', 'evaluated', 'changed', + format('TO PUBLIC -> TO authenticated. %s', concat_ws(' / ', nullif(_q, ''), nullif(_w, '')))); + EXCEPTION WHEN insufficient_privilege THEN + -- Not the table's owner: the policy keeps PUBLIC, so the plan below keeps has_role for anon. + INSERT INTO pg_temp.kg_report (section, object, anon_before, anon_now, signed_in_before, signed_in_now, outcome, detail) + VALUES ('2 policy', format('%s on %s', _r.polname, _r.tbl), 'evaluated', 'evaluated', 'evaluated', 'evaluated', + 'kept', 'could not re-scope it (' || SQLERRM || '): it keeps PUBLIC, and anon keeps what it calls'); + END; + END LOOP; + + -- 4b. The plan: the tier, then what the live catalog says each role needs, until nothing changes. + INSERT INTO pg_temp.kg_plan (fn_oid, fn_name, tier, anon_may, authenticated_may) + SELECT b.fn_oid, b.fn_name, a.tier, a.tier = 'anon', a.tier IN ('anon', 'authenticated') + FROM pg_temp.kg_fn_before b JOIN pg_temp.kg_function_access a ON a.fn_name = b.fn_name + WHERE b.kind IN ('f', 'p'); + LOOP + _changed := 0; + FOR _r IN SELECT fn_oid FROM pg_temp.kg_plan WHERE NOT authenticated_may LOOP + _why := pg_temp.kg_needs(_r.fn_oid, 'authenticated'); + IF _why IS NOT NULL THEN + UPDATE pg_temp.kg_plan SET authenticated_may = true, authenticated_kept_for = _why WHERE fn_oid = _r.fn_oid; + _changed := _changed + 1; + END IF; + END LOOP; + FOR _r IN SELECT fn_oid FROM pg_temp.kg_plan WHERE NOT anon_may LOOP + _why := pg_temp.kg_needs(_r.fn_oid, 'anon'); + IF _why IS NOT NULL THEN + -- what a visitor may run, a signed-in user may run + UPDATE pg_temp.kg_plan SET anon_may = true, anon_kept_for = _why, + authenticated_may = true, authenticated_kept_for = coalesce(authenticated_kept_for, _why) + WHERE fn_oid = _r.fn_oid; + _changed := _changed + 1; + END IF; + END LOOP; + EXIT WHEN _changed = 0; + END LOOP; + + -- 4c. The grants. PUBLIC goes from every function a visitor does not need: anon holds what PUBLIC holds. + FOR _r IN SELECT p.*, pg_temp.kg_sig(p.fn_oid) AS sig, b.kind + FROM pg_temp.kg_plan p JOIN pg_temp.kg_fn_before b USING (fn_oid) ORDER BY p.fn_name, sig LOOP + _grantees := concat_ws(', ', CASE WHEN _r.anon_may THEN 'anon' END, + CASE WHEN _r.authenticated_may THEN 'authenticated' END, 'service_role'); + IF _r.tier = 'anon' THEN + EXECUTE format('GRANT EXECUTE ON %s %s TO %s', + CASE WHEN _r.kind = 'p' THEN 'PROCEDURE' ELSE 'FUNCTION' END, _r.sig, _grantees); + ELSE + EXECUTE format('REVOKE ALL ON %s %s FROM PUBLIC, anon, authenticated', + CASE WHEN _r.kind = 'p' THEN 'PROCEDURE' ELSE 'FUNCTION' END, _r.sig); + EXECUTE format('GRANT EXECUTE ON %s %s TO %s', + CASE WHEN _r.kind = 'p' THEN 'PROCEDURE' ELSE 'FUNCTION' END, _r.sig, _grantees); + END IF; + END LOOP; + + -- 4d. The public questionnaire keys: the 20 the public pages show (READERS, in the header). A key is + -- added here when a public page starts to show it (tests/guards/anon-private-columns checks). + CREATE OR REPLACE VIEW public.project_metadata_public + WITH (security_invoker = false) + AS + SELECT p.id AS project_id, + p.grant_number, + (SELECT jsonb_object_agg(e.key, + CASE WHEN e.key <> 'devices' THEN e.value + WHEN jsonb_typeof(e.value) = 'object' THEN + coalesce((SELECT jsonb_object_agg(d.key, d.value) + FROM jsonb_each(e.value) AS d(key, value) + WHERE d.key IN ('sensor', 'data_acquisition_modalities', + 'behavioral_rigs', 'electrophysiology_setup')), + '{}'::jsonb) + END) + FROM jsonb_each(CASE WHEN jsonb_typeof(p.metadata) = 'object' THEN p.metadata END) AS e(key, value) + WHERE e.key IN ('use_approaches', 'marr_l1_ethological_goal', 'marr_l2_algorithmic_function', + 'marr_l3_implementational_hardware', 'cross_project_synergy', + 'data_analysis_approach', 'target_species_domain', 'agentic_action_required', + 'experimental_approaches', 'data_modalities', 'data_type', 'analysis_types', + 'analysis_methods', 'software_tools_used', 'produce_data_modality', + 'produce_data_type', 'use_analysis_types', 'use_analysis_method', + 'develope_software_type', 'devices')) AS metadata + FROM public.projects p; + + COMMENT ON VIEW public.project_metadata_public IS + 'The questionnaire answers a visitor may read: the keys of projects.metadata the public pages show (GrantSummary, GrantMarrSection, useMarrProjects). Owner''s rights, so anon reads it without projects.metadata, which only signed-in users may read (20261118120000). Every project, as projects'' read policy shows them. Read only.'; + + -- Nobody writes through it; anon and signed-in users read it. + REVOKE ALL ON public.project_metadata_public FROM PUBLIC, anon, authenticated, service_role; + GRANT SELECT ON public.project_metadata_public TO anon, authenticated, service_role; + + -- 4e. Column grants: anon loses projects.metadata, authenticated loses investigators_public.user_id and + -- .pending_role, and each keeps every other column it could read. + FOR _r IN + SELECT x.role_name, x.object_name, array_agg(x.column_name) AS private + FROM (SELECT 'anon' AS role_name, object_name, column_name FROM pg_temp.kg_private_from_anon + UNION ALL + SELECT 'authenticated', object_name, column_name FROM pg_temp.kg_private_from_authenticated) x + GROUP BY 1, 2 ORDER BY 1, 2 + LOOP + _rel := to_regclass(format('public.%I', _r.object_name)); + CONTINUE WHEN _rel IS NULL; + SELECT string_agg(quote_ident(a.attname), ', ' ORDER BY a.attnum), + string_agg(quote_ident(a.attname), ', ' ORDER BY a.attnum) + FILTER (WHERE NOT (a.attname::text = ANY (_r.private)) + AND has_column_privilege(_r.role_name, _rel, a.attnum, 'SELECT')) + INTO _all, _keepcols + FROM pg_attribute a + WHERE a.attrelid = _rel AND a.attnum > 0 AND NOT a.attisdropped; + -- PUBLIC too: every role holds what PUBLIC holds. + EXECUTE format('REVOKE SELECT ON %s FROM %I, PUBLIC', _rel, _r.role_name); + EXECUTE format('REVOKE SELECT (%s) ON %s FROM %I, PUBLIC', _all, _rel, _r.role_name); + IF _keepcols IS NOT NULL THEN + EXECUTE format('GRANT SELECT (%s) ON %s TO %I', _keepcols, _rel, _r.role_name); + END IF; + END LOOP; + + -- 4f. The checks. Each failure is an 'error' row: a real run then commits nothing. + -- Every reviewed function: each role may run it exactly as planned, and the service role always. + INSERT INTO pg_temp.kg_report (section, object, outcome, detail) + SELECT '1 function', pg_temp.kg_sig(p.fn_oid), 'error', + format('planned anon %s / signed-in %s, but anon %s / signed-in %s / service_role %s', + p.anon_may, p.authenticated_may, has_function_privilege('anon', p.fn_oid, 'EXECUTE'), + has_function_privilege('authenticated', p.fn_oid, 'EXECUTE'), + has_function_privilege('service_role', p.fn_oid, 'EXECUTE')) + FROM pg_temp.kg_plan p + WHERE has_function_privilege('anon', p.fn_oid, 'EXECUTE') IS DISTINCT FROM p.anon_may + OR has_function_privilege('authenticated', p.fn_oid, 'EXECUTE') IS DISTINCT FROM p.authenticated_may + OR NOT has_function_privilege('service_role', p.fn_oid, 'EXECUTE'); + -- What anon must never run, whatever a live object needs. + INSERT INTO pg_temp.kg_report (section, object, outcome, detail) + SELECT '1 function', pg_temp.kg_sig(p.fn_oid), 'error', + format('anon would keep it because %s: anon must not run this; decide that object first', p.anon_kept_for) + FROM pg_temp.kg_plan p JOIN pg_temp.kg_never_anon n USING (fn_name) + WHERE p.anon_may; + -- The private columns. + INSERT INTO pg_temp.kg_report (section, object, outcome, detail) + SELECT '3 column', x.object_name || '.' || x.column_name, 'error', x.role_name || ' could still read it' + FROM (SELECT 'anon' AS role_name, object_name, column_name FROM pg_temp.kg_private_from_anon + UNION ALL + SELECT 'authenticated', object_name, column_name FROM pg_temp.kg_private_from_authenticated) x + WHERE has_column_privilege(x.role_name, to_regclass(format('public.%I', x.object_name)), x.column_name, 'SELECT'); + -- Every other column of these objects: each role reads it exactly as before. + INSERT INTO pg_temp.kg_report (section, object, outcome, detail) + SELECT '3 column', b.object_name || '.' || b.column_name, 'error', concat_ws('; ', + CASE WHEN b.anon_could IS DISTINCT FROM has_column_privilege('anon', to_regclass('public.' || b.object_name), b.column_name, 'SELECT') + THEN 'anon would ' || CASE WHEN b.anon_could THEN 'lose' ELSE 'gain' END || ' it' END, + CASE WHEN b.authenticated_could IS DISTINCT FROM has_column_privilege('authenticated', to_regclass('public.' || b.object_name), b.column_name, 'SELECT') + THEN 'signed-in users would ' || CASE WHEN b.authenticated_could THEN 'lose' ELSE 'gain' END || ' it' END) + FROM pg_temp.kg_col_before b + WHERE b.object_name <> 'project_metadata_public' + AND NOT EXISTS (SELECT 1 FROM pg_temp.kg_private_from_anon p WHERE p.object_name = b.object_name AND p.column_name = b.column_name) + AND NOT EXISTS (SELECT 1 FROM pg_temp.kg_private_from_authenticated p WHERE p.object_name = b.object_name AND p.column_name = b.column_name) + AND (b.anon_could IS DISTINCT FROM has_column_privilege('anon', to_regclass('public.' || b.object_name), b.column_name, 'SELECT') + OR b.authenticated_could IS DISTINCT FROM has_column_privilege('authenticated', to_regclass('public.' || b.object_name), b.column_name, 'SELECT')); + -- Signed-in users still read every answer; the hidden columns still exist for those who read them. + IF NOT has_column_privilege('authenticated', 'public.projects', 'metadata', 'SELECT') THEN + INSERT INTO pg_temp.kg_report (section, object, outcome, detail) + VALUES ('3 column', 'projects.metadata', 'error', 'signed-in users could not read it'); + END IF; + -- The view: anon and signed-in users read it, nobody writes through it. + IF NOT (has_table_privilege('anon', 'public.project_metadata_public', 'SELECT') + AND has_table_privilege('authenticated', 'public.project_metadata_public', 'SELECT')) + OR has_table_privilege('anon', 'public.project_metadata_public', 'INSERT, UPDATE, DELETE, TRUNCATE') + OR has_table_privilege('authenticated', 'public.project_metadata_public', 'INSERT, UPDATE, DELETE, TRUNCATE') THEN + INSERT INTO pg_temp.kg_report (section, object, outcome, detail) + VALUES ('4 view', 'project_metadata_public', 'error', 'anon and signed-in users must read it and write nothing through it'); + END IF; + + -- 4g. The report rows. + -- One per reviewed function. + INSERT INTO pg_temp.kg_report (section, object, anon_before, anon_now, signed_in_before, signed_in_now, outcome, detail) + SELECT '1 function', pg_temp.kg_sig(p.fn_oid), + CASE WHEN b.anon_could THEN 'may run' ELSE 'no' END, + CASE WHEN has_function_privilege('anon', p.fn_oid, 'EXECUTE') THEN 'may run' ELSE 'no' END, + CASE WHEN b.authenticated_could THEN 'may run' ELSE 'no' END, + CASE WHEN has_function_privilege('authenticated', p.fn_oid, 'EXECUTE') THEN 'may run' ELSE 'no' END, + CASE WHEN (p.anon_kept_for IS NOT NULL AND p.tier <> 'anon') + OR (p.authenticated_kept_for IS NOT NULL AND p.tier = 'service') THEN 'kept' + WHEN b.anon_could IS DISTINCT FROM has_function_privilege('anon', p.fn_oid, 'EXECUTE') + OR b.authenticated_could IS DISTINCT FROM has_function_privilege('authenticated', p.fn_oid, 'EXECUTE') + OR b.service_could IS DISTINCT FROM has_function_privilege('service_role', p.fn_oid, 'EXECUTE') + THEN 'changed' ELSE 'unchanged' END, + format('%s%s | %s | callers: %s', p.tier, + CASE WHEN b.definer THEN ', SECURITY DEFINER' ELSE '' END, a.does, a.callers) + || coalesce(' | anon keeps it: ' || p.anon_kept_for, '') + || CASE WHEN p.tier = 'service' THEN coalesce(' | signed-in users keep it: ' || p.authenticated_kept_for, '') ELSE '' END + FROM pg_temp.kg_plan p + JOIN pg_temp.kg_fn_before b USING (fn_oid) + JOIN pg_temp.kg_function_access a ON a.fn_name = p.fn_name + ORDER BY p.tier, p.fn_name, 2; + -- A function this file does not name: left as it is, for a later migration to decide. + INSERT INTO pg_temp.kg_report (section, object, anon_before, anon_now, signed_in_before, signed_in_now, outcome, detail) + SELECT '5 not reviewed', pg_temp.kg_sig(b.fn_oid), + CASE WHEN b.anon_could THEN 'may run' ELSE 'no' END, + CASE WHEN has_function_privilege('anon', b.fn_oid, 'EXECUTE') THEN 'may run' ELSE 'no' END, + CASE WHEN b.authenticated_could THEN 'may run' ELSE 'no' END, + CASE WHEN has_function_privilege('authenticated', b.fn_oid, 'EXECUTE') THEN 'may run' ELSE 'no' END, + 'not reviewed', + CASE WHEN b.definer THEN 'SECURITY DEFINER. ' ELSE '' END + || 'Not in kg_function_access (production only?): left as it is. Give it a tier in a later migration.' + FROM pg_temp.kg_fn_before b + WHERE NOT EXISTS (SELECT 1 FROM pg_temp.kg_plan p WHERE p.fn_oid = b.fn_oid) + ORDER BY 2; + -- The policies that already named authenticated on a second run, and the ones left as they are. + INSERT INTO pg_temp.kg_report (section, object, anon_before, anon_now, signed_in_before, signed_in_now, outcome, detail) + SELECT '2 policy', format('%s on %s', pol.polname, pol.polrelid::regclass), 'not evaluated', 'not evaluated', + 'evaluated', 'evaluated', 'unchanged', 'already TO authenticated' + FROM pg_policy pol JOIN pg_temp.kg_pol_before pb ON pb.pol_oid = pol.oid + WHERE pb.roles_before = 'authenticated' AND pol.polroles = ARRAY['authenticated'::regrole::oid] + AND EXISTS (SELECT 1 FROM pg_depend d WHERE d.classid = 'pg_policy'::regclass AND d.objid = pol.oid + AND d.refclassid = 'pg_proc'::regclass + AND d.refobjid IN (SELECT fn_oid FROM pg_temp.kg_plan WHERE fn_name = 'has_role')) + AND pol.polname IN ('Admins can update system alerts', 'Admins can view system alerts', + 'Admins delete lovable invoices', 'Admins insert lovable invoices', + 'Admins update lovable invoices', 'Admins view lovable invoices', + 'Admins manage publication_figure', 'Admins manage publication_fulltext', + 'Admins manage publication_fulltext_body'); + INSERT INTO pg_temp.kg_report (section, object, anon_before, anon_now, signed_in_before, signed_in_now, outcome, detail) + SELECT '2 policy', format('%s on %s', pol.polname, pol.polrelid::regclass), 'evaluated', 'evaluated', + 'evaluated', 'evaluated', 'kept', + 'names PUBLIC and calls has_role in a form this run does not know to be false for anon: left as it is, so anon keeps has_role. ' + || concat_ws(' / ', pg_get_expr(pol.polqual, pol.polrelid), pg_get_expr(pol.polwithcheck, pol.polrelid)) + FROM pg_policy pol + WHERE 0 = ANY (pol.polroles) + AND EXISTS (SELECT 1 FROM pg_depend d WHERE d.classid = 'pg_policy'::regclass AND d.objid = pol.oid + AND d.refclassid = 'pg_proc'::regclass + AND d.refobjid IN (SELECT fn_oid FROM pg_temp.kg_plan WHERE fn_name = 'has_role')); + -- The columns, per object and role. + INSERT INTO pg_temp.kg_report (section, object, anon_before, anon_now, signed_in_before, signed_in_now, outcome, detail) + SELECT '3 column', b.object_name || '.' || b.column_name, + CASE WHEN b.anon_could THEN 'may read' ELSE 'no' END, + CASE WHEN has_column_privilege('anon', to_regclass('public.' || b.object_name), b.column_name, 'SELECT') THEN 'may read' ELSE 'no' END, + CASE WHEN b.authenticated_could THEN 'may read' ELSE 'no' END, + CASE WHEN has_column_privilege('authenticated', to_regclass('public.' || b.object_name), b.column_name, 'SELECT') THEN 'may read' ELSE 'no' END, + CASE WHEN b.anon_could IS DISTINCT FROM has_column_privilege('anon', to_regclass('public.' || b.object_name), b.column_name, 'SELECT') + OR b.authenticated_could IS DISTINCT FROM has_column_privilege('authenticated', to_regclass('public.' || b.object_name), b.column_name, 'SELECT') + THEN 'changed' ELSE 'unchanged' END, + coalesce((SELECT 'private from anon: ' || p.holds FROM pg_temp.kg_private_from_anon p + WHERE p.object_name = b.object_name AND p.column_name = b.column_name), + (SELECT 'private from signed-in users: ' || p.holds FROM pg_temp.kg_private_from_authenticated p + WHERE p.object_name = b.object_name AND p.column_name = b.column_name), '') + FROM pg_temp.kg_col_before b + WHERE EXISTS (SELECT 1 FROM pg_temp.kg_private_from_anon p WHERE p.object_name = b.object_name AND p.column_name = b.column_name) + OR EXISTS (SELECT 1 FROM pg_temp.kg_private_from_authenticated p WHERE p.object_name = b.object_name AND p.column_name = b.column_name) + ORDER BY 2; + INSERT INTO pg_temp.kg_report (section, object, anon_before, anon_now, signed_in_before, signed_in_now, outcome, detail) + SELECT '3 column', o.object_name || ' (every other column)', + count(*) FILTER (WHERE b.anon_could) || ' of ' || count(*), + count(*) FILTER (WHERE has_column_privilege('anon', to_regclass('public.' || b.object_name), b.column_name, 'SELECT')) || ' of ' || count(*), + count(*) FILTER (WHERE b.authenticated_could) || ' of ' || count(*), + count(*) FILTER (WHERE has_column_privilege('authenticated', to_regclass('public.' || b.object_name), b.column_name, 'SELECT')) || ' of ' || count(*), + 'unchanged', 'every column but the private ones reads as before (checked above)' + FROM (SELECT DISTINCT object_name FROM pg_temp.kg_col_before WHERE object_name <> 'project_metadata_public') o + JOIN pg_temp.kg_col_before b ON b.object_name = o.object_name + WHERE NOT EXISTS (SELECT 1 FROM pg_temp.kg_private_from_anon p WHERE p.object_name = b.object_name AND p.column_name = b.column_name) + AND NOT EXISTS (SELECT 1 FROM pg_temp.kg_private_from_authenticated p WHERE p.object_name = b.object_name AND p.column_name = b.column_name) + GROUP BY o.object_name; + -- The view. + INSERT INTO pg_temp.kg_report (section, object, anon_before, anon_now, signed_in_before, signed_in_now, outcome, detail) + SELECT '4 view', 'project_metadata_public', + CASE WHEN EXISTS (SELECT 1 FROM pg_temp.kg_col_before WHERE object_name = 'project_metadata_public' AND anon_could) THEN 'may read' ELSE 'no view' END, + 'may read', + CASE WHEN EXISTS (SELECT 1 FROM pg_temp.kg_col_before WHERE object_name = 'project_metadata_public' AND authenticated_could) THEN 'may read' ELSE 'no view' END, + 'may read', + CASE WHEN EXISTS (SELECT 1 FROM pg_temp.kg_col_before WHERE object_name = 'project_metadata_public') THEN 'unchanged' ELSE 'changed' END, + format('%s projects; the 20 public keys of metadata; read only', (SELECT count(*) FROM public.project_metadata_public)); + + SELECT count(*) INTO _errs FROM pg_temp.kg_report WHERE outcome = 'error'; + IF _dry OR _errs > 0 THEN + SELECT array_agg(r ORDER BY r.seq) INTO _keep FROM pg_temp.kg_report r; + RAISE EXCEPTION USING ERRCODE = 'KG000', MESSAGE = 'privacy_round_two: rolling the run back'; + END IF; + EXCEPTION WHEN SQLSTATE 'KG000' THEN + -- Every change above is undone at this point; only the report survives (it was copied first). + INSERT INTO pg_temp.kg_report SELECT * FROM unnest(_keep); + END; + PERFORM public.set_actor('migration:privacy_round_two'); + IF NOT _dry AND _errs > 0 THEN + SELECT string_agg(format('[%s] %s: %s', r.section, r.object, r.detail), E'\n' ORDER BY r.seq) + INTO _list FROM pg_temp.kg_report r WHERE r.outcome = 'error'; + RAISE EXCEPTION E'privacy_round_two: NOTHING WAS CHANGED, % error(s):\n%', _errs, _list + USING HINT = 'Set the dry-run switch back to ''on'' and run again to see the whole report.'; + END IF; + INSERT INTO pg_temp.kg_report (seq, section, object, outcome, detail) + SELECT 0, '0 RESULT', + CASE WHEN _dry THEN 'DRY RUN: every change was made, then rolled back. NOTHING WAS CHANGED.' + ELSE 'APPLIED: committed as one transaction under migration:privacy_round_two.' END, + CASE WHEN _errs > 0 THEN 'error' WHEN _dry THEN 'report' ELSE 'done' END, + format('functions: %s changed, %s kept for a live object, %s unchanged, %s not reviewed; policies re-scoped: %s; columns changed: %s. ', + count(*) FILTER (WHERE section = '1 function' AND outcome = 'changed'), + count(*) FILTER (WHERE section = '1 function' AND outcome = 'kept'), + count(*) FILTER (WHERE section = '1 function' AND outcome = 'unchanged'), + count(*) FILTER (WHERE section = '5 not reviewed'), + count(*) FILTER (WHERE section = '2 policy' AND outcome = 'changed'), + count(*) FILTER (WHERE section = '3 column' AND outcome = 'changed')) + || CASE WHEN _errs > 0 THEN format('%s ERROR(S): a real run changes nothing until they are fixed (rows marked error). ', _errs) ELSE '' END + || CASE WHEN _dry THEN 'To apply: change the dry-run switch to ''off'' in the line SELECT set_config(''bbqs.dry_run'', ''on'', true); near the top, and run the whole script again.' + ELSE 'Running it again changes nothing (every row says unchanged).' END + FROM pg_temp.kg_report; +END +$kg$; + +NOTIFY pgrst, 'reload schema'; + +COMMIT; + +-- == Report (the editor shows only this last result) ------------------------------------------------------- +SELECT section, object, + coalesce(anon_before || ' -> ' || anon_now, '') AS anon, + coalesce(signed_in_before || ' -> ' || signed_in_now, '') AS signed_in, + outcome, detail + FROM pg_temp.kg_report + ORDER BY seq = 0 DESC, section, CASE outcome WHEN 'error' THEN 0 WHEN 'kept' THEN 1 WHEN 'changed' THEN 2 ELSE 3 END, object; diff --git a/supabase/migrations/20261118140000_role_vocabulary_collaborator.sql b/supabase/migrations/20261118140000_role_vocabulary_collaborator.sql new file mode 100644 index 00000000..167e398c --- /dev/null +++ b/supabase/migrations/20261118140000_role_vocabulary_collaborator.sql @@ -0,0 +1,141 @@ +-- ════════════════════════════════════════════════════════════════════════════════════════════════ +-- 20261118140000_role_vocabulary_collaborator.sql +-- 'collaborator' is a project role: teach normalize_grant_role the token the roster screens offer. +-- ════════════════════════════════════════════════════════════════════════════════════════════════ +-- +-- WHY. grant_investigators.role holds canonical tokens only (issue #283): normalize_grant_role, +-- behind trg_normalize_grant_role, maps what it recognises and passes anything else through +-- unchanged. The roster editor (TeamRosterEditor) and the person summary have always offered +-- "Collaborator", but the function never listed it. Between the exports of 2026-11-17 and +-- 2026-11-18 a curator chose it for one role on U24DA064429; it was stored as an unknown token, and +-- the graph's rule #4 (ProjectRoleTokenShape) reported an error no data fix could clear. The owner +-- decided on 2026-11-18 that 'collaborator' is a valid project role. +-- +-- WHAT. +-- 1. normalize_grant_role gains WHEN 'collaborator' THEN 'collaborator' and is otherwise the +-- 20260811120000 definition, word for word. It is replaced only if the live function IS that +-- definition (or already this one): any other body stops the script with nothing changed, so +-- a hand edit made since is never overwritten. +-- 2. Who may run it is stated (tests/guards/function-execute-grants): signed-in users and the +-- service role, because the trigger runs it as whoever writes the roster; not anon. +-- 3. A roster row whose role is 'collaborator' in another case or with spaces is rewritten to the +-- token. The row a curator chose already holds the token, so 0 rows are expected. +-- The KG schema's project_role_enum and shape #4 gain the token in the same commit +-- (tests/guards/kg-role-vocabulary-parity holds them equal to this function), and +-- tests/guards/role-ui-vocabulary now holds every role menu to the function. +-- Not changed: role_label_from_token. It maps a token to the Google Form's label for the free-text +-- investigators.role, and the form has no "Collaborator" option; the screens already show +-- "Collaborator" for the token. +-- +-- HOW TO APPLY: Supabase SQL editor, project vpexxhfpvghlejljwpvt, as its default role (postgres). +-- Paste the WHOLE file, Run. One transaction; a second run changes nothing. The last statement lists +-- every role value on the roster with its count and whether the vocabulary knows it. +-- UNDO: re-apply the function from 20260811120000_canonical_role_vocabulary.sql. Rows rewritten by +-- step 3 are in data_audit_log under 'migration:role_vocabulary_collaborator'. +-- ════════════════════════════════════════════════════════════════════════════════════════════════ + +BEGIN; +SET LOCAL lock_timeout = '5s'; +SELECT public.set_actor('migration:role_vocabulary_collaborator'); +SELECT public.set_source_class('curator_fill'); + +-- The live function must be the one this script knows: the 20260811120000 definition, or this +-- script's own (a second run). Compared on the body with whitespace folded, so line endings do not +-- matter. +DO $guard$ +DECLARE + _n int; + _md5 text; +BEGIN + SELECT count(*) INTO _n FROM pg_proc p + WHERE p.proname = 'normalize_grant_role' AND p.pronamespace = 'public'::regnamespace; + IF _n = 0 THEN + RAISE EXCEPTION 'public.normalize_grant_role does not exist: apply 20260811120000_canonical_role_vocabulary first. NOTHING WAS CHANGED.'; + ELSIF _n > 1 THEN + RAISE EXCEPTION 'public.normalize_grant_role has % definitions (expected 1). NOTHING WAS CHANGED.', _n; + END IF; + SELECT md5(regexp_replace(p.prosrc, '\s+', ' ', 'g')) INTO _md5 FROM pg_proc p + WHERE p.oid = 'public.normalize_grant_role(text)'::regprocedure; + IF _md5 NOT IN ('72be7ed16dc86fc299a8dc76042a7f1f', -- 20260811120000 + '4f23877eb19877d9b8ec9581c3c74640') THEN -- this script, on a second run + RAISE EXCEPTION 'public.normalize_grant_role is not the 20260811120000 definition (body fingerprint %). It was changed by hand, so it is not replaced. NOTHING WAS CHANGED. Send its definition: SELECT pg_get_functiondef(''public.normalize_grant_role(text)''::regprocedure);', _md5; + END IF; +END +$guard$; + +CREATE OR REPLACE FUNCTION public.normalize_grant_role(_role text) +RETURNS text LANGUAGE sql IMMUTABLE AS $fn$ + SELECT CASE lower(btrim(coalesce(_role, ''))) + WHEN 'pi' then 'PI' + WHEN 'contact_pi' then 'contact_pi' + WHEN 'contact pi' then 'contact_pi' + WHEN 'co_pi' then 'co_pi' + WHEN 'co-pi' then 'co_pi' + WHEN 'mpi' then 'mpi' + WHEN 'co-investigator' then 'co-investigator' + WHEN 'co_investigator' then 'co-investigator' + WHEN 'collaborator' then 'collaborator' -- offered by the roster screens; a role since 2026-11-18 + WHEN 'postdoc' then 'postdoc' + WHEN 'post-doc' then 'postdoc' + WHEN 'graduate_student' then 'graduate_student' + WHEN 'grad_student' then 'graduate_student' + WHEN 'grad student' then 'graduate_student' -- leaked form label, 1 row + WHEN 'staff' then 'research_staff' -- leaked, 3 rows + WHEN 'research_staff' then 'research_staff' + WHEN 'data_manager' then 'data_manager' + WHEN 'project_manager' then 'project_manager' + WHEN 'nih_program' then 'nih_program' + WHEN 'admin' then 'admin' + WHEN 'other' then 'other' + -- 'trainee' (1 row) is deliberately PASSED THROUGH, not mapped: it could mean postdoc or + -- graduate_student and guessing would assert a career stage nobody stated. isYoungInvestigator + -- already matches it by substring, so it entitles correctly as-is. + ELSE nullif(btrim(coalesce(_role, '')), '') + END +$fn$; + +COMMENT ON FUNCTION public.normalize_grant_role(text) IS + 'Canonicalizes a grant_investigators.role token. Unknown values pass through unchanged rather than being coerced -- a wrong role is worse than an unrecognized one. Every value a role menu offers must be listed here (tests/guards/role-ui-vocabulary).'; + +-- Who may run it: the trigger trg_normalize_grant_role runs it as whoever writes the roster +-- (signed-in curators and members' own edits, the service role). A visitor never writes the roster. +REVOKE ALL ON FUNCTION public.normalize_grant_role(text) FROM PUBLIC, anon; +GRANT EXECUTE ON FUNCTION public.normalize_grant_role(text) TO authenticated, service_role; + +-- The function must do what this script says before any row is touched. +DO $selftest$ +BEGIN + IF public.normalize_grant_role(' Collaborator ') IS DISTINCT FROM 'collaborator' + OR public.normalize_grant_role('pi') IS DISTINCT FROM 'PI' + OR public.normalize_grant_role('staff') IS DISTINCT FROM 'research_staff' + OR public.normalize_grant_role('trainee') IS DISTINCT FROM 'trainee' + OR public.normalize_grant_role('Something Else') IS DISTINCT FROM 'Something Else' + OR public.normalize_grant_role(' ') IS NOT NULL THEN + RAISE EXCEPTION 'normalize_grant_role does not behave as 20261118140000 expects. NOTHING WAS CHANGED.'; + END IF; +END +$selftest$; + +-- Rows that hold the role in another spelling take the token (0 expected). +UPDATE public.grant_investigators + SET role = public.normalize_grant_role(role) + WHERE role IS DISTINCT FROM public.normalize_grant_role(role); + +COMMIT; + +-- The report (the editor shows only this last result): every role on the roster, the ones the +-- vocabulary does not know first. +SELECT r.role, r.roster_rows, r.status, + (SELECT count(*) FROM public.data_audit_log d + WHERE d.actor_label = 'migration:role_vocabulary_collaborator' AND d.table_name = 'grant_investigators') AS rows_this_script_has_rewritten + FROM (SELECT gi.role, + count(*) AS roster_rows, + CASE WHEN gi.role IS NULL THEN 'no role recorded' + WHEN gi.role IN ('PI', 'contact_pi', 'co_pi', 'mpi', 'co-investigator', 'collaborator', 'trainee', 'postdoc', + 'graduate_student', 'research_staff', 'data_manager', 'project_manager', 'nih_program', + 'admin', 'other') THEN 'in the vocabulary' + ELSE 'NOT in the vocabulary: a curator picks a role for these rows' + END AS status + FROM public.grant_investigators gi + GROUP BY gi.role) r + ORDER BY (r.status = 'in the vocabulary'), r.roster_rows DESC, r.role; diff --git a/tests/guards/anon-private-columns.test.mjs b/tests/guards/anon-private-columns.test.mjs new file mode 100644 index 00000000..04076577 --- /dev/null +++ b/tests/guards/anon-private-columns.test.mjs @@ -0,0 +1,628 @@ +// Guard: anon reads the column-restricted objects by naming public columns, and nothing opens a +// private column to anon again. +// +// WHY (2026-11-17). An audit of everything anon (the site's public key) can read found auth user ids, +// e-mail addresses, pending role requests and curators' notes in nine tables and views: Supabase's +// default grant gives anon every column, and row-level security only decides rows. +// 20261117190000_hide_private_columns_from_anon took those columns away from anon, column by column. +// That changes what a query may look like. PostgREST runs select=* as SELECT *, which needs every +// column, so a visitor's select("*") on one of these objects is now refused outright: the page shows +// nothing, or an error. A select("*") is the shortest thing to write, and the next one would break +// the site for every visitor while working for everyone who tests it signed in. This guard makes +// that a failing check instead of a bug report: +// * src/ and e2e/ ask these objects for named columns: no select("*"), no select(), no obj(*), and +// a plain column list (not one chosen by sign-in) names no private column; +// * kg/bbqs_kg.py, which reads as anon, has a PUBLIC_COLUMNS list for every one of them it reads, +// and none of those lists names a private column; +// * the private list is real: each column is in types.ts or added by a migration; +// * no later migration gives anon a private column, or a whole object, back; and one that adds a +// column to one of these objects, or redefines one of the views, says whether anon may read the +// new columns (they are hidden from anon until a GRANT SELECT (<column>) ... TO anon says otherwise). +// The list of private columns is the migrations' own (their kg_private_from_anon rows), so there is one. +// +// ROUND TWO (2026-11-18). 20261118120000_privacy_round_two added projects.metadata to that list (every +// questionnaire answer; a visitor reads the keys the public pages show from project_metadata_public), +// and took investigators_public.user_id and .pending_role from signed-in users too (its +// kg_private_from_authenticated rows). So, as well: +// * no code, signed in or not, asks investigators_public for those two, by select or by filter +// (.eq("user_id", ...) needs SELECT on the column just as a select does): the person, curators +// and admins read them from public.investigators; +// * an embedded select (grants?select=..., projects(metadata)) is held to the same lists; +// * every key of projects.metadata a public page reads is one project_metadata_public carries, +// so a page that starts to show a new answer is a failing check, not a field that is silently +// empty for every visitor; +// * no later migration gives signed-in users those two columns back. +// +// BEFORE ROUND TWO IS APPLIED (2026-11-19). Migrations are applied by hand and round two is on hold, +// so the site must show the same public project details whether the view exists yet or not. The +// helper falls back to projects.metadata when the view is missing and cuts it to the view's keys: +// * that one read is the only place a visitor's code may name projects.metadata, and only inside +// the view-missing branch; +// * the helper's key lists equal the view's, and the fallback returns what the view would. +import { test } from "node:test"; +import assert from "node:assert/strict"; +import { readFileSync, readdirSync, statSync } from "node:fs"; +import { join, dirname, relative, extname } from "node:path"; +import { fileURLToPath } from "node:url"; +import { stripTypeScriptTypes } from "node:module"; + +const ROOT = join(dirname(fileURLToPath(import.meta.url)), "..", ".."); +const MIGRATIONS = join(ROOT, "supabase", "migrations"); +const FIX = "20261117190000_hide_private_columns_from_anon.sql"; +const ROUND2 = "20261118120000_privacy_round_two.sql"; +const read = (rel) => readFileSync(join(ROOT, rel), "utf8").replace(/\r\n/g, "\n"); + +/** object -> Set of columns, from a migration's INSERT INTO <list> (object_name, column_name, holds) rows. */ +export function privateRows(sql, list = "kg_private_from_anon") { + const start = sql.indexOf(`INSERT INTO ${list}`); + assert.ok(start >= 0, `no INSERT INTO ${list}`); + const block = sql.slice(start, sql.indexOf(";", start)); + const out = new Map(); + for (const [, obj, col] of block.matchAll(/\(\s*'([a-z_]+)',\s*'([a-z_]+)',\s*'/g)) { + if (!out.has(obj)) out.set(obj, new Set()); + out.get(obj).add(col); + } + return out; +} + +/** object -> Set of the columns a migration takes from anon, from its kg_private_from_anon rows. */ +export const privateFromAnon = (sql) => privateRows(sql, "kg_private_from_anon"); + +/** The union of several object -> Set maps. */ +export function mergePrivate(...maps) { + const out = new Map(); + for (const m of maps) for (const [obj, cols] of m) out.set(obj, new Set([...(out.get(obj) ?? []), ...cols])); + return out; +} + +const PRIVATE = mergePrivate(privateFromAnon(read(join("supabase", "migrations", FIX))), + privateFromAnon(read(join("supabase", "migrations", ROUND2)))); +const OBJECTS = [...PRIVATE.keys()]; +/** Columns signed-in users may not read either (20261118120000's kg_private_from_authenticated rows). */ +const PRIVATE_FROM_AUTHENTICATED = privateRows(read(join("supabase", "migrations", ROUND2)), "kg_private_from_authenticated"); + +/** Code with // and /* comments blanked to spaces (same length, newlines kept), so a comment cannot + * count and a position in it is a position in the source. "https://" is not a comment. */ +export function stripJsComments(src) { + const blank = (s) => s.replace(/[^\n]/g, " "); + return src + .replace(/\/\*[\s\S]*?\*\//g, blank) + .replace(/(^|[^:\\"'`])(\/\/[^\n]*)/g, (_, pre, c) => pre + blank(c)); +} + +// A query only a signed-in user can reach (a delete, an editor) may name a private column; it says so +// in a comment inside its chain, e.g. `// signed-in only: deleting is for the comment's author`. +const SIGNED_IN_ONLY = /signed-in only/i; +// One read of projects.metadata may run for a visitor: the fallback of src/lib/projectPublicMetadata.ts, +// made only when project_metadata_public does not exist, i.e. before 20261118120000 is applied, while +// the column is still readable by everyone. It carries this marker, and the site test below holds the +// marker to that one file and to the view-missing check around it. +const BEFORE_ROUND2_ONLY = /before 20261118120000 only/i; +const FALLBACK_FILE = join("src", "lib", "projectPublicMetadata.ts"); + +/** Every .select(...) on one of `objects`: { object, arg, signedInOnly } with arg the text between + * the parens, and signedInOnly whether the chain carries the signed-in-only comment. */ +export function selectsOn(src, objects) { + const code = stripJsComments(src); + const found = []; + const from = /\.from\(\s*["'`]([a-z_]+)["'`]/g; + let m; + while ((m = from.exec(code)) !== null) { + if (!objects.includes(m[1])) continue; + // The chain up to the next .from( (or 800 characters): its first .select( belongs to this from. + const start = m.index + m[0].length; + const rest = code.slice(start); + const next = rest.search(/\.from\(/); + const chain = rest.slice(0, next === -1 ? 800 : Math.min(next, 800)); + const s = chain.search(/\.select\(/); + if (s === -1) continue; + let depth = 0; + let arg = ""; + for (const ch of chain.slice(s + ".select(".length)) { + if (ch === "(") depth += 1; + else if (ch === ")") { if (depth === 0) break; depth -= 1; } + arg += ch; + } + const lineStart = code.lastIndexOf("\n", m.index) + 1; + const raw = src.slice(lineStart, start + s + ".select(".length + arg.length + 1); + found.push({ object: m[1], arg: arg.trim(), signedInOnly: SIGNED_IN_ONLY.test(raw), beforeRound2Only: BEFORE_ROUND2_ONLY.test(raw) }); + } + return found; +} + +/** The first argument of a call's argument text: up to the first comma outside brackets and quotes. */ +export function firstArg(arg) { + let depth = 0; + let quote = null; + for (let i = 0; i < arg.length; i += 1) { + const ch = arg[i]; + if (quote) { if (ch === quote) quote = null; continue; } + if (ch === '"' || ch === "'" || ch === "`") quote = ch; + else if ("([{".includes(ch)) depth += 1; + else if (")]}".includes(ch)) depth -= 1; + else if (ch === "," && depth === 0) return arg.slice(0, i).trim(); + } + return arg.trim(); +} + +/** What is wrong with one select on a column-restricted object, or null. `consts` resolves a + * `const NAME = "..."` column list defined in the same file. */ +export function selectProblem({ arg, signedInOnly }, privateCols, consts = new Map()) { + if (arg === "") return "select() asks for every column"; + let first = firstArg(arg); // .select("...", { count, head }) has options after + if (consts.has(first)) first = consts.get(first); + // Even a signed-in-only query must not use "*": the same code is one refactor away from a visitor. + if (/^["'`]\s*\*\s*["'`]$/.test(first)) return 'select("*") asks for every column'; + // A plain list (one string literal, not chosen by a sign-in check) runs for visitors too. + const literal = first.match(/^["'`]([^"'`]*)["'`]$/); + if (literal && !signedInOnly) { + const named = literal[1].split(",").map((c) => c.trim().split(/[\s:(!]/)[0]); + const bad = named.filter((c) => privateCols.has(c)); + if (bad.length) return `names ${bad.join(", ")}, which anon may not read`; + } + return null; +} + +/** `const NAME = "literal"` definitions in a file, for column lists kept in a constant. */ +export function stringConsts(src) { + const out = new Map(); + for (const [, name, lit] of stripJsComments(src).matchAll(/\bconst\s+([A-Za-z_$][\w$]*)\s*=\s*("[^"\n]*"|'[^'\n]*')\s*(?:as\s+const\s*)?;/g)) { + out.set(name, lit); + } + return out; +} + +const walk = (dir, exts) => + readdirSync(dir).flatMap((n) => { + const p = join(dir, n); + if (statSync(p).isDirectory()) return n === "node_modules" ? [] : walk(p, exts); + return exts.includes(extname(p)) ? [p] : []; + }); + +test("the detector finds select(*), select() and obj(*), and passes named public columns", () => { + const priv = new Set(["created_by"]); + const on = (src) => selectsOn(src, ["resources"]).map((s) => selectProblem(s, priv, stringConsts(src))); + assert.deepEqual(on(`supabase.from("resources").select("*").eq("id", id)`), ['select("*") asks for every column']); + assert.deepEqual(on(`supabase\n .from("resources" as any)\n .select()\n`), ["select() asks for every column"]); + assert.deepEqual(on(`supabase.from("resources").select("id, created_by")`), ["names created_by, which anon may not read"]); + assert.deepEqual(on(`const COLS = "id, created_by";\nsupabase.from("resources").select(COLS)`), ["names created_by, which anon may not read"]); + assert.deepEqual(on(`supabase.from("resources").select("id, name", { count: "exact", head: true })`), [null]); + assert.deepEqual(on(`supabase.from("resources").select(signedIn ? "id, created_by" : "id")`), [null], + "a list chosen by a sign-in check is the caller's to get right"); + assert.deepEqual(on(`supabase.from("resources")\n // signed-in only: the editor\n .select("id, created_by")`), [null]); + assert.deepEqual(on(`supabase.from("resources")\n // signed-in only\n .select("*")`), ['select("*") asks for every column'], + "never *, signed in or not"); + assert.deepEqual(on(`// supabase.from("resources").select("*")`), [], "a commented-out query does not count"); + assert.deepEqual(on(`supabase.from("grants").select("*")`), [], "other tables are not this guard's business"); + assert.equal(firstArg(`"a, b", { head: true }`), `"a, b"`); +}); + +test(`${FIX} and ${ROUND2} list what they hide, and every listed column is real`, () => { + for (const obj of ["investigators_public", "projects", "resources", "announcements", "entity_comments", + "dandisets", "harvester_relations", "harvester_settings", "feature_suggestions_public"]) { + assert.ok(PRIVATE.has(obj), `${obj} is not in the private list`); + } + assert.ok(PRIVATE.get("investigators_public").has("user_id") && PRIVATE.get("investigators_public").has("pending_role")); + assert.ok(PRIVATE.get("projects").has("metadata"), `${ROUND2} takes projects.metadata from anon`); + assert.deepEqual([...(PRIVATE_FROM_AUTHENTICATED.get("investigators_public") ?? [])].sort(), ["pending_role", "user_id"], + `${ROUND2} takes investigators_public.user_id and .pending_role from signed-in users`); + // A typo here would hide nothing and say nothing, because the migration skips a column that does not + // exist (so it can run before 20261105120000). So: in types.ts (the live schema), or added by a migration. + const types = read("src/integrations/supabase/types.ts"); + const added = readdirSync(MIGRATIONS).filter((f) => f.endsWith(".sql")) + .map((f) => readFileSync(join(MIGRATIONS, f), "utf8")).join("\n"); + const missing = []; + for (const [obj, cols] of mergePrivate(PRIVATE, PRIVATE_FROM_AUTHENTICATED)) { + const block = types.match(new RegExp(`\\n ${obj}: \\{\\n Row: \\{\\n([\\s\\S]*?)\\n \\}`)); + assert.ok(block, `${obj} is not a table or view in types.ts`); + for (const col of cols) { + const inTypes = new RegExp(`\\n ${col}\\??:`).test("\n" + block[1]); + const inMigration = new RegExp(`ADD COLUMN (IF NOT EXISTS )?${col}\\b`, "i").test(added); + if (!inTypes && !inMigration) missing.push(`${obj}.${col}`); + } + } + assert.deepEqual(missing, [], "private columns that exist nowhere (a typo hides nothing)"); +}); + +/** The names a select list (or an embed's inner list) asks for at its own level: `alias:column` is + * the column, `metadata->>key` is metadata, an embed `name(...)` is not a column of this level. */ +export function topLevelColumns(list) { + const items = []; + let depth = 0; + let cur = ""; + for (const ch of list) { + if (ch === "(") depth += 1; + else if (ch === ")") depth -= 1; + if (ch === "," && depth === 0) { items.push(cur); cur = ""; } else cur += ch; + } + items.push(cur); + return items.map((s) => s.trim()).filter((s) => s && !s.includes("(")) + .map((s) => (s.match(/^[A-Za-z_]\w*\s*:(?!:)\s*([A-Za-z_]\w*)/) || s.match(/^([A-Za-z_]\w*)/) || [])[1]) + .filter(Boolean); +} + +/** Every embedded resource in a select list, at any depth: `name(...)`, `alias:name(...)`, + * `name!hint(...)`, as { object, cols } with cols what the embed asks for at its own level. */ +export function embedsIn(list) { + const out = []; + const re = /(?:^|[\s,(])(?:[A-Za-z_]\w*\s*:\s*)?([a-z_]+)(?:\s*!\s*[a-z_]+)?\s*\(/g; + let m; + while ((m = re.exec(list)) !== null) { + const open = m.index + m[0].length; + let depth = 0; + let i = open; + for (; i < list.length; i += 1) { + if (list[i] === "(") depth += 1; + else if (list[i] === ")") { if (depth === 0) break; depth -= 1; } + } + out.push({ object: m[1], cols: topLevelColumns(list.slice(open, i)) }); + re.lastIndex = open; // nested embeds are found on the way on + } + return out; +} + +/** Every .select("literal") in a file, whatever object it is on: { text, signedInOnly }. */ +export function selectLiterals(src) { + const code = stripJsComments(src); + const out = []; + for (const m of code.matchAll(/\.select\(\s*(["'`])((?:(?!\1)[^\\]|\\.)*)\1/g)) { + const raw = src.slice(Math.max(0, m.index - 400), m.index + m[0].length); + out.push({ text: m[2], signedInOnly: SIGNED_IN_ONLY.test(raw) }); + } + return out; +} + +/** What a file does wrong with the columns signed-in users may not read either: a select that names + * one (signed in or not: no sign-in check lets a member read another member's login id), a filter + * or order on one (it needs SELECT on the column just as a select does), a raw REST URL with one. */ +export function hiddenFromSignedInProblems(src, privateAuth = PRIVATE_FROM_AUTHENTICATED) { + const code = stripJsComments(src); + const problems = []; + const objects = [...privateAuth.keys()]; + const from = /\.from\(\s*["'`]([a-z_]+)["'`]/g; + let m; + while ((m = from.exec(code)) !== null) { + if (!objects.includes(m[1])) continue; + const cols = privateAuth.get(m[1]); + const rest = code.slice(m.index + m[0].length); + const next = rest.search(/\.from\(/); + const chain = rest.slice(0, next === -1 ? 800 : Math.min(next, 800)); + const s = chain.match(/\.select\(\s*(["'`])((?:(?!\1)[^\\]|\\.)*)\1/); + if (s) for (const c of topLevelColumns(s[2])) if (cols.has(c)) problems.push(`${m[1]}: selects ${c}`); + // Any other call whose first argument names one: .eq("user_id", ...), .match({ user_id }), + // .or("name.ilike.x,user_id.eq.y"), .order("pending_role"). + for (const [, how, arg] of chain.matchAll(/\.(\w+)\(\s*(\{[^}]*\}|"[^"]*"|'[^']*'|`[^`]*`)/g)) { + if (how === "select") continue; + for (const c of cols) if (new RegExp(`\\b${c}\\b`).test(arg)) problems.push(`${m[1]}: .${how}() on ${c}`); + } + } + for (const obj of objects) { + for (const [, query] of code.matchAll(new RegExp(`${obj}\\?([^"'\`\\s]*)`, "g"))) { + for (const col of privateAuth.get(obj)) { + if (new RegExp(`(^|[=&,(])${col}\\b`).test(query)) problems.push(`${obj}: REST ${col}`); + } + } + } + return problems; +} + +test("the embed, filter and signed-in detectors find what they should", () => { + assert.deepEqual(topLevelColumns("id, name:full_name, metadata->>repoUrl, grants(title, abstract)"), ["id", "full_name", "metadata"]); + assert.deepEqual(embedsIn("grant_number, projects(id, metadata), dandiset:dandisets!inner(id, raw)"), + [{ object: "projects", cols: ["id", "metadata"] }, { object: "dandisets", cols: ["id", "raw"] }]); + assert.deepEqual(embedsIn("id, grants(title, projects(metadata))").map((e) => e.object), ["grants", "projects"]); + assert.deepEqual(selectLiterals(`supabase.from("grants").select("id, projects(metadata)")`), [{ text: "id, projects(metadata)", signedInOnly: false }]); + const auth = new Map([["investigators_public", new Set(["user_id", "pending_role"])]]); + const on = (src) => hiddenFromSignedInProblems(src, auth); + assert.deepEqual(on(`supabase.from("investigators_public").select("id, name").eq("id", x)`), []); + assert.deepEqual(on(`supabase.from("investigators_public")\n // signed-in only\n .select("id, user_id")`), + ["investigators_public: selects user_id"], "no sign-in check makes another member's login id readable"); + assert.deepEqual(on(`supabase.from("investigators_public").select("id").eq("user_id", user.id)`), + ["investigators_public: .eq() on user_id"]); + assert.deepEqual(on(`supabase.from("investigators_public").select("id").not("pending_role", "is", null)`), + ["investigators_public: .not() on pending_role"]); + assert.deepEqual(on(`supabase.from("investigators_public").select("id").or(\`name.ilike.%x%,user_id.eq.\${u}\`)`), + ["investigators_public: .or() on user_id"]); + assert.deepEqual(on(`supabase.from("investigators_public").select("id").match({ user_id: u })`), + ["investigators_public: .match() on user_id"]); + assert.deepEqual(on(`supabase.from("investigators").select("user_id, pending_role").eq("user_id", u)`), [], + "the base table, under its RLS, is where they are read"); + assert.deepEqual(on("fetch(`${URL}/rest/v1/investigators_public?select=id,name&user_id=eq.${u}`)"), ["investigators_public: REST user_id"]); + assert.deepEqual(on("kgGet(`investigators_public?id=in.(${ids})&select=id,name`)"), []); +}); + +test("the site and the e2e checks never ask a column-restricted object for every column", () => { + const files = [...walk(join(ROOT, "src"), [".ts", ".tsx"]), ...walk(join(ROOT, "e2e"), [".ts"])] + .filter((p) => !p.endsWith(join("supabase", "types.ts"))); + const problems = []; + for (const p of files) { + const src = readFileSync(p, "utf8"); + const consts = stringConsts(src); + for (const s of selectsOn(src, OBJECTS)) { + if (s.beforeRound2Only) { + // allowed once: the fallback read, in its own file, inside the view-missing branch + const where = relative(ROOT, p); + const gated = /if \(viewMissing\(error\)\) \{[\s\S]*before 20261118120000 only/.test(src); + if (where !== FALLBACK_FILE || s.object !== "projects" || !gated) { + problems.push(`${where}: ${s.object} carries the before-20261118120000 marker, which is only for the view-missing fallback in ${FALLBACK_FILE}`); + } + continue; + } + const why = selectProblem(s, PRIVATE.get(s.object), consts); + if (why) problems.push(`${relative(ROOT, p)}: ${s.object} ${why}`); + } + const code = stripJsComments(src); + for (const [, obj] of code.matchAll(/[\s,"'`(:]([a-z_]+)(?:!inner|!left)?\(\s*\*\s*\)/g)) { + if (PRIVATE.has(obj)) problems.push(`${relative(ROOT, p)}: embeds ${obj}(*)`); + } + // An embed of one of these objects in another object's select runs for visitors too. + for (const sel of selectLiterals(src)) { + if (sel.signedInOnly) continue; + for (const e of embedsIn(sel.text)) { + for (const c of e.cols) if (PRIVATE.get(e.object)?.has(c)) problems.push(`${relative(ROOT, p)}: embeds ${e.object}(${c}), which anon may not read`); + } + } + // selectWithOptionalColumns (src/lib/optionalColumns.ts) builds the select itself, from two + // literal lists (tests/guards/optional-columns holds them literal): they are column lists too, + // for visitors and for signed-in users alike. + for (const [, obj, req, opt] of code.matchAll(/selectWithOptionalColumns(?:<[^>(]*>)?\(\s*["'`]([a-z_]+)["'`]\s*,\s*["'`]([^"'`]*)["'`]\s*,\s*\[([^\]]*)\]/g)) { + const named = [...req.split(","), ...[...opt.matchAll(/["'`]([^"'`]+)["'`]/g)].map((x) => x[1])] + .map((c) => c.trim().split(/[\s:(!]/)[0]); + const hidden = new Set([...(PRIVATE.get(obj) ?? []), ...(PRIVATE_FROM_AUTHENTICATED.get(obj) ?? [])]); + const bad = named.filter((c) => hidden.has(c)); + if (bad.length) problems.push(`${relative(ROOT, p)}: ${obj} names ${bad.join(", ")} through selectWithOptionalColumns, which is hidden`); + } + // A raw REST call: select=* on one of these objects, or on a table named by a variable. + for (const [, table] of code.matchAll(/\/rest\/v1\/([a-z_]+|\$\{[^}]+\})\?(?:[^"'`\s]*&)?select=\*/g)) { + if (PRIVATE.has(table) || table.startsWith("${")) problems.push(`${relative(ROOT, p)}: REST select=* on ${table}`); + } + } + assert.deepEqual(problems, [], + "anon may read only named public columns of these objects (20261117190000, 20261118120000): select=* is " + + "refused for every visitor. Name the columns; a private one only behind a sign-in check. A visitor reads " + + "the public questionnaire keys from project_metadata_public (src/lib/projectPublicMetadata.ts)."); +}); + +test("no code path, signed in or not, reads a column hidden from signed-in users", () => { + const files = [...walk(join(ROOT, "src"), [".ts", ".tsx"]), ...walk(join(ROOT, "e2e"), [".ts"]), + ...walk(join(ROOT, "supabase", "functions"), [".ts"])].filter((p) => !p.endsWith(join("supabase", "types.ts"))); + const problems = files.flatMap((p) => hiddenFromSignedInProblems(readFileSync(p, "utf8")).map((x) => `${relative(ROOT, p)}: ${x}`)); + assert.deepEqual(problems, [], + "investigators_public.user_id and .pending_role are hidden from signed-in users too (20261118120000): " + + "the person, curators and admins read them from public.investigators, whose RLS decides the rows."); +}); + +/** The keys of projects.metadata the latest definition of project_metadata_public carries: + * { keys, deviceKeys }. */ +export function publicMetadataKeys(sql) { + const at = sql.search(/create\s+or\s+replace\s+view\s+public\.project_metadata_public\b/i); + assert.ok(at >= 0, "no CREATE OR REPLACE VIEW public.project_metadata_public"); + const view = sql.slice(at, sql.indexOf(";", at)); + const list = (re) => [...(view.match(re)?.[1] ?? "").matchAll(/'([a-z0-9_]+)'/g)].map((x) => x[1]); + return { keys: new Set(list(/\be\.key\s+IN\s*\(([^)]*)\)/i)), deviceKeys: new Set(list(/\bd\.key\s+IN\s*\(([^)]*)\)/i)) }; +} + +test("every questionnaire key a public page reads is one project_metadata_public carries", () => { + const defining = readdirSync(MIGRATIONS).filter((f) => f.endsWith(".sql")).sort() + .filter((f) => /view\s+public\.project_metadata_public\b/i.test(readFileSync(join(MIGRATIONS, f), "utf8"))); + assert.ok(defining.length, "no migration defines public.project_metadata_public"); + const { keys, deviceKeys } = publicMetadataKeys(readFileSync(join(MIGRATIONS, defining.at(-1)), "utf8").replace(/\r\n/g, "\n")); + assert.ok(keys.size >= 20 && deviceKeys.size >= 4, `could not read the view's key lists (${keys.size}, ${deviceKeys.size})`); + const marr = read("src/components/entity-summary/summaries/GrantMarrSection.tsx"); + const block = (name) => marr.match(new RegExp(`const ${name} = \\[([\\s\\S]*?)\\];`))?.[1] ?? ""; + const fieldKeys = (name) => [...block(name).matchAll(/\b(?:key|projectKey):\s*"([a-z0-9_]+)"/g)].map((x) => x[1]); + const read_ = { + "GrantMarrSection MARR_FIELDS": fieldKeys("MARR_FIELDS"), + "GrantMarrSection ARRAY_FIELDS": fieldKeys("ARRAY_FIELDS"), + "GrantMarrSection metadata.<key>": [...marr.matchAll(/\bmetadata\.([a-z0-9_]+)/g)].map((x) => x[1]), + "useMarrProjects md.<key>": [...read("src/hooks/useMarrProjects.ts").matchAll(/\bmd\.([a-z0-9_]+)/g)].map((x) => x[1]), + "GrantSummary metadata?.<key>": [...read("src/components/entity-summary/summaries/GrantSummary.tsx") + .matchAll(/\.metadata as any\)\??\.([a-z0-9_]+)/g)].map((x) => x[1]), + }; + assert.ok(read_["GrantMarrSection MARR_FIELDS"].length >= 7 && read_["useMarrProjects md.<key>"].length >= 5, + "could not read the keys the public pages use"); + const missing = Object.entries(read_).flatMap(([where, ks]) => ks.filter((k) => !keys.has(k)).map((k) => `${where}: ${k}`)); + for (const k of fieldKeys("DEVICE_FIELDS")) if (!deviceKeys.has(k)) missing.push(`GrantMarrSection DEVICE_FIELDS: devices.${k}`); + assert.deepEqual(missing, [], + "a public page reads a questionnaire key a visitor cannot see. Add it to project_metadata_public in a new " + + "migration (CREATE OR REPLACE VIEW, the same three columns), if it is meant to be public."); +}); + +/** A `export const <name> = [ "a", "b", ... ] as const;` list in a TypeScript source. */ +export function exportedStringList(src, name) { + const body = stripJsComments(src).match(new RegExp(`export const ${name}\\s*=\\s*\\[([\\s\\S]*?)\\]\\s*as const`)); + assert.ok(body, `could not read ${name}`); + return [...body[1].matchAll(/["'`]([a-z0-9_]+)["'`]/g)].map((x) => x[1]); +} + +/** The helper as a module, with a stand-in for the Supabase client. `answer(object)` is what a read of + * that object returns; the result's `asked` lists every read made. */ +async function helperWith(answer) { + const asked = []; + const client = { + from: (object) => ({ + select: (cols) => { + const call = { object, cols, in: null }; + asked.push(call); + const query = { + in: (col, values) => { call.in = [col, values]; return query; }, + then: (ok, no) => Promise.resolve(answer(object)).then(ok, no), + }; + return query; + }, + }), + }; + const key = `__publicMetadataFake${asked.length}_${Math.random().toString(36).slice(2)}`; + globalThis[key] = client; + const js = stripTypeScriptTypes(read("src/lib/projectPublicMetadata.ts").replace(/import \{ supabase \}[^\n]*\n/, "")); + const mod = await import("data:text/javascript," + encodeURIComponent(`const supabase = globalThis.${key};\n${js}`)); + return { mod, asked }; +} + +test("before round two is applied, a visitor is shown exactly what project_metadata_public would show", async () => { + const helper = read("src/lib/projectPublicMetadata.ts"); + const defining = readdirSync(MIGRATIONS).filter((f) => f.endsWith(".sql")).sort() + .filter((f) => /view\s+public\.project_metadata_public\b/i.test(readFileSync(join(MIGRATIONS, f), "utf8"))); + const { keys, deviceKeys } = publicMetadataKeys(readFileSync(join(MIGRATIONS, defining.at(-1)), "utf8").replace(/\r\n/g, "\n")); + assert.deepEqual(exportedStringList(helper, "PUBLIC_METADATA_KEYS").sort(), [...keys].sort(), + "PUBLIC_METADATA_KEYS (src/lib/projectPublicMetadata.ts) and the view's e.key IN (...) list differ: the " + + "page would show one thing before the migration and another after it. Change both, the view in a new migration."); + assert.deepEqual(exportedStringList(helper, "PUBLIC_DEVICE_KEYS").sort(), [...deviceKeys].sort(), + "PUBLIC_DEVICE_KEYS and the view's d.key IN (...) list differ"); + + const full = { + marr_l1_ethological_goal: "foraging", data_modalities: ["video"], curator_note: "not for visitors", + contact_email: "someone@example.org", + devices: { sensor: ["camera"], behavioral_rigs: [], vendor_quote: "not for visitors" }, + }; + const viewRows = [{ grant_number: "R01X", metadata: { marr_l1_ethological_goal: "foraging" } }]; + + // The view exists: it is the only read, and its rows are used as they are. + let { mod, asked } = await helperWith((object) => object === "project_metadata_public" + ? { data: viewRows, error: null } : { data: [{ grant_number: "R01X", metadata: full }], error: null }); + let got = await mod.fetchPublicProjectMetadata(["R01X"]); + assert.deepEqual(asked.map((a) => a.object), ["project_metadata_public"], "the table is not read when the view exists"); + assert.deepEqual(asked[0].in, ["grant_number", ["R01X"]]); + assert.deepEqual(got.get("R01X"), { marr_l1_ethological_goal: "foraging" }); + + // The view is missing (PostgREST PGRST205, Postgres 42P01): the column is read once and cut down. + for (const code of ["PGRST205", "42P01"]) { + ({ mod, asked } = await helperWith((object) => object === "project_metadata_public" + ? { data: null, error: { code, message: "Could not find the table 'public.project_metadata_public' in the schema cache" } } + : { data: [{ grant_number: "R01X", metadata: full }, { grant_number: "R01Y", metadata: { devices: "n/a", curator_note: "x" } }, + { grant_number: "R01Z", metadata: null }, { grant_number: null, metadata: full }], error: null })); + got = await mod.fetchPublicProjectMetadata(); + assert.deepEqual(asked.map((a) => [a.object, a.cols]), [["project_metadata_public", "grant_number, metadata"], ["projects", "grant_number, metadata"]], code); + assert.deepEqual(got.get("R01X"), { marr_l1_ethological_goal: "foraging", data_modalities: ["video"], devices: { sensor: ["camera"], behavioral_rigs: [] } }, + "the fallback returns the public keys only, and under devices the public device keys only"); + assert.deepEqual(got.get("R01Y"), { devices: null }, "devices that is not an object is null, as in the view"); + assert.deepEqual(got.get("R01Z"), {}); + assert.equal(got.size, 3, "a project without a grant number is left out, as with the view"); + assert.ok(!JSON.stringify([...got]).includes("not for visitors") && !JSON.stringify([...got]).includes("example.org")); + } + + // The filter by grant number is applied to the fallback read as well. + ({ mod, asked } = await helperWith((object) => object === "project_metadata_public" + ? { data: null, error: { code: "PGRST205", message: "missing" } } : { data: [], error: null })); + await mod.fetchPublicProjectMetadata(["R01X", "R01Y"]); + assert.deepEqual(asked.map((a) => a.in), [["grant_number", ["R01X", "R01Y"]], ["grant_number", ["R01X", "R01Y"]]]); + + // Any other refusal of the view is not a reason to read the table: nothing is shown. + ({ mod, asked } = await helperWith((object) => object === "project_metadata_public" + ? { data: null, error: { code: "42501", message: "permission denied for view project_metadata_public" } } + : { data: [{ grant_number: "R01X", metadata: full }], error: null })); + got = await mod.fetchPublicProjectMetadata(); + assert.deepEqual(asked.map((a) => a.object), ["project_metadata_public"], "only a missing view starts the fallback"); + assert.equal(got.size, 0); + + // The fallback itself refused (the column is closed, the view is not there): empty, not an error. + ({ mod, asked } = await helperWith((object) => object === "project_metadata_public" + ? { data: null, error: { code: "PGRST205", message: "missing" } } + : { data: null, error: { code: "42501", message: "permission denied for table projects" } })); + got = await mod.fetchPublicProjectMetadata(); + assert.equal(got.size, 0); + + // No projects asked for: no read at all. + ({ mod, asked } = await helperWith(() => ({ data: [], error: null }))); + assert.equal((await mod.fetchPublicProjectMetadata([])).size, 0); + assert.equal(asked.length, 0); +}); + +test("the KG exporter reads every column-restricted object it uses through PUBLIC_COLUMNS, with no private column", () => { + const py = read("kg/bbqs_kg.py"); + const block = py.match(/^PUBLIC_COLUMNS = \{([\s\S]*?)^\}/m); + assert.ok(block, "kg/bbqs_kg.py has no PUBLIC_COLUMNS"); + const lists = new Map(); + for (const [, obj, body] of block[1].matchAll(/"([a-z_]+)":\s*((?:"[^"]*"\s*)+),?/g)) { + lists.set(obj, body.replace(/"\s*"/g, "").replace(/"/g, "").split(",").map((c) => c.trim()).filter(Boolean)); + } + assert.match(py, /if select == "\*":\s*\n\s*select = PUBLIC_COLUMNS\.get\(table, "\*"\)/, + "fetch() must turn the default select=* into PUBLIC_COLUMNS"); + const problems = []; + for (const [obj, cols] of lists) { + if (!PRIVATE.has(obj)) problems.push(`PUBLIC_COLUMNS["${obj}"]: not column-restricted, needs no list`); + else for (const c of cols) if (PRIVATE.get(obj).has(c)) problems.push(`PUBLIC_COLUMNS["${obj}"] names ${c}`); + } + // Every column-restricted object read with the default select: by the exporter, and by roundtrip.py. + const fetched = new Set([...py.matchAll(/self\.fetch\("([a-z_]+)"\)/g)].map((m) => m[1])); + const tables = read("kg/roundtrip.py").match(/^TABLES = \[([\s\S]*?)\]/m); + assert.ok(tables, "kg/roundtrip.py has no TABLES list"); + for (const [, t] of tables[1].matchAll(/"([a-z_]+)"/g)) fetched.add(t); + for (const obj of fetched) if (PRIVATE.has(obj) && !lists.has(obj)) problems.push(`${obj} is read with select=* and has no PUBLIC_COLUMNS`); + assert.deepEqual(problems, []); +}); + +/** What a migration after FIX (after ROUND2, for `authenticated`) does wrong with the columns hidden + * from `role`, as a list of messages. */ +export function laterMigrationProblems(file, sqlText, privateMap = PRIVATE, role = "anon") { + const sql = sqlText.replace(/\r\n/g, "\n"); + const code = sql.replace(/\/\*[\s\S]*?\*\//g, " ").replace(/--[^\n]*/g, " "); + const since = role === "anon" ? FIX : ROUND2; + const problems = []; + for (const [, cols, obj, to] of code.matchAll(/\bgrant\s+(?:select|all(?:\s+privileges)?)\s*(\([^)]*\))?\s+on\s+(?:table\s+)?(?:public\.)?"?([a-z_]+)"?\s+to\s+([^;]+);/gi)) { + const o = obj.toLowerCase(); + if (!privateMap.has(o) || !new RegExp(`\\b${role}\\b|\\bpublic\\b`, "i").test(to)) continue; + if (!cols) { problems.push(`${file}: grants ${role} all of ${o}`); continue; } + for (const c of cols.slice(1, -1).split(",").map((x) => x.trim().replace(/"/g, ""))) { + if (privateMap.get(o).has(c)) problems.push(`${file}: grants ${role} ${o}.${c}`); + } + } + // A redefined view keeps its column grants, so a column it appends is hidden from the role until granted. + for (const [, view] of code.matchAll(/\bcreate\s+or\s+replace\s+view\s+(?:public\.)?"?([a-z_]+)"?/gi)) { + const v = view.toLowerCase(); + if (!privateMap.has(v)) continue; + const granted = new RegExp(`grant\\s+select\\s*\\([^)]*\\)\\s+on\\s+(?:table\\s+)?(?:public\\.)?${v}\\s+to\\s+[^;]*\\b${role}\\b`, "i").test(code); + if (!granted && !new RegExp(`private from ${role}:`, "i").test(sql)) { + problems.push(`${file}: redefines ${v} without GRANT SELECT (<new columns>) ON public.${v} TO ${role} ` + + `or a comment "-- private from ${role}: <columns>" (${role} reads ${v} column by column since ${since})`); + } + } + // A column added to one of these objects is hidden from the role until granted: say which it is meant to be. + for (const [, obj, list] of code.matchAll(/\balter\s+table\s+(?:if\s+exists\s+)?(?:only\s+)?(?:public\.)?"?([a-z_]+)"?\s+([^;]*?\badd\s+column[^;]*);/gi)) { + const o = obj.toLowerCase(); + if (!privateMap.has(o)) continue; + for (const [, col] of list.matchAll(/\badd\s+column\s+(?:if\s+not\s+exists\s+)?"?([a-z_]+)"?/gi)) { + const granted = new RegExp(`grant\\s+select\\s*\\([^)]*\\b${col}\\b[^)]*\\)\\s+on\\s+(?:table\\s+)?(?:public\\.)?${o}\\s+to\\s+[^;]*\\b${role}\\b`, "i").test(code); + const declared = new RegExp(`private from ${role}:[^\\n]*\\b${col}\\b`, "i").test(sql); + if (!granted && !declared) { + problems.push(`${file}: adds ${o}.${col} without GRANT SELECT (${col}) ON public.${o} TO ${role} ` + + `or a comment "-- private from ${role}: ${col}"`); + } + } + } + return problems; +} + +test("the migration check finds a grant back, an unexplained new column and an unexplained redefinition", () => { + const priv = new Map([["projects", new Set(["last_edited_by"])], ["investigators_public", new Set(["user_id"])]]); + const on = (sql) => laterMigrationProblems("x.sql", sql, priv); + assert.deepEqual(on("GRANT SELECT ON public.projects TO anon;"), ["x.sql: grants anon all of projects"]); + assert.deepEqual(on("GRANT SELECT (id, last_edited_by) ON public.projects TO anon, authenticated;"), + ["x.sql: grants anon projects.last_edited_by"]); + assert.deepEqual(on("GRANT SELECT ON public.grants TO anon;"), [], "other tables are not this guard's business"); + assert.equal(on("ALTER TABLE public.projects ADD COLUMN IF NOT EXISTS foo text;").length, 1); + assert.deepEqual(on("ALTER TABLE public.projects ADD COLUMN foo text;\nGRANT SELECT (foo) ON public.projects TO anon;"), []); + assert.deepEqual(on("-- private from anon: foo\nALTER TABLE public.projects ADD COLUMN foo text;"), []); + assert.deepEqual(on("-- GRANT SELECT ON public.projects TO anon;"), [], "a commented-out grant does not count"); + assert.equal(on("CREATE OR REPLACE VIEW public.investigators_public AS SELECT id FROM public.investigators;").length, 1); + assert.deepEqual(on("CREATE OR REPLACE VIEW public.investigators_public AS SELECT id, x FROM public.investigators;\n" + + "GRANT SELECT (x) ON public.investigators_public TO anon;"), []); + // The same for signed-in users and the columns hidden from them. + const forAuth = (sql) => laterMigrationProblems("y.sql", sql, priv, "authenticated"); + assert.deepEqual(forAuth("GRANT SELECT ON public.investigators_public TO authenticated;"), ["y.sql: grants authenticated all of investigators_public"]); + assert.deepEqual(forAuth("GRANT SELECT (id, user_id) ON public.investigators_public TO authenticated;"), + ["y.sql: grants authenticated investigators_public.user_id"]); + assert.deepEqual(forAuth("GRANT SELECT (id, user_id) ON public.investigators_public TO service_role;"), []); + assert.equal(forAuth("CREATE OR REPLACE VIEW public.investigators_public AS SELECT id, x FROM public.investigators;\n" + + "GRANT SELECT (x) ON public.investigators_public TO anon;").length, 1, "anon's grant says nothing about signed-in users"); +}); + +test("no later migration opens a private column to anon or to signed-in users, and a new column on these objects says who reads it", () => { + const files = readdirSync(MIGRATIONS).filter((f) => f.endsWith(".sql")).sort(); + const problems = [ + ...files.filter((f) => f > FIX).flatMap((file) => laterMigrationProblems(file, readFileSync(join(MIGRATIONS, file), "utf8"))), + ...files.filter((f) => f > ROUND2).flatMap((file) => + laterMigrationProblems(file, readFileSync(join(MIGRATIONS, file), "utf8"), PRIVATE_FROM_AUTHENTICATED, "authenticated")), + ]; + assert.deepEqual(problems, []); +}); diff --git a/tests/guards/function-execute-grants.test.mjs b/tests/guards/function-execute-grants.test.mjs new file mode 100644 index 00000000..802c74b9 --- /dev/null +++ b/tests/guards/function-execute-grants.test.mjs @@ -0,0 +1,183 @@ +// Guard: every function a migration creates in schema public says who may run it. +// +// WHY (2026-11-18). PostgreSQL grants EXECUTE on a new function to PUBLIC, and Supabase's default +// privileges grant it to anon and authenticated by name as well, so nothing decides who may call a +// function, and a SECURITY DEFINER one runs past row-level security. On a replica of this schema, +// 100 of the 107 functions in public were executable by anon, among them record_investigator_alias +// (anyone could add their own address to a member's record, and globus-auth then signs that address +// in as the member) and check_onboard_conflicts (any member's e-mail address, given the name). +// 20261118120000_privacy_round_two gave every function a tier. This guard keeps the next one from +// arriving open: +// * every CREATE [OR REPLACE] FUNCTION public.<f> in a migration from 20261118120000 on comes with, +// in the same file, a REVOKE of EXECUTE (or ALL) on <f> FROM PUBLIC (anon holds what PUBLIC +// holds), and, for anon and for authenticated each, a REVOKE that names the role or a GRANT +// EXECUTE on <f> TO it. CREATE OR REPLACE keeps an existing function's grants, but a changed +// argument list makes a new function with the defaults again, so every definition says it; +// * 20261118120000's kg_function_access names every function an earlier migration defines and has +// not dropped since, once, with a tier, so the audit covers them all. +// For a function only signed-in users run: +// REVOKE ALL ON FUNCTION public.f(uuid) FROM PUBLIC, anon; +// GRANT EXECUTE ON FUNCTION public.f(uuid) TO authenticated, service_role; +// For one only the owner and the service role run (a trigger function, a maintenance helper): +// REVOKE ALL ON FUNCTION public.f() FROM PUBLIC, anon, authenticated; +// GRANT EXECUTE ON FUNCTION public.f() TO service_role; +// A trigger fires whatever its function's grants (checked on the replica), but a function an invoker +// trigger calls, an index expression, an RLS policy or a view runs as the role that evaluates it: +// see the header of 20261118120000 before taking EXECUTE from a role. +import { test } from "node:test"; +import assert from "node:assert/strict"; +import { readFileSync, readdirSync } from "node:fs"; +import { join, dirname } from "node:path"; +import { fileURLToPath } from "node:url"; + +const ROOT = join(dirname(fileURLToPath(import.meta.url)), "..", ".."); +const MIGRATIONS = join(ROOT, "supabase", "migrations"); +const FIX = "20261118120000_privacy_round_two.sql"; +const ROLES = ["anon", "authenticated"]; + +/** SQL with comments removed (CRLF-safe), so a commented-out CREATE, REVOKE or GRANT does not count. */ +export function stripComments(sql) { + return sql.replace(/\r\n/g, "\n").replace(/\/\*[\s\S]*?\*\//g, " ").replace(/--[^\n]*/g, " "); +} + +const IDENT = String.raw`"?([A-Za-z_][\w$]*)"?`; + +/** Functions in schema public that a migration creates or drops, in file order: { op, name, at }. */ +export function functionEvents(sql) { + const code = stripComments(sql); + const out = []; + const create = new RegExp(String.raw`\bcreate\s+(?:or\s+replace\s+)?function\s+(?:${IDENT}\s*\.\s*)?${IDENT}\s*\(`, "gi"); + for (const m of code.matchAll(create)) { + const schema = (m[1] ?? "public").toLowerCase(); + if (schema === "public") out.push({ op: "create", name: m[2].toLowerCase(), at: m.index }); + } + const drop = /\bdrop\s+function\s+(?:if\s+exists\s+)?([^;]+);/gi; + for (const m of code.matchAll(drop)) { + for (const item of splitTopLevel(m[1])) { + const n = item.trim().match(new RegExp(String.raw`^(?:${IDENT}\s*\.\s*)?${IDENT}`)); + if (n && (n[1] ?? "public").toLowerCase() === "public") out.push({ op: "drop", name: n[2].toLowerCase(), at: m.index }); + } + } + return out.sort((a, b) => a.at - b.at); +} + +/** Split on commas outside parentheses. */ +export function splitTopLevel(text) { + const out = []; + let depth = 0; + let cur = ""; + for (const ch of text) { + if (ch === "(") depth += 1; + else if (ch === ")") depth -= 1; + if (ch === "," && depth === 0) { out.push(cur); cur = ""; } else cur += ch; + } + if (cur.trim()) out.push(cur); + return out; +} + +/** Every GRANT / REVOKE on functions in a migration: { kind, privileges, names (null = every function + * in schema public), grantees }. */ +export function functionPrivilegeStatements(sql) { + const code = stripComments(sql); + const out = []; + const re = /\b(grant|revoke)\s+((?:grant\s+option\s+for\s+)?[\w\s,]+?)\s+on\s+(all\s+(?:functions|routines)\s+in\s+schema|functions?|routines?|procedures?)\s+([\s\S]*?)\s+(?:from|to)\s+([^;]+);/gi; + for (const m of code.matchAll(re)) { + const privileges = m[2].toLowerCase().replace(/grant\s+option\s+for\s+/, "").split(/\s*,\s*/).map((p) => p.trim()); + if (!privileges.some((p) => p === "execute" || p === "all" || p === "all privileges")) continue; + const every = /^all\s/i.test(m[3]); + if (every && !/^\s*"?public"?\s*$/i.test(m[4])) continue; + const names = every ? null : splitTopLevel(m[4]).map((item) => { + const n = item.trim().match(new RegExp(String.raw`^(?:${IDENT}\s*\.\s*)?${IDENT}`)); + return n && (n[1] ?? "public").toLowerCase() === "public" ? n[2].toLowerCase() : null; + }).filter(Boolean); + const grantees = m[5].toLowerCase().replace(/\s+(cascade|restrict|granted\s+by[\s\S]*|with\s+grant\s+option)\s*$/i, "") + .split(/\s*,\s*/).map((g) => g.trim().replace(/"/g, "")); + out.push({ kind: m[1].toLowerCase(), names, grantees }); + } + return out; +} + +/** What a migration does wrong: each public function it creates without saying who may run it. */ +export function executeProblems(file, sql) { + const created = [...new Set(functionEvents(sql).filter((e) => e.op === "create").map((e) => e.name))]; + const stmts = functionPrivilegeStatements(sql); + const covers = (s, name) => s.names === null || s.names.includes(name); + const problems = []; + for (const name of created) { + const revoked = (role) => stmts.some((s) => s.kind === "revoke" && covers(s, name) && s.grantees.includes(role)); + const granted = (role) => stmts.some((s) => s.kind === "grant" && covers(s, name) && s.grantees.includes(role)); + const missing = []; + if (!revoked("public")) missing.push("REVOKE ... FROM PUBLIC"); + for (const role of ROLES) if (!revoked(role) && !granted(role)) missing.push(`a REVOKE from or GRANT EXECUTE to ${role}`); + if (missing.length) problems.push(`${file}: public.${name} has no ${missing.join(", no ")}`); + } + return problems; +} + +/** fn_name -> tier, from 20261118120000's kg_function_access rows. */ +export function functionTiers(sql) { + const start = sql.indexOf("INSERT INTO kg_function_access"); + assert.ok(start >= 0, `${FIX} has no INSERT INTO kg_function_access`); + const block = sql.slice(start, sql.indexOf(";\n", start)); + const rows = [...block.matchAll(/^\s*\('([a-z_0-9]+)',\s*'([a-z]+)',\s*'/gm)].map((m) => [m[1], m[2]]); + return rows; +} + +test("the detector finds a function that does not say who may run it, and passes one that does", () => { + const fn = "CREATE OR REPLACE FUNCTION public.f(_x uuid) RETURNS boolean LANGUAGE sql AS $$ SELECT true $$;\n"; + assert.deepEqual(executeProblems("x.sql", fn), + ["x.sql: public.f has no REVOKE ... FROM PUBLIC, no a REVOKE from or GRANT EXECUTE to anon, no a REVOKE from or GRANT EXECUTE to authenticated"]); + assert.deepEqual(executeProblems("x.sql", fn + "REVOKE ALL ON FUNCTION public.f(uuid) FROM PUBLIC, anon;\n" + + "GRANT EXECUTE ON FUNCTION public.f(uuid) TO authenticated, service_role;"), []); + assert.deepEqual(executeProblems("x.sql", fn + "REVOKE EXECUTE ON FUNCTION public.f(uuid) FROM anon, authenticated;"), + ["x.sql: public.f has no REVOKE ... FROM PUBLIC"], "anon holds what PUBLIC holds: PUBLIC must go too"); + assert.deepEqual(executeProblems("x.sql", fn + "REVOKE ALL ON FUNCTION public.f(uuid) FROM PUBLIC;"), + ["x.sql: public.f has no a REVOKE from or GRANT EXECUTE to anon, no a REVOKE from or GRANT EXECUTE to authenticated"], + "Supabase grants anon and authenticated by name: a REVOKE from PUBLIC leaves them"); + assert.deepEqual(executeProblems("x.sql", fn + "REVOKE ALL ON FUNCTION public.f(uuid) FROM PUBLIC, anon, authenticated;\n" + + "GRANT EXECUTE ON FUNCTION public.f(uuid) TO service_role;"), []); + assert.deepEqual(executeProblems("x.sql", fn + "REVOKE ALL ON FUNCTION public.g(uuid), public.f(uuid) FROM PUBLIC, anon, authenticated;"), [], + "one statement may name several functions"); + assert.equal(executeProblems("x.sql", fn + "-- REVOKE ALL ON FUNCTION public.f(uuid) FROM PUBLIC, anon, authenticated;").length, 1, + "a commented-out REVOKE does not count"); + assert.deepEqual(executeProblems("x.sql", "CREATE FUNCTION pg_temp.kg_run() RETURNS void LANGUAGE sql AS $$ SELECT 1 $$;"), [], + "a temporary function is the session's own"); + assert.deepEqual(executeProblems("x.sql", "CREATE FUNCTION unqualified() RETURNS int LANGUAGE sql AS $$ SELECT 1 $$;").length, 1, + "an unqualified name is created in public"); + assert.deepEqual(functionEvents("CREATE FUNCTION public.a() ...; DROP FUNCTION IF EXISTS public.a(), b(int);").map((e) => `${e.op} ${e.name}`), + ["create a", "drop a", "drop b"]); +}); + +test(`${FIX} gives every function an earlier migration defines a tier, once`, () => { + const files = readdirSync(MIGRATIONS).filter((f) => f.endsWith(".sql")).sort(); + const live = new Set(); + for (const f of files.filter((x) => x < FIX)) { + for (const e of functionEvents(readFileSync(join(MIGRATIONS, f), "utf8"))) { + if (e.op === "create") live.add(e.name); else live.delete(e.name); + } + } + const rows = functionTiers(readFileSync(join(MIGRATIONS, FIX), "utf8").replace(/\r\n/g, "\n")); + const names = rows.map(([n]) => n); + assert.ok(names.length >= 100, `read ${names.length} rows of kg_function_access`); + assert.deepEqual(names.filter((n, i) => names.indexOf(n) !== i), [], "a function named twice"); + assert.deepEqual(rows.filter(([, t]) => !["anon", "authenticated", "service"].includes(t)), [], "a tier that is not anon, authenticated or service"); + assert.deepEqual([...live].filter((n) => !names.includes(n)).sort(), [], + `functions an earlier migration defines that ${FIX} gives no tier: add each to kg_function_access`); + // A name no other migration mentions, types.ts does not know and DATABASE_DESIGN.md does not record is + // a typo: the run would skip it. (Some functions predate the migrations, e.g. handle_new_user, which + // the design document records, and a trigger function is not in types.ts.) + const types = readFileSync(join(ROOT, "src", "integrations", "supabase", "types.ts"), "utf8"); + const typed = new Set([...(types.match(/\n Functions: \{([\s\S]*?)\n \}/)?.[1] ?? "").matchAll(/\n ([a-z_0-9]+): \{/g)].map((m) => m[1])); + const elsewhere = files.filter((f) => f !== FIX).map((f) => stripComments(readFileSync(join(MIGRATIONS, f), "utf8"))) + .concat(readFileSync(join(ROOT, "DATABASE_DESIGN.md"), "utf8")).join("\n"); + assert.deepEqual(names.filter((n) => !live.has(n) && !typed.has(n) && !new RegExp(`\\b${n}\\s*\\(`).test(elsewhere)), [], + "kg_function_access names a function no migration mentions, types.ts does not know and DATABASE_DESIGN.md does not record"); +}); + +test(`every function a migration from ${FIX} on creates says who may run it`, () => { + const later = readdirSync(MIGRATIONS).filter((f) => f.endsWith(".sql") && f >= FIX).sort(); + const problems = later.flatMap((f) => executeProblems(f, readFileSync(join(MIGRATIONS, f), "utf8"))); + assert.deepEqual(problems, [], + "PostgreSQL gives EXECUTE on a new function to PUBLIC and Supabase to anon and authenticated: say who " + + "may run it, in the same migration (see the header of this guard for the two shapes)."); +}); diff --git a/tests/guards/identity-normalization.test.mjs b/tests/guards/identity-normalization.test.mjs new file mode 100644 index 00000000..6704e77c --- /dev/null +++ b/tests/guards/identity-normalization.test.mjs @@ -0,0 +1,266 @@ +// Guard: an identity key is one rule, and the database, the write paths and the KG checks all use it. +// +// WHY (2026-11-17). A KG reviewer: "if you have something in the KG already, you don't want to +// duplicate it ... link, don't copy; make a decision and stick to it." So each identity key (ORCID, +// DOI, PMID, FON, award number, organization name) has one rule, stated with the vectors that pin it +// down in kg/identity_keys.json, and three implementations; so do the URL fold (compared, no key) +// and the pairing rule's title, preprint and chronology tests: +// SQL public.kg_<key>_key, which the uq_* unique indexes are built on +// (supabase/migrations/*_prevent_duplicates.sql); +// TypeScript supabase/functions/_shared/identity-keys.ts, which the write paths look up by +// before they insert (_shared/kg-write.ts); +// Python kg/identity_keys.py, which kg/quality.py duplicates() and the exporter fold with. +// If the TypeScript fold drifts from the SQL one, a write path misses the record the index then +// refuses (the write fails) or, worse, folds two different records together and reuses the wrong +// one. If the Python fold drifts, the export gate reports duplicates the database cannot see. +// +// This test runs every vector through the TypeScript, runs the vectors the migration's self-test +// block (keys-02) hands to Postgres through the TypeScript as well, and runs every vector through +// kg/identity_keys.py when a Python interpreter is on PATH (CI's ubuntu runner has one; set PYTHON +// to choose one). tests/guards/kg-identity-keys holds the JSON, the schema and the migration's +// vector block together, and kg/ci_check.py checks the Python in the KG gate. +// +// IDENTITY_KEYS_JSON reads the vectors from another file, to check a module before the JSON is in +// the tree. CI never sets it. +import { test } from "node:test"; +import assert from "node:assert/strict"; +import { existsSync, readdirSync, readFileSync } from "node:fs"; +import { join } from "node:path"; +import { spawnSync } from "node:child_process"; +import { fileURLToPath, pathToFileURL } from "node:url"; + +// fileURLToPath, not url.pathname: this repo lives under "MIT Dropbox", and pathname keeps the +// spaces percent-encoded. +const ROOT = fileURLToPath(new URL("../..", import.meta.url)); +const SPEC = process.env.IDENTITY_KEYS_JSON || join(ROOT, "kg", "identity_keys.json"); +const MODULE = join(ROOT, "supabase", "functions", "_shared", "identity-keys.ts"); +const MIGRATIONS = join(ROOT, "supabase", "migrations"); + +function spec() { + assert.ok(existsSync(SPEC), `${SPEC} is missing: it states each identity key's rule and the vectors that pin it down`); + return JSON.parse(readFileSync(SPEC, "utf8")); +} + +async function ts() { + assert.ok(existsSync(MODULE), + "supabase/functions/_shared/identity-keys.ts is missing: the write paths have no copy of the identity keys to look up by"); + return import(pathToFileURL(MODULE).href); +} + +const show = (v) => JSON.stringify(v); +// A vector whose input is a list is the function's arguments: preprint (journal, doi) and chronology +// (preprint year, preprint pmid, preprint doi, published year, published pmid). +const callTs = (I, fn, input) => (Array.isArray(input) ? I[fn](...input) : I[fn](input)); + +test("every vector in kg/identity_keys.json gives its `want` through _shared/identity-keys.ts", async () => { + const I = await ts(); + const bad = []; + let n = 0; + for (const [kind, k] of Object.entries(spec().keys)) { + assert.equal(typeof I[k.ts], "function", `${kind}: identity-keys.ts exports no ${k.ts}()`); + for (const [input, want] of k.vectors) { + n++; + const got = callTs(I, k.ts, input); + if (got !== want) bad.push(`${kind}: ${k.ts}(${show(input)}) = ${show(got)}, want ${show(want)}`); + } + } + assert.ok(n >= 60, `only ${n} vectors read from ${SPEC}`); + assert.deepEqual(bad, [], + "the TypeScript identity keys disagree with kg/identity_keys.json: a write path would look a record up by a different key than the database's index refuses it by"); +}); + +test("the TypeScript preprint venues, DOI prefixes and DOI shapes, and its Greek table, are the JSON's", async () => { + const I = await ts(); + const p = spec().keys.preprint; + assert.deepEqual([...I.PREPRINT_VENUES].sort(), [...p.venues].sort(), "PREPRINT_VENUES in identity-keys.ts vs kg/identity_keys.json"); + assert.deepEqual([...I.PREPRINT_DOI_PREFIXES].sort(), [...p.doi_prefixes].sort(), "PREPRINT_DOI_PREFIXES in identity-keys.ts vs kg/identity_keys.json"); + assert.deepEqual([...(I.PREPRINT_DOI_PATTERNS || [])].sort(), [...(p.doi_patterns || [])].sort(), + "PREPRINT_DOI_PATTERNS in identity-keys.ts vs kg/identity_keys.json (a bioRxiv/medRxiv DOI by its shape, not by 10.1101/)"); + assert.ok(!p.doi_prefixes.includes("10.1101/"), + "10.1101/ is no preprint prefix: Cold Spring Harbor's journals (Genome Res, Genes Dev, Learn Mem) publish under it too"); + const greek = spec().keys.name.greek; + assert.ok(greek && Object.keys(greek).length >= 49, "kg/identity_keys.json's name rule has no Greek table (every capital and small letter, and the final sigma)"); + assert.deepEqual({ ...(I.GREEK || {}) }, greek, "GREEK in identity-keys.ts vs kg/identity_keys.json's name.greek"); + const date = spec().keys.chronology.doi_date; + assert.ok(date, "kg/identity_keys.json's chronology rule names no doi_date (the posting date in a bioRxiv/medRxiv DOI)"); + assert.equal(I.PREPRINT_DOI_DATE, date, "PREPRINT_DOI_DATE in identity-keys.ts vs kg/identity_keys.json's chronology.doi_date"); +}); + +test("identity-keys.ts imports nothing and uses no Deno global, so Node and Deno load the same file", () => { + const src = readFileSync(MODULE, "utf8"); + assert.doesNotMatch(src, /^\s*import\b/m, "identity-keys.ts imports something"); + assert.doesNotMatch(src, /^\s*export\s[^;]*?\bfrom\s*["']/m, "identity-keys.ts re-exports from another module"); + assert.doesNotMatch(src, /\bDeno\.|\brequire\(/, "identity-keys.ts uses a runtime global"); +}); + +// ── The SQL leg ──────────────────────────────────────────────────────────────────────────────── + +/** The migration that creates the kg_*_key functions and the indexes on them. */ +function preventDuplicates() { + const found = readdirSync(MIGRATIONS).filter((f) => /_prevent_duplicates\.sql$/.test(f)); + assert.equal(found.length, 1, `expected one *_prevent_duplicates.sql migration, found ${found.length}`); + return { name: found[0], text: readFileSync(join(MIGRATIONS, found[0]), "utf8").replace(/\r\n/g, "\n") }; +} + +/** One SQL literal at src[i] (NULL, '...' or E'...'), read as PostgreSQL reads it. */ +function sqlLiteral(src, i) { + if (/^NULL\b/i.test(src.slice(i))) return { value: null, end: i + 4 }; + const e = src[i] === "E" || src[i] === "e"; + let j = i + (e ? 2 : 1); + assert.equal(src[j - 1], "'", `not a SQL literal: ${src.slice(i, i + 40)}`); + let out = ""; + for (;;) { + assert.ok(j < src.length, "unterminated SQL literal"); + const c = src[j]; + if (c === "'") { + if (src[j + 1] === "'") { out += "'"; j += 2; continue; } + return { value: out, end: j + 1 }; + } + if (e && c === "\\") { + const n = src[j + 1]; + const simple = { b: "\b", f: "\f", n: "\n", r: "\r", t: "\t" }; + let m; + if (n in simple) { out += simple[n]; j += 2; continue; } + if ((m = /^u([0-9a-fA-F]{4})/.exec(src.slice(j + 1)))) { out += String.fromCodePoint(parseInt(m[1], 16)); j += 6; continue; } + if ((m = /^U([0-9a-fA-F]{8})/.exec(src.slice(j + 1)))) { out += String.fromCodePoint(parseInt(m[1], 16)); j += 10; continue; } + if ((m = /^x([0-9a-fA-F]{1,2})/.exec(src.slice(j + 1)))) { out += String.fromCharCode(parseInt(m[1], 16)); j += 1 + m[0].length; continue; } + if ((m = /^([0-7]{1,3})/.exec(src.slice(j + 1)))) { out += String.fromCharCode(parseInt(m[1], 8)); j += 1 + m[0].length; continue; } + out += n; j += 2; continue; + } + out += c; j += 1; + } +} + +/** One SQL value at src[i]: a literal (sqlLiteral), an integer, or true / false. */ +function sqlValue(src, i) { + const rest = src.slice(i); + let m; + if ((m = /^-?[0-9]+\b/.exec(rest))) return { value: Number(m[0]), end: i + m[0].length }; + if ((m = /^(true|false)\b/i.exec(rest))) return { value: m[1].toLowerCase() === "true", end: i + m[0].length }; + return sqlLiteral(src, i); +} + +/** The rows of one generated vector block of the migration (between -- <marker>:begin and :end). */ +function vectorBlock(text, marker, width) { + const block = text.match(new RegExp(`-- ${marker}:begin[^\\n]*\\n([\\s\\S]*?)\\n[ \\t]*-- ${marker}:end`)); + assert.ok(block, `the migration has no -- ${marker}:begin ... -- ${marker}:end block (keys-02)`); + return block[1].split("\n").filter((l) => l.trim() && !l.trim().startsWith("--")).map((line) => { + const row = []; + let i = line.indexOf("(") + 1; + assert.ok(i > 0, `${marker} line is not a row: ${line}`); + for (;;) { + while (/\s/.test(line[i])) i++; + const v = sqlValue(line, i); + row.push(v.value); + i = v.end; + while (/\s/.test(line[i])) i++; + if (line[i] === ",") { i++; continue; } + assert.equal(line[i], ")", `${marker} row not closed: ${line}`); + break; + } + assert.equal(row.length, width, `${marker} row has ${row.length} values, not ${width}: ${line}`); + return row; + }); +} + +// The rows of the migration's self-test blocks: (kind, input, second input, want), and the pairing +// rule's order of versions: (preprint year, preprint pmid, preprint doi, published year, published +// pmid, want). +const selfTestRows = (text) => vectorBlock(text, "identity-vectors", 4); +const chronologyRows = (text) => vectorBlock(text, "chronology-vectors", 6); + +test("the vectors the migration tests Postgres on give the same keys through the TypeScript", async () => { + // When the migration is applied, keys-02 refuses to run unless Postgres returns `want` for each of + // these rows; so a row the TypeScript disagrees with is a key the write paths fold differently from + // the database. + const I = await ts(); + const keys = spec().keys; + const { name, text } = preventDuplicates(); + const rows = selfTestRows(text); + assert.ok(rows.length >= 60, `${name}: only ${rows.length} self-test rows`); + const bad = []; + for (const [kind, a, b, want] of rows) { + assert.ok(keys[kind]?.ts, `${name}: self-test kind ${kind} is not a key in kg/identity_keys.json`); + const got = kind === "preprint" ? String(I[keys[kind].ts](a, b)) : I[keys[kind].ts](a); + if (got !== want) bad.push(`${kind}: ${keys[kind].ts}(${show(a)}${kind === "preprint" ? `, ${show(b)}` : ""}) = ${show(got)}, Postgres must give ${show(want)}`); + } + const order = chronologyRows(text); + assert.ok(order.length >= 8, `${name}: only ${order.length} chronology rows`); + for (const [py, pp, pd, uy, up, want] of order) { + const got = I[keys.chronology.ts](py, pp, pd, uy, up); + if (got !== want) bad.push(`chronology: ${keys.chronology.ts}(${show([py, pp, pd, uy, up])}) = ${show(got)}, Postgres must give ${show(want)}`); + } + assert.deepEqual(bad, [], `${name}'s self-test and supabase/functions/_shared/identity-keys.ts disagree`); +}); + +/** The body of one public.kg_* key function as the migration writes it (its $fn$ ... $fn$). */ +function keyFunctionBody(fn) { + const { name, text } = preventDuplicates(); + const code = text.split("\n").filter((l) => !l.trim().startsWith("--")).join("\n"); + const at = code.search(new RegExp(`CREATE\\s+(?:OR\\s+REPLACE\\s+)?FUNCTION\\s+public\\.${fn}\\s*\\(`, "i")); + assert.ok(at >= 0, `${name} does not define public.${fn}`); + const end = code.indexOf("$fn$;", at); + assert.ok(end > at, `${name}: public.${fn} has no $fn$ ... $fn$; body`); + return { name, body: code.slice(at, end) }; +} + +test("kg_is_preprint's venues, DOI prefixes and DOI shapes are the TypeScript's", async () => { + const I = await ts(); + const { name, body } = keyFunctionBody("kg_is_preprint"); + // Every regular expression the function matches with: the venues, the prefixes, then the shapes. + const res = [...body.matchAll(/~\s*'((?:[^']|'')*)'/g)].map((m) => m[1].replace(/''/g, "'")); + const venues = res.length && res[0].match(/^\(([a-z ]+(?:\|[a-z ]+)+)\)$/); + const prefixes = res.length > 1 && res[1].match(/^\^10\\\.\(([0-9]+(?:\|[0-9]+)+)\)\/$/); + assert.ok(venues && prefixes, `${name}: could not read kg_is_preprint's venue and DOI-prefix alternations (got ${show(res)})`); + assert.deepEqual(venues[1].split("|").sort(), [...I.PREPRINT_VENUES].sort(), "kg_is_preprint venues vs identity-keys.ts"); + assert.deepEqual(prefixes[1].split("|").map((x) => `10.${x}/`).sort(), [...I.PREPRINT_DOI_PREFIXES].sort(), "kg_is_preprint DOI prefixes vs identity-keys.ts"); + assert.deepEqual(res.slice(2).sort(), [...(I.PREPRINT_DOI_PATTERNS || [])].sort(), "kg_is_preprint DOI shapes vs identity-keys.ts"); +}); + +test("kg_name_key spells out the same Greek letters as the TypeScript", async () => { + const I = await ts(); + const { name, body } = keyFunctionBody("kg_name_key"); + const pairs = {}; + for (const m of body.matchAll(/\(\s*([Ee]?'(?:[^']|'')*')\s*,\s*'([a-z]+)'\s*\)/g)) { + pairs[sqlLiteral(m[1], 0).value] = m[2]; + } + assert.ok(Object.keys(pairs).length >= 49, `${name}: kg_name_key has ${Object.keys(pairs).length} Greek letters, not the 49 of the table`); + assert.deepEqual(pairs, { ...(I.GREEK || {}) }, "kg_name_key's Greek letters vs identity-keys.ts GREEK"); +}); + +// ── The Python leg ───────────────────────────────────────────────────────────────────────────── + +test("kg/quality.py folds with kg/identity_keys.py, and kg/identity_keys.py gives every vector's `want`", (t) => { + const quality = readFileSync(join(ROOT, "kg", "quality.py"), "utf8"); + assert.match(quality, /^from identity_keys import /m, "kg/quality.py does not take its identity keys from kg/identity_keys.py"); + assert.doesNotMatch(quality, /^def (fold_identifier|orcid_key|doi_key|pmid_key|fon_key|award_key|name_key|url_key)\(/m, + "kg/quality.py defines its own fold: a second copy of a rule kg/identity_keys.py already states"); + + const python = [process.env.PYTHON, "python3", "python"].filter(Boolean) + .find((exe) => spawnSync(exe, ["-c", "import sys; sys.exit(0 if sys.version_info >= (3, 8) else 1)"]).status === 0); + if (!python) { + t.skip("no Python 3 on PATH (set PYTHON); kg/ci_check.py checks kg/identity_keys.py in the KG gate"); + return; + } + const script = [ + "import json, sys", + "sys.path.insert(0, sys.argv[1])", + "import identity_keys as I", + "spec = json.load(open(sys.argv[2], encoding='utf-8'))", + "bad = []", + "for kind, k in spec['keys'].items():", + " f = getattr(I, k['py'], None)", + " if f is None:", + " bad.append('%s: kg/identity_keys.py has no %s()' % (kind, k['py'])); continue", + " for inp, want in k['vectors']:", + " got = f(*inp) if isinstance(inp, list) else f(inp)", + " if got != want:", + " bad.append('%s: %s(%r) = %r, want %r' % (kind, k['py'], inp, got, want))", + "print(json.dumps(bad))", + ].join("\n"); + // -I: isolated mode, so nothing on PYTHONPATH or in the working directory is imported instead. + const r = spawnSync(python, ["-I", "-c", script, join(ROOT, "kg"), SPEC], { encoding: "utf8" }); + assert.equal(r.status, 0, `${python} could not run kg/identity_keys.py: ${r.stderr}`); + assert.deepEqual(JSON.parse(r.stdout), [], + "kg/identity_keys.py disagrees with kg/identity_keys.json: kg/quality.py would fold identifiers differently from the database and the write paths"); +}); diff --git a/tests/guards/inspector-internal-data.test.mjs b/tests/guards/inspector-internal-data.test.mjs new file mode 100644 index 00000000..f50b18b6 --- /dev/null +++ b/tests/guards/inspector-internal-data.test.mjs @@ -0,0 +1,87 @@ +// Guard: the working-group meeting notes and the device list reach the Graph Inspector only in the +// artifact build, never the repo or the public site. +// +// WHY (2026-11-16). The Inspector gained a Meetings tab: lessons, disagreements and decisions from +// the working-group notes, each tied to the person the notes attribute it to. Those notes are +// internal, and so is the device list (2026-11-16), which names who spoke to each device. The same +// template builds three pages: kg/browser/index.html (committed), +// /kg/inspector/ on the public site (publish.yml, daily), and the fragment published to the +// claude.ai artifact that the consortium shares. Only the last may carry the notes, and the page +// embeds whatever it is given, so one stray `--internal` in a workflow, or one rebuild of the +// committed copy with the notes, would publish them. kg/quality.py refuses an in-repo target; this +// checks what that refusal can't see: the committed copy, the workflows, and stray notes files. +import { test } from "node:test"; +import assert from "node:assert/strict"; +import { readFileSync, readdirSync, statSync } from "node:fs"; +import { join, relative, extname } from "node:path"; +import { fileURLToPath } from "node:url"; + +const ROOT = fileURLToPath(new URL("../..", import.meta.url)); +const read = (p) => readFileSync(join(ROOT, p), "utf8").replace(/\r\n/g, "\n"); +const MARK = /"kind":\s*"bbqs-(meetings|devices)"/; + +test("the template has the report placeholder, then the internal one, once each", () => { + const src = read("kg/browser/template.html"); + const found = [...src.matchAll(/\/\*__(REPORT|INTERNAL)__\*\/null/g)].map((m) => m[1]); + assert.deepEqual(found, ["REPORT", "INTERNAL"], "kg/quality.py render_html fills exactly these two, in this order"); +}); + +test("the committed Inspector carries no meeting records", () => { + const html = read("kg/browser/index.html"); + assert.match(html, /const INTERNAL = null;/, "kg/browser/index.html must be built without --internal"); + assert.doesNotMatch(html, MARK, "kg/browser/index.html holds meeting records"); +}); + +test("no workflow builds a page with the meeting notes", () => { + // The whole file, not one line: a flag on a continuation line or in a variable counts too. + for (const sub of ["workflows", "scripts", "actions"]) { + const dir = join(ROOT, ".github", sub); + let names = []; + try { names = readdirSync(dir, { recursive: true }).map(String); } catch { continue; } + for (const name of names.filter((n) => /\.(ya?ml|sh|py|mjs|js)$/.test(n))) { + const src = read(join(".github", sub, name)); + assert.doesNotMatch(src, /--internal\b/, `.github/${sub}/${name} passes --internal`); + assert.doesNotMatch(src, /\b(meetings|devices)\.py\b|kg\.(meetings|devices)\b/, `.github/${sub}/${name} runs kg/meetings.py or kg/devices.py; the records stay off CI`); + } + } + const scripts = JSON.stringify(JSON.parse(read("package.json")).scripts || {}); + assert.doesNotMatch(scripts, /--internal\b|\b(meetings|devices)\.py\b/, "a package.json script builds the internal records"); +}); + +test("no meeting records are committed", () => { + // Any file holding a marker, the template the public site ships included, is a copy of the records. Text-like files only, and not node_modules, dist or the git store. + const allowed = new Set(); // kg/meetings.py and kg/devices.py build the marker from a constant, so no file is exempt + const skip = new Set([".git", "node_modules", "dist", "playwright-report", "test-results", ".venv", "__pycache__"]); + const text = new Set([".json", ".js", ".mjs", ".ts", ".tsx", ".py", ".html", ".md", ".csv", ".yaml", ".yml", ".ttl", ".txt", ".sql"]); + const hits = []; + const walk = (dir) => { + for (const name of readdirSync(dir)) { + if (skip.has(name)) continue; + const full = join(dir, name), rel = relative(ROOT, full).split("\\").join("/"); + const st = statSync(full); + if (st.isDirectory()) walk(full); + else if (text.has(extname(name)) && st.size < 32 * 1024 * 1024 && !allowed.has(rel) && MARK.test(readFileSync(full, "utf8"))) hits.push(rel); + } + }; + walk(ROOT); + assert.deepEqual(hits, [], "meeting records belong outside the repository"); +}); + +test("no raw copy of the notes or the device list is committed", () => { + // The inputs carry no marker, so they are known by name: the extraction of the meeting notes and + // the device list's files (kg/meetings.py and kg/devices.py read them from outside the repo). + const raw = new Set(["meetings_extracted.json", "meetings_flat.csv", "person_roles.csv", "devices.csv", + "device_evidence.csv", "device_discussion_crosscutting.csv", "bbqs_devices_kg.json"]); + const skip = new Set([".git", "node_modules", "dist", ".venv"]); + const hits = []; + const walk = (dir) => { + for (const name of readdirSync(dir)) { + if (skip.has(name)) continue; + const full = join(dir, name); + if (statSync(full).isDirectory()) walk(full); + else if (raw.has(name)) hits.push(relative(ROOT, full).split("\\").join("/")); + } + }; + walk(ROOT); + assert.deepEqual(hits, [], "the notes and the device list belong outside the repository"); +}); diff --git a/tests/guards/kg-identity-keys.test.mjs b/tests/guards/kg-identity-keys.test.mjs new file mode 100644 index 00000000..60358543 --- /dev/null +++ b/tests/guards/kg-identity-keys.test.mjs @@ -0,0 +1,368 @@ +// Guard: one identity rule per key, written once, and every layer that asks "is this already in +// the KG?" declares or implements that same rule. +// +// WHY (2026-11-17). A KG reviewer: "if you have something in the KG already, you don't want to +// duplicate it; cleaning is a difficult and tedious task as the KG grows; link, don't copy; make a +// decision and stick to it." The 11-04 export had 14 duplicate groups, cleaned by hand in +// 20261116150000. Nothing stopped the next one: the schema declared no key but `id`, the database +// had unique constraints on three columns, and each write path matched on its own spelling. +// +// Now each key (ORCID, DOI, PMID, FON, award number, organization name) has ONE rule, stated in +// kg/identity_keys.json together with the vectors that pin it down, and four layers carry it. (A URL +// has a rule too, which kg/quality.py and the write paths compare by, but no index: a URL can be a +// landing page several records share. So do the pairing rule's parts: title, preprint, chronology.) +// database public.kg_<key>_key and the uq_* indexes on them (supabase/migrations/*_prevent_duplicates.sql) +// writers supabase/functions/_shared/identity-keys.ts (tests/guards/identity-normalization) +// schema kg/bbqs.linkml.yaml unique_keys (gen-owl turns each into an owl:hasKey axiom) +// export kg/shapes/validation.shapes.ttl, and kg/quality.py duplicates() through kg/identity_keys.py +// Copies of one rule drift, and a drifted key lets a duplicate through one layer that another +// refuses. This test holds the declarations together. kg/ci_check.py runs the Python rule on the +// vectors; the migration's self-test (block keys-02) runs the SQL rule on them when it is applied. +// +// KG_MIGRATIONS_DIR reads the migrations from another folder (a scratch copy of +// supabase/migrations), to check a migration before it is in the tree. CI never sets it. +import { test } from "node:test"; +import assert from "node:assert/strict"; +import { existsSync, readdirSync, readFileSync } from "node:fs"; +import { join } from "node:path"; +import { fileURLToPath } from "node:url"; + +const ROOT = fileURLToPath(new URL("../..", import.meta.url)); +const read = (p) => readFileSync(join(ROOT, p), "utf8").replace(/\r\n/g, "\n"); +const MIGRATIONS = process.env.KG_MIGRATIONS_DIR || join(ROOT, "supabase", "migrations"); + +// The keys the design fixes (kg/README.md, "Modelling rule: link, don't copy"). More may be added. +const REQUIRED = ["orcid", "doi", "pmid", "fon", "award", "nih_award_core", "name", "url", "title", "preprint", "chronology"]; +// The identifiers kg/quality.py duplicates() must compare, each by its rule. A shorter list is a +// check that quietly stopped: ci_check's RED fixture is only as good as what it is asked to find. +const REQUIRED_IDENTIFIERS = ["orcid", "doi", "pmid", "fon", "grant_number", "url", "external_url", "repo_url"]; + +function spec() { + const path = join(ROOT, "kg", "identity_keys.json"); + assert.ok(existsSync(path), "kg/identity_keys.json is missing: it is where each identity key's rule and vectors are stated once"); + return JSON.parse(readFileSync(path, "utf8")); +} + +/** Every LinkML key the JSON declares, new keys and existing ones, as "Class.key[slot,slot]". */ +function declaredKeys(s) { + return [...Object.values(s.keys), ...(s.existing || [])] + .flatMap((k) => k.linkml || []) + .map((l) => `${l.class}.${l.key}[${l.slots.join(",")}]`) + .sort(); +} + +/** kg/bbqs.linkml.yaml classes: name -> { parents, slots, keys }. Regex-parsed: the guards are zero-dependency. */ +function schemaClasses() { + const src = read("kg/bbqs.linkml.yaml"); + const section = src.match(/\nclasses:\n([\s\S]*?)(?=\n\w)/); + assert.ok(section, "no classes: section in kg/bbqs.linkml.yaml"); + const body = section[1]; + const heads = [...body.matchAll(/^ {2}([A-Z][A-Za-z]+):(.*)$/gm)]; + const classes = new Map(); + heads.forEach((h, i) => { + const end = i + 1 < heads.length ? heads[i + 1].index : body.length; + const text = h[2] + "\n" + body.slice(h.index + h[0].length, end); + const list = (s) => s.split(",").map((x) => x.replace(/#.*/, "").trim()).filter(Boolean); + // `slots:` preceded by a space, `{` or `,`: never unique_key_slots. + const inline = text.match(/(?:^|[\s{,])slots:\s*\[([^\]]*)\]/); + const block = text.match(/\n {4}slots:[ \t]*\n((?: {6}(?:- |#).*\n?)+)/); + const slots = inline ? list(inline[1]) : block ? [...block[1].matchAll(/^ {6}- ([a-z_]+)/gm)].map((m) => m[1]) : []; + const isA = text.match(/(?:^|[\s{,])is_a:\s*([A-Za-z]+)/); + const mixins = text.match(/(?:^|[\s{,])mixins:\s*\[([^\]]*)\]/); + const keys = []; + const uk = text.match(/\n {4}unique_keys:\n((?: {6,}.*\n?)+)/); + if (uk) { + for (const k of uk[1].matchAll(/^ {6}([a-z_]+):\n((?: {8,}.*\n?)*)/gm)) { + const slotsOf = k[2].match(/^ {8}unique_key_slots:\s*\[([^\]]*)\]/m); + assert.ok(slotsOf, `${h[1]}.unique_keys.${k[1]}: no one-line unique_key_slots: [...] (this guard reads that form)`); + keys.push({ key: k[1], slots: list(slotsOf[1]), body: k[2] }); + } + } + classes.set(h[1], { parents: [...(isA ? [isA[1]] : []), ...(mixins ? list(mixins[1]) : [])], slots, keys, text }); + }); + // Every unique_key_slots line in the file was read into some class's keys. + const total = (src.match(/^\s+unique_key_slots:/gm) || []).length; + const parsed = [...classes.values()].reduce((n, c) => n + c.keys.length, 0); + assert.equal(parsed, total, "kg/bbqs.linkml.yaml has unique_keys this guard could not read; keep the layout of the existing ones"); + return classes; +} + +function inherited(classes, name, seen = new Set()) { + if (seen.has(name) || !classes.has(name)) return new Set(); + seen.add(name); + const c = classes.get(name); + return new Set([...c.slots, ...c.parents.flatMap((p) => [...inherited(classes, p, seen)])]); +} + +function migrations() { + assert.ok(existsSync(MIGRATIONS), `no migrations folder at ${MIGRATIONS}`); + return readdirSync(MIGRATIONS).filter((f) => f.endsWith(".sql")).sort() + .map((f) => ({ name: f, text: readFileSync(join(MIGRATIONS, f), "utf8").replace(/\r\n/g, "\n") })); +} + +// The SQL without its whole-line comments: a header's UNDO section may name an index or a function. +const code = (text) => text.split("\n").filter((l) => !l.trim().startsWith("--")).join("\n"); + +function preventDuplicates() { + const found = migrations().filter((m) => /_prevent_duplicates\.sql$/.test(m.name)); + assert.equal(found.length, 1, `expected one *_prevent_duplicates.sql migration (it creates the key functions and indexes), found ${found.length}`); + return found[0]; +} + +const fnName = (sql) => sql.replace(/^public\./, ""); +const escapeRe = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); + +/** One SQL literal at src[i]: NULL, '...' or E'...', read the way PostgreSQL reads it + * (standard_conforming_strings on). In E'' only \b \f \n \r \t, octal, \x, \u and \U are escapes; + * any other backslashed character is itself, so E'\v' is "v", not a vertical tab. */ +function sqlLiteral(src, i) { + const rest = src.slice(i); + if (/^NULL\b/i.test(rest)) return { value: null, end: i + 4 }; + const escaped = /^[Ee]'/.test(rest); + let j = i + (escaped ? 2 : 1); + assert.ok(src[j - 1] === "'", `not a SQL literal at: ${rest.slice(0, 40)}`); + let out = ""; + for (;;) { + assert.ok(j < src.length, "unterminated SQL literal"); + const c = src[j]; + if (c === "'") { + if (src[j + 1] === "'") { out += "'"; j += 2; continue; } + return { value: out, end: j + 1 }; + } + if (escaped && c === "\\") { + const n = src[j + 1]; + const simple = { b: "\b", f: "\f", n: "\n", r: "\r", t: "\t" }; + if (n in simple) { out += simple[n]; j += 2; continue; } + let m; + if ((m = /^u([0-9a-fA-F]{4})/.exec(src.slice(j + 1)))) { out += String.fromCodePoint(parseInt(m[1], 16)); j += 6; continue; } + if ((m = /^U([0-9a-fA-F]{8})/.exec(src.slice(j + 1)))) { out += String.fromCodePoint(parseInt(m[1], 16)); j += 10; continue; } + if ((m = /^x([0-9a-fA-F]{1,2})/.exec(src.slice(j + 1)))) { out += String.fromCharCode(parseInt(m[1], 16)); j += 1 + m[0].length; continue; } + if ((m = /^([0-7]{1,3})/.exec(src.slice(j + 1)))) { out += String.fromCharCode(parseInt(m[1], 8)); j += 1 + m[0].length; continue; } + out += n; j += 2; continue; + } + out += c; j += 1; + } +} + +/** One SQL value at src[i]: a literal (sqlLiteral), an integer, or true / false. */ +function sqlValue(src, i) { + const rest = src.slice(i); + let m; + if ((m = /^-?[0-9]+\b/.exec(rest))) return { value: Number(m[0]), end: i + m[0].length }; + if ((m = /^(true|false)\b/i.exec(rest))) return { value: m[1].toLowerCase() === "true", end: i + m[0].length }; + return sqlLiteral(src, i); +} + +/** The rows of one generated vector block of the migration (between -- <marker>:begin and :end). */ +function vectorBlock(text, marker, width) { + const block = text.match(new RegExp(`-- ${marker}:begin[^\\n]*\\n([\\s\\S]*?)\\n[ \\t]*-- ${marker}:end`)); + assert.ok(block, `the migration has no -- ${marker}:begin ... -- ${marker}:end block (keys-02)`); + return block[1].split("\n").filter((l) => l.trim() && !l.trim().startsWith("--")).map((line) => { + const row = []; + let i = line.indexOf("("); + assert.ok(i >= 0, `${marker} line is not a row: ${line}`); + i += 1; + for (;;) { + while (/\s/.test(line[i])) i++; + const v = sqlValue(line, i); + row.push(v.value); + i = v.end; + while (/\s/.test(line[i])) i++; + if (line[i] === ",") { i++; continue; } + assert.equal(line[i], ")", `${marker} row not closed: ${line}`); + break; + } + assert.equal(row.length, width, `${marker} row has ${row.length} values, not ${width}: ${line}`); + return row; + }); +} + +// (kind, input, second input, want) for the one- and two-argument rules, and (preprint year, +// preprint pmid, preprint doi, published year, published pmid, want) for the order of two versions. +const selfTestRows = (text) => vectorBlock(text, "identity-vectors", 4); +const chronologyRows = (text) => vectorBlock(text, "chronology-vectors", 6); + +/** The body of one public.kg_* function as the migration writes it (to its closing $fn$;). */ +function functionBody(fn) { + const { name, text } = preventDuplicates(); + const sql = code(text); + const at = sql.search(new RegExp(`CREATE\\s+(?:OR\\s+REPLACE\\s+)?FUNCTION\\s+public\\.${escapeRe(fn)}\\s*\\(`, "i")); + assert.ok(at >= 0, `${name} does not define public.${fn}`); + const end = sql.indexOf("$fn$;", at); + assert.ok(end > at, `${name}: public.${fn} has no $fn$ ... $fn$; body`); + return { name, body: sql.slice(at, end) }; +} + +test("kg/identity_keys.json states each identity key: its rule, its implementations, and vectors", () => { + const s = spec(); + const missing = REQUIRED.filter((k) => !(k in s.keys)); + assert.deepEqual(missing, [], `kg/identity_keys.json lacks the keys ${missing.join(", ")}`); + const py = read("kg/identity_keys.py"); + for (const [name, k] of Object.entries(s.keys)) { + for (const field of ["rule", "ts", "py"]) assert.ok(k[field], `${name}: no "${field}"`); + if ((k.db || []).length) assert.ok(k.sql, `${name}: indexed in the database (${k.db.map((d) => d.index).join(", ")}) but no "sql" function`); + assert.ok(Array.isArray(k.vectors) && k.vectors.length >= 3, `${name}: fewer than 3 vectors`); + // A rule of several arguments names them ("args"), and each of its vectors gives all of them. + for (const v of k.vectors) { + assert.ok(Array.isArray(v) && v.length === 2, `${name}: a vector is not [input, want]: ${JSON.stringify(v)}`); + if (k.args) assert.ok(Array.isArray(v[0]) && v[0].length === k.args.length, `${name}: an input is not [${k.args.join(", ")}]: ${JSON.stringify(v)}`); + else assert.ok(!Array.isArray(v[0]), `${name}: an input is a list, but the rule names no args: ${JSON.stringify(v)}`); + } + const nullIn = (v) => (Array.isArray(v[0]) ? v[0].every((x) => x === null) : v[0] === null); + assert.ok(k.vectors.some(nullIn), `${name}: no vector for a missing value (null)`); + assert.match(py, new RegExp(`^def ${k.py}\\(`, "m"), `${name}: kg/identity_keys.py defines no ${k.py}()`); + } +}); + +test("kg/bbqs.linkml.yaml declares exactly the unique keys kg/identity_keys.json lists", () => { + const classes = schemaClasses(); + const schema = [...classes].flatMap(([cls, c]) => c.keys.map((k) => `${cls}.${k.key}[${k.slots.join(",")}]`)).sort(); + assert.deepEqual(schema, declaredKeys(spec()), + "the LinkML unique_keys and kg/identity_keys.json disagree: a key declared in one is enforced or checked nowhere else"); + for (const [cls, c] of classes) { + for (const k of c.keys) { + assert.match(k.body, /consider_nulls_inequal:\s*true/, `${cls}.${k.key}: say consider_nulls_inequal: true (a missing value never collides)`); + assert.match(k.body, /description:/, `${cls}.${k.key}: no description naming where the key is refused and checked`); + } + } +}); + +test("each key slot is a slot of its class or of a class it inherits from", () => { + // gen-owl writes owl:hasKey for a slot the class does not have, without a word. + const classes = schemaClasses(); + const declared = new Set([...read("kg/bbqs.linkml.yaml").match(/\nslots:\n([\s\S]*?)(?=\n\w)/)[1].matchAll(/^ {2}([a-z_]+):/gm)].map((m) => m[1])); + const keys = [...classes.values()].reduce((n, c) => n + c.keys.length, 0); + assert.ok(keys > 0 && keys === declaredKeys(spec()).length, `read ${keys} unique keys from the schema`); + const bad = []; + for (const [cls, c] of classes) { + const own = inherited(classes, cls); + for (const k of c.keys) for (const slot of k.slots) { + if (!declared.has(slot)) bad.push(`${cls}.${k.key}: ${slot} is not a slot of the schema`); + else if (!own.has(slot)) bad.push(`${cls}.${k.key}: ${slot} is not a slot of ${cls}`); + } + } + assert.deepEqual(bad, []); +}); + +test("each shape kg/identity_keys.json names is a shape in kg/shapes/validation.shapes.ttl", () => { + const ttl = read("kg/shapes/validation.shapes.ttl"); + const s = spec(); + const shapes = [...Object.values(s.keys), ...(s.existing || [])].map((k) => k.shape).filter(Boolean); + assert.ok(shapes.length >= 6, `only ${shapes.length} shapes named`); + const missing = shapes.filter((name) => !new RegExp(`^bbqs:${name}\\n\\s+a sh:NodeShape`, "m").test(ttl)); + assert.deepEqual(missing, [], "named in kg/identity_keys.json but not a shape"); +}); + +test("kg/quality.py checks each key it is listed for, with the same Python rule", () => { + const src = read("kg/quality.py"); + const ids = src.match(/^IDENTIFIERS = \(([^)]*)\)/m); + assert.ok(ids, "no IDENTIFIERS = (...) in kg/quality.py"); + const identifiers = [...ids[1].matchAll(/"([a-z_]+)"/g)].map((m) => m[1]); + const fold = src.match(/^FOLD = \{([\s\S]*?)\n\}/m); + assert.ok(fold, "no FOLD = {...} in kg/quality.py: it maps each identifier to its kg/identity_keys.py rule"); + const folds = Object.fromEntries([...fold[1].matchAll(/"([a-z_]+)":\s*([a-z_]+)/g)].map((m) => [m[1], m[2]])); + assert.deepEqual(Object.keys(folds).sort(), [...identifiers].sort(), "FOLD and IDENTIFIERS list different identifiers"); + const dropped = REQUIRED_IDENTIFIERS.filter((x) => !identifiers.includes(x)); + assert.deepEqual(dropped, [], "kg/quality.py IDENTIFIERS no longer compares these identifiers (a tool's homepage and repository among them)"); + for (const [name, k] of Object.entries(spec().keys)) { + if (!k.quality) continue; + assert.ok(identifiers.includes(k.quality), `${name}: kg/quality.py IDENTIFIERS lacks "${k.quality}"`); + assert.equal(folds[k.quality], k.py, `${name}: kg/quality.py folds "${k.quality}" with ${folds[k.quality]}, not ${k.py}`); + } +}); + +test("the migration creates each unique index on its key function, and no other", () => { + // Each index is one call of the migration's helper, pg_temp.kg_unique_key('<index>', '<table>', + // '<expression>', '<label>'), and the call is read whole: an index named next to another call's + // table passed a check by proximity, and the helper reports a column the table lacks as "not + // applied yet", so a wrong table would leave the index never built while the run says APPLIED. + const { name, text } = preventDuplicates(); + const calls = [...code(text).matchAll(/kg_unique_key\(\s*'([^']*)'\s*,\s*'([^']*)'\s*,\s*'([^']*)'\s*,/g)] + .map((m) => `${m[1]} on ${m[2]} (${m[3]})`).sort(); + const want = Object.values(spec().keys) + .flatMap((k) => (k.db || []).map((d) => `${d.index} on ${d.table} (public.${fnName(k.sql)}(${d.column}))`)).sort(); + assert.ok(want.length >= 7, `kg/identity_keys.json lists only ${want.length} indexes`); + assert.deepEqual(calls, want, + `${name}'s kg_unique_key(...) calls are not kg/identity_keys.json's indexes (index on table (key expression)): one is missing, extra, on another table or another key`); +}); + +test("the migration's self-test vectors are kg/identity_keys.json's", () => { + const { name, text } = preventDuplicates(); + const want = []; + for (const [kind, k] of Object.entries(spec().keys)) { + if (!k.sql || kind === "chronology") continue; + for (const [input, out] of k.vectors) { + const [a, b] = kind === "preprint" ? input : [input, null]; + want.push([kind, a, b, typeof out === "boolean" ? String(out) : out]); + } + } + assert.ok(want.length >= 60, `only ${want.length} vectors for the SQL rules`); + assert.deepEqual(selfTestRows(text), want, + `${name}'s identity-vectors block is not kg/identity_keys.json: regenerate it from the JSON, so Postgres is tested on the same cases as Python and TypeScript`); + const order = spec().keys.chronology; + assert.ok(order && order.sql, "kg/identity_keys.json has no chronology rule for the SQL pairing rule"); + assert.deepEqual(chronologyRows(text), order.vectors.map(([input, out]) => [...input, out]), + `${name}'s chronology-vectors block is not kg/identity_keys.json's chronology vectors: regenerate it from the JSON`); +}); + +test("each kg_* key function is defined in exactly one migration", () => { + const all = migrations(); + const where = {}; + for (const k of Object.values(spec().keys)) { + if (!k.sql) continue; + const def = new RegExp(`CREATE\\s+(?:OR\\s+REPLACE\\s+)?FUNCTION\\s+public\\.${escapeRe(fnName(k.sql))}\\s*\\(`, "i"); + where[k.sql] = all.filter((m) => def.test(code(m.text))).map((m) => m.name); + } + const bad = Object.entries(where).filter(([, files]) => files.length !== 1 || !/_prevent_duplicates\.sql$/.test(files[0])); + assert.deepEqual(bad, [], + "a key function defined in two migrations (or outside *_prevent_duplicates.sql) gets replaced under its index: " + + "CREATE OR REPLACE changes an indexed function without a word, and the index keeps the old keys"); +}); + +test("the preprint venues, DOI prefixes and DOI shapes are the same in kg/identity_keys.py, the JSON and the SQL", () => { + const p = spec().keys.preprint; + const py = read("kg/identity_keys.py"); + const tuple = (name) => { + // one line, to its last parenthesis: a pattern in the tuple has parentheses of its own + const m = py.match(new RegExp(`^${name} = \\((.*)\\)[ \\t]*$`, "m")); + assert.ok(m, `no one-line ${name} = (...) in kg/identity_keys.py`); + // "..." or r"..." strings, read as Python reads them (a raw string keeps its backslashes) + return [...m[1].matchAll(/(r?)"([^"]+)"/g)].map((x) => (x[1] ? x[2] : x[2].replace(/\\\\/g, "\\"))).sort(); + }; + assert.deepEqual(tuple("PREPRINT_VENUES"), [...p.venues].sort(), "PREPRINT_VENUES: kg/identity_keys.py vs the JSON"); + assert.deepEqual(tuple("PREPRINT_DOI_PREFIXES"), [...p.doi_prefixes].sort(), "PREPRINT_DOI_PREFIXES: kg/identity_keys.py vs the JSON"); + assert.deepEqual(tuple("PREPRINT_DOI_PATTERNS"), [...(p.doi_patterns || [])].sort(), "PREPRINT_DOI_PATTERNS: kg/identity_keys.py vs the JSON"); + const { name, body } = functionBody(fnName(p.sql)); + // Every regular expression the function matches with, in order: the venues, the prefixes, the shapes. + const res = [...body.matchAll(/~\s*'((?:[^']|'')*)'/g)].map((m) => m[1].replace(/''/g, "'")); + const venues = res.length && res[0].match(/^\(([a-z ]+(?:\|[a-z ]+)+)\)$/); + const prefixes = res.length > 1 && res[1].match(/^\^10\\\.\(([0-9]+(?:\|[0-9]+)+)\)\/$/); + assert.ok(venues && prefixes, `${name}: could not read the venue and DOI-prefix alternations of ${p.sql} (got ${JSON.stringify(res)})`); + assert.deepEqual(venues[1].split("|").sort(), [...p.venues].sort(), `${p.sql}: venues differ from the JSON`); + assert.deepEqual(prefixes[1].split("|").map((x) => `10.${x}/`).sort(), [...p.doi_prefixes].sort(), `${p.sql}: DOI prefixes differ from the JSON`); + assert.deepEqual(res.slice(2).sort(), [...(p.doi_patterns || [])].sort(), `${p.sql}: DOI shapes differ from the JSON`); +}); + +test("the posting date of a bioRxiv/medRxiv DOI is read by one pattern in kg/identity_keys.py, the JSON and the SQL", () => { + // The order of two versions falls back on it when PubMed does not order them: a preprint's own + // year drifts later as versions are posted, the date in its DOI does not. + const c = spec().keys.chronology; + assert.ok(c && c.doi_date, "kg/identity_keys.json's chronology rule names no doi_date"); + const py = read("kg/identity_keys.py").match(/^PREPRINT_DOI_DATE = r"([^"]+)"[ \t]*$/m); + assert.ok(py, "no one-line PREPRINT_DOI_DATE = r\"...\" in kg/identity_keys.py"); + assert.equal(py[1], c.doi_date, "PREPRINT_DOI_DATE: kg/identity_keys.py vs the JSON's chronology.doi_date"); + const { name, body } = functionBody(fnName(c.sql)); + const res = [...body.matchAll(/FROM\s*'((?:[^']|'')*)'/g)].map((m) => m[1].replace(/''/g, "'")); + assert.deepEqual(res, [c.doi_date], `${name}: ${c.sql} must read the posting year with the JSON's doi_date (got ${JSON.stringify(res)})`); + assert.match(body, /kg_pmid_key\(_preprint_pmid\)[\s\S]*kg_pmid_key\(_published_pmid\)/, + `${name}: ${c.sql} must order two versions by their PubMed ids first`); +}); + +test("kg_name_key spells out the JSON's Greek letters", () => { + const greek = spec().keys.name.greek; + assert.ok(greek && Object.keys(greek).length >= 49, "kg/identity_keys.json's name rule has no Greek table"); + const { name, body } = functionBody("kg_name_key"); + const pairs = {}; + for (const m of body.matchAll(/\(\s*([Ee]?'(?:[^']|'')*')\s*,\s*'([a-z]+)'\s*\)/g)) pairs[sqlLiteral(m[1], 0).value] = m[2]; + assert.deepEqual(pairs, greek, `${name}: kg_name_key's Greek letters differ from kg/identity_keys.json's name.greek`); +}); diff --git a/tests/guards/kg-resource-links-parity.test.mjs b/tests/guards/kg-resource-links-parity.test.mjs new file mode 100644 index 00000000..76c22db5 --- /dev/null +++ b/tests/guards/kg-resource-links-parity.test.mjs @@ -0,0 +1,121 @@ +// Guard: the predicates public.resource_links accepts are the predicates the exporter writes, and +// each is a slot of the KG schema. +// +// WHY. resource_links (20261116150000) holds the curated links no column stores: a model trained_on +// its dataset, a benchmark that evaluates a tool, a published paper that is a revision_of its +// preprint (20261117181500). Its predicate is a kg/bbqs.linkml.yaml slot name, and four places +// list them by hand: the table's CHECK constraint, the type check trigger +// (resource_links_check_types, one WHEN per predicate), the exporter's RESOURCE_LINK_SLOTS +// (kg/bbqs_kg.py), and kg/identity_keys.json. A predicate the database accepts but the exporter +// skips is a curated link that silently never reaches the graph; one the exporter lists but the +// database refuses can never be written; one the schema lacks is a predicate gen-owl does not know. +// +// KG_MIGRATIONS_DIR reads the migrations from another folder (a scratch copy of +// supabase/migrations), to check a migration before it is in the tree. CI never sets it. +import { test } from "node:test"; +import assert from "node:assert/strict"; +import { existsSync, readdirSync, readFileSync } from "node:fs"; +import { join } from "node:path"; +import { fileURLToPath } from "node:url"; + +const ROOT = fileURLToPath(new URL("../..", import.meta.url)); +const read = (p) => readFileSync(join(ROOT, p), "utf8").replace(/\r\n/g, "\n"); +const MIGRATIONS = process.env.KG_MIGRATIONS_DIR || join(ROOT, "supabase", "migrations"); +const sorted = (xs) => [...new Set(xs)].sort(); + +function migrations() { + assert.ok(existsSync(MIGRATIONS), `no migrations folder at ${MIGRATIONS}`); + return readdirSync(MIGRATIONS).filter((f) => f.endsWith(".sql")).sort() + .map((f) => ({ name: f, text: code(readFileSync(join(MIGRATIONS, f), "utf8").replace(/\r\n/g, "\n")) })); +} + +// The SQL without its whole-line comments: a header's UNDO section may quote an old CHECK. +const code = (text) => text.split("\n").filter((l) => !l.trim().startsWith("--")).join("\n"); + +// A quoted token, as SQL writes it or as it appears inside a quoted EXECUTE string ('' doubled). +const tokens = (s) => [...s.matchAll(/'{1,2}([a-z_]+)'{1,2}/g)].map((m) => m[1]); + +/** The predicates of the last resource_links_predicate_check any migration defines. */ +function latestCheck() { + let last = null; + for (const m of migrations()) { + for (const c of m.text.matchAll(/resource_links_predicate_check\s+CHECK\s*\(\s*predicate\s+IN\s*\(([^)]*)\)/gi)) { + last = { file: m.name, predicates: sorted(tokens(c[1])) }; + } + } + assert.ok(last, "no migration defines resource_links_predicate_check"); + return last; +} + +/** The function bodies of every definition of public.resource_links_check_types() in the last + * migration that defines it: from the definition to the end of its dollar-quoted body. */ +function latestTypeCheck() { + let last = null; + for (const m of migrations()) { + const bodies = []; + for (const d of m.text.matchAll(/CREATE\s+(?:OR\s+REPLACE\s+)?FUNCTION\s+public\.resource_links_check_types\s*\(\s*\)/gi)) { + const after = m.text.slice(d.index); + const open = after.match(/\$([A-Za-z_]*)\$/); + assert.ok(open, `${m.name}: resource_links_check_types() has no dollar-quoted body`); + const start = open.index + open[0].length; + const end = after.indexOf(open[0], start); + assert.ok(end > start, `${m.name}: resource_links_check_types()'s body is not closed`); + bodies.push(after.slice(start, end)); + } + if (bodies.length) last = { file: m.name, bodies }; + } + assert.ok(last, "no migration defines public.resource_links_check_types()"); + return last; +} + +function exporterSlots() { + const m = read("kg/bbqs_kg.py").match(/^RESOURCE_LINK_SLOTS = frozenset\(\{([^}]*)\}\)/m); + assert.ok(m, "kg/bbqs_kg.py has no RESOURCE_LINK_SLOTS = frozenset({...}): the exporter writes no resource_links"); + return sorted([...m[1].matchAll(/"([a-z_]+)"/g)].map((x) => x[1])); +} + +function jsonPredicates() { + const path = join(ROOT, "kg", "identity_keys.json"); + assert.ok(existsSync(path), "kg/identity_keys.json is missing"); + const p = JSON.parse(readFileSync(path, "utf8")).resource_link_predicates; + assert.ok(Array.isArray(p) && p.length, "kg/identity_keys.json has no resource_link_predicates"); + return sorted(p); +} + +test("the CHECK, the type check, the exporter and kg/identity_keys.json list the same resource_links predicates", () => { + const check = latestCheck(); + const types = latestTypeCheck(); + for (const body of types.bodies) { + const when = sorted([...body.matchAll(/WHEN\s+'{1,2}([a-z_]+)'{1,2}\s+THEN/g)].map((m) => m[1])); + assert.deepEqual(when, check.predicates, + `${types.file}'s resource_links_check_types() has a WHEN for ${when.join(", ")}, but ${check.file}'s CHECK allows ${check.predicates.join(", ")}`); + } + assert.deepEqual(exporterSlots(), check.predicates, + `kg/bbqs_kg.py RESOURCE_LINK_SLOTS differs from the predicates ${check.file} lets resource_links hold: a link the exporter skips never reaches the graph`); + assert.deepEqual(jsonPredicates(), check.predicates, "kg/identity_keys.json resource_link_predicates differs from the CHECK"); +}); + +test("revision_of links a publication to a publication, in the database and in the schema", () => { + const types = latestTypeCheck(); + for (const body of types.bodies) { + assert.match(body, /WHEN\s+'{1,2}revision_of'{1,2}\s+THEN\s+_s\s*=\s*'{1,2}publication'{1,2}\s+AND\s+_o\s*=\s*'{1,2}publication'{1,2}/, + `${types.file}: resource_links_check_types() must accept revision_of only from a publication to a publication`); + } + const yaml = read("kg/bbqs.linkml.yaml"); + const slot = yaml.match(/^ {2}revision_of:\s*\{([^}]*)\}/m); + assert.ok(slot, "kg/bbqs.linkml.yaml declares no revision_of slot"); + assert.match(slot[1], /range:\s*Publication\b/, "revision_of's range is not Publication"); + assert.match(slot[1], /exact_mappings:\s*\[\s*prov:wasRevisionOf\s*\]/, "revision_of does not map to prov:wasRevisionOf"); + const pub = yaml.match(/^ {2}Publication:\n([\s\S]*?)(?=\n {2}[A-Z]|\n\w)/m); + assert.ok(pub, "no Publication class"); + const slots = pub[1].match(/\n {4}slots:\s*\[([^\]]*)\]/); + assert.ok(slots && slots[1].split(",").map((s) => s.trim()).includes("revision_of"), "revision_of is not in Publication.slots"); +}); + +test("every resource_links predicate is a slot of the KG schema", () => { + const section = read("kg/bbqs.linkml.yaml").match(/\nslots:\n([\s\S]*?)(?=\n\w)/); + assert.ok(section, "no slots: section in kg/bbqs.linkml.yaml"); + const slots = new Set([...section[1].matchAll(/^ {2}([a-z_]+):/gm)].map((m) => m[1])); + const missing = latestCheck().predicates.filter((p) => !slots.has(p)); + assert.deepEqual(missing, [], "resource_links predicates that are no slot of kg/bbqs.linkml.yaml (the exporter writes bbqs:<predicate>)"); +}); diff --git a/tests/guards/kg-role-vocabulary-parity.test.mjs b/tests/guards/kg-role-vocabulary-parity.test.mjs index b1c99f0f..d522a6a5 100644 --- a/tests/guards/kg-role-vocabulary-parity.test.mjs +++ b/tests/guards/kg-role-vocabulary-parity.test.mjs @@ -42,7 +42,7 @@ function linkmlRoleTokens() { } function shapeRoleTokens() { - const src = read("kg/shapes/consistency.shapes.ttl"); + const src = read("kg/shapes/validation.shapes.ttl"); const m = src.match(/bbqs:ProjectRoleTokenShape\b[\s\S]*?sh:in\s*\(([^)]*)\)/); assert.ok(m, "could not find the sh:in list of ProjectRoleTokenShape"); return [...m[1].matchAll(/"([^"]+)"/g)].map((x) => x[1]).sort(); @@ -62,6 +62,6 @@ test("the #4 shape accepts the same role tokens as the schema", () => { assert.deepEqual( shapeRoleTokens(), linkmlRoleTokens(), - "ProjectRoleTokenShape's sh:in (kg/shapes/consistency.shapes.ttl) disagrees with project_role_enum.", + "ProjectRoleTokenShape's sh:in (kg/shapes/validation.shapes.ttl) disagrees with project_role_enum.", ); }); diff --git a/tests/guards/optional-columns.test.mjs b/tests/guards/optional-columns.test.mjs new file mode 100644 index 00000000..83f37cdb --- /dev/null +++ b/tests/guards/optional-columns.test.mjs @@ -0,0 +1,206 @@ +// Guard: a column that only a hand-applied migration adds is read through selectWithOptionalColumns. +// +// Migrations are applied by hand, so production can lack a column the code names. PostgREST refuses +// a select that names a missing column (400, 42703), and since 20261117190000 the public views are +// read by named columns, never "*". On 2026-11-18 production's investigators_public had no +// `onboarded` (20261008120000 not applied): the exporter lost every person's details until it +// learned to drop the column (kg/bbqs_kg.py fetch), and the People page and the person summary on +// this branch both named it and would have failed for every visitor once deployed. +// src/lib/optionalColumns.ts registers such columns; this guard holds every reader to the helper. +import { test } from "node:test"; +import assert from "node:assert/strict"; +import { readFileSync, readdirSync, statSync, existsSync } from "node:fs"; +import { join, dirname, extname, relative } from "node:path"; +import { fileURLToPath } from "node:url"; +import { stripTypeScriptTypes } from "node:module"; + +const ROOT = join(dirname(fileURLToPath(import.meta.url)), "..", ".."); +const HELPER = join(ROOT, "src", "lib", "optionalColumns.ts"); + +const stripComments = (src) => src.replace(/\/\*[\s\S]*?\*\//g, " ").replace(/(^|[^:"'`])\/\/[^\n]*/g, "$1"); + +/** OPTIONAL_COLUMNS as { object: { column: migration } }, read from the helper's literal. */ +export function registered(src) { + const body = stripComments(src).match(/OPTIONAL_COLUMNS[^=]*=\s*\{([\s\S]*?)\n\};/); + assert.ok(body, "could not read OPTIONAL_COLUMNS in src/lib/optionalColumns.ts"); + const out = {}; + for (const [, object, cols] of body[1].matchAll(/([a-z_]+)\s*:\s*\{([^}]*)\}/g)) { + out[object] = Object.fromEntries([...cols.matchAll(/([a-z_]+)\s*:\s*["']([^"']+)["']/g)].map((m) => [m[1], m[2]])); + } + return out; +} + +/** Plain .from("<object>") ... .select("<literal>") column lists in a file: [{ object, columns }]. */ +export function plainSelects(src, objects) { + const code = stripComments(src); + const found = []; + for (const m of code.matchAll(/\.from\(\s*["'`]([a-z_]+)["'`]/g)) { + if (!objects.includes(m[1])) continue; + const rest = code.slice(m.index + m[0].length); + const next = rest.search(/\.from\(/); + const chain = rest.slice(0, next === -1 ? 800 : Math.min(next, 800)); + const sel = chain.match(/\.select\(\s*(["'`])([^"'`]*)\1/); + if (sel) found.push({ object: m[1], columns: sel[2].split(",").map((c) => c.trim().split(/[\s:(!]/)[0]) }); + } + return found; +} + +/** The top-level arguments of the call whose "(" is at `open`: split at commas outside quotes and brackets. */ +export function callArgs(code, open) { + const args = []; + let depth = 0, quote = null, cur = ""; + for (let i = open + 1; i < code.length; i += 1) { + const ch = code[i]; + if (quote) { cur += ch; if (ch === quote && code[i - 1] !== "\\") quote = null; continue; } + if (ch === '"' || ch === "'" || ch === "`") { quote = ch; cur += ch; continue; } + if ("([{".includes(ch)) depth += 1; + if (")]}".includes(ch)) { if (depth === 0) { args.push(cur.trim()); return args; } depth -= 1; } + if (ch === "," && depth === 0) { args.push(cur.trim()); cur = ""; continue; } + cur += ch; + } + return args; +} + +/** selectWithOptionalColumns("<object>", "<required>", [<optional>...], refine) calls. A part that is + * not a literal comes back undefined (object, required) or null (optional). */ +export function helperCalls(src) { + const code = stripComments(src); + const calls = []; + const lit = (s) => (s ?? "").match(/^["'`]([^"'`]*)["'`]$/)?.[1]; + for (const m of code.matchAll(/selectWithOptionalColumns(?:<[^>(]*>)?\(/g)) { + if (/function\s+$/.test(code.slice(0, m.index))) continue; // the helper's own definition + const [objectArg, requiredArg, optionalArg] = callArgs(code, m.index + m[0].length - 1); + const required = lit(requiredArg); + calls.push({ + object: lit(objectArg), + required: required?.split(",").map((c) => c.trim().split(/[\s:(!]/)[0]), + optional: (optionalArg ?? "").startsWith("[") ? [...optionalArg.matchAll(/["'`]([^"'`]+)["'`]/g)].map((x) => x[1]) : null, + text: code.slice(m.index, m.index + 90).replace(/\s+/g, " "), + }); + } + return calls; +} + +const walk = (dir, exts) => readdirSync(dir).flatMap((n) => { + const p = join(dir, n); + if (statSync(p).isDirectory()) return n === "node_modules" ? [] : walk(p, exts); + return exts.includes(extname(p)) ? [p] : []; +}); + +test("the detectors read a plain select and a helper call", () => { + const plain = 'await supabase.from("people_view" as any).select("id, name, added_later").eq("id", 1);'; + assert.deepEqual(plainSelects(plain, ["people_view"]), [{ object: "people_view", columns: ["id", "name", "added_later"] }]); + assert.deepEqual(plainSelects('supabase.from("other").select("added_later")', ["people_view"]), []); + const viaHelper = 'await selectWithOptionalColumns("people_view", "id, name", ["added_later"], (q) => q.eq("id", 1));'; + assert.deepEqual(helperCalls(viaHelper).map(({ object, required, optional }) => ({ object, required, optional })), + [{ object: "people_view", required: ["id", "name"], optional: ["added_later"] }]); + assert.deepEqual(plainSelects(viaHelper, ["people_view"]), [], "a helper call is not a plain select"); + const dynamic = helperCalls("selectWithOptionalColumns(table, cols, extra)")[0]; + assert.equal(dynamic.object, undefined); + assert.equal(dynamic.optional, null); +}); + +test("every registered optional column names a migration that exists", () => { + const reg = registered(readFileSync(HELPER, "utf8")); + assert.ok(Object.keys(reg).length > 0); + for (const [object, cols] of Object.entries(reg)) { + for (const [column, migration] of Object.entries(cols)) { + assert.ok(existsSync(join(ROOT, "supabase", "migrations", `${migration}.sql`)), + `${object}.${column}: supabase/migrations/${migration}.sql does not exist`); + } + } +}); + +test("no select names an optional column directly, and every helper call is literal and registered", () => { + const reg = registered(readFileSync(HELPER, "utf8")); + const objects = Object.keys(reg); + const files = [...walk(join(ROOT, "src"), [".ts", ".tsx"]), ...walk(join(ROOT, "e2e"), [".ts"])] + .filter((p) => p !== HELPER && !p.endsWith(join("supabase", "types.ts"))); + const problems = []; + for (const p of files) { + const src = readFileSync(p, "utf8"); + for (const s of plainSelects(src, objects)) { + const named = s.columns.filter((c) => c in reg[s.object]); + if (named.length) problems.push(`${relative(ROOT, p)}: select on ${s.object} names ${named.join(", ")} directly`); + } + for (const call of helperCalls(src)) { + const where = `${relative(ROOT, p)}: ${call.text}`; + if (!call.object || !call.required || !call.optional) { problems.push(`${where}: object, required and optional must be literals`); continue; } + if (!(call.object in reg)) { problems.push(`${where}: ${call.object} is not in OPTIONAL_COLUMNS`); continue; } + for (const c of call.optional) if (!(c in reg[call.object])) problems.push(`${where}: ${c} is not registered as optional for ${call.object}`); + for (const c of call.required) if (c in reg[call.object]) problems.push(`${where}: ${c} is optional, but is in the required list`); + } + } + assert.deepEqual(problems, [], + "A column in OPTIONAL_COLUMNS may be missing from the live database (its migration is applied by hand). " + + "A select that names it is refused whole (42703). Read it with selectWithOptionalColumns(object, required, " + + "[optional], refine) from src/lib/optionalColumns.ts, and let the caller cope with the field being absent."); +}); + +/** The helper itself, with its types stripped and a stand-in for the supabase client. */ +async function loadHelper(fake) { + const src = readFileSync(HELPER, "utf8"); + assert.match(src, /import \{ supabase \} from "@\/integrations\/supabase\/client";/); + const js = stripTypeScriptTypes(src.replace(/import \{ supabase \}[^\n]*\n/, "")); + globalThis.__optionalColumnsFake = fake; + const url = "data:text/javascript," + encodeURIComponent("const supabase = globalThis.__optionalColumnsFake;\n" + js + `\n// ${Math.random()}`); + return import(url); +} + +/** A stand-in database: `has` is the set of columns the object really has. */ +function fakeDb(has, rows = [{ id: 1 }]) { + const asked = []; + const answer = (cols, refined) => { + const missing = cols.split(",").map((c) => c.trim()).find((c) => !has.has(c)); + if (missing) return { data: null, error: { code: "42703", message: `column people_view.${missing} does not exist` } }; + return { data: refined === "single" ? rows[0] : rows, error: null }; + }; + const client = { + from: (object) => ({ + select: (cols) => { + asked.push(cols); + const query = { then: (ok, no) => Promise.resolve(answer(cols)).then(ok, no) }; + query.single = () => Promise.resolve(answer(cols, "single")); + return query; + }, + }), + }; + return { client, asked }; +} + +test("the helper drops a missing optional column and asks again; anything else comes back as it is", async () => { + // the column exists: one request, with it + let db = fakeDb(new Set(["id", "name", "added_later"])); + let { selectWithOptionalColumns } = await loadHelper(db.client); + let res = await selectWithOptionalColumns("people_view", "id, name", ["added_later"]); + assert.equal(res.error, null); + assert.deepEqual(db.asked, ["id, name, added_later"]); + + // the column is missing (the migration is not applied): asked once with it, once without, and the rows come back + db = fakeDb(new Set(["id", "name"])); + ({ selectWithOptionalColumns } = await loadHelper(db.client)); + res = await selectWithOptionalColumns("people_view", "id, name", ["added_later"], (q) => q.single()); + assert.equal(res.error, null); + assert.deepEqual(res.data, { id: 1 }); + assert.deepEqual(db.asked, ["id, name, added_later", "id, name"]); + + // two optional columns missing: dropped one by one + db = fakeDb(new Set(["id"])); + ({ selectWithOptionalColumns } = await loadHelper(db.client)); + res = await selectWithOptionalColumns("people_view", "id", ["a_later", "b_later"]); + assert.equal(res.error, null); + assert.deepEqual(db.asked, ["id, a_later, b_later", "id, b_later", "id"]); + + // a REQUIRED column is missing: that is an error, not something to hide + db = fakeDb(new Set(["id", "added_later"])); + ({ selectWithOptionalColumns } = await loadHelper(db.client)); + res = await selectWithOptionalColumns("people_view", "id, name", ["added_later"]); + assert.equal(res.error?.code, "42703"); + assert.deepEqual(db.asked, ["id, name, added_later"]); + + // any other refusal (a private column, RLS) is returned untouched, with no second request + const refused = { from: () => ({ select: () => Promise.resolve({ data: null, error: { code: "42501", message: "permission denied for view people_view" } }) }) }; + ({ selectWithOptionalColumns } = await loadHelper(refused)); + res = await selectWithOptionalColumns("people_view", "id", ["added_later"]); + assert.equal(res.error?.code, "42501"); +}); diff --git a/tests/guards/role-ui-vocabulary.test.mjs b/tests/guards/role-ui-vocabulary.test.mjs new file mode 100644 index 00000000..686bc98f --- /dev/null +++ b/tests/guards/role-ui-vocabulary.test.mjs @@ -0,0 +1,83 @@ +// Guard: every project role a screen or function can write is one the database vocabulary knows. +// +// WHY (2026-11-18). grant_investigators.role holds canonical tokens only: normalize_grant_role, behind +// trg_normalize_grant_role, maps what it recognises and passes anything else through unchanged. The +// KG schema's project_role_enum and shape #4 are held equal to that function +// (tests/guards/kg-role-vocabulary-parity). Nothing held the SCREENS to it. The roster editor and the +// person summary have always offered "Collaborator"; the normalizer never listed it, so the value was +// stored as an unknown token, and the first curator who chose it (U24DA064429, between the exports of +// 2026-11-17 and 2026-11-18) put a violation into the graph that no data fix could clear. The same +// shape as #496 (`other`), one layer further out. +// +// Every value a role menu offers, and every role a parser may return, must be an input +// normalize_grant_role maps on purpose (a WHEN key) or one it passes through on purpose (trainee). +import { test } from "node:test"; +import assert from "node:assert/strict"; +import { readFileSync, readdirSync } from "node:fs"; +import { fileURLToPath } from "node:url"; + +const ROOT = fileURLToPath(new URL("../..", import.meta.url)); +const read = (rel) => readFileSync(ROOT + rel, "utf8").replace(/\r\n/g, "\n"); + +/** Passed through unmapped on purpose (see normalize_grant_role's own comment). */ +const PASSED_THROUGH = ["trainee"]; + +/** The inputs the latest normalize_grant_role maps: every WHEN '<input>' of its CASE. */ +export function normalizerInputs(sqlFiles) { + const defs = sqlFiles + .map((src) => [...src.matchAll(/CREATE (?:OR REPLACE )?FUNCTION public\.normalize_grant_role\([^)]*\)[^$]*?AS (\$\w*\$)([\s\S]*?)\1/gi)].at(-1)) + .filter(Boolean); + assert.ok(defs.length, "no migration defines public.normalize_grant_role"); + const body = defs.at(-1)[2].replace(/--[^\n]*/g, " "); + const inputs = [...body.matchAll(/\bwhen\s+'([^']+)'/gi)].map((m) => m[1].toLowerCase()); + assert.ok(inputs.length, "could not read the WHEN inputs of normalize_grant_role"); + return new Set(inputs); +} + +/** `value: "x"` entries of the array literal assigned to `name` in a file. */ +export function arrayValues(src, name) { + const m = src.match(new RegExp(`\\bconst\\s+${name}\\b[^=]*=\\s*\\[([\\s\\S]*?)\\]\\s*;`)); + assert.ok(m, `could not find the array ${name}`); + const objects = [...m[1].matchAll(/\bvalue:\s*["']([^"']+)["']/g)].map((x) => x[1]); + return objects.length ? objects : [...m[1].matchAll(/["']([^"']+)["']/g)].map((x) => x[1]); +} + +/** <option value="x"> entries of the <select> whose value is {role}. */ +export function roleSelectOptions(src) { + const m = src.match(/<select\s[^>]*value=\{role\}[\s\S]*?<\/select>/); + assert.ok(m, "could not find the role <select>"); + return [...m[0].matchAll(/<option\s+value=["']([^"']+)["']/g)].map((x) => x[1]); +} + +const SURFACES = [ + ["src/components/project-profile/TeamRosterEditor.tsx", (src) => arrayValues(src, "ROLES")], + ["src/components/admin/OnboardMemberDialog.tsx", (src) => arrayValues(src, "ROLES")], + ["src/components/entity-summary/summaries/InvestigatorSummary.tsx", roleSelectOptions], + ["supabase/functions/parse-onboard/index.ts", (src) => arrayValues(src, "ROLES")], +]; + +test("the readers find role values in an array of options, a plain array and a role <select>", () => { + assert.deepEqual(arrayValues('const ROLES = [\n { value: "pi", label: "PI" },\n { value: "made_up", label: "x" },\n];', "ROLES"), ["pi", "made_up"]); + assert.deepEqual(arrayValues('const ROLES = ["co_pi", "other"\n];', "ROLES"), ["co_pi", "other"]); + assert.deepEqual(roleSelectOptions('<select\n value={role}>\n<option value="pi">PI</option><option value="made_up">X</option>\n</select>'), ["pi", "made_up"]); + const known = normalizerInputs(["CREATE OR REPLACE FUNCTION public.normalize_grant_role(_role text)\nRETURNS text LANGUAGE sql AS $fn$\n SELECT CASE lower(_role) WHEN 'pi' then 'PI' -- WHEN 'ghost' then 'x'\n WHEN 'staff' then 'research_staff' ELSE _role END\n$fn$;"]); + assert.deepEqual([...known].sort(), ["pi", "staff"]); +}); + +test("every role a screen or a parser can write is one normalize_grant_role knows", () => { + const dir = "supabase/migrations/"; + const known = normalizerInputs(readdirSync(ROOT + dir).filter((f) => f.endsWith(".sql")).sort().map((f) => read(dir + f))); + const unknown = []; + for (const [path, values] of SURFACES) { + const offered = values(read(path)); + assert.ok(offered.length >= 3, `${path}: found only ${offered.length} role values`); + for (const v of offered) { + if (!known.has(v.toLowerCase()) && !PASSED_THROUGH.includes(v)) unknown.push(`${path}: "${v}"`); + } + } + assert.deepEqual(unknown, [], + "These role values can be written to grant_investigators.role, but normalize_grant_role does not list " + + "them: they are stored as unknown tokens, and the graph (project_role_enum, shape #4) then reports an " + + "error no data fix can clear. Add the value to normalize_grant_role in a new migration (the KG enum and " + + "the shape follow it: tests/guards/kg-role-vocabulary-parity), or stop offering it."); +}); diff --git a/tests/guards/view-write-privileges.test.mjs b/tests/guards/view-write-privileges.test.mjs new file mode 100644 index 00000000..5b5f5518 --- /dev/null +++ b/tests/guards/view-write-privileges.test.mjs @@ -0,0 +1,96 @@ +// Guard: no client can write through a view. +// +// Supabase's default privileges grant ALL on every new table AND view in public to anon and +// authenticated. A table is protected by row-level security; a view that runs with its owner's +// rights (security_invoker unset or false) and is simple enough to be automatically updatable +// passes INSERT, UPDATE and DELETE through to its base table AS THE OWNER, which row-level security +// does not stop. On 2026-11-17, on a replica of this schema, an anonymous visitor rewrote a job +// through public_jobs and deleted a feature suggestion through feature_suggestions_public, and a +// signed-in user renamed another person through investigators_public and investigator_directory. +// 20261117174500_revoke_writes_through_views revoked every write privilege on every view that +// existed. This guard holds every LATER migration that creates a view to revoke them as well. +import { test } from "node:test"; +import assert from "node:assert/strict"; +import { readFileSync, readdirSync } from "node:fs"; +import { join, dirname } from "node:path"; +import { fileURLToPath } from "node:url"; + +const ROOT = join(dirname(fileURLToPath(import.meta.url)), "..", ".."); +const MIGRATIONS = join(ROOT, "supabase", "migrations"); +const FIX = "20261117174500_revoke_writes_through_views.sql"; +const WRITES = ["INSERT", "UPDATE", "DELETE"]; + +/** SQL with comments removed (CRLF-safe), so a commented-out CREATE VIEW or REVOKE does not count. */ +export function stripComments(sql) { + return sql.replace(/\r\n/g, "\n").replace(/\/\*[\s\S]*?\*\//g, " ").replace(/--[^\n]*/g, " "); +} + +/** Views in schema public that a migration creates (lower-case names, no schema). */ +export function viewsCreated(sql) { + const names = new Set(); + const re = /\bcreate\s+(?:or\s+replace\s+)?(temp\s+|temporary\s+)?(?:recursive\s+)?view\s+(?:if\s+not\s+exists\s+)?("?[\w]+"?\s*\.\s*)?("?[\w]+"?)/gi; + for (const m of stripComments(sql).matchAll(re)) { + if (m[1]) continue; // a temporary view is the session's own + const schema = m[2] ? m[2].replace(/["\s.]/g, "").toLowerCase() : "public"; + if (schema === "public") names.add(m[3].replace(/"/g, "").toLowerCase()); + } + return [...names]; +} + +/** Does the migration take INSERT, UPDATE and DELETE on `view` away from both anon and authenticated? */ +export function writesRevoked(sql, view) { + const text = stripComments(sql); + // the one-off sweep: a loop that revokes the write privileges on every view (relkind 'v') + const sweep = /relkind\s*=\s*'v'/i.test(text) + && /revoke\s+insert\s*,\s*update\s*,\s*delete[^;]*from\s+anon\s*,\s*authenticated/i.test(text); + if (sweep) return true; + const covered = { anon: false, authenticated: false }; + const re = /\brevoke\s+([\w\s,]+?)\s+on\s+(?:table\s+)?("?[\w]+"?\s*\.\s*)?("?[\w]+"?)\s+from\s+([^;]+);/gi; + for (const m of text.matchAll(re)) { + if (m[3].replace(/"/g, "").toLowerCase() !== view) continue; + if (m[2] && m[2].replace(/["\s.]/g, "").toLowerCase() !== "public") continue; + const privileges = m[1].toUpperCase().split(/\s*,\s*/).map(p => p.trim()); + const all = privileges.some(p => p === "ALL" || p === "ALL PRIVILEGES"); + if (!all && !WRITES.every(w => privileges.includes(w))) continue; + // FROM PUBLIC alone is not enough: anon and authenticated hold their own grants (Supabase's + // default privileges), which a revoke from PUBLIC leaves in place. + const grantees = m[4].toLowerCase(); + for (const role of Object.keys(covered)) if (new RegExp(`\\b${role}\\b`).test(grantees)) covered[role] = true; + } + return covered.anon && covered.authenticated; +} + +test("the detector finds a view that leaves writes open, and passes one that revokes them", () => { + const open = "CREATE OR REPLACE VIEW public.people_public AS SELECT id, name FROM public.people;"; + assert.deepEqual(viewsCreated(open), ["people_public"]); + assert.equal(writesRevoked(open, "people_public"), false); + assert.equal(writesRevoked(open + "\nREVOKE UPDATE ON public.people_public FROM anon, authenticated;", "people_public"), false, + "revoking UPDATE alone leaves INSERT and DELETE"); + assert.equal(writesRevoked(open + "\nREVOKE INSERT, UPDATE, DELETE ON public.people_public FROM anon;", "people_public"), false, + "revoking from anon alone leaves authenticated"); + assert.equal(writesRevoked(open + "\nREVOKE ALL ON public.people_public FROM PUBLIC, anon, authenticated;\nGRANT SELECT ON public.people_public TO anon;", "people_public"), true); + assert.equal(writesRevoked(open + "\nREVOKE INSERT, UPDATE, DELETE, TRUNCATE ON TABLE people_public FROM anon, authenticated;", "people_public"), true); + assert.equal(writesRevoked(open + "\n-- REVOKE ALL ON public.people_public FROM anon, authenticated;", "people_public"), false, + "a commented-out REVOKE does not count"); + assert.deepEqual(viewsCreated("CREATE TEMP VIEW scratch AS SELECT 1; CREATE VIEW other_schema.v AS SELECT 1;"), []); +}); + +test("20261117174500 revokes every write privilege on every view from anon and authenticated", () => { + const sql = stripComments(readFileSync(join(MIGRATIONS, FIX), "utf8")); + assert.match(sql, /relkind\s*=\s*'v'/i, "the sweep must cover every view, not a hand-written list"); + assert.match(sql, /revoke\s+insert\s*,\s*update\s*,\s*delete\s*,\s*truncate[^;]*from\s+anon\s*,\s*authenticated/i); + assert.doesNotMatch(sql, /revoke[^;]*\bselect\b/i, "reading through the views must stay as it is"); +}); + +test("every migration after the sweep that creates a view revokes writes on it", () => { + const later = readdirSync(MIGRATIONS).filter(f => f.endsWith(".sql") && f > FIX).sort(); + const open = []; + for (const file of later) { + const sql = readFileSync(join(MIGRATIONS, file), "utf8"); + for (const view of viewsCreated(sql)) if (!writesRevoked(sql, view)) open.push(`${file}: ${view}`); + } + assert.deepEqual(open, [], + "These views would let anon and authenticated write through them (Supabase grants ALL by default). " + + "Add, after the CREATE VIEW: REVOKE ALL ON public.<view> FROM PUBLIC, anon, authenticated; " + + "then GRANT SELECT ON public.<view> TO anon, authenticated; (only the roles that should read it)."); +}); diff --git a/tests/guards/write-paths-get-or-create.test.mjs b/tests/guards/write-paths-get-or-create.test.mjs new file mode 100644 index 00000000..48cb297c --- /dev/null +++ b/tests/guards/write-paths-get-or-create.test.mjs @@ -0,0 +1,905 @@ +// Guard: a write path looks the record up, by its identity key, before it inserts one. +// +// WHY (2026-11-17). The 11-04 export had 14 duplicate groups. 10 were orphan investigator spine rows +// (resources rows typed investigator that no person points at) next to the real person: nih-grants, +// add-project-by-grant and seed-consortium inserted the spine row first and the person second, and +// when the person insert failed (a name or email already taken) the spine row stayed. The others +// came from lookups that missed: an exact or ilike match on a name the registry spells differently +// ("UNIVERSITY OF CALIFORNIA, SAN DIEGO"), a funding call upserted on its FON when its forecast held +// the same notice under another one, a resource matched across types by an ilike pattern with its +// own '%' and '_' stripped. A KG reviewer: "if you have something in the KG already, you don't want +// to duplicate it; cleaning is a difficult and tedious task as the KG grows." +// +// So the write paths share supabase/functions/_shared/kg-write.ts: find by the identity key the +// database's uq_* index refuses a second row by (_shared/identity-keys.ts), reuse it, write only +// when nothing matches, the person before the spine row, and treat a 23505 as "someone else just +// wrote it": read again and reuse. This test holds every path the design names to that, and drives +// the helpers with a fake client, since there is no Deno or database in CI. +import { test } from "node:test"; +import assert from "node:assert/strict"; +import { mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs"; +import { tmpdir } from "node:os"; +import { join, relative } from "node:path"; +import { spawnSync } from "node:child_process"; +import { fileURLToPath, pathToFileURL } from "node:url"; +import * as nodeModule from "node:module"; + +const ROOT = fileURLToPath(new URL("../..", import.meta.url)); +const FUNCS = join(ROOT, "supabase", "functions"); +const KG_WRITE = join(FUNCS, "_shared", "kg-write.ts"); +const read = (p) => readFileSync(join(ROOT, p), "utf8").replace(/\r\n/g, "\n"); +const fn = (name) => read(`supabase/functions/${name}/index.ts`); + +const tsFiles = (dir) => readdirSync(dir).flatMap((n) => { + const p = join(dir, n); + return statSync(p).isDirectory() ? tsFiles(p) : p.endsWith(".ts") ? [p] : []; +}); +const sources = () => tsFiles(FUNCS).map((p) => ({ path: relative(ROOT, p).replace(/\\/g, "/"), src: readFileSync(p, "utf8") })); +const lineOf = (src, i) => src.slice(0, i).split("\n").length; + +// The write paths the design names, and the shared modules they write through. +const WRITE_PATHS = ["import-grant-publications", "bbqs-mcp", "nih-grants", "add-project-by-grant", "seed-consortium", "verify-affiliations"]; +const SHARED = ["_shared/identity-keys.ts", "_shared/kg-write.ts"]; + +// A function that fills a STAGING database with fake data and refuses to run against production. +const FAKE_DATA = new Set(["supabase/functions/seed-staging-fakes/index.ts"]); + +// ── Static: where people, nodes and organizations may be inserted ───────────────────────────── + +test("no investigator spine row is inserted outside _shared/kg-write.ts", () => { + // A spine row inserted before its person is the orphan the person's failed insert leaves behind. + const hits = []; + for (const { path, src } of sources()) { + if (path === "supabase/functions/_shared/kg-write.ts") continue; + for (const m of src.matchAll(/resource_type["']?\s*:\s*["'`]investigator["'`]/g)) hits.push(`${path}:${lineOf(src, m.index)}`); + } + assert.deepEqual(hits, [], "investigator spine rows written outside findOrCreateInvestigator (person first, then the node)"); +}); + +test("no organization is inserted or upserted outside _shared/kg-write.ts", () => { + // findOrCreateOrganization matches by the name key uq_organizations_name_key refuses a second row by. + const hits = []; + for (const { path, src } of sources()) { + if (path === "supabase/functions/_shared/kg-write.ts" || FAKE_DATA.has(path)) continue; + for (const m of src.matchAll(/\.from\(\s*["'`]organizations["'`]\s*\)/g)) { + const statement = src.slice(m.index, m.index + 400).split(";")[0]; + if (/\.(insert|upsert)\(/.test(statement)) hits.push(`${path}:${lineOf(src, m.index)}`); + } + for (const m of src.matchAll(/["'`]organizations(?:\?[^"'`]*)?["'`]\s*,\s*\{[^}]*method:\s*["'`](POST|PUT)/g)) hits.push(`${path}:${lineOf(src, m.index)}`); + } + assert.deepEqual(hits, [], "organizations written without findOrCreateOrganization"); +}); + +// ── Static: each named write path goes through the helpers ──────────────────────────────────── + +const importsFromKgWrite = (src, names) => { + const m = src.match(/import\s*\{([^}]*)\}\s*from\s*["']\.\.\/_shared\/kg-write\.ts["']/); + const got = m ? m[1].split(",").map((s) => s.trim()).filter(Boolean) : []; + return names.filter((n) => !got.includes(n)); +}; + +test("import-grant-publications finds papers by PMID/DOI key, gives them nodes, links versions, and names itself", () => { + const src = fn("import-grant-publications"); + assert.deepEqual(importsFromKgWrite(src, ["findOrCreatePublication", "ensureSpineRow", "linkPublicationVersions"]), [], + "import-grant-publications does not import the kg-write helpers it needs"); + assert.doesNotMatch(src, /\.from\(\s*["']publications["']\s*\)[^;]*\.insert\(/, "a direct publications insert bypasses findOrCreatePublication"); + assert.doesNotMatch(src, /\.ilike\(\s*["']doi["']/, "a DOI ilike lookup: compare doiKey instead"); + assert.match(src, /["']x-bbqs-client["']\s*:\s*["']import-grant-publications["']/, + "its service-role writes must name themselves (Principle X): today they read 'unknown' in data_audit_log"); + assert.doesNotMatch(src, /["']x-bbqs-source-class["']/, "declaring a source class is a separate decision (20260831160000): it raises what the importer may overwrite"); + for (const field of ["pubs_matched", "spine_rows_created", "version_links", "already_in_kg"]) { + assert.match(src, new RegExp(`\\b${field}\\b`), `its result does not report ${field}`); + } +}); + +const toolBody = (src, name) => { + const at = src.indexOf(`T("${name}"`); + assert.ok(at > 0, `bbqs-mcp has no ${name} tool`); + return src.slice(at, src.indexOf("\n });", at)); +}; + +test("add_resource decides by name within its resource_type, never by an ilike pattern, and PATCHes only that decision's row", () => { + // WHY (review db_edge#1, 2026-11-17): add_resource once took a matching homepage URL for the same + // record and PATCHed DeepLabCut with DeepLabCut-Live's description and repository. A URL is not an + // identity for a tool (a lab's tools share its homepage); decideResource says so, and is tested below. + const src = fn("bbqs-mcp"); + const body = toolBody(src, "add_resource"); + assert.doesNotMatch(body, /replace\(\/\[%_\*\]\/g/, "stripping '%', '_' and '*' from a name changes the name it looks up"); + assert.doesNotMatch(body, /name=ilike\./, "an ilike lookup on the name, across every resource type"); + assert.match(body, /decideResource\(/, "add_resource does not decide with decideResource (same type; the name, or same_as; a URL is only a note)"); + assert.doesNotMatch(src, /\bmatchResources\(/, "bbqs-mcp matches resources itself instead of through decideResource"); + assert.match(body, /already_in_kg/, "a match must be reported as already_in_kg"); + const patches = [...body.matchAll(/method:\s*"PATCH"/g)]; + assert.equal(patches.length, 1, "add_resource should PATCH in one place only"); + const before = body.slice(0, patches[0].index); + assert.match(before, /if \(decision\.action === "update"\) \{\s*const row = decision\.row;[\s\S]*resources\?id=eq\.\$\{row\.id\}`, \{\s*$/, + "the PATCH is not of decision.row inside the update branch"); + assert.match(body, /same_as:\s*\{/, "no same_as parameter: there is no explicit way to update a record that has another name"); + assert.match(body, /distinct:\s*\{/, "no distinct parameter: a resource that only shares a URL with another cannot be added"); + assert.match(body, /decideResource\(all, \{[\s\S]{0,200}\bdistinct:/, "add_resource does not pass distinct to decideResource"); + assert.doesNotMatch(body, /const name = String\(a\.name\)/, "a missing name is read as the text \"undefined\""); +}); + +test("add_funding_opportunity decides by the FON key alone, PATCHes inside a 23505 handler, and supersedes only when told", () => { + // WHY (review db_edge#5 and kg#1, 2026-11-17): a call's notice URL can be a landing page that lists + // several calls, so it is a hint (decideFundingCall), and a refused PATCH is said as such. + const body = toolBody(fn("bbqs-mcp"), "add_funding_opportunity"); + assert.doesNotMatch(body, /on_conflict=fon/, "a blind upsert on the exact FON makes a second row for 'RFA NS 27 002' or for the same notice under its forecast's FON"); + assert.match(body, /decideFundingCall\(/, "add_funding_opportunity does not decide with decideFundingCall"); + assert.match(body, /\bsupersedes\b/, "no supersedes parameter: a final notice cannot take over its forecast's row"); + assert.doesNotMatch(body, /already belongs to/, "a notice URL another call holds is refused: it is a hint, never an identity"); + assert.doesNotMatch(fn("bbqs-mcp"), /uq_funding_opportunities_url_key/, "advice about a URL index 20261117181500 never builds"); + const writes = [...body.matchAll(/restC\(\s*(`funding_opportunities\?id=eq\.\$\{row\.id\}`|"funding_opportunities")/g)]; + assert.equal(writes.length, 2, "one PATCH and one POST expected"); + for (const w of writes) { + const tail = body.slice(w.index, w.index + 700); + assert.match(tail, /\} catch \(e\) \{\s*if \(!isUniqueViolation\(e\)\) throw e;/, `${w[1]}: a 23505 is not turned into a clear refusal`); + } +}); + +test("update_my_profile turns an ORCID 23505 into a clear refusal and saves the other fields without the ORCID", () => { + // WHY (review db_edge#4): member_self_update writes all fields in one UPDATE, so a typed ORCID iD + // another record holds (uq_investigators_orcid_key) refused the whole save with a raw 409. The rule + // is saveProfileLeavingOutHeldOrcid, driven below. + const body = toolBody(fn("bbqs-mcp"), "update_my_profile"); + assert.match(body, /saveProfileLeavingOutHeldOrcid\(\(x\) => rpcC\("member_self_update", x\), args, others\)/, + "update_my_profile does not save through saveProfileLeavingOutHeldOrcid (a held ORCID iD left out, the rest saved, both said)"); + assert.doesNotMatch(body, /rpcC\("member_self_update", \{ \.\.\.args, _orcid: null \}\)/, "update_my_profile retries on its own, past the helper's rule"); + assert.match(body, /orcid_not_saved: r\.orcidNotSaved/, "the result does not say the ORCID iD was not saved"); + for (const tool of ["create_grant", "repoint_grant"]) { + assert.match(toolBody(fn("bbqs-mcp"), tool), /keyedRpcC\(/, `${tool}: a 23505 from the RPC is shown raw`); + } +}); + +test("seed-consortium writes nothing to a record a name alone found unless it has no email", () => { + // WHY (review db_edge#3): the name step merged a roster person into a namesake with another email: + // their ORCID, secondary emails and working groups, and trg_sync_member_groups then queued a Google + // Groups sync for the namesake's address. matchPeople's rule is tested below; this holds the handler to it. + const src = fn("seed-consortium"); + const at = src.indexOf("const match = matchPeople("); + assert.ok(at > 0, "seed-consortium does not keep matchPeople's whole result"); + const guard = src.slice(at).search(/if \(match\.ambiguous \|\| \(nameOnly && emailKey\(match\.row!?\.email\)\)\) \{[\s\S]{0,400}?continue;/); + assert.ok(guard > 0, "an ambiguous match, or a name-only match onto a record with an email, is not skipped"); + const update = src.slice(at).search(/\.from\("investigators"\)\.update\(/); + assert.ok(update > guard, "seed-consortium updates a matched person before it checks the match"); + // The curator's worklist (verification of db_edge#3): every person not written, in full, and a + // note says what was done only once it is done. + assert.match(src.slice(at, at + guard + 400), /needsCurator\.push\(/, "a person a name alone found is not put on the curator's worklist"); + assert.match(src, /needsCuratorDetails: needsCurator[,\s]/, "the curator's worklist is not returned whole"); + assert.doesNotMatch(src, /needsCurator\.slice\(|notes\.slice\(/, "the worklist or the notes are cut short"); + assert.match(src, /errorDetailsOmitted/, "a capped errorDetails does not say how many it leaves out"); + const updated = src.slice(at).search(/updated\+\+;\s*if \(byNameOnly\) \{\s*notes\.push\(/); + assert.ok(updated > update, "the name-only note is not written after the update succeeded"); + assert.doesNotMatch(src.slice(at, at + update), /notes\.push\(`\$\{person\.name\}: matched by name only[^`]*updated it/, + "the note says 'updated it' before anything was updated"); +}); + +test("grant numbers are reduced to the NIH core before they are looked up or written", () => { + const nih = fn("nih-grants"); + assert.match(nih, /searchParams\.get\(\s*["']grant["']\s*\)[\s\S]{0,200}nihAwardCore\(/, "nih-grants: ?grant= is not reduced with nihAwardCore"); + assert.match(nih, /awardKey\(/, "nih-grants: the grant row is not resolved by awardKey"); + const mcp = fn("bbqs-mcp"); + for (const tool of ["create_grant", "repoint_grant", "refresh_grant_from_reporter"]) { + const at = mcp.indexOf(`T("${tool}"`); + assert.ok(at > 0, `bbqs-mcp has no ${tool} tool`); + assert.match(mcp.slice(at, mcp.indexOf("\n });", at)), /nihAwardCore\(|grantNumberFor\(/, `${tool} sends the grant number as typed`); + } + assert.match(mcp, /function grantNumberFor\([\s\S]{0,600}nihAwardCore\(/, "bbqs-mcp: grantNumberFor does not reduce with nihAwardCore"); + const add = fn("add-project-by-grant"); + assert.match(add, /nihAwardCore\(/, "add-project-by-grant: its own regex misses activity codes such as RF1, UG3 and DP2"); +}); + +test("people and organizations are found before they are created, and each path names itself", () => { + const want = { + "nih-grants": ["findOrCreateInvestigator", "findOrCreateOrganization"], + "add-project-by-grant": ["findOrCreateInvestigator", "findOrCreateOrganization"], + "seed-consortium": ["findOrCreateInvestigator"], + "verify-affiliations": ["findOrCreateOrganization"], + }; + for (const [name, helpers] of Object.entries(want)) { + const src = fn(name); + assert.deepEqual(importsFromKgWrite(src, helpers), [], `${name} does not import ${helpers.join(", ")} from _shared/kg-write.ts`); + for (const h of helpers) assert.match(src, new RegExp(`\\b${h}\\(`), `${name} does not call ${h}`); + assert.match(src, /["']x-bbqs-client["']\s*:/, `${name}: its service-role writes do not name themselves (x-bbqs-client)`); + } + assert.doesNotMatch(fn("seed-consortium"), /email\.ilike\./, "seed-consortium: an email ilike on the primary address misses the secondary ones"); +}); + +// ── Syntax: every touched file is TypeScript that strips to a valid ES module ────────────────── +// `node --check` is not this check: on a .ts file inside an ES module package it exits 0 without +// parsing the file (`function f( {` passes). Node's own type stripper parses it, and node --check +// on the stripped JavaScript catches what is left. + +function syntaxErrors(tsSource) { + const strip = nodeModule.stripTypeScriptTypes; + let js; + try { js = strip(tsSource); } catch (e) { return `${e.code ?? "error"}: ${e.message.split("\n")[0]}`; } + const dir = mkdtempSync(join(tmpdir(), "bbqs-guard-")); + try { + const file = join(dir, "stripped.mjs"); + writeFileSync(file, js); + const r = spawnSync(process.execPath, ["--check", file], { encoding: "utf8" }); + return r.status === 0 ? null : (r.stderr.split("\n").find((l) => /Error/.test(l)) ?? r.stderr.trim()); + } finally { + rmSync(dir, { recursive: true, force: true }); + } +} + +test("every file this change touches parses as erasable TypeScript", (t) => { + if (typeof nodeModule.stripTypeScriptTypes !== "function") { + t.skip(`node ${process.version} has no module.stripTypeScriptTypes (Node 22.13+)`); + return; + } + // The check must be able to fail, or it is a green no-op. + assert.ok(syntaxErrors("export function f( {"), "the syntax check accepted a broken file"); + assert.ok(syntaxErrors("enum E { A }"), "the syntax check accepted an enum, which Node cannot strip"); + assert.ok(syntaxErrors("const a = 1;\nconst a = 2;"), "the syntax check missed a redeclaration"); + const files = [...[...WRITE_PATHS.map((n) => `${n}/index.ts`), ...SHARED].map((f) => join(FUNCS, f)), join(ROOT, "src", "lib", "alreadyInKg.ts")]; + const bad = files.map((f) => [relative(ROOT, f), syntaxErrors(readFileSync(f, "utf8"))]).filter(([, e]) => e); + assert.deepEqual(bad, [], "these files do not parse"); +}); + +// ── The helpers, driven with a fake client ───────────────────────────────────────────────────── + +/** A stand-in for supabase-js: tables in memory, unique keys that answer 23505 the way PostgREST + * does, hooks that run just before an insert (another writer, a failure), and a log of every write. */ +function fakeDb(tables = {}, { unique = {}, beforeInsert = {}, rpc = {} } = {}) { + const store = Object.fromEntries(Object.entries(tables).map(([t, rows]) => [t, rows.map((r) => ({ ...r }))])); + const log = []; + let seq = 0; + const rowsOf = (t) => (store[t] ??= []); + const copy = (v) => structuredClone(v); + const violation = (t, row) => { + for (const [name, key] of Object.entries(unique[t] ?? {})) { + const k = key(row); + if (k != null && rowsOf(t).some((r) => key(r) === k)) { + return { code: "23505", message: `duplicate key value violates unique constraint "${name}"`, details: `Key (${name})=(${k}) already exists.` }; + } + } + return null; + }; + const from = (t) => { + const q = { op: "select", filters: [], one: null, payload: null, range: null }; + const run = () => { + const pick = () => rowsOf(t).filter((r) => q.filters.every((f) => f(r))); + if (q.op === "insert") { + const hook = beforeInsert[t]; + const failed = hook ? hook(q.payload, store) : null; + if (failed) return { data: null, error: failed }; + const row = { id: `${t}-${++seq}`, created_at: `2026-11-17T00:00:${String(seq).padStart(2, "0")}Z`, resource_id: null, ...copy(q.payload) }; + const err = violation(t, row); + if (err) return { data: null, error: err }; + rowsOf(t).push(row); + log.push(`insert ${t}`); + return { data: copy(row), error: null }; + } + if (q.op === "update") { + const hit = pick(); + for (const r of hit) Object.assign(r, copy(q.payload)); + log.push(`update ${t} (${hit.length})`); + return { data: copy(hit), error: null }; + } + if (q.op === "delete") { + const hit = new Set(pick()); + store[t] = rowsOf(t).filter((r) => !hit.has(r)); + log.push(`delete ${t} (${hit.size})`); + return { data: null, error: null }; + } + let hit = pick(); + const count = hit.length; + if (q.range) hit = hit.slice(q.range[0], q.range[1] + 1); + if (q.one) { + if (hit.length > 1 || (q.one === "single" && hit.length === 0)) return { data: null, error: { code: "PGRST116", message: `${hit.length} rows` } }; + return { data: hit[0] ? copy(hit[0]) : null, error: null }; + } + return { data: copy(hit), error: null, count }; + }; + const b = { + select() { return b; }, + insert(p) { q.op = "insert"; q.payload = p; return b; }, + update(p) { q.op = "update"; q.payload = p; return b; }, + delete() { q.op = "delete"; return b; }, + eq(c, v) { q.filters.push((r) => r[c] === v); return b; }, + is(c, v) { q.filters.push((r) => (r[c] ?? null) === v); return b; }, + order() { return b; }, + range(a, z) { q.range = [a, z]; return b; }, + single() { q.one = "single"; return b; }, + maybeSingle() { q.one = "maybe"; return b; }, + then(ok, ko) { return Promise.resolve().then(run).then(ok, ko); }, + }; + return b; + }; + return { + store, log, + from, + rpc: async (name, args) => { + log.push(`rpc ${name}`); + if (rpc[name]) return rpc[name](args); + return { data: null, error: { code: "PGRST202", message: `Could not find the function public.${name} in the schema cache` }, status: 404 }; + }, + }; +} + +const kgWrite = () => import(pathToFileURL(KG_WRITE).href); +const nameUnique = { investigators: { investigators_name_key: (r) => r.name ?? null } }; + +test("a new person is written first, then the spine row, attached only while the person has none", async () => { + const K = await kgWrite(); + const db = fakeDb({ investigators: [], resources: [] }, { unique: nameUnique }); + const r = await K.findOrCreateInvestigator(K.kgSession(db), { name: "Ada Lovelace", reporterProfileId: 7 }); + assert.equal(r.ok, true, r.error); + assert.equal(r.created, true); + assert.deepEqual(db.log, ["insert investigators", "insert resources", "update investigators (1)"]); + const [person] = db.store.investigators; + assert.equal(person.reporter_profile_id, 7, "the RePORTER profile id is stored with the new person"); + assert.equal(db.store.resources.length, 1); + assert.equal(person.resource_id, db.store.resources[0].id); + assert.equal(db.store.resources[0].resource_type, "investigator"); +}); + +test("a spine row that cannot be attached is deleted again, never left as an orphan", async () => { + const K = await kgWrite(); + const db = fakeDb({ investigators: [], resources: [] }, { + unique: nameUnique, + // Another writer attaches a node to the new person between our two inserts. + beforeInsert: { resources: (_row, store) => { if (store.investigators[0]) store.investigators[0].resource_id = "resources-theirs"; return null; } }, + }); + const r = await K.findOrCreateInvestigator(K.kgSession(db), { name: "Ada Lovelace" }); + assert.equal(r.ok, true, r.error); + assert.equal(r.spine.created, false); + assert.deepEqual(db.log, ["insert investigators", "insert resources", "update investigators (0)", "delete resources (1)"]); + assert.equal(db.store.resources.length, 0, "our spine row is gone"); + assert.equal(db.store.investigators[0].resource_id, "resources-theirs"); +}); + +test("a person insert refused with 23505 writes no spine row", async () => { + const K = await kgWrite(); + // The refusal comes from a key this run cannot see (the row is not readable to it): nothing to reuse. + const db = fakeDb({ investigators: [], resources: [] }, { + beforeInsert: { investigators: () => ({ code: "23505", message: 'duplicate key value violates unique constraint "uq_investigators_orcid_key"', details: "Key (kg_orcid_key(orcid))=(0000-0002-1825-0097) already exists." }) }, + }); + const r = await K.findOrCreateInvestigator(K.kgSession(db), { name: "Ada Lovelace", orcid: "0000-0002-1825-0097" }); + assert.equal(r.ok, false); + assert.equal(r.already_in_kg, true); + assert.equal(r.constraint, "uq_investigators_orcid_key"); + assert.match(r.detail, /already exists/); + assert.deepEqual(db.log, [], "nothing was written: no person, and no spine row to orphan"); +}); + +test("a person another writer inserted first is read again and reused", async () => { + const K = await kgWrite(); + const db = fakeDb({ investigators: [], resources: [] }, { + unique: nameUnique, + beforeInsert: { investigators: (row, store) => { if (!store.investigators.length) store.investigators.push({ id: "theirs", name: row.name, resource_id: "resources-theirs" }); return null; } }, + }); + const r = await K.findOrCreateInvestigator(K.kgSession(db), { name: "Ada Lovelace" }); + assert.equal(r.ok, true, r.error); + assert.equal(r.row.id, "theirs"); + assert.equal(r.created, false); + assert.match(r.note, /already in the KG \(investigators_name_key\)/); + assert.ok(!db.log.includes("insert resources"), "no spine row for a person this run did not create"); +}); + +test("people are matched by ORCID, profile id, email, name key, then a unique first and last name", async () => { + const K = await kgWrite(); + const rows = [ + { id: "p1", name: "Bijan Pesaran", email: "bp@example.org", orcid: "https://orcid.org/0000-0002-1825-009x" }, + { id: "p2", name: "Patrick McGrath", email: "pm@example.org" }, + { id: "p3", name: "Patrick J McGrath", email: null }, + { id: "p4", name: "Sam A Lee", email: null }, + { id: "p5", name: "Sam B Lee", email: null }, + { id: "p6", name: "Ming Zhan", email: "mz@example.org", secondary_emails: ["Ming.Zhan@Example.ORG"], reporter_profile_id: 42 }, + ]; + const m = (p) => { const r = K.matchPeople(rows, p); return [r.row?.id ?? null, r.by, r.ambiguous]; }; + assert.deepEqual(m({ name: "Someone Else", orcid: "0000-0002-1825-009X" }), ["p1", "orcid", false]); + assert.deepEqual(m({ name: "M. Zhan", reporterProfileId: "42" }), ["p6", "reporter_profile_id", false]); + assert.deepEqual(m({ name: "Zhan Ming", email: " ming.zhan@example.org " }), ["p6", "email", false]); + assert.deepEqual(m({ name: "BIJAN PESARAN" }), ["p1", "name", false]); + assert.deepEqual(m({ name: "Patrick T McGrath" }), ["p2", "first_last", false], "unique among the matches with an email"); + assert.deepEqual(m({ name: "Sam C Lee" }), [null, "first_last", true], "two namesakes and no email to tell them apart"); + assert.deepEqual(m({ name: "Nobody Here" }), [null, null, false]); + assert.deepEqual(K.matchPeople(rows, { name: "Bijan Pesaran", email: "mz@example.org" }, ["email", "orcid", "name"]).row.id, "p6", + "seed-consortium's order: email first"); + + const db = fakeDb({ investigators: rows, resources: [] }); + const amb = await K.findOrCreateInvestigator(K.kgSession(db), { name: "Sam C Lee" }); + assert.equal(amb.ok, false); + assert.deepEqual(amb.ambiguous, ["p4", "p5"]); + assert.deepEqual(db.log, [], "an ambiguous first and last name writes nothing"); +}); + +test("publications are found by PMID key, then DOI key, and a 23505 is read again and reused", async () => { + const K = await kgWrite(); + const pubs = [ + { id: "a", pmid: "0041331138", doi: null, title: "CaBLAM" }, + { id: "b", pmid: null, doi: "10.7554/eLife.89892", title: "eLife paper" }, + ]; + const db = fakeDb({ publications: pubs }); + const kg = K.kgSession(db); + const byPmid = await K.findOrCreatePublication(kg, { pmid: "PMID: 41331138", doi: null, title: "CaBLAM" }); + assert.deepEqual([byPmid.ok, byPmid.row.id, byPmid.matchedBy, byPmid.created], [true, "a", "pmid", false]); + const byDoi = await K.findOrCreatePublication(kg, { pmid: "40000001", doi: "https://doi.org/10.7554/ELIFE.89892/", title: "x" }); + assert.deepEqual([byDoi.row.id, byDoi.matchedBy], ["b", "doi"]); + const conflict = await K.findOrCreatePublication(kg, { pmid: "41331138", doi: "10.7554/elife.89892", title: "x" }); + assert.equal(conflict.row.id, "a", "the PMID's record is reused"); + assert.match(conflict.note, /two records/); + assert.deepEqual(db.log, [], "nothing written for papers already in the KG"); + const none = await K.findOrCreatePublication(kg, { pmid: "", doi: "not a doi", title: "keyless" }); + assert.equal(none.ok, false, "a paper with neither key cannot be recognised next time, so it is not written"); + + const race = fakeDb({ publications: [] }, { + unique: { publications: { uq_publications_pmid_key: (r) => (r.pmid ? String(r.pmid).replace(/^0+/, "") : null) } }, + beforeInsert: { publications: (row, store) => { if (!store.publications.length) store.publications.push({ id: "theirs", pmid: "042", title: row.title }); return null; } }, + }); + const raced = await K.findOrCreatePublication(K.kgSession(race), { pmid: "42", title: "t" }); + assert.deepEqual([raced.ok, raced.row?.id, raced.created], [true, "theirs", false]); + assert.match(raced.note, /uq_publications_pmid_key/); +}); + +test("a publication's spine row is attached only while it has none", async () => { + const K = await kgWrite(); + const db = fakeDb({ publications: [{ id: "a", pmid: "1", title: "T" }], resources: [] }); + const kg = K.kgSession(db); + const [pub] = await K.loadPublications(kg); + const s = await K.ensureSpineRow(kg, "publications", pub, { name: "T", resource_type: "publication", external_url: "https://pubmed.ncbi.nlm.nih.gov/1/" }); + assert.deepEqual([s.ok, s.created], [true, true]); + assert.equal(db.store.publications[0].resource_id, s.resourceId); + const again = await K.ensureSpineRow(kg, "publications", pub, { name: "T", resource_type: "publication" }); + assert.deepEqual([again.created, db.store.resources.length], [false, 1], "a second call writes nothing"); +}); + +test("organizations are found by name key, and a 23505 is read again and reused", async () => { + const K = await kgWrite(); + const db = fakeDb({ organizations: [{ id: "ucsd", name: "UNIVERSITY OF CALIFORNIA, SAN DIEGO", resource_id: "r1" }] }); + const kg = K.kgSession(db); + const found = await K.findOrCreateOrganization(kg, "University of California San Diego"); + assert.deepEqual([found.ok, found.row.id, found.created], [true, "ucsd", false]); + assert.deepEqual(db.log, []); + const made = await K.findOrCreateOrganization(kg, "Duke University"); + assert.deepEqual([made.ok, made.created], [true, true]); + const again = await K.findOrCreateOrganization(kg, "DUKE UNIVERSITY"); + assert.equal(again.row.id, made.row.id, "the run's cache knows the organization it just wrote"); + + const race = fakeDb({ organizations: [] }, { + unique: { organizations: { uq_organizations_name_key: (r) => String(r.name).toLowerCase().replace(/[^a-z0-9]/g, "") } }, + beforeInsert: { organizations: (_row, store) => { if (!store.organizations.length) store.organizations.push({ id: "theirs", name: "Duke University" }); return null; } }, + }); + const raced = await K.findOrCreateOrganization(K.kgSession(race), "DUKE UNIVERSITY"); + assert.deepEqual([raced.ok, raced.row?.id, raced.created], [true, "theirs", false]); +}); + +test("version links are reported as unavailable, not thrown, before 20261117181500 is applied", async () => { + const K = await kgWrite(); + const missing = await K.linkPublicationVersions(fakeDb(), ["a", "b"]); + assert.deepEqual([missing.available, missing.note], [false, "unavailable: 20261117181500 not applied"]); + const undefinedFn = await K.linkPublicationVersions(fakeDb({}, { + rpc: { kg_link_publication_versions: () => ({ data: null, error: { code: "42883", message: "function does not exist" }, status: 404 }) }, + }), ["a"]); + assert.equal(undefinedFn.available, false); + let args = null; + const applied = await K.linkPublicationVersions(fakeDb({}, { + rpc: { kg_link_publication_versions: (a) => { args = a; return { data: [ + { subject_id: "n", object_id: "v", outcome: "done", detail: "PMID 1 revision_of preprint PMID 2" }, + { subject_id: "n2", object_id: "v2", outcome: "noop", detail: "already linked" }, + ], error: null, status: 200 }; } }, + }), ["a", "a", "b"]); + assert.deepEqual(args, { _publication_ids: ["a", "b"], _basis: "algorithmic" }); + assert.deepEqual([applied.available, applied.done, applied.noop, applied.details.length], [true, 1, 1, 1]); +}); + +test("23505 errors are recognised from supabase-js and from a PostgREST body inside an Error", async () => { + const K = await kgWrite(); + const body = new Error('409 {"code":"23505","details":"Key (kg_fon_key(fon))=(RFANS27002) already exists.","hint":null,"message":"duplicate key value violates unique constraint \\"uq_funding_opportunities_fon_key\\""}'); + assert.equal(K.isUniqueViolation(body), true); + assert.equal(K.violatedConstraint(body), "uq_funding_opportunities_fon_key"); + assert.equal(K.violationDetail(body), "Key (kg_fon_key(fon))=(RFANS27002) already exists."); + assert.equal(K.isUniqueViolation({ code: "23503", message: "foreign key" }), false); + assert.equal(K.isMissingFunction({ code: "PGRST202" }), true); +}); + +test("the matchers fold URLs, FONs and resource names with the identity keys", async () => { + const K = await kgWrite(); + const calls = [{ id: "c1", fon: "RFA-NS-27-002", url: "https://grants.nih.gov/grants/guide/rfa-files/RFA-NS-27-002.html" }]; + assert.deepEqual(K.matchFundingCalls(calls, { fon: "rfa ns 27 002" }).byFon.map((r) => r.id), ["c1"]); + assert.deepEqual(K.matchFundingCalls(calls, { fon: "RFA-NS-26-011", url: "http://www.grants.nih.gov/grants/guide/rfa-files/rfa-ns-27-002.html/" }).byUrl.map((r) => r.id), ["c1"]); + const res = [ + { id: "s1", name: "Lightning Pose", resource_type: "software", external_url: "https://lightning-pose.readthedocs.io", repoUrl: "https://github.com/paninski-lab/lightning-pose" }, + { id: "d1", name: "Lightning Pose", resource_type: "dataset", external_url: null }, + ]; + const hits = (q) => K.matchResources(res, q).map((h) => `${h.row.id}:${h.by.join("+")}:${h.same ? "same" : "hint"}`); + assert.deepEqual(hits({ type: "software", name: "lightning-pose" }), ["s1:name:same"]); + assert.deepEqual(hits({ type: "software", name: "LP", repoUrl: "github.com/paninski-lab/lightning-pose/" }), ["s1:repo_url:hint"], + "a repository URL alone is a hint, not the same record"); + assert.deepEqual(hits({ type: "software", repoUrl: "https://github.com/paninski-lab/lightning-pose" }), ["s1:repo_url:hint"], + "with no name to compare, a URL is still only a hint (review: a blank name PATCHed DeepLabCut by its homepage)"); + assert.deepEqual(hits({ type: "software", name: " ", url: "https://lightning-pose.readthedocs.io/" }), ["s1:url:hint"], + "a blank name is no name"); + assert.deepEqual(hits({ type: "ml_model", name: "Lightning Pose" }), [], "never across resource types"); +}); + +// ── Identity, not resemblance: a URL or a name alone never makes two records one (review 2026-11-17) ── + +test("add_resource's rule: a different-named resource that shares only a homepage or repository URL is never updated", async () => { + const K = await kgWrite(); + const dlc = { id: "dlc", name: "DeepLabCut", resource_type: "software", external_url: "https://www.mackenziemathislab.org/deeplabcut", + metadata: { repoUrl: "https://github.com/DeepLabCut/DeepLabCut" } }; + const live = { id: "live", name: "DeepLabCut-Live", resource_type: "software", external_url: "https://www.mackenziemathislab.org/deeplabcut", metadata: {} }; + const ds = { id: "ds", name: "DeepLabCut", resource_type: "dataset", external_url: null }; + const d = (rows, q) => K.decideResource(rows, { type: "software", ...q }); + + // A record that shares only a URL is written neither way on a guess: not updated (it may be another + // tool), and no new record beside it (it may be this one under another name, and no tool removes + // a resource again). The refusal says how to say which it is. + const homepage = d([dlc], { name: "DeepLabCut-Live", url: "https://www.mackenziemathislab.org/deeplabcut/" }); + assert.equal(homepage.action, "refuse", "the homepage DeepLabCut-Live shares with DeepLabCut does not make it DeepLabCut, nor another tool"); + assert.match(homepage.error, /the software "DeepLabCut" \(id dlc\) has the same homepage URL.*Nothing was written/); + assert.match(homepage.error, /call again with same_as="dlc": that record is updated\. If it is another software, call again with distinct=true/); + const live2 = d([dlc], { name: "DeepLabCut-Live", url: "https://www.mackenziemathislab.org/deeplabcut/", distinct: true }); + assert.equal(live2.action, "insert", "distinct=true adds it as its own record"); + assert.match(live2.note, /Added as its own record \(distinct=true\)\. The software "DeepLabCut" \(id dlc\) has the same homepage URL\. It was not changed/); + const repo = d([dlc], { name: "DLC tools", repoUrl: "github.com/DeepLabCut/DeepLabCut/" }); + assert.deepEqual([repo.action, /same repository URL/.test(repo.error)], ["refuse", true]); + assert.equal(d([dlc], { name: "DLC tools", repoUrl: "github.com/DeepLabCut/DeepLabCut/", distinct: true }).action, "insert"); + for (const blank of ["", " ", "\t", null]) { + const r = d([dlc], { name: blank, url: "https://www.mackenziemathislab.org/deeplabcut/", description: "x" }); + assert.equal(r.action, "refuse", `a blank name (${JSON.stringify(blank)}) is refused, never matched to the URL's record`); + assert.match(r.error, /needs a name/); + } + assert.match(d([dlc], { name: "DLC", sameAs: "dlc", distinct: true }).error, /pass one of them/, "same_as and distinct contradict each other"); + assert.equal(d([dlc], { name: "DeepLabCut", distinct: true }).action, "update", "distinct never overrides a record with this name"); + + const byName = d([dlc, live, ds], { name: "deep-lab-cut", url: "https://www.mackenziemathislab.org/deeplabcut" }); + assert.deepEqual([byName.action, byName.row?.id, byName.matchedBy], ["update", "dlc", "name+url"]); + assert.match(byName.note, /"DeepLabCut-Live" \(id live\) has the same homepage URL\. It was not changed/, "the URL twin is named, not refused"); + const twice = d([dlc, { ...dlc, id: "dlc2", name: "deeplabcut" }], { name: "DeepLabCut" }); + assert.equal(twice.action, "refuse"); + assert.match(twice.error, /2 software records match "DeepLabCut".*Merge them first; nothing was written/); + + const alias = d([dlc, live], { name: "DLC", sameAs: "dlc" }); + assert.deepEqual([alias.action, alias.row?.id, alias.matchedBy], ["update", "dlc", "same_as"], "same_as is the explicit way"); + assert.deepEqual([d([dlc], { name: "DLC", sameAs: "DeepLabCut" }).row?.id], ["dlc"], "same_as may name the record"); + assert.match(d([dlc], { name: "DLC", sameAs: "nope" }).error, /same_as="nope" names no software in the KG/); + assert.match(d([dlc, ds], { name: "DLC", sameAs: "ds" }).error, /is the dataset "DeepLabCut" \(id ds\), not a software/); + assert.match(d([dlc, live], { name: "DeepLabCut-Live", sameAs: "dlc" }).error, /already in the KG as "DeepLabCut-Live" \(id live\), not "DeepLabCut" \(id dlc\)/, + "same_as cannot override the record that has this name"); + + const cjk = { id: "cjk", name: "深度标注", resource_type: "software", external_url: "https://lab.example/tools" }; + assert.deepEqual([d([cjk], { name: "深度标注", url: "https://lab.example/tools" }).action, d([cjk], { name: "别的工具", url: "https://lab.example/tools" }).action], + ["update", "refuse"], "a name with no name key is compared exactly (another name on the same URL: say which it is)"); + assert.match(d([ds], { name: "DeepLabCut" }).note, /Also in the KG under another type: dataset "DeepLabCut" \(id ds\)/); +}); + +test("add_funding_opportunity's rule: the FON is the call; a shared notice URL is a hint, never a refusal", async () => { + const K = await kgWrite(); + const page = "https://grants.nih.gov/funding/find-a-fit-for-your-research/highlighted-topics/18"; + const rows = [ + { id: "f1", fon: "RFA-NS-28-001", url: null, notes: null }, + { id: "f0", fon: "RFA-NS-27-002", url: "https://simpler.grants.gov/opportunity/ffe98704", notes: null }, + { id: "n1", fon: "NOT-MH-25-155", url: page, notes: null }, + ]; + const byFon = K.decideFundingCall(rows, { fon: "rfa ns 28 001", url: "simpler.grants.gov/opportunity/ffe98704/" }); + assert.deepEqual([byFon.action, byFon.row?.id, byFon.matchedBy], ["update", "f1", "fon"]); + assert.match(byFon.notes.join(" "), /Its notice URL is also on RFA-NS-27-002 \(id f0\)\. A URL can be a landing page/); + const landing = K.decideFundingCall(rows, { fon: "NOT-MH-25-156", url: page }); + assert.equal(landing.action, "insert", "a second call on one landing page is added, not refused"); + assert.match(landing.notes.join(" "), /also on NOT-MH-25-155 \(id n1\)/); + const sup = K.decideFundingCall(rows, { fon: "RFA-NS-29-001", url: "https://simpler.grants.gov/opportunity/ffe98704", supersedes: "RFA-NS-27-002" }); + assert.deepEqual([sup.action, sup.row?.id, sup.matchedBy], ["update", "f0", "supersedes"]); + assert.match(sup.notes[0], /RFA-NS-27-002 is now RFA-NS-29-001/); + const both = K.decideFundingCall(rows, { fon: "RFA-NS-28-001", supersedes: "RFA-NS-27-002" }); + assert.deepEqual([both.row?.id, /RFA-NS-27-002 \(id f0\) is still a separate row/.test(both.notes.join(" "))], ["f1", true]); + const twice = K.decideFundingCall([...rows, { id: "f2", fon: "RFA NS 28 001", url: null }], { fon: "RFA-NS-28-001" }); + assert.match(twice.error, /RFA-NS-28-001 \(id f1\), RFA NS 28 001 \(id f2\) are one call recorded 2 times/); + const none = K.decideFundingCall(rows, { fon: "PAR-26-001", supersedes: "PAR-25-999" }); + assert.deepEqual([none.action, none.notes], ["insert", ["No call with FON PAR-25-999 is in the KG, so nothing was superseded"]]); +}); + +test("people: a name that fits a record with another email, or several records, is ambiguous and writes nothing", async () => { + const K = await kgWrite(); + const rows = [ + { id: "ns", name: "CHUCK MIKELL", email: "someone.else@elsewhere.example" }, + { id: "a", name: "Li Na", email: "lina@a.example" }, + { id: "b", name: "Lina", email: "lina@b.example" }, + { id: "tw", name: "BIJAN PESARAN", email: null }, + ]; + const seed = (p) => K.matchPeople(rows, p, ["email", "orcid", "name"]); + const ns = seed({ name: "Chuck Mikell", email: "charles.mikell@stonybrookmedicine.edu" }); + assert.deepEqual([ns.row, ns.by, ns.ambiguous], [null, "name", true], "a namesake with another email is not this person"); + assert.match(ns.reason, /matched only by name to "CHUCK {2}MIKELL" \(id ns\), whose email is not this person's/); + assert.doesNotMatch(ns.reason, /someone\.else/, "the reason does not repeat another person's address"); + const tw = seed({ name: "Bijan Pesaran", email: "bp@example.org" }); + assert.deepEqual([tw.row?.id, tw.ambiguous], ["tw", false], "a twin with no email is still reused (the RePORTER-twin case)"); + const two = K.matchPeople(rows, { name: "LI NA" }); + assert.deepEqual([two.row, two.by, two.ambiguous], [null, "name", true], "two records with the name key and two emails are two candidates, not one"); + assert.match(two.reason, /2 records with 2 different emails match by name/); + assert.deepEqual(K.matchPeople(rows, { name: "LI NA", email: "lina@b.example" }).row.id, "b", "an email still decides it"); + + const db = fakeDb({ investigators: rows, resources: [] }); + const made = await K.findOrCreateInvestigator(K.kgSession(db), { name: "Chuck Mikell", email: "charles.mikell@stonybrookmedicine.edu" }); + assert.deepEqual([made.ok, made.ambiguous], [false, ["ns"]]); + assert.deepEqual(db.log, [], "no second Chuck Mikell, and nothing written to the namesake"); +}); + +test("people: a curated record and its email-less RePORTER copy are one person, and the curated one is reused", async () => { + // WHY (verification of db_edge#3): matchPeople made every group of two or more name-key records + // ambiguous, so nih-grants and add-project-by-grant linked a RePORTER PI to neither record of the + // documented twin pair (20260811120000), and the PI dropped out of pi@ (Principle III, #283). Only + // records that carry two different emails are two people. + const K = await kgWrite(); + const keeper = { id: "keeper", name: "Bijan Pesaran", email: "bp@example.org", resource_id: "res-i1", created_at: "2026-02-01T00:00:00Z" }; + const stub = { id: "stub", name: "BIJAN PESARAN", email: null, resource_id: null, created_at: "2025-02-01T00:00:00Z" }; + const stub2 = { id: "stub2", name: "bijan pesaran", email: " ", resource_id: null, created_at: "2024-02-01T00:00:00Z" }; + const m = (rows, p) => { const r = K.matchPeople(rows, p); return [r.row?.id ?? null, r.by, r.ambiguous]; }; + assert.deepEqual(m([stub, keeper], { name: "BIJAN PESARAN" }), ["keeper", "name", false], "the curated record, the one with the email"); + assert.deepEqual(m([stub2, stub, keeper], { name: "Bijan Pesaran" }), ["keeper", "name", false], "a blank email is none"); + assert.deepEqual(m([stub, { ...stub2, email: null, resource_id: "res-s2" }], { name: "Bijan Pesaran" }), ["stub2", "name", false], + "two email-less copies: the node, then the oldest"); + assert.deepEqual(m([keeper, { ...stub, email: "bijan@other.example" }], { name: "Bijan Pesaran" }), [null, "name", true], + "two different emails: a curator tells them apart"); + assert.deepEqual(m([keeper, { ...stub, email: "BP@example.org " }], { name: "Bijan Pesaran" }), ["keeper", "name", false], + "one email in two spellings is one email"); + + const db = fakeDb({ investigators: [stub, keeper], resources: [] }); + const r = await K.findOrCreateInvestigator(K.kgSession(db), { name: "BIJAN PESARAN", reporterProfileId: 12 }); + assert.deepEqual([r.ok, r.row?.id, r.created, r.matchedBy], [true, "keeper", false, "name"], "nih-grants' call links the curated record"); + assert.deepEqual(db.log, [], "and writes nothing"); +}); + +test("the member's own profile, through the MCP: an ORCID iD another record holds is left out, said, and only it is retried", async () => { + // WHY (verification of db_edge#4): when the retry without the ORCID failed for another reason, the + // member got only that second error, never told the ORCID iD was left out; and nothing pinned that + // only an ORCID 23505 is retried. + const K = await kgWrite(); + const args = { _institution: "New Institute", _orcid: "0000-0003-9999-0001", _research_areas: null, _skills: null, _secondary_emails: ["x@y"], _requested_working_groups: null }; + const held = new Error('409 {"code":"23505","details":"Key (kg_orcid_key(orcid))=(0000-0003-9999-0001) already exists.","message":"duplicate key value violates unique constraint \\"uq_investigators_orcid_key\\""}'); + const run = async (answers, asked = ["institution", "secondary_emails"], a = args) => { + const calls = []; + try { + const r = await K.saveProfileLeavingOutHeldOrcid(async (x) => { calls.push(x); const ans = answers[calls.length - 1]; if (ans instanceof Error) throw ans; return ans; }, a, asked); + return { calls, r }; + } catch (e) { + return { calls, error: e.message }; + } + }; + const ok = await run([held, { ok: true }]); + assert.deepEqual(ok.calls.map((c) => c._orcid), ["0000-0003-9999-0001", null], "saved again with the stored ORCID kept (a null _orcid)"); + assert.deepEqual(ok.calls[1], { ...args, _orcid: null }, "every other field is sent unchanged"); + assert.deepEqual([ok.r.result, ok.r.saved], [{ ok: true }, ["institution", "secondary_emails"]]); + assert.match(ok.r.orcidNotSaved, /The ORCID iD 0000-0003-9999-0001 is already on another person's record in the KG \(uq_investigators_orcid_key\).*ask a curator to merge/); + + const both = await run([held, new Error('403 {"code":"42501","message":"x@y belongs to another member; ask a curator to merge the records"}')]); + assert.equal(both.calls.length, 2); + assert.match(both.error, /^The ORCID iD 0000-0003-9999-0001 is already on another person's record.*The other fields \(institution, secondary_emails\) were not saved either: .*x@y belongs to another member/, + "a failed retry still says the ORCID iD was left out, then why the rest was not saved"); + + const node = await run([new Error('409 {"code":"23505","details":"Key (resource_id)=(r1) already exists.","message":"duplicate key value violates unique constraint \\"uq_investigators_resource_id\\""}')]); + assert.deepEqual([node.calls.length, /^Nothing was saved: .*uq_investigators_resource_id/.test(node.error)], [1, true], "only an ORCID 23505 is retried"); + const alone = await run([held], []); + assert.deepEqual([alone.calls.length, /Nothing else was asked, so nothing was saved/.test(alone.error)], [1, true]); + const noOrcid = await run([held], ["institution"], { ...args, _orcid: null }); + assert.deepEqual([noOrcid.calls.length, /^Nothing was saved/.test(noOrcid.error)], [1, true], "no ORCID was sent: nothing to leave out"); + const other = await run([new Error("500 boom")]); + assert.deepEqual([other.calls.length, other.error], [1, "500 boom"], "any other error is thrown as it came"); + const first = await run([{ ok: true }]); + assert.deepEqual([first.calls.length, first.r.orcidNotSaved], [1, null]); +}); + +// ── src: the pages that write an identity key say a refusal as what it is ───────────────────────── + +const ALREADY_IN_KG = join(ROOT, "src", "lib", "alreadyInKg.ts"); +const srcFile = (p) => read(`src/${p}`); +const srcFiles = (dir = join(ROOT, "src")) => readdirSync(dir).flatMap((n) => { + const p = join(dir, n); + return statSync(p).isDirectory() ? srcFiles(p) : /\.tsx?$/.test(p) ? [p] : []; +}); + +test("a unique violation is said as the key it is; every other error is left alone", async () => { + const L = await import(pathToFileURL(ALREADY_IN_KG).href); + const pg = (constraint, key) => ({ code: "23505", message: `duplicate key value violates unique constraint "${constraint}"`, details: `Key (expr(col))=(${key}) already exists.`, hint: null }); + assert.deepEqual(L.uniqueViolation(pg("uq_investigators_orcid_key", "0000-0003-9999-0001")), { constraint: "uq_investigators_orcid_key", key: "0000-0003-9999-0001" }); + assert.equal(L.uniqueViolation({ code: "42501", message: "only curators can change email" }), null); + assert.equal(L.alreadyInKgMessage(new Error("Failed to fetch")), null, "not a duplicate: the caller shows it as it is"); + const inBody = new Error('409 {"code":"23505","details":"Key (kg_fon_key(fon))=(RFADA26001) already exists.","message":"duplicate key value violates unique constraint \\"uq_funding_opportunities_fon_key\\""}'); + assert.match(L.alreadyInKgMessage(inBody, { fon: "RFA-DA-26-001" }), /^The funding opportunity RFA-DA-26-001 is already in the KG/); + assert.match(L.alreadyInKgMessage(pg("uq_investigators_orcid_key", "0000-0003-9999-0001")), /ORCID iD 0000-0003-9999-0001 is already on another person's record.*ask a curator to merge/); + assert.match(L.alreadyInKgMessage(pg("uq_publications_doi_key", "10.1038/abc"), { doi: "https://doi.org/10.1038/ABC" }), /DOI https:\/\/doi\.org\/10\.1038\/ABC is already in the KG/); + assert.match(L.alreadyInKgMessage(pg("uq_projects_award_key", "R34DA059506"), { award: "R34DA059506" }), /award R34DA059506 is already in the KG under another spelling/); + assert.match(L.alreadyInKgMessage(pg("uq_publications_resource_id", "x")), /node in the KG belongs to another record/, "resource_id is not read as a DOI or PMID"); + assert.match(L.alreadyInKgMessage(pg("some_new_key", "x")), /already in the KG \(some_new_key\)/); + assert.equal(L.keyKind("uq_funding_opportunities_url_key"), null, "a URL is no key: no message claims the database refuses a second one"); +}); + +test("the member's own profile saves without an ORCID iD another record holds, and says so", async () => { + const L = await import(pathToFileURL(ALREADY_IN_KG).href); + const args = { _institution: "New Institute", _orcid: "0000-0003-9999-0001", _research_areas: ["Motor control"], _skills: [], _secondary_emails: [], _requested_working_groups: [] }; + const calls = []; + const held = { code: "23505", message: 'duplicate key value violates unique constraint "uq_investigators_orcid_key"', details: "Key (kg_orcid_key(orcid))=(0000-0003-9999-0001) already exists." }; + const r = await L.saveOwnProfile(async (a) => { calls.push(a); return a._orcid ? { data: null, error: held } : { data: { ok: true }, error: null }; }, args); + assert.deepEqual(calls.map((a) => a._orcid), ["0000-0003-9999-0001", null], "saved again with the stored ORCID kept (a null _orcid)"); + assert.deepEqual(calls[1], { ...args, _orcid: null }, "every other field is sent unchanged"); + assert.deepEqual([r.error, r.data], [null, { ok: true }]); + assert.match(r.orcidNotSaved, /already on another person's record.*ask a curator to merge/); + + for (const other of [ + { code: "42501", message: "x@y belongs to another member; ask a curator to merge the records" }, + { code: "23505", message: 'duplicate key value violates unique constraint "uq_investigators_resource_id"', details: "Key (resource_id)=(r1) already exists." }, + ]) { + const seen = []; + const r2 = await L.saveOwnProfile(async (a) => { seen.push(a); return { data: null, error: other }; }, args); + assert.deepEqual([seen.length, r2.error, r2.orcidNotSaved], [1, other, null], `${other.code} ${other.message}: returned as it came, and nothing is retried`); + } +}); + +// The identity-keyed columns of each table, from kg/identity_keys.json: every key's unique index +// (table and column), the keys in force before it (an email, a dandiset), and resource_id on each +// node table (one detail row per node). A write of any of them can be refused with 23505. +function keyedColumns() { + const s = JSON.parse(read("kg/identity_keys.json")); + const cols = {}; + const add = (t, c) => (cols[t] ??= new Set()).add(c); + for (const k of [...Object.values(s.keys), ...(s.existing || [])]) { + for (const d of k.db || []) for (const c of d.columns || (d.column ? [d.column] : [])) add(d.table, c); + } + for (const t of s.one_row_per_node || []) add(t, "resource_id"); + return cols; +} + +/** The argument of the write call that starts at src[i] (just after "insert(" etc.), up to its + * matching parenthesis, with strings and template literals skipped. */ +function callArgument(src, i) { + let depth = 1, j = i; + const stack = []; + while (j < src.length) { + const c = src[j]; + if (stack.length && stack[stack.length - 1] === "`") { + if (c === "\\") { j += 2; continue; } + if (c === "`") stack.pop(); + else if (c === "$" && src[j + 1] === "{") { stack.push("${"); j += 2; continue; } + j++; continue; + } + if (c === "'" || c === '"') { + const q = c; j++; + while (j < src.length && src[j] !== q) j += src[j] === "\\" ? 2 : 1; + j++; continue; + } + if (c === "`") { stack.push("`"); j++; continue; } + if (c === "}" && stack.length && stack[stack.length - 1] === "${") { stack.pop(); j++; continue; } + if (c === "(" || c === "[" || c === "{") depth++; + if (c === ")" || c === "]" || c === "}") { depth--; if (depth === 0) return src.slice(i, j); } + j++; + } + return src.slice(i); +} + +/** The columns an insert/upsert/update argument writes: the keys of an object literal (shorthand + * ones too), or null when that cannot be read (a variable, a spread, a computed key): then every + * keyed column of the table counts as written. */ +function columnsWritten(arg) { + const a = arg.trim(); + if (!a.startsWith("{")) return null; + const body = callArgument(a, 1); + const parts = []; + let depth = 0, start = 0, quote = null; + for (let j = 0; j < body.length; j++) { + const c = body[j]; + if (quote) { if (c === "\\") j++; else if (c === quote) quote = null; continue; } + if (c === "'" || c === '"' || c === "`") { quote = c; continue; } + if ("([{".includes(c)) depth++; + else if (")]}".includes(c)) depth--; + else if (c === "," && depth === 0) { parts.push(body.slice(start, j)); start = j + 1; } + } + parts.push(body.slice(start)); + const keys = new Set(); + for (const raw of parts) { + const part = raw.trim(); + if (!part) continue; + if (part.startsWith("...") || part.startsWith("[")) return null; + const m = part.match(/^["']?([A-Za-z_$][\w$]*)["']?\s*(:|$)/); + if (!m) return null; + keys.add(m[1]); + } + return keys; +} + +/** Every src write (insert, upsert, update) of an identity-keyed column: file, line, table, call, + * the keyed columns it writes, and its statement text. */ +function keyedSrcWrites(files = srcFiles()) { + const cols = keyedColumns(); + const tables = Object.keys(cols); + const from = new RegExp(`\\.from\\(\\s*["'](${tables.join("|")})["'](?:\\s+as\\s+any)?\\s*\\)(?:\\s+as\\s+any\\s*\\))?`, "g"); + const out = []; + for (const p of files) { + const rel = relative(join(ROOT, "src"), p).replace(/\\/g, "/"); + if (rel.startsWith("integrations/")) continue; + const s = readFileSync(p, "utf8"); + for (const m of s.matchAll(from)) { + const tail = s.slice(m.index + m[0].length, m.index + m[0].length + 1500); + const call = tail.match(/^\s*\.(insert|upsert|update)\(/); + if (!call) continue; + const written = columnsWritten(callArgument(tail, call[0].length)); + const hit = written === null ? [...cols[m[1]]] : [...written].filter((c) => cols[m[1]].has(c)); + if (!hit.length) continue; + out.push({ file: `src/${rel}`, line: lineOf(s, m.index), table: m[1], op: call[1], columns: hit.sort(), at: m.index, src: s }); + } + } + return out; +} + +// Writes of a keyed table whose key is provably never written, each with the check that proves it. +// A new write of a keyed column is not exempt: it must say a 23505 as what it is. +const KEY_NEVER_WRITTEN = { + "src/pages/JobBoard.tsx": (w) => w.table === "jobs" && /^\.from\("jobs"\)\s*\.(insert|update)\(\{\s*\.\.\.data,/.test(w.src.slice(w.at, w.at + 200)) + && /interface JobFormData \{[^}]*\}/.test(w.src) && !/interface JobFormData \{[^}]*resource_id/.test(w.src), // { ...data }: a JobFormData, which has no resource_id + "src/hooks/useMetadataEditor.ts": (w) => w.table === "projects" && w.op === "update" + && /\.update\(row\)\s*\.eq\("grant_number", grantNumber\)/.test(w.src.slice(w.at, w.at + 300)) + && /grant_number: grantNumber,/.test(w.src), // sets grant_number to the value it selects the row by +}; + +test("every src write of an identity-keyed column turns a 23505 into alreadyInKg's message", () => { + // WHY (review db_edge#4, and its verification): after 20261117181500 these writes are refused by a + // uq_* index (and investigators' email by investigators_email_unique_ci), and showed the raw + // Postgres text, or (InvestigatorSummary) no reason at all. The check is per statement, on every + // table and column kg/identity_keys.json keys, for .update() as well as .insert()/.upsert(). + const writers = { + "components/profile/MemberProfileEditor.tsx": /saveOwnProfile\(/, // investigators.orcid (member_self_update) + "components/entity-summary/summaries/InvestigatorSummary.tsx": /alreadyInKgMessage\(err/, // investigators.orcid, inline edit + "pages/Publications.tsx": /alreadyInKgMessage\(err, \{ doi:/, // publications.doi + "components/funding/AddFundingOpportunityDialog.tsx": /alreadyInKgMessage\(error, \{ fon/, // funding_opportunities.fon + "components/project-profile/useProjectProfileEditor.ts": /alreadyInKgMessage\(e, \{ award:/, // projects.grant_number (upsert) + "pages/AdminUsers.tsx": /alreadyInKgMessage\(error, \{ email/, // investigators.email, name + "pages/AdminAccessRequests.tsx": /alreadyInKgMessage\(invErr, \{ email/, // investigators.email, name + }; + for (const [p, use] of Object.entries(writers)) { + const s = srcFile(p); + assert.match(s, /from "@\/lib\/alreadyInKg"/, `${p} does not import @/lib/alreadyInKg`); + assert.match(s, use, `${p} does not say a 23505 as what it is`); + } + const cols = keyedColumns(); + for (const [t, c] of [["investigators", "orcid"], ["investigators", "email"], ["publications", "doi"], ["publications", "pmid"], + ["organizations", "name"], ["grants", "grant_number"], ["projects", "grant_number"], ["funding_opportunities", "fon"], ["jobs", "resource_id"]]) { + assert.ok(cols[t]?.has(c), `kg/identity_keys.json no longer keys ${t}.${c}: this check would skip its writes`); + } + const unhandled = []; + for (const w of keyedSrcWrites()) { + const exempt = KEY_NEVER_WRITTEN[w.file]; + if (exempt && exempt(w)) continue; + // The write's own error handling: the next statements after it, up to its handler. + const after = w.src.slice(w.at, w.at + 1500); + const handled = /from "@\/lib\/alreadyInKg"/.test(w.src) && /\b(alreadyInKgMessage|saveOwnProfile)\(/.test(after); + if (!handled) unhandled.push(`${w.file}:${w.line} ${w.table}.${w.op} (${w.columns.join(", ")})`); + } + assert.deepEqual(unhandled, [], "src writes of an identity-keyed column that show a 23505 raw: say it with alreadyInKgMessage at the write"); + const selfUpdates = srcFiles() + .filter((p) => { const s = readFileSync(p, "utf8"); return /rpc\(\s*["']member_self_update["']/.test(s) && !/saveOwnProfile\(/.test(s); }) + .map((p) => relative(ROOT, p)); + assert.deepEqual(selfUpdates, [], "member_self_update called without saveOwnProfile: a held ORCID iD refuses the whole save"); +}); + +test("the src write check sees inserts, upserts and updates of every keyed column, and nothing else", () => { + // The check must be able to fail (review: three planted raw writes passed the old one). + const dir = mkdtempSync(join(tmpdir(), "bbqs-src-guard-")); + try { + const file = join(dir, "RawKeyWrites.tsx"); + writeFileSync(file, [ + 'export async function raw(supabase: any, name: string, orcid: string, doi: string, id: string, field: string) {', + ' await supabase.from("investigators").insert({ name, orcid });', + ' await supabase.from("publications").update({ doi }).eq("id", id);', + ' await supabase.from("organizations").update({ name: name.trim() }).eq("id", id);', + ' await supabase.from("investigators").update({ [field]: name }).eq("id", id);', + ' await (supabase.from("projects" as any) as any).upsert({ grant_number: name, title: "x" });', + ' await supabase.from("species").insert({ resource_id: id, common_name: name });', + ' await supabase.from("investigators").update({ institution: name, research_areas: [] }).eq("id", id);', + ' await supabase.from("announcements").insert({ title: `Read ${name}`, content: name });', + ' await supabase.from("publications").delete().eq("id", id);', + "}", + ].join("\n")); + const got = keyedSrcWrites([file]).map((w) => `${w.table}.${w.op}:${w.columns.join("+")}`); + assert.deepEqual(got, [ + "investigators.insert:orcid", "publications.update:doi", "organizations.update:name", + `investigators.update:${[...keyedColumns().investigators].sort().join("+")}`, + "projects.upsert:grant_number", "species.insert:resource_id", + ], "the planted keyed writes, and no other"); + } finally { + rmSync(dir, { recursive: true, force: true }); + } +});