import { getBioTemplateInfo } from './catalog' import { createAssayMatrixTemplate } from './assayMatrixBuilder' import { createCalibrationCurveTemplate } from './calibrationCurveBuilder' import { createDoseResponseTemplate } from './doseResponseBuilder' import { createFlowCytometryPanelTemplate } from './flowCytometryPanelBuilder' import { createInstrumentRunTemplate } from './instrumentRunBuilder' import { createPlateMapTemplate } from './plateMapBuilder' import { createProtocolStepsTemplate } from './protocolStepsBuilder' import { createQpcrPlateTemplate } from './qpcrPlateBuilder' import { createReagentListTemplate } from './reagentListBuilder' import { createSamplePrepTemplate } from './samplePrepBuilder' import { createSampleSheetTemplate } from './sampleSheetBuilder' import { createTimeCourseTemplate } from './timeCourseBuilder' import type { BioTemplateEnvelope, TemplateId, } from './types' /** @deprecated Scheduled for removal from the core SDK in MINT 1.4; the biology templates move to a dedicated package or the owning plugins. */ export function createDefaultBioTemplate(templateId: TemplateId | string): BioTemplateEnvelope { const template = getBioTemplateInfo(templateId) if (!template) { throw new Error(`Unknown bio template '${templateId}'.`) } switch (template.template_id) { case 'plate-map': return createPlateMapTemplate({ name: 'Plate 1', samples: ['Control', 'Treatment'], }) case 'sample-sheet': return createSampleSheetTemplate({ samples: [ { sampleId: 'S001', name: 'Control 1', group: 'Control' }, { sampleId: 'S002', name: 'Treatment 1', group: 'Treatment' }, ], }) case 'sample-prep': return createSamplePrepTemplate({ samples: ['S001', 'S002'], prepType: 'extraction', outputVolume: 50, }) case 'dose-response': return createDoseResponseTemplate({ compounds: { 'Compound A': [10, 1, 0.1], }, unit: 'uM', replicates: 3, }) case 'calibration-curve': return createCalibrationCurveTemplate({ concentrations: [0.1, 1, 10, 100], analyte: 'Analyte', unit: 'uM', }) case 'time-course': return createTimeCourseTemplate({ timepoints: [0, 6, 24], unit: 'hour', conditions: ['Control', 'Treatment'], replicates: 3, }) case 'protocol-steps': return createProtocolStepsTemplate({ steps: [ { id: 'seed-cells', type: 'addition', name: 'Seed cells', description: 'Add cells to wells or culture vessels.', duration: 15, }, { id: 'incubate-overnight', type: 'incubation', name: 'Incubate overnight', duration: 960, parameters: { temperature: '37 C', co2: '5%' }, }, { id: 'measure-readout', type: 'measurement', name: 'Measure readout', duration: 45, }, ], }) case 'assay-matrix': return createAssayMatrixTemplate({ samples: ['S001', 'S002'], features: ['Lactate', 'Glucose'], values: { s001: { lactate: 1.2, glucose: 5.4 }, s002: { lactate: 2.1, glucose: 4.8 }, }, }) case 'reagent-list': return createReagentListTemplate({ reagents: ['DMSO', 'Compound A', 'Anti-HA antibody'], }) case 'flow-cytometry-panel': return createFlowCytometryPanelTemplate({ markers: ['CD3', 'CD4', 'CD8'], instrument: 'BD LSRFortessa', }) case 'instrument-run': return createInstrumentRunTemplate({ items: ['S001', 'S002'], instrument: 'LC-MS', method: 'Default method', }) case 'qpcr-plate': return createQpcrPlateTemplate({ samples: ['Control', 'Treatment'], targets: ['ACTB', 'GAPDH'], replicates: 3, instrument: 'QuantStudio', }) default: throw new Error(`Unknown bio template '${templateId}'.`) } }