From caa8df3e1345b001ac5c9d7036c61d54d33b8b76 Mon Sep 17 00:00:00 2001 From: pdimens Date: Mon, 25 Nov 2024 19:42:04 -0500 Subject: [PATCH] fix for simuG inconsistency --- harpy/snakefiles/simulate_variants.smk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/harpy/snakefiles/simulate_variants.smk b/harpy/snakefiles/simulate_variants.smk index 137e44030..39fad0aa1 100644 --- a/harpy/snakefiles/simulate_variants.smk +++ b/harpy/snakefiles/simulate_variants.smk @@ -14,6 +14,7 @@ onerror: outdir = config["output_directory"] envdir = os.path.join(os.getcwd(), outdir, "workflow", "envs") variant = config["workflow"].split()[1] +simuG_variant = variant.upper() if variant == "cnv" else variant outprefix = config["prefix"] genome = config["inputs"]["genome"] vcf = config[variant].get("vcf", None) @@ -58,7 +59,7 @@ rule simulate_haploid: geno = genome output: f"{outdir}/{outprefix}.simseq.genome.fa", - f"{outdir}/{outprefix}.refseq2simseq.{variant}.vcf", + f"{outdir}/{outprefix}.refseq2simseq.{simuG_variant}.vcf", f"{outdir}/{outprefix}.refseq2simseq.map.txt" log: f"{outdir}/logs/{outprefix}.log" @@ -73,7 +74,7 @@ rule simulate_haploid: rule rename_haploid: input: fasta = f"{outdir}/{outprefix}.simseq.genome.fa", - vcf = f"{outdir}/{outprefix}.refseq2simseq.{variant}.vcf", + vcf = f"{outdir}/{outprefix}.refseq2simseq.{simuG_variant}.vcf", mapfile = f"{outdir}/{outprefix}.refseq2simseq.map.txt" output: fasta = f"{outdir}/{outprefix}.fasta", @@ -113,7 +114,7 @@ rule simulate_diploid: output: f"{outdir}/haplotype_{{haplotype}}/{outprefix}.hap{{haplotype}}.simseq.genome.fa", f"{outdir}/haplotype_{{haplotype}}/{outprefix}.hap{{haplotype}}.refseq2simseq.map.txt", - temp(f"{outdir}/haplotype_{{haplotype}}/{outprefix}.hap{{haplotype}}.refseq2simseq.{variant}.vcf") + temp(f"{outdir}/haplotype_{{haplotype}}/{outprefix}.hap{{haplotype}}.refseq2simseq.{simuG_variant}.vcf") log: f"{outdir}/logs/{outprefix}.hap{{haplotype}}.log" params: