I have problem with Hard Filtering, anyone to help?

lawallawal United KingdomMember
edited December 2017 in Ask the GATK team

Hi guys, I was trying to run the below command and I got an invalid error from my argument. I could not find any mistake in my command and have also regenerated my input raw SNPs file but error remain the same. I could not also find any thread that have addressed this problem. What do you think I am doing wrong? logfile=filtered.error gatk 3.7.0 \ -T VariantFiltration \ -R fasta.fa \ -V raw_SNPs.vcf.gz \ --filterExpression "QD < 2.0 || FS > 60.0 || MQ < 40.0 || MQRankSum < -12.5 || ReadPosRankSum < -8.0" \ --filterName "default_SNP_filter" \ -o filtered_SNPs.vcf \ 2> >(tee "$logfile")

ERROR Invalid argument value '2.0' at position 9. ERROR Invalid argument value '||' at position 10. ERROR Invalid argument value 'FS' at position 11. ERROR Invalid argument value '>' at position 12. ERROR Invalid argument value '60.0' at position 13. ERROR Invalid argument value '||' at position 14. etc..
Post edited by shlee on

Best Answer

Answers

  • shleeshlee CambridgeMember, Broadie ✭✭✭✭✭

    Hi @lawal,

    Are you by chance copy-pasting the command? Can you try typing out the command instead?

  • lawallawal United KingdomMember

    I initially ran this command in bash and latter copy pasted. Nevertheless, I typed it in terminal and yet still got same error. I have tried gatk 3.8.0 and 3.7.0 but still the same error.

  • shleeshlee CambridgeMember, Broadie ✭✭✭✭✭

    Can you post the exact command you are using? Thanks.

  • lawallawal United KingdomMember

    Thank you shlee. Here it is:

    module load gatk/3.7.0
    logfile=filtered.error
    gatk \
    -T VariantFiltration \
    -R fasta.fa \
    -V raw_SNPs.vcf.gz \
    --filterExpression "QD < 2.0 || FS > 60.0 || MQ < 40.0 || MQRankSum < -12.5 || ReadPosRankSum < -8.0" \
    --filterName "default_SNP_filter" \
    -o filtered_SNPs.vcf \
    2> >(tee "$logfile")

  • lawallawal United KingdomMember

    Thank you @shlee for this effort. I am going to try your suggestion and see what I get.

  • lawallawal United KingdomMember

    @shlee thanks for your help. I ran the command out of the module Based in your suggestion and it works.

  • shleeshlee CambridgeMember, Broadie ✭✭✭✭✭
Sign In or Register to comment.