Skip to content
@skiffyard/strider

strider

jennifer
import "@skiffyard/strider/" as strider;

Signatures and struct fields are in the cheatsheet, the document shape in Reading a table. Every accessor copies the whole Table; see the cost table before looping one.

Errors

ConditionkindThrown by
no <marker> element in the documentstriderparse, load
markers present but none carries population datastriderparse, load
a marker with no <name> childstriderparse, load
an <origin> with no name attributestriderparse, load
a <frequency> with no allele attribute, or no valuestriderparse, load
an allele listed twice in one population's locus, as text or as a repeat count of equal value (15 and 15.0)striderparse, load
a locus listed twice for one population, names compared case-insensitively (TH01 and th01)striderparse, load
malformed XMLxml (runtime before Jennifer 0.28.0)parse, load
a frequency that is not unsigned decimal with an optional exponent (-0.5, +0.5, 0x1p-1, 0.5_0, NaN, 0,5), or that contains a child elementruntimeparse, load
an n that is not unsigned decimal digits (-5, +500, 500.0, 1e3), or too large for an intruntimeparse, load
unknown populationstriderevery function taking population
unknown locusstridersampleSize, frequencySum
a frequency outside (0, 1], or a locus summing above 1.05forensicgeneticstoFrequencyDb, load

parse accepts any unsigned decimal as a frequency, zero and values above 1 included. They are rejected only on conversion, by forensics.withLocus; that is also where a percentage-scaled table is caught instead of producing probabilities above 1. A negative n or frequency cannot be spelled in an accepted form, so parse rejects it.