Function replicateDNA

  • Replicates a DNA sequence, producing two identical copies.

    This is the main entry point for DNA replication in ts-dna. It handles all the biological complexity of DNA replication including:

    • Fork coordination and enzyme management
    • Leading and lagging strand synthesis
    • Okazaki fragment processing
    • Primer synthesis and removal
    • Biological timing and constraints

    Parameters

    Returns ValidationResult<ReplicationResult>

    ValidationResult containing the two replicated DNA strands

    Example

    import { DNA, replicateDNA } from 'ts-dna';

    const dna = new DNA('ATGCGATCGTAGCTACGT');
    const result = replicateDNA(dna);

    if (result.success) {
    const [strand1, strand2] = result.data.replicatedStrands;
    console.log('Replication completed!');
    console.log('Steps taken:', result.data.steps);
    }

    Example

    // With custom organism and options
    import { HUMAN } from 'ts-dna';

    const result = replicateDNA(dna, {
    organism: HUMAN,
    enableDetailedLogging: true
    });