import type { TemplateId } from './types' import { templateIdentifierMatches, templateSearchMatches } from './lookup' export interface BioTemplateCatalogEntry { name: TemplateId template_id: TemplateId template_version: string label: string category: 'bio-data' purpose: string aliases: readonly string[] python_import: string python_example: string frontend_import: string frontend_adapters: readonly string[] components: readonly string[] add_command: string } /** @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 const bioTemplateCatalog = [ { name: 'plate-map', template_id: 'plate-map', template_version: '1.0', label: 'Plate map', category: 'bio-data', purpose: 'Plate layout, wells, sample assignments, and sample legend data.', aliases: ['wellplate', 'well-plate', 'plate layout', 'plate-map editor'], python_import: 'from mint_sdk.templates import PlateMapTemplate, save_template', python_example: 'PlateMapTemplate.create_96_well(name="Plate 1", samples=["Control", "Treatment"])', frontend_import: "import { toPlateMapEditorState, toWellPlateWells } from '@morscherlab/mint-sdk/templates'", frontend_adapters: ['toPlateMapEditorState', 'toWellPlateWells'], components: ['PlateEditor', 'WellPlate', 'SampleLegend'], add_command: 'mint add data-template plate-map --page', }, { name: 'sample-sheet', template_id: 'sample-sheet', template_version: '1.0', label: 'Sample sheet', category: 'bio-data', purpose: 'Tabular sample metadata, display columns, and group definitions.', aliases: ['sample metadata', 'sample table', 'metadata sheet', 'csv samples'], python_import: 'from mint_sdk.templates import SampleSheetTemplate, save_template', python_example: 'SampleSheetTemplate.from_rows([{"sample_id": "S001", "name": "Control 1", "group": "Control"}])', frontend_import: "import { toTemplateDataFrame, toSampleOptions } from '@morscherlab/mint-sdk/templates'", frontend_adapters: ['toTemplateDataFrame', 'toSampleDataFrame', 'toSampleRows', 'toSampleColumns', 'toSampleOptions'], components: ['DataFrame', 'SampleSelector', 'GroupAssigner'], add_command: 'mint add data-template sample-sheet --page', }, { name: 'sample-prep', template_id: 'sample-prep', template_version: '1.0', label: 'Sample prep', category: 'bio-data', purpose: 'Extraction, dilution, normalization, transfer, source/destination, volume, reagent, and status steps.', aliases: ['sample preparation', 'extraction', 'dilution', 'normalization', 'prep steps'], python_import: 'from mint_sdk.templates import SamplePrepTemplate, save_template', python_example: 'SamplePrepTemplate.create(["S001", "S002"], prep_type="extraction", output_volume=50)', frontend_import: "import { toSamplePrepDataFrame, toTemplateDataFrame } from '@morscherlab/mint-sdk/templates'", frontend_adapters: ['toTemplateDataFrame', 'toSamplePrepDataFrame', 'toSamplePrepRows', 'toSamplePrepColumns'], components: ['DataFrame', 'ProtocolStepEditor', 'SampleSelector', 'WellPlate'], add_command: 'mint add data-template sample-prep --page', }, { name: 'dose-response', template_id: 'dose-response', template_version: '1.0', label: 'Dose response', category: 'bio-data', purpose: 'Compounds, concentration series, controls, replicates, and optional plate layout.', aliases: [ 'drug response', 'concentration series', 'dose curve', 'dose design', 'dose planner', 'dose calculator', 'drp', ], python_import: 'from mint_sdk.templates import ControlDefinition, DoseResponseTemplate, save_template', python_example: 'DoseResponseTemplate.create({"Compound A": [10, 1, 0.1]}, unit="uM", replicates=3)', frontend_import: "import { toDoseConditions, toDoseLayoutState } from '@morscherlab/mint-sdk/templates'", frontend_adapters: ['toDoseConditions', 'toDoseLayoutState'], components: ['DoseCalculator', 'ReagentEditor', 'WellPlate'], add_command: 'mint add data-template dose-response --page', }, { name: 'calibration-curve', template_id: 'calibration-curve', template_version: '1.0', label: 'Calibration curve', category: 'bio-data', purpose: 'Standard curves, blank/QC points, fitted model settings, and acceptance thresholds.', aliases: ['standard curve', 'calibration', 'quantitation', 'qc acceptance', 'calibrator'], python_import: 'from mint_sdk.templates import CalibrationCurveTemplate, save_template', python_example: 'CalibrationCurveTemplate.create([0.1, 1, 10, 100], analyte="Glucose", unit="uM")', frontend_import: "import { toCalibrationCurveDataFrame, toTemplateDataFrame } from '@morscherlab/mint-sdk/templates'", frontend_adapters: ['toTemplateDataFrame', 'toCalibrationCurveDataFrame', 'toCalibrationCurveRows', 'toCalibrationCurveColumns'], components: ['DataFrame', 'FitPanel', 'ChartContainer'], add_command: 'mint add data-template calibration-curve --page', }, { name: 'time-course', template_id: 'time-course', template_version: '1.0', label: 'Time course', category: 'bio-data', purpose: 'Longitudinal time points, conditions, replicates, and scheduled samples.', aliases: ['longitudinal', 'time series', 'sampling schedule', 'kinetics'], python_import: 'from mint_sdk.templates import TimeCourseTemplate, save_template', python_example: 'TimeCourseTemplate.create([0, 6, 24], unit="hour", conditions=["Control", "Treatment"], replicates=3)', frontend_import: "import { toTemplateDataFrame, toTimeCourseSteps } from '@morscherlab/mint-sdk/templates'", frontend_adapters: ['toTemplateDataFrame', 'toTimeCourseDataFrame', 'toTimeCourseRows', 'toTimeCourseSteps', 'toTimeCourseColumns'], components: ['ExperimentTimeline', 'DataFrame', 'ScheduleCalendar'], add_command: 'mint add data-template time-course --page', }, { name: 'protocol-steps', template_id: 'protocol-steps', template_version: '1.0', label: 'Protocol steps', category: 'bio-data', purpose: 'Ordered experiment protocol steps, durations, statuses, and run-sheet parameters.', aliases: ['protocol', 'run sheet', 'workflow', 'method steps', 'sop'], python_import: 'from mint_sdk.templates import ProtocolStepsTemplate, save_template', python_example: 'ProtocolStepsTemplate.create(["Seed cells", "Add treatment", "Measure viability"])', frontend_import: "import { toProtocolSteps, toTemplateDataFrame } from '@morscherlab/mint-sdk/templates'", frontend_adapters: ['toTemplateDataFrame', 'toProtocolSteps', 'toProtocolDataFrame'], components: ['ExperimentTimeline', 'ProtocolStepEditor', 'DataFrame'], add_command: 'mint add data-template protocol-steps --page', }, { name: 'assay-matrix', template_id: 'assay-matrix', template_version: '1.0', label: 'Assay matrix', category: 'bio-data', purpose: 'Sample-by-feature measurement matrices for omics, plate-reader, and marker assays.', aliases: ['omics matrix', 'measurement matrix', 'readout matrix', 'feature table'], python_import: 'from mint_sdk.templates import AssayMatrixTemplate, save_template', python_example: 'AssayMatrixTemplate.create(samples=["S001", "S002"], features=["Lactate", "Glucose"])', frontend_import: "import { toAssayMatrixSampleOptions, toTemplateDataFrame } from '@morscherlab/mint-sdk/templates'", frontend_adapters: ['toTemplateDataFrame', 'toAssayMatrixDataFrame', 'toAssayMatrixRows', 'toAssayMatrixColumns', 'toAssayMatrixSampleOptions'], components: ['DataFrame', 'ChartContainer', 'SampleSelector'], add_command: 'mint add data-template assay-matrix --page', }, { name: 'reagent-list', template_id: 'reagent-list', template_version: '1.0', label: 'Reagent list', category: 'bio-data', purpose: 'Experiment reagents, catalog numbers, lots, storage, locations, and stock status.', aliases: ['reagents', 'inventory', 'antibodies', 'primers', 'compound stocks'], python_import: 'from mint_sdk.templates import ReagentListTemplate, save_template', python_example: 'ReagentListTemplate.create(["DMSO", "Compound A", "Anti-HA antibody"])', frontend_import: "import { toReagentListItems, toTemplateDataFrame } from '@morscherlab/mint-sdk/templates'", frontend_adapters: ['toTemplateDataFrame', 'toReagentDataFrame', 'toReagentListItems'], components: ['ReagentList', 'DataFrame', 'ReagentEditor'], add_command: 'mint add data-template reagent-list --page', }, { name: 'flow-cytometry-panel', template_id: 'flow-cytometry-panel', template_version: '1.0', label: 'Flow cytometry panel', category: 'bio-data', purpose: 'Flow-cytometry markers, fluorophores, detectors, compensation controls, and panel metadata.', aliases: ['flow panel', 'facs panel', 'cytometry panel', 'antibody panel'], python_import: 'from mint_sdk.templates import FlowCytometryPanelTemplate, save_template', python_example: 'FlowCytometryPanelTemplate.create(["CD3", "CD4", "CD8"], instrument="BD LSRFortessa")', frontend_import: "import { toFlowPanelDataFrame, toTemplateDataFrame } from '@morscherlab/mint-sdk/templates'", frontend_adapters: ['toTemplateDataFrame', 'toFlowPanelDataFrame', 'toFlowPanelRows', 'toFlowPanelColumns'], components: ['DataFrame', 'ReagentList', 'SampleSelector'], add_command: 'mint add data-template flow-cytometry-panel --page', }, { name: 'instrument-run', template_id: 'instrument-run', template_version: '1.0', label: 'Instrument run', category: 'bio-data', purpose: 'Instrument sequence tables, sample queues, methods, QC, blanks, and acquisition status.', aliases: ['run queue', 'sequence table', 'sample queue', 'lcms run', 'instrument sequence', 'batch run'], python_import: 'from mint_sdk.templates import InstrumentRunTemplate, save_template', python_example: 'InstrumentRunTemplate.create(["S001", "S002"], instrument="LC-MS")', frontend_import: "import { toInstrumentRunDataFrame, toInstrumentRunScheduleEvents, toInstrumentRunSteps, toTemplateDataFrame } from '@morscherlab/mint-sdk/templates'", frontend_adapters: ['toTemplateDataFrame', 'toInstrumentRunDataFrame', 'toInstrumentRunRows', 'toInstrumentRunColumns', 'toInstrumentRunSteps', 'toInstrumentRunScheduleEvents'], components: ['DataFrame', 'ExperimentTimeline', 'ScheduleCalendar', 'SampleSelector'], add_command: 'mint add data-template instrument-run --page', }, { name: 'qpcr-plate', template_id: 'qpcr-plate', template_version: '1.0', label: 'qPCR plate', category: 'bio-data', purpose: 'qPCR/ddPCR plate layouts, samples, targets, replicate reactions, controls, and Cq fields.', aliases: ['qpcr', 'qPCR', 'ddpcr', 'rt-qpcr', 'gene expression', 'primer plate'], python_import: 'from mint_sdk.templates import QpcrPlateTemplate, save_template', python_example: 'QpcrPlateTemplate.create(samples=["Control", "Treatment"], targets=["ACTB", "GAPDH"], replicates=3)', frontend_import: "import { toQpcrDataFrame, toQpcrWellPlateWells, toTemplateDataFrame } from '@morscherlab/mint-sdk/templates'", frontend_adapters: ['toTemplateDataFrame', 'toQpcrDataFrame', 'toQpcrRows', 'toQpcrColumns', 'toQpcrWellPlateWells'], components: ['DataFrame', 'WellPlate', 'SampleSelector'], add_command: 'mint add data-template qpcr-plate --page', }, ] as const satisfies readonly BioTemplateCatalogEntry[] /** @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 listBioTemplateCatalog(): readonly BioTemplateCatalogEntry[] { return bioTemplateCatalog } /** @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 getBioTemplateInfo(name: string): BioTemplateCatalogEntry | undefined { return bioTemplateCatalog.find(entry => { const identifiers = [ entry.name, entry.template_id, entry.label, ...entry.aliases, ] return templateIdentifierMatches(name, identifiers) }) } /** @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 searchBioTemplateCatalog(query: string): readonly BioTemplateCatalogEntry[] { const normalized = query.trim().toLowerCase() if (!normalized) return bioTemplateCatalog return bioTemplateCatalog.filter(entry => templateSearchMatches(normalized, [ entry.name, entry.template_id, entry.label, entry.purpose, entry.python_import, entry.python_example, entry.frontend_import, entry.add_command, ...entry.aliases, ...entry.frontend_adapters, ...entry.components, ])) }