Snipsift synonymous variant extraction
1
0
Entering edit mode
9.0 years ago
basalganglia ▴ 40

Hi everyone,

I want to filter synonymous variant from my vcf. What can I do?

I have used this command but I have seen that filtered file has also included synonymous variant;

java -jar SnpSift.jar filter "ANN[*].EFFECT != 'synonymous_variant'"

Thanks!

filtering snipsift • 3.5k views
ADD COMMENT
1
Entering edit mode

instead of =, try using has

ADD REPLY
0
Entering edit mode

I have tried that as

"ANN[*].EFFECT !has 'synonymous_variant'"
-bash: !has: event not found
ADD REPLY
0
Entering edit mode

Swap single quotes and double quotes.

ADD REPLY
0
Entering edit mode

Is it like that "ANN[*].EFFECT !has "synonymous_variant""

It can not work

ADD REPLY
1
Entering edit mode
'ANN[*].EFFECT !has "synonymous_variant"'
ADD REPLY
0
Entering edit mode

Bash uses "!" expression in its history substitution command. So it confuses your command with history substitution function and throws an error that it didn't find such a command in its history.

Try temporarily turning off history substitution feature and turning it back on when you're done with your operations involving "!" :

set +H
<do your operations>
set -H
ADD REPLY
0
Entering edit mode
9.0 years ago
basalganglia ▴ 40
line 1:14 no viable alternative at input '[*].EFFECT!'
line 1:19 token recognition error at: '"'
java.lang.RuntimeException: java.lang.RuntimeException: LexerNoViableAltException('"')
        at ca.mcgill.mcb.pcingola.snpSift.lang.LangFactory.compile(LangFactory.java:128)
        at ca.mcgill.mcb.pcingola.snpSift.SnpSiftCmdFilter.parseExpression(SnpSiftCmdFilter.java:255)
        at ca.mcgill.mcb.pcingola.snpSift.SnpSiftCmdFilter.run(SnpSiftCmdFilter.java:282)
        at ca.mcgill.mcb.pcingola.snpSift.SnpSiftCmdFilter.run(SnpSiftCmdFilter.java:268)
        at ca.mcgill.mcb.pcingola.snpSift.SnpSift.run(SnpSift.java:360)
        at ca.mcgill.mcb.pcingola.snpSift.SnpSift.main(SnpSift.java:69)
Caused by: java.lang.RuntimeException: LexerNoViableAltException('"')
        at ca.mcgill.mcb.pcingola.snpSift.lang.LangFactory$1.recover(LangFactory.java:117)
        at org.antlr.v4.runtime.Lexer.nextToken(Lexer.java:169)
        at org.antlr.v4.runtime.BufferedTokenStream.fetch(BufferedTokenStream.java:187)
        at org.antlr.v4.runtime.BufferedTokenStream.sync(BufferedTokenStream.java:170)
        at org.antlr.v4.runtime.BufferedTokenStream.consume(BufferedTokenStream.java:154)
        at org.antlr.v4.runtime.Parser.consume(Parser.java:588)
        at org.antlr.v4.runtime.DefaultErrorStrategy.consumeUntil(DefaultErrorStrategy.java:758)
        at org.antlr.v4.runtime.DefaultErrorStrategy.recover(DefaultErrorStrategy.java:191)
        at ca.mcgill.mcb.pcingola.snpSift.antlr.SnpSiftParser.expression(SnpSiftParser.java:778)
        at ca.mcgill.mcb.pcingola.snpSift.antlr.SnpSiftParser.compilationUnit(SnpSiftParser.java:89)
        at ca.mcgill.mcb.pcingola.snpSift.lang.LangFactory.compile(LangFactory.java:125)
        ... 5 more
Caused by: LexerNoViableAltException('"')
        at org.antlr.v4.runtime.atn.LexerATNSimulator.failOrAccept(LexerATNSimulator.java:329)
        at org.antlr.v4.runtime.atn.LexerATNSimulator.execATN(LexerATNSimulator.java:250)
        at org.antlr.v4.runtime.atn.LexerATNSimulator.match(LexerATNSimulator.java:143)
        at org.antlr.v4.runtime.Lexer.nextToken(Lexer.java:165)
        ... 14 more

It can not work again :(

ADD COMMENT
1
Entering edit mode

Just try "ANN[*].EFFECT ! 'synonymous_variant'"

ADD REPLY
0
Entering edit mode
line 1:14 no viable alternative at input '[*].EFFECT!'

Ok, thanks. I have use = again

ADD REPLY
1
Entering edit mode

Hi basalganglia,

I'm having a similar problem (SNPSift - Token Recognition Error). I've tried the suggestions in this thread, but it hasn't worked for me. My error is a result of the "@" being in my ID name.

I was wondering if you could post your final command line so I could try to imitate it and see if it works for me? (I realize you've said "I have used "=" again", but I want to ensure I'm using the "=" correctly like you).

Cheers.

ADD REPLY
1
Entering edit mode

Hi anon123,

"ANN[*].EFFECT != 'synonymous_variant'" is my command. But it is not work efficiently. Then I have translate my data to excel file then extract synonymous variants

ADD REPLY
0
Entering edit mode

Cheers, thanks for your help. :)

ADD REPLY
0
Entering edit mode

Check my reply to basalganglia.

ADD REPLY

Login before adding your answer.

Traffic: 3042 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6