This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Snakemake error in gatk pipeline

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
 --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(?))

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

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

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

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

Е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.

0 answers

No answers yet.

Log in to answer this question.