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" |
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. |
getGroup(group) → {Array.<string>}
Retrieve a specific group's variants.
Parameters:
Name | Type | Description |
---|---|---|
group |
string | Group to retrieve. |
Returns:
List of variants belonging to the group.
- Type
- Array.<string>
size() → {number}
Get the number of groups
Returns:
Number of groups.
- Type
- number
Symbol.iterator()
Iterate over groups with syntax:
for (let [group, variants] in mask) { ... }
Returns:
Iterator over entries, yields [group, array of variants]