Skip to content

CloningAction

A CloningAction describes the molecular biology operation used to produce a cloned construct. It is always nested inside a CloningSource, which connects an action to its input nodes.

CloningParadigm

Every action has a paradigm — one of 12 supported cloning methods:

ts
type CloningParadigm =
  | 'restriction' | 'gibson' | 'infusion' | 'slic' | 'cpec'
  | 'golden-gate' | 'gateway' | 'cre-lox' | 'flp-frt'
  | 'crispr' | 'ligation' | 'pcr';

CloningAction Interface

ts
import type { CloningAction } from '@molbiohive/hatchlings';
FieldTypeRequiredDescription
paradigmCloningParadigmyesCloning method
labelstringnoDisplay label (defaults to paradigm name)
enzymesstring[]noRestriction enzymes (restriction, golden-gate)
operationCreLoxOperationnoCre-lox operation type
attSitesAttSite[]noGateway att sites
guidestringnoCRISPR sgRNA guide sequence (20nt)
pamstringnoCRISPR PAM motif (e.g. 'NGG' for SpCas9)
primersstring[]noPrimer names or sequences (PCR)
temperaturestringnoReaction temperature (e.g. '50°C')
durationstringnoReaction duration (e.g. '60 min')
notesstringnoFree-text notes

Paradigm-Specific Fields

Different paradigms use different subsets of fields:

Restriction / Ligation

Uses enzymes to specify which restriction enzymes cut the DNA:

ts
const action: CloningAction = {
  paradigm: 'restriction',
  enzymes: ['EcoRI', 'BamHI'],
  notes: 'Double digest at 37°C for 1 hour',
};

Gibson / InFusion / SLIC / CPEC

Overlap-based assembly methods. Use temperature and duration:

ts
const action: CloningAction = {
  paradigm: 'gibson',
  temperature: '50°C',
  duration: '60 min',
};

Golden Gate

Type IIS restriction enzyme assembly. Uses enzymes:

ts
const action: CloningAction = {
  paradigm: 'golden-gate',
  enzymes: ['BsaI'],
  temperature: '37°C / 16°C cycling',
  duration: '5 hours',
};

Gateway

Site-specific recombination with att sites:

ts
const action: CloningAction = {
  paradigm: 'gateway',
  attSites: [
    { name: 'attL1', position: 0 },
    { name: 'attL2', position: 1500 },
    { name: 'attR1', position: 0 },
    { name: 'attR2', position: 2800 },
  ],
};

Cre-lox

Cre recombinase with loxP sites. Uses operation:

ts
type CreLoxOperation = 'excision' | 'inversion' | 'insertion' | 'translocation';

const action: CloningAction = {
  paradigm: 'cre-lox',
  operation: 'excision',
  notes: 'Remove floxed selection cassette',
};

CRISPR-Cas9

HDR-mediated editing. Uses guide and pam:

ts
const action: CloningAction = {
  paradigm: 'crispr',
  guide: 'ATGCGATCGATCGATCGATC',
  pam: 'NGG',
  notes: 'SpCas9 HDR with donor template',
};

PCR

Amplification with primers:

ts
const action: CloningAction = {
  paradigm: 'pcr',
  primers: ['GFP_fwd', 'GFP_rev'],
  temperature: '98°C',
  duration: '30 cycles',
};

CloningSource

CloningSource wraps an action with its inputs and optional byproducts:

ts
import type { CloningSource } from '@molbiohive/hatchlings';
FieldTypeRequiredDescription
actionCloningActionyesThe cloning operation
inputsCloningSourceInput[]yesInput constructs (1 or more)
byproductsCloningNode[]noSecondary outputs (e.g. Gateway byproduct)

CloningSourceInput

Each input references a CloningNode with an optional display label:

ts
import type { CloningSourceInput } from '@molbiohive/hatchlings';
FieldTypeRequiredDescription
nodeCloningNodeyesThe input construct
labelstringnoRole label (e.g. 'Vector', 'Insert', 'Donor')

AttSite

Gateway recombination site:

FieldTypeRequiredDescription
namestringyesSite name (e.g. 'attL1', 'attR1')
positionnumbernoPosition on the construct (bp)