Snakemake error in gatk pipeline
0
0
Entering edit mode
2.2 years ago
kamanovae ▴ 100

Hi!

I created a big pipeline to run different gatk commands. But in my last rule there are errors all the time. I suspect that you need to somehow screen the numbers or something like that.

I would be grateful for any help

This is my last rule:

rule gatk_VariantFiltration:

    input: data1=config["gatk"], data2=config["out_SelectVariants"]+"{sample}.SelectVariants_snp.vcf"
    output:output1=config["out_VariantFiltration"]+"{sample}.VariantFiltration_snp.vcf"
    run:shell("""{input.data1} --java-options ""-Xmx30g""  VariantFiltration -V {input.data2}  --filter-name ""HDFLT_SOR3.00""  --filter-expression ""SOR > 3.00""  --filter-name ""HDFLT_ReadPosRankSum -8.00""  --filter-expression ""ReadPosRankSum < -8.00""  --filter-name ""HDFLT_MQRankSum-12.50""  --filter-expression ""MQRankSum < -12.50""  --filter-name ""HDFLT_QUAL30.00""  --filter-expression ""QUAL < 30.00""  --filter-name ""HDFLT_FS60.00""  --filter-expression ""FS > 60.00""  --filter-name ""HDFLT_MQ40.00""  --filter-expression ""MQ < 40.00""  --filter-name ""HDFLT_QD2.00""  --filter-expression ""QD < 2.00"" -O {output.output1}""")

And it is error:

/bin/bash: -8.00: No such file or directory
Gatk Snakemake • 1.3k views
ADD COMMENT
0
Entering edit mode
 --filter-name ""HDFLT_ReadPosRankSum -8.00""

there is something wrong here. This cannot be the name of a filter (with a blank and this number(?))

ADD REPLY
0
Entering edit mode

You're right! There really shouldn't be a gap after HDFLT_ReadPosRankSum. But the error remains the same

ADD REPLY
0
Entering edit mode

but then there should be an argument between HDFLT_ReadPosRankSum and -8.00 ...

ADD REPLY
0
Entering edit mode

But if you remove all flags with a value of -8.00, then the same error appears with a different value

/bin/bash: -12.50: No such file or directory
ADD REPLY
0
Entering edit mode

< is for input redirection, so it needs to be escaped in arguments. Try shell("... \< ..."). Same applies to >.

ADD REPLY
0
Entering edit mode

Š•hanks for the answer! And now I have this error:

A USER ERROR has occurred: 8 is not a recognized option

RuleException:
CalledProcessError in line 102 of /storage1/GatkBwaTest/SnakemakeDir/snakefile:
Command 'set -euo pipefail;  ../bin/gatk-4.1.3.0/gatk --java-options ""-Xmx30g""  VariantFiltration -V out/out_SelectVariants/NIST7035_TAAGGCGA_L001.SelectVariants_snp.vcf  --filter-name ""HDFLT_SOR3.00""  --filter-name ""HDFLT_ReadPosRankSum-8.00""   --filter-expression ""ReadPosRankSum \< -8.00""   --filter-expression ""SOR \> 3.00""  --filter-name ""HDFLT_MQRankSum-12.50""  --filter-expression ""MQRankSum \< -12.50""  --filter-name ""HDFLT_QUAL30.00""  --filter-expression ""QUAL \< 30.00""  --filter-name ""HDFLT_FS60.00""  --filter-expression ""FS \> 60.00""  --filter-name ""HDFLT_MQ40.00""  --filter-expression ""MQ \< 40.00""  --filter-name ""HDFLT_QD2.00""  --filter-expression ""QD \< 2.00"" -O out/out_VariantFiltration/NIST7035_TAAGGCGA_L001.VariantFiltration_snp.vcf' returned non-zero exit status 1.
ADD REPLY

Login before adding your answer.

Traffic: 1695 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