Skip to content
@deckyard/strider

strider cheatsheet

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

Errors: strider. tools/check-docs.sh checks every signature and field on this page against the code.

strider

FunctionReturnsDoes
strider.parse(doc)Tablereads every population of an export, frequencies as published
strider.populations(t)list of stringpopulation labels, in order of first mention
strider.loci(t, population)list of stringloci typed in that population, in document order
strider.sampleSize(t, population, locus)intN, 0 if the export states none
strider.frequencySum(t, population, locus)floatsum at one locus, ~1.0 for a sound table
strider.frequencySums(t, population)map of string to floatlocus -> sum for one population; copies the Table once
strider.allFrequencySums(t)map of string to map of string to floatpopulation -> locus -> sum; copies the Table once
strider.toFrequencyDb(t, population, name)forensics.FrequencyDbconverts one population; name "" keeps its label
strider.load(doc, population, name)forensics.FrequencyDbparse then toFrequencyDb

strider.Population

FieldHolds
name as stringpopulation label from the <origin> name
counts as map of string to intlocus -> individuals typed (N), 0 if unstated
frequencies as map of string to map of string to floatlocus -> allele label -> published frequency

strider.Table

FieldHolds
created as stringroot element's created_timestamp, "" if absent
validity as stringroot element's validity, "" if absent
byPopulation as map of string to Populationpopulation label -> its frequencies, in order of first mention