Genotype API Documentation - v0.1.0
    Preparing search index...

    Variable BasesConst

    Bases: {
        DNA: CharSet;
        RNA: CharSet;
        Canonical: CharSet;
        Purine: CharSet;
        Pyrimidine: CharSet;
        Strong: CharSet;
        Weak: CharSet;
        Amino: CharSet;
        Keto: CharSet;
        TwoFold: CharSet;
        ThreeFold: CharSet;
        Ambiguous: CharSet;
        Gap: CharSet;
        GC: CharSet;
        AT: CharSet;
    } = ...

    Pre-built CharSet constants for common nucleotide groupings.

    These follow IUPAC nomenclature for nucleic acid ambiguity codes. Use them with GenotypeString.isAnyOf for efficient positional character classification without string conversion.

    Type Declaration

    • ReadonlyDNA: CharSet

      The four canonical DNA bases: A, C, G, T

    • ReadonlyRNA: CharSet

      The four canonical RNA bases: A, C, G, U

    • ReadonlyCanonical: CharSet

      All five canonical bases (DNA + RNA): A, C, G, T, U

    • ReadonlyPurine: CharSet

      Purines (double-ring): A, G, and the ambiguity code R

    • ReadonlyPyrimidine: CharSet

      Pyrimidines (single-ring): C, T, U, and the ambiguity code Y

    • ReadonlyStrong: CharSet

      Strong bases (3 hydrogen bonds): G, C, and the ambiguity code S

    • ReadonlyWeak: CharSet

      Weak bases (2 hydrogen bonds): A, T, U, and the ambiguity code W

    • ReadonlyAmino: CharSet

      Amino group bases: A, C, and the ambiguity code M

    • ReadonlyKeto: CharSet

      Keto group bases: G, T, U, and the ambiguity code K

    • ReadonlyTwoFold: CharSet

      Two-fold ambiguity codes: R, Y, S, W, K, M

    • ReadonlyThreeFold: CharSet

      Three-fold ambiguity codes: B, D, H, V

    • ReadonlyAmbiguous: CharSet

      All ambiguity codes including N: R, Y, S, W, K, M, B, D, H, V, N

    • ReadonlyGap: CharSet

      Gap and stop characters: -, ., *

    • ReadonlyGC: CharSet

      Alias for Strong — G, C, S (commonly used in GC content calculations)

    • ReadonlyAT: CharSet

      Alias for Weak — A, T, U, W (commonly used in AT content calculations)

    const gs = GenotypeString.fromString("ATCGRYN");
    for (let i = 0; i < gs.length; i++) {
    if (gs.isAnyOf(i, Bases.Strong)) {
    // G, C, or S at this position
    }
    }