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

    Type Alias ValidateOptions

    Options for sequence validation.

    Each option axis maps directly to a kernel ValidationMode:

    sequenceType allowAmbiguous Kernel mode
    dna false StrictDna
    dna true NormalDna
    rna false StrictRna
    rna true NormalRna
    type ValidateOptions = {
        sequenceType: "dna" | "rna";
        allowAmbiguous?: boolean;
        allowGaps?: boolean;
        action?: "reject" | "fix" | "warn";
        fixChar?: string;
    }
    Index

    Properties

    sequenceType: "dna" | "rna"

    Whether sequences are DNA or RNA. Required — use detectSequenceType() if unknown.

    allowAmbiguous?: boolean

    Whether IUPAC ambiguity codes (R, Y, S, W, K, M, B, D, H, V, N) are valid. When true (the default), ambiguity codes are accepted alongside standard bases. When false, only standard bases (ACGT for DNA, ACGU for RNA) are valid.

    allowGaps?: boolean

    Whether gap characters (-, ., *) are allowed. When true (the default), gaps pass through unchanged. When false, gaps are stripped before validation and the gap-stripped sequence is yielded (even if the original was valid).

    action?: "reject" | "fix" | "warn"

    Action to take on invalid sequences. Defaults to "reject".

    fixChar?: string

    Replacement character for invalid bases when action is "fix". Must be a single character. Defaults to "N". Only valid when action is "fix".