Usage¶
This package provides a command line interface.
Syntax check¶
To only check if a description can be successfully parsed.
$ mutalyzer_hgvs_parser 'NG_012337.1(SDHD_v001):c.274G>T'
Successfully parsed:
NG_012337.1(SDHD_v001):c.274G>T
Description model¶
To obtain the model of a description add the -c
flag.
$ mutalyzer_hgvs_parser -c 'NG_012337.1(SDHD_v001):c.274G>T'
{
"reference": {
"id": "NG_012337.1",
"selector": {
"id": "SDHD_v001"
}
},
"coordinate_system": "c",
"variants": [
{
"type": "substitution",
"source": "reference",
"location": {
"type": "point",
"position": 274
},
"deleted": [
{
"source": "description",
"sequence": "G"
}
],
"inserted": [
{
"source": "description",
"sequence": "T"
}
]
}
]
}
Grammar start rule¶
By default, the Mutalyzer
grammar
is used,
with description
as the start (top) rule. It is however possible
to choose a different start rule with the -r
option.
$ mutalyzer_hgvs_parser -r variant '274G>T'
Successfully parsed:
274G>T
The -c
flag can be employed together with a different start rule.
$ mutalyzer_hgvs_parser -c -r variant '274G>T'
{
"location": {
"type": "point",
"position": 274
},
"type": "substitution",
"source": "reference",
"deleted": [
{
"sequence": "G",
"source": "description"
}
],
"inserted": [
{
"sequence": "T",
"source": "description"
}
]
}