3-dim genomics schema: (sample_id, chromosome, position) → classification.
()
| 60 | |
| 61 | /// 3-dim genomics schema: (sample_id, chromosome, position) → classification. |
| 62 | fn 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 | |
| 90 | const SCHEMA_HASH: u64 = 0xDE_AD_BE_EF_C0_DE; |
| 91 | const TENANT: TenantId = TenantId::new(1); |
no test coverage detected