Class: VariantMask

fio~VariantMask()

Class for storing a variant mask, which is a mapping from groups to lists of variants. For example, "TCF7L2" -> ["variant1","variant2",...].

Constructor

new VariantMask()

Source:

Methods

addVariantForGroup(group, variant)

Add a variant to a group.

Parameters:
Name Type Description
group

Group, for example a gene "TCF7L2"

variant

Variant ID, usually "1:1_A/T"

Source:

createGroup(group, variants)

Create a group from a list of variants

Parameters:
Name Type Description
group string

Group name. Usually a gene, for example "TCF7L2" or "ENSG000534311".

variants Array.<string>

Array of variants belonging to the group. These should be in EPACTS format, e.g. chr:pos_ref/alt.

Source:

getGroup(group) → {Array.<string>}

Retrieve a specific group's variants.

Parameters:
Name Type Description
group string

Group to retrieve.

Source:
Returns:

List of variants belonging to the group.

Type
Array.<string>

size() → {number}

Get the number of groups

Source:
Returns:

Number of groups.

Type
number

Symbol.iterator()

Iterate over groups with syntax:

for (let [group, variants] in mask) { ... }
Source:
Returns:

Iterator over entries, yields [group, array of variants]