Entering edit mode
18 months ago
bestone
▴
30
Hello, I run the code but I got the Error. Could you pls help me with this issue? How can I fix it?
gatk VariantFiltration
-R reference. fasta
-V input.vcf
--filter-expression "FILTER == 'PASS' && (QUAL < 30.0 || QD < 2.0 || FS > 60.0 || MQ < 40.0 || MQRankSum < -12.5 || ReadPosRankSum < -8.0)"
--filter-name "FILTER_NAME"
-O filtered.vcf
A USER ERROR has occurred: Argument output was missing: Argument 'output' is required.
Set the system property GATK_STACKTRACE_ON_USER_EXCEPTION (--java-options '-DGATK_STACKTRACE_ON_USER_EXCEPTION=true') to print the stack trace. zsh: command not found: -R zsh: command not found: -V zsh: command not found: --filter-expression zsh: command not found: -O
the formatting is missing in your question. how do you break lines ? did you add a antislash at the end of the lines ? didn't you forgot the last antislash before your option -O ?
Actually, I didn't forget, I added it, I tried, then I removed it, but I still got an error.
show us the very complete command line, including the antislash, including the error.
USAGE: VariantFiltration [arguments]
Edited by GenoMax : Remainder of message was redacted since it was a print-out of in-line help for this tool.
A USER ERROR has occurred: filterExpression is not a recognized option
Set the system property GATK_STACKTRACE_ON_USER_EXCEPTION (--java-options '-DGATK_STACKTRACE_ON_USER_EXCEPTION=true') to print the stack trace.
This is the only important message here.
Are you copying and pasting this command from a document? in macOS?
so how can I fix it?
Are you copying and pasting this command from a document? in macOS? Looks like something in your command is not being recognized as a proper option (hyphens or quotes).
I am using macOS. I got the command from the link https://gatk.broadinstitute.org/hc/en-us/articles/360037434691-VariantFiltration
This may sound odd but can you turn-off "smart quotes and dashes" option in System Preferences and then type the hyphens and quotes in command by hand?
I tried it but unfortunately, still not working
Are you getting the same error or has that changed?
yes the same error
Have you re-typed every hyphen, quote and = (including one in middle of
--filter-expression
_?Yes I re-typed the manual
Can you take out the
--filter-expression
option and see if the command works?it worked when I remove it
That goes to show that there is something incorrect about the option in your command line. You will need to fix that.
The example given in the documentation is wrong, the parameters are --filter-expression and --filter-name as listed below, not --filterExpression. I parameter names might have changed between versions and the example hasn't been updated" Michael replied below. I changed them. It. worked thank you so much for your help.
I guess you changed the command in the original post since?
I moved @Michael's comment to an answer. You can accept it (green check mark) to provide closure to this thread.