Class: ScoreStatTable

fio~ScoreStatTable()

Class for storing score statistics.

Assumptions:

  • This class assumes you are only storing statistics on a per-chromosome basis, and not genome wide.
  • Score statistic direction is towards the minor allele.

Constructor

new ScoreStatTable()

Source:

Methods

add(other) → {*}

Combine this set of score statistics with another. See also https://genome.sph.umich.edu/wiki/RAREMETAL_METHOD#SINGLE_VARIANT_META_ANALYSIS for information on how statistics are combined.

Parameters:
Name Type Description
other ScoreStatTable

Another set of score statistics with which to combine this object for the purposes of meta-analysis.

Source:
Returns:

No object is returned; this method runs in-place.

Type
*

appendScore(variant, position, u, v, altFreq, ea, eaFreq, pvalue)

Add a variant and relevant data on it into the table.

Parameters:
Name Type Description
variant string

Variant (chr:pos_ref/alt)

position number

Integer position of variant

u number

Score statistic

v number

Variance of score statistic

altFreq number

Alternate allele frequency

ea string

Effect allele

eaFreq number

Effect allele frequency

pvalue number

Single variant p-value

Source:

getAltFreqForPosition(position) → {number}

Return the alternate allele frequency for a variant

Parameters:
Name Type Description
position

Variant position

Source:
Returns:

Alt allele frequency

Type
number

getAltFreqForVariant(variant) → {number}

Return the alternate allele frequency for a variant

Parameters:
Name Type Description
variant
Source:
Returns:

Alt allele frequency

Type
number

getVariantAtPosition(position)

Retrieve the variant at a given position.

Parameters:
Name Type Description
position

Variant position

Source:

subsetToVariants(variantList) → {ScoreStatTable}

Subset the score stats down to a subset of variants, in this exact ordering

Parameters:
Name Type Description
variantList

List of variants

Source:
Returns:

Score statistics after subsetting (not in-place, returns a new copy)

Type
ScoreStatTable