Template strings array from template literal
Any interpolated values
Branded primer sequence that widens to string
// Real-world COVID-19 primers
const covidN = primer`ACCAGGAACTAATCAGACAAG`; // ✅ 21bp = valid length
const covidNRev = primer`CAAAGACCAATCCTACCATGAG`; // ✅ 22bp = valid length
// Real-world 16S rRNA primers with IUPAC codes
const microbial515F = primer`GTGCCAGCMGCCGCGGTAA`; // ✅ 19bp, M=A|C valid
const microbial806R = primer`GGACTACHVGGGTWTCTAAT`; // ✅ 20bp, H=A|C|T, V=A|C|G, W=A|T
// Biological constraint validation
const tooShort = primer`ATCG`; // ❌ Runtime error: 4bp < 15bp minimum
const tooLong = primer`${'A'.repeat(60)}`; // ❌ Runtime error: 60bp > 50bp maximum
const invalidChars = primer`ATCGXYZ${unknown}`; // ❌ Runtime error: X,Y,Z not valid IUPAC
// String compatibility for algorithms
const length = covidN.length; // Works like string
processPattern(covidN); // Automatic widening
Template literal tag for primer sequences with biological constraints
Creates validated primer sequences with biological length constraints. Combines IUPAC validation with primer-specific requirements (15-50 bp length). Perfect for PCR primer validation in amplicon detection workflows.