Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot parse HGVS NP_000095.2:p.Gly168_His169= #493

Closed
markwoon opened this issue May 27, 2020 · 3 comments · Fixed by #517
Closed

Cannot parse HGVS NP_000095.2:p.Gly168_His169= #493

markwoon opened this issue May 27, 2020 · 3 comments · Fixed by #517

Comments

@markwoon
Copy link
Contributor

When trying to parse NP_000095.2:p.Gly168_His169= I get:

Caused by: de.charite.compbio.jannovar.hgvs.parser.HGVSParsingException: org.antlr.v4.runtime.NoViableAltException
	at de.charite.compbio.jannovar.hgvs.parser.HGVSErrorStrategy.reportNoViableAlternative(HGVSErrorStrategy.java:11)
	at org.antlr.v4.runtime.DefaultErrorStrategy.reportError(DefaultErrorStrategy.java:136)
	at de.charite.compbio.jannovar.hgvs.parser.Antlr4HGVSParser.aa_change_inner(Antlr4HGVSParser.java:888)
	at de.charite.compbio.jannovar.hgvs.parser.Antlr4HGVSParser.aa_change(Antlr4HGVSParser.java:743)
	at de.charite.compbio.jannovar.hgvs.parser.Antlr4HGVSParser.aa_single_allele_single_change_var(Antlr4HGVSParser.java:372)
	at de.charite.compbio.jannovar.hgvs.parser.Antlr4HGVSParser.aa_single_allele_var(Antlr4HGVSParser.java:316)
	at de.charite.compbio.jannovar.hgvs.parser.Antlr4HGVSParser.hgvs_variant(Antlr4HGVSParser.java:201)
	at de.charite.compbio.jannovar.hgvs.parser.HGVSParser.parseHGVSString(HGVSParser.java:42)
	... 75 common frames omitted
Caused by: org.antlr.v4.runtime.NoViableAltException: null
	at org.antlr.v4.runtime.atn.ParserATNSimulator.noViableAlt(ParserATNSimulator.java:2026)
	at org.antlr.v4.runtime.atn.ParserATNSimulator.execATN(ParserATNSimulator.java:467)
	at org.antlr.v4.runtime.atn.ParserATNSimulator.adaptivePredict(ParserATNSimulator.java:393)
	at de.charite.compbio.jannovar.hgvs.parser.Antlr4HGVSParser.aa_change_inner(Antlr4HGVSParser.java:820)
	... 81 common frames omitted

This is with Janovar 0.34.

@holtgrewe
Copy link
Member

Interesting. This refers to this part of the specification:

Which we indeed have not considered so far.

@holtgrewe
Copy link
Member

Actually, it should be. Looking further into this.

@holtgrewe
Copy link
Member

OK, it has not been clearly documented but parsing HGVS is only fully implemented for nucleic acid sequences. The Antlr-based parser for amino acids is there but building Java objects has not been implemented yet.

#517 will fix this issue as "parsing" will work but it will return null. #516 documents explicitely that this is still missing.

I don't have the time to implement this (as I have no need for it right now) but would welcome and help with pull requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants