Question: Snipsift synonymous variant extraction
0
gravatar for basalganglia
4.0 years ago by
basalganglia30
England
basalganglia30 wrote:

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 • 1.4k views
ADD COMMENTlink modified 4.0 years ago • written 4.0 years ago by basalganglia30
1

instead of '=', try using 'has'

ADD REPLYlink written 4.0 years ago by Deepak Tanwar3.9k

I have tried that as  "ANN[*].EFFECT !has 'synonymous_variant'" 

-bash: !has: event not found

 

ADD REPLYlink written 4.0 years ago by basalganglia30

swap single quotes and double quotes.
 

ADD REPLYlink written 4.0 years ago by Pierre Lindenbaum119k

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

It can not work 

ADD REPLYlink written 4.0 years ago by basalganglia30
1

'ANN[*].EFFECT !has "synonymous_variant"'

ADD REPLYlink written 4.0 years ago by Deepak Tanwar3.9k

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 REPLYlink modified 21 months ago • written 21 months ago by apuhegde20
1
gravatar for basalganglia
4.0 years ago by
basalganglia30
England
basalganglia30 wrote:

Hi anon123,

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

ADD COMMENTlink written 4.0 years ago by basalganglia30

Cheers, thanks for your help. :)

ADD REPLYlink written 4.0 years ago by anon12310
0
gravatar for basalganglia
4.0 years ago by
basalganglia30
England
basalganglia30 wrote:

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 COMMENTlink written 4.0 years ago by basalganglia30
1

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

ADD REPLYlink written 4.0 years ago by Deepak Tanwar3.9k
0
gravatar for basalganglia
4.0 years ago by
basalganglia30
England
basalganglia30 wrote:

line 1:14 no viable alternative at input '[*].EFFECT!'

 

Ok, thanks. I have use "=" again 

ADD COMMENTlink written 4.0 years ago by basalganglia30
1

Hi basalganglia,

I'm having a similar problem (https://www.biostars.org/p/140593/). 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 REPLYlink modified 4.0 years ago • written 4.0 years ago by anon12310

Check my reply to basalganglia.

ADD REPLYlink written 21 months ago by apuhegde20
Please log in to add an answer.

Help
Access

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