rockt / SETH

SNP Extraction Tool for Human Variations
rockt.github.com/SETH
Other
27 stars 16 forks source link

MutationMention.toHGVS() returns '??' for entities already following the HGVS c. and m. notation #13

Closed jhkbg closed 7 years ago

jhkbg commented 7 years ago

It looks like MutationMention.toHGVS() returns '??' for recognized entities that already follow the HGVS nomenclature --- happens for entities in c. notation and m. only; and not for all.

Examples: PMID 23560553, recognized entity=c.499C>A, normalized=c.499C>A, toHGVS() = ?? PMID 23588064, recognized=c.7148dupT, normalized=c.7148dupT, toHGVS() = ?? 22288660 / m.16278C>T 23612258 / c.1431_1433dupAAA

However, this does not happen for other cases: pmid=23588064, recognized=c.2071-2093del, norm=c.2071-2093del, tohgvs() = c.2071-2093del 23405979 / c.904-906delGAG 23623699 / c.300+1G>C 23732669 / c.1224_1225delCA where it returns the right HGVS.

I'm not quite sure what the pattern is --- initially I thought it would return the correct toHGVS() for everything that was a range location ("c.1224_1225delCA") but a counter example is "c.1431_1433dupAAA" where it returns ??.

"m." are not considered by the "switch (type)" at the start of toHGVS().

(For structural abnormalities, toHGVS() also returns ?? but that's by design)

Erechtheus commented 7 years ago

Added test cases here