This is a test version of Biostars. For the public version, visit https://www.biostars.org.
GATK filtering console error

Hello everybody,

This could be the stupidest reason, but I have not found any mention about it on Internet. When I try to run filtering raw variants through GATK like:

srun GenomeAnalysisTK -T SelectVariants -R reference.fa -V raw_variants.vcf --filterExpression "QD < 2.0 || FS > 60.0 || MQ < 40.0 || MQRankSum < -12.5 || ReadPosRankSum < -8.0" --filterName "my_snp_filter" -o filtered_variants.vcf

console gives me:

-sh: 2.0: No such file or directory
-sh: FS: command not found
-sh: 40.0: No such file or directory
-sh: -12.5: No such file or directory
-sh: -8.0" --filterName "my_snp_filter" -o filtered_variants.vcf

Obliviously, it counts > and < as redirection in terminal but I have no clue why. Could you help me, please?

Thanks in advance

linux snp gatk

1 answer

quote the expression:

srun 'GenomeAnalysisTK -T SelectVariants -R reference.fa -V raw_variants.vcf --filterExpression "QD < 2.0 || FS > 60.0 || MQ < 40.0 || MQRankSum < -12.5 || ReadPosRankSum < -8.0" --filterName "my_snp_filter" -o filtered_variants.vcf'

I tired and I have recieved:

slurmstepd: error: execve(): GenomeAnalysisTK -T SelectVariants -R reference.fa -V raw_variants.vcf --filterExpression "QD < 2.0 || FS > 60.0 || MQ < 40.0 || MQRankSum < -12.5 || ReadPosRankSum < -8.0" --filterName "my_snp_filter" -o filtered_variants.vcf: No such file or directory

ok, I've looked at the syntax of srun: https://www.dkrz.de/up/doku/mistral/running-jobs/using-srun as far as I can see , you have to put

GenomeAnalysisTK -T SelectVariants -R reference.fa -V raw_variants.vcf --filterExpression "QD < 2.0 || FS > 60.0 || MQ < 40.0 || MQRankSum < -12.5 || ReadPosRankSum < -8.0" --filterName "my_snp_filter" -o filtered_variants.vcf

in a file, say run.sh , and call:

chmod +x run.sh
srun ./run.sh

I tried to do as you told me, but I have got an error from GATK "ERROR MESSAGE: Argument with name 'filterExpression' isn't defined.", which looks to be the same problem. I have reconnected to cluster just in case. Also I am using GenomeAnalysisTK/2.7-2. I have no idea what else could be helpful. Could it be sort of bug?

Thanks

Yes, seems to be working now! I was sure it is a dumb mistake. It is Friday evening.

Merci et bon weekend!

Log in to answer this question.