# Prepaire reference knowledge graph: the signed build, for your own Neo4j This folder holds the files the builder of Prepaire's reference knowledge graph (KG v2) signed for build `prepaire:build/3ee489ad88d928d3` (`built_at` 2026-11-28T09:23:45Z), byte for byte: `manifest.json`, its signature, and the 310 CSV files and `constraints.cypher` that `manifest.json` lists with their SHA-256. Beside them, and not signed: the public key (`allowed_signers`), the sources' notices (`ATTRIBUTION.md`), and VERA's `README.md`, `verify.sh`, `import.sh`, `check.cypher` and `examples.cypher`. It is the same build VERA serves through `/api/v1/reference-graph/*`. It holds reference data only: 44 pinned public sources, each a source that nodes or edges of the build name as theirs besides the `ReferenceRelease` node of its own release (`ATTRIBUTION.md` lists every such source with the count of those records), and 5 sources named the same way that are Prepaire's own tables of hand-made rows, each row signed for the build by a named person: `genome_reference_catalogue`, `model_layer`, `read_for`, `test_about` and `test_analytes`. Each node and each edge names its source, the source's release and its licence (`source`, `source_release`, `licence`). | | | |---|---| | Build | `3ee489ad88d928d3ba6db50523a1e3bbca1232a38e7faa973b513011eaa2f73f` (sha256 over the schema version, the profile, the code version and the lock digest: `schema_version`, `profile`, `code_version` and `lock_sha256` in `manifest.json`) | | Content | 5,593,578 nodes in 45 labels, 20,284,892 edges in 65 types; `output_sha256` `af0b39c0304f5dce67d89f6d201c5460b51bb977636605eeabe20628b653f6d2` | | Nodes by label | `AnatomicalStructure` 8,635, `BiologicalProcess` 1, `Biomarker` 242, `CancerAssertion` 164, `CancerEvidence` 4,974, `CellType` 2,985, `ClassificationConflict` 182,892, `ClinicalCode` 270,353, `ClockModel` 13, `DataType` 9, `Diplotype` 23,288, `Disease` 23,777, `DosageSensitivity` 1,541, `Drug` 283, `Gene` 42,545, `GenomeReference` 11, `GraphBuild` 1, `GwasStudy` 76,718, `Haplotype` 603, `InstrumentClass` 9, `Metabolite` 18,575, `MetabolizerPhenotype` 72, `Model` 115, `ModelRun` 18, `NaturalHistory` 7,790, `Organ` 2,730, `OrganismTaxon` 8, `Pathway` 2,889, `PgxClinicalAnnotation` 5,192, `PgxGuideline` 29, `PgxVariantAnnotation` 29,834, `PhenotypicFeature` 19,178, `PolygenicScoreModel` 6,991, `Population` 38, `PrevalenceEstimate` 17,108, `Protein` 20,431, `Recommendation` 2,159, `ReferenceRelease` 73, `StructuralVariant` 176,531, `Symptom` 895, `Tissue` 1,831, `Trait` 16,742, `Variant` 4,611,314, `VariantCuration` 13,990, `VariantEffectPredictor` 1 | | Edges by type | `ANATOMY_HAS_CELL_TYPE` 324, `ANATOMY_PART_OF` 8,726, `ANATOMY_SUBCLASS_OF` 17,197, `ANNOTATION_ABOUT_DRUG` 29,791, `CALLED_IN` 176,531, `CARRIED_IN_POPULATION` 3,114,744, `CELL_TYPE_LOCATED_IN` 3,198, `CELL_TYPE_PART_OF` 1,136, `CELL_TYPE_SUBCLASS_OF` 4,355, `CLASSIFIED_FOR_CONDITION` 2,644,414, `CLOCK_OF` 11, `CODE_CHILD_OF` 181,542, `CURATION_FOR_CONDITION` 13,958, `DATA_PRODUCED_BY` 15, `DEFINED_BY_HAPLOTYPE` 46,065, `DEFINED_BY_VARIANT` 1,124, `DERIVED_FROM_REFERENCE` 8, `DISEASE_SUBCLASS_OF` 36,141, `DOSAGE_ASSOCIATED_WITH` 424, `ENCODED_BY` 19,337, `ENRICHED_IN` 431, `EVIDENCE_ABOUT_GENE` 6,221, `EVIDENCE_FOR_CONDITION` 4,800, `FEEDS` 4, `FOLLOWS_CLOCK_METHOD` 11, `GENE_ASSOCIATED_WITH` 58,370, `GENE_ASSOCIATED_WITH_PHENOTYPE` 256,250, `GENE_ENRICHED_IN` 24,053, `GENE_ENRICHED_IN_CELL_TYPE` 21,985, `GWAS_ASSOCIATED_WITH` 84,627, `HAS_ANALYTE` 266, `HAS_CANCER_EVIDENCE` 2,317, `HAS_CLASSIFICATION_CONFLICT` 182,923, `HAS_COORDINATE_ON` 4,610,636, `HAS_DOSAGE_SENSITIVITY` 1,541, `HAS_EXPERT_CURATION` 13,400, `HAS_GUIDELINE` 148, `HAS_NATURAL_HISTORY` 7,790, `HAS_PGX_ANNOTATION` 29,749, `HAS_PHENOTYPE` 242,738, `HAS_PREVALENCE` 17,108, `HAS_SYMPTOM` 4,498, `INFORMS` 82, `LOCATED_IN` 4,619,107, `MAPPED_TO` 318,621, `MARKER_OF_CELL_TYPE` 9,577, `OVERLAPS_GENE` 90,061, `PARTICIPATES_IN` 68,689, `PHENOTYPE_SUBCLASS_OF` 23,717, `PREDICTED_BY` 2,547,087, `PREDICTS` 23,288, `READS` 75, `READ_FOR` 331, `RECOMMENDATION_FOR` 2,425, `RUN_OF` 18, `SAMPLED_FROM` 63, `SCORES_TRAIT` 6,497, `SEEN_IN` 228,419, `STUDY_OF_TRAIT` 84,344, `SYMPTOM_SUBCLASS_OF` 898, `TEST_ABOUT` 64, `TRAIT_ABOUT` 61, `TRAIT_IS_DISEASE` 1,188, `USES_PROTEIN` 641, `VARIANT_ASSOCIATED_WITH` 390,732 | | Signed | `manifest.json`, with OpenSSH (`manifest.json.sig`, principal and namespace `prepaire-kg-build`). It lists the size and SHA-256 of each of the 310 CSV files in `csv/` (the format of `neo4j-admin database import`: delimiter `;`, array delimiter `\|`, quote `'`) and the SHA-256 of `constraints.cypher`, so those are covered through it | | Signing key | ED25519, fingerprint `SHA256:KVPlqDbWHStLFb7IEX95Vqf6W8FUFgIBfRgIFpdxqhU`. The copy of the key in `allowed_signers` is not proof of anything by itself (section 1) | | Not signed | `allowed_signers`, `ATTRIBUTION.md`, this README, `verify.sh`, `import.sh`, `check.cypher`, `examples.cypher` | What the build holds of the laboratory tests: 173 of the 242 laboratory tests (`Biomarker`) are linked to what they measure, by 266 `HAS_ANALYTE` edges to 166 proteins and metabolites; each of those edges carries the name of the person who signed its row for the build and the day (`reviewed_by`, `reviewed_at`), and 1,355 hand-made rows are signed for the build (`GraphBuild.review_signed_off`). A hand-made row is a row of a table that was compiled by hand or by a build agent from the source the row names; it enters this build only signed by a named person. That signature is a signature for the build, not a specialist's review of the row. Where a record of the build states it is read here from the build's CSV files, their headers and their rows: - `review_status`, `review_table`, `reviewed_by` and `reviewed_at`, on a record that rests on one such row (`review_table` names the row's table): the four are filled on 183,005 records of 18 labels and types (`ClockModel` 13, `DATA_PRODUCED_BY` 15, `DOSAGE_ASSOCIATED_WITH` 424, `DataType` 9, `FEEDS` 4, `FOLLOWS_CLOCK_METHOD` 11, `GENE_ENRICHED_IN` 11,977, `GENE_ENRICHED_IN_CELL_TYPE` 11,660, `GenomeReference` 7, `HAS_ANALYTE` 266, `INFORMS` 82, `InstrumentClass` 9, `MAPPED_TO` 157,925, `Model` 115, `ModelRun` 18, `READS` 75, `READ_FOR` 331, `TEST_ABOUT` 64). - `review_status` and `value_reviews`, on a source's own record to which such rows add values: the two are filled on 73,386 records of 3 labels and types (`GENE_ASSOCIATED_WITH` 49,401, `NaturalHistory` 6,877, `PrevalenceEstimate` 17,108); `value_reviews` names each added value's table, its row, who signed it and the day. - `manifest.json`, `review`: each reviewed table with the count of its rows a named person has signed off; 32 tables have signed rows in this build, 1,355 rows in all. It is where the signature stands for the records of `DERIVED_FROM_REFERENCE` and `RUN_OF` that name a table of hand-made rows as their `source`; and for `classification_group` and `classification_groups`, which the rows of `genomics/clinvar_classification_groups` give, on the records of the 3 labels and types whose headers list one of the two (`CLASSIFIED_FOR_CONDITION`, `ClassificationConflict`, `Variant`). VERA's pages and its API make a record's label from those columns: who compiled the row, who signed it for the build and when, and the review it carries (`review` in an answer of the API). The `PolygenicScoreModel` nodes are PGS Catalog's published polygenic scores. ## 1. Check it ```sh ./verify.sh SHA256:KVPlqDbWHStLFb7IEX95Vqf6W8FUFgIBfRgIFpdxqhU af0b39c0304f5dce67d89f6d201c5460b51bb977636605eeabe20628b653f6d2 ``` - The key in `allowed_signers` comes in this same archive, from the same server, so by itself it proves nothing: anyone could change a file, re-sign `manifest.json` with a key of their own and put that key here. Compare it with the fingerprint published apart from the archive: on VERA's `/reference-graph` page beside the download, in the OpenAPI document (`$VERA/api/v1/openapi.json`, where `$VERA` is the address of the VERA copy the download came from) and in `GET /api/v1/reference-graph/stats` (`verification.keyFingerprint`). `verify.sh` takes it as its first argument, compares it with `ssh-keygen -lf` on the key in `allowed_signers`, and stops unless they are equal and the file holds that one key only. - Compare `output_sha256` with `/stats` (`verification.outputSha256Recomputed`) as well: `verify.sh` takes it as its second argument. - `verify.sh`, `import.sh` and the other VERA files are not signed: read them before running them. Then it checks the signature on `manifest.json`, the size and SHA-256 of all 310 CSV files against it, `constraints.cypher` against `constraints_sha256`, recomputes `output_sha256` from the files, and refuses any CSV file the manifest does not list. It needs `ssh-keygen` (OpenSSH 8.1 or later) and `python3`, reads only, and exits 0 only when every check passes. ## 2. Load it into Neo4j 5.26 The steps below are written for Neo4j Community 5.26.33 (the version the builder's runtime runs) and OpenJDK 21. Neo4j Community serves one user database, `neo4j`, and the load overwrites it. Stop Neo4j first. On a new Neo4j, set the password once, before the first start: ```sh "$NEO4J_HOME/bin/neo4j-admin" dbms set-initial-password '' ``` **From the signed CSV files**: ```sh NEO4J_HOME=/path/to/neo4j-community-5.26.33 ./import.sh "$NEO4J_HOME/bin/neo4j" start "$NEO4J_HOME/bin/cypher-shell" -u neo4j -p '' -f constraints.cypher ``` ## 3. Compare the database with the manifest ```sh "$NEO4J_HOME/bin/cypher-shell" -u neo4j -p '' -f check.cypher ``` `check.cypher` prints `GraphBuild.build_hash` and `output_sha256` and the nodes per label and the edges per type, for you to compare with `manifest.json`'s `build_hash`, `output_sha256`, `nodes` and `edges`. That shows which build was loaded, not that every property is unchanged. Then `examples.cypher` runs, as Cypher, the six graph queries that VERA's API documentation numbers. From here on the database is yours: any Cypher you like. ## Licences Each node and each edge carries its licence (`licence`). `ATTRIBUTION.md` holds the notices and credit lines the sources ask for (LOINC, CPIC, HPO, ChEBI and the others); keep them with any copy you make or show.