Question: SNPSift - Token Recognition Error
gravatar for anon123
5.6 years ago by
anon12310 wrote:

I'm using Git Bash and SnpSift. The following command line extracts the columns of interest from my VCF file.

java -jar SnpSift.jar extractfields filename.vcf CHROM POS ID REF AL "SampleID@1232" > sample2.vcf

The command line works perfectly until the addition of the "SampleID@1232". I get the following error message:

line 1:7 token recognition error at: '@'
Exception in thread "main" java.lang.RuntimeException: Error parsing expression 
        at ca.mcgill.mcb.pcingola.snpSift.SnpSiftCmdExtractFields.parseFields(
        at ca.mcgill.mcb.pcingola.snpSift.SnpSift.main(
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: LexerNoViableAltException('@')
        at ca.mcgill.mcb.pcingola.snpSift.lang.LangFactory.compile(
        at ca.mcgill.mcb.pcingola.snpSift.SnpSiftCmdExtractFields.parseFields(
        ... 4 more
Caused by: java.lang.RuntimeException: LexerNoViableAltException('@')
        at ca.mcgill.mcb.pcingola.snpSift.lang.LangFactory$1.recover(
        at org.antlr.v4.runtime.Lexer.nextToken(
        at org.antlr.v4.runtime.BufferedTokenStream.fetch(
        at org.antlr.v4.runtime.BufferedTokenStream.sync(
        at org.antlr.v4.runtime.BufferedTokenStream.consume(
        at org.antlr.v4.runtime.atn.ParserATNSimulator.execATN(
        at org.antlr.v4.runtime.atn.ParserATNSimulator.adaptivePredict(
at ca.mcgill.mcb.pcingola.snpSift.antlr.SnpSiftParser.expression(
      at ca.mcgill.mcb.pcingola.snpSift.antlr.SnpSiftParser.compilationUnit(
        at ca.mcgill.mcb.pcingola.snpSift.lang.LangFactory.compile(
        ... 5 more
Caused by: LexerNoViableAltException('@')
        at org.antlr.v4.runtime.atn.LexerATNSimulator.failOrAccept(
        at org.antlr.v4.runtime.atn.LexerATNSimulator.execATN(
        at org.antlr.v4.runtime.atn.LexerATNSimulator.match(
        at org.antlr.v4.runtime.Lexer.nextToken(
        ... 13 more

I've tried the following based on the suggest of an alternate thread:


However, I'm still getting the same error. 

I'd appreciate any suggestions. Thanks.

ADD COMMENTlink modified 5.4 years ago by Biostar ♦♦ 20 • written 5.6 years ago by anon12310
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2121 users visited in the last hour