import { SAMPLE_COLOR_SCALE } from '../utils/color' import { createDoseResponseTemplate } from './doseResponseBuilder' import { createPlateMapTemplate } from './plateMapBuilder' import { createSampleSheetTemplate } from './sampleSheetBuilder' import { presetSampleRecords } from './sampleNormalizers' import { createTemplateCollection } from './templateEnvelopes' import type { CreateWellPlateScreenCollectionOptions, TemplateCollectionEnvelope, } 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 createWellPlateScreenCollection( options: CreateWellPlateScreenCollectionOptions = {} ): TemplateCollectionEnvelope { const sampleRecords = presetSampleRecords(options.samples ?? ['Control', 'Treatment']) const plate = createPlateMapTemplate({ name: options.plateName ?? 'Screen plate', format: options.plateFormat ?? 96, samples: sampleRecords.map((sample, index) => ({ id: sample.sampleId, name: sample.name ?? sample.sampleId, color: SAMPLE_COLOR_SCALE[index % SAMPLE_COLOR_SCALE.length], })), }) const sampleSheet = createSampleSheetTemplate({ samples: sampleRecords }) const doseResponse = createDoseResponseTemplate({ compounds: options.compounds ?? { 'Compound A': [10, 1, 0.1] }, unit: options.unit ?? 'uM', replicates: options.replicates ?? 3, layout: plate, }) return createTemplateCollection( [plate, sampleSheet, doseResponse], { preset: 'wellplate-screen', ...(options.metadata ?? {}) } ) }