MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / schema

Function schema

nodedb/tests/bitemporal_array_variant_cube.rs:62–88  ·  view source on GitHub ↗

3-dim genomics schema: (sample_id, chromosome, position) → classification.

()

Source from the content-addressed store, hash-verified

60
61/// 3-dim genomics schema: (sample_id, chromosome, position) → classification.
62fn schema() -> Arc<nodedb_array::schema::ArraySchema> {
63 Arc::new(
64 ArraySchemaBuilder::new("variants")
65 .dim(DimSpec::new(
66 "sample_id",
67 DimType::Int64,
68 // 100 samples: 0..99
69 Domain::new(DomainBound::Int64(0), DomainBound::Int64(127)),
70 ))
71 .dim(DimSpec::new(
72 "chromosome",
73 DimType::Int64,
74 // 24 human chromosomes (1-22, X=23, Y=24)
75 Domain::new(DomainBound::Int64(1), DomainBound::Int64(24)),
76 ))
77 .dim(DimSpec::new(
78 "position",
79 DimType::Int64,
80 // SNP position bucket (encoded as small index here for test simplicity)
81 Domain::new(DomainBound::Int64(0), DomainBound::Int64(127)),
82 ))
83 .attr(AttrSpec::new("classification", AttrType::Int64, true))
84 .tile_extents(vec![32, 8, 32])
85 .build()
86 .unwrap(),
87 )
88}
89
90const SCHEMA_HASH: u64 = 0xDE_AD_BE_EF_C0_DE;
91const TENANT: TenantId = TenantId::new(1);

Callers 1

open_engineFunction · 0.70

Calls 4

buildMethod · 0.45
tile_extentsMethod · 0.45
attrMethod · 0.45
dimMethod · 0.45

Tested by

no test coverage detected