Commit 222168e7 authored by Jacques Lagnel's avatar Jacques Lagnel
Browse files

fixed map files 4 chrs

parent 072fafce
......@@ -382,11 +382,13 @@ rule gatk4_ref_dict:
output:
dic = "{refp}/{ref}.dict".format(refp=config["REFPATH"],ref=config["GENOME"]) #config["REFPATH"] + "/" + config["GENOME"] +".dict"
params:
refp = config["REFPATH"],
bind = config["BIND"],
samtools_bin = config["samtools_bin"],
gatk4_bin = config["gatk4_bin"]
shell:
"""
rm -f {params.refp}/*.dict
singularity exec {params.bind} {params.gatk4_bin} gatk CreateSequenceDictionary -R {input.ref}
#singularity exec {params.bind} {params.samtools_bin} samtools faidx {input.ref}
singularity exec {params.bind} {params.samtools_bin} samtools dict -o {output.dic} {input.ref}
......@@ -432,7 +434,7 @@ rule gatk4_gvcf_map_file:
gvcfmap = "{outdir}/variant/gvcf_{{mychr}}_list.map".format(outdir=config["outdir"]),
params:
ch="{mychr}",
csv = expand("{sample}\t{outdir}/variant/gatk_gvcf/{sample}-{{mychr}}.g.vcf.gz", outdir=config["outdir"], sample=samples['SampleName']),
csv = expand("{sample}\t{outdir}/variant/gatk_gvcf/{sample}", outdir=config["outdir"], sample=samples['SampleName']),
bamsp = "{outdir}/mapped".format(outdir=config["outdir"]),
outlist = config["outdir"]
threads: 1
......@@ -440,7 +442,7 @@ rule gatk4_gvcf_map_file:
x=params.csv
f = open(output.gvcfmap, "w")
for i in x:
f.write("%s\n" % (i))
f.write("{}-{}.g.vcf.gz\n".format(i,params.ch))
f.close()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment